Address review comments
* Create a json log named "nbc.log" only when the --dev-build option is specified to the connect_to_testnet script. This option is specified for the targets "testnet0", "testnet1" and "schlesi-dev"
This commit is contained in:
parent
667bdf066a
commit
fada11e1e9
4
Makefile
4
Makefile
|
@ -124,14 +124,14 @@ clean-testnet1:
|
||||||
# - try SCRIPT_PARAMS="--skipGoerliKey"
|
# - try SCRIPT_PARAMS="--skipGoerliKey"
|
||||||
testnet0 testnet1: | build deps
|
testnet0 testnet1: | build deps
|
||||||
source scripts/$@.env; \
|
source scripts/$@.env; \
|
||||||
NIM_PARAMS="$(NIM_PARAMS)" LOG_LEVEL="$(LOG_LEVEL)" $(ENV_SCRIPT) nim $(NIM_PARAMS) scripts/connect_to_testnet.nims $(SCRIPT_PARAMS) --const-preset=$$CONST_PRESET $@
|
NIM_PARAMS="$(NIM_PARAMS)" LOG_LEVEL="$(LOG_LEVEL)" $(ENV_SCRIPT) nim $(NIM_PARAMS) scripts/connect_to_testnet.nims $(SCRIPT_PARAMS) --const-preset=$$CONST_PRESET --dev-build $@
|
||||||
|
|
||||||
schlesi: | build deps
|
schlesi: | build deps
|
||||||
LOG_LEVEL="DEBUG" $(ENV_SCRIPT) nim $(NIM_PARAMS) scripts/connect_to_testnet.nims $(SCRIPT_PARAMS) shared/schlesi
|
LOG_LEVEL="DEBUG" $(ENV_SCRIPT) nim $(NIM_PARAMS) scripts/connect_to_testnet.nims $(SCRIPT_PARAMS) shared/schlesi
|
||||||
|
|
||||||
schlesi-dev: | build deps
|
schlesi-dev: | build deps
|
||||||
LOG_LEVEL="DEBUG; TRACE:discv5,networking; REQUIRED:none; DISABLED:none" \
|
LOG_LEVEL="DEBUG; TRACE:discv5,networking; REQUIRED:none; DISABLED:none" \
|
||||||
$(ENV_SCRIPT) nim $(NIM_PARAMS) scripts/connect_to_testnet.nims $(SCRIPT_PARAMS) shared/schlesi
|
$(ENV_SCRIPT) nim $(NIM_PARAMS) scripts/connect_to_testnet.nims $(SCRIPT_PARAMS) --dev-build shared/schlesi
|
||||||
|
|
||||||
clean: | clean-common
|
clean: | clean-common
|
||||||
rm -rf build/{$(TOOLS_CSV),all_tests,*_node,*ssz*,beacon_node_testnet*,state_sim,transition*}
|
rm -rf build/{$(TOOLS_CSV),all_tests,*_node,*ssz*,beacon_node_testnet*,state_sim,transition*}
|
||||||
|
|
|
@ -27,9 +27,12 @@ cli do (skipGoerliKey {.
|
||||||
desc: "Don't prompt for an Eth1 Goerli key to become a validator" .}: bool,
|
desc: "Don't prompt for an Eth1 Goerli key to become a validator" .}: bool,
|
||||||
|
|
||||||
constPreset {.
|
constPreset {.
|
||||||
defaultValue: ""
|
|
||||||
desc: "The Ethereum 2.0 const preset of the network (optional)"
|
desc: "The Ethereum 2.0 const preset of the network (optional)"
|
||||||
name: "const-preset" .}: string,
|
name: "const-preset" .} = "",
|
||||||
|
|
||||||
|
devBuild {.
|
||||||
|
desc: "Enables more extensive logging and debugging support"
|
||||||
|
name: "dev-build" .} = false,
|
||||||
|
|
||||||
testnetName {.argument .}: string):
|
testnetName {.argument .}: string):
|
||||||
let
|
let
|
||||||
|
@ -89,6 +92,9 @@ cli do (skipGoerliKey {.
|
||||||
var
|
var
|
||||||
nimFlags = "-d:chronicles_log_level=TRACE " & getEnv("NIM_PARAMS")
|
nimFlags = "-d:chronicles_log_level=TRACE " & getEnv("NIM_PARAMS")
|
||||||
|
|
||||||
|
if devBuild:
|
||||||
|
nimFlags.add """ -d:"chronicles_sinks=textlines,json[file(nbc.log)]" """
|
||||||
|
|
||||||
let depositContractFile = testnetDir / depositContractFileName
|
let depositContractFile = testnetDir / depositContractFileName
|
||||||
if system.fileExists(depositContractFile):
|
if system.fileExists(depositContractFile):
|
||||||
depositContractOpt = "--deposit-contract=" & readFile(depositContractFile).strip
|
depositContractOpt = "--deposit-contract=" & readFile(depositContractFile).strip
|
||||||
|
@ -107,7 +113,7 @@ cli do (skipGoerliKey {.
|
||||||
rmDir dataDir
|
rmDir dataDir
|
||||||
|
|
||||||
cd rootDir
|
cd rootDir
|
||||||
exec &"""nim c {nimFlags} -d:"const_preset={preset}" -d:"chronicles_sinks=textlines,json[file(json-log.txt)],textblocks[file(text-log.txt)]" -o:"{beaconNodeBinary}" beacon_chain/beacon_node.nim"""
|
exec &"""nim c {nimFlags} -d:"const_preset={preset}" -o:"{beaconNodeBinary}" beacon_chain/beacon_node.nim"""
|
||||||
|
|
||||||
mkDir dumpDir
|
mkDir dumpDir
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue