diff --git a/.github/workflows/fluffy.yml b/.github/workflows/fluffy.yml index e6f64bb1c..c1d090e43 100644 --- a/.github/workflows/fluffy.yml +++ b/.github/workflows/fluffy.yml @@ -308,7 +308,7 @@ jobs: - name: Run fluffy testnet run: | - ./fluffy/scripts/launch_local_testnet.sh --run-tests + ./fluffy/scripts/launch_local_testnet.sh --nodes=64 --run-tests lint: name: "Lint Fluffy" diff --git a/fluffy/docs/the_fluffy_book/docs/run-local-testnet.md b/fluffy/docs/the_fluffy_book/docs/run-local-testnet.md index 97aec1cd1..144ab2579 100644 --- a/fluffy/docs/the_fluffy_book/docs/run-local-testnet.md +++ b/fluffy/docs/the_fluffy_book/docs/run-local-testnet.md @@ -8,7 +8,7 @@ on them through the JSON-RPC API. ## Run the local testnet script ```bash -# Run the script, default start 64 nodes +# Run the script, default start 3 nodes ./fluffy/scripts/launch_local_testnet.sh # Run the script with 16 nodes ./fluffy/scripts/launch_local_testnet.sh -n 16 diff --git a/fluffy/scripts/launch_local_testnet.sh b/fluffy/scripts/launch_local_testnet.sh index 5a5af8548..62b28dc6a 100755 --- a/fluffy/scripts/launch_local_testnet.sh +++ b/fluffy/scripts/launch_local_testnet.sh @@ -34,10 +34,10 @@ if [ ${PIPESTATUS[0]} != 4 ]; then fi OPTS="h:n:d" -LONGOPTS="help,nodes:,data-dir:,run-tests,log-level:,base-port:,base-rpc-port:,trusted-block-root:,portal-bridge,base-metrics-port:,reuse-existing-data-dir,timeout:,kill-old-processes" +LONGOPTS="help,nodes:,data-dir:,run-tests,log-level:,base-port:,base-rpc-port:,trusted-block-root:,portal-bridge,base-metrics-port:,reuse-existing-data-dir,timeout:,kill-old-processes,skip-build,portal-subnetworks:,disable-state-root-validation" # default values -NUM_NODES="64" +NUM_NODES="3" DATA_DIR="local_testnet_data" RUN_TESTS="0" LOG_LEVEL="INFO" @@ -52,26 +52,32 @@ PORTAL_BRIDGE="0" TRUSTED_BLOCK_ROOT="" # REST_URL="http://127.0.0.1:5052" REST_URL="http://testing.mainnet.beacon-api.nimbus.team" +SKIP_BUILD="0" +PORTAL_SUBNETWORKS="beacon,history,state" +DISABLE_STATE_ROOT_VALIDATION="0" print_help() { cat </dev/null || true done - - # Delete the binaries we just built, because these are with none default logs. - # TODO: When fluffy gets run time log options a la nimbus-eth2 we can keep - # the binaries around. - for BINARY in ${BINARIES}; do - rm build/${BINARY} - done } trap 'cleanup' SIGINT SIGTERM EXIT @@ -315,7 +336,8 @@ for NUM_NODE in $(seq 0 $(( NUM_NODES - 1 ))); do --table-ip-limit=1024 \ --bucket-ip-limit=24 \ --bits-per-hop=1 \ - --portal-subnetworks:beacon,history,state \ + --portal-subnetworks="${PORTAL_SUBNETWORKS}" \ + --disable-state-root-validation="${DISABLE_STATE_ROOT_VALIDATION}" \ ${TRUSTED_BLOCK_ROOT_ARG} \ ${RADIUS_ARG} \ ${EXTRA_ARGS} \ diff --git a/fluffy/tools/portal_bridge/portal_bridge_state.nim b/fluffy/tools/portal_bridge/portal_bridge_state.nim index 342b779e9..e375f93a1 100644 --- a/fluffy/tools/portal_bridge/portal_bridge_state.nim +++ b/fluffy/tools/portal_bridge/portal_bridge_state.nim @@ -308,7 +308,7 @@ proc runBackfillGossipBlockOffersLoop( break if retryGossip: - await sleepAsync(1.seconds) + await sleepAsync(3.seconds) warn "Retrying state gossip for block number: ", blockNumber = blockOffers.blockNumber, workerId continue @@ -330,7 +330,7 @@ proc runBackfillGossipBlockOffersLoop( break if retryGossip: - await sleepAsync(1.seconds) + await sleepAsync(3.seconds) warn "Retrying state gossip for block number: ", blockNumber = blockOffers.blockNumber continue @@ -347,7 +347,7 @@ proc runBackfillMetricsLoop( info "Starting state backfill metrics loop" while true: - await sleepAsync(10.seconds) + await sleepAsync(30.seconds) info "Block data queue metrics: ", nextBlockNumber = blockDataQueue[0].blockNumber, blockDataQueueLen = blockDataQueue.len()