connect_to_testnet.nims: --extraBeaconNodeOptions
make SCRIPT_PARAMS="--extraBeaconNodeOptions='--metrics-address=127.0.0.1 --rpc-address=127.0.0.1 --nat=any'" altona
This commit is contained in:
parent
fe20c36ba5
commit
20ac6d46fe
|
@ -76,7 +76,7 @@ proc becomeValidator(validatorsDir, beaconNodeBinary, secretsDir, depositContrac
|
||||||
discard readLineFromStdin()
|
discard readLineFromStdin()
|
||||||
|
|
||||||
proc runNode(dataDir, beaconNodeBinary, bootstrapFileOpt, depositContractOpt,
|
proc runNode(dataDir, beaconNodeBinary, bootstrapFileOpt, depositContractOpt,
|
||||||
genesisFileOpt, natConfig, metricsAddress, rpcAddress: string,
|
genesisFileOpt, extraBeaconNodeOptions: string,
|
||||||
basePort, nodeID, baseMetricsPort, baseRpcPort: int,
|
basePort, nodeID, baseMetricsPort, baseRpcPort: int,
|
||||||
printCmdOnly: bool) =
|
printCmdOnly: bool) =
|
||||||
let logLevel = getEnv("LOG_LEVEL")
|
let logLevel = getEnv("LOG_LEVEL")
|
||||||
|
@ -103,19 +103,17 @@ proc runNode(dataDir, beaconNodeBinary, bootstrapFileOpt, depositContractOpt,
|
||||||
--data-dir="{dataDir}"
|
--data-dir="{dataDir}"
|
||||||
--dump
|
--dump
|
||||||
--web3-url={web3Url}
|
--web3-url={web3Url}
|
||||||
--nat={natConfig}
|
|
||||||
--tcp-port=""" & $(basePort + nodeID) & &"""
|
--tcp-port=""" & $(basePort + nodeID) & &"""
|
||||||
--udp-port=""" & $(basePort + nodeID) & &"""
|
--udp-port=""" & $(basePort + nodeID) & &"""
|
||||||
--metrics
|
--metrics
|
||||||
--metrics-address={metricsAddress}
|
|
||||||
--metrics-port=""" & $(baseMetricsPort + nodeID) & &"""
|
--metrics-port=""" & $(baseMetricsPort + nodeID) & &"""
|
||||||
--rpc
|
--rpc
|
||||||
--rpc-address={rpcAddress}
|
|
||||||
--rpc-port=""" & $(baseRpcPort + nodeID) & &"""
|
--rpc-port=""" & $(baseRpcPort + nodeID) & &"""
|
||||||
{bootstrapFileOpt}
|
{bootstrapFileOpt}
|
||||||
{logLevelOpt}
|
{logLevelOpt}
|
||||||
{depositContractOpt}
|
{depositContractOpt}
|
||||||
{genesisFileOpt} """, "\n", " ")
|
{genesisFileOpt}
|
||||||
|
{extraBeaconNodeOptions}""", "\n", " ")
|
||||||
execIgnoringExitCode cmd
|
execIgnoringExitCode cmd
|
||||||
|
|
||||||
cli do (skipGoerliKey {.
|
cli do (skipGoerliKey {.
|
||||||
|
@ -138,24 +136,14 @@ cli do (skipGoerliKey {.
|
||||||
basePort {.
|
basePort {.
|
||||||
desc: "Base TCP/UDP port (nodeID will be added to it)" .} = 9000.int,
|
desc: "Base TCP/UDP port (nodeID will be added to it)" .} = 9000.int,
|
||||||
|
|
||||||
metricsAddress {.
|
|
||||||
desc: "Listening address of the metrics server"
|
|
||||||
name: "metrics-address" .} = "127.0.0.1",
|
|
||||||
|
|
||||||
baseMetricsPort {.
|
baseMetricsPort {.
|
||||||
desc: "Base metrics port (nodeID will be added to it)" .} = 8008.int,
|
desc: "Base metrics port (nodeID will be added to it)" .} = 8008.int,
|
||||||
|
|
||||||
rpcAddress {.
|
|
||||||
desc: "Listening address of the RPC server"
|
|
||||||
name: "rpc-address" .} = "127.0.0.1",
|
|
||||||
|
|
||||||
baseRpcPort {.
|
baseRpcPort {.
|
||||||
desc: "Base rpc port (nodeID will be added to it)" .} = 9190.int,
|
desc: "Base rpc port (nodeID will be added to it)" .} = 9190.int,
|
||||||
|
|
||||||
natConfig {.
|
extraBeaconNodeOptions {.
|
||||||
desc: "Specify method to use for determining public address. " &
|
desc: "Extra options to pass to our beacon_node instance" .} = "",
|
||||||
"Must be one of: any, none, upnp, pmp, extip:<IP>",
|
|
||||||
name: "nat" .} = "any",
|
|
||||||
|
|
||||||
writeLogFile {.
|
writeLogFile {.
|
||||||
desc: "Write a log file in dataDir" .} = true,
|
desc: "Write a log file in dataDir" .} = true,
|
||||||
|
@ -265,7 +253,10 @@ cli do (skipGoerliKey {.
|
||||||
if doBecomeValidator and depositContractOpt.len > 0 and not system.dirExists(validatorsDir):
|
if doBecomeValidator and depositContractOpt.len > 0 and not system.dirExists(validatorsDir):
|
||||||
becomeValidator(validatorsDir, beaconNodeBinary, secretsDir, depositContractOpt, privateGoerliKey, becomeValidatorOnly)
|
becomeValidator(validatorsDir, beaconNodeBinary, secretsDir, depositContractOpt, privateGoerliKey, becomeValidatorOnly)
|
||||||
|
|
||||||
|
echo &"extraBeaconNodeOptions = '{extraBeaconNodeOptions}'"
|
||||||
|
|
||||||
if doRun:
|
if doRun:
|
||||||
runNode(dataDir, beaconNodeBinary, bootstrapFileOpt, depositContractOpt,
|
runNode(dataDir, beaconNodeBinary, bootstrapFileOpt, depositContractOpt,
|
||||||
genesisFileOpt, natConfig, metricsAddress, rpcAddress, basePort,
|
genesisFileOpt, extraBeaconNodeOptions,
|
||||||
nodeID, baseMetricsPort, baseRpcPort, printCmdOnly)
|
basePort, nodeID, baseMetricsPort, baseRpcPort,
|
||||||
|
printCmdOnly)
|
||||||
|
|
Loading…
Reference in New Issue