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

Implement GossipEngine #4522

Open
timwu20 opened this issue Feb 4, 2025 · 0 comments
Open

Implement GossipEngine #4522

timwu20 opened this issue Feb 4, 2025 · 0 comments
Assignees

Comments

@timwu20
Copy link
Contributor

timwu20 commented Feb 4, 2025

Issue Summary

From design doc:

GossipEngine is the main long running parallel process that provides generalized gossip functinonality in substrate. It will also be required for BEEFY implementation. GossipEngine requires an implementation of the Network trait as well as the Syncing trait.

GossipEngine uses add_set_reserved and remove_set_reserved. Looks like Gossamer already support adding and removing reserved peers. In substrate from what I gather, there are authorized peers, and there are reserved peers. Reserved peers are peers that are in the authorized pool, that are assigned to a set for a given ProtocolName. We should be able to add/remove from the reserved set. Removing from the authorized set is done via peer reputation and I assume will be removed from any reserved sets if disconnected. peer_role() and ObservedRole are used qutie a bit in GossipEngine. report_peer is also used in GossipEngine. Doesn't seem like NetworkEventStream is actually used in GRANDPA client integration.

set_sync_fork_request is called by GossipEngine. announce_block is also called through GossipEngine.announce() via OutgoingMessages sink type in communication crate. Doesn't look like new_best_block_imported is actually used. event_stream is used in GossipEngine constructor.

Acceptance Criteria

  • Implement GossipEngine functionality
  • Unit tests using mock Network and Sync
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

No branches or pull requests

1 participant