Skip to content

Commit e599a68

Browse files
committed
Only using gas limit if present on the config
1 parent 0a688e1 commit e599a68

3 files changed

Lines changed: 24 additions & 9 deletions

File tree

install/scripts/start-bn.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,14 +172,17 @@ if [ "$CC_CLIENT" = "nimbus" ]; then
172172
--data-dir=/ethclient/nimbus \
173173
--tcp-port=$BN_P2P_PORT \
174174
--udp-port=$BN_P2P_PORT \
175-
--suggested-gas-limit=$BN_SUGGESTED_BLOCK_GAS_LIMIT \
176175
--web3-url=$EC_ENGINE_ENDPOINT \
177176
--rest \
178177
--rest-address=0.0.0.0 \
179178
--rest-port=${BN_API_PORT:-5052} \
180179
--jwt-secret=/secrets/jwtsecret \
181180
$BN_ADDITIONAL_FLAGS"
182181

182+
if [ ! -z "$BN_SUGGESTED_BLOCK_GAS_LIMIT" ]; then
183+
CMD="$CMD --suggested-gas-limit=$BN_SUGGESTED_BLOCK_GAS_LIMIT"
184+
fi
185+
183186
if [ ! -z "$MEV_BOOST_URL" ]; then
184187
CMD="$CMD --payload-builder --payload-builder-url=$MEV_BOOST_URL"
185188
fi
@@ -282,7 +285,6 @@ if [ "$CC_CLIENT" = "teku" ]; then
282285
--network=$TEKU_NETWORK \
283286
--data-path=/ethclient/teku \
284287
--p2p-port=$BN_P2P_PORT \
285-
--validators-builder-registration-default-gas-limit=$BN_SUGGESTED_BLOCK_GAS_LIMIT \
286288
--ee-endpoint=$EC_ENGINE_ENDPOINT \
287289
--rest-api-enabled \
288290
--rest-api-interface=0.0.0.0 \
@@ -296,6 +298,10 @@ if [ "$CC_CLIENT" = "teku" ]; then
296298
--validators-graffiti-client-append-format=DISABLED \
297299
$BN_ADDITIONAL_FLAGS"
298300

301+
if [ ! -z "$BN_SUGGESTED_BLOCK_GAS_LIMIT" ]; then
302+
CMD="$CMD --validators-builder-registration-default-gas-limit=$BN_SUGGESTED_BLOCK_GAS_LIMIT"
303+
fi
304+
299305
if [ "$TEKU_ARCHIVE_MODE" = "true" ]; then
300306
CMD="$CMD --data-storage-mode=archive"
301307
fi

install/scripts/start-ec.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ if [ "$CLIENT" = "geth" ]; then
9292
--pprof \
9393
$EC_ADDITIONAL_FLAGS"
9494

95-
if [ "$EC_SUGGESTED_BLOCK_GAS_LIMIT" -gt "0"]; then
95+
if [ ! -z "$EC_SUGGESTED_BLOCK_GAS_LIMIT" ]; then
9696
CMD="$CMD --miner.gaslimit $EC_SUGGESTED_BLOCK_GAS_LIMIT"
9797
fi
9898

@@ -183,7 +183,7 @@ if [ "$CLIENT" = "nethermind" ]; then
183183
--Pruning.FullPruningMemoryBudgetMb=$RP_NETHERMIND_FULL_PRUNE_MEMORY_BUDGET \
184184
$EC_ADDITIONAL_FLAGS"
185185

186-
if [ "$EC_SUGGESTED_BLOCK_GAS_LIMIT" -gt "0"]; then
186+
if [ ! -z "$EC_SUGGESTED_BLOCK_GAS_LIMIT" ]; then
187187
CMD="$CMD --Blocks.TargetBlockGasLimit $EC_SUGGESTED_BLOCK_GAS_LIMIT"
188188
fi
189189

@@ -274,7 +274,7 @@ if [ "$CLIENT" = "besu" ]; then
274274
--Xbonsai-full-flat-db-enabled=true \
275275
$EC_ADDITIONAL_FLAGS"
276276

