Skip to content

Commit

Permalink
Merge pull request eth-educators#272 from yorickdowne/main
Browse files Browse the repository at this point in the history
Fixed Teku rapid sync when using Grafana
  • Loading branch information
yorickdowne authored Jul 21, 2021
2 parents 0eaaf2d + 5af24ee commit 265cc54
Show file tree
Hide file tree
Showing 7 changed files with 115 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ If we've helped you out, in-person or by creating this project, a tip will be ve

# Version

This is eth-docker v1.4.1.1
This is eth-docker v1.4.1.2
2 changes: 1 addition & 1 deletion default.env
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ DDNS_PROXY=true

# Teku rapid sync via initial state. Please create an Infura eth2/beacon project first, then replace the {projectid} and {secret} here
# and use this line instead of the empty one
#TEKU_RAPID_SYNC=--initial-state https://{projectid}:{secret}@eth2-beacon-${NETWORK}.infura.io/eth/v1/debug/beacon/states/finalized
#TEKU_RAPID_SYNC=--initial-state=https://{projectid}:{secret}@eth2-beacon-${NETWORK}.infura.io/eth/v1/debug/beacon/states/finalized
TEKU_RAPID_SYNC=

# Consensus client address. This could be comma-separated for Lighthouse, with Infura as failover,
Expand Down
2 changes: 1 addition & 1 deletion ethd
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ config () {
if [[ "${CONSENSUS_CLIENT}" == "teku-base.yml" ]]; then
if (whiptail --title "Select Option" --yesno "Do you want to use Teku rapid sync with remote beacon, e.g. Infura?" 10 60) then
query_remote_beacon
TEKU_RAPID_SYNC="--initial-state ${REMOTE_BEACON}/eth/v1/debug/beacon/states/finalized"
TEKU_RAPID_SYNC="--initial-state=${REMOTE_BEACON}/eth/v1/debug/beacon/states/finalized"
else
TEKU_RAPID_SYNC=""
fi
Expand Down
61 changes: 61 additions & 0 deletions teku-base-notz.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
version: "3.4"
services:
consensus:
restart: "${RESTART}"
build:
context: ./teku
args:
- BUILD_TARGET=${TEKU_SRC_BUILD_TARGET}
- DOCKER_TAG=${TEKU_DOCKER_TAG}
dockerfile: ${TEKU_DOCKERFILE}
image: teku:local
stop_grace_period: 1m
volumes:
- teku-data:/var/lib/teku
environment:
- JAVA_OPTS=-XX:SoftMaxHeapSize=2g -Xmx4g
ports:
- ${TEKU_PORT}:${TEKU_PORT}/tcp
- ${TEKU_PORT}:${TEKU_PORT}/udp
entrypoint:
- docker-entrypoint.sh
- /opt/teku/bin/teku
- --data-path=/var/lib/teku
- --log-destination=CONSOLE
- --network=${NETWORK}
- --eth1-endpoints=${EC_NODE}
- --eth1-deposit-contract-max-request-size=150
- --p2p-port=${TEKU_PORT}
- --p2p-peer-upper-bound=${TEKU_PEER_COUNT}
- --validators-keystore-locking-enabled=true
- --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
command: ${TEKU_RAPID_SYNC}
validator-import:
restart: "no"
image: teku:local
volumes:
- teku-data:/var/lib/teku
- ${DEPCLI_LOCALDIR}/validator_keys:/validator_keys
entrypoint: validator-import.sh
validator-exit:
restart: "no"
image: teku:local
user: teku
volumes:
- teku-data:/var/lib/teku
entrypoint:
- /opt/teku/bin/teku
- voluntary-exit
- --beacon-node-api-endpoint=http://consensus:5051
- --validator-keys=/var/lib/teku/validator-keys:/var/lib/teku/validator-passwords
eth:
image: tianon/true
restart: "no"
depends_on:
- consensus
volumes:
teku-data:
1 change: 1 addition & 0 deletions teku-base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ services:
- --log-destination=CONSOLE
- --network=${NETWORK}
- --eth1-endpoints=${ETH1_NODE}${EC_NODE}
- --eth1-deposit-contract-max-request-size=150
- --p2p-port=${TEKU_PORT}
- --p2p-peer-upper-bound=${TEKU_PEER_COUNT}
- --validators-keystore-locking-enabled=true
Expand Down
1 change: 1 addition & 0 deletions teku-consensus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ services:
- --log-destination=CONSOLE
- --network=${NETWORK}
- --eth1-endpoints=${EC_NODE}
- --eth1-deposit-contract-max-request-size=150
- --p2p-port=${TEKU_PORT}
- --p2p-peer-upper-bound=${TEKU_PEER_COUNT}
- --logging=${LOG_LEVEL}
Expand Down
49 changes: 49 additions & 0 deletions teku-validator-notz.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
version: "3.4"
services:
validator:
restart: "${RESTART}"
build:
context: ./teku
args:
- BUILD_TARGET=${TEKU_SRC_BUILD_TARGET}
- DOCKER_TAG=${TEKU_DOCKER_TAG}
dockerfile: ${TEKU_DOCKERFILE}
image: teku:local
volumes:
- teku-data:/var/lib/teku
entrypoint:
- docker-entrypoint.sh
- /opt/teku/bin/teku
- validator-client
- --beacon-node-api-endpoint=${CC_NODE}
- --data-path=/var/lib/teku
- --log-destination=CONSOLE
- --network=${NETWORK}
- --validators-keystore-locking-enabled=true
- --validator-keys=/var/lib/teku/validator-keys:/var/lib/teku/validator-passwords
- --validators-graffiti=${GRAFFITI}
validator-import:
restart: "no"
image: teku:local
volumes:
- teku-data:/var/lib/teku
- ${DEPCLI_LOCALDIR}/validator_keys:/validator_keys
entrypoint: validator-import.sh
validator-exit:
restart: "no"
image: teku:local
user: teku
volumes:
- teku-data:/var/lib/teku
entrypoint:
- /opt/teku/bin/teku
- voluntary-exit
- --beacon-node-api-endpoint=${CC_NODE}
- --validator-keys=/var/lib/teku/validator-keys:/var/lib/teku/validator-passwords
eth:
image: tianon/true
restart: "no"
depends_on:
- validator
volumes:
teku-data:

0 comments on commit 265cc54

Please sign in to comment.