Nomos blockchain node
Go to file
Daniel Sanchez 7b9643f17e
DA Protocol V1 (#626)
* Base cleaning of da to new traits/structure
Added new da protocols and types

* DA: KZG+RS core (#632)

* Removed old kzg rs modules

* Added new kzgrs core module

* Implemented bytes_to_polynomial and tests

* Use coefficient form

* Refactor evaluations into method

* Use domain elements instead of roots of unity in tests

* Fix encoding and test

* Clippy happy

* Add comments

* Implement polynomial commitment

* Implement proof generation

* Sketch fn signature for verification

* implement proof verification

* Implemented verification and tests

* Return evaluations from bytes_to_polynomial as well

* Use modular le bytes

* Implement rs encode/decode

* Implement decoding tests

* Implement decode using lagrange

* Cleanup imports

* Da: v1 encoder (#633)

* Added new kzgrs core module

* Implemented bytes_to_polynomial and tests

* Use coefficient form

* Refactor evaluations into method

* Use domain elements instead of roots of unity in tests

* Fix encoding and test

* Clippy happy

* Add comments

* Implement polynomial commitment

* Implement proof generation

* Sketch fn signature for verification

* implement proof verification

* Implemented verification and tests

* Return evaluations from bytes_to_polynomial as well

* Use modular le bytes

* Implement rs encode/decode

* Implement decoding tests

* Implement decode using lagrange

* Added chunksmatrix

* Implement encoder with chunkify

* Added missing files

* Implement commit row commitments

* Implement compute elements (row) proofs

* Fix lib and types exposures

* Implement encoder main methods

* Implement encode method

* Implement chunkify test
Fix related bugs

* Implement compute row kzg commitments
Fix related bugs

* Implement rs encode rows test
Fix related bugs
Refactored API

* Implement row proofs tests
Fix fieldelement encoding/decoding bug

* Implement aggregated commitment test
Implement aggregated column proofs test

* Cleanup

* Fix deps

* Fix tests

* Fix chunk too big test

* Da: v1 verifier (#635)

* Fix encoding and test

* Implement commit row commitments

* Implemented dablob

* Implement verifier new
Implement verifier check column

* Clippy cleanup

* Implement verifier

* Implemented verify column test

* Implemented full verify test

* DA API Payload to Item in mempool  (#634)

* Base cleaning of da to new traits/structure
Added new da protocols and types

* DA: KZG+RS core (#632)

* Removed old kzg rs modules

* Added new kzgrs core module

* Implemented bytes_to_polynomial and tests

* Use coefficient form

* Refactor evaluations into method

* Use domain elements instead of roots of unity in tests

* Fix encoding and test

* Clippy happy

* Add comments

* Implement polynomial commitment

* Implement proof generation

* Sketch fn signature for verification

* implement proof verification

* Implemented verification and tests

* Return evaluations from bytes_to_polynomial as well

* Use modular le bytes

* Implement rs encode/decode

* Implement decoding tests

* Implement decode using lagrange

* Cleanup imports

* Reduce abstraction for certificate and vid metadata

* Allow payload to mempool as long as it converts into item

* Da Certificate verifier

* Add mock certificate for core tests

* Mempool payload verification

* Integrate mock verifiers for tx and certs

* Detach verification from cert and tx

* Seperate payload and item in mempools

* Mempools in integration tests

* Remove old cert verifier

* Network payload to item constraints in da mempool

* Update nomos-da/full-replication/src/lib.rs

Co-authored-by: Daniel Sanchez <sanchez.quiros.daniel@gmail.com>

* Sort attestations for cert signature

* Update nomos-da/full-replication/src/lib.rs

Co-authored-by: Daniel Sanchez <sanchez.quiros.daniel@gmail.com>

---------

Co-authored-by: danielsanchezq <sanchez.quiros.daniel@gmail.com>

* DA API Certificate verification  (#641)

* Redo certificate verification in mempool

* FullReplication verifier params provider

* Integrate da params provider into the node

* DA API Indexer service (#643)

* Base cleaning of da to new traits/structure
Added new da protocols and types

* Remove da availability crate completely

* Scaffold for da storage service

* Indexer service responsible for storage and blockchain subscription

* Handle index related ops only

* Acquire storage and consensus relays

* Indexer trait

* wip: storage adapter

* Use storage adapter instead of storage

* Add consensus adapter trait for block subscriptions

* Consensus block subscriber adapter

* Use metadata from da core in indexer

* Update nomos-services/data-availability/indexer/src/lib.rs

Co-authored-by: Daniel Sanchez <sanchez.quiros.daniel@gmail.com>

* Update nomos-services/data-availability/indexer/src/lib.rs

Co-authored-by: Daniel Sanchez <sanchez.quiros.daniel@gmail.com>

* Use std::ops::Range for da queries

* Return certificate metadata

* Da storage adapter methods

---------

Co-authored-by: danielsanchezq <sanchez.quiros.daniel@gmail.com>

* Reuse evaluations when computing proofs (#647)

* Reuse precomputed evaluations instead of evaluation polynomial for each proof

* kzgrs benchmarks

* Clippy happy

* DA API indexer implementation (#644)

* Rocksb adapter in da indexer

* Handle da service messages

* Remove indexer trait, use storage directly in the indexer service

* Return unordered indexes range

* Load blob by vid from file

* Use VID in consensus

* Change full replication index type to byte array

* Change payload to cert and item to vid where required

* Service integration tests for indexer

* Feature gate rocksdb backend

* Propagate range response send error

* FRIndex to Index

* VID to VidCertificate

* Pass blobs file dir via settings

* Da v1 multiple proofs bench (#648)

* Parallel proof generation bench

* Added bench comment

* Modify domain to fit exact sizes

* Fix domain in benches

* Force parallelization features in lib

* DA: Implement base structure for verifier service (#627)

* Base cleaning of da to new traits/structure
Added new da protocols and types

* Implement base structure for verifier service

* Added comments and todo!

* Cleanup imports

* Size of VidCert in full replication

* Nomos Da Verifier service crate

* Extension replaced with metadata

* Fix DaIndexer service name

* Storage adapter trait in verifier

* Manage lifecycle and messages in verifier

* Blob trait in core

* Common nomos da storage crate

* Use updated nomos da storage in indexer

* Verifier storage adapter

* Libp2p adaper for verifier

* Kzgrs backend in verifier service

* Fix fmt

* Clippy happy

---------

Co-authored-by: Gusto <bacvinka@gmail.com>

* DA Verifier service integration tests (#650)

* Base cleaning of da to new traits/structure
Added new da protocols and types

* Implement base structure for verifier service

* Added comments and todo!

* Cleanup imports

* Size of VidCert in full replication

* Nomos Da Verifier service crate

* Extension replaced with metadata

* Storage adapter trait in verifier

* Manage lifecycle and messages in verifier

* Common nomos da storage crate

* Use updated nomos da storage in indexer

* Verifier storage adapter

* Libp2p adaper for verifier

* Kzgrs backend in verifier service

* Fix fmt

* Data availability tests module

* Return attestation in service msg response

* Common definitions for da tests

* Serde for kzgrs proofs and commitments

* Da verifier integration test

* WIP nomos-core in kzgrs backend

* Kzgrs blob to common module

* Add client zone to verifier test and check if attestations are created

* Cleanup and comments

* Use libp2p only for verifier and indexer service tests

* Lint in da tests

* Simplify da blob serialization

* Remove attester from nomos-core attestation

* Verifier backend error

---------

Co-authored-by: danielsanchezq <sanchez.quiros.daniel@gmail.com>

* DA Kzgrs Backend Certificate implementation (#651)

* Kzgrs backend certificate definition

* Encoded data to certificate test

* Nomos da domain specific tag

* Handle errors in da certificate creation

* Add nomos core traits to da cert

* Derive ordering traits for da index

* Add failure test cases to kzgrs certificate

* Da v1 benches expand (#658)

* Update benches with more cases

* Expand benches

* Added parallel feature

* Fix test comment

Co-authored-by: Youngjoon Lee <5462944+youngjoon-lee@users.noreply.github.com>

* Remove outdated comment

---------

Co-authored-by: Gusto <bacvinka@gmail.com>
Co-authored-by: gusto <bacv@users.noreply.github.com>
Co-authored-by: Youngjoon Lee <5462944+youngjoon-lee@users.noreply.github.com>
2024-06-13 11:23:11 +03:00
.cargo fix link flgs (#144) 2023-05-08 17:28:10 +02:00
.github Use windows msvc (as rocksdb fails with gnu toolchain) (#621) 2024-03-22 10:06:37 +01:00
book Add mdBook skeleton (#640) 2024-04-24 23:18:51 +09:00
ci Mixnet v1 (#569) 2024-03-12 15:47:35 +09:00
consensus Switch from Carnot to Cryptarchia (#624) 2024-03-28 12:56:04 +01:00
ledger/cryptarchia-ledger Switch from Carnot to Cryptarchia (#624) 2024-03-28 12:56:04 +01:00
mixnet Remove unnecessary attributes and add doc comments for Mixnet (#618) 2024-03-21 23:06:32 +09:00
nodes/nomos-node DA Protocol V1 (#626) 2024-06-13 11:23:11 +03:00
nomos-cli DA Protocol V1 (#626) 2024-06-13 11:23:11 +03:00
nomos-core DA Protocol V1 (#626) 2024-06-13 11:23:11 +03:00
nomos-da DA Protocol V1 (#626) 2024-06-13 11:23:11 +03:00
nomos-libp2p Mixnet v1 (#569) 2024-03-12 15:47:35 +09:00
nomos-services DA Protocol V1 (#626) 2024-06-13 11:23:11 +03:00
nomos-utils Mixnet v1 (#569) 2024-03-12 15:47:35 +09:00
testnet Testnet consensus configuration (#656) 2024-05-30 12:46:02 +03:00
tests DA Protocol V1 (#626) 2024-06-13 11:23:11 +03:00
.codecov.yml Disable codecov annotations (#409) 2023-09-15 15:11:50 +03:00
.dockerignore Docker image for nomos node (#60) 2023-02-01 10:37:15 +02:00
.env.example Mixnet v1 (#569) 2024-03-12 15:47:35 +09:00
.env.testnet Mixnet v1 (#569) 2024-03-12 15:47:35 +09:00
.gitignore Store logs from failed CI as artifacts (#508) 2023-11-07 09:38:10 +09:00
Cargo.toml DA Protocol V1 (#626) 2024-06-13 11:23:11 +03:00
Dockerfile Testnet consensus configuration (#656) 2024-05-30 12:46:02 +03:00
README.md Fix typos (#503) 2023-11-03 09:29:40 +01:00
compose.static.yml Testnet consensus configuration (#656) 2024-05-30 12:46:02 +03:00
compose.yml Mixnet v1 (#569) 2024-03-12 15:47:35 +09:00
rustfmt.toml add rustfmt.toml (#118) 2023-04-19 15:59:51 +08:00
shell.nix Bump rust (#602) 2024-03-01 13:28:05 +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 implements 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