-
-
Notifications
You must be signed in to change notification settings - Fork 60
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
[common] Filter seed by features supported. #59
[common] Filter seed by features supported. #59
Conversation
4272bd8
to
623b4c8
Compare
623b4c8
to
7440a40
Compare
2c2bd89
to
173fb35
Compare
e6eaca9
to
3cb277a
Compare
If you give me the ack on this PR I will squash the commit it only one and I will change the comment message with a better description, to avoid closing the PR and open another one, if you agree. |
0de2c42
to
0727274
Compare
9f8968f
to
d217041
Compare
d217041
to
d6f3e2b
Compare
d6f3e2b
to
8c6e7c3
Compare
This include a rework of the PR cloudhead#54, but not include the refactoring in other module. Signed-off-by: Vincenzo Palazzo <[email protected]>
The following commit include the combination of the two flags, but the resolution has the following result on mainet ``` 2021-10-10T10:11:46.433+02:00 DEBUG nakamoto_common::p2p::peer Resolving DNS seed ("x41.seed.bitcoin.sipa.be", 8333) 2021-10-10T10:11:46.790+02:00 DEBUG nakamoto_common::p2p::peer Error received is failed to lookup address information: Name or service not known 2021-10-10T10:11:46.790+02:00 DEBUG nakamoto_common::p2p::peer Resolving DNS seed ("x41.dnsseed.bluematt.me", 8333) 2021-10-10T10:11:47.409+02:00 DEBUG nakamoto_common::p2p::peer Error received is failed to lookup address information: Name or service not known 2021-10-10T10:11:47.409+02:00 DEBUG nakamoto_common::p2p::peer Resolving DNS seed ("x41.dnsseed.bitcoin.dashjr.org", 8333) 2021-10-10T10:11:47.612+02:00 DEBUG nakamoto_common::p2p::peer Error received is failed to lookup address information: Name or service not known 2021-10-10T10:11:47.612+02:00 DEBUG nakamoto_common::p2p::peer Resolving DNS seed ("x41.seed.bitcoinstats.com", 8333) 2021-10-10T10:11:47.664+02:00 DEBUG nakamoto_common::p2p::peer Resolving DNS seed ("x41.seed.bitcoin.jonasschnelli.ch", 8333) 2021-10-10T10:11:47.920+02:00 DEBUG nakamoto_common::p2p::peer Error received is failed to lookup address information: Name or service not known 2021-10-10T10:11:47.920+02:00 DEBUG nakamoto_common::p2p::peer Resolving DNS seed ("x41.seed.btc.petertodd.org", 8333) 2021-10-10T10:11:47.959+02:00 DEBUG nakamoto_common::p2p::peer Error received is failed to lookup address information: Name or service not known 2021-10-10T10:11:47.959+02:00 DEBUG nakamoto_common::p2p::peer Resolving DNS seed ("x41.seed.bitcoin.sprovoost.nl", 8333) 2021-10-10T10:11:48.086+02:00 DEBUG nakamoto_common::p2p::peer Error received is failed to lookup address information: Name or service not known 2021-10-10T10:11:48.086+02:00 DEBUG nakamoto_common::p2p::peer Resolving DNS seed ("x41.dnsseed.emzy.de", 8333) 2021-10-10T10:11:49.048+02:00 DEBUG nakamoto_common::p2p::peer Error received is failed to lookup address information: Name or service not known 2021-10-10T10:11:49.048+02:00 DEBUG nakamoto_common::p2p::peer Resolving DNS seed ("x41.seed.bitcoin.wiz.biz", 8333) 2021-10-10T10:11:49.828+02:00 DEBUG nakamoto_common::p2p::peer Error received is failed to lookup address information: Name or service not known 2021-10-10T10:11:49.828+02:00 DEBUG nakamoto_common::p2p::peer Resolving DNS seed ("x41.seed.cloudhead.io", 8333) 2021-10-10T10:11:49.908+02:00 DEBUG nakamoto_common::p2p::peer Error received is failed to lookup address information: Name or service not known ``` In case of resolution failure, we need also to check the single feature here in some order of importance for nakamoto? Signed-off-by: Vincenzo Palazzo <[email protected]>
Adding some rules on the vector of seed returned by the network. Signed-off-by: Vincenzo Palazzo <[email protected]>
…one. Signed-off-by: Vincenzo Palazzo <[email protected]>
Signed-off-by: Vincenzo Palazzo <[email protected]>
8c6e7c3
to
eb5b360
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.
This PR contains a wrong solution right @cloudhead ?
while let Some(seed) = seeds.next() { | ||
debug!("Resolving DNS seed {:?}", seed); |
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.
I think this PR it is not completed, because I'm missing the services flag that it is Supported by the network
Here there is still the services flag none, and this it wrong I think
match seed.to_socket_addrs() {
Ok(addrs) => {
success = true;
for addr in addrs {
self.insert(
addr.ip(),
KnownAddress::new(
Address::new(&addr, ServiceFlags::NONE),
source,
None,
),
);
}
Maybe this solution proposed is totally wrong because I'm missing the services flag in the address. Mh!
This required another iteration, closing for now |
This includes a rework of the PR #54, but does not include the refactoring in another module.
Closing #54
Fixes #50
Signed-off-by: Vincenzo Palazzo [email protected]