Commit Graph

18 Commits

Author SHA1 Message Date
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
danielsanchezq 780276497f Fix endless loop on mocktally 2023-03-15 10:02:29 +01: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
Al Liu 7f609db62a
Improve Mock network (#78)
* add MockTxId and send back transaction response messages
2023-02-21 16:10:26 +08:00
Al Liu 6b45bf408e
add Debug and constructor for CarnotSettings (#71) 2023-02-10 19:04:56 +08:00
Giacomo Pasini bbb783e1da
Complete consensus (#65)
* complete consensus

* review comments
2023-02-08 10:23:55 +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
Giacomo Pasini efb1690872
Add transaction type (#50)
* Add transaction type
2023-01-18 15:02:58 +01:00
Daniel Sanchez 677d4a245c
Mockpool (#43)
* Use ids slices on mempool trait

* Create a mock mempool
Added placeholders for block/blockheader/blockid relations

* Use linked hashmap

* Fix bounds

* Remove unnecessary bound
2023-01-18 03:11:03 -08:00
Daniel Sanchez f1412b112e
Implemented mock fountain code protocol (#45) 2023-01-17 01:08:00 -08:00
Daniel Sanchez 7ff63d4824
Add fountain codes to consensus (#38)
* Add basic encode/decode test

* Use Stream for trait instead of Iterator

* Removed unnecessary pin

* Add custom fountain error

* Add failing path to tests

* Added docs

* Normalized chunks to bytes

* Added settings initialization for fountain codes trait

* Pipe fountain code through consensus

* Implement broadcast block and block reconstruction for Member Overlay

* Fix failing raptor test

* Use seed for raptorq tests

* Use const for topics instead of static

* Clippy happy
2023-01-10 12:58:51 +01:00
Giacomo Pasini 0229337414
Add leadership stub (#22)
* add leadership stub

* move types to core

* clippy happy
2023-01-10 11:33:08 +01:00
Daniel Sanchez 9721e6f5fa
Mempool network adapter (#30)
* Refactor mempool naming and added settings to backend trait

* Implement mempool networking traits and waku backend

* Transaction networking plumbing in mempool service

* Make TransactionMsg generic
Use bincode to deserialize tx messages

* Make wakuadapter generic over tx and tx-id

* Fix wrong backend type bound

* Adapt to waku beta2

* Thread tx and id together for adapter and pool

* Panic on subscribing error

* Prune unnecessary Id type bounds

* Remove transaction placeholder

* Remove Id bound from waku adapter

* Remove empty transactions module
2023-01-09 17:22:46 +01:00
Daniel Sanchez fc75ad1732
Fountain codes (#37)
* Add fountain module and raptorq basic implementation

* Add basic encode/decode test

* Use Stream for trait instead of Iterator

* Removed unnecessary pin

* Add custom fountain error

* Add failing path to tests

* Added docs
2023-01-05 10:35:12 +01:00
Giacomo Pasini 539c986f69
Add mempool stub (#29)
* add mempool stub

* address review comments

* move base data types to nomos-core

* allow clippy warning
2022-12-14 15:30:45 +01:00
Daniel Sanchez fb3fd6f3b1
Nomos core (#28)
* Extract block to core crate

* Added linking flag for waku

* Cleanup imports

* Add missing core files

* Create more base mods
2022-12-13 15:35:11 +01:00