Commit Graph

78 Commits

Author SHA1 Message Date
Daniel Sanchez Quiros 45cb4ebaec Kickstart event building in sim app 2023-05-16 09:55:38 +02:00
Giacomo Pasini dfeef7f8d6
remove leftover 2023-05-15 16:45:03 +02:00
Giacomo Pasini a94f9300fd
fix unhappy path 2023-05-15 16:42:00 +02:00
Giacomo Pasini 3c569e1278
working node 2023-05-15 16:41:45 +02:00
Giacomo Pasini 430dbf510e
fix gather_new_views 2023-05-15 16:41:32 +02:00
Daniel Sanchez fc48f55a25
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>
2023-05-15 11:30:39 +02:00
danielsanchezq 726f7c239c Fix waku update 2023-05-12 16:32:21 +02:00
Giacomo Pasini bbb5b08516 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
2023-05-12 13:33:17 +02:00
Daniel Sanchez bf5988fc75 Discriminate proposal messages (#136) 2023-05-12 13:33:17 +02:00
Giacomo Pasini ab15514f39 Refactor carnot event builder (#135)
* refactor

* format
2023-05-12 13:33:17 +02:00
danielsanchezq c9704348b8 Extract event handling to independent methods in View 2023-05-12 13:33:17 +02:00
danielsanchezq dd9fbc3e83 Clippy happy 2023-05-12 13:33:17 +02:00
danielsanchezq 66807feef8 Fix errors on network adapter implementations 2023-05-12 13:33:17 +02:00
danielsanchezq 3e8df8914d Fill up view resolver 2023-05-12 13:33:17 +02:00
danielsanchezq d43be314d6 Implement even builder run main tasks 2023-05-12 13:33:17 +02:00
danielsanchezq 73332cbc41 Implement carnot event builder 2023-05-12 13:33:17 +02:00
danielsanchezq 965db1b282 Missing serde feature in consensus service 2023-05-12 13:33:17 +02:00
danielsanchezq 2c86b22e7e Fit engine types in adapter 2023-05-12 13:33:17 +02:00
danielsanchezq 4a1e56293a Add new view msg 2023-05-12 13:33:17 +02:00
danielsanchezq 14d680557d Move carnot tally to consensus service 2023-05-12 13:33:17 +02:00
danielsanchezq a8996fc6cd Remove leadership and old overlay
Create carnot event builder
Added some adjustments
2023-05-12 13:33:17 +02:00
danielsanchezq 241c5d38b2 Fit types yet again 2023-05-12 13:33:17 +02:00
danielsanchezq 55898acc98 Update network with engine types 2023-05-12 13:33:17 +02:00
danielsanchezq 3210873344 Fix errors 2023-05-12 13:33:17 +02:00
danielsanchezq 752f4570ff Adapt carnot network adapter interfaces and implementations 2023-05-12 13:33:17 +02:00
Daniel Sanchez 26d10856ff
Adapt carnot network adapter interfaces and implementations to latest spec (#121)
* 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

---------

Co-authored-by: Al Liu <scygliu1@gmail.com>
Co-authored-by: Giacomo Pasini <g.pasini98@gmail.com>
Co-authored-by: Giacomo Pasini <Zeegomo@users.noreply.github.com>
2023-05-01 17:47:56 +02: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 1ec4231a7a
Add Qc to block (#99)
* 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
2023-03-17 06:23:50 -07:00
Daniel Sanchez 91ce4e6fa1
Make a transaction trait (#98)
* Impl Transaction trait

* Impl Transaction for MockTransaction

* <ake carnot transaction a module

* Refactor consensus to use Transaction

* Fix tests

* Constrain Transaction::Hash

* Refactor redundant Carnot in CarnotTx
2023-03-16 22:42:56 -07:00
Al Liu 818d7f29cd
Add generic block (#93)
* add generic block

* fix PR comments

* Block uses tx hashes

* Refactor bounds and generics to accept block type

* remove Tx generics

* add generic for block

* Remove unnecessary bounds on leadership

* Impl from with ownership for mock tx and txid

* feature gate

---------

Co-authored-by: danielsanchezq <sanchez.quiros.daniel@gmail.com>
2023-03-14 09:55:08 -07:00
Daniel Sanchez 274e8d55fd
Voting core primitive (#82)
* Add tally trait
Implement mock tally

* Add tally to consensus

* Use tally in implemented overlays

* Clippy happy

* Scratch carnot voting as per specification

* Add missing derives

* Clippy happy

* Fix tests

* Add checks on valid votes

* Refactor ApprovalMsg to VoteMsg

* Remove no vote in MockVote and MockQC

* Remove no vote in MockVote and MockQC

* Remove timeout todo

* Fix tests
2023-03-14 03:32:36 -07:00
gusto 4981c724af
Http status codes (#88)
* Include status codes in http error responses

* Mockpool bridges error handling

* Last TX in milliseconds in mempool metrics

* u64 for last tx metrics
2023-03-06 15:19:27 +02:00
gusto 42ea8f9be3
Update waku-bindings to 0.1.0-rc.2 (#86) 2023-03-06 15:18:27 +02:00
Daniel Sanchez c6bc35a931
Make carnot overlay generic (#87)
* Make carnot overlay generic

* support generic

* add back 'view for View fns

* add assertion on view number

* remove unused comments

* fix fmt

---------

Co-authored-by: al8n <scygliu1@gmail.com>
2023-03-03 00:23:51 +08:00
Daniel Sanchez 55aece674b
Update to waku rc 1 (#80) 2023-02-22 15:55:59 +01:00
Al Liu 7f609db62a
Improve Mock network (#78)
* add MockTxId and send back transaction response messages
2023-02-21 16:10:26 +08:00
Daniel Sanchez 8cc37385b3
Waku cached streams consensus adapter (#70)
* Added waku archive message to waku network backend

* Use cached streams in consensus waku adapter

* Fix mock test

* Add missing import

* Join requests tasks

* Use waku-bindings beta4

* Get stream from archive query method

* Set store protocol active for waku backend

* Implement local query stream response

* Add missing linking flags for new waku-bindings version

* Cleanup unbounded sender fuse/unwrap

* Clippy happy
2023-02-15 16:49:49 +01:00
Al Liu 6b45bf408e
add Debug and constructor for CarnotSettings (#71) 2023-02-10 19:04:56 +08:00
Daniel Sanchez 320755d19d
Detach tx broadcast from mempool (#69)
* Remove send tx method from mempool network adapter

* Add error reporting to add_tx operation in mempool
Delegate broadcasting to external caller
2023-02-08 11:07:09 +01:00
Giacomo Pasini bbb783e1da
Complete consensus (#65)
* complete consensus

* review comments
2023-02-08 10:23:55 +01:00
gusto 5f21a2734a
Add endpoint to make a new peer conn for mockpool node (#68)
* Add enpoint to make a new peer conn for mockpool node

* Pass multiple addresses in connection request

* Join async reqs to network service, cleanup

* Collect and join reqs
2023-02-07 17:50:38 +02:00
Al Liu 146001c9fe
Mock mempool integration test (#66)
* finish mock mempool integration test

* use Log service for test

* remove unused example

* use millis and merge log PR
2023-02-07 17:13:22 +08:00
Daniel Sanchez c5ac1db44c
Network transaction broadcasting (#63)
* Broadcast transaction when validated in mempool

* Clippy happy

* Use standard bincode config for tx message decoding

* add send_transaction for mock (#64)

* add send_transaction for mock

* Use wire instead of direct bincode

* Use wire instead of direct bincode on deserialization

---------

Co-authored-by: Al Liu <scygliu1@gmail.com>
2023-02-06 12:49:24 +01:00
Al Liu 4705cc213b
Add constructor for LogSettings (#67)
* add constructor for LogSettings
2023-02-06 19:23:25 +08:00
Al Liu 3d3d2760ec
Implement #31: Mock network backend (#41)
* relax trait bounds

* mock mempool

* remove unused generic

* add mock network test case

* fix some PR comments

* simplify match branch

* finish mempool adapter example

* clippy happy

* mock consensus
2023-02-01 21:58:23 +08:00
Daniel Sanchez 567188c248
Fix blake2b usage on mockpool node tx (#61) 2023-02-01 04:10:57 -08:00
Daniel Sanchez 1e20c3b6cc
Use commitee and view information for consensus network adapter (#57)
* Add committee and view information to network adapter

* Use committee and view on waku adapter

* Add committee and view info to flat view implementation.

* Clippy happy

* Rename flat -> root

* Split broadcast block iterator into l/r childs

* Extract topics to builder functions
2023-01-31 03:03:45 -08:00
Giacomo Pasini f5175c74c0
Add flat overlay (#55) 2023-01-27 10:37:04 +01:00
gusto 8e2346c29e
Rust 1.67 cargo clippy fix (#56)
* Run clippy --fix for updated lint requirements

* Fmt after clippy
2023-01-27 11:04:42 +02:00
Daniel Sanchez e007539531
This update fixes the default waku subscription (#54) 2023-01-26 06:53:27 -08:00