mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-01-20 19:40:52 +00:00
Local simulation suitable for capturing light client syncing data
This commit is contained in:
parent
ad8e682f76
commit
ff1e07783c
22
Makefile
22
Makefile
@ -201,20 +201,20 @@ local-testnet-minimal:
|
||||
./scripts/launch_local_testnet.sh \
|
||||
--data-dir $@ \
|
||||
--preset minimal \
|
||||
--nodes 4 \
|
||||
--stop-at-epoch 6 \
|
||||
--nodes 1 \
|
||||
--disable-htop \
|
||||
--enable-logtrace \
|
||||
--base-port $$(( 6001 + EXECUTOR_NUMBER * 500 )) \
|
||||
--base-rest-port $$(( 6031 + EXECUTOR_NUMBER * 500 )) \
|
||||
--base-metrics-port $$(( 6061 + EXECUTOR_NUMBER * 500 )) \
|
||||
--base-vc-metrics-port $$(( 6161 + EXECUTOR_NUMBER * 500 )) \
|
||||
--base-remote-signer-port $$(( 6201 + EXECUTOR_NUMBER * 500 )) \
|
||||
--base-el-net-port $$(( 6301 + EXECUTOR_NUMBER * 500 )) \
|
||||
--base-el-http-port $$(( 6302 + EXECUTOR_NUMBER * 500 )) \
|
||||
--base-el-ws-port $$(( 6303 + EXECUTOR_NUMBER * 500 )) \
|
||||
--base-el-auth-rpc-port $$(( 6304 + EXECUTOR_NUMBER * 500 )) \
|
||||
--base-port $$(( 8001 + EXECUTOR_NUMBER * 500 )) \
|
||||
--base-rest-port $$(( 8031 + EXECUTOR_NUMBER * 500 )) \
|
||||
--base-metrics-port $$(( 8061 + EXECUTOR_NUMBER * 500 )) \
|
||||
--base-vc-metrics-port $$(( 8161 + EXECUTOR_NUMBER * 500 )) \
|
||||
--base-remote-signer-port $$(( 8201 + EXECUTOR_NUMBER * 500 )) \
|
||||
--base-el-net-port $$(( 8301 + EXECUTOR_NUMBER * 500 )) \
|
||||
--base-el-http-port $$(( 8302 + EXECUTOR_NUMBER * 500 )) \
|
||||
--base-el-ws-port $$(( 8303 + EXECUTOR_NUMBER * 500 )) \
|
||||
--base-el-auth-rpc-port $$(( 8304 + EXECUTOR_NUMBER * 500 )) \
|
||||
--el-port-offset 5 \
|
||||
--disable-vc \
|
||||
--timeout 648 \
|
||||
--kill-old-processes \
|
||||
$(TESTNET_EXTRA_FLAGS) \
|
||||
|
@ -450,18 +450,18 @@ template fromSszBytes*(T: type[ValidatorPubKey | ValidatorSig], bytes: openArray
|
||||
func shortLog*(x: ValidatorPubKey | ValidatorSig): string =
|
||||
## Logging for wrapped BLS types
|
||||
## that may contain valid or non-validated data
|
||||
byteutils.toHex(x.blob.toOpenArray(0, 3))
|
||||
byteutils.toHex(x.blob)
|
||||
|
||||
func shortLog*(x: CookedPubKey): string =
|
||||
let raw = x.toRaw()
|
||||
byteutils.toHex(raw.toOpenArray(0, 3))
|
||||
byteutils.toHex(raw)
|
||||
|
||||
func shortLog*(x: ValidatorPrivKey): string =
|
||||
## Logging for raw unwrapped BLS types
|
||||
"<private key>"
|
||||
|
||||
func shortLog*(x: TrustedSig): string =
|
||||
byteutils.toHex(x.data.toOpenArray(0, 3))
|
||||
byteutils.toHex(x.data)
|
||||
|
||||
# Initialization
|
||||
# ----------------------------------------------------------------------
|
||||
|
@ -80,7 +80,7 @@ func `$`*(x: Eth2Digest): string =
|
||||
x.data.toHex()
|
||||
|
||||
func shortLog*(x: Eth2Digest): string =
|
||||
x.data.toOpenArray(0, 3).toHex()
|
||||
x.data.toHex()
|
||||
|
||||
chronicles.formatIt Eth2Digest:
|
||||
shortLog(it)
|
||||
|
@ -357,7 +357,7 @@ SECRETS_DIR="${DATA_DIR}/secrets"
|
||||
scripts/makedir.sh "${SECRETS_DIR}"
|
||||
|
||||
USER_VALIDATORS=8
|
||||
TOTAL_VALIDATORS=1024
|
||||
TOTAL_VALIDATORS=128
|
||||
|
||||
# "Make" binary
|
||||
if [[ "${OS}" == "windows" ]]; then
|
||||
@ -821,7 +821,7 @@ dump_logtrace() {
|
||||
fi
|
||||
}
|
||||
|
||||
NODES_WITH_VALIDATORS=${NODES_WITH_VALIDATORS:-4}
|
||||
NODES_WITH_VALIDATORS=${NODES_WITH_VALIDATORS:-1}
|
||||
BOOTSTRAP_NODE=0
|
||||
SYSTEM_VALIDATORS=$(( TOTAL_VALIDATORS - USER_VALIDATORS ))
|
||||
VALIDATORS_PER_NODE=$(( SYSTEM_VALIDATORS / NODES_WITH_VALIDATORS ))
|
||||
@ -993,6 +993,10 @@ for NUM_NODE in $(seq 0 $(( NUM_NODES - 1 ))); do
|
||||
--data-dir="${CONTAINER_NODE_DATA_DIR}" \
|
||||
${BOOTSTRAP_ARG} \
|
||||
"${WEB3_ARG[@]}" \
|
||||
--dump:on \
|
||||
--light-client-data-serve=on \
|
||||
--light-client-data-import-mode=full \
|
||||
--light-client-data-max-periods=999999 \
|
||||
${STOP_AT_EPOCH_FLAG} \
|
||||
${KEYMANAGER_FLAG} \
|
||||
--keymanager-token-file="${DATA_DIR}/keymanager-token" \
|
||||
|
Loading…
x
Reference in New Issue
Block a user