Giacomo Pasini
b884e1ceca
Fix waku backend (#231)
* Fix order of network streams When fetching a message from the network, we need to first listen for incoming messages and then look at the storage. If we do this in the opposite order, there's a brief moment where we've freezed our view of stored messages and are not yet listening for incoming ones, thus risking loosing messages. * Wait for waku db spurious delays Sometimes waku takes some time (e.g. a few seconds) before making a received message available through the archive query. Let's account for this by making repeated calls if the first one is not successful. * Add initial network wait We've observed in testing that even if waku reports that some peers are connected it can't really deliver a message. To overcome this limitation, we add a wait at the network service startup. We know this is not ideal, but Waku will eventually be replaced and we're looking for a quick fix. * fmt
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
Description
Languages
Rust
99.3%
Groovy
0.3%
Dockerfile
0.3%