-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
bugfix : Removed the default value of the bootnode flag to prevent it from being overridden during testnet usage #14357
bugfix : Removed the default value of the bootnode flag to prevent it from being overridden during testnet usage #14357
Conversation
cmd/flags.go
Outdated
@@ -101,7 +100,6 @@ var ( | |||
BootstrapNode = &cli.StringSliceFlag{ | |||
Name: "bootstrap-node", | |||
Usage: "The address of bootstrap node. Beacon node will connect for peer discovery via DHT. Multiple nodes can be passed by using the flag multiple times but not comma-separated. You can also pass YAML files containing multiple nodes.", | |||
Value: cli.NewStringSlice(params.BeaconNetworkConfig().BootstrapNodes...), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should instead just change to if cliCtx.IsSet(cmd.BootstrapNode.Name) {
instead of len(cliCtx.StringSlice(cmd.BootstrapNode.Name)) > 0
now that the library is fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh that's a good news. Than I will fix it to use IsSet()
instead of removing default value from flag.
thanks for the submission left a comment |
Bugfix to revert changes from #11166 because library is fixed now. |
d2e3203
to
7bcd780
Compare
…ng overridden during testnet usage
Head branch was pushed to by a user without write access
2615be5
to
82cd079
Compare
50e5326
… from being overridden during testnet usage (#14357) * Removed the default value of the bootnode flag to prevent it from being overridden during testnet usage * bugfix for checking stringslice flag to use isSet
What type of PR is this?
What does this PR do? Why is it needed?
By #11166, this fix made bug to always load mainnet bootnodes when just using testnet flags like --Holesky.
In
configureBeacon()
at beacon-chain/node/node.go it first initialize testnet network config byConfigureBeaconChain()
-> configureTestnet().Than it always overrides beaconchain network config bootnodes value as a mainnet bootnodes(which is default value for
bootstrap-node
flag) inconfigureNetwork()
because len(cmd.BootstrapNode.Name) is always >1.So this default value for
bootstrap-node
flag should be removed to run testnet beacon node with just testnet flag.And also removing this default value doesn't disturb using mainnet flag usage.