Add a plugeth-based version of the fixturenet #411

Merged
telackey merged 4 commits from telackey/plugeth into main 2023-05-25 16:21:08 +00:00
5 changed files with 224 additions and 0 deletions
Showing only changes of commit 3003f4bd05 - Show all commits

View File

@ -0,0 +1,128 @@
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
version: '3.7'
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
services:
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
fixturenet-eth-bootnode-geth:
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
restart: always
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
hostname: fixturenet-eth-bootnode-geth
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
env_file:
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
- ../config/fixturenet-eth/fixturenet-eth.env
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
environment:
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
RUN_BOOTNODE: "true"
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
image: cerc/fixturenet-eth-plugeth:local
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
volumes:
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
- fixturenet_eth_bootnode_geth_data:/root/ethdata
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
ports:
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
- "9898"
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
- "30303"
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
fixturenet-eth-geth-1:
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
restart: always
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
hostname: fixturenet-eth-geth-1
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
cap_add:
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
- SYS_PTRACE
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
environment:
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
CERC_REMOTE_DEBUG: "true"
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
CERC_RUN_STATEDIFF: "detect"
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
CERC_STATEDIFF_DB_NODE_ID: 1
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG}
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
env_file:
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
- ../config/fixturenet-eth/fixturenet-eth.env
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
image: cerc/fixturenet-eth-plugeth:local
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
volumes:
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
- fixturenet_eth_geth_1_data:/root/ethdata
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
healthcheck:
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
test: ["CMD", "nc", "-v", "localhost", "8545"]
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
interval: 30s
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
timeout: 10s
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
retries: 10
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
start_period: 3s
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
depends_on:
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
- fixturenet-eth-bootnode-geth
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
ports:
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
- "8545"
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
- "40000"
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
- "6060"
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
fixturenet-eth-geth-2:
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
restart: always
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
hostname: fixturenet-eth-geth-2
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
healthcheck:
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
test: ["CMD", "nc", "-v", "localhost", "8545"]
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
interval: 30s
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
timeout: 10s
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
retries: 10
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
start_period: 3s
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
environment:
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
CERC_KEEP_RUNNING_AFTER_GETH_EXIT: "true"
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
env_file:
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
- ../config/fixturenet-eth/fixturenet-eth.env
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
image: cerc/fixturenet-eth-plugeth:local
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
depends_on:
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
- fixturenet-eth-bootnode-geth
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
volumes:
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
- fixturenet_eth_geth_2_data:/root/ethdata
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
fixturenet-eth-bootnode-lighthouse:
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
restart: always
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
hostname: fixturenet-eth-bootnode-lighthouse
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
environment:
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
RUN_BOOTNODE: "true"
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
image: cerc/fixturenet-eth-lighthouse:local
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
fixturenet-eth-lighthouse-1:
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
restart: always
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
hostname: fixturenet-eth-lighthouse-1
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
healthcheck:
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
test: ["CMD", "wget", "--tries=1", "--connect-timeout=1", "--quiet", "-O", "-", "http://localhost:8001/eth/v2/beacon/blocks/head"]
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
interval: 30s
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
timeout: 10s
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
retries: 10
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
start_period: 30s
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
env_file:
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
- ../config/fixturenet-eth/fixturenet-eth.env
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
environment:
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
NODE_NUMBER: "1"
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
ETH1_ENDPOINT: "http://fixturenet-eth-geth-1:8545"
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
EXECUTION_ENDPOINT: "http://fixturenet-eth-geth-1:8551"
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
image: cerc/fixturenet-eth-lighthouse:local
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
volumes:
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
- fixturenet_eth_lighthouse_1_data:/opt/testnet/build/cl
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
depends_on:
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
fixturenet-eth-bootnode-lighthouse:
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
condition: service_started
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
fixturenet-eth-geth-1:
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
condition: service_healthy
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
ports:
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
- "8001"
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
fixturenet-eth-lighthouse-2:
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
restart: always
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
hostname: fixturenet-eth-lighthouse-2
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
healthcheck:
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
test: ["CMD", "wget", "--tries=1", "--connect-timeout=1", "--quiet", "-O", "-", "http://localhost:8001/eth/v2/beacon/blocks/head"]
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
interval: 30s
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
timeout: 10s
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
retries: 10
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
start_period: 30s
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
env_file:
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
- ../config/fixturenet-eth/fixturenet-eth.env
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
environment:
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
NODE_NUMBER: "2"
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
ETH1_ENDPOINT: "http://fixturenet-eth-geth-2:8545"
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
EXECUTION_ENDPOINT: "http://fixturenet-eth-geth-2:8551"
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
LIGHTHOUSE_GENESIS_STATE_URL: "http://fixturenet-eth-lighthouse-1:8001/eth/v2/debug/beacon/states/0"
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
image: cerc/fixturenet-eth-lighthouse:local
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
volumes:
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
- fixturenet_eth_lighthouse_2_data:/opt/testnet/build/cl
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
depends_on:
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
fixturenet-eth-bootnode-lighthouse:
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
condition: service_started
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
fixturenet-eth-geth-2:
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
condition: service_healthy
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
volumes:
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
fixturenet_eth_bootnode_geth_data:
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
fixturenet_eth_geth_1_data:
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
fixturenet_eth_geth_2_data:
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
fixturenet_eth_lighthouse_1_data:
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.
fixturenet_eth_lighthouse_2_data:
Review

