Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(code): Resolve cyclic dependency between Consensus and ProposalBuilder actor #199

Merged
merged 2 commits into from
May 30, 2024

Conversation

romac
Copy link
Member

@romac romac commented May 30, 2024

Closes: #XXX


PR author checklist

@romac romac requested a review from ancazamfir May 30, 2024 14:48
Copy link

codecov bot commented May 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.64%. Comparing base (a572cbc) to head (ade91a2).

Additional details and impacted files
@@                     Coverage Diff                      @@
##           anca/mempool_for_testing     #199      +/-   ##
============================================================
- Coverage                     84.74%   84.64%   -0.10%     
============================================================
  Files                            66       66              
  Lines                          4797     4778      -19     
============================================================
- Hits                           4065     4044      -21     
- Misses                          732      734       +2     
Flag Coverage Δ
integration 84.66% <100.00%> (-0.10%) ⬇️
mbt 18.11% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@ancazamfir ancazamfir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@ancazamfir ancazamfir merged commit ad109ca into anca/mempool_for_testing May 30, 2024
11 of 12 checks passed
@ancazamfir ancazamfir deleted the romac/proposal-builder-init branch May 30, 2024 18:37
romac added a commit that referenced this pull request Jun 4, 2024
…value builder (#191)

* Initial commit for mempool gossip

* Add transaction

* Build value by streaming mempool tx-es.

Adds basic sync at startup based on number of peers.
Uses different peerID sets for consensus and mempool in an attempt to
create separate networks (not there yet).
UTs are not yet fixed.

* Enqueue messages for higher height for replay

* Cargo fmt

* Remove dbg, add back no_std for round

* Add back no_std for common.

* Wait for 2 + 2 peers

* Fix UTs

* Turn a couple assertions in the driver into proper errors

* Update `driver_steps_not_proposer_other_height` test to expect an error

* Fix coverage on latest nightly

* Remove startup hack now that #190 has landed

* feat(code): Improve reliability of node startup and gossip (#192)

* Use random identity for mempool gossip

* Only accept messages from peers using the same protocol

* Formatting

* Enable logging in tests

* Increase timeout

* Another attempt to fix test

* Comment out dead code

* Revert timeout change

* Run tests on macOS as well

* Use Ubuntu 24

* Revert "Use Ubuntu 24"

This reverts commit f5d7f88.

* Use TCP transport instead of QUIC

* Send a Ready message to all peers, and only start consensus when we got enough of those

* Disable peer filtering based on protocol version

* Remove Ready message

* Fix bug in gossip mempool

* Disable peer filtering based on protocol version again

* Switch back to QUIC

* Cleanup

* No need for different identities if we do not blacklist peers

* Remove commented out code

* No need to act on expired mDNS entries

* Send PeerDisconnected event to handle when a peer unsubscribes

* No need to test on macOS anymore

* Cleanup

* Fix "API rate limit exceed" error when installing `protoc`

* Fix compilation error and some merge issues

* feat(code): Add transaction streaming and block part gossip (#197)

* Add gossip blockpart channel and BlockPart trait and test impl

* Sign and gossip block parts, receive them, validate, send to proposal builder

* Value builder now streams txes for a fraction of propose timeout

* Add constants for hardcoded values

* Fix proposal builder initialization and tweak some constants

* Gossip block part before processing it

* Spelling

* Create and gossip BlockMetadata.

Revert the consensus proposal value to be the block hash (or ValueId).

* Process received block parts, send valueId and valid to consensus actor.

Multiplex proposal and last block part, pass valid from the latter.

Check if all parts are present when a proposal is received, otherwise
queue.

Implement a temporary store for block parts.

* Small cleanup and spelling

* Cleanup

* chore(code): Resolve cyclic dependency between `Consensus` and `ProposalBuilder` actor (#199)

* Rename field for consistency

* Resolve cyclic dependency between Consensus and ProposalBuilder actor

* Add forgotted return for invalid prposal signatures.

Some cleanup and TODO updates.

* Cleanup

* Merge `CAL` actor with `ProposalBuilder` actor and rename to `Host` actor (#200)

* Remove CAL actor and move `GetValidatorSet` into `ProposalBuilder`

* Rename `ProposalBuilder` actor to `Host`

* Make `PartStore` context-generic and move into its own module (#201)

* Use persistent peers instead of mdns (#204)

* Wire up `persistent_peers` from config to both gossip layers

* simplified index command to only generate configs when init command is run

* Cleanup dialing of persistent peers

* Only add explicit peers when their protocol version matches

* Cleanup

* Fix args parsing test

* Use random base ports per test

* Formatting

---------

Co-authored-by: Greg Szabo <greg@philosobear.com>

* Add `testnet` command, and clean up CLI (#205)

* removed index parameter, added testnet command, simplified init command

* Update help message

* Remove `--config`, `--genesis` and `--private-key` options

* Unpretty private key bytes

* Log output in `testnet` command

* Use CometBFT-compatible format for `priv_validator_key.json` file

* Add test for `testnet` command

---------

Co-authored-by: Greg Szabo <greg@philosobear.com>

---------

Co-authored-by: Anca Zamfir <zamfiranca@gmail.com>
Co-authored-by: Greg Szabo <16846635+greg-szabo@users.noreply.github.com>
Co-authored-by: Anca Zamfir <ancazamfir@users.noreply.github.com>
Co-authored-by: Greg Szabo <greg@philosobear.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants