• Stars
    star
    578
  • Rank 77,250 (Top 2 %)
  • Language
    C
  • License
    Other
  • Created about 3 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Bitcoin node written in C

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.

More Repositories

1

blessed

A high-level terminal interface library for node.js.
JavaScript
11,297
star
2

tty.js

A terminal for your browser, using node/express/socket.io
JavaScript
4,194
star
3

ttystudio

A terminal-to-gif recorder minus the headaches.
JavaScript
3,239
star
4

compton

A compositor for X11.
C
2,247
star
5

term.js

A terminal written in javascript.
JavaScript
1,550
star
6

pty.js

Bindings to forkpty(3) for node.js.
C++
857
star
7

termcoin

A bitcoin wallet and blockchain explorer for your terminal.
JavaScript
481
star
8

liburkel

Authenticated key-value store (i.e. an urkel tree)
C
315
star
9

zest

An absurdly fast CSS selector engine.
JavaScript
238
star
10

slock

Fork of suckless screen locker for the extremely paranoid.
C
152
star
11

tiny

A small database for node.js.
JavaScript
111
star
12

lcdb

LevelDB implemented in C (unofficial -- not affiliated with Google in any way)
C
98
star
13

bns

Recursive DNS server and resolver for node.js
JavaScript
65
star
14

parted

Streaming body parser for node.js.
JavaScript
63
star
15

bthreads

worker threads for javascript
JavaScript
48
star
16

bpkg

Bundler and release tool for node.js
JavaScript
46
star
17

tng

A full-featured PNG renderer for the terminal.
JavaScript
41
star
18

coined

A high-level wrapper around BCoin
JavaScript
25
star
19

node-uo

A UO server for node.js
JavaScript
25
star
20

n64

Int64 object for javascript
JavaScript
24
star
21

liquor

A templating engine minus the code.
JavaScript
19
star
22

daemonic

A dead-simple module to daemonize a node. No compilation required.
JavaScript
19
star
23

node-telnet2

Telnet implementation for node.js, based on node-telnet
JavaScript
18
star
24

gitj

gitk in your terminal.
JavaScript
15
star
25

node-pingback

pingbacks for node.js
JavaScript
15
star
26

dilated

A blog for node.js.
JavaScript
14
star
27

csslike

A CSS preprocessor for node.js, designed to conform to the most recent www-style proposals.
CSS
12
star
28

cmake-node

node.js toolchain for cmake
C
11
star
29

rondo

DOM library and app framework.
JavaScript
11
star
30

st

A fork of st implementing scrollback, keyboard selection, and tabs.
C
11
star
31

highlighter.js

a quick and dirty JS highlighter
JavaScript
10
star
32

charged

High-level Chargify API binding for node.js
JavaScript
10
star
33

supersha

Fast SHA256 for node.js
C
10
star
34

dwm

My dwm fork and configuration.
C
10
star
35

tmux

A fork of tmux implementing xterm behavior.
C
8
star
36

vanilla

A framework for node.js.
JavaScript
8
star
37

Live-Stylesheets

small google chrome extension for editing a page's raw css
JavaScript
8
star
38

shim.htc

An HTML5 Shim in an HTML Component
JavaScript
8
star
39

epsilon-not

Weblog
PHP
5
star
40

unbound

Bindings to libunbound for node.js
C
5
star
41

evilpart

A Node multipart parser that is positively evil
JavaScript
5
star
42

N

pretty control for js
JavaScript
5
star
43

nmterm

A wicd-curses-like interface for NetworkManager
JavaScript
5
star
44

pulsemixer.js

An alsamixer-like interface for PulseAudio
JavaScript
4
star
45

rocksdown

RocksDB backend for LevelUP
C++
4
star
46

bsert

Minimal assertions for javascript
JavaScript
4
star
47

bitcoind.js

bitcoind.js has moved to https://github.com/bitpay/bitcoind.js
C++
4
star
48

wazm

WASM abstraction and EMCC preamble
JavaScript
3
star
49

babylonia

zero-dependency babel
JavaScript
3
star
50

bslint

eslint with less (or more) bullshit
JavaScript
3
star
51

bdoc

zero-dependency jsdoc
JavaScript
3
star
52

pkg-verify

Dependency verifier for node.js
JavaScript
3
star
53

buffer-map

Buffer-keyed map for javascript
JavaScript
2
star
54

loady

dynamic loader for node.js
JavaScript
2
star
55

leasedump

Dump dhcpcd lease files
C
1
star
56

qrsuite

jsqrcode and qr.js rolled into one package
JavaScript
1
star