-
Notifications
You must be signed in to change notification settings - Fork 111
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
Gossip dynamic local listener ports to peers #2277
Conversation
I need to write a unit test that initializes zebra-network, then checks the port in the local listener address. |
c644df2
to
4aa6b00
Compare
c1e80dd
to
cead481
Compare
There was a mainnet large blocks sync failure, but it might have been due to bad peers? I restarted all the CI jobs. |
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.
Really nice refactor in the peer_set/initialize.rs
🎉
Unfortunately I still need to write this test! But it should be quick. |
Previously, Zebra would either gossip port `0`, which is invalid, or skip gossiping its own dynamically allocated listener port.
Co-authored-by: Janito Vaqueiro Ferreira Filho <[email protected]>
And downgrade from error to warning, because inbound-only nodes are a valid use case.
dcb70da
to
126e9d9
Compare
Motivation
Previously, Zebra would either:
0
, which is an invalid port for outbound connections, or0
is invalid.These changes help test PRs #2273, #2275, and #2276.
API Reference
https://docs.rs/tokio/1.6.1/tokio/net/struct.TcpListener.html#method.bind
Solution
This fix changes the following parts of Zebra's startup order:
TimestampCollector
andAddressBook
Review
@jvff can review this change.
This is a low-priority change, but it's useful for local testing of PRs #2273, #2275, and #2276.
This PR is based on #2276, it should automatically rebase on
main
once that PR merges.Reviewer Checklist