277-
if [ "$EC_SUGGESTED_BLOCK_GAS_LIMIT" -gt "0"]; then
277+
if [ ! -z "$EC_SUGGESTED_BLOCK_GAS_LIMIT" ]; then
278278
CMD="$CMD --target-gas-limit=$EC_SUGGESTED_BLOCK_GAS_LIMIT"
279279
fi
280280

@@ -337,7 +337,7 @@ if [ "$CLIENT" = "reth" ]; then
337337
--authrpc.jwtsecret /secrets/jwtsecret \
338338
$EC_ADDITIONAL_FLAGS"
339339

340-
if [ "$EC_SUGGESTED_BLOCK_GAS_LIMIT" -gt "0"]; then
340+
if [ ! -z "$EC_SUGGESTED_BLOCK_GAS_LIMIT" ]; then
341341
CMD="$CMD --builder.gaslimit $EC_SUGGESTED_BLOCK_GAS_LIMIT"
342342
fi
343343

install/scripts/start-vc.sh

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,14 @@ if [ "$CC_CLIENT" = "lighthouse" ]; then
4545
--datadir /validators/lighthouse \
4646
--init-slashing-protection \
4747
--logfile-max-number 0 \
48-
--gas-limit $VC_SUGGESTED_BLOCK_GAS_LIMIT \
4948
--beacon-nodes $CC_URL_STRING \
5049
--suggested-fee-recipient $(cat /validators/$FEE_RECIPIENT_FILE) \
5150
$VC_ADDITIONAL_FLAGS"
5251

52+
if [ ! -z "$VC_SUGGESTED_BLOCK_GAS_LIMIT" ]; then
53+
CMD="$CMD --gas-limit $VC_SUGGESTED_BLOCK_GAS_LIMIT"
54+
fi
55+
5356
if [ "$DOPPELGANGER_DETECTION" = "true" ]; then
5457
CMD="$CMD --enable-doppelganger-protection"
5558
fi
@@ -94,10 +97,13 @@ if [ "$CC_CLIENT" = "lodestar" ]; then
9497
$FALLBACK_CC_STRING \
9598
--keystoresDir /validators/lodestar/validators \
9699
--secretsDir /validators/lodestar/secrets \
97-
--defaultGasLimit $VC_SUGGESTED_BLOCK_GAS_LIMIT \
98100
--suggestedFeeRecipient $(cat /validators/$FEE_RECIPIENT_FILE) \
99101
$VC_ADDITIONAL_FLAGS"
100102

103+
if [ ! -z "$VC_SUGGESTED_BLOCK_GAS_LIMIT" ]; then
104+
CMD="$CMD --defaultGasLimit $VC_SUGGESTED_BLOCK_GAS_LIMIT"
105+
fi
106+
101107
if [ "$DOPPELGANGER_DETECTION" = "true" ]; then
102108
CMD="$CMD --doppelgangerProtection"
103109
fi
@@ -181,10 +187,13 @@ if [ "$CC_CLIENT" = "prysm" ]; then
181187
--wallet-dir /validators/prysm-non-hd \
182188
--wallet-password-file /validators/prysm-non-hd/direct/accounts/secret \
183189
--beacon-rpc-provider $CC_URL_STRING \
184-
--suggested-gas-limit $VC_SUGGESTED_BLOCK_GAS_LIMIT \
185190
--suggested-fee-recipient $(cat /validators/$FEE_RECIPIENT_FILE) \
186191
$VC_ADDITIONAL_FLAGS"
187192

193+
if [ ! -z "$VC_SUGGESTED_BLOCK_GAS_LIMIT" ]; then
194+
CMD="$CMD --suggested-gas-limit=$VC_SUGGESTED_BLOCK_GAS_LIMIT"
195+
fi
196+
188197
if [ "$ENABLE_MEV_BOOST" = "true" ]; then
189198
CMD="$CMD --enable-builder"
190199
fi

0 commit comments

Comments
 (0)