From 64f9e2d2623222019b2a2bf97cd28e6e3ef5f436 Mon Sep 17 00:00:00 2001 From: Thomas E Lackey Date: Thu, 25 May 2023 01:30:51 -0500 Subject: [PATCH] Use pre-built plugeth. --- .../docker-compose-fixturenet-plugeth.yml | 29 ++++++++++--------- .../fixturenet-plugeth/plugins/README.md | 1 + .../cerc-fixturenet-eth-plugeth/Dockerfile | 14 ++++----- .../stacks/fixturenet-plugeth-tx/stack.yml | 2 -- 4 files changed, 23 insertions(+), 23 deletions(-) create mode 100644 app/data/config/fixturenet-plugeth/plugins/README.md diff --git a/app/data/compose/docker-compose-fixturenet-plugeth.yml b/app/data/compose/docker-compose-fixturenet-plugeth.yml index 01a740d..9011c8e 100644 --- a/app/data/compose/docker-compose-fixturenet-plugeth.yml +++ b/app/data/compose/docker-compose-fixturenet-plugeth.yml @@ -1,5 +1,3 @@ -version: '3.7' - services: fixturenet-eth-bootnode-geth: restart: always @@ -10,7 +8,8 @@ services: RUN_BOOTNODE: "true" image: cerc/fixturenet-eth-plugeth:local volumes: - - fixturenet_eth_bootnode_geth_data:/root/ethdata + - fixturenet_plugeth_bootnode_geth_data:/root/ethdata + - ../config/fixturenet-plugeth/plugins:/root/ethdata/plugins ports: - "9898" - "30303" @@ -29,9 +28,10 @@ services: - ../config/fixturenet-eth/fixturenet-eth.env image: cerc/fixturenet-eth-plugeth:local volumes: - - fixturenet_eth_geth_1_data:/root/ethdata + - fixturenet_plugeth_geth_1_data:/root/ethdata + - ../config/fixturenet-plugeth/plugins:/root/ethdata/plugins healthcheck: - test: ["CMD", "nc", "-v", "localhost", "8545"] + test: ["CMD", "wget", "--tries=1", "--connect-timeout=1", "--quiet", "-O", "-", "http://localhost:8545/"] interval: 30s timeout: 10s retries: 10 @@ -47,7 +47,7 @@ services: restart: always hostname: fixturenet-eth-geth-2 healthcheck: - test: ["CMD", "nc", "-v", "localhost", "8545"] + test: ["CMD", "wget", "--tries=1", "--connect-timeout=1", "--quiet", "-O", "-", "http://localhost:8545/"] interval: 30s timeout: 10s retries: 10 @@ -60,7 +60,8 @@ services: depends_on: - fixturenet-eth-bootnode-geth volumes: - - fixturenet_eth_geth_2_data:/root/ethdata + - fixturenet_plugeth_geth_2_data:/root/ethdata + - ../config/fixturenet-plugeth/plugins:/root/ethdata/plugins fixturenet-eth-bootnode-lighthouse: restart: always @@ -86,7 +87,7 @@ services: EXECUTION_ENDPOINT: "http://fixturenet-eth-geth-1:8551" image: cerc/fixturenet-eth-lighthouse:local volumes: - - fixturenet_eth_lighthouse_1_data:/opt/testnet/build/cl + - fixturenet_plugeth_lighthouse_1_data:/opt/testnet/build/cl depends_on: fixturenet-eth-bootnode-lighthouse: condition: service_started @@ -113,7 +114,7 @@ services: LIGHTHOUSE_GENESIS_STATE_URL: "http://fixturenet-eth-lighthouse-1:8001/eth/v2/debug/beacon/states/0" image: cerc/fixturenet-eth-lighthouse:local volumes: - - fixturenet_eth_lighthouse_2_data:/opt/testnet/build/cl + - fixturenet_plugeth_lighthouse_2_data:/opt/testnet/build/cl depends_on: fixturenet-eth-bootnode-lighthouse: condition: service_started @@ -121,8 +122,8 @@ services: condition: service_healthy volumes: - fixturenet_eth_bootnode_geth_data: - fixturenet_eth_geth_1_data: - fixturenet_eth_geth_2_data: - fixturenet_eth_lighthouse_1_data: - fixturenet_eth_lighthouse_2_data: + fixturenet_plugeth_bootnode_geth_data: + fixturenet_plugeth_geth_1_data: + fixturenet_plugeth_geth_2_data: + fixturenet_plugeth_lighthouse_1_data: + fixturenet_plugeth_lighthouse_2_data: diff --git a/app/data/config/fixturenet-plugeth/plugins/README.md b/app/data/config/fixturenet-plugeth/plugins/README.md new file mode 100644 index 0000000..aa5aac1 --- /dev/null +++ b/app/data/config/fixturenet-plugeth/plugins/README.md @@ -0,0 +1 @@ +See: https://docs.plugeth.org/ diff --git a/app/data/container-build/cerc-fixturenet-eth-plugeth/Dockerfile b/app/data/container-build/cerc-fixturenet-eth-plugeth/Dockerfile index 7fea881..90cd38d 100644 --- a/app/data/container-build/cerc-fixturenet-eth-plugeth/Dockerfile +++ b/app/data/container-build/cerc-fixturenet-eth-plugeth/Dockerfile @@ -1,19 +1,20 @@ FROM skylenet/ethereum-genesis-generator@sha256:210353ce7c898686bc5092f16c61220a76d357f51eff9c451e9ad1b9ad03d4d3 AS ethgen -# Using the same golang image as used to build geth: https://github.com/cerc-io/go-ethereum/blob/HEAD/Dockerfile -FROM golang:1.18-alpine as delve +FROM golang:1.19.4-bullseye AS delve RUN go install github.com/go-delve/delve/cmd/dlv@latest -FROM cerc/plugeth:local as geth - -FROM alpine:3.17 -RUN apk add --no-cache python3 python3-dev py3-pip curl wget jq build-base gettext libintl openssl bash bind-tools postgresql-client +FROM ubuntu:22.04 +RUN apt-get update && \ + apt-get install -y --no-install-recommends \ + python3 python3-dev python3-pip curl wget jq gettext gettext-base openssl bash dnsutils postgresql-client make iproute2 netcat && \ + rm -rf /var/lib/apt/lists/* COPY --from=delve /go/bin/dlv /usr/local/bin/ COPY --from=ethgen /usr/local/bin/eth2-testnet-genesis /usr/local/bin/ COPY --from=ethgen /usr/local/bin/eth2-val-tools /usr/local/bin/ COPY --from=ethgen /apps /apps +RUN wget -O /usr/local/bin/geth https://github.com/openrelayxyz/plugeth/releases/download/v1.11.6.1.0/geth-linux-amd64-v1.1.0-v1.11.6.1.0 && chmod a+x /usr/local/bin/geth RUN cd /apps/el-gen && pip3 install -r requirements.txt COPY genesis /opt/testnet @@ -21,7 +22,6 @@ COPY run-el.sh /opt/testnet/run.sh RUN cd /opt/testnet && make genesis-el -COPY --from=geth /usr/local/bin/geth /usr/local/bin/ RUN geth --datadir ~/ethdata init /opt/testnet/build/el/geth.json && rm -f ~/ethdata/geth/nodekey ENTRYPOINT ["/opt/testnet/run.sh"] diff --git a/app/data/stacks/fixturenet-plugeth-tx/stack.yml b/app/data/stacks/fixturenet-plugeth-tx/stack.yml index 1bef3f1..14637da 100644 --- a/app/data/stacks/fixturenet-plugeth-tx/stack.yml +++ b/app/data/stacks/fixturenet-plugeth-tx/stack.yml @@ -2,10 +2,8 @@ version: "1.2" name: fixturenet-plugeth-tx decription: "plugeth Ethereum Fixturenet w/ tx-spammer" repos: - - github.com/openrelayxyz/plugeth - github.com/cerc-io/tx-spammer containers: - - cerc/plugeth - cerc/lighthouse - cerc/fixturenet-eth-plugeth - cerc/fixturenet-eth-lighthouse