From f20687674a0a9a5ef82e86f651ca9259a96e268b Mon Sep 17 00:00:00 2001 From: Roy Crihfield Date: Mon, 5 Aug 2024 19:15:58 +0000 Subject: [PATCH] Add ipld-eth-server to plugeth fixturenet (#21) Part of https://git.vdb.to/cerc-io/stack-orchestrator/issues/905. Reviewed-on: https://git.vdb.to/cerc-io/fixturenet-eth-stacks/pulls/21 Reviewed-by: David Boreham --- .../docker-compose-fixturenet-plugeth.yml | 2 + .../compose/docker-compose-ipld-eth-db.yml | 13 +++--- .../docker-compose-ipld-eth-server.yml | 43 +++++++++++++++++++ .../Dockerfile | 4 +- .../stacks/fixturenet-plugeth/stack.yml | 3 ++ 5 files changed, 57 insertions(+), 8 deletions(-) create mode 100644 stack-orchestrator/compose/docker-compose-ipld-eth-server.yml diff --git a/stack-orchestrator/compose/docker-compose-fixturenet-plugeth.yml b/stack-orchestrator/compose/docker-compose-fixturenet-plugeth.yml index ffdc01c..af2bad6 100644 --- a/stack-orchestrator/compose/docker-compose-fixturenet-plugeth.yml +++ b/stack-orchestrator/compose/docker-compose-fixturenet-plugeth.yml @@ -10,6 +10,7 @@ services: image: cerc/fixturenet-plugeth-plugeth:local volumes: - fixturenet_plugeth_bootnode_geth_data:/root/ethdata + - fixturenet_plugeth_bootnode_geth_config:/opt/testnet/build/el ports: - "9898" - "30303" @@ -127,6 +128,7 @@ services: volumes: fixturenet_plugeth_bootnode_geth_data: + fixturenet_plugeth_bootnode_geth_config: fixturenet_plugeth_geth_1_data: fixturenet_plugeth_geth_2_data: fixturenet_plugeth_lighthouse_1_data: diff --git a/stack-orchestrator/compose/docker-compose-ipld-eth-db.yml b/stack-orchestrator/compose/docker-compose-ipld-eth-db.yml index ada1d95..046fc7d 100644 --- a/stack-orchestrator/compose/docker-compose-ipld-eth-db.yml +++ b/stack-orchestrator/compose/docker-compose-ipld-eth-db.yml @@ -13,17 +13,16 @@ services: DATABASE_PORT: 5432 ipld-eth-db: - image: timescale/timescaledb:2.8.1-pg14 + image: timescale/timescaledb:latest-pg14 restart: always environment: POSTGRES_USER: "vdbm" POSTGRES_DB: "cerc_testing" POSTGRES_PASSWORD: "password" - healthcheck: - test: ["CMD", "nc", "-v", "localhost", "5432"] - interval: 30s - timeout: 10s - retries: 10 - start_period: 3s ports: - "127.0.0.1:8077:5432" + healthcheck: + test: ["CMD", "pg_isready", "-U", "vdbm"] + interval: 2s + timeout: 1s + retries: 3 diff --git a/stack-orchestrator/compose/docker-compose-ipld-eth-server.yml b/stack-orchestrator/compose/docker-compose-ipld-eth-server.yml new file mode 100644 index 0000000..9a9a224 --- /dev/null +++ b/stack-orchestrator/compose/docker-compose-ipld-eth-server.yml @@ -0,0 +1,43 @@ +services: + ipld-eth-server: + restart: unless-stopped + depends_on: + ipld-eth-db: + condition: service_healthy + image: cerc/ipld-eth-server:local + environment: + SERVER_HTTP_PATH: 0.0.0.0:8081 + SERVER_GRAPHQL: "true" + SERVER_GRAPHQLPATH: 0.0.0.0:8082 + ETH_CHAIN_CONFIG: "/opt/config/chain.json" + DATABASE_NAME: cerc_testing + DATABASE_HOSTNAME: ipld-eth-db + DATABASE_PORT: 5432 + DATABASE_USER: "vdbm" + DATABASE_PASSWORD: "password" + ETH_FORWARD_ETH_CALLS: "false" + ETH_FORWARD_GET_STORAGE_AT: "false" + ETH_PROXY_ON_ERROR: "false" + METRICS: "true" + PROM_HTTP: "true" + PROM_HTTP_ADDR: "0.0.0.0" + PROM_HTTP_PORT: "8090" + LOG_LEVEL: "debug" + CERC_REMOTE_DEBUG: ${CERC_REMOTE_DEBUG:-true} + volumes: + - fixturenet_plugeth_bootnode_geth_config:/opt/config + ports: + - "8081" + - "8082" + - "8090" + - "40000" + healthcheck: + test: ["CMD", "nc", "-v", "localhost", "8081"] + interval: 20s + timeout: 5s + retries: 15 + start_period: 5s + +volumes: + fixturenet_plugeth_bootnode_geth_config: + diff --git a/stack-orchestrator/container-build/cerc-fixturenet-eth-genesis-postmerge/Dockerfile b/stack-orchestrator/container-build/cerc-fixturenet-eth-genesis-postmerge/Dockerfile index caabc93..8ca8f5d 100644 --- a/stack-orchestrator/container-build/cerc-fixturenet-eth-genesis-postmerge/Dockerfile +++ b/stack-orchestrator/container-build/cerc-fixturenet-eth-genesis-postmerge/Dockerfile @@ -2,7 +2,9 @@ FROM ethpandaops/ethereum-genesis-generator:3.0.0 AS ethgen # Build genesis config ADD genesis /opt/genesis -RUN cd /opt/genesis && make genesis-el +WORKDIR /opt/genesis +RUN make genesis-el +RUN jq ".config" build/el/geth.json > build/el/chain.json FROM golang:1.21-alpine as builder diff --git a/stack-orchestrator/stacks/fixturenet-plugeth/stack.yml b/stack-orchestrator/stacks/fixturenet-plugeth/stack.yml index ef1119f..afb7780 100644 --- a/stack-orchestrator/stacks/fixturenet-plugeth/stack.yml +++ b/stack-orchestrator/stacks/fixturenet-plugeth/stack.yml @@ -6,6 +6,7 @@ repos: - git.vdb.to/cerc-io/plugeth-statediff - git.vdb.to/cerc-io/lighthouse - git.vdb.to/cerc-io/ipld-eth-db + - git.vdb.to/cerc-io/ipld-eth-server@v5 containers: - cerc/plugeth-statediff - cerc/plugeth @@ -15,6 +16,8 @@ containers: - cerc/lighthouse-cli - cerc/fixturenet-eth-lighthouse - cerc/ipld-eth-db + - cerc/ipld-eth-server pods: - fixturenet-plugeth - ipld-eth-db + - ipld-eth-server