Skip to content

Commit

Permalink
Add option to omit graffiti to use validator default (eth-educators#1165
Browse files Browse the repository at this point in the history
)
  • Loading branch information
nflaig authored Feb 8, 2023
1 parent 3231823 commit ecdc16a
Show file tree
Hide file tree
Showing 19 changed files with 64 additions and 25 deletions.
2 changes: 1 addition & 1 deletion default.env
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ MEV_BOOST=false
MEV_RELAYS=https://0xafa4c6985aa049fb79dd37010438cfebeb0f2bd42b115b89dd678dab0670c1de38da0c4e9138c9290a398ecd9a0b3110@builder-relay-goerli.flashbots.net,https://0x821f2a65afb70e7f2e820a925a9b4c80a159620582c1766b1b09729fec178b11ea22abb3a51f07b288be815a1a2ff516@bloxroute.max-profit.builder.goerli.blxrbdn.com,https://0x8f7b17a74569b7a57e9bdafd2e159380759f5dc3ccbd4bf600414147e8c4e1dc6ebada83c0139ac15850eb6c975e82d0@builder-relay-goerli.blocknative.com,https://0xaa1488eae4b06a1fff840a2b6db167afc520758dc2c8af0dfb57037954df3431b747e2f900fe8805f05d635e9a29717b@relay-goerli.edennetwork.io,https://0x8a72a5ec3e2909fff931c8b42c9e0e6c6e660ac48a98016777fc63a73316b3ffb5c622495106277f8dbcc17a06e92ca3@goerli-relay.securerpc.com/
# Set a minimum MEV bid (e.g. 0.05), used by mev-boost.yml. If empty, no minimum is used.
MEV_MIN_BID=
# Graffiti to use for validator
# Graffiti to use for validator, comment out line below to use default validator graffiti
GRAFFITI=🐼eth-docker🐼
# Merged network to use. If using main net, set to mainnet.
NETWORK=goerli
Expand Down
2 changes: 0 additions & 2 deletions lighthouse-vc-only.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ services:
- /var/lib/lighthouse
- --beacon-nodes
- ${CL_NODE:-http://consensus:5052}
- --graffiti
- ${GRAFFITI}
- --network
- ${NETWORK}
- --debug-level=${LOG_LEVEL}
Expand Down
2 changes: 0 additions & 2 deletions lighthouse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,6 @@ services:
- /var/lib/lighthouse
- --beacon-nodes
- ${CL_NODE:-http://consensus:5052}
- --graffiti
- ${GRAFFITI}
- --network
- ${NETWORK}
- --debug-level=${LOG_LEVEL}
Expand Down
10 changes: 9 additions & 1 deletion lighthouse/docker-entrypoint-vc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ if [ "$(id -u)" = '0' ]; then
exec gosu lhvalidator docker-entrypoint.sh "$@"
fi

# Check whether custom graffiti is set
if [ -v GRAFFITI ]; then
__graffiti="--graffiti ${GRAFFITI}"
echo "Custom graffiti was supplied in .env"
else
__graffiti=""
fi

# Check whether we should use MEV Boost
if [ "${MEV_BOOST}" = "true" ]; then
__mev_boost="--builder-proposals"
Expand All @@ -31,4 +39,4 @@ fi

# Word splitting is desired for the command line parameters
# shellcheck disable=SC2086
exec "$@" ${__mev_boost} ${__beacon_stats} ${__doppel} ${VC_EXTRAS}
exec "$@" ${__graffiti} ${__mev_boost} ${__beacon_stats} ${__doppel} ${VC_EXTRAS}
2 changes: 0 additions & 2 deletions lodestar-vc-only.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ services:
- "8009"
- --metrics.address
- 0.0.0.0
- --graffiti
- ${GRAFFITI}
- --logLevel
- ${LOG_LEVEL}
- --network
Expand Down
2 changes: 0 additions & 2 deletions lodestar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,6 @@ services:
- "8009"
- --metrics.address
- 0.0.0.0
- --graffiti
- ${GRAFFITI}
- --logLevel
- ${LOG_LEVEL}
- --network
Expand Down
10 changes: 9 additions & 1 deletion lodestar/docker-entrypoint-vc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ if [ "$(id -u)" = '0' ]; then
exec su-exec lsvalidator docker-entrypoint.sh "$@"
fi

# Check whether custom graffiti is set
if [ -v GRAFFITI ]; then
__graffiti="--graffiti ${GRAFFITI}"
echo "Custom graffiti was supplied in .env"
else
__graffiti=""
fi

# Check whether we should use MEV Boost
if [ "${MEV_BOOST}" = "true" ]; then
__mev_boost="--builder"
Expand All @@ -24,4 +32,4 @@ fi

# Word splitting is desired for the command line parameters
# shellcheck disable=SC2086
exec "$@" ${__mev_boost} ${__doppel} ${VC_EXTRAS}
exec "$@" ${__graffiti} ${__mev_boost} ${__doppel} ${VC_EXTRAS}
1 change: 0 additions & 1 deletion nimbus-cl-only.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ services:
- --network=${NETWORK}
- --web3-url=${EL_NODE}
- --jwt-secret=/var/lib/nimbus/ee-secret/jwtsecret
- --graffiti=${GRAFFITI}
- --rest
- --rest-address=0.0.0.0
- --rest-port=${CL_REST_PORT:-5052}
Expand Down
1 change: 0 additions & 1 deletion nimbus-vc-only.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ services:
- --data-dir=/var/lib/nimbus
- --non-interactive
- --beacon-node=${CL_NODE}
- --graffiti=${GRAFFITI}
- --metrics
- --metrics-port=8009
- --metrics-address=0.0.0.0
Expand Down
1 change: 0 additions & 1 deletion nimbus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ services:
- --network=${NETWORK}
- --web3-url=${EL_NODE}
- --jwt-secret=/var/lib/nimbus/ee-secret/jwtsecret
- --graffiti=${GRAFFITI}
- --rest
- --rest-address=0.0.0.0
- --rest-port=${CL_REST_PORT:-5052}
Expand Down
10 changes: 9 additions & 1 deletion nimbus/docker-entrypoint-vc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ if [ ! -f /var/lib/nimbus/api-token.txt ]; then
echo "$__token" > /var/lib/nimbus/api-token.txt
fi

# Check whether custom graffiti is set
if [ -v GRAFFITI ]; then
__graffiti="--graffiti=${GRAFFITI}"
echo "Custom graffiti was supplied in .env"
else
__graffiti=""
fi

# Check whether we should enable doppelganger protection
if [ "${DOPPELGANGER}" = "true" ]; then
__doppel=""
Expand All @@ -22,4 +30,4 @@ __log_level="--log-level=${LOG_LEVEL^^}"

# Word splitting is desired for the command line parameters
# shellcheck disable=SC2086
exec "$@" ${__log_level} ${__doppel} ${VC_EXTRAS}
exec "$@" ${__graffiti} ${__log_level} ${__doppel} ${VC_EXTRAS}
10 changes: 9 additions & 1 deletion nimbus/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ if [ -n "${RAPID_SYNC_URL:+x}" ] && [ ! -f "/var/lib/nimbus/setupdone" ]; then
fi
fi

# Check whether custom graffiti is set
if [ -v GRAFFITI ]; then
__graffiti="--graffiti=${GRAFFITI}"
echo "Custom graffiti was supplied in .env"
else
__graffiti=""
fi

# Check whether we should use MEV Boost
if [ "${MEV_BOOST}" = "true" ]; then
__mev_boost="--payload-builder=true --payload-builder-url=${MEV_NODE:-http://mev-boost:18550}"
Expand Down Expand Up @@ -62,4 +70,4 @@ fi

# Word splitting is desired for the command line parameters
# shellcheck disable=SC2086
exec "$@" ${__mev_boost} ${__log_level} ${__doppel} ${__prune} ${CL_EXTRAS} ${VC_EXTRAS}
exec "$@" ${__graffiti} ${__mev_boost} ${__log_level} ${__doppel} ${__prune} ${CL_EXTRAS} ${VC_EXTRAS}
2 changes: 0 additions & 2 deletions prysm-vc-only.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ services:
- /var/lib/prysm/
- --beacon-rpc-provider
- ${CL_NODE:-http://consensus:4000}
- --graffiti
- ${GRAFFITI}
- --verbosity
- ${LOG_LEVEL}
- --${NETWORK}
Expand Down
2 changes: 0 additions & 2 deletions prysm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,6 @@ services:
- /var/lib/prysm/
- --beacon-rpc-provider
- consensus:4000
- --graffiti
- ${GRAFFITI}
- --verbosity
- ${LOG_LEVEL}
- --${NETWORK}
Expand Down
10 changes: 9 additions & 1 deletion prysm/docker-entrypoint-vc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ if [ "$(id -u)" = '0' ]; then
exec gosu prysmvalidator docker-entrypoint.sh "$@"
fi

# Check whether custom graffiti is set
if [ -v GRAFFITI ]; then
__graffiti="--graffiti ${GRAFFITI}"
echo "Custom graffiti was supplied in .env"
else
__graffiti=""
fi

# Check whether we should use MEV Boost
if [ "${MEV_BOOST}" = "true" ]; then
__mev_boost="--enable-builder"
Expand All @@ -24,4 +32,4 @@ fi

# Word splitting is desired for the command line parameters
# shellcheck disable=SC2086
exec "$@" ${__mev_boost} ${__doppel} ${VC_EXTRAS}
exec "$@" ${__graffiti} ${__mev_boost} ${__doppel} ${VC_EXTRAS}
1 change: 0 additions & 1 deletion teku-vc-only.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ services:
- --log-destination=CONSOLE
- --network=auto
- --validator-keys=/var/lib/teku/validator-keys:/var/lib/teku/validator-passwords
- --validators-graffiti=${GRAFFITI}
- --validators-early-attestations-enabled=false
- --validator-api-enabled=true
- --validator-api-interface=0.0.0.0
Expand Down
1 change: 0 additions & 1 deletion teku.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ services:
- --p2p-peer-upper-bound=${CL_MAX_PEER_COUNT:-100}
- --p2p-peer-lower-bound=${CL_MIN_PEER_COUNT:-64}
- --validator-keys=/var/lib/teku/validator-keys:/var/lib/teku/validator-passwords
- --validators-graffiti=${GRAFFITI}
- --logging=${LOG_LEVEL}
- --rest-api-host-allowlist=*
- --rest-api-enabled=true
Expand Down
10 changes: 9 additions & 1 deletion teku/docker-entrypoint-vc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ if [ ! -f /var/lib/teku/teku-keyapi.keystore ]; then
openssl pkcs12 -export -in /var/lib/teku/teku-keyapi.crt -inkey /var/lib/teku/teku-keyapi.key -out /var/lib/teku/teku-keyapi.keystore -name teku-keyapi -passout pass:"$__password"
fi

# Check whether custom graffiti is set
if [ -v GRAFFITI ]; then
__graffiti="--validators-graffiti=${GRAFFITI}"
echo "Custom graffiti was supplied in .env"
else
__graffiti=""
fi

# Check whether we should use MEV Boost
if [ "${MEV_BOOST}" = "true" ]; then
__mev_boost="--validators-builder-registration-default-enabled"
Expand All @@ -34,4 +42,4 @@ fi

# Word splitting is desired for the command line parameters
# shellcheck disable=SC2086
exec "$@" ${__mev_boost} ${VC_EXTRAS}
exec "$@" ${__graffiti} ${__mev_boost} ${VC_EXTRAS}
10 changes: 9 additions & 1 deletion teku/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,14 @@ else
__rapid_sync=""
fi

# Check whether custom graffiti is set
if [ -v GRAFFITI ]; then
__graffiti="--validators-graffiti=${GRAFFITI}"
echo "Custom graffiti was supplied in .env"
else
__graffiti=""
fi

# Check whether we should use MEV Boost
if [ "${MEV_BOOST}" = "true" ]; then
__mev_boost="--validators-builder-registration-default-enabled --builder-endpoint=${MEV_NODE:-http://mev-boost:18550}"
Expand All @@ -75,4 +83,4 @@ fi

# Word splitting is desired for the command line parameters
# shellcheck disable=SC2086
exec "$@" ${__mev_boost} ${__rapid_sync} ${__prune} ${__beacon_stats} ${CL_EXTRAS} ${VC_EXTRAS}
exec "$@" ${__graffiti} ${__mev_boost} ${__rapid_sync} ${__prune} ${__beacon_stats} ${CL_EXTRAS} ${VC_EXTRAS}

0 comments on commit ecdc16a

Please sign in to comment.