diff --git a/beacon_chain/conf.nim b/beacon_chain/conf.nim index 7c7bc3c62..5595f31e1 100644 --- a/beacon_chain/conf.nim +++ b/beacon_chain/conf.nim @@ -6,6 +6,9 @@ import export defs +const + defaultPort = 9000 + type ValidatorKeyPath* = TypedInputFile[ValidatorPrivKey, Txt, "privkey"] @@ -49,11 +52,11 @@ type tcpPort* {. desc: "TCP listening port" - defaultValue: config.defaultPort().}: int + defaultValue: defaultPort .}: int udpPort* {. desc: "UDP listening port", - defaultValue: config.defaultPort().}: int + defaultValue: defaultPort .}: int nat* {. desc: "Specify method to use for determining public address. Must be one of: any, extip:" @@ -99,7 +102,7 @@ type bootstrapPort* {. desc: "The TCP/UDP port that will be used by the bootstrap node" - defaultValue: config.defaultPort().}: int + defaultValue: defaultPort .}: int genesisOffset* {. desc: "Seconds from now to add to genesis time" @@ -137,9 +140,6 @@ proc defaultDataDir*(conf: BeaconNodeConf): string = getHomeDir() / dataDir / "BeaconNode" / networkDir -proc defaultPort*(conf: BeaconNodeConf): int = - (if conf.network == "testnet0": 9630 else: 9632) + ord(useRLPx) - proc validatorFileBaseName*(validatorIdx: int): string = # there can apparently be tops 4M validators so we use 7 digits.. fmt"v{validatorIdx:07}" diff --git a/scripts/reset_testnet.sh b/scripts/reset_testnet.sh index 8605714e0..55c005d27 100755 --- a/scripts/reset_testnet.sh +++ b/scripts/reset_testnet.sh @@ -40,6 +40,7 @@ regenTestnetFiles() { --outputGenesis=$NETWORK_DIR/genesis.json \ --outputNetwork=$NETWORK_DIR/$NETWORK_FLAVOUR-network.json \ --bootstrapAddress=$PUBLIC_IP \ + --bootstrapPort=$BOOTSTRAP_PORT \ --genesisOffset=600 # Delay in seconds } diff --git a/scripts/testnet0.env b/scripts/testnet0.env index da3ecd8be..de66e0874 100644 --- a/scripts/testnet0.env +++ b/scripts/testnet0.env @@ -3,4 +3,5 @@ SHARD_COUNT=8 SLOTS_PER_EPOCH=8 VALIDATOR_COUNT=400 FIRST_USER_VALIDATOR=340 +BOOTSTRAP_PORT=9000 diff --git a/scripts/testnet1.env b/scripts/testnet1.env index ae447f40c..17e7a6f84 100644 --- a/scripts/testnet1.env +++ b/scripts/testnet1.env @@ -3,4 +3,5 @@ SHARD_COUNT=128 SLOTS_PER_EPOCH=64 VALIDATOR_COUNT=20000 FIRST_USER_VALIDATOR=19000 +BOOTSTRAP_PORT=9100