-
Notifications
You must be signed in to change notification settings - Fork 117
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
2. Cache unsolicited address messages, and use them as responses #3294
Conversation
Codecov Report
@@ Coverage Diff @@
## main #3294 +/- ##
==========================================
+ Coverage 77.19% 77.25% +0.05%
==========================================
Files 265 265
Lines 31445 31460 +15
==========================================
+ Hits 24275 24303 +28
+ Misses 7170 7157 -13 |
Bumping this up to high priority, because this fixes some occasional CI failures, and it might conflict with other PRs. |
I've tested this PR locally, and the crawler and address book metrics look a lot better. The number of peer addresses rises rapidly, and gets full after a few hours. And Zebra doesn't hang any more, even after a few days. |
efd6bb0
to
fa44edf
Compare
09c749b
to
c28fd01
Compare
c28fd01
to
1153aa2
Compare
A pretty tight narrow addr cache 👍 |
Motivation
Zebra's address crawler is fragile - small changes can cause significant regressions.
This PR caches unsolicited address messages, so that new addresses are always available when Zebra wants them.
Solution
Closes #3110
Review
This PR is ready for review.
@dconnolly can review this PR.
Reviewer Checklist
I've tested this PR locally, and the regression in the address book metrics is resolved. (We see thousands of addresses on mainnet, and over a hundred on testnet.) The number of peer addresses rises rapidly, and gets full after a few hours. And Zebra doesn't hang any more, even after a few days.
It's hard to test this PR, because the timing issues are subtle, and don't show up in some network environments. We should have better tests after we implement #1592.