diff --git a/cicd/devnet/start.sh b/cicd/devnet/start.sh index 385ccd49cc..23b0444986 100755 --- a/cicd/devnet/start.sh +++ b/cicd/devnet/start.sh @@ -77,6 +77,24 @@ else instance_ip=$INSTANCE_IP fi +sync_mode=full +if test -z "$SYNC_MODE" +then + echo "SYNC_MODE not set, default to full" #full or fast +else + echo "SYNC_MODE found, set to $SYNC_MODE" + sync_mode=$SYNC_MODE +fi + +gc_mode=archive +if test -z "$GC_MODE" +then + echo "GC_MODE not set, default to archive" #full or archive +else + echo "GC_MODE found, set to $GC_MODE" + gc_mode=$GC_MODE +fi + netstats="${NODE_NAME}-${wallet}-${instance_ip}:xinfin_xdpos_hybrid_network_stats@devnetstats.hashlabs.apothem.network:1999" @@ -86,9 +104,10 @@ echo "Starting nodes with $bootnodes ..." # Note: --gcmode=archive means node will store all historical data. This will lead to high memory usage. But sync mode require archive to sync # https://github.com/XinFinOrg/XDPoSChain/issues/268 -XDC --ethstats ${netstats} --gcmode archive \ +XDC --ethstats ${netstats} \ +--gcmode ${gc_mode} --syncmode ${sync_mode} \ --nat extip:${instance_ip} \ ---bootnodes ${bootnodes} --syncmode full \ +--bootnodes ${bootnodes} \ --datadir /work/xdcchain --networkid 551 \ --port $port --http --http-corsdomain "*" --http-addr 0.0.0.0 \ --http-port $rpc_port \ diff --git a/cicd/mainnet/start.sh b/cicd/mainnet/start.sh index 66bb772166..ff3b06e804 100755 --- a/cicd/mainnet/start.sh +++ b/cicd/mainnet/start.sh @@ -68,6 +68,24 @@ else ws_port=$WS_PORT fi +sync_mode=full +if test -z "$SYNC_MODE" +then + echo "SYNC_MODE not set, default to full" #full or fast +else + echo "SYNC_MODE found, set to $SYNC_MODE" + sync_mode=$SYNC_MODE +fi + +gc_mode=archive +if test -z "$GC_MODE" +then + echo "GC_MODE not set, default to archive" #full or archive +else + echo "GC_MODE found, set to $GC_MODE" + gc_mode=$GC_MODE +fi + INSTANCE_IP=$(curl https://checkip.amazonaws.com) netstats="${NODE_NAME}-${wallet}-${INSTANCE_IP}:xinfin_xdpos_hybrid_network_stats@stats.xinfin.network:3000" @@ -77,9 +95,10 @@ echo "Starting nodes with $bootnodes ..." # Note: --gcmode=archive means node will store all historical data. This will lead to high memory usage. But sync mode require archive to sync # https://github.com/XinFinOrg/XDPoSChain/issues/268 -XDC --ethstats ${netstats} --gcmode archive \ +XDC --ethstats ${netstats} \ +--gcmode ${gc_mode} --syncmode ${sync_mode} \ --nat extip:${INSTANCE_IP} \ ---bootnodes ${bootnodes} --syncmode full \ +--bootnodes ${bootnodes} \ --datadir /work/xdcchain --networkid 50 \ --port $port --http --http-corsdomain "*" --http-addr 0.0.0.0 \ --http-port $rpc_port \ diff --git a/cicd/testnet/start.sh b/cicd/testnet/start.sh index 6dbd47fbf2..634c001d00 100755 --- a/cicd/testnet/start.sh +++ b/cicd/testnet/start.sh @@ -69,6 +69,24 @@ else ws_port=$WS_PORT fi +sync_mode=full +if test -z "$SYNC_MODE" +then + echo "SYNC_MODE not set, default to full" #full or fast +else + echo "SYNC_MODE found, set to $SYNC_MODE" + sync_mode=$SYNC_MODE +fi + +gc_mode=archive +if test -z "$GC_MODE" +then + echo "GC_MODE not set, default to archive" #full or archive +else + echo "GC_MODE found, set to $GC_MODE" + gc_mode=$GC_MODE +fi + INSTANCE_IP=$(curl https://checkip.amazonaws.com) netstats="${NODE_NAME}-${wallet}-${INSTANCE_IP}:xdc_xinfin_apothem_network_stats@stats.apothem.network:2000" @@ -79,9 +97,10 @@ echo "Starting nodes with $bootnodes ..." # Note: --gcmode=archive means node will store all historical data. This will lead to high memory usage. But sync mode require archive to sync # https://github.com/XinFinOrg/XDPoSChain/issues/268 -XDC --ethstats ${netstats} --gcmode archive \ +XDC --ethstats ${netstats} \ +--gcmode ${gc_mode} --syncmode ${sync_mode} \ --nat extip:${INSTANCE_IP} \ ---bootnodes ${bootnodes} --syncmode full \ +--bootnodes ${bootnodes} \ --datadir /work/xdcchain --networkid 51 \ --port $port --http --http-corsdomain "*" --http-addr 0.0.0.0 \ --http-port $rpc_port \