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.

Installation

For security reasons, until we have reliable reproducible build infrastructure, the only official distribution channel for themelio-node is its source code package on crates.io.

Fortunately, installing themelio-node from source is extremely easy. First, make sure cargo is installed on your machine. Then, simply run

$ cargo install --locked themelio-node

This produces an executable themelio-node in ~/.cargo/bin/, which should already be in your $PATH.

Hardware Requirements

Minimum:

Recommended:

Full nodes replicate every consensus-confirmed block, validating its contents and ensuring network security while providing a local cache of the entire blockchain state. Running a full node helps contribute to the security and (read) performance of the network.

There are two kinds of full nodes:

Auditor Full Node

On the Themelio Mainnet:

To run an auditor on the “mainnet” (which at the moment is far from stable, but does have a persistent history), just run:

$ themelio-node

themelio-node will then beginning synchronizing all the blocks in the blockchain. This will take quite a while (a day or so) and store a bunch of data in in ~/.themelio-node/.

On the Themelio Testnet:

To run the auditor on the non-persistent testnet, where most covenant development and testing will happen during the betanet period, run instead

$ themelio-node --bootstrap tm-1.themelio.org:11814 --testnet

Note that two things were needed to connect to the testnet:

Configurations

You can change the configuration of an auditor node with the following flags:

``` --bootstrap ... Bootstrap addresses. May be given as a DNS name [default: mainnet-bootstrap.themelio.org:11814]

--database Database path [default: /tmp/themelio-mainnet]

--listen Listen address

--testnet Use testnet validation rules

--override-genesis If given, uses this YAML file to configure the network genesis rather than following the known testnet/mainnet genesis ```

Local simnet support

Note: there will soon be a tool to automatically generate these configurations.

We can configure a simnet --- a "fake" network local to our computer --- by the combination of three options:

A more detailed explanation of --staker-cfg requires explaining the staker and consensus system, as follows:

Staker Full Node

On the Themelio Mainnet:

WIP

On the Themelio Testnet:

WIP

Configuration

WIP

Contributing

Thank you for considering contributing to the Themelio source code! We welcome all contributions from absolutely anyone on the internet.

For minor changes, simply fork, fix, and submit a pull request. If you want to propose a larger change, be sure to get in touch with our dev team on Discord to make sure your change aligns with Themelio's overarching philosophy. This will likely save you a significant amount of time and effort, as well as speed up the review process of your change.

Finally, make sure your code adheres to the following guidelines:

License

The license of the project is the Mozilla Public License, version 2.


Source code structure

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:

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.