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

Enable peer discovery by default #4862

Conversation

Christewart
Copy link
Contributor

@Christewart Christewart commented Oct 25, 2022

This PR switches bitcoin-s.node.enable-peer-discovery=true by default in our configuration. This configuration option was added in #4408

This will mean if bitcoin-s.node.mode=neutrino is set, we will query for peers on the p2p network and store them in nodedb.sqlite. After our nodes store a diverse set of peers, we can eventually bump to bitcoin-s.node.maxConnectedPeers and not have our nodes connect to suredbits run nodes by default.

This PR will query for peers on the p2p network every 1 hour. The logs will look something like this

2022-10-25 15:11:08,262UTC INFO [PeerFinder] Querying p2p network for peers...
2022-10-25 15:11:09,443UTC INFO [Socks5Connection] Tor connection request succeeded. target=Socks5Connect(193.178.170.232/<unresolved>:8333) connectedAddress=/0.0.0.0:0
2022-10-25 15:11:09,446UTC INFO [P2PClientActor] We've been disconnected by Peer(193.178.170.232:8333) command=PeerClosed state=Initializing
2022-10-25 15:11:11,601UTC INFO [Socks5Connection] Tor connection request succeeded. target=Socks5Connect(38.141.134.140/<unresolved>:8333) connectedAddress=/0.0.0.0:0
2022-10-25 15:11:11,735UTC INFO [Socks5Connection] Tor connection request succeeded. target=Socks5Connect(84.75.28.247/<unresolved>:8333) connectedAddress=/0.0.0.0:0
sqlite3 ~/.bitcoin-s/mainnet/nodedb.sqlite
-- Loading resources from /Users/chris/.sqliterc
SQLite version 3.37.0 2021-12-09 01:34:53
Enter ".help" for usage hints.
sqlite> select COUNT(*) from peers ;
COUNT(*)
9
sqlite> .quit

@Christewart Christewart added the node work for the node project label Oct 25, 2022
@Christewart Christewart added this to the 2.0 milestone Oct 25, 2022
@Christewart Christewart merged commit ec596ec into bitcoin-s:master Oct 26, 2022
@Christewart Christewart added this to In Progress in 1.9.7 via automation Nov 14, 2022
@Christewart Christewart modified the milestones: 2.0, 1.9.7 Nov 14, 2022
@Christewart Christewart moved this from In Progress to Done in 1.9.7 Nov 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
config node work for the node project
Projects
No open projects
1.9.7
Done
Development

Successfully merging this pull request may close these issues.

None yet

1 participant