File tree 6 files changed +28
-12
lines changed
6 files changed +28
-12
lines changed Original file line number Diff line number Diff line change @@ -75,13 +75,6 @@ EC_WS_PORT=8546
75
75
# GETH_CACHE=--cache=256
76
76
GETH_CACHE =
77
77
78
- # Erigon pruning mode. hrtc is maximum prune; this requires an Infura or other
79
- # 3rd-party temporarily while initial-syncing the consensus client, after which
80
- # Erigon can be used. htc is a partial prune, which doesn't require that dance
81
- # but takes considerably more disk space. Leaving the variable empty would
82
- # configure an archive node.
83
- ERIGON_PRUNE = hrtc
84
-
85
78
# Restart policy: Set to no if you do not want services to automatically restart
86
79
RESTART = unless-stopped
87
80
# If you want debug logs, set this to debug instead of info
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ services:
21
21
expose :
22
22
- 9090/tcp
23
23
entrypoint :
24
+ - docker-entrypoint.sh
24
25
- erigon
25
26
- --private.api.addr
26
27
- 0.0.0.0:9090
@@ -32,7 +33,7 @@ services:
32
33
- any
33
34
- --chain
34
35
- ${EC_NETWORK}
35
- - --prune=${ERIGON_PRUNE}
36
+ - --prune=hrtc
36
37
execution :
37
38
restart : " ${RESTART}"
38
39
image : erigon:local
Original file line number Diff line number Diff line change @@ -9,10 +9,12 @@ ARG UID=10001
9
9
10
10
USER root
11
11
12
- RUN apk --no-cache add shadow && groupmod -g "${UID}" erigon && usermod -u "${UID}" -g "${UID}" erigon
12
+ RUN apk --no-cache add shadow bash && groupmod -g "${UID}" erigon && usermod -u "${UID}" -g "${UID}" erigon
13
13
14
14
RUN mkdir -p /var/lib/erigon && chown -R erigon:erigon /var/lib/erigon
15
15
16
+ COPY ./docker-entrypoint.sh /usr/local/bin/
17
+
16
18
USER erigon
17
19
18
- ENTRYPOINT ["erigon"]
20
+ ENTRYPOINT ["docker-entrypoint.sh", " erigon"]
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ FROM alpine:latest
17
17
ARG USER=erigon
18
18
ARG UID=10001
19
19
20
- RUN apk add --no-cache libgcc libstdc++ ca-certificates tzdata
20
+ RUN apk add --no-cache libgcc libstdc++ bash ca-certificates tzdata
21
21
22
22
# See https://stackoverflow.com/a/55757473/12429735RUN
23
23
RUN adduser \
@@ -32,7 +32,8 @@ RUN mkdir -p /var/lib/erigon && chown ${USER}:${USER} /var/lib/erigon
32
32
# Copy executable
33
33
COPY --from=builder /src/erigon/build/bin/erigon /usr/local/bin/
34
34
COPY --from=builder /src/erigon/build/bin/rpcdaemon /usr/local/bin/
35
+ COPY ./docker-entrypoint.sh /usr/local/bin/
35
36
36
37
USER ${USER}
37
38
38
- ENTRYPOINT ["erigon"]
39
+ ENTRYPOINT ["docker-entrypoint.sh", " erigon"]
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ set -Eeuo pipefail
3
+
4
+ # Check for mainnet or goerli, and set prune accordingly
5
+
6
+ if [[ " $@ " =~ " --chain mainnet" ]]; then
7
+ echo " mainnet: Running with prune.r.before=11184524 for eth deposit contract"
8
+ exec " $@ " --prune.r.before=11184524
9
+ elif [[ " $@ " =~ " --chain goerli" ]]; then
10
+ echo " goerli: Running with prune.r.before=4367322 for eth deposit contract"
11
+ exec " $@ " --prune.r.before=4367322
12
+ else
13
+ echo " Unable to determine eth deposit contract, running without prune.r.before"
14
+ exec " $@ "
15
+ fi
Original file line number Diff line number Diff line change @@ -323,6 +323,7 @@ query_execution_client() {
323
323
" Which execution client do you want to run? Choose Custom for 3rd parties like Infura" 15 60 6 \
324
324
" NONE" " Custom" \
325
325
" geth.yml" " Geth (Go)" \
326
+ " erigon.yml" " Erigon (Go)" \
326
327
" nm.yml" " Nethermind (.NET)" \
327
328
" besu.yml" " Besu (Java)" 3>&1 1>&2 2>&3 )
328
329
fi
@@ -359,6 +360,9 @@ query_execution_client() {
359
360
query_grafana () {
360
361
if (whiptail --title " Select Option" --yesno --defaultno " Do you want to use Grafana dashboards?" 10 60) then
361
362
GRAFANA_CLIENT=$( echo $( echo " ${CONSENSUS_CLIENT} " | cut -d ' -' -f1) -grafana.yml:grafana-insecure.yml)
363
+ if [[ ${EXECUTION_CLIENT} == " geth.yml" || ${EXECUTION_CLIENT} == " erigon.yml" ]]; then
364
+ GRAFANA_CLIENT=${GRAFANA_CLIENT} :$( echo $( echo " ${EXECUTION_CLIENT} " | cut -d ' .' -f1) -grafana.yml)
365
+ fi
362
366
else
363
367
unset GRAFANA_CLIENT
364
368
fi
You can’t perform that action at this time.
0 commit comments