Apparently version is no longer required or used in compose files.

Apparently version is no longer required or used in compose files.

View File

@ -0,0 +1,27 @@
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
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
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 cd /apps/el-gen && pip3 install -r requirements.txt
COPY genesis /opt/testnet
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"]

View File

@ -0,0 +1,17 @@
#!/usr/bin/env bash
# Build cerc/fixturenet-eth-plugeth
set -x
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
if [ ! -d "${SCRIPT_DIR}/genesis" ]; then
cp -frp ${SCRIPT_DIR}/../cerc-fixturenet-eth-geth/genesis ${SCRIPT_DIR}/genesis
fi
if [ ! -d "${SCRIPT_DIR}/run-el.sh" ]; then
cp -fp ${SCRIPT_DIR}/../cerc-fixturenet-eth-geth/run-el.sh ${SCRIPT_DIR}/
fi
docker build -t cerc/fixturenet-eth-plugeth:local -f ${SCRIPT_DIR}/Dockerfile ${build_command_args} $SCRIPT_DIR

View File

@ -0,0 +1,37 @@
# fixturenet-eth-tx
A variation of `fixturenet-eth` that automatically generates transactions using `tx-spammer`.
See `stacks/fixturenet-eth/README.md` for more information.
## Containers
* cerc/go-ethereum
* cerc/lighthouse
* cerc/fixturenet-eth-geth
* cerc/fixturenet-eth-lighthouse
* cerc/tx-spammer
## Deploy the stack
```
$ laconic-so --stack fixturenet-eth-tx setup-repositories
$ laconic-so --stack fixturenet-eth-tx build-containers
$ laconic-so --stack fixturenet-eth-tx deploy up
```
## Export the ethdb (optional)
It is easy to export data from the fixturenet for offline processing of the raw ethdb files (eg, by eth-statediff-service) using the `export-ethdb.sh` script.
For example:
```
$ app/data/container-build/cerc-fixturenet-eth-lighthouse/scripts/export-ethdb.sh 500
Waiting for geth to generate DAG.... done
Waiting for beacon phase0.... done
Waiting for beacon altair.... done
Waiting for beacon bellatrix pre-merge.... done
Waiting for beacon bellatrix merge.... done
Waiting for block number 500.... done
Exporting ethdb.... ./ethdb.tgz
```

View File

@ -0,0 +1,15 @@
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
- cerc/tx-spammer
pods:
- fixturenet-plugeth
- tx-spammer