Updates for running IPLD-ETH CI tests (#414)

* random nits

* geth - visibility of migration status

* forward CERC_RUN_STATEDIFF to geth container

* fix ipld-eth-server vars

* fix fixturenet-eth-loaded stack

* fixturenet geth genesis - include mergeNetsplitBlock

* forward CERC_STATEDIFF_DB_GOOSE_MIN_VER to env file

* add TAG_SUFFIX arg to lighthouse build

  intended to avoid sporadic failures when running lcli on github CI runners, likely related to non-portable builds
This commit is contained in:
Roy Crihfield 2023-05-31 16:10:58 +08:00 committed by GitHub
parent 9880b48b78
commit ff616db4ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 31 additions and 23 deletions

View File

@ -22,7 +22,7 @@ services:
- SYS_PTRACE - SYS_PTRACE
environment: environment:
CERC_REMOTE_DEBUG: "true" CERC_REMOTE_DEBUG: "true"
CERC_RUN_STATEDIFF: "detect" CERC_RUN_STATEDIFF: ${CERC_RUN_STATEDIFF:-detect}
CERC_STATEDIFF_DB_NODE_ID: 1 CERC_STATEDIFF_DB_NODE_ID: 1
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG} CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG}
env_file: env_file:

View File

@ -7,11 +7,9 @@ services:
condition: service_healthy condition: service_healthy
image: cerc/ipld-eth-server:local image: cerc/ipld-eth-server:local
environment: environment:
IPLD_SERVER_GRAPHQL: "true" SERVER_HTTP_PATH: 0.0.0.0:8081
IPLD_POSTGRAPHILEPATH: http://graphql:5000 SERVER_GRAPHQL: "true"
ETH_SERVER_HTTPPATH: 0.0.0.0:8081 SERVER_GRAPHQLPATH: 0.0.0.0:8082
ETH_SERVER_GRAPHQL: "true"
ETH_SERVER_GRAPHQLPATH: 0.0.0.0:8082
VDB_COMMAND: "serve" VDB_COMMAND: "serve"
ETH_CHAIN_CONFIG: "/tmp/chain.json" ETH_CHAIN_CONFIG: "/tmp/chain.json"
DATABASE_NAME: cerc_testing DATABASE_NAME: cerc_testing

View File

@ -17,7 +17,7 @@ CERC_STATEDIFF_DB_PORT=5432
CERC_STATEDIFF_DB_NAME="cerc_testing" CERC_STATEDIFF_DB_NAME="cerc_testing"
CERC_STATEDIFF_DB_USER="vdbm" CERC_STATEDIFF_DB_USER="vdbm"
CERC_STATEDIFF_DB_PASSWORD="password" CERC_STATEDIFF_DB_PASSWORD="password"
CERC_STATEDIFF_DB_GOOSE_MIN_VER=23 CERC_STATEDIFF_DB_GOOSE_MIN_VER=${CERC_STATEDIFF_DB_GOOSE_MIN_VER:-23}
CERC_STATEDIFF_DB_LOG_STATEMENTS="false" CERC_STATEDIFF_DB_LOG_STATEMENTS="false"
CERC_GETH_VMODULE="statediff/*=5,rpc/*=5" CERC_GETH_VMODULE="statediff/*=5,rpc/*=5"

View File

@ -34,5 +34,7 @@ python3 /apps/el-gen/genesis_geth.py $tmp_dir/genesis-config.yaml | \
jq ".config.istanbulBlock=$istanbul_block" | \ jq ".config.istanbulBlock=$istanbul_block" | \
jq ".config.berlinBlock=$berlin_block" | \ jq ".config.berlinBlock=$berlin_block" | \
jq ".config.londonBlock=$london_block" | \ jq ".config.londonBlock=$london_block" | \
jq ".config.mergeForkBlock=$merge_fork_block" > ../build/el/geth.json jq ".config.mergeForkBlock=$merge_fork_block" | \
jq ".config.mergeNetsplitBlock=$merge_fork_block" \
> ../build/el/geth.json
python3 ../accounts/mnemonic_to_csv.py $tmp_dir/genesis-config.yaml > ../build/el/accounts.csv python3 ../accounts/mnemonic_to_csv.py $tmp_dir/genesis-config.yaml > ../build/el/accounts.csv

View File

@ -64,8 +64,8 @@ else
STATEDIFF_OPTS="" STATEDIFF_OPTS=""
if [ "$CERC_RUN_STATEDIFF" == "true" ]; then if [ "$CERC_RUN_STATEDIFF" == "true" ]; then
ready=0 ready=0
while [ $ready -eq 0 ]; do
echo "Waiting for statediff DB..." echo "Waiting for statediff DB..."
while [ $ready -eq 0 ]; do
sleep 1 sleep 1
export PGPASSWORD="$CERC_STATEDIFF_DB_PASSWORD" export PGPASSWORD="$CERC_STATEDIFF_DB_PASSWORD"
result=$(psql -h "$CERC_STATEDIFF_DB_HOST" \ result=$(psql -h "$CERC_STATEDIFF_DB_HOST" \
@ -73,9 +73,13 @@ else
-U "$CERC_STATEDIFF_DB_USER" \ -U "$CERC_STATEDIFF_DB_USER" \
-d "$CERC_STATEDIFF_DB_NAME" \ -d "$CERC_STATEDIFF_DB_NAME" \
-t -c 'select max(version_id) from goose_db_version;' 2>/dev/null | awk '{ print $1 }') -t -c 'select max(version_id) from goose_db_version;' 2>/dev/null | awk '{ print $1 }')
if [ -n "$result" ] && [ $result -ge $CERC_STATEDIFF_DB_GOOSE_MIN_VER ]; then if [ -n "$result" ]; then
echo "DB ready..." echo "DB ready..."
if [ $result -ge $CERC_STATEDIFF_DB_GOOSE_MIN_VER ]; then
ready=1 ready=1
else
echo "DB not at required version (want $CERC_STATEDIFF_DB_GOOSE_MIN_VER, have $result)"
fi
fi fi
done done
STATEDIFF_OPTS="--statediff=true \ STATEDIFF_OPTS="--statediff=true \

View File

@ -15,9 +15,6 @@ GENESIS_VALIDATOR_COUNT=${GENESIS_VALIDATOR_COUNT:-80}
# Number of beacon_node instances that you intend to run # Number of beacon_node instances that you intend to run
BN_COUNT=${BN_COUNT:-2} BN_COUNT=${BN_COUNT:-2}
# Number of validator clients
VC_COUNT=${VC_COUNT:-$BN_COUNT}
# Number of seconds to delay to start genesis block. # Number of seconds to delay to start genesis block.
# If started by a script this can be 0, if starting by hand # If started by a script this can be 0, if starting by hand
# use something like 180. # use something like 180.

View File

@ -4,7 +4,14 @@ if [ -n "$CERC_SCRIPT_DEBUG" ]; then
fi fi
MIN_BLOCK_NUM=${1:-${MIN_BLOCK_NUM:-3}} MIN_BLOCK_NUM=${1:-${MIN_BLOCK_NUM:-3}}
STATUSES=("geth to generate DAG" "beacon phase0" "beacon altair" "beacon bellatrix pre-merge" "beacon bellatrix merge" "block number $MIN_BLOCK_NUM") STATUSES=(
"geth to generate DAG"
"beacon phase0"
"beacon altair"
"beacon bellatrix pre-merge"
"beacon bellatrix merge"
"block number $MIN_BLOCK_NUM"
)
STATUS=0 STATUS=0
LIGHTHOUSE_BASE_URL=${LIGHTHOUSE_BASE_URL} LIGHTHOUSE_BASE_URL=${LIGHTHOUSE_BASE_URL}
@ -36,7 +43,6 @@ MARKER="."
function inc_status() { function inc_status() {
echo " done" echo " done"
MARKEr="."
STATUS=$((STATUS + 1)) STATUS=$((STATUS + 1))
if [ $STATUS -lt ${#STATUSES[@]} ]; then if [ $STATUS -lt ${#STATUSES[@]} ]; then
echo -n "Waiting for ${STATUSES[$STATUS]}..." echo -n "Waiting for ${STATUSES[$STATUS]}..."

View File

@ -1,4 +1,5 @@
FROM sigp/lighthouse:v4.1.0-modern ARG TAG_SUFFIX="-modern"
FROM sigp/lighthouse:v4.1.0${TAG_SUFFIX}
RUN apt-get update; apt-get install bash netcat curl less jq -y; RUN apt-get update; apt-get install bash netcat curl less jq -y;

View File

@ -6,8 +6,8 @@ repos:
- github.com/cerc-io/tx-spammer - github.com/cerc-io/tx-spammer
- github.com/cerc-io/ipld-eth-server - github.com/cerc-io/ipld-eth-server
- github.com/cerc-io/ipld-eth-db - github.com/cerc-io/ipld-eth-db
- github.com/cerc-io/go-ethereum
containers: containers:
- cerc/go-ethereum
- cerc/lighthouse - cerc/lighthouse
- cerc/fixturenet-eth-geth - cerc/fixturenet-eth-geth
- cerc/fixturenet-eth-lighthouse - cerc/fixturenet-eth-lighthouse

View File

@ -1,6 +1,6 @@
# fixturenet-eth # fixturenet-eth
Instructions for deploying a local a geth + lighthouse blockchain "fixturenet" for development and testing purposes using laconic-stack-orchestrator (the installation of which is covered [here](https://github.com/cerc-io/stack-orchestrator#user-mode)): Instructions for deploying a local a geth + lighthouse blockchain "fixturenet" for development and testing purposes using laconic-stack-orchestrator (the installation of which is covered [here](https://github.com/cerc-io/stack-orchestrator)):
## Clone required repositories ## Clone required repositories

View File

@ -3,7 +3,7 @@ set -e
if [ -n "$CERC_SCRIPT_DEBUG" ]; then if [ -n "$CERC_SCRIPT_DEBUG" ]; then
set -x set -x
fi fi
set -e
echo "Running stack-orchestrator Ethereum fixturenet test" echo "Running stack-orchestrator Ethereum fixturenet test"
# Bit of a hack, test the most recent package # Bit of a hack, test the most recent package
TEST_TARGET_SO=$( ls -t1 ./package/laconic-so* | head -1 ) TEST_TARGET_SO=$( ls -t1 ./package/laconic-so* | head -1 )