-
Notifications
You must be signed in to change notification settings - Fork 385
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
Send a gossip_timestamp_filter on connect to enable gossip sync #1368
Send a gossip_timestamp_filter on connect to enable gossip sync #1368
Conversation
Its somewhat strange to have a trait method which is named after the intended action, rather than the action that occurred, leaving it up to the implementor what action they want to take.
On connection, if our peer supports gossip queries, and we never send a `gossip_timestamp_filter`, our peer is supposed to never send us gossip outside of explicit queries. Thus, we'll end up always having stale gossip information after the first few connections we make to peers. The solution is to send a dummy `gossip_timestamp_filter` immediately after connecting to peers.
28feb19
to
3cca221
Compare
Codecov Report
@@ Coverage Diff @@
## main #1368 +/- ##
==========================================
- Coverage 90.73% 90.71% -0.02%
==========================================
Files 73 73
Lines 40808 40824 +16
Branches 40808 40824 +16
==========================================
+ Hits 37027 37035 +8
- Misses 3781 3789 +8
Continue to review full report at Codecov.
|
Looks good. Did we check that this fixes the issue? |
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.
LGTM. Not sure why CI is sad.
Kicked CI - it said "failed" but didn't have logs at all so I assume GitHub Actions is just acting up like usual. |
No idea, I didn't bother to reproduce the issue, but the spec seems to be pretty clear that this is required. It's possible we have other issues as well, though. |
On connection, if our peer supports gossip queries, and we never
send a
gossip_timestamp_filter
, our peer is supposed to neversend us gossip outside of explicit queries. Thus, we'll end up
always having stale gossip information after the first few
connections we make to peers.
The solution is to send a dummy
gossip_timestamp_filter
immediately after connecting to peers.