themelio-node: Themelio's reference implementation
Themelio is a new public blockchain focused on security, performance, and long-term stability. themelio-node is Themelio's reference implementation in Rust.
Overview
themelio-node is a highly concurrent program where different tasks are done by separate actors, which are "active" structs that own background async tasks or threads. They concurrently run and communicate both with other actors and with "plain data" types like Mempool. They are represented as green boxes in the following diagram illustrating the data flows of the whole program:

There are the following primary types in themelio-node:
NodeProtocolis the core node actor. It implements the core auditor/full node logic: gossiping with other through themelnet-based auditor P2P network (via thethemelio-nodeprotcrate) to synchronize the latest blockchain state.- Pushes new blocks to
Storage - Pushes new transactions to
Mempool; they are only gossipped further ifMempoolaccepts them - Pulls data from
Storageto gossip to other nodes - Pulls data from
BlockIndexerto answer queries about coin lists (which coins do this address "own")
- Pushes new blocks to
BlockIndexerindexes "nonessential" information about blocks. It continually pulls blocks out ofStorage, and indexes them, keeping track of information such as which coins do which address own.Storageencapsulates all persistent storage in the system. It is not an actor, so it does not initiate any data flows.- Stores data using
meshanina(for sparse Merkle tree nodes) andboringdb(for blocks and other metadata) Mempoolis a non-persistent field that keeps track of the most likely next block. This is based on the existing blockchain state plus unconfirmed transactions seen in the network.
- Stores data using
StakerProtocolis the core staker actor, which is only started in staker mode. It runs the Streamlet consensus protocol (implemented in thenovasymphcrate) over a separate melnet P2P.- Pushes freshly finalized blocks, with their consensus proofs (a quorum of signatures), into
Storage(whereNodeProtocolwill pick them up and gossip them) - When proposing a block, pulls a candidate from
Mempool
- Pushes freshly finalized blocks, with their consensus proofs (a quorum of signatures), into
Usage
Have a look in how-to-use.
Metrics
Themelio Labs runs a worldwide network of Themelio full nodes --- themelio-node can also be compiled to report metrics for this network.
Read here.