Skip to content

Commit

Permalink
Updated erigon
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Dec 20, 2024
1 parent c458c91 commit 48b7224
Show file tree
Hide file tree
Showing 10 changed files with 65 additions and 75 deletions.
5 changes: 4 additions & 1 deletion clients/consensus/lighthouse/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ RUN apt-get update && \
clang \
libclang-dev \
cmake \
libpq-dev \
&& rm -rf /var/lib/apt/lists/*

# Install Rust and required dependencies
Expand All @@ -26,5 +27,7 @@ RUN git clone https://github.com/sigp/lighthouse.git && \
git checkout $LIGHTHOUSE_VERSION

WORKDIR /root/lighthouse
RUN . "$HOME/.cargo/env" && cargo build
RUN . "$HOME/.cargo/env" && cargo build --release --features portable && \
mkdir -p /root/bin && \
cp /root/lighthouse/target/release/lighthouse /root/bin/lighthouse

8 changes: 2 additions & 6 deletions clients/exec/erigon/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ghcr.io/blockjoy/node-base:866a6bb@sha256:7923a8832df1119faf8d56cb501764ad9edb5bba6f54a2382edd0b8a2385bda3
FROM node-base:latest

# Add build arguments for Cloudflare and Grafana push credentials
ARG CLOUDFLARE_API_KEY
Expand All @@ -25,9 +25,5 @@ RUN git clone https://github.com/erigontech/erigon.git && \
WORKDIR /root/erigon
RUN make erigon

RUN cp /root/erigon/build/bin/erigon /root/bin/erigon && \
rm -rf /root/erigon
RUN cp /root/erigon/build/bin/erigon /root/bin/erigon

COPY Caddyfile.template /var/lib/babel/templates/Caddyfile.template
COPY config-alloy.template /var/lib/babel/templates/config-alloy.template
COPY erigon.rhai /var/lib/babel/plugin/erigon.rhai
4 changes: 3 additions & 1 deletion clients/exec/reth/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,6 @@ RUN git clone https://github.com/paradigmxyz/reth.git && \

# Build reth with performance features
WORKDIR /root/reth
RUN . "$HOME/.cargo/env" && cargo build --profile maxperf
RUN . "$HOME/.cargo/env" && cargo build --profile maxperf && \
mkdir -p /root/bin && \
cp /root/reth/target/maxperf/reth /root/bin/reth
File renamed without changes.
23 changes: 21 additions & 2 deletions ethereum/ethereum-erigon/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
FROM ghcr.io/blockjoy/blockjoy-erigon:2.60.9-e1fce25@sha256:d02854883030ac8555bfc4529668ab7e842a2225b0806cee97128ecbdfa22d3b
FROM ethereum-erigon:latest as erigon-build

COPY ./main.rhai /var/lib/babel/plugin/
FROM lighthouse:latest AS lighthouse-build

FROM node-base:latest

ARG CLOUDFLARE_API_KEY
ARG GRAFANA_LOKI_BASICAUTH
ARG GRAFANA_PROM_BASICAUTH

ENV CLOUDFLARE_API_KEY=${CLOUDFLARE_API_KEY}
ENV GRAFANA_LOKI_BASICAUTH=${GRAFANA_LOKI_BASICAUTH}
ENV GRAFANA_PROM_BASICAUTH=${GRAFANA_PROM_BASICAUTH}

RUN mkdir -p /root/bin
COPY --from=erigon-build /root/bin/erigon /root/bin/
COPY --from=lighthouse-build /root/bin/lighthouse /root/bin/

COPY Caddyfile.template /var/lib/babel/templates/Caddyfile.template
COPY erigon.rhai /var/lib/babel/plugin/
COPY main.rhai /var/lib/babel/plugin/
COPY config-alloy.template /var/lib/babel/templates/config-alloy.template
70 changes: 13 additions & 57 deletions ethereum/ethereum-erigon/babel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,57 +6,30 @@ description: Ethereum Erigon node
visibility: public
protocol_key: ethereum
variants:
# The same protocol can have different implementations. This field let identify what implementation(s) has been used.
# Variant name may additional contain protocol network name e.g. "eth-mainnet".
# This value will be available in a Rhai runtime via `node_env().variant_key`.
- key: erigon-mainnet-archive
archive_pointers:
- pointer: !store_id ethereum-erigon-mainnet-archive-v1
- pointer: !store_id ethereum-erigon-mainnet-archive-v1
new_archive_properties: [ "tracing-api-on-value" ]
min_cpu: 8
min_memory_mb: 32000
- key: erigon-mainnet-full
min_cpu: 16
min_memory_mb: 65536
min_disk_gb: 5000
- key: erigon-sepolia-archive
archive_pointers:
- pointer: !store_id ethereum-erigon-sepolia-archive-v1
- pointer: !store_id ethereum-erigon-sepolia-archive-v1
new_archive_properties: [ "tracing-api-on-value" ]
- pointer: !store_id ethereum-erigon-mainnet-full-v1
- key: erigon-sepolia-full
min_cpu: 4
min_memory_mb: 16000
min_disk_gb: 2000
- key: erigon-goerli-archive
archive_pointers:
- pointer: !store_id ethereum-erigon-goerli-archive-v1
- pointer: !store_id ethereum-erigon-goerli-archive-v1
new_archive_properties: [ "tracing-api-on-value" ]
min_cpu: 4
min_memory_mb: 16000
min_disk_gb: 2000
- key: erigon-mainnet-full
archive_pointers:
- pointer: !store_id ethereum-erigon-mainnet-full-v1
- pointer: !combination_disallowed
new_archive_properties: [ "tracing-api-on-value" ]
min_cpu: 8
min_memory_mb: 32000
- pointer: !store_id ethereum-erigon-sepolia-full-v1
- key: erigon-mainnet-archive
min_cpu: 16
min_memory_mb: 65536
min_disk_gb: 5000
- key: erigon-sepolia-full
archive_pointers:
- pointer: !store_id ethereum-erigon-sepolia-full-v1
- pointer: !combination_disallowed
new_archive_properties: [ "tracing-api-on-value" ]
- pointer: !store_id ethereum-erigon-mainnet-archive-v1
- key: erigon-sepolia-archive
min_cpu: 4
min_memory_mb: 16000
min_disk_gb: 2000
- key: erigon-goerli-full
archive_pointers:
- pointer: !store_id ethereum-erigon-goerli-full-v1
- pointer: !combination_disallowed
new_archive_properties: [ "tracing-api-on-value" ]
min_cpu: 4
min_memory_mb: 16000
min_disk_gb: 2000
- pointer: !store_id ethereum-erigon-sepolia-archive-v1
firewall_config:
default_in: deny
default_out: allow
Expand Down Expand Up @@ -91,21 +64,4 @@ firewall_config:
name: P2P port 2
- port: 42069
name: Torrent port
properties:
- key: tracing-api
description: This enables or disables the tracing API
dynamic_value: false
default_value: off-value
ui_type: !switch
on:
value: on-value
impact:
new_archive: true
add_cpu: 3
add_memory_bytes: 10000000
add_disk_bytes: 10000000000
off:
value: off-value
impact: null
# Unique property key. Property value will be available in a Rhai runtime via `node_params().<key>` (e.g. `node_params().arbitrary_property`).
# It is required to be lower-kebab-case.
properties: []
File renamed without changes.
File renamed without changes.
12 changes: 6 additions & 6 deletions ethereum/ethereum-reth/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ ENV GRAFANA_LOKI_BASICAUTH=${GRAFANA_LOKI_BASICAUTH}
ENV GRAFANA_PROM_BASICAUTH=${GRAFANA_PROM_BASICAUTH}

RUN mkdir -p /root/bin
COPY --from=reth-build /root/reth/target/maxperf/reth /root/bin/
COPY --from=lighthouse-build /root/lighthouse/target/release/lighthouse /root/bin/
COPY --from=reth-build /root/bin/reth /root/bin/
COPY --from=lighthouse-build /root/bin/lighthouse /root/bin/

COPY ./Caddyfile.template /var/lib/babel/templates/
COPY ./reth.rhai /var/lib/babel/plugin/
COPY ./main.rhai /var/lib/babel/plugin/
COPY ./config-alloy.template /var/lib/babel/templates/config-alloy.template
COPY Caddyfile.template /var/lib/babel/templates/
COPY reth.rhai /var/lib/babel/plugin/
COPY main.rhai /var/lib/babel/plugin/
COPY config-alloy.template /var/lib/babel/templates/config-alloy.template
18 changes: 16 additions & 2 deletions ethereum/ethereum-reth/babel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,18 @@ variants:
min_disk_gb: 400
archive_pointers:
- pointer: !store_id ethereum-reth-sepolia-full-v1
- key: reth-mainnet-archive
min_cpu: 8
min_memory_mb: 16000
min_disk_gb: 4000
archive_pointers:
- pointer: !store_id ethereum-reth-mainnet-archive-v1
- key: reth-sepolia-archive
min_cpu: 4
min_memory_mb: 8000
min_disk_gb: 800
archive_pointers:
- pointer: !store_id ethereum-reth-sepolia-archive-v1
firewall_config:
default_in: deny
default_out: allow
Expand Down Expand Up @@ -48,6 +60,8 @@ firewall_config:
ports:
- port: 30303
name: P2P port
- port: 42069
name: Torrent port
- port: 9000
name: Metrics port
- port: 9001
name: Metrics port
properties: []

0 comments on commit 48b7224

Please sign in to comment.