Skip to content

chore(wire): increase DNS_SEED_REQUEST_INTERVAL#870

Merged
Davidson-Souza merged 1 commit into
getfloresta:masterfrom
Davidson-Souza:increase-dns-seeds-time
Mar 9, 2026
Merged

chore(wire): increase DNS_SEED_REQUEST_INTERVAL#870
Davidson-Souza merged 1 commit into
getfloresta:masterfrom
Davidson-Souza:increase-dns-seeds-time

Conversation

@Davidson-Souza

Copy link
Copy Markdown
Member

Description and Notes

In #793 we reduced the DNS_SEED_REQUEST_INTERVAL to two minutes.
This tells how long do we wait before re-doing a request do the DNS
seeds. The goal was to make sure we had enough peers to keep going.

However, it doesn't seem like it worked as intended since DNS servers
are currently bad at giving utreexo peers (and on signet they are also
bad at giving CBS peers). This forces our node to retry DNS requests
every two minutes. But since most users don't have their own recursive
resolver (I don't), the previous result is almost always cached, so you
get basically the same answer several times.

This pollutes stdout for no good reason. Since #781 we now are super
aggressive about asking for addresses and checking whether they are
alive and learning about their capabilities and #865 will make it
even better, since we can try several feeler connections at the same
time. So I think DNS seeds should be only used to get us some starting
peers, and then we build our local network view from the P2P net
ourselves.

@Davidson-Souza Davidson-Souza self-assigned this Mar 6, 2026
@Davidson-Souza Davidson-Souza added the chore Cleaning, refactoring, reducing complexity label Mar 6, 2026
@Davidson-Souza

Copy link
Copy Markdown
Member Author

Oh, how fun: from_secs is boring old tech, but from_hours is cutting edge and won't work with our MSRV

@JoseSK999

Copy link
Copy Markdown
Member

The Rust developers had to ask Chronos for permission, hours is something serious

@Davidson-Souza Davidson-Souza force-pushed the increase-dns-seeds-time branch from 60255fe to 350ee97 Compare March 6, 2026 18:59
@Davidson-Souza

Davidson-Souza commented Mar 6, 2026

Copy link
Copy Markdown
Member Author

The Rust developers had to ask Chronos for permission, hours is something serious

Yeah, they probably needed to ask some representatives as well, since it's [h]ours, not theirs 🥁 🥁 🥁

Comment on lines 467 to 477

@JoseSK999 JoseSK999 Mar 6, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated but nicer style here

            let default_port = Self::get_port(network);
            let dns_seeds = floresta_chain::get_chain_dns_seeds(network);

            let mut addresses = Vec::new();
            for seed in &dns_seeds {
                if let Ok(got) = AddressMan::get_seeds_from_dns(seed, default_port, proxy_addr) {
                    addresses.extend(got);
                }
            }

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

@JoseSK999

Copy link
Copy Markdown
Member

Nit: fix the typo in PR description

@Davidson-Souza Davidson-Souza changed the title chore(wire): incrrease DNS_SEED_REQUEST_INTERVAL chore(wire): increase DNS_SEED_REQUEST_INTERVAL Mar 6, 2026

@luisschwab luisschwab left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 350ee97

@jaoleal

jaoleal commented Mar 9, 2026

Copy link
Copy Markdown
Member

CACK

In getfloresta#793 we reduced the `DNS_SEED_REQUEST_INTERVAL` to two minutes.
This tells how long do we wait before re-doing a request do the DNS
seeds. The goal was to make sure we had enough peers to keep going.

However, it doesn't seem like it worked as intended since DNS servers
are currently bad at giving utreexo peers (and on signet they are also
bad at giving CBS peers). This forces our node to retry DNS requests
every two minutes. But since most users don't have their own recursive
resolver (I don't), the previous result is almost always cached, so you
get basically the same answer several times.

This pollutes stdout for no good reason. Since getfloresta#781 we now are super
aggressive about asking for addresses and checking whether they are
alive and learning about their capabilities and getfloresta#865 will make it
even better, since we can try several feeler connections at the same
time. So I think DNS seeds should be only used to get us some starting
peers, and then we build our local network view from the P2P net
ourselves.
@Davidson-Souza Davidson-Souza force-pushed the increase-dns-seeds-time branch from 350ee97 to 0ceeb59 Compare March 9, 2026 16:31
@Davidson-Souza

Copy link
Copy Markdown
Member Author

Pushed 0ceeb59 addressing a small nit by @JoseSK999

@luisschwab luisschwab left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 0ceeb59

@Davidson-Souza Davidson-Souza requested a review from JoseSK999 March 9, 2026 16:46

@JoseSK999 JoseSK999 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 0ceeb59

@Davidson-Souza Davidson-Souza merged commit 32c6032 into getfloresta:master Mar 9, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Cleaning, refactoring, reducing complexity

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants