GithubHelp home page GithubHelp logo

perrynzhou / mako Goto Github PK

View Code? Open in Web Editor NEW

This project forked from chjj/mako

0.0 1.0 0.0 5.68 MB

Bitcoin node written in C

License: Other

Shell 0.08% JavaScript 0.26% C 98.54% Makefile 0.14% CMake 0.43% M4 0.38% Zig 0.18%

mako's Introduction

mako

mako is a from-scratch bitcoin reimplementation, written in "almost-C89" (i.e. it can be compiled by a C89 compiler if <stdint.h> is available -- no other C99 features are used).

Mako is more-or-less dependency-less. It only vendors lcdb. Mako aims to support any POSIX.1-2001 operating system as well as Windows XP and up.

Mako has a re-usable architecture. The core library (libmako) does no IO, and has almost every tool needed for working with bitcoin. The fullnode (libnode) is also a separate library which the final executable links to.

Development Status

Do not use mako in production. Mako is under heavy development and almost guaranteed to have a significant amount of bugs at this point in time.

The node itself is currently incomplete for various reasons, including:

  • A number of RPC calls are missing (notably essential things like getblocktemplate).
  • The entire wallet RPC is currently missing, along with the wallet itself.
  • Consensus & policy rules are mostly complete: mako supports softforks up to and including segwit, but not later additions like taproot.
  • A number of tests still need to be written.
  • Mako passes all of the transaction and script test vectors from bitcoin core, but there's no telling what consensus issue may arise in its current state.

Build & Usage (for experimentation only)

So far, mako has only been tested on Linux and Win32 (cross-compiled with mingw).

$ cmake . -DCMAKE_C_FLAGS=-g -DCMAKE_BUILD_TYPE=Release
$ make

The above will produce two binaries: mako and makod. The arguments mimic bitcoin-cli and bitcoind respectively.

Background

There are a few reasons mako needed to exist:

  • Because it is C, all data structures and primitives are written by hand and are not subject to any particular platform's implementation of them. On top of that, mako makes very sparing use of the C standard library. This makes mako more auditable than a bitcoin implementation written in C++, JS, Rust, Go, etc.
  • A low-level, portable, and re-usable codebase for bitcoin is useful for a number of projects.
  • Contrary to what some people might tell you, multiple implementations of a protocol are a good thing. In bitcoin's case, they are necessary to mitigate the harm of developer centralization.
  • The bitcoin protocol itself should be recorded in as many places as possible for posterity.
  • Mako is planned to be used as the base for a port to the handshake protocol, among other things.

Contribution and License Agreement

If you contribute code to this project, you are implicitly allowing your code to be distributed under the MIT license. You are also implicitly verifying that all code is your original work. </legalese>

License

  • Copyright (c) 2021-2022, Christopher Jeffrey (MIT License).

See LICENSE for more info.

mako's People

Contributors

chjj avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.