* add missing accessors
* add api to return info from consensus service
* move processing into its own function
* feat: add HTTP GET `/carnot/info` API (#178)
---------
Co-authored-by: Youngjoon Lee <taxihighway@gmail.com>
The consensus service was becoming a bit messy and difficult to maintain.
This PR moves handling invididual events to their own function and refactors the cancelabe task system in a separate struct.
* move overlay to consensus engine
* Integrate random beacon in overlay
This commit integrates the random beacon as specified in the nomos
spec into the consensus engine library as part of the overlay.
In addition, it separates the overlay part responsible for leader
selection as an independent trait LeaderSelection, so as to share
the overall overlay structure among most constructions.
Furthermore, a leader proof has been added to a block to verify
that the proposer had valid rights to do so.
The current implementation hardcodes the leader selection update
in the consensus service, but we probably want to abstract it away
through something like the adapter pattern we use of other services
in the node.
* Move leader selection update to separate function
* Add generic support for leader selection in consensus service (#170)
* Add generic support for leader selection in consensus service
* fix
* use settings struct instead of tuple
* fix tests
* Add handling of root timeout
* Use StandardQc instead of Qc for high_qc
Since high_qc is guaranteed to be a standard qc, let's just use
StandardQc as a type in all messages that use it.
* Use enums for different settings types
* Enum for overlay settings
* Configurable simulation overlay
* Use duration type for network behaviour delays
* Configurable simulation nodes
* Runner for different node types
* Seedable rng
* Convert settings to required objects
* Implement IOStreamSettings deserialization
* Use common run method for different node types
* Configuration for simapp
* Testcase for region distribution
* Use unix time if seed is not provided
---------
Co-authored-by: Giacomo Pasini <Zeegomo@users.noreply.github.com>
---------
Co-authored-by: Al Liu <scygliu1@gmail.com>
Co-authored-by: Daniel Sanchez <sanchez.quiros.daniel@gmail.com>
* add stream supports
* add test case
* add polars stream, and force to use stream for the runner
* using arcswap instead RefCell for producers
* finish gracefully shutdown
* - add IOProducer and IOSubscriber
- fix deadlock in sync runner
- fix testcases
* Single step send receive runner tests
* Rename network to overlay state
* Store every overlay that might happen
* Get related nodes for from node id
* Add leader role
* WIP dummy handle events
* Leader and root roles
* Add intent as helper to dummy vote
* Check if has enough votes
* Proposal to vote to new view tests
* Update sync runner tests
* Smallrng in send receive tests
* Send initial vote next view leaders in tests
* Local view struct for node
* Large node number tests
* Fix internal to internal case
* Dummy node for simulations
* Shared network state for nodes
* Runner one step test
* Beginning of network interface
* Connect dummy node to network
* Network step tests
* Pop messages that are being sent
* Regions send receive tests
* Setup network in sync runner tests
* Dispatch and collect node messages during sim step
* Improve network interface receiver
* Add simulations crate
* Firs working runner
* Cleanupt
* Extract overlay from runner
* Fix off id calls
* Fix testing values
* WIP: Tree overlay for simulation app
* Build tree overlay from depth and size
* Tree overlay generation tests
* WIP: Committee role in layout
* Use commtittee role when constructing node
* Pairprogramming role calculation
* WIP: Extract step runner to node
* Aggregate times from different overlay layers
* Runner for overlay with layers
* Use StepRng in runner tests
* Decouple role from node
* Define leader steps and behaviour
* Get possible node ids from the overlay
* Handle unknown state in flat overlay
* Use solver type for deserialization
* Remove refcell from nodes hashmap
* Create layout from the provided node ids
* Break runner loops into seperate functions
* Use for loop to collect node step times
* Revert leader times collection
* Add interegion latency tests
---------
Co-authored-by: danielsanchezq <sanchez.quiros.daniel@gmail.com>
* Added Qc type to Tally trait
* Add generic Qc to block header
* Use blockid instead of unnecessary header
* Expand Qc over generics
* Build up block with proper qc header