Commit Graph

529 Commits

Author SHA1 Message Date
gusto 0077c9b6a5
Add tests for child parent lookup and fix parent lookup fn (#544) 2023-12-13 17:04:13 +02:00
Youngjoon Lee 643bcef542
Reestablish conn with mixnode if err occurs (#501) 2023-11-28 18:38:48 +09:00
Youngjoon Lee acd15a4ed5
Update code related to rust-kzg according to its latest ver (#538) 2023-11-28 17:55:55 +09:00
Youngjoon Lee 2e6365bb95
Use 2x timeout for integration tests in Codecov CI (#533) 2023-11-28 09:02:24 +09:00
gusto ab68d3e16e
Update rust version in testnet and CI (#535) 2023-11-21 12:30:16 +02:00
gusto eb69cd34ec
Update ci to rust 1.73.0 (#534) 2023-11-17 09:48:35 +01:00
iwantanode a1b72f1f83
fix: typos in the docs (#527)
l
2023-11-13 11:49:37 +09:00
Giacomo Pasini a524cc2dcf
use reqwest json() method (#525) 2023-11-11 16:49:18 +01:00
gusto 421ea6c0c7
Update testnet related configuration (#524)
* Use value instead of variable in .env.testnet

* Reduce testnet logs verbosity

Debug logs are too verbose for long running node instances. If needed
users could manually adjust configuration in `testnet/*_config.yaml`
files without rebuilding the docker images.
2023-11-10 16:19:52 +02:00
Daniel Sanchez cc6b6d1cc9
Refactor nomos api: (#521)
* Extracted common service into services
* Moved api implementation to nomos node crate
2023-11-10 09:28:10 +01:00
gusto 5c7e0f511f
Update env and config files for testnet (#520) 2023-11-09 12:59:06 +02:00
Giacomo Pasini 3e1a722bd2
Add option to not collect logs (#517)
There's currently no way for an app with a logger service to disable
log collection.
2023-11-08 15:47:07 +01:00
Al Liu c3422c196c
New http api to nomos-node integration (#490)
* Integrate new http api to nomos-node
2023-11-08 16:55:47 +08:00
Giacomo Pasini ccc85904d9
do not use prefix in serialization (#514) 2023-11-07 15:24:49 +01:00
Giacomo Pasini 1b4c0638fa
Do not exit the process during dissemination (#516)
* Do not exit the process during dissemination

This is now library code and we should not exit the process if an
error is encountered

* clippy happy
2023-11-07 15:24:31 +01:00
Giacomo Pasini 3028cdb5d1
Add option to provide custom writer to the logger backend (#518)
* Add option to provide custom writer to the logger backend

* fmt
2023-11-07 15:24:02 +01:00
gusto c14998bb9a
Da voter config for docker compose (#513)
* Readd docker build context

* Configurable da protocol voter

* Do not use private key naming for da voter
2023-11-07 13:52:27 +02:00
Giacomo Pasini df683ad154
Limit GetBlocks response size (#515)
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.
2023-11-07 10:25:22 +01:00
Youngjoon Lee a58d3fb63c
Store logs from failed CI as artifacts (#508) 2023-11-07 09:38:10 +09:00
Giacomo Pasini 0730e05a6f
Add raw api module to nomos-cli (#511)
* Add raw api module to nomos-cli

Add a separate module which contains all raw api calls and make
them reuse the same reqwest client for increased efficiency

* Use json instead of wire format in mempool add api

Uniform all http api to use json as the encoding
2023-11-06 16:24:43 +01:00
Al Liu 196f395992
Add `block_info` api for new HTTP service (#509) 2023-11-06 22:14:16 +08:00
Giacomo Pasini 56e8506704
Split long consensus response in separate APIs (#502)
* 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>
2023-11-06 12:43:48 +01:00
Youngjoon Lee 1c9528e38f
Fix occasional port conflict in CLI integration test (#504) 2023-11-06 08:47:15 +09:00
Giacomo Pasini 350620b829
Do not skip Block::id during ser/de (#505)
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.
2023-11-03 10:14:26 +01:00
omahs e8310e3ea8
Fix typos (#503)
* fix typo

* fix typo

* fix typo

* fix typos

* fix typo
2023-11-03 09:29:40 +01:00
gusto ea1862864b
Docker compose static testnet configuration (#499)
* Add static node network configuration in a new compose file

* Update ports and fix testnet config

* Remove replicas

* Update testnet bootstrap config

* Remove replicas env var in static conf

* Bootstrap node depends on mixnodes

* Scheme version for compose.static.yml

Co-authored-by: Jakub <i+github@always.fail>

* Remove unnecessary context defintion

* Add container names in compose.static.yml

* Simplify compose services build context

---------

Co-authored-by: Jakub <i+github@always.fail>
2023-11-02 15:23:35 +02:00
Youngjoon Lee c3478cf6a6
Set voter to DA attestation (#498) 2023-11-02 18:44:31 +09:00
Al Liu ba90ed1b55
Nomos http API (#476)
* Info api

* Da blob api (#487)

* Add storage api for new http backend (#488)

* Mempool add APIs (#489)
2023-11-01 17:14:58 +08:00
GoodDaisy ff8fc577a0
Fix typos (#481)
Co-authored-by: Daniel Sanchez <sanchez.quiros.daniel@gmail.com>
2023-10-31 14:38:42 +01:00
Youngjoon Lee ea1dcb82fd
Increase the timeout of happy integration tests (#494) 2023-10-31 20:32:07 +09:00
Youngjoon Lee 7dce530d13 Revert: Stop using msg hash as a libp2p msg ID 2023-10-31 19:56:36 +09:00
Youngjoon Lee 722476f3b1 Stop using msg hash as a libp2p msg ID 2023-10-31 19:52:32 +09:00
Al Liu 9b3c675b3a
Metrics api (#466)
* Add metrics API
2023-10-31 17:20:04 +08:00
Youngjoon Lee 5e520ae194
Set consensus timeout conservatively for happy-path integration tests (#492) 2023-10-31 00:39:02 +09:00
Giacomo Pasini a487d8c7a0
Add DA utilities to nomos-cli (#493)
* Move da disseminate command into separate module

* Add utilities to retrieve block contents

* fix tests

* fix typo
2023-10-30 16:19:25 +01:00
gusto eeb88b9430
Docker compose consensus layer config (#482)
* Same consensus node list for all nodes

* Extract duplicate code and add debug info

* Update initial net peer list script

* Remove unused envvar
2023-10-30 16:51:40 +02:00
Giacomo Pasini e50561839d
Remove block contents from mempool (#485)
* Add Hash type param to Attestation and Certificate

* remove block contents from mempool
2023-10-30 12:38:04 +01:00
gusto 7fcfe890be
Configure supermajority threshold via envvars (#471) 2023-10-30 10:38:57 +02:00
Daniel Sanchez ef243b0ee5
Add Sigkill handling to node binary (#480)
* Implement ctrlc watcher service

* Add ctrlc service to nomos node bin

* Use 1 sized buffer
2023-10-30 09:36:07 +01:00
gusto d479721efd
Optional network capacity in simulations (#483)
* Make simulation net capacity optional

* Add cli flag to disable netcap
2023-10-30 06:26:45 +02:00
gusto 61ff62cb29
CI: Integration tests report (#484)
* Add missing dep to ci Dockerfile

* Add a map to store minimal tests report

* Use env vars for report messages

* Do not mutate variables outside the scipt block

* Write report to file
2023-10-27 20:54:56 +03:00
Giacomo Pasini c84c3fb93b
Allow deprecated type in Swarm (#486)
We have to use the type of the upstream dependency
2023-10-27 17:47:53 +02:00
gusto 54dd96dfff
Simulations overlay topo info (#479)
* Missing json feature for building standalone simapp

* Move dummy sim overlay to tests module

* OverlayInfoExt in simulation app

* Dump overlay info in simapp
2023-10-26 19:43:49 +03:00
Al Liu 1553f29bd9
Humanize array ser/deser (#468)
* 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>
2023-10-26 23:16:10 +08:00
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