* DispersedBlobData in nomos-core
* Implement BlobInfo in kzgrs-backend
* Fullreplication BlobInfo
* Use block info in da mempool
* Blob info in consensus
* Blob info in da-verifier
* BlobInfo in da indexer
* BlobInfo in nomos-api
* Verifier and Indexer integration tests with BlobInfo
* Blob info in nomos node
* Import DaEncoder trait
* test: add metadata getter test for VidCertificate
* fix: uncomment assertion for SeqCst
* fix: formatting
* test: get Metadata for Certificate
- generate signature for Certificate
* test: generate hash for Attestation
* fix: add assertion for generate hash
* fix: wrap in test module
- add helper functions
* fix: undo wrap in test module
* test: Hash implementation for Certificate with default Hasher
* Api endpoint to add blob and receive attestation
* Nomos DA Certificate serialization
* Kzgrs verification params provider
* Indexer http api using kzgrs
* Plug da http endpoints into nomos api
* Use fft for rs
* Specify evaluation domains
* Fix domains in verifier, decoder and dispersal
* Fix domains in verifier, decoder and dispersal
* Fix size in verifier to fit tests
* 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>
* Update metrics for split mempool
* Update required packages for node in docker
* Expose env and cli params for coin
* Set coin params via env in testnet
* Predefined genesis state
* Chain start time from env vars
* Split mempool into tx and da mempool
* Fix tests
* Differentiate between da and cl mempool msgs in consensus
* Common mempool msg type
---------
Co-authored-by: Gusto <bacvinka@gmail.com>
* Switch from Carnot to Cryptarchia
* Do not delete old coins
* Update tests/src/lib.rs
Co-authored-by: davidrusu <davidrusu.me@gmail.com>
* clippy happy
---------
Co-authored-by: davidrusu <davidrusu.me@gmail.com>
* Refactor Block/Header definition
Refactor block/header definition so that it's now responsibility
of the nomos-core crate. This removes definitions in ledger/consensus
crates since there's no need at that level to have an understanding
of the block format.
The new header format supports both carnot and cryptarchia.
* A wrapper crate for prometheus client
* Initial integration of metrics for mempool
* Merge mempool metrics imports
* Add cli flag to enable metrics
* Add nomos metrics service for serving metrics
* Use nomos prometheus metrics in the node
* Rename metrics to registry where applicable
* Expose metrics via http
* Featuregate the metrics service
* Style and fail on encode error
* Add metrics cargo feature for mempool
* Add chat demo for testnet
This commit adds a simple demo to showcase the capabilities of the
Nomos architecture. In particular, we want to leverage the DA
features and explore participants roles.
At the same time, we're not ready to commit to any speficic format
or decision regarding common ground yet.
For this reason, we chose to implement the demo at the Execution
Zone (EZ) level.
In contrast to the coordination layer, each execution
zone can decide on its own format, which allows us to experiment
without having to set a standard.
The application of choice for the demo is an (almost) instant
messaging app where the messages are broadcast to the public by
leveraging the full replication data availability protocol.
In this context, the cli app acts as a small EZ disseminating
blobs, promoting blob inclusion and updating its state (i.e. list
of exchanged messages) upon blob inclusion in the chain.
---------
Co-authored-by: danielsanchezq <sanchez.quiros.daniel@gmail.com>
Put a hard limit of 512 blocks in the response returned by
GetBlocks to avoid slowing things down. This number was chosen
rather arbitrarily. We might want to do some more fine tuning.
* Split long consensus response in separate APIs
Consensus info was returning the full list of blocks even though
that can get quite large with time. Instead, this commit change
that API to return a constant size message and adds a new one to
return a chain of blocks with user specified endings.
* Update nomos-services/consensus/src/lib.rs
Co-authored-by: Youngjoon Lee <taxihighway@gmail.com>
* Fix test
---------
Co-authored-by: Youngjoon Lee <taxihighway@gmail.com>
Block.id is a necessary piece of information in the context
of the consensus engine since there it's not possible to recover
the id of the block since the contents are not available.
Instead, we should only skip that field when serializing/deserializing
a full block.
* humanize array ser/deser
* split fns
* use `const-hex`
* fix fmt
* create `nomos-utils` crate
* Human serde committeeid (#478)
* Human readable serde for CommitteeId
* Deserialize bytes to string if human readable
* Don't allocate if possible in human serde bytes
---------
Co-authored-by: gusto <bacv@users.noreply.github.com>
* Change impl of StorageReceiver to Option<Bytes>
Load and remove messages return Option<Bytes> and not Bytes, so
let's change the implementation to work around that.
* Add storage/block http api to retrieve blocks from storage
* add tests for storage/block api
* debug tests
* tweak test node online condition