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

Peers provided by DNS seeds are not used on header download #363

Open
luisschwab opened this issue Jan 31, 2025 · 3 comments
Open

Peers provided by DNS seeds are not used on header download #363

luisschwab opened this issue Jan 31, 2025 · 3 comments
Labels
bug Something isn't working
Milestone

Comments

@luisschwab
Copy link
Contributor

After further investigation of the IBD process, I discovered that the peers provided by DNS seeds are actually not used for header download at all, and instead rely on nodes defined on /crates/floresta-wire/src/p2p_wire/seeds/mainnet_seeds.json.

Currently, all 3 are offline, causing header download to hang, even though 258 peers were fetched from DNS seeds:

[2025-01-31 15:12:31 INFO florestad::florestad] Server running on: 0.0.0.0:50001
[2025-01-31 15:12:31 INFO florestad::florestad] TLS server running on: 0.0.0.0:50002
[2025-01-31 15:12:31 INFO floresta_wire::p2p_wire::address_man] Starting peer discovery via DNS seeds
[2025-01-31 15:12:31 INFO floresta_wire::p2p_wire::address_man] Got 1 peers from seed.calvinkim.info
[2025-01-31 15:12:31 INFO floresta_wire::p2p_wire::address_man] Got 23 peers from seed.bitcoin.luisschwab.com
[2025-01-31 15:12:32 INFO floresta_wire::p2p_wire::address_man] Got 0 peers from seed.bitcoin.sipa.be
[2025-01-31 15:12:33 INFO floresta_wire::p2p_wire::address_man] Got 42 peers from dnsseed.bluematt.me
[2025-01-31 15:12:33 INFO floresta_wire::p2p_wire::address_man] Got 24 peers from seed.bitcoinstats.com
[2025-01-31 15:12:35 INFO floresta_wire::p2p_wire::address_man] Got 46 peers from seed.btc.petertodd.org
[2025-01-31 15:12:35 INFO floresta_wire::p2p_wire::address_man] Got 46 peers from seed.bitcoin.sprovoost.nl
[2025-01-31 15:12:35 INFO floresta_wire::p2p_wire::address_man] Got 50 peers from dnsseed.emzy.de
[2025-01-31 15:12:38 INFO floresta_wire::p2p_wire::address_man] Got 26 peers from seed.bitcoin.wiz.biz
[2025-01-31 15:12:38 INFO floresta_wire::p2p_wire::address_man] Got 258 peers from 9 DNS seeds
[2025-01-31 15:12:38 INFO floresta_wire::p2p_wire::chain_selector] Starting ibd, selecting the best chain
[2025-01-31 15:12:41 DEBUG floresta_wire::p2p_wire::node] attempting connection with address=Some((14337168593193452713, LocalAddress { address: Ipv4(181.191.0.137), last_connected: 1678986166, state: Tried(0), services: ServiceFlags(50331657), port: 8333, id: 14337168593193452713 })) kind=Regular
[2025-01-31 15:12:51 DEBUG floresta_wire::p2p_wire::node] attempting connection with address=Some((14337168593193452713, LocalAddress { address: Ipv4(181.191.0.137), last_connected: 1678986166, state: Failed(1738347161), services: ServiceFlags(50331657), port: 8333, id: 14337168593193452713 })) kind=Regular
[2025-01-31 15:13:02 DEBUG floresta_wire::p2p_wire::node] attempting connection with address=Some((5997311032156476039, LocalAddress { address: Ipv4(1.228.21.110), last_connected: 1678986166, state: Tried(0), services: ServiceFlags(50331657), port: 8333, id: 5997311032156476039 })) kind=Regular
address=Some((3958299300271240884, LocalAddress { address: Ipv4(18.27.124.231), last_connected: 1678986166, state: Failed(1738347202), services: ServiceFlags(50331657), port: 8333, id: 3958299300271240884 })) kind=Regular
[...]

This behavior suggests a bug on address manager initialization.

@luisschwab luisschwab added the bug Something isn't working label Jan 31, 2025
@Davidson-Souza Davidson-Souza added this to the v0.8.0 milestone Jan 31, 2025
@Davidson-Souza
Copy link
Collaborator

I think the problem comes from the usage of "good" peers. The fixed seeds are considered "good" by default, and the DNS seeds don't. We would need to create more connections with "not good" peers to find peers we can use more aggressively.

@luisschwab
Copy link
Contributor Author

I think we could make connections with a small quorum, maybe 15 peers, after DNS fetching to increase the "good" peer amount.

@Davidson-Souza
Copy link
Collaborator

We have the "Feeler" connection kind for that, but the ChainSelector don't create those IIRC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants