Use upstream geth and lcli #5

Merged
telackey merged 1 commits from telackey/upstream into telackey/oldgenesis 2024-05-01 20:30:12 +00:00
6 changed files with 6 additions and 74 deletions
Showing only changes of commit 9be1f36d02 - Show all commits

View File

@ -1,8 +1,8 @@
FROM cerc/fixturenet-eth-genesis:local as fnetgen FROM cerc/fixturenet-eth-genesis:local as fnetgen
FROM cerc/go-ethereum:local as geth FROM ethereum/client-go:release-1.11 as geth
# Using the same golang image as used to build geth: https://github.com/cerc-io/go-ethereum/blob/HEAD/Dockerfile # Using the same golang image as used to build geth: https://github.com/cerc-io/go-ethereum/blob/HEAD/Dockerfile
FROM golang:1.20-alpine as delve FROM golang:1.21-alpine as delve
RUN go install github.com/go-delve/delve/cmd/dlv@latest RUN go install github.com/go-delve/delve/cmd/dlv@latest
FROM alpine:3.17 FROM alpine:3.17

View File

@ -50,58 +50,6 @@ else
echo -n "$JWT" > /opt/testnet/build/el/jwtsecret echo -n "$JWT" > /opt/testnet/build/el/jwtsecret
if [ "$CERC_RUN_STATEDIFF" == "detect" ] && [ -n "$CERC_STATEDIFF_DB_HOST" ]; then
dig_result=$(dig $CERC_STATEDIFF_DB_HOST +short)
dig_status_code=$?
if [[ $dig_status_code = 0 && -n $dig_result ]]; then
echo "Statediff DB at $CERC_STATEDIFF_DB_HOST"
CERC_RUN_STATEDIFF="true"
else
echo "No statediff DB available."
CERC_RUN_STATEDIFF="false"
fi
fi
STATEDIFF_OPTS=""
if [ "$CERC_RUN_STATEDIFF" == "true" ]; then
ready=0
echo "Waiting for statediff DB..."
while [ $ready -eq 0 ]; do
sleep 1
export PGPASSWORD="$CERC_STATEDIFF_DB_PASSWORD"
result=$(psql -h "$CERC_STATEDIFF_DB_HOST" \
-p "$CERC_STATEDIFF_DB_PORT" \
-U "$CERC_STATEDIFF_DB_USER" \
-d "$CERC_STATEDIFF_DB_NAME" \
-t -c 'select max(version_id) from goose_db_version;' 2>/dev/null | awk '{ print $1 }')
if [ -n "$result" ]; then
echo "DB ready..."
if [ $result -ge $CERC_STATEDIFF_DB_GOOSE_MIN_VER ]; then
ready=1
else
echo "DB not at required version (want $CERC_STATEDIFF_DB_GOOSE_MIN_VER, have $result)"
fi
fi
done
STATEDIFF_OPTS="--statediff \
--statediff.db.host=$CERC_STATEDIFF_DB_HOST \
--statediff.db.name=$CERC_STATEDIFF_DB_NAME \
--statediff.db.nodeid=$CERC_STATEDIFF_DB_NODE_ID \
--statediff.db.password=$CERC_STATEDIFF_DB_PASSWORD \
--statediff.db.port=$CERC_STATEDIFF_DB_PORT \
--statediff.db.user=$CERC_STATEDIFF_DB_USER \
--statediff.db.logstatements=${CERC_STATEDIFF_DB_LOG_STATEMENTS:-false} \
--statediff.db.copyfrom=${CERC_STATEDIFF_DB_COPY_FROM:-true} \
--statediff.waitforsync=true \
--statediff.workers=${CERC_STATEDIFF_WORKERS:-1} \
--statediff.writing=true"
if [ -d "${CERC_PLUGINS_DIR}" ]; then
# With plugeth, we separate the statediff options by prefixing with ' -- '
STATEDIFF_OPTS="--pluginsdir "${CERC_PLUGINS_DIR}" -- ${STATEDIFF_OPTS}"
fi
fi
$START_CMD \ $START_CMD \
--datadir="${CERC_ETH_DATADIR}" \ --datadir="${CERC_ETH_DATADIR}" \
--bootnodes="${ENODE}" \ --bootnodes="${ENODE}" \
@ -109,7 +57,7 @@ else
--http \ --http \
--http.addr="0.0.0.0" \ --http.addr="0.0.0.0" \
--http.vhosts="*" \ --http.vhosts="*" \
--http.api="${CERC_GETH_HTTP_APIS:-eth,web3,net,admin,personal,debug,statediff}" \ --http.api="${CERC_GETH_HTTP_APIS:-eth,web3,net,admin,personal,debug}" \
--http.corsdomain="*" \ --http.corsdomain="*" \
--authrpc.addr="0.0.0.0" \ --authrpc.addr="0.0.0.0" \
--authrpc.vhosts="*" \ --authrpc.vhosts="*" \
@ -117,7 +65,7 @@ else
--ws \ --ws \
--ws.addr="0.0.0.0" \ --ws.addr="0.0.0.0" \
--ws.origins="*" \ --ws.origins="*" \
--ws.api="${CERC_GETH_WS_APIS:-eth,web3,net,admin,personal,debug,statediff}" \ --ws.api="${CERC_GETH_WS_APIS:-eth,web3,net,admin,personal,debug}" \
--http.corsdomain="*" \ --http.corsdomain="*" \
--networkid="${NETWORK_ID}" \ --networkid="${NETWORK_ID}" \
--netrestrict="${NETRESTRICT}" \ --netrestrict="${NETRESTRICT}" \
@ -130,9 +78,8 @@ else
--metrics \ --metrics \
--metrics.addr="0.0.0.0" \ --metrics.addr="0.0.0.0" \
--verbosity=${CERC_GETH_VERBOSITY:-3} \ --verbosity=${CERC_GETH_VERBOSITY:-3} \
--log.vmodule="${CERC_GETH_VMODULE:-statediff/*=5}" \ --log.vmodule="${CERC_GETH_VMODULE}" \
--miner.etherbase="${ETHERBASE}" \ --miner.etherbase="${ETHERBASE}" \
${STATEDIFF_OPTS} \
& &
geth_pid=$! geth_pid=$!

View File

@ -1,4 +1,4 @@
FROM cerc/lighthouse-cli:local AS lcli FROM sigp/lcli:v4.3.0 AS lcli
FROM skylenet/ethereum-genesis-generator@sha256:210353ce7c898686bc5092f16c61220a76d357f51eff9c451e9ad1b9ad03d4d3 AS ethgen FROM skylenet/ethereum-genesis-generator@sha256:210353ce7c898686bc5092f16c61220a76d357f51eff9c451e9ad1b9ad03d4d3 AS ethgen
FROM cerc/fixturenet-eth-genesis:local AS fnetgen FROM cerc/fixturenet-eth-genesis:local AS fnetgen

View File

@ -1,4 +0,0 @@
#!/usr/bin/env bash
# Build cerc/go-ethereum
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh
docker build -t cerc/go-ethereum:local ${build_command_args} ${CERC_REPO_BASE_DIR}/go-ethereum

View File

@ -1,7 +0,0 @@
#!/usr/bin/env bash
# Build cerc/lighthouse-cli
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh
project_dir=${CERC_REPO_BASE_DIR}/lighthouse
docker build -t cerc/lighthouse-cli:local --build-arg PORTABLE=true -f ${project_dir}/lcli/Dockerfile ${build_command_args} ${project_dir}

View File

@ -2,13 +2,9 @@ version: "1.1"
name: fixturenet-eth name: fixturenet-eth
description: "Ethereum Fixturenet" description: "Ethereum Fixturenet"
repos: repos:
- git.vdb.to/cerc-io/go-ethereum@v1.11.6-statediff-v5
- git.vdb.to/cerc-io/lighthouse
- github.com/dboreham/foundry - github.com/dboreham/foundry
containers: containers:
- cerc/go-ethereum
- cerc/lighthouse - cerc/lighthouse
- cerc/lighthouse-cli
- cerc/fixturenet-eth-genesis - cerc/fixturenet-eth-genesis
- cerc/fixturenet-eth-geth - cerc/fixturenet-eth-geth
- cerc/fixturenet-eth-lighthouse - cerc/fixturenet-eth-lighthouse