A full Ergo blockchain node in Rust. Not a port of the JVM reference node — a ground-up implementation that reuses the sigma-rust ecosystem for cryptography and script evaluation, with a custom P2P networking layer reverse-engineered from the JVM node's wire protocol.
Validated from genesis through the full mainnet chain with zero checkpoints — every block, every transaction, every ErgoScript evaluation.
- Full validation — UTXO mode (persistent AVL+ tree) and digest mode (AD proof verification)
- Parallel pipeline — intra-block
par_iterover transactions + cross-block apply_state/evaluate_scripts overlap - P2P networking — IPv4/IPv6, peer discovery, handshake, SyncInfo exchange, section download, deep chain reorg
- Mempool — validate-on-entry, replace-by-fee, family weighting, fee statistics, P2P relay
- REST API — 19 JVM-compatible endpoints: blocks, transactions, UTXO lookups, peers, emission, mining
- Mining API — Autolykos v2 candidate assembly with EIP-27 re-emission, solution validation
- Soft-fork voting — epoch-boundary parameter tracking, JVM v6
matchParameters60semantics - NiPoPoW — build and verify proofs (P2P codes 90/91), light-client bootstrap mode
- UTXO snapshot sync — bootstrap from peer snapshots, serve snapshots to peers
- Crash recovery — all stateful components survive
kill -9and resume correctly
Optional binaries that extend the node without adding dependencies to the core:
| Addon | What |
|---|---|
| fastsync | Fast bootstrap via JVM peer REST API. Parallel multi-peer header and block section fetching. Auto-spawns on startup if installed. |
| indexer | SQLite transaction/box indexer with 17 REST endpoints and Swagger UI (port 9054). |
+------------------+
| main crate | wires everything together via traits
+--------+---------+
|
+-------------------+-------------------+
| | | | |
+--+--+ +--+--+ +---+---+ +---+---+ +---+---+
| p2p | |chain| | sync | | api | |mempool|
+-----+ +-----+ +---+---+ +-------+ +-------+
|
+---------+---------+
| |
+----+-----+ +------+------+
|validation| | state |
+----------+ +-------------+
| Crate | Repo | Role |
|---|---|---|
p2p/ |
enr-p2p | P2P networking, handshake, message framing, routing |
chain/ |
enr-chain | Header parsing, PoW, difficulty adjustment, chain validation |
sync/ |
in-repo | Sync state machine, section download, validation coordination |
validation/ |
in-repo | Block validation: digest mode + UTXO mode, section serializers |
state/ |
enr-state | UTXO state via authenticated AVL+ tree over redb |
store/ |
enr-store | Persistent storage for headers, blocks, modifiers |
mempool/ |
in-repo | Transaction pool, replace-by-fee, family weighting |
mining/ |
in-repo | Candidate assembly, emission tx, PoW validation |
api/ |
in-repo | REST API (axum), 19 endpoints |
facts/ |
ergo-node-facts | Interface contracts between components |
Components communicate through traits — the P2P layer doesn't know what validation means, and the validation layer doesn't know about networking.
cargo build --releaseThe binary is at target/release/ergo-node-rust.
./build-debPre-built .deb packages are available on the releases page.
Addons are separate binaries in addons/:
# fastsync
cd addons/fastsync && cargo build --release
# indexer
cd addons/indexer && cargo build --release[node]
network = "mainnet"
state_type = "utxo" # "utxo", "digest", or "light"
data_dir = "/var/lib/ergo-node/data"
[p2p]
bind_addr = "[::]:9030"See local-standalone.toml for a full example.
The node depends on two upstream Rust crates for consensus-critical primitives, consumed via forks that carry changes contributed back as open PRs.
mwaddip/sigma-rust — ergo-chain-types, ergo-lib, ergo-nipopow, sigma-ser
Open PRs against ergoplatform/sigma-rust:
- #847 — Fix panic in
gen_indexeswhen index modulo N equals zero - #848 —
ErgoTreePredefport + genesis construction - #850 — Soft-fork parameter variants
- #851 —
NipopowAlgos::prove_with_readerfor efficient proof serving - #852 — NiPoPoW
has_valid_connectionstolerates skipped prefix entries - #854 — Port JIT costing from sigmastate-interpreter
- #855 — Allocation bomb guard for VLQ-decoded message sizes
- #857 — BigInt modulo semantics (
modvsrem) - #858 — Lazy constant resolution in ErgoTree evaluation
- #859 — Pre-JIT ErgoScript leniency for v0/v1 scripts
- #860 — Parse-time
SOption(T)leniency incheck_post_eval_tpe(matches JVMOneArgumentOperationSerializer)
- #10 —
Resolvertype change to support disk-backed storage - #11 —
VersionedAVLStorage::flush()for durable commits on demand
- ergoplatform/sigma-rust — ErgoScript interpreter, transaction validation, chain types
- ergoplatform/ergo_avltree_rust — Authenticated AVL+ tree
- arkadianet/ergo —
chainSlice/ parallel peer REST fetching technique used by fastsync
Public domain. No rights reserved.