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

Refactor Stream Protocol ID, Add New Protocol for Epoch Sync to P2P Host #4873

Merged
merged 4 commits into from
Mar 17, 2025

Conversation

GheisMohammadi
Copy link
Contributor

@GheisMohammadi GheisMohammadi commented Mar 16, 2025

Previously, only shard nodes had an epoch chain, and epoch sync relied on a separate protocol ID while attempting to discover beacon peers based on the last part of the protocol ID. This approach was flawed because stream connections were later rejected due to protocol ID mismatches.

This PR resolves the issue by introducing a dedicated protocol for beacon validators to handle the epoch sync. As a result, the P2P host for beacon validators now supports multiple protocols:

  • One for the beacon chain
  • Another for the epoch chain

Each protocol operates independently, with its own stream manager and set of discovered nodes, ensuring proper synchronization and preventing connection rejections due to protocol mismatches.

@GheisMohammadi GheisMohammadi self-assigned this Mar 16, 2025
@GheisMohammadi GheisMohammadi marked this pull request as draft March 16, 2025 15:22
@GheisMohammadi GheisMohammadi marked this pull request as ready for review March 16, 2025 15:38
@GheisMohammadi GheisMohammadi merged commit c71b715 into dev Mar 17, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants