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

p2p: update hardcoded mainnet seeds for 25.x #27488

Merged
merged 3 commits into from Apr 20, 2023

Conversation

jonatack
Copy link
Contributor

@jonatack jonatack commented Apr 18, 2023

Update the hardcoded P2P network seeds for 25.x after updating the manual seeds and the generation script as necessary. Previous update was #25911.

The manual seeds are selected for reachability, uptime and service bit 1 and/or curated trusted peers. We need more Tor and CJDNS seeds and some of the current Tor and I2P seeds are no longer reachable.

Can be tested by following the steps in contrib/seeds/README.md and verifying the manual seeds by checking their presence and services in getnodeaddresses and/or connecting to them and checking their services with getpeerinfo and behavior with -netinfo.

Tool output:

$ python3 makeseeds.py -a asmap-filled.dat -s seeds_main.txt > nodes_main.txt

Loading asmap database "asmap-filled.dat"…Done.
Loading and parsing DNS seeds…Done.
  IPv4   IPv6  Onion Pass                                               
  3972   1118      0 Initial
  3972   1118      0 Skip entries with invalid address
  3972   1118      0 After removing duplicates
  3946   1112      0 Enforce minimal number of blocks
  3946   1112      0 Require service bit 1
  2791    798      0 Require minimum uptime
  2757    788      0 Require a known and recent user agent
  2757    788      0 Filter out hosts with multiple bitcoin ports
   512    289      0 Look up ASNs and limit results per ASN and per net```

@DrahtBot
Copy link
Contributor

DrahtBot commented Apr 18, 2023

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Reviews

See the guideline for information on the review process.

Type Reviewers
ACK achow101, mzumsande
Stale ACK Emzy

If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

@DrahtBot DrahtBot added the P2P label Apr 18, 2023
@jonatack jonatack force-pushed the 2023-04-hardcoded-seeds-update branch from 58279d0 to feed529 Compare April 18, 2023 19:46
@fanquake
Copy link
Member

cc @Emzy

@jonatack
Copy link
Contributor Author

Bringing out of draft after finishing the manual seeds updates and taking review feedback.

@jonatack jonatack marked this pull request as ready for review April 18, 2023 19:51
@jonatack jonatack changed the title p2p: update manual tor/i2p/cjdns mainnet seeds for 25.x p2p: update hardcoded mainnet seeds for 25.x Apr 18, 2023
@Emzy
Copy link
Contributor

Emzy commented Apr 18, 2023

ACK feed529
Verified that my nodes are added.
They are long running. And I plan to run them for the foreseeable future.

@achow101
Copy link
Member

What criteria is used to choose the manually selected nodes?

@jonatack
Copy link
Contributor Author

What criteria is used to choose the manually selected nodes?

Reachability, uptime, returned by getnodeaddresses (!IsTerrible), and service bit 1. Some are run by colleagues or known persons in the space, in some cases since a long time.

@jonatack
Copy link
Contributor Author

sipa/bitcoin-seeder#92 and sipa/bitcoin-seeder#101 could simplify the process when done.

Copy link
Contributor

@brunoerg brunoerg left a comment

Choose a reason for hiding this comment

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

Perhaps it's time to encourage people to build their own asmap database instead of just dowloading it?

curl https://bitcoin.sipa.be/asmap-filled.dat > asmap-filled.dat

@jonatack
Copy link
Contributor Author

Perhaps it's time to encourage people to build their own asmap database instead of just dowloading it?

That might be tangential to this pull but feel free to propose a concrete diff or a follow-up.

@fanquake
Copy link
Member

cc @wiz

@jonatack jonatack force-pushed the 2023-04-hardcoded-seeds-update branch from feed529 to b330a66 Compare April 19, 2023 12:50
@jonatack
Copy link
Contributor Author

jonatack commented Apr 19, 2023

Pushed an update that adds seeds from @wiz and colleagues. I was having issues connecting to some of them yesterday and got in touch. Infra on their end is being updated, and I was able to connect to all of them now.

Copy link
Contributor

@mzumsande mzumsande left a comment

Choose a reason for hiding this comment

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

ACK b330a66

Not 100% sure how to best test this, but I did the following:

I followed the steps described in contrib/seeds/README.md, the overall result is similar.
There are some differences (~60 in total) - I guess that's expected due to changed input data and asmap data from sipa's seeder.

$ python3 makeseeds.py -a asmap-filled.dat -s seeds_main.txt > nodes_main.txt
Loading asmap database "asmap-filled.dat"…Done.
Loading and parsing DNS seeds…Done.
  IPv4   IPv6  Onion Pass                                              
476234  75286      0 Initial
476234  75286      0 Skip entries with invalid address
476234  75286      0 After removing duplicates
 11932   3808      0 Enforce minimal number of blocks
 10003   2833      0 Require service bit 1
  2922    833      0 Require minimum uptime
  2873    815      0 Require a known and recent user agent
  2847    809      0 Filter out hosts with multiple bitcoin ports
   512    294      0 Look up ASNs and limit results per ASN and per net

I also made manual connections to some of the manually added tor, i2p and cjdns seeds, which worked well.
I think it's great that we now have a few more tor seeds than 11, which seemed rather low to me considering the large number of bitcoin nodes reachable via tor.

@jonatack jonatack force-pushed the 2023-04-hardcoded-seeds-update branch from b330a66 to d8e3fcf Compare April 19, 2023 23:35
@jonatack
Copy link
Contributor Author

I think it's great that we now have a few more tor seeds than 11, which seemed rather low to me considering the large number of bitcoin nodes reachable via tor.

Credit to you, @mzumsande, for suggesting to me yesterday that we add more.

I've repushed after pulling in 3cc989d from #26681 and re-running the steps in contrib/seeds/README.md.

@fanquake
Copy link
Member

Needs rebase

@fanquake fanquake added this to the 25.0 milestone Apr 20, 2023
selected for reachability, uptime, and service bit 1
and make the steps in /contrib/seeds/README.md easier to copy-paste
@jonatack
Copy link
Contributor Author

Needs rebase

Done.

@jonatack jonatack force-pushed the 2023-04-hardcoded-seeds-update branch from d8e3fcf to 31b1798 Compare April 20, 2023 13:10
@achow101
Copy link
Member

ACK 31b1798

I think we should reconsider how we do the tor, i2p, and cjdns seeds for the next release.

@mzumsande
Copy link
Contributor

reACK 31b1798

After running the (now bugfixed) script based on sipa's seeder data locally, I have fewer differences compared to my ACK from yesterday for IPv4/6.

@achow101 achow101 merged commit 6db0a30 into bitcoin:master Apr 20, 2023
16 checks passed
@jonatack jonatack deleted the 2023-04-hardcoded-seeds-update branch April 20, 2023 18:02
@bitcoin bitcoin locked and limited conversation to collaborators Apr 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants