Nomos blockchain node
Go to file
Giacomo Pasini 9c81b72711
Random beacon (#167)
* move overlay to consensus engine

* Integrate random beacon in overlay

This commit integrates the random beacon as specified in the nomos
spec into the consensus engine library as part of the overlay.
In addition, it separates the overlay part responsible for leader
selection as an independent trait LeaderSelection, so as to share
the overall overlay structure among most constructions.

Furthermore, a leader proof has been added to a block to verify
that the proposer had valid rights to do so.

The current implementation hardcodes the leader selection update
in the consensus service, but we probably want to abstract it away
through something like the adapter pattern we use of other services
in the node.

* Move leader selection update to separate function

* Add generic support for leader selection in consensus service (#170)

* Add generic support for leader selection in consensus service

* fix

* use settings struct instead of tuple

* fix tests
2023-06-12 15:14:49 +02:00
.cargo fix link flgs (#144) 2023-05-08 17:28:10 +02:00
.github/workflows Autoauthor action (#51) 2023-01-18 17:10:13 +02:00
ci Update rust docker image for CI (#91) 2023-03-07 21:19:38 +02:00
consensus-engine Random beacon (#167) 2023-06-12 15:14:49 +02:00
nodes Random beacon (#167) 2023-06-12 15:14:49 +02:00
nomos-core Random beacon (#167) 2023-06-12 15:14:49 +02:00
nomos-services Random beacon (#167) 2023-06-12 15:14:49 +02:00
simulations chore: replace std locks to parking_lot locks in simulations (#141) 2023-05-31 12:57:42 +08:00
.DS_Store Add generic block (#93) 2023-03-14 09:55:08 -07:00
.dockerignore Docker image for nomos node (#60) 2023-02-01 10:37:15 +02:00
.gitignore Simulation initialization (#122) 2023-05-08 13:06:39 +03:00
Cargo.toml Consensus engine rework (#127) 2023-04-27 19:18:24 +02:00
Dockerfile Docker image for nomos node (#60) 2023-02-01 10:37:15 +02:00
README.md Update README.md (#120) 2023-04-24 11:05:00 +02:00
config.yml.example Http status codes (#88) 2023-03-06 15:19:27 +02:00
rustfmt.toml add rustfmt.toml (#118) 2023-04-19 15:59:51 +08:00
shell.nix Fix Nix derivation so it works in a Darwin Nix environment (explicitly requiring clang and setting env variable) (#84) 2023-02-24 11:08:46 +02:00
sim_config.json.example Simulation initialization (#122) 2023-05-08 13:06:39 +03:00

README.md

nomos-node

Nomos blockchain node mvp

Project structure

  • nomos-core: Nomos core is the collection of essential structures for the Nomos mvp and experimental nodes.
  • nomos-services: Nomos services is the collection of components that are used as building blocks of the Nomos node prototype and the experimental nodes.
    • consensus
    • log
    • http
    • mempool
    • network
    • metrics
  • nodes: Nomos nodes is the collection of nodes that are used to run the Nomos mvp and experimental nodes.
    • nomos-node: main implementation of the Nomos mvp node.
    • mockpool-node: node with single mempool service, used to measure transaction dissemination.

Services

The Nomos node uses Overwatch as its main internal framework. This means that services request communication channels to other services to interchange information through a specified messaging API.

Service architecture

Most of the services are implemented with the same idea behind. There is a front layer responsible for handling the Overwatch service and a back layer that implement the actual service logic.

This allows us to easily replace components as needed in a type level system. In any case, a node can be setup in a declarative way composing the types. For example:

...
#[derive(Services)]
struct MockPoolNode {
    logging: ServiceHandle<Logger>,
    network: ServiceHandle<NetworkService<Waku>>,
    mockpool: ServiceHandle<MempoolService<WakuAdapter<Tx>, MockPool<TxId, Tx>>>,
    http: ServiceHandle<HttpService<AxumBackend>>,
    bridges: ServiceHandle<HttpBridgeService>,
}

Docker

To build and run a docker container with Nomos node run:

docker build -t nomos .
docker run nomos /etc/nomos/config.yml

To run a node with a different configuration run:

docker run -v /path/to/config.yml:/etc/nomos/config.yml nomos /etc/nomos/config.yml