Commit Graph

385 Commits

Author SHA1 Message Date
Giacomo Pasini 2f9ebbd32f
Storage api (#473)
* 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
2023-10-25 12:46:26 +02:00
Daniel Sanchez 75b36020c2
Lifecycle update and implementations (#457)
* Update deps

* Implement base lifecycle handling in network service

* Implement base lifecycle handling in storage service

* Use methods instead of functions

* Pipe lifecycle in metrics service

* Pipe lifecycle in mempool service

* Pipe lifecycle in log service

* Pipe lifecycle in da service

* Pipe lifecycle in consensus service

* Refactor handling of lifecycle message to should_stop_service

* Update overwatch version to fixed run_all one
2023-10-25 12:10:21 +02:00
Giacomo Pasini 89b8e27612
Add API to revieve DA blobs (#477)
* Use Vec instead of HashMap in DaMsg::Get

* Add http API to retrieve DA blobs
2023-10-24 15:38:33 +02:00
Giacomo Pasini 3ce8cacb30
Revert "Reestablish connection when mixclient fails (#445)" (#472)
This reverts commit aa69eeca00.
2023-10-23 16:53:20 +02:00
Giacomo Pasini d528ebd2ea
Extract nomos-cli da stuff into shared module (#461)
This will be useful for other commands that might want to interact
with the network to perform tasks related to DA. One example is
the upcoming testnet demo.
2023-10-23 11:34:20 +02:00
Al Liu aa69eeca00
Reestablish connection when mixclient fails (#445)
* Reestablish connection when mixclient fails

* Add delay and remove select
2023-10-20 14:58:58 +08:00
Al Liu 98a8855a0e
axum backend for new http api (#465)
* axum backend
2023-10-20 14:10:05 +08:00
Al Liu 64a3436331
Update libp2p breaking dep (#470)
* update deprecated api
2023-10-20 14:08:15 +08:00
Gusto a3d9799121 Docker bootstrap node as sender receiver 2023-10-18 16:15:03 +03:00
Gusto 8f442005a5 Mixnet client address config 2023-10-18 16:14:24 +03:00
Gusto 56b2830d5a Add Readme for docker testnet 2023-10-17 15:55:01 +03:00
Gusto ddc79f2b0e Use predefined public key for mixnodes 2023-10-17 14:47:40 +03:00
Gusto 98b59edf1a Listen all interfaces in mixnode config 2023-10-17 14:46:41 +03:00
Gusto ae065bac7c Remove python scripts 2023-10-17 14:46:41 +03:00
Gusto 7edba33b33 Mixnode and libp2p node config files 2023-10-17 14:46:41 +03:00
Gusto 884d837ab5 History length typo 2023-10-17 14:46:41 +03:00
Gusto b521375ad4 Static mixnet nodes in docker compose 2023-10-17 14:46:41 +03:00
Gusto 474f5f7a19 Rename libp2p node config file in configuration script 2023-10-17 14:46:41 +03:00
Gusto 8275fc7817 Update libp2p node config 2023-10-17 14:46:41 +03:00
Gusto f14df0c479 Add libp2p feature flag for da dep 2023-10-17 14:46:41 +03:00
Gusto d50b845bf2 Update build command in Docker files 2023-10-17 14:46:41 +03:00
Youngjoon Lee 83d1ef2e03
Add default for `MixnetClientConfig::connection_pool_size` (#462) 2023-10-17 19:01:30 +09:00
Giacomo Pasini f90704f1d7
Save safe blocks contents to storage (#464) 2023-10-17 11:04:47 +02:00
Youngjoon Lee b997011c6a
Add serde default for `gossipsub::Config` (#463) 2023-10-17 18:04:13 +09:00
Youngjoon Lee 81c34036f7
test(unhappy): mask `sender` when comparing timeout_qcs (#458) 2023-10-17 00:20:28 +09:00
gusto 39d45d3c09
Dns or socket address for mixnet node config (#460) 2023-10-16 14:57:43 +02:00
Youngjoon Lee 9f69934fe2
Make libp2p gossipsub config configurable (#454)
* define GossipsubConfigDef to derive serde for gossipsub::Config

* refactor: move config-related codes into config.rs
2023-10-09 18:04:52 +09:00
Giacomo Pasini 2016f75213
Add API to return DA blobs (#453)
* Add API to return DA blobs

* remove pending blobs API
2023-10-09 10:53:01 +02:00
Daniel Sanchez f04c4a6492
Use specific revision on overwatch (#455) 2023-10-09 09:18:56 +02:00
Al Liu b43d268543
Finish the skeleton of the api for nomos-node (#451)
* finish the barebone of the api for nomos-node
2023-10-06 16:32:35 +08:00
Al Liu dbac7d7597
fix clippy and check warnings (#452) 2023-10-06 15:08:52 +08:00
gusto 309e5a29e9
Nomos node config (#423)
* Use tree overlay in nomos node

* Use tree overlay in tests module

* Handle unexpected consensus vote stream end in tally

* Add defaults for retry and delay in mixnet client

* Add missing entries in config.yaml

* Spawn the next leader first (#425)

---------

Co-authored-by: Youngjoon Lee <taxihighway@gmail.com>
Co-authored-by: Al Liu <scygliu1@gmail.com>
2023-10-05 15:16:40 +03:00
gusto 99d77f7e1c
Nomos node tree overlay (#415)
* Use tree overlay in nomos node

* Use tree overlay in tests module

* Handle unexpected consensus vote stream end in tally

* Spawn the next leader first (#425)

* Report unhappy blocks in happy path test (#430)

* report unhappy blocks in the happy path test

* Make threshold configurable for TreeOverlay (#426)

* Modified test, so that all nodes don’t all connect to the first node only (#442)

* merge fix

---------

Co-authored-by: Youngjoon Lee <taxihighway@gmail.com>
Co-authored-by: Al Liu <scygliu1@gmail.com>
2023-10-05 11:56:24 +03:00
Giacomo Pasini 58686b2a04
Send certificate to node after dissemination + tests (#450)
* Send DA certificate to node after dissemination

* rename mempool endpoints

* Check certificate inclusion in tests

* rename endpoint

* Rename addcert and addtx to add

* tweak test condition

* add option to save certificate to file

* move thread join

* remove fancy prints
2023-10-04 13:37:13 +02:00
Giacomo Pasini 29b963fa29
Add mempool status API (#449)
* Add status service API

* Add status API to node
2023-10-02 19:06:12 +02:00
Giacomo Pasini f9c446e48c
Add a canonical way to get an id for Attestation and Certificate (#448)
* add hash() method on Attestation and Certificate

* clippy
2023-10-02 15:59:57 +02:00
Al Liu 4cf57eee74
remove waku from the codebase (#446) 2023-10-02 16:41:08 +08:00
Giacomo Pasini d67d08e81d
Add a second mempool for DA certificates (#443)
* Use more descriptive names for generic parameters

We're starting to have tens on generic parameters, if we don't use
descriptive names it'll be pretty hard to understand what they do.
This commit changes the names of the mempool parameters in
preparation for the insertion of the da certificates mempool to
distinguish it from cl transactions.

* Add mempool for da certificates

* Add separate certificates mempool to binary

* ignore clippy lints
2023-10-02 10:38:05 +02:00
Giacomo Pasini 36b3ccc043
Add `send` method to mempool network adapter (#439)
* Add `send` method to mempool network adapter

Centralize responsabilities for mempool-network interface in the
adapter trait.

* Update nomos-services/mempool/src/lib.rs

Co-authored-by: Youngjoon Lee <taxihighway@gmail.com>

---------

Co-authored-by: Youngjoon Lee <taxihighway@gmail.com>
2023-09-27 11:58:42 +02:00
Giacomo Pasini dda4a1365c
Add discriminant type to allow multiple mempool services (#441)
Overwatch requires all services to have a different service id.
Unfortunately, such service id can't depend on generic parameters,
which means that we can't have two instances of the mempool
service even if they are instantiated with different types.
This commit circuments this limitation by adding another
type parameter.
2023-09-27 10:55:15 +02:00
Youngjoon Lee f307e03ff4
Fix unhappy test: Handle the case where TARGET_VIEW is reached by timeout_qc (#438) 2023-09-27 10:31:52 +09:00
Al Liu 8ea341dbaf
Mixnet packet handle (#435)
* finish mixnet packet sending fan-in model
2023-09-26 18:23:34 +08:00
Giacomo Pasini 03973cd422
Make mempool generic (#428)
* Make mempool item generic

Make the mempool generic with respect to the item and remove
mentions of specific transaction formats/traits. This will allow
us to reuse the same code for both coordination layer transactions
and certificates, or in general, whatever items need to be included
in a block.

* Add mempool network adapter settings

Allow for greater customization of the mempool network adapter by
adding a settings field.

* update node after mempool changes

* fix waku mempool adapter

* fmt

* fix tests

* fmt
2023-09-26 11:14:44 +02:00
Daniel Sanchez 95618c0a72
Use selection for blob certificates (#427)
* Use selection for blob certificates

* Fix bin imports

* Fix rebase

* Missing blobs -> certificates refactor

* Fix attestation and certificate as_bytes

* More naming refactors
2023-09-25 15:34:05 +02:00
Youngjoon Lee 4da06a9740
Handle mixnet invalid fragment error (#436) 2023-09-25 21:12:48 +09:00
Giacomo Pasini 3b64cd6b3a
Add tests for blob dissemination (#416)
* Make nomos-cli config public

Split nomos-cli into lib and bin and make config public
so that it can be reused in tests

* Add tests for nomos-cli disseminate

* fmt

* feature gate whole file instead of function

* Exit unsuccessfully when failing dissemination
2023-09-25 11:52:45 +02:00
Youngjoon Lee 285804e1d5
Remove unnecessary dependencies (#433) 2023-09-25 17:26:21 +09:00
Al Liu cb343156b7
Add concrete Error implementation for mixnet (#405)
Add concrete Error implementation
2023-09-25 14:21:07 +08:00
gusto 46c7e25f6f
Use single workflow for master and pr checks (#434) 2023-09-22 11:19:56 +03:00
gusto 0eae715f8d
GH: Waku windows build configuration (#432)
* Update binutils for windows

* Create mingw-env action and move configuration there

* Use cc and cxx vars for gowaku

* Use go 1.20 for waku
2023-09-22 09:31:31 +03:00