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

UDP-capable discovery and bootstrap #131

Open
nmcodeeu opened this issue Feb 29, 2016 · 1 comment
Open

UDP-capable discovery and bootstrap #131

nmcodeeu opened this issue Feb 29, 2016 · 1 comment

Comments

@nmcodeeu
Copy link

Hi,

As discussed on the mailing list few weeks ago, Discovery and Bootstrap builders should have a UDP/TCP switch for users to choose the bootstrap protocol.

I started to include my work based on the latest master state.

However the discovery process remains unclear to me after a few hours spent studying the existing code...
Why the public-IP discovery is a two-steps process ? Currently, a first (tcp) pingDiscover is fired to a known peer. The response message should contain our public IP (through the recipient() property). The internal peerAddress is updated accordingly, then tcp and udp pingProbe messages are sent. The discovery process succeeds only once the fire and forget ping from the known peer is received.
In which case the pingDiscover response is insufficient to consider the discovery process complete ?

I also encountered an issue during my tests: the UDP pingDiscover response doesn't contain a recipient address (recipient().ipv4Socket() == null). Is it normal ?

@nmcodeeu
Copy link
Author

Sorry about the first question, I realised this two-step process is necessary to ensure that our visible address to a known peer is where we are reachable (as we could still be behind a Nat, VPN, or any unusual network setup).

I'm still struggling with the recipient address being null though. I'll try soon with pingDiscover tcp to verify that this behavior is not due to udp pingDiscover

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant