diff --git a/.env b/.env index 60186f6d..c74b873b 100644 --- a/.env +++ b/.env @@ -1,18 +1,21 @@ -BSC_CLUSTER_SIZE=5 +BSC_CLUSTER_SIZE=10 CHAIN_ID=714 KEYPASS="0123456789" INIT_HOLDER="0x04d63aBCd2b9b1baa327f2Dda0f873F197ccd186" # INIT_HOLDER_PRV="59ba8068eb256d520179e903f43dacf6d8d57d72bd306e1bd603fdb8c8da10e8" RPC_URL="http://127.0.0.1:8545" -GENESIS_COMMIT="234e3685ec309624f0fbef41043ae117caebc853" # lorentz commit +GENESIS_COMMIT="83b5d2e844ec37b9d878fdc5f6fad881e992a404" # lorentz commit PASSED_FORK_DELAY=40 LAST_FORK_MORE_DELAY=10 FullImmutabilityThreshold=2048 MinBlocksForBlobRequests=576 DefaultExtraReserveForBlobRequests=32 BreatheBlockInterval=1200 -useLatestBscClient=false +useLatestBscClient=true EnableSentryNode=false EnableFullNode=false RegisterNodeID=false EnableEVNWhitelist=false +RETH_BSC_BINARY_PATH="/Users/user/development/reth-bsc/target/debug/reth-bsc" +RETH_NODE_COUNT=1 +BSC_SUBMIT_BUILT_PAYLOAD=true diff --git a/README.md b/README.md index 107132cb..2367b251 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,24 @@ go build - `.env` ``` +**Reth-BSC Configuration:** +To use reth-bsc nodes instead of geth nodes for some validators, configure the following in `.env`: +```bash +# Path to the reth-bsc binary +RETH_BSC_BINARY_PATH="/path/to/reth-bsc/target/debug/reth-bsc" + +# Number of nodes to run with reth-bsc (starting from node0) +# For example: RETH_NODE_COUNT=2 will run node0 and node1 with reth-bsc, others with geth +RETH_NODE_COUNT=1 +``` + +Reth-BSC nodes are launched with BLS vote key CLI flags by default: +- `--bls.keystore-path` and `--bls.keystore-password` are auto-detected from each node’s `bls/keystore` and `${KEYPASS}`. +- To override, set either of the following envs before start (the script will pass them as CLI, which takes precedence over env inside reth): + - `BSC_BLS_PRIVATE_KEY` (dev only) → passes `--bls.private-key` + - `BSC_BLS_KEYSTORE_PATH` and `BSC_BLS_KEYSTORE_PASSWORD` → passes `--bls.keystore-path` and `--bls.keystore-password` + + 5. Setup all nodes. two different ways, choose as you like. ```bash @@ -89,4 +107,4 @@ go build cd txblob go build ./txblob -``` \ No newline at end of file +``` diff --git a/bin/.gitkeep b/bin/.gitkeep deleted file mode 100644 index 5428a97c..00000000 --- a/bin/.gitkeep +++ /dev/null @@ -1,3 +0,0 @@ -# Ignore everything in this directory -* -# Except geth \ No newline at end of file diff --git a/bsc_cluster.sh b/bsc_cluster.sh index 0c1e6221..b6848887 100644 --- a/bsc_cluster.sh +++ b/bsc_cluster.sh @@ -16,10 +16,73 @@ gcmode="full" sleepBeforeStart=15 sleepAfterStart=10 -# stop geth client +# Validation function for reth-bsc configuration +function validate_reth_config() { + # Check if RETH_NODE_COUNT is set and valid + if [ -z "$RETH_NODE_COUNT" ]; then + RETH_NODE_COUNT=0 + echo "RETH_NODE_COUNT not set, defaulting to 0 (all geth nodes)" + return 0 + fi + + # Check if RETH_NODE_COUNT is not greater than total cluster size + if [ $RETH_NODE_COUNT -gt $size ]; then + echo "ERROR: RETH_NODE_COUNT ($RETH_NODE_COUNT) cannot be greater than BSC_CLUSTER_SIZE ($size)" + echo "Please adjust RETH_NODE_COUNT in .env file to be <= $size" + exit 1 + fi + + # Check if RETH_NODE_COUNT is negative + if [ $RETH_NODE_COUNT -lt 0 ]; then + echo "ERROR: RETH_NODE_COUNT ($RETH_NODE_COUNT) cannot be negative" + echo "Please set RETH_NODE_COUNT to a value between 0 and $size in .env file" + exit 1 + fi + + # If RETH_NODE_COUNT > 0, check if reth-bsc binary exists and is executable + if [ $RETH_NODE_COUNT -gt 0 ]; then + if [ -z "$RETH_BSC_BINARY_PATH" ]; then + echo "ERROR: RETH_BSC_BINARY_PATH is not set in .env file" + echo "Please set RETH_BSC_BINARY_PATH to the path of your reth-bsc binary" + exit 1 + fi + + if [ ! -f "$RETH_BSC_BINARY_PATH" ]; then + echo "ERROR: reth-bsc binary not found at: $RETH_BSC_BINARY_PATH" + echo "Please check the RETH_BSC_BINARY_PATH in .env file and ensure the binary exists" + exit 1 + fi + + if [ ! -x "$RETH_BSC_BINARY_PATH" ]; then + echo "ERROR: reth-bsc binary is not executable: $RETH_BSC_BINARY_PATH" + echo "Please make the binary executable with: chmod +x $RETH_BSC_BINARY_PATH" + exit 1 + fi + + echo "✓ Validated: Will run $RETH_NODE_COUNT reth-bsc nodes (node0-node$((RETH_NODE_COUNT-1))) and $((size-RETH_NODE_COUNT)) geth nodes" + else + echo "✓ Validated: Will run all $size nodes with geth (no reth-bsc nodes)" + fi +} + +# stop geth client and reth-bsc function exit_previous() { ValIdx=$1 - ps -ef | grep geth$ValIdx | grep config |awk '{print $2}' | xargs kill + if [ ! -z $ValIdx ]; then + if [ $ValIdx -lt $RETH_NODE_COUNT ]; then + # Stop reth-bsc for reth nodes (first RETH_NODE_COUNT nodes) + ps -ef | grep reth-bsc | grep -v grep | awk '{print $2}' | xargs -r kill + else + # Stop geth for other nodes + ps -ef | grep geth$ValIdx | grep config |awk '{print $2}' | xargs -r kill + fi + else + # Stop all nodes + ps -ef | grep reth-bsc | grep -v grep | awk '{print $2}' | xargs -r kill + for ((i = 0; i < size; i++)); do + ps -ef | grep geth$i | grep config |awk '{print $2}' | xargs -r kill + done + fi sleep ${sleepBeforeStart} } @@ -60,7 +123,7 @@ function reset_genesis() { poetry install --no-root npm install rm -rf lib/forge-std - forge install --no-git --no-commit foundry-rs/forge-std@v1.7.3 + forge install --no-git foundry-rs/forge-std@v1.7.3 cd lib/forge-std/lib rm -rf ds-test git clone https://github.com/dapphub/ds-test @@ -168,8 +231,10 @@ function initNetwork() { initLog=${workspace}/.local/node${i}/init.log if [ $i -eq 0 ] ; then ${workspace}/bin/geth --datadir ${workspace}/.local/node${i} init --state.scheme ${stateScheme} --db.engine ${dbEngine} ${workspace}/genesis/genesis.json > "${initLog}" 2>&1 - elif [ $i -eq 1 ] ; then - ${workspace}/bin/geth --datadir ${workspace}/.local/node${i} init --state.scheme path --db.engine pebble --multidatabase ${workspace}/genesis/genesis.json > "${initLog}" 2>&1 + elif [ $i -lt $RETH_NODE_COUNT ] ; then + # Skip geth init for reth-bsc nodes, just copy genesis and create a dummy init log + cp ${workspace}/genesis/genesis.json ${workspace}/.local/node${i}/genesis.json + echo "reth-bsc init: genesis.json copied for reth-bsc node${i}" > "${initLog}" 2>&1 else ${workspace}/bin/geth --datadir ${workspace}/.local/node${i} init --state.scheme path --db.engine pebble ${workspace}/genesis/genesis.json > "${initLog}" 2>&1 fi @@ -191,6 +256,164 @@ function initNetwork() { fi } +function start_reth_bsc() { + local nodeIndex=$1 + local HTTPPort=$2 + local WSPort=$3 + local PassedForkTime=$4 + local LastHardforkTime=$5 + local rialtoHash=$6 + + # Copy and modify genesis.json for reth-bsc with correct fork timing + cp ${workspace}/genesis/genesis.json ${workspace}/.local/node${nodeIndex}/genesis.json + + # Modify fork times in genesis.json for reth-bsc: all forks at PassedForkTime except Maxwell at LastHardforkTime + jq --arg passedTime "$PassedForkTime" --arg lastTime "$LastHardforkTime" ' + .config.shanghaiTime = ($passedTime | tonumber) | + .config.keplerTime = ($passedTime | tonumber) | + .config.feynmanTime = ($passedTime | tonumber) | + .config.feynmanFixTime = ($passedTime | tonumber) | + .config.cancunTime = ($passedTime | tonumber) | + .config.haberTime = ($passedTime | tonumber) | + .config.haberFixTime = ($passedTime | tonumber) | + .config.lorentzTime = ($passedTime | tonumber) | + .config.bohrTime = ($passedTime | tonumber) | + .config.tychoTime = ($passedTime | tonumber) | + .config.pragueTime = ($passedTime | tonumber) | + .config.pascalTime = ($passedTime | tonumber) | + .config.maxwellTime = ($passedTime | tonumber) | + .config.fermiTime = ($lastTime | tonumber) + ' ${workspace}/.local/node${nodeIndex}/genesis.json > ${workspace}/.local/node${nodeIndex}/genesis_reth.json + + if [ ${EnableSentryNode} = true ]; then + cp ${workspace}/.local/node${nodeIndex}/genesis_reth.json ${workspace}/.local/sentry${nodeIndex}/genesis_reth.json + fi + + # Get the first bootnode enode from BootstrapNodes configuration + # Extract the complete first bootnode entry (including the full enode:// URL) + bootnode_enode=$(grep -E "BootstrapNodes" ${workspace}/.local/node${nodeIndex}/config.toml | grep -o '\[".*"\]' | sed 's/\["//;s/"\]//;s/", "/,/g') + staic_enode=$(grep -E "StaticNodes" ${workspace}/.local/node${nodeIndex}/config.toml | grep -o '\[".*"\]' | sed 's/\["//;s/"\]//;s/", "/,/g') + + # Extract discovery port from the current node's config.toml ListenAddr + discovery_port=$(grep "ListenAddr" ${workspace}/.local/node${nodeIndex}/config.toml | sed 's/.*:\([0-9]*\).*/\1/') + auth_port=$((8551+nodeIndex)) + + # Detect keystore path dynamically + keystore_path=$(find ${workspace}/.local/node${nodeIndex}/keystore -name "UTC--*" -type f | head -1) + nodekey_path=$(find ${workspace}/.local/node${nodeIndex}/geth/nodekey -type f | head -1) + peer_conf=() + if [ -n "${bootnode_enode}" ]; then + peer_conf+=(--bootnodes ${bootnode_enode}) + fi + if [ -n "${staic_enode}" ]; then + peer_conf+=(--trusted-peers ${staic_enode}) + fi + + # Determine BLS signer CLI args (prefer CLI over env) + # Priority: + # 1) BSC_BLS_PRIVATE_KEY -> use direct private key (dev only) + # 2) BSC_BLS_KEYSTORE_PATH + BSC_BLS_KEYSTORE_PASSWORD -> use provided keystore + # 3) Auto-detected keystore in node dir + KEYPASS from .env + bls_keystore_path=$(find ${workspace}/.local/node${nodeIndex}/bls/keystore -name "*.json" -type f | head -1) + bls_cli_args=() + if [ -n "${BSC_BLS_PRIVATE_KEY}" ]; then + bls_cli_args+=(--bls.private-key "${BSC_BLS_PRIVATE_KEY}") + elif [ -n "${BSC_BLS_KEYSTORE_PATH}" ] && [ -n "${BSC_BLS_KEYSTORE_PASSWORD}" ]; then + bls_cli_args+=(--bls.keystore-path "${BSC_BLS_KEYSTORE_PATH}" --bls.keystore-password "${BSC_BLS_KEYSTORE_PASSWORD}") + else + if [ -z "${bls_keystore_path}" ]; then + echo "WARNING: No BLS keystore found for node${nodeIndex}; reth-bsc may fall back to env if configured" >&2 + fi + bls_cli_args+=(--bls.keystore-path "${bls_keystore_path}" --bls.keystore-password "${KEYPASS}") + fi + + evn_conf=() + if [ ${EnableSentryNode} = true ]; then + evn_conf+=(--evn.enabled) + add_nodeid=$(grep -E "EVNNodeIDsToAdd" ${workspace}/.local/node${nodeIndex}/config.toml | grep -o '\[".*"\]' | sed 's/\["//;s/"\]//;s/", "/,/g') + if [ -n "${add_nodeid}" ]; then + evn_conf+=(--evn.add-nodeid ${add_nodeid}) + fi + remove_nodeid=$(grep -E "EVNNodeIDsToRemove" ${workspace}/.local/node${nodeIndex}/config.toml | grep -o '\[".*"\]' | sed 's/\["//;s/"\]//;s/", "/,/g') + if [ -n "${remove_nodeid}" ]; then + evn_conf+=(--evn.remove-nodeid ${remove_nodeid}) + fi + fi + echo "node${nodeIndex}, nodekey_path: ${nodekey_path}, peer_conf: ${peer_conf[@]}, evn_conf: ${evn_conf[@]}" + + # Run reth-bsc node + nohup env RUST_LOG=debug BREATHE_BLOCK_INTERVAL=${BreatheBlockInterval} BSC_SUBMIT_BUILT_PAYLOAD=${BSC_SUBMIT_BUILT_PAYLOAD} ${RETH_BSC_BINARY_PATH} node \ + --chain ${workspace}/.local/node${nodeIndex}/genesis_reth.json \ + --datadir ${workspace}/.local/node${nodeIndex} \ + --genesis-hash ${rialtoHash} \ + --disable-discovery \ + --http \ + --http.addr 0.0.0.0 \ + --http.port ${HTTPPort} \ + --p2p-secret-key ${nodekey_path} \ + --ws \ + --ws.addr 0.0.0.0 \ + --ws.port $((${WSPort})) \ + --discovery.addr 0.0.0.0 \ + --discovery.port ${discovery_port} \ + --authrpc.port ${auth_port} \ + --port ${discovery_port} \ + ${peer_conf[@]} \ + ${evn_conf[@]} \ + --mining.enabled \ + --mining.min-gas-tip 1000000000 \ + --mining.keystore-path ${keystore_path} \ + --mining.keystore-password ${KEYPASS} "${bls_cli_args[@]}" \ + --log.stdout.format log-fmt --engine.persistence-threshold 10 --engine.memory-block-buffer-target 128 \ + >> ${workspace}/.local/node${nodeIndex}/reth.log 2>&1 & + + if [ ${EnableSentryNode} = true ]; then + discovery_port=$(grep "ListenAddr" ${workspace}/.local/sentry${nodeIndex}/config.toml | sed 's/.*:\([0-9]*\).*/\1/') + nodekey_path=$(find ${workspace}/.local/sentry${i}/geth/nodekey -type f | head -1) + bootnode_enode=$(grep -E "BootstrapNodes" ${workspace}/.local/sentry${nodeIndex}/config.toml | grep -o '\[".*"\]' | sed 's/\["//;s/"\]//;s/", "/,/g') + staic_enode=$(grep -E "StaticNodes" ${workspace}/.local/sentry${nodeIndex}/config.toml | grep -o '\[".*"\]' | sed 's/\["//;s/"\]//;s/", "/,/g') + peer_conf=() + if [ -n "${bootnode_enode}" ]; then + peer_conf+=(--bootnodes ${bootnode_enode}) + fi + if [ -n "${staic_enode}" ]; then + peer_conf+=(--trusted-peers ${staic_enode}) + fi + evn_conf=() + evn_conf+=(--evn.enabled) + whitelist_nodeid=$(grep -E "EVNNodeIdsWhitelist" ${workspace}/.local/sentry${nodeIndex}/config.toml | grep -o '\[".*"\]' | sed 's/\["//;s/"\]//;s/", "/,/g') + if [ -n "${whitelist_nodeid}" ]; then + evn_conf+=(--evn.whitelist-nodeids ${whitelist_nodeid}) + fi + proxyed_val=$(grep -E "ProxyedValidatorAddresses" ${workspace}/.local/sentry${nodeIndex}/config.toml | grep -o '\[".*"\]' | sed 's/\["//;s/"\]//;s/", "/,/g') + if [ -n "${proxyed_val}" ]; then + evn_conf+=(--evn.proxyed-validator ${proxyed_val}) + fi + + echo "sentry${nodeIndex}, nodekey_path: ${nodekey_path}, peer_conf: ${peer_conf[@]}, evn_conf: ${evn_conf[@]}" + nohup env RUST_LOG=debug BREATHE_BLOCK_INTERVAL=${BreatheBlockInterval} ${RETH_BSC_BINARY_PATH} node \ + --chain ${workspace}/.local/sentry${nodeIndex}/genesis_reth.json \ + --datadir ${workspace}/.local/sentry${nodeIndex} \ + --genesis-hash ${rialtoHash} \ + --disable-discovery \ + --http \ + --http.addr 0.0.0.0 \ + --http.port $((HTTPPort+1)) \ + --p2p-secret-key ${nodekey_path} \ + --ws \ + --ws.addr 0.0.0.0 \ + --ws.port $((WSPort+1)) \ + --discovery.addr 0.0.0.0 \ + --discovery.port ${discovery_port} \ + --authrpc.port $((auth_port+1)) \ + --port ${discovery_port} \ + ${peer_conf[@]} \ + ${evn_conf[@]} \ + --log.stdout.format log-fmt \ + >> ${workspace}/.local/sentry${nodeIndex}/reth.log 2>&1 & + fi +} + function native_start() { PassedForkTime=`cat ${workspace}/.local/node0/hardforkTime.txt|grep passedHardforkTime|awk -F" " '{print $NF}'` LastHardforkTime=$(expr ${PassedForkTime} + ${LAST_FORK_MORE_DELAY}) @@ -198,6 +421,7 @@ function native_start() { ValIdx=$1 for ((i = 0; i < size; i++));do + sleep 2 if [ ! -z $ValIdx ] && [ $i -ne $ValIdx ]; then continue fi @@ -211,39 +435,46 @@ function native_start() { MetricsPort=$((6060 + i*2)) PProfPort=$((7060 + i*2)) - # geth may be replaced - cp ${workspace}/bin/geth ${workspace}/.local/node${i}/geth${i} - # update `config` in genesis.json - # ${workspace}/.local/node${i}/geth${i} dumpgenesis --datadir ${workspace}/.local/node${i} | jq . > ${workspace}/.local/node${i}/genesis.json - # run BSC node - nohup ${workspace}/.local/node${i}/geth${i} --config ${workspace}/.local/node${i}/config.toml \ - --mine --vote --password ${workspace}/.local/node${i}/password.txt --unlock ${cons_addr} --miner.etherbase ${cons_addr} --blspassword ${workspace}/.local/node${i}/password.txt \ - --datadir ${workspace}/.local/node${i} \ - --nodekey ${workspace}/.local/node${i}/geth/nodekey \ - --rpc.allow-unprotected-txs --allow-insecure-unlock \ - --ws.addr 0.0.0.0 --ws.port ${WSPort} --http.addr 0.0.0.0 --http.port ${HTTPPort} --http.corsdomain "*" \ - --metrics --metrics.addr localhost --metrics.port ${MetricsPort} --metrics.expensive \ - --pprof --pprof.addr localhost --pprof.port ${PProfPort} \ - --gcmode ${gcmode} --syncmode full --monitor.maliciousvote \ - --rialtohash ${rialtoHash} --override.passedforktime ${PassedForkTime} --override.lorentz ${PassedForkTime} --override.maxwell ${LastHardforkTime} \ - --override.immutabilitythreshold ${FullImmutabilityThreshold} --override.breatheblockinterval ${BreatheBlockInterval} \ - --override.minforblobrequest ${MinBlocksForBlobRequests} --override.defaultextrareserve ${DefaultExtraReserveForBlobRequests} \ - >> ${workspace}/.local/node${i}/bsc-node.log 2>&1 & - - if [ ${EnableSentryNode} = true ]; then - cp ${workspace}/bin/geth ${workspace}/.local/sentry${i}/geth${i} - nohup ${workspace}/.local/sentry${i}/geth${i} --config ${workspace}/.local/sentry${i}/config.toml \ - --datadir ${workspace}/.local/sentry${i} \ - --nodekey ${workspace}/.local/sentry${i}/geth/nodekey \ + # Handle reth-bsc for first RETH_NODE_COUNT nodes, geth for others + if [ $i -lt $RETH_NODE_COUNT ]; then + # TODO: there are not supported flags, may support later + # --override.breatheblockinterval --override.minforblobrequest --MetricsPort + start_reth_bsc $i $HTTPPort $WSPort $PassedForkTime $LastHardforkTime $rialtoHash + else + # geth may be replaced + cp ${workspace}/bin/geth ${workspace}/.local/node${i}/geth${i} + # update `config` in genesis.json + # ${workspace}/.local/node${i}/geth${i} dumpgenesis --datadir ${workspace}/.local/node${i} | jq . > ${workspace}/.local/node${i}/genesis.json + # run BSC node + nohup ${workspace}/.local/node${i}/geth${i} --config ${workspace}/.local/node${i}/config.toml \ + --mine --vote --password ${workspace}/.local/node${i}/password.txt --unlock ${cons_addr} --miner.etherbase ${cons_addr} --blspassword ${workspace}/.local/node${i}/password.txt \ + --datadir ${workspace}/.local/node${i} \ + --nodekey ${workspace}/.local/node${i}/geth/nodekey \ --rpc.allow-unprotected-txs --allow-insecure-unlock \ - --ws.addr 0.0.0.0 --ws.port $((WSPort+1)) --http.addr 0.0.0.0 --http.port $((HTTPPort+1)) --http.corsdomain "*" \ - --metrics --metrics.addr localhost --metrics.port $((MetricsPort+1)) --metrics.expensive \ - --pprof --pprof.addr localhost --pprof.port $((PProfPort+1)) \ + --ws.addr 0.0.0.0 --ws.port ${WSPort} --http.addr 0.0.0.0 --http.port ${HTTPPort} --http.corsdomain "*" \ + --metrics --metrics.addr localhost --metrics.port ${MetricsPort} --metrics.expensive \ + --pprof --pprof.addr localhost --pprof.port ${PProfPort} \ --gcmode ${gcmode} --syncmode full --monitor.maliciousvote \ - --rialtohash ${rialtoHash} --override.passedforktime ${PassedForkTime} --override.lorentz ${PassedForkTime} --override.maxwell ${LastHardforkTime} \ + --rialtohash ${rialtoHash} --override.passedforktime ${PassedForkTime} --override.lorentz ${PassedForkTime} --override.maxwell ${PassedForkTime} --override.fermi ${LastHardforkTime} \ --override.immutabilitythreshold ${FullImmutabilityThreshold} --override.breatheblockinterval ${BreatheBlockInterval} \ --override.minforblobrequest ${MinBlocksForBlobRequests} --override.defaultextrareserve ${DefaultExtraReserveForBlobRequests} \ - >> ${workspace}/.local/sentry${i}/bsc-node.log 2>&1 & + >> ${workspace}/.local/node${i}/bsc-node.log 2>&1 & + + if [ ${EnableSentryNode} = true ]; then + cp ${workspace}/bin/geth ${workspace}/.local/sentry${i}/geth${i} + nohup ${workspace}/.local/sentry${i}/geth${i} --config ${workspace}/.local/sentry${i}/config.toml \ + --datadir ${workspace}/.local/sentry${i} \ + --nodekey ${workspace}/.local/sentry${i}/geth/nodekey \ + --rpc.allow-unprotected-txs --allow-insecure-unlock \ + --ws.addr 0.0.0.0 --ws.port $((WSPort+1)) --http.addr 0.0.0.0 --http.port $((HTTPPort+1)) --http.corsdomain "*" \ + --metrics --metrics.addr localhost --metrics.port $((MetricsPort+1)) --metrics.expensive \ + --pprof --pprof.addr localhost --pprof.port $((PProfPort+1)) \ + --gcmode ${gcmode} --syncmode full --monitor.maliciousvote \ + --rialtohash ${rialtoHash} --override.passedforktime ${PassedForkTime} --override.lorentz ${PassedForkTime} --override.maxwell ${PassedForkTime} --override.fermi ${LastHardforkTime} \ + --override.immutabilitythreshold ${FullImmutabilityThreshold} --override.breatheblockinterval ${BreatheBlockInterval} \ + --override.minforblobrequest ${MinBlocksForBlobRequests} --override.defaultextrareserve ${DefaultExtraReserveForBlobRequests} \ + >> ${workspace}/.local/sentry${i}/bsc-node.log 2>&1 & + fi fi done @@ -257,7 +488,7 @@ function native_start() { --metrics --metrics.addr localhost --metrics.port $((6160)) --metrics.expensive \ --pprof --pprof.addr localhost --pprof.port $((7160)) \ --gcmode ${gcmode} --syncmode full --monitor.maliciousvote \ - --rialtohash ${rialtoHash} --override.passedforktime ${PassedForkTime} --override.lorentz ${PassedForkTime} --override.maxwell ${LastHardforkTime} \ + --rialtohash ${rialtoHash} --override.passedforktime ${PassedForkTime} --override.lorentz ${PassedForkTime} --override.maxwell ${PassedForkTime} --override.fermi ${LastHardforkTime} \ --override.immutabilitythreshold ${FullImmutabilityThreshold} --override.breatheblockinterval ${BreatheBlockInterval} \ --override.minforblobrequest ${MinBlocksForBlobRequests} --override.defaultextrareserve ${DefaultExtraReserveForBlobRequests} \ >> ${workspace}/.local/fullnode0/bsc-node.log 2>&1 & @@ -278,6 +509,7 @@ CMD=$1 ValidatorIdx=$2 case ${CMD} in reset) + validate_reth_config exit_previous create_validator prepare_bsc_client @@ -288,12 +520,15 @@ reset) register_stakehub ;; stop) + validate_reth_config exit_previous $ValidatorIdx ;; start) + validate_reth_config native_start $ValidatorIdx ;; restart) + validate_reth_config exit_previous $ValidatorIdx native_start $ValidatorIdx ;; diff --git a/config.toml b/config.toml index f04fc064..cd2fde24 100644 --- a/config.toml +++ b/config.toml @@ -49,12 +49,12 @@ HTTPVirtualHosts = ["*"] HTTPModules = ["eth", "mev", "net", "web3", "txpool", "parlia", "debug"] WSHost = "0.0.0.0" WSPort = 8545 -EnableEVNFeatures = true +EnableEVNFeatures = false EnableQuickBlockFetching = true [Node.P2P] MaxPeers = 50 -NoDiscovery = false +NoDiscovery = true StaticNodes = [] TrustedNodes = [] EnableMsgEvents = false @@ -71,5 +71,5 @@ FilePath = "bsc.log" TimeFormat = "01-02|15:04:05.000" MaxBackups = 1000 MaxBytesSize = 10485760 -Level = "debug" -FileRoot = "" \ No newline at end of file +Level = "trace" +FileRoot = "" diff --git a/genesis b/genesis index 234e3685..83b5d2e8 160000 --- a/genesis +++ b/genesis @@ -1 +1 @@ -Subproject commit 234e3685ec309624f0fbef41043ae117caebc853 +Subproject commit 83b5d2e844ec37b9d878fdc5f6fad881e992a404 diff --git a/keys/fullnode-nodekey0 b/keys/fullnode-nodekey0 index 3038f664..ee317e83 100644 --- a/keys/fullnode-nodekey0 +++ b/keys/fullnode-nodekey0 @@ -1 +1 @@ -38ee53199449359bb8ed889ad36d1ffac343a6773974f2e7fdc701dfa63cb866 +38ee53199449359bb8ed889ad36d1ffac343a6773974f2e7fdc701dfa63cb866 \ No newline at end of file diff --git a/keys/sentry-nodekey0 b/keys/sentry-nodekey0 index 4579baca..7630419e 100644 --- a/keys/sentry-nodekey0 +++ b/keys/sentry-nodekey0 @@ -1 +1 @@ -95e1adf16e3389c7d629dcfd8d72654cb4b282205f0a8c865e073d402d50ad9d +95e1adf16e3389c7d629dcfd8d72654cb4b282205f0a8c865e073d402d50ad9d \ No newline at end of file diff --git a/keys/sentry-nodekey1 b/keys/sentry-nodekey1 index dc85e357..183c7b33 100644 --- a/keys/sentry-nodekey1 +++ b/keys/sentry-nodekey1 @@ -1 +1 @@ -707d9e51177f26efc6b1d4b30d7c32b6b1c3d425e9959b31bd6aba3070f53d23 +707d9e51177f26efc6b1d4b30d7c32b6b1c3d425e9959b31bd6aba3070f53d23 \ No newline at end of file diff --git a/keys/sentry-nodekey10 b/keys/sentry-nodekey10 index d0f2f887..6c6134d8 100644 --- a/keys/sentry-nodekey10 +++ b/keys/sentry-nodekey10 @@ -1 +1 @@ -0cd2100b0e6496a69837f5341c50bb631ef51b1b76b6f4f3ab6f5e666ec4ec1a +0cd2100b0e6496a69837f5341c50bb631ef51b1b76b6f4f3ab6f5e666ec4ec1a \ No newline at end of file diff --git a/keys/sentry-nodekey11 b/keys/sentry-nodekey11 index a1874dc8..3347a282 100644 --- a/keys/sentry-nodekey11 +++ b/keys/sentry-nodekey11 @@ -1 +1 @@ -b71bcd7ba2a904ebee94aa87fb13ffc6fc9a461d984f616c6f055e73b0c3473e +b71bcd7ba2a904ebee94aa87fb13ffc6fc9a461d984f616c6f055e73b0c3473e \ No newline at end of file diff --git a/keys/sentry-nodekey12 b/keys/sentry-nodekey12 index 3ec9cf5f..cb3836f2 100644 --- a/keys/sentry-nodekey12 +++ b/keys/sentry-nodekey12 @@ -1 +1 @@ -465cb81e7812b83fdc9313373ef23f8eb6a23cbab81e87e62df5473be450e37d +465cb81e7812b83fdc9313373ef23f8eb6a23cbab81e87e62df5473be450e37d \ No newline at end of file diff --git a/keys/sentry-nodekey13 b/keys/sentry-nodekey13 index b0e01107..fcb0f9b4 100644 --- a/keys/sentry-nodekey13 +++ b/keys/sentry-nodekey13 @@ -1 +1 @@ -3e850bcc57afb42ef11c32b6855243af6f9fe96dd0720e8056dc3a5f7fceda43 +3e850bcc57afb42ef11c32b6855243af6f9fe96dd0720e8056dc3a5f7fceda43 \ No newline at end of file diff --git a/keys/sentry-nodekey14 b/keys/sentry-nodekey14 index 12cd7ade..fc0f718b 100644 --- a/keys/sentry-nodekey14 +++ b/keys/sentry-nodekey14 @@ -1 +1 @@ -a35affb965fe1a4a146ce5bdce1ba5794b29b269d00df565c7aa52648199ebcd +a35affb965fe1a4a146ce5bdce1ba5794b29b269d00df565c7aa52648199ebcd \ No newline at end of file diff --git a/keys/sentry-nodekey15 b/keys/sentry-nodekey15 index 905b8a1a..1a2a1873 100644 --- a/keys/sentry-nodekey15 +++ b/keys/sentry-nodekey15 @@ -1 +1 @@ -4f5bc023a79c61ee3f797c328cb1245c7eb249204e2051dfcba1768994036d5f +4f5bc023a79c61ee3f797c328cb1245c7eb249204e2051dfcba1768994036d5f \ No newline at end of file diff --git a/keys/sentry-nodekey16 b/keys/sentry-nodekey16 index e883b690..812f316c 100644 --- a/keys/sentry-nodekey16 +++ b/keys/sentry-nodekey16 @@ -1 +1 @@ -ebb8ced217100f53e8da2e6f21516ccaa7b24c887d4a4af24fdbd375a12ac219 +ebb8ced217100f53e8da2e6f21516ccaa7b24c887d4a4af24fdbd375a12ac219 \ No newline at end of file diff --git a/keys/sentry-nodekey17 b/keys/sentry-nodekey17 index 597fa7ac..f512de81 100644 --- a/keys/sentry-nodekey17 +++ b/keys/sentry-nodekey17 @@ -1 +1 @@ -6de30003cb0d3a2cf13af1596526475b601f96496c29a70d6cfb3b713105f937 +6de30003cb0d3a2cf13af1596526475b601f96496c29a70d6cfb3b713105f937 \ No newline at end of file diff --git a/keys/sentry-nodekey18 b/keys/sentry-nodekey18 index 0dd753ba..39d70a4d 100644 --- a/keys/sentry-nodekey18 +++ b/keys/sentry-nodekey18 @@ -1 +1 @@ -676dd26b77a89fdb8d876067618269f91aa69147af12e68cafe1b2a542f3247c +676dd26b77a89fdb8d876067618269f91aa69147af12e68cafe1b2a542f3247c \ No newline at end of file diff --git a/keys/sentry-nodekey19 b/keys/sentry-nodekey19 index 7ce18e84..d31e02a8 100644 --- a/keys/sentry-nodekey19 +++ b/keys/sentry-nodekey19 @@ -1 +1 @@ -ad6ba7904ab1711e095f40248f5e57c7bdbdd9832e81e9c7db77fef1f0a9a446 +ad6ba7904ab1711e095f40248f5e57c7bdbdd9832e81e9c7db77fef1f0a9a446 \ No newline at end of file diff --git a/keys/sentry-nodekey2 b/keys/sentry-nodekey2 index ae22299b..0342ca35 100644 --- a/keys/sentry-nodekey2 +++ b/keys/sentry-nodekey2 @@ -1 +1 @@ -60c0693dd73e2af5aa9df71c30be244d4c8bb4951d151ac711e7e4ed7e1bc967 +60c0693dd73e2af5aa9df71c30be244d4c8bb4951d151ac711e7e4ed7e1bc967 \ No newline at end of file diff --git a/keys/sentry-nodekey20 b/keys/sentry-nodekey20 index e6f941f4..cafe067f 100644 --- a/keys/sentry-nodekey20 +++ b/keys/sentry-nodekey20 @@ -1 +1 @@ -01cebeb75161f138a1759ed147319b97c88d484564e671bb83a42af09409b5ea +01cebeb75161f138a1759ed147319b97c88d484564e671bb83a42af09409b5ea \ No newline at end of file diff --git a/keys/sentry-nodekey3 b/keys/sentry-nodekey3 index 7853352d..ecbe537f 100644 --- a/keys/sentry-nodekey3 +++ b/keys/sentry-nodekey3 @@ -1 +1 @@ -bb53363b430f749660edfaa8bd03e24fb2cece125cdc2b56c7034017d450d964 +bb53363b430f749660edfaa8bd03e24fb2cece125cdc2b56c7034017d450d964 \ No newline at end of file diff --git a/keys/sentry-nodekey4 b/keys/sentry-nodekey4 index 83484f19..7d9275e7 100644 --- a/keys/sentry-nodekey4 +++ b/keys/sentry-nodekey4 @@ -1 +1 @@ -ec511668be602cd1831a90e5a98d27c35a77900a1c21bfe1436f50b2612071a3 +ec511668be602cd1831a90e5a98d27c35a77900a1c21bfe1436f50b2612071a3 \ No newline at end of file diff --git a/keys/sentry-nodekey5 b/keys/sentry-nodekey5 index 224a8626..2a6460c3 100644 --- a/keys/sentry-nodekey5 +++ b/keys/sentry-nodekey5 @@ -1 +1 @@ -d8d1923ccc01caaff7fed17c48270c121b6dce70d3595e0d4697361febe6d1ad +d8d1923ccc01caaff7fed17c48270c121b6dce70d3595e0d4697361febe6d1ad \ No newline at end of file diff --git a/keys/sentry-nodekey6 b/keys/sentry-nodekey6 index 4c026d2a..65a43ed9 100644 --- a/keys/sentry-nodekey6 +++ b/keys/sentry-nodekey6 @@ -1 +1 @@ -1441ea48f0f867a709ddf8117b0d5a01170f8b8b1d98032f4f119041977208e6 +1441ea48f0f867a709ddf8117b0d5a01170f8b8b1d98032f4f119041977208e6 \ No newline at end of file diff --git a/keys/sentry-nodekey7 b/keys/sentry-nodekey7 index 147ab799..984f9590 100644 --- a/keys/sentry-nodekey7 +++ b/keys/sentry-nodekey7 @@ -1 +1 @@ -2ec0a028dac08a8f0e236d2ff8c5b9f547c9f6241e333ca653008212039ff2a5 +2ec0a028dac08a8f0e236d2ff8c5b9f547c9f6241e333ca653008212039ff2a5 \ No newline at end of file diff --git a/keys/sentry-nodekey8 b/keys/sentry-nodekey8 index 5d98ca52..53e06026 100644 --- a/keys/sentry-nodekey8 +++ b/keys/sentry-nodekey8 @@ -1 +1 @@ -ca5b9bb4e4bfa9062f080358d8ea9f6fef695c042660a6f1855574787623b974 +ca5b9bb4e4bfa9062f080358d8ea9f6fef695c042660a6f1855574787623b974 \ No newline at end of file diff --git a/keys/sentry-nodekey9 b/keys/sentry-nodekey9 index 7e7d9cd8..c443c5c7 100644 --- a/keys/sentry-nodekey9 +++ b/keys/sentry-nodekey9 @@ -1 +1 @@ -159412f1dc218c1a5c013bee3f4445155f23d2f2ecac86a2174f1cfca143fd7e +159412f1dc218c1a5c013bee3f4445155f23d2f2ecac86a2174f1cfca143fd7e \ No newline at end of file