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

Node/P2P: Add default bootstrap peers #3852

Merged
merged 3 commits into from
Mar 22, 2024

Conversation

bruce-riley
Copy link
Contributor

@bruce-riley bruce-riley commented Mar 21, 2024

This PR hard codes the bootstrap peers and network ID for the guardian, spy and query proxy server, based on the environment (mainnet or testnet). It allows them to be overridden using the existing parameters, but that should be discouraged.

For devnet / tilt, the existing parameters should still be used because the bootstrap peer may not be deterministic.

The following config parameters should be removed for guardiand and the query proxy server:

  • --network
  • --bootstrap
  • --ccqP2pBootstrap

The following config changes should be made for the spy:

  • Add --env with a value of mainnet or testnet.
  • Remove --network
  • Remove --bootstrap

Scenarios Tested

  • Spy in tilt (devnet)
  • Spy with --env mainnet
  • Spy with --env testnet
  • Spy with no --env but network parameters (allowed)
  • Spy with both --env and network parameters (not allowed)
  • CCQ server in tilt (devnet)
  • CCQ server with --env mainnet
  • CCQ server with --env testnet
  • Guardian in tilt (devnet)
  • Guardian in testnet, no network parameters (allowed)
  • Guardian in testnet, with network parameters (allowed)
  • Guardian in mainnet, no network parameters (allowed)
  • Guardian in mainnet, with network parameters (allowed)

@bruce-riley bruce-riley force-pushed the node/p2p_add_default_bootstrap_peers branch 4 times, most recently from 4fec9de to 869aa12 Compare March 21, 2024 20:30
@bruce-riley bruce-riley marked this pull request as ready for review March 21, 2024 20:33
@bruce-riley bruce-riley requested a review from bingyuyap March 21, 2024 20:33
evan-gray
evan-gray previously approved these changes Mar 21, 2024
Copy link
Contributor

@evan-gray evan-gray left a comment

Choose a reason for hiding this comment

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

seems reasonable to me. relatively small amount of code for less config needed across the ecosystem.

@bruce-riley bruce-riley force-pushed the node/p2p_add_default_bootstrap_peers branch from 869aa12 to 5d9e701 Compare March 21, 2024 22:14
bingyuyap
bingyuyap previously approved these changes Mar 22, 2024
@bruce-riley bruce-riley dismissed stale reviews from bingyuyap and evan-gray via 4e084b4 March 22, 2024 14:26
@bruce-riley bruce-riley force-pushed the node/p2p_add_default_bootstrap_peers branch from 5d9e701 to 4e084b4 Compare March 22, 2024 14:26
panoel
panoel previously approved these changes Mar 22, 2024
@bruce-riley bruce-riley force-pushed the node/p2p_add_default_bootstrap_peers branch from a23ff60 to 5539331 Compare March 22, 2024 15:50
@evan-gray evan-gray requested a review from panoel March 22, 2024 17:55
@bruce-riley bruce-riley requested a review from bingyuyap March 22, 2024 18:15
@bruce-riley bruce-riley merged commit d036e70 into main Mar 22, 2024
23 checks passed
@bruce-riley bruce-riley deleted the node/p2p_add_default_bootstrap_peers branch March 22, 2024 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants