Daniel Sanchez
6287e554ae
consensus-engine to carnot-engine. ( #551 )
...
* Refactor: consensus-engine to carnot-engine.
Move under consensus/carnot-engine
* Fuzztests update with carnot-engine
* Update missing refactor in tests
---------
Co-authored-by: Gusto <bacvinka@gmail.com>
2024-01-04 15:09:43 +01:00
GoodDaisy
ff8fc577a0
Fix typos ( #481 )
...
Co-authored-by: Daniel Sanchez <sanchez.quiros.daniel@gmail.com>
2023-10-31 14:38:42 +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
da60d8fc95
Parallel node init ( #300 )
2023-08-10 12:56:02 +03:00
gusto
d675585a0f
Test for partial message sending in simulation ( #294 )
...
* Test for partial message sending
* Test correctness, typos
* Fix the node capacity flushing
* Not process double timeout qcs in simulations
* Discard older view messages in simulations messages
* Refactor committed_blocks to latest_committed_blocks
* Remove tally default
* Fix condition to root committee parenting
* Bring back pruning
* Clippy happy
---------
Co-authored-by: danielsanchezq <sanchez.quiros.daniel@gmail.com>
2023-08-08 18:00:08 +03:00
Al Liu
c16b794517
fix large msg sending logic ( #274 )
...
* fix large msg sending logic
2023-08-03 20:05:43 +08:00
gusto
df97ea2543
Simulatios network throughput ( #270 )
...
* Use step time from configuration
* PayloadSize trait for inmemory network interface
* Per node network capacity
* Initial carnot message sizes
* Divide provided kbps by step time
* Use std::mem::size_of for msg sizes
2023-07-25 16:03:05 +03:00
gusto
8dd34f81b4
Simulation tally fix ( #268 )
...
* Do not remove entry cache when the threshold is reached
* Leader super majority change
* Update leader threshold test
2023-07-21 12:30:32 +03:00
gusto
9f71dbb24c
Simulation network broadcast fix ( #262 )
...
* Replace network broadcast msg type to a dedicated channel
* Update tests with broadcast chan
* Replace threadrng with seedable smallrng
* Simplify the broadcast loop
2023-07-18 15:01:29 +03:00
Al Liu
2135676606
Finish `NodeId` type wrapper ( #252 )
...
* add NodeId wrapper
2023-07-11 23:16:49 +08:00
gusto
55648e3151
Simulation network broadcast ( #225 )
...
* Sim network broadcast method
* Remove list of all nodes in carnot node instance
* Use network broadcast method within nodes
* Add helper method for network payload
2023-06-27 14:20:59 +03:00
Al Liu
9afd6c007c
Simulation conf polish ( #181 )
...
* polish Duration ser/deser and support step_time in conf file
2023-06-15 17:42:42 +08:00
Al Liu
27d9f72035
Simulation happy path ( #161 )
...
* finish subscriber manager
* optimize subscribe on SimulationRunnerHandle
* fix comment
* replace std locks to parking_lot locks
* move producer initialization out simulate fn
* WIP
* optimize run fn
* update condition
* fix CI
* collect run times
* Add happy-path consensus engine
* tmp
* Fit types from spec (#124 )
* Match types to spec
* Remove Output import
* Consensus engine rework (#126 )
* rework
* fix test
* clippy happy
---------
Co-authored-by: Giacomo Pasini <Zeegomo@users.noreply.github.com>
* Adapt carnot network adapter interfaces and implementations
* Fix errors
* Update network with engine types
* Fit types yet again
* Remove leadership and old overlay
Create carnot event builder
Added some adjustments
* Add view to vote
* Fix serde derive in consensus-engine
* Add serde feature for engine in core
* Use view in tally
* Move carnot tally to consensus service
* Add new view msg
* Fit engine types in adapter
* Missing serde feature in consensus service
* Implement carnot event builder
* Implement even builder run main tasks
* Fill up view resolver
* Fix errors on network adapter implementations
* Clippy happy
* Extract event handling to independent methods in View
* Fix test
* Refactor carnot event builder (#135 )
* refactor
* format
* Discriminate proposal messages (#136 )
* Derive block id from wire format (#139 )
* Derive block id from wire format
* Derive id on block creation
* Use compile time hash size
* Add leader role (#138 )
* add leadership stub
* fix gather_new_views
* fmt
* actually build qc
* remove redundant fields
* add flat overlay (#143 )
* add flat overlay
* fix
* sort imports
* fix tests
* Fix waku update
* rewrite data collection add different kind of subscribers
* fix fmt
* Unhappy tally (#137 )
* Refactor tally module
* Implement tally for new view messages
* Assess pr comments
* Fix rebase
* simplify tally
---------
Co-authored-by: Giacomo Pasini <g.pasini98@gmail.com>
* fix gather_new_views
* working node
* fix unhappy path
* remove leftover
* Kickstart event building in sim app
* finish event builder
* fix comment
* add Tally
* gather enough new views then construct ProposalBlock event
* Revert "gather enough new views then construct ProposalBlock event"
This reverts commit 87da2bdd0c
.
* WIP: CarnotNode
* WIP
* finish event handle
* dump state
* WIP
* finish message sending
* fix some compile errors
* make project compile
* update
* fix fmt and clippy
* optimize json ser/deser and add a config
* update Cargo.toml
* Implement leader proposing (#154 )
* Implement leader proposing
* fix fmt
---------
Co-authored-by: al8n <scygliu1@gmail.com>
* fix ser/deser bugs
* fix subscriber bugs
* Fix proposing genesis
* Fix genesis retrieval in consensus-engine
* Bring back general block proposal event
* Fix leaf voting
* fix init node bugs
* add more tracing
* fix empty qc
* fix data race
* fix all panics
* cleanup
* propose new blocks
* fix comment
* do not approve for the same block
* no panics
* fix some comments
* use serde_with
* Bring back genesis on 0
* Fix genesis retrieval
Replace output enum
Vote for genesis proposal
* Genesis methods
* fix StardardQc::genesis()
* fix genesis block bug
* fix PR comment
* fix PR comment
* fix PR comment
* fix PR comment
* fix PR comment
* Fix tally
Fix proposing
* Remove public block building
Added raw method
* Missing fmt
* clippy happy
* fix io stream downcast
* optional stream-type arg, by default we do not run any subscriber
* fmt
* cleanup
* Remove from header block constructor
* Fix duplicated approve (#180 )
* fix duplicated approve
* Success tally just on threshold
* Integrate random beacon on happy path
* Fix missing updating beacon
* Replicate consensus output
* Prune older non relevant messages from cache
* Remove view info just again
* Refactor Block deps
* Reverse wrong parent committee call in Consensus engine
* Remove useless event builder settings
* Remove blocks store from event builder
* Remove unnecessary carnot seed
* Remove duplicated proposals check
---------
Co-authored-by: Giacomo Pasini <g.pasini98@gmail.com>
Co-authored-by: Daniel Sanchez <sanchez.quiros.daniel@gmail.com>
Co-authored-by: Giacomo Pasini <Zeegomo@users.noreply.github.com>
2023-06-14 16:52:37 +02:00
gusto
0bf6e6d272
Simulation initialization ( #122 )
...
* 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
2023-05-08 13:06:39 +03:00
gusto
2206d7a291
Use par_iter in network module ( #116 )
...
* Use par_iter in network module
* Pass rng from filter function
* Remove locking for network messages
2023-04-13 17:24:27 +03:00
gusto
a87418c908
Test voting steps with various node roles ( #114 )
...
* 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
2023-04-10 13:18:20 +03:00
gusto
901ebf4152
Message sending between simulation nodes ( #110 )
...
* 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
2023-03-31 12:48:06 +03:00
Al Liu
8a1af8c234
Add configuration for simulation app ( #94 )
...
* make simulation app compile to wasm
* add configuration
* improve args parsing
* add steps in configuration
---------
Co-authored-by: Daniel Sanchez Quiros <sanchez.quiros.daniel@gmail.com>
2023-03-20 17:13:55 +08:00
Daniel Sanchez
6ce9fdf553
[WIP] Simulation app barebones ( #90 )
...
* Add simulations crate
* Kickstart modules
* Add overlay
* Use node steps
* Add initial carnot node
* Implement Carnot node costs simulation
* Firs working runner
* Cleanup
* Extract overlay from runner
* Fix off id calls
* Fix testing values
* Clippy happy
* make simulation app compile to wasm
---------
Co-authored-by: al8n <scygliu1@gmail.com>
2023-03-14 07:15:45 -07:00