-
Notifications
You must be signed in to change notification settings - Fork 135
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
feat: add retries to bridge gossip, with rfc network checks #1032
feat: add retries to bridge gossip, with rfc network checks #1032
Conversation
202d25a
to
795182f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛥️
portal-bridge/src/stats.rs
Outdated
// don't double count an enr if multiple clients offered the same content | ||
// to a peer | ||
if !content_stats.offered.contains(&enr) { | ||
content_stats.offered.push(enr); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: If we want the uniqueness of values, we can use HashSet instead of Vec for offered, accepted and transferred. This way, we can remove the if
statement to check for existing Enr.
// if not, make rfc request to see if data is available on network | ||
let result = | ||
BeaconNetworkApiClient::recursive_find_content(&client, content_key.clone()).await; | ||
if let Ok(PossibleBeaconContentValue::ContentPresent(_)) = result { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
795182f
to
f951bd1
Compare
What was wrong?
Bridges only made one gossip attempt, and gave up. This isn't ideal. The bridge gossip strategy has been updated to...
Testing locally, I've seen all kinds of cases, which is encouraging. eg.
How was it fixed?
Updated beacon and history bridge with the above functionality.
To-Do