Make the deposit contract metadata file optional
This commit is contained in:
parent
734ab64da8
commit
b244f35731
|
@ -48,24 +48,26 @@ cli do (testnetName {.argument.}: string):
|
||||||
quit 1
|
quit 1
|
||||||
|
|
||||||
checkRequiredFile bootstrapFile
|
checkRequiredFile bootstrapFile
|
||||||
checkRequiredFile depositContractFile
|
|
||||||
checkRequiredFile genesisFile
|
checkRequiredFile genesisFile
|
||||||
|
|
||||||
var preset = testnetDir / configFile
|
var preset = testnetDir / configFile
|
||||||
if not fileExists(preset): preset = "minimal"
|
if not fileExists(preset): preset = "minimal"
|
||||||
|
|
||||||
let
|
let
|
||||||
depositContract = readFile(testnetDir / depositContractFile).strip
|
|
||||||
dataDirName = testnetName.replace("/", "_")
|
dataDirName = testnetName.replace("/", "_")
|
||||||
dataDir = buildDir / "data" / dataDirName
|
dataDir = buildDir / "data" / dataDirName
|
||||||
beaconNodeBinary = buildDir / "beacon_node_" & dataDirName
|
beaconNodeBinary = buildDir / "beacon_node_" & dataDirName
|
||||||
nimFlags = "-d:release --lineTrace:on -d:chronicles_log_level=DEBUG"
|
nimFlags = "-d:release --lineTrace:on -d:chronicles_log_level=DEBUG"
|
||||||
|
|
||||||
|
var depositContractOpt = ""
|
||||||
|
let depositContractFile = testnetDir / depositContractFile
|
||||||
|
if fileExists(depositContractFile):
|
||||||
|
depositContractOpt = "--deposit-contract=" & readFile(depositContractFile).strip
|
||||||
|
|
||||||
cd rootDir
|
cd rootDir
|
||||||
exec &"""nim c {nimFlags} -d:"const_preset={preset}" -o:"{beaconNodeBinary}" beacon_chain/beacon_node.nim"""
|
exec &"""nim c {nimFlags} -d:"const_preset={preset}" -o:"{beaconNodeBinary}" beacon_chain/beacon_node.nim"""
|
||||||
exec replace(&"""{beaconNodeBinary}
|
exec replace(&"""{beaconNodeBinary}
|
||||||
--data-dir="{dataDir}"
|
--data-dir="{dataDir}"
|
||||||
--bootstrap-file="{testnetDir/bootstrapFile}"
|
--bootstrap-file="{testnetDir/bootstrapFile}"
|
||||||
--state-snapshot="{testnetDir/genesisFile}"
|
--state-snapshot="{testnetDir/genesisFile}" """ & depositContractOpt, "\n", " ")
|
||||||
--deposit-contract={depositContract}""", "\n", " ")
|
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
CONST_PRESET=minimal
|
CONST_PRESET=minimal
|
||||||
NETWORK_ID=10
|
NETWORK_TYPE=libp2p_daemon
|
||||||
NETWORK_TYPE=rlpx
|
|
||||||
SHARD_COUNT=16
|
SHARD_COUNT=16
|
||||||
SLOTS_PER_EPOCH=16
|
SLOTS_PER_EPOCH=16
|
||||||
SECONDS_PER_SLOT=30
|
SECONDS_PER_SLOT=30
|
||||||
VALIDATOR_COUNT=1000
|
VALIDATOR_COUNT=1000
|
||||||
LAST_USER_VALIDATOR=199
|
LAST_USER_VALIDATOR=199
|
||||||
BOOTSTRAP_PORT=9000
|
BOOTSTRAP_PORT=9000
|
||||||
|
WEB3_URL=wss://goerli.infura.io/ws/v3/809a18497dd74102b5f37d25aae3c85a
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
CONST_PRESET=minimal
|
CONST_PRESET=minimal
|
||||||
NETWORK_ID=20
|
NETWORK_TYPE=libp2p_daemon
|
||||||
NETWORK_TYPE=libp2p
|
|
||||||
SHARD_COUNT=8
|
SHARD_COUNT=8
|
||||||
SLOTS_PER_EPOCH=8
|
SLOTS_PER_EPOCH=8
|
||||||
SECONDS_PER_SLOT=6
|
SECONDS_PER_SLOT=6
|
||||||
|
|
Loading…
Reference in New Issue