All Projects

Lunarblock

Bitcoin full node in Lua for LuaJIT

Lua

About

A Bitcoin full node in Lua targeting LuaJIT 2.1 for high performance, proving that even scripting languages can handle consensus.

Completion 100%

Mainnet sync

Initial Block Download
45.9%
Block height
434,000
Sync rate
~1,700 blk/hr
ETA to tip
~300 hours
Test vectors
1222/1222

Tech stack

Language
Lua
Storage
RocksDB
Crypto
libsecp256k1 (C FFI)
Lines of code
38,274

Quick start

terminal
$ git clone https://github.com/hashhog/lunarblock.git
$ cd lunarblock
$ luajit src/main.lua --network=mainnet

Features

Wire serialization
Cryptographic primitives
Script interpreter
P2P networking
Block validation
UTXO set management
Header sync
Block sync (IBD)
Mempool
RPC server
Wallet
Mining/block templates
Script test vectors (1222/1222)
Testnet4 sync
Mainnet sync
BIP324 v2 transport