Skip to content

Commit

Permalink
Where we're going, we won't need to override TTD
Browse files Browse the repository at this point in the history
  • Loading branch information
yorickdowne committed Oct 5, 2022
1 parent 30682a5 commit 902be86
Showing 29 changed files with 16 additions and 158 deletions.
1 change: 0 additions & 1 deletion akula.yml
Original file line number Diff line number Diff line change
@@ -25,7 +25,6 @@ services:
- jwtsecret:/var/lib/akula/ee-secret
environment:
- JWT_SECRET=${JWT_SECRET}
- OVERRIDE_TTD=${OVERRIDE_TTD}
- LOG_LEVEL=${LOG_LEVEL}
ports:
- ${HOST_IP:-0.0.0.0}:${EL_P2P_PORT:-30303}:${EL_P2P_PORT:-30303}/tcp
11 changes: 1 addition & 10 deletions akula/docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -26,15 +26,6 @@ if [[ -O "/var/lib/akula/ee-secret/jwtsecret" ]]; then
chmod 666 /var/lib/akula/ee-secret/jwtsecret
fi

# Check whether we should override TTD
# This is not possible in Akula presently!
#if [ -n "${OVERRIDE_TTD}" ]; then
# __override_ttd="--override.terminaltotaldifficulty=${OVERRIDE_TTD}"
# echo "Overriding TTD to ${OVERRIDE_TTD}"
#else
# __override_ttd=""
#fi

# Check for network, and set prune accordingly
# This is not possible in Akula presently!
if false; then
@@ -84,5 +75,5 @@ case ${LOG_LEVEL} in
esac
fi

#exec "$@" ${__prune} ${__verbosity} ${__override_ttd}
#exec "$@" ${__prune} ${__verbosity}
exec "$@"
1 change: 0 additions & 1 deletion besu.yml
Original file line number Diff line number Diff line change
@@ -22,7 +22,6 @@ services:
environment:
- JAVA_OPTS=${BESU_HEAP:--XX:SoftMaxHeapSize=3g -Xmx5g}
- JWT_SECRET=${JWT_SECRET}
- OVERRIDE_TTD=${OVERRIDE_TTD}
volumes:
- besu-eth1-data:/var/lib/besu
- /etc/localtime:/etc/localtime:ro
10 changes: 1 addition & 9 deletions besu/docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -26,12 +26,4 @@ if [[ -O "/var/lib/besu/ee-secret/jwtsecret" ]]; then
chmod 666 /var/lib/besu/ee-secret/jwtsecret
fi

# Check whether we should override TTD
if [ -n "${OVERRIDE_TTD}" ]; then
__override_ttd="--override-genesis-config=terminalTotalDifficulty=${OVERRIDE_TTD}"
echo "Overriding TTD to ${OVERRIDE_TTD}"
else
__override_ttd=""
fi

exec "$@" ${__override_ttd}
exec "$@"
3 changes: 0 additions & 3 deletions default.env
Original file line number Diff line number Diff line change
@@ -117,9 +117,6 @@ EL_NODE=http://execution:8551
CL_NODE=http://consensus:5052
# MEV-boost address. This would only be changed for Vouch setups
MEV_NODE=http://mev-boost:18550
# Override TTD - may be required during testnet launch.
# If left empty, the client's built-in TTD is used
OVERRIDE_TTD=

# You can set specific version targets and choose binary or compiled from source builds below,
# via "Dockerfile.binary" or "Dockerfile.source"
3 changes: 1 addition & 2 deletions erigon.yml
Original file line number Diff line number Diff line change
@@ -21,7 +21,6 @@ services:
user: erigon
environment:
- JWT_SECRET=${JWT_SECRET}
- OVERRIDE_TTD=${OVERRIDE_TTD}
- LOG_LEVEL=${LOG_LEVEL}
volumes:
- erigon-el-data:/var/lib/erigon
@@ -77,7 +76,7 @@ services:
- /var/lib/erigon/ee-secret/jwtsecret
- --maxpeers
- ${EL_MAX_PEER_COUNT:-100}
# Workaround for high memory use in alpha
# Reduce memory use so it fits into 16 GiB machines
- --batchSize
- 128m
command: ${EL_EXTRAS}
10 changes: 1 addition & 9 deletions erigon/docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -26,14 +26,6 @@ if [[ -O "/var/lib/erigon/ee-secret/jwtsecret" ]]; then
chmod 666 /var/lib/erigon/ee-secret/jwtsecret
fi

# Check whether we should override TTD
if [ -n "${OVERRIDE_TTD}" ]; then
__override_ttd="--override.terminaltotaldifficulty=${OVERRIDE_TTD}"
echo "Overriding TTD to ${OVERRIDE_TTD}"
else
__override_ttd=""
fi

# Check for network, and set prune accordingly

if [[ "$@" =~ "--chain mainnet" ]]; then
@@ -78,4 +70,4 @@ case ${LOG_LEVEL} in
;;
esac

exec "$@" ${__prune} ${__verbosity} ${__override_ttd}
exec "$@" ${__prune} ${__verbosity}
36 changes: 1 addition & 35 deletions ethd
Original file line number Diff line number Diff line change
@@ -370,7 +370,7 @@ envmigrate() {
return
fi

ALL_VARS=( COMPOSE_FILE FEE_RECIPIENT EL_NODE GRAFFITI NETWORK MEV_BOOST MEV_RELAYS MEV_NODE OVERRIDE_TTD \
ALL_VARS=( COMPOSE_FILE FEE_RECIPIENT EL_NODE GRAFFITI NETWORK MEV_BOOST MEV_RELAYS MEV_NODE \
CL_MAX_PEER_COUNT CL_MIN_PEER_COUNT EL_MAX_PEER_COUNT EL_MIN_PEER_COUNT DOMAIN ACME_EMAIL \
CF_EMAIL CF_API_TOKEN AWS_PROFILE AWS_HOSTED_ZONE_ID GRAFANA_HOST DISTRIBUTED BESU_HEAP TEKU_HEAP \
PROM_HOST HOST_IP PRYSM_HOST EE_HOST EL_HOST EL_LB EL_WS_HOST EL_WS_LB CL_HOST CL_LB DDNS_SUBDOMAIN \
@@ -1233,38 +1233,6 @@ query_coinbase() {
done
}

query_override() {
if ! (whiptail --title "Select Option" --yesno --defaultno "Do you want to set an Override TTD?" 10 60) then
OVERRIDE_TTD=""
return
fi

case "${NETWORK}" in
"sepolia")
OVERRIDE_TTD=17000000000000000
;;
"goerli")
OVERRIDE_TTD=10790000
;;
"mainnet")
OVERRIDE_TTD=58750000000000000000000
;;
*)
OVERRIDE_TTD=100000000000000000000000
;;
esac

OVERRIDE_TTD=$(whiptail --title "Configure Override TTD" --inputbox "What is the override TTD for the ${NETWORK} network? Set as EMPTY to use the client default (right-click to paste)" 10 60 ${OVERRIDE_TTD} 3>&1 1>&2 2>&3)

exitstatus=$?
if [ $exitstatus -eq 0 ]; then
echo "Your override TTD for ${NETWORK} is:" $OVERRIDE_TTD
else
echo "You chose Cancel."
exit 0
fi
}

query_mev() {
var="MEV_BOOST"
value=$(sed -n -e "s/^${var}=\(.*\)/\1/p" ".env" || true)
@@ -1420,8 +1388,6 @@ config() {
set_value_in_env
var=NETWORK
set_value_in_env
var=OVERRIDE_TTD
set_value_in_env
var=MEV_BOOST
set_value_in_env
var=MEV_RELAYS
1 change: 0 additions & 1 deletion geth.yml
Original file line number Diff line number Diff line change
@@ -21,7 +21,6 @@ services:
user: geth
environment:
- JWT_SECRET=${JWT_SECRET}
- OVERRIDE_TTD=${OVERRIDE_TTD}
- LOG_LEVEL=${LOG_LEVEL}
volumes:
- geth-eth1-data:/var/lib/goethereum
10 changes: 1 addition & 9 deletions geth/docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -25,14 +25,6 @@ if [[ -O "/var/lib/goethereum/ee-secret/jwtsecret" ]]; then
chmod 666 /var/lib/goethereum/ee-secret/jwtsecret
fi

# Check whether we should override TTD
if [ -n "${OVERRIDE_TTD}" ]; then
__override_ttd="--override.terminaltotaldifficulty=${OVERRIDE_TTD}"
echo "Overriding TTD to ${OVERRIDE_TTD}"
else
__override_ttd=""
fi

# Set verbosity
shopt -s nocasematch
case ${LOG_LEVEL} in
@@ -61,5 +53,5 @@ if [ -f /var/lib/goethereum/prune-marker ]; then
"$@" snapshot prune-state
rm -f /var/lib/goethereum/prune-marker
else
exec "$@" ${__override_ttd} ${__verbosity}
exec "$@" ${__verbosity}
fi
1 change: 0 additions & 1 deletion lighthouse-cl-only.yml
Original file line number Diff line number Diff line change
@@ -26,7 +26,6 @@ services:
environment:
- RAPID_SYNC_URL=${RAPID_SYNC_URL}
- JWT_SECRET=${JWT_SECRET}
- OVERRIDE_TTD=${OVERRIDE_TTD}
- MEV_BOOST=${MEV_BOOST}
- MEV_NODE=${MEV_NODE}
- BEACON_STATS_API=${BEACON_STATS_API}
1 change: 0 additions & 1 deletion lighthouse-vc-only.yml
Original file line number Diff line number Diff line change
@@ -19,7 +19,6 @@ services:
image: lighthouse:local
user: lhvalidator
environment:
- OVERRIDE_TTD=${OVERRIDE_TTD}
- MEV_BOOST=${MEV_BOOST}
- BEACON_STATS_API=${BEACON_STATS_API}
- BEACON_STATS_MACHINE=${BEACON_STATS_MACHINE}
2 changes: 0 additions & 2 deletions lighthouse.yml
Original file line number Diff line number Diff line change
@@ -26,7 +26,6 @@ services:
environment:
- RAPID_SYNC_URL=${RAPID_SYNC_URL}
- JWT_SECRET=${JWT_SECRET}
- OVERRIDE_TTD=${OVERRIDE_TTD}
- MEV_BOOST=${MEV_BOOST}
- MEV_NODE=${MEV_NODE}
- BEACON_STATS_API=${BEACON_STATS_API}
@@ -78,7 +77,6 @@ services:
image: lighthouse:local
user: lhvalidator
environment:
- OVERRIDE_TTD=${OVERRIDE_TTD}
- MEV_BOOST=${MEV_BOOST}
- BEACON_STATS_API=${BEACON_STATS_API}
- BEACON_STATS_MACHINE=${BEACON_STATS_MACHINE}
9 changes: 1 addition & 8 deletions lighthouse/docker-entrypoint-vc.sh
Original file line number Diff line number Diff line change
@@ -6,13 +6,6 @@ if [ "$(id -u)" = '0' ]; then
exec gosu lhvalidator docker-entrypoint.sh "$@"
fi

# Check whether we should flag override TTD in VC logs
if [ -n "${OVERRIDE_TTD}" ]; then
__override_ttd="--terminal-total-difficulty-override=${OVERRIDE_TTD}"
else
__override_ttd=""
fi

# Check whether we should use MEV Boost
if [ "${MEV_BOOST}" = "true" ]; then
__mev_boost="--builder-proposals"
@@ -36,4 +29,4 @@ else
__doppel=""
fi

exec "$@" ${__mev_boost} ${__beacon_stats} ${__override_ttd} ${__doppel}
exec "$@" ${__mev_boost} ${__beacon_stats} ${__doppel}
10 changes: 1 addition & 9 deletions lighthouse/docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -27,14 +27,6 @@ else
__rapid_sync=""
fi

# Check whether we should override TTD
if [ -n "${OVERRIDE_TTD}" ]; then
__override_ttd="--terminal-total-difficulty-override=${OVERRIDE_TTD}"
echo "Overriding TTD to ${OVERRIDE_TTD}"
else
__override_ttd=""
fi

# Check whether we should use MEV Boost
if [ "${MEV_BOOST}" = "true" ]; then
__mev_boost="--builder ${MEV_NODE:-http://mev-boost:18550}"
@@ -51,4 +43,4 @@ else
__beacon_stats=""
fi

exec "$@" ${__mev_boost} ${__rapid_sync} ${__beacon_stats} ${__override_ttd}
exec "$@" ${__mev_boost} ${__rapid_sync} ${__beacon_stats}
1 change: 0 additions & 1 deletion lodestar-cl-only.yml
Original file line number Diff line number Diff line change
@@ -26,7 +26,6 @@ services:
environment:
- RAPID_SYNC_URL=${RAPID_SYNC_URL}
- JWT_SECRET=${JWT_SECRET}
- OVERRIDE_TTD=${OVERRIDE_TTD}
- MEV_BOOST=${MEV_BOOST}
- MEV_NODE=${MEV_NODE}
ports:
1 change: 0 additions & 1 deletion lodestar.yml
Original file line number Diff line number Diff line change
@@ -26,7 +26,6 @@ services:
environment:
- RAPID_SYNC_URL=${RAPID_SYNC_URL}
- JWT_SECRET=${JWT_SECRET}
- OVERRIDE_TTD=${OVERRIDE_TTD}
- MEV_BOOST=${MEV_BOOST}
- MEV_NODE=${MEV_NODE}
ports:
10 changes: 1 addition & 9 deletions lodestar/docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -23,14 +23,6 @@ if [[ -O "/var/lib/lodestar/consensus/ee-secret/jwtsecret" ]]; then
chmod 666 /var/lib/lodestar/consensus/ee-secret/jwtsecret
fi

# Check whether we should override TTD
if [ -n "${OVERRIDE_TTD}" ]; then
__override_ttd="--terminal-total-difficulty-override=${OVERRIDE_TTD}"
echo "Overriding TTD to ${OVERRIDE_TTD}"
else
__override_ttd=""
fi

# Check whether we should use MEV Boost
if [ "${MEV_BOOST}" = "true" ]; then
__mev_boost="--builder --builder.urls=${MEV_NODE:-http://mev-boost:18550}"
@@ -47,4 +39,4 @@ else
__rapid_sync=""
fi

exec "$@" ${__mev_boost} ${__rapid_sync} ${__override_ttd}
exec "$@" ${__mev_boost} ${__rapid_sync}
1 change: 0 additions & 1 deletion nethermind.yml
Original file line number Diff line number Diff line change
@@ -22,7 +22,6 @@ services:
user: nethermind
environment:
- JWT_SECRET=${JWT_SECRET}
- OVERRIDE_TTD=${OVERRIDE_TTD}
volumes:
- nm-eth1-data:/var/lib/nethermind
- /etc/localtime:/etc/localtime:ro
10 changes: 1 addition & 9 deletions nethermind/docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -54,12 +54,4 @@ if [[ -O "/var/lib/nethermind/ee-secret/jwtsecret" ]]; then
chmod 666 /var/lib/nethermind/ee-secret/jwtsecret
fi

# Check whether we should override TTD
if [ -n "${OVERRIDE_TTD}" ]; then
__override_ttd="--Merge.TerminalTotalDifficulty ${OVERRIDE_TTD}"
echo "Overriding TTD to ${OVERRIDE_TTD}"
else
__override_ttd=""
fi

exec "$@" ${__override_ttd}
exec "$@"
1 change: 0 additions & 1 deletion nimbus-cl-only.yml
Original file line number Diff line number Diff line change
@@ -27,7 +27,6 @@ services:
- RAPID_SYNC_URL=${RAPID_SYNC_URL}
- NETWORK=${NETWORK}
- JWT_SECRET=${JWT_SECRET}
- OVERRIDE_TTD=${OVERRIDE_TTD}
- MEV_BOOST=${MEV_BOOST}
- MEV_NODE=${MEV_NODE}
ports:
1 change: 0 additions & 1 deletion nimbus.yml
Original file line number Diff line number Diff line change
@@ -27,7 +27,6 @@ services:
- RAPID_SYNC_URL=${RAPID_SYNC_URL}
- NETWORK=${NETWORK}
- JWT_SECRET=${JWT_SECRET}
- OVERRIDE_TTD=${OVERRIDE_TTD}
- MEV_BOOST=${MEV_BOOST}
- MEV_NODE=${MEV_NODE}
- DOPPELGANGER=${DOPPELGANGER}
10 changes: 1 addition & 9 deletions nimbus/docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -23,14 +23,6 @@ if [[ -O "/var/lib/nimbus/ee-secret/jwtsecret" ]]; then
chmod 666 /var/lib/nimbus/ee-secret/jwtsecret
fi

# Check whether we should override TTD
if [ -n "${OVERRIDE_TTD}" ]; then
__override_ttd="--terminal-total-difficulty-override=${OVERRIDE_TTD}"
echo "Overriding TTD to ${OVERRIDE_TTD}"
else
__override_ttd=""
fi

if [ -n "${RAPID_SYNC_URL:+x}" -a ! -f "/var/lib/nimbus/setupdone" ]; then
echo "Starting checkpoint sync. Nimbus will restart when done."
/usr/local/bin/nimbus_beacon_node trustedNodeSync --backfill=false --network=${NETWORK} --data-dir=/var/lib/nimbus --trusted-node-url=${RAPID_SYNC_URL} ${__override_ttd}
@@ -53,4 +45,4 @@ else
__doppel="--doppelganger-detection=false"
fi

exec "$@" ${__mev_boost} ${__override_ttd} ${__doppel}
exec "$@" ${__mev_boost} ${__doppel}
1 change: 0 additions & 1 deletion prysm-cl-only.yml
Original file line number Diff line number Diff line change
@@ -30,7 +30,6 @@ services:
environment:
- RAPID_SYNC_URL=${RAPID_SYNC_URL}
- JWT_SECRET=${JWT_SECRET}
- OVERRIDE_TTD=${OVERRIDE_TTD}
- MEV_BOOST=${MEV_BOOST}
- MEV_NODE=${MEV_NODE}
ports:
1 change: 0 additions & 1 deletion prysm.yml
Original file line number Diff line number Diff line change
@@ -30,7 +30,6 @@ services:
environment:
- RAPID_SYNC_URL=${RAPID_SYNC_URL}
- JWT_SECRET=${JWT_SECRET}
- OVERRIDE_TTD=${OVERRIDE_TTD}
- MEV_BOOST=${MEV_BOOST}
- MEV_NODE=${MEV_NODE}
ports:
Loading

0 comments on commit 902be86

Please sign in to comment.