From 9880b48b782b6dabf576efa54b2cea2e320a5e5d Mon Sep 17 00:00:00 2001 From: David Boreham Date: Wed, 31 May 2023 13:51:01 +0800 Subject: [PATCH 1/8] Add foundry to fixturenet-plugeth-tx (#418) --- app/data/stacks/fixturenet-plugeth-tx/stack.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/data/stacks/fixturenet-plugeth-tx/stack.yml b/app/data/stacks/fixturenet-plugeth-tx/stack.yml index c076d852..49dea4c5 100644 --- a/app/data/stacks/fixturenet-plugeth-tx/stack.yml +++ b/app/data/stacks/fixturenet-plugeth-tx/stack.yml @@ -3,11 +3,14 @@ name: fixturenet-plugeth-tx decription: "plugeth Ethereum Fixturenet w/ tx-spammer" repos: - github.com/cerc-io/tx-spammer + - dboreham/foundry containers: - cerc/lighthouse - cerc/fixturenet-plugeth-plugeth - cerc/fixturenet-plugeth-lighthouse - cerc/tx-spammer + - cerc/foundry pods: - fixturenet-plugeth + - foundry - tx-spammer From ff616db4ad16e299be79acf465b99029ac615b94 Mon Sep 17 00:00:00 2001 From: Roy Crihfield Date: Wed, 31 May 2023 16:10:58 +0800 Subject: [PATCH 2/8] 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 --- app/data/compose/docker-compose-fixturenet-eth.yml | 2 +- app/data/compose/docker-compose-ipld-eth-server.yml | 8 +++----- app/data/config/fixturenet-eth/fixturenet-eth.env | 2 +- .../cerc-fixturenet-eth-geth/genesis/el/build_el.sh | 4 +++- .../cerc-fixturenet-eth-geth/run-el.sh | 10 +++++++--- .../genesis/cl/vars.env | 3 --- .../cerc-fixturenet-eth-lighthouse/scripts/status.sh | 12 +++++++++--- .../cerc-go-ethereum-foundry/deploy-local-network.sh | 2 +- app/data/container-build/cerc-lighthouse/Dockerfile | 3 ++- app/data/stacks/fixturenet-eth-loaded/stack.yml | 2 +- app/data/stacks/fixturenet-eth/README.md | 2 +- tests/fixturenet-eth/run-test.sh | 4 ++-- 12 files changed, 31 insertions(+), 23 deletions(-) diff --git a/app/data/compose/docker-compose-fixturenet-eth.yml b/app/data/compose/docker-compose-fixturenet-eth.yml index 2a399662..530cd010 100644 --- a/app/data/compose/docker-compose-fixturenet-eth.yml +++ b/app/data/compose/docker-compose-fixturenet-eth.yml @@ -22,7 +22,7 @@ services: - SYS_PTRACE environment: CERC_REMOTE_DEBUG: "true" - CERC_RUN_STATEDIFF: "detect" + CERC_RUN_STATEDIFF: ${CERC_RUN_STATEDIFF:-detect} CERC_STATEDIFF_DB_NODE_ID: 1 CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG} env_file: diff --git a/app/data/compose/docker-compose-ipld-eth-server.yml b/app/data/compose/docker-compose-ipld-eth-server.yml index e02f73ca..ee787d5e 100644 --- a/app/data/compose/docker-compose-ipld-eth-server.yml +++ b/app/data/compose/docker-compose-ipld-eth-server.yml @@ -7,11 +7,9 @@ services: condition: service_healthy image: cerc/ipld-eth-server:local environment: - IPLD_SERVER_GRAPHQL: "true" - IPLD_POSTGRAPHILEPATH: http://graphql:5000 - ETH_SERVER_HTTPPATH: 0.0.0.0:8081 - ETH_SERVER_GRAPHQL: "true" - ETH_SERVER_GRAPHQLPATH: 0.0.0.0:8082 + SERVER_HTTP_PATH: 0.0.0.0:8081 + SERVER_GRAPHQL: "true" + SERVER_GRAPHQLPATH: 0.0.0.0:8082 VDB_COMMAND: "serve" ETH_CHAIN_CONFIG: "/tmp/chain.json" DATABASE_NAME: cerc_testing diff --git a/app/data/config/fixturenet-eth/fixturenet-eth.env b/app/data/config/fixturenet-eth/fixturenet-eth.env index 1c214b56..06e90b61 100644 --- a/app/data/config/fixturenet-eth/fixturenet-eth.env +++ b/app/data/config/fixturenet-eth/fixturenet-eth.env @@ -17,7 +17,7 @@ CERC_STATEDIFF_DB_PORT=5432 CERC_STATEDIFF_DB_NAME="cerc_testing" CERC_STATEDIFF_DB_USER="vdbm" 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_GETH_VMODULE="statediff/*=5,rpc/*=5" diff --git a/app/data/container-build/cerc-fixturenet-eth-geth/genesis/el/build_el.sh b/app/data/container-build/cerc-fixturenet-eth-geth/genesis/el/build_el.sh index 76b43daf..9ff77fab 100755 --- a/app/data/container-build/cerc-fixturenet-eth-geth/genesis/el/build_el.sh +++ b/app/data/container-build/cerc-fixturenet-eth-geth/genesis/el/build_el.sh @@ -34,5 +34,7 @@ python3 /apps/el-gen/genesis_geth.py $tmp_dir/genesis-config.yaml | \ jq ".config.istanbulBlock=$istanbul_block" | \ jq ".config.berlinBlock=$berlin_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 diff --git a/app/data/container-build/cerc-fixturenet-eth-geth/run-el.sh b/app/data/container-build/cerc-fixturenet-eth-geth/run-el.sh index edde1ba2..9f6bf1f7 100755 --- a/app/data/container-build/cerc-fixturenet-eth-geth/run-el.sh +++ b/app/data/container-build/cerc-fixturenet-eth-geth/run-el.sh @@ -64,8 +64,8 @@ else STATEDIFF_OPTS="" if [ "$CERC_RUN_STATEDIFF" == "true" ]; then ready=0 + echo "Waiting for statediff DB..." while [ $ready -eq 0 ]; do - echo "Waiting for statediff DB..." sleep 1 export PGPASSWORD="$CERC_STATEDIFF_DB_PASSWORD" result=$(psql -h "$CERC_STATEDIFF_DB_HOST" \ @@ -73,9 +73,13 @@ else -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" ] && [ $result -ge $CERC_STATEDIFF_DB_GOOSE_MIN_VER ]; then + if [ -n "$result" ]; then echo "DB ready..." - ready=1 + 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=true \ diff --git a/app/data/container-build/cerc-fixturenet-eth-lighthouse/genesis/cl/vars.env b/app/data/container-build/cerc-fixturenet-eth-lighthouse/genesis/cl/vars.env index d68cbdcc..b8c27349 100644 --- a/app/data/container-build/cerc-fixturenet-eth-lighthouse/genesis/cl/vars.env +++ b/app/data/container-build/cerc-fixturenet-eth-lighthouse/genesis/cl/vars.env @@ -15,9 +15,6 @@ GENESIS_VALIDATOR_COUNT=${GENESIS_VALIDATOR_COUNT:-80} # Number of beacon_node instances that you intend to run BN_COUNT=${BN_COUNT:-2} -# Number of validator clients -VC_COUNT=${VC_COUNT:-$BN_COUNT} - # Number of seconds to delay to start genesis block. # If started by a script this can be 0, if starting by hand # use something like 180. diff --git a/app/data/container-build/cerc-fixturenet-eth-lighthouse/scripts/status.sh b/app/data/container-build/cerc-fixturenet-eth-lighthouse/scripts/status.sh index f6d9d27b..d9f33d1b 100755 --- a/app/data/container-build/cerc-fixturenet-eth-lighthouse/scripts/status.sh +++ b/app/data/container-build/cerc-fixturenet-eth-lighthouse/scripts/status.sh @@ -4,7 +4,14 @@ if [ -n "$CERC_SCRIPT_DEBUG" ]; then fi 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 LIGHTHOUSE_BASE_URL=${LIGHTHOUSE_BASE_URL} @@ -36,7 +43,6 @@ MARKER="." function inc_status() { echo " done" - MARKEr="." STATUS=$((STATUS + 1)) if [ $STATUS -lt ${#STATUSES[@]} ]; then echo -n "Waiting for ${STATUSES[$STATUS]}..." @@ -55,7 +61,7 @@ while [ $STATUS -lt ${#STATUSES[@]} ]; do inc_status fi ;; - 1) + 1) result=`wget --no-check-certificate --quiet -O - "$LIGHTHOUSE_BASE_URL/eth/v2/beacon/blocks/head" | jq -r '.data.message.slot'` if [ ! -z "$result" ] && [ $result -gt 0 ]; then inc_status diff --git a/app/data/container-build/cerc-go-ethereum-foundry/deploy-local-network.sh b/app/data/container-build/cerc-go-ethereum-foundry/deploy-local-network.sh index e286bf30..ebc6ef23 100755 --- a/app/data/container-build/cerc-go-ethereum-foundry/deploy-local-network.sh +++ b/app/data/container-build/cerc-go-ethereum-foundry/deploy-local-network.sh @@ -16,7 +16,7 @@ db-waitforsync=bool Should the statediff service start once geth has synced to rpc-port=port change RPC port (default: 8545) rpc-addr=address change RPC address (default: 127.0.0.1) chain-id=number change chain ID (default: 99) -extra-args=name extra args to pass to geth on startup +extra-args=name extra args to pass to geth on startup period=seconds use a block time instead of instamine accounts=number create multiple accounts (default: 1) address=address eth address to add to genesis diff --git a/app/data/container-build/cerc-lighthouse/Dockerfile b/app/data/container-build/cerc-lighthouse/Dockerfile index cab3af06..9391e93d 100644 --- a/app/data/container-build/cerc-lighthouse/Dockerfile +++ b/app/data/container-build/cerc-lighthouse/Dockerfile @@ -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; diff --git a/app/data/stacks/fixturenet-eth-loaded/stack.yml b/app/data/stacks/fixturenet-eth-loaded/stack.yml index 55a05248..676e95e2 100644 --- a/app/data/stacks/fixturenet-eth-loaded/stack.yml +++ b/app/data/stacks/fixturenet-eth-loaded/stack.yml @@ -6,8 +6,8 @@ repos: - github.com/cerc-io/tx-spammer - github.com/cerc-io/ipld-eth-server - github.com/cerc-io/ipld-eth-db - - github.com/cerc-io/go-ethereum containers: + - cerc/go-ethereum - cerc/lighthouse - cerc/fixturenet-eth-geth - cerc/fixturenet-eth-lighthouse diff --git a/app/data/stacks/fixturenet-eth/README.md b/app/data/stacks/fixturenet-eth/README.md index 9f01417a..ad7b6fa4 100644 --- a/app/data/stacks/fixturenet-eth/README.md +++ b/app/data/stacks/fixturenet-eth/README.md @@ -1,6 +1,6 @@ # 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 diff --git a/tests/fixturenet-eth/run-test.sh b/tests/fixturenet-eth/run-test.sh index 3fd4cd59..a7e04030 100755 --- a/tests/fixturenet-eth/run-test.sh +++ b/tests/fixturenet-eth/run-test.sh @@ -3,7 +3,7 @@ set -e if [ -n "$CERC_SCRIPT_DEBUG" ]; then set -x fi -set -e + echo "Running stack-orchestrator Ethereum fixturenet test" # Bit of a hack, test the most recent package TEST_TARGET_SO=$( ls -t1 ./package/laconic-so* | head -1 ) @@ -15,7 +15,7 @@ reported_version_string=$( $TEST_TARGET_SO version ) echo "Version reported is: ${reported_version_string}" echo "Cloning repositories into: $CERC_REPO_BASE_DIR" $TEST_TARGET_SO --stack fixturenet-eth setup-repositories -$TEST_TARGET_SO --stack fixturenet-eth build-containers +$TEST_TARGET_SO --stack fixturenet-eth build-containers $TEST_TARGET_SO --stack fixturenet-eth deploy up # Verify that the fixturenet is up and running $TEST_TARGET_SO --stack fixturenet-eth deploy ps From f1a626ddf5ecc7cb87d09a4d66f530da2f06bbfb Mon Sep 17 00:00:00 2001 From: David Boreham Date: Tue, 6 Jun 2023 05:54:22 +0800 Subject: [PATCH 3/8] build local lighthouse cli (#420) * Build lcli locally * Pull lighthouse repo * Enable portable lcli build * Update ldcli options * Add lcli container to fixturenet-eth stack * Include --eth1-block-hash --------- Co-authored-by: David Boreham Co-authored-by: Thomas E Lackey --- .../cerc-fixturenet-eth-geth/Dockerfile | 12 ++++++++++++ .../cerc-fixturenet-eth-lighthouse/Dockerfile | 2 +- .../genesis/cl/build_cl.sh | 4 +++- .../genesis/cl/vars.env | 2 ++ .../cerc-fixturenet-plugeth-lighthouse/Dockerfile | 2 +- .../container-build/cerc-lighthouse-cli/build.sh | 7 +++++++ app/data/stacks/fixturenet-eth-loaded/stack.yml | 2 ++ app/data/stacks/fixturenet-eth-tx/stack.yml | 4 +++- app/data/stacks/fixturenet-eth/stack.yml | 2 ++ app/data/stacks/fixturenet-plugeth-tx/stack.yml | 4 +++- 10 files changed, 36 insertions(+), 5 deletions(-) create mode 100755 app/data/container-build/cerc-lighthouse-cli/build.sh diff --git a/app/data/container-build/cerc-fixturenet-eth-geth/Dockerfile b/app/data/container-build/cerc-fixturenet-eth-geth/Dockerfile index 666f9117..dc81eb06 100644 --- a/app/data/container-build/cerc-fixturenet-eth-geth/Dockerfile +++ b/app/data/container-build/cerc-fixturenet-eth-geth/Dockerfile @@ -22,6 +22,18 @@ 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/ + +# Snag the genesis block info. RUN geth --datadir ~/ethdata init /opt/testnet/build/el/geth.json && rm -f ~/ethdata/geth/nodekey +RUN cp -rp ~/ethdata ~/tmpeth && \ + geth --datadir ~/tmpeth init /opt/testnet/build/el/geth.json && \ + geth --datadir ~/tmpeth --http & \ + sleep 5 && \ + curl -q --location 'localhost:8545' \ + --header 'Content-Type: application/json' \ + --data '{ "jsonrpc": "2.0", "id": 14, "method": "eth_getBlockByNumber", "params": ["0x0", false] }' \ + -o /opt/testnet/build/el/genesis_block.json && \ + killall -9 geth && \ + rm -rf ~/tmpeth ENTRYPOINT ["/opt/testnet/run.sh"] diff --git a/app/data/container-build/cerc-fixturenet-eth-lighthouse/Dockerfile b/app/data/container-build/cerc-fixturenet-eth-lighthouse/Dockerfile index 958d2b39..87f9bb60 100644 --- a/app/data/container-build/cerc-fixturenet-eth-lighthouse/Dockerfile +++ b/app/data/container-build/cerc-fixturenet-eth-lighthouse/Dockerfile @@ -1,4 +1,4 @@ -FROM sigp/lcli:v4.1.0 AS lcli +FROM cerc/lighthouse-cli:local AS lcli FROM skylenet/ethereum-genesis-generator@sha256:210353ce7c898686bc5092f16c61220a76d357f51eff9c451e9ad1b9ad03d4d3 AS ethgen FROM cerc/fixturenet-eth-geth:local AS fnetgeth diff --git a/app/data/container-build/cerc-fixturenet-eth-lighthouse/genesis/cl/build_cl.sh b/app/data/container-build/cerc-fixturenet-eth-lighthouse/genesis/cl/build_cl.sh index ab3ad2af..50b3e4e6 100755 --- a/app/data/container-build/cerc-fixturenet-eth-lighthouse/genesis/cl/build_cl.sh +++ b/app/data/container-build/cerc-fixturenet-eth-lighthouse/genesis/cl/build_cl.sh @@ -27,12 +27,14 @@ lcli \ --deposit-contract-address $ETH1_DEPOSIT_CONTRACT_ADDRESS \ --testnet-dir $TESTNET_DIR \ --min-genesis-active-validator-count $GENESIS_VALIDATOR_COUNT \ + --validator-count $VALIDATOR_COUNT \ --min-genesis-time $GENESIS_TIME \ --genesis-delay $GENESIS_DELAY \ --genesis-fork-version $GENESIS_FORK_VERSION \ --altair-fork-epoch $ALTAIR_FORK_EPOCH \ - --merge-fork-epoch $MERGE_FORK_EPOCH \ + --bellatrix-fork-epoch $MERGE_FORK_EPOCH \ --eth1-id $ETH1_CHAIN_ID \ + --eth1-block-hash $ETH1_BLOCK_HASH \ --eth1-follow-distance 1 \ --seconds-per-slot $SECONDS_PER_SLOT \ --seconds-per-eth1-block $SECONDS_PER_ETH1_BLOCK \ diff --git a/app/data/container-build/cerc-fixturenet-eth-lighthouse/genesis/cl/vars.env b/app/data/container-build/cerc-fixturenet-eth-lighthouse/genesis/cl/vars.env index b8c27349..f2060a9a 100644 --- a/app/data/container-build/cerc-fixturenet-eth-lighthouse/genesis/cl/vars.env +++ b/app/data/container-build/cerc-fixturenet-eth-lighthouse/genesis/cl/vars.env @@ -42,7 +42,9 @@ VC_ARGS=${VC_ARGS:-""} EXECUTION_ENDPOINT=${EXECUTION_ENDPOINT:-http://localhost:8551} ETH1_GENESIS_JSON=${ETH1_GENESIS_JSON:-"../build/el/geth.json"} +ETH1_GENESIS_BLOCK_JSON=${ETH1_GENESIS_BLOCK_JSON:-"../build/el/genesis_block.json"} ETH1_CONFIG_YAML=${ETH1_CONFIG_YAML:-"../el/el-config.yaml"} +ETH1_BLOCK_HASH=${ETH1_BLOCK_HASH:-`cat $ETH1_GENESIS_BLOCK_JSON | jq -r '.result.hash' | cut -d'x' -f2`} ETH1_CHAIN_ID=${ETH1_CHAIN_ID:-`cat $ETH1_GENESIS_JSON | jq -r '.config.chainId'`} ETH1_TTD=${ETH1_TTD:-`cat $ETH1_GENESIS_JSON | jq -r '.config.terminalTotalDifficulty'`} diff --git a/app/data/container-build/cerc-fixturenet-plugeth-lighthouse/Dockerfile b/app/data/container-build/cerc-fixturenet-plugeth-lighthouse/Dockerfile index 8701fe2d..ba92294b 100644 --- a/app/data/container-build/cerc-fixturenet-plugeth-lighthouse/Dockerfile +++ b/app/data/container-build/cerc-fixturenet-plugeth-lighthouse/Dockerfile @@ -1,4 +1,4 @@ -FROM sigp/lcli:v4.1.0 AS lcli +FROM cerc/lighthouse-cli:local AS lcli FROM skylenet/ethereum-genesis-generator@sha256:210353ce7c898686bc5092f16c61220a76d357f51eff9c451e9ad1b9ad03d4d3 AS ethgen FROM cerc/fixturenet-plugeth-plugeth:local AS fnetgeth diff --git a/app/data/container-build/cerc-lighthouse-cli/build.sh b/app/data/container-build/cerc-lighthouse-cli/build.sh new file mode 100755 index 00000000..75719ef4 --- /dev/null +++ b/app/data/container-build/cerc-lighthouse-cli/build.sh @@ -0,0 +1,7 @@ +#!/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} diff --git a/app/data/stacks/fixturenet-eth-loaded/stack.yml b/app/data/stacks/fixturenet-eth-loaded/stack.yml index 676e95e2..dd7e05fd 100644 --- a/app/data/stacks/fixturenet-eth-loaded/stack.yml +++ b/app/data/stacks/fixturenet-eth-loaded/stack.yml @@ -6,9 +6,11 @@ repos: - github.com/cerc-io/tx-spammer - github.com/cerc-io/ipld-eth-server - github.com/cerc-io/ipld-eth-db + - github.com/cerc-io/lighthouse containers: - cerc/go-ethereum - cerc/lighthouse + - cerc/lighthouse-cli - cerc/fixturenet-eth-geth - cerc/fixturenet-eth-lighthouse - cerc/ipld-eth-server diff --git a/app/data/stacks/fixturenet-eth-tx/stack.yml b/app/data/stacks/fixturenet-eth-tx/stack.yml index 0281b262..35e43575 100644 --- a/app/data/stacks/fixturenet-eth-tx/stack.yml +++ b/app/data/stacks/fixturenet-eth-tx/stack.yml @@ -4,10 +4,12 @@ decription: "Ethereum Fixturenet w/ tx-spammer" repos: - github.com/cerc-io/go-ethereum - github.com/cerc-io/tx-spammer - - dboreham/foundry + - github.com/dboreham/foundry + - github.com/cerc-io/lighthouse containers: - cerc/go-ethereum - cerc/lighthouse + - cerc/lighthouse-cli - cerc/fixturenet-eth-geth - cerc/fixturenet-eth-lighthouse - cerc/tx-spammer diff --git a/app/data/stacks/fixturenet-eth/stack.yml b/app/data/stacks/fixturenet-eth/stack.yml index ccd2526a..ae06e2d2 100644 --- a/app/data/stacks/fixturenet-eth/stack.yml +++ b/app/data/stacks/fixturenet-eth/stack.yml @@ -3,10 +3,12 @@ name: fixturenet-eth decription: "Ethereum Fixturenet" repos: - github.com/cerc-io/go-ethereum + - github.com/cerc-io/lighthouse - github.com/dboreham/foundry containers: - cerc/go-ethereum - cerc/lighthouse + - cerc/lighthouse-cli - cerc/fixturenet-eth-geth - cerc/fixturenet-eth-lighthouse - cerc/foundry diff --git a/app/data/stacks/fixturenet-plugeth-tx/stack.yml b/app/data/stacks/fixturenet-plugeth-tx/stack.yml index 49dea4c5..e6d8c615 100644 --- a/app/data/stacks/fixturenet-plugeth-tx/stack.yml +++ b/app/data/stacks/fixturenet-plugeth-tx/stack.yml @@ -3,9 +3,11 @@ name: fixturenet-plugeth-tx decription: "plugeth Ethereum Fixturenet w/ tx-spammer" repos: - github.com/cerc-io/tx-spammer - - dboreham/foundry + - github.com/dboreham/foundry + - github.com/cerc-io/lighthouse containers: - cerc/lighthouse + - cerc/lighthouse-cli - cerc/fixturenet-plugeth-plugeth - cerc/fixturenet-plugeth-lighthouse - cerc/tx-spammer From a8e198ad5516552c1e33337294c68728de80452d Mon Sep 17 00:00:00 2001 From: Thomas E Lackey Date: Mon, 5 Jun 2023 18:16:42 -0500 Subject: [PATCH 4/8] Allow configuring the number of statediff workers. (#422) * Allow configuring the number of statediff workers. * Leave logging alone --- app/data/config/fixturenet-eth/fixturenet-eth.env | 3 ++- app/data/container-build/cerc-fixturenet-eth-geth/run-el.sh | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/data/config/fixturenet-eth/fixturenet-eth.env b/app/data/config/fixturenet-eth/fixturenet-eth.env index 06e90b61..ea56e2ec 100644 --- a/app/data/config/fixturenet-eth/fixturenet-eth.env +++ b/app/data/config/fixturenet-eth/fixturenet-eth.env @@ -17,7 +17,8 @@ CERC_STATEDIFF_DB_PORT=5432 CERC_STATEDIFF_DB_NAME="cerc_testing" CERC_STATEDIFF_DB_USER="vdbm" CERC_STATEDIFF_DB_PASSWORD="password" -CERC_STATEDIFF_DB_GOOSE_MIN_VER=${CERC_STATEDIFF_DB_GOOSE_MIN_VER:-23} +CERC_STATEDIFF_DB_GOOSE_MIN_VER=${CERC_STATEDIFF_DB_GOOSE_MIN_VER:-18} CERC_STATEDIFF_DB_LOG_STATEMENTS="false" +CERC_STATEDIFF_WORKERS=2 CERC_GETH_VMODULE="statediff/*=5,rpc/*=5" diff --git a/app/data/container-build/cerc-fixturenet-eth-geth/run-el.sh b/app/data/container-build/cerc-fixturenet-eth-geth/run-el.sh index 9f6bf1f7..4c1a0ce1 100755 --- a/app/data/container-build/cerc-fixturenet-eth-geth/run-el.sh +++ b/app/data/container-build/cerc-fixturenet-eth-geth/run-el.sh @@ -92,6 +92,7 @@ else --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" fi From 26ff7a969c9ce51031df1e1507d707348b6c4107 Mon Sep 17 00:00:00 2001 From: Thomas E Lackey Date: Mon, 5 Jun 2023 21:10:17 -0500 Subject: [PATCH 5/8] Fix plugeth build. (#423) --- .../cerc-fixturenet-plugeth-plugeth/Dockerfile | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/app/data/container-build/cerc-fixturenet-plugeth-plugeth/Dockerfile b/app/data/container-build/cerc-fixturenet-plugeth-plugeth/Dockerfile index 90cd38d3..9936c3dc 100644 --- a/app/data/container-build/cerc-fixturenet-plugeth-plugeth/Dockerfile +++ b/app/data/container-build/cerc-fixturenet-plugeth-plugeth/Dockerfile @@ -6,7 +6,7 @@ RUN go install github.com/go-delve/delve/cmd/dlv@latest 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 && \ + python3 python3-dev python3-pip curl wget jq gettext gettext-base openssl bash dnsutils postgresql-client make iproute2 netcat psmisc && \ rm -rf /var/lib/apt/lists/* COPY --from=delve /go/bin/dlv /usr/local/bin/ @@ -24,4 +24,17 @@ RUN cd /opt/testnet && make genesis-el RUN geth --datadir ~/ethdata init /opt/testnet/build/el/geth.json && rm -f ~/ethdata/geth/nodekey +# Snag the genesis block info. +RUN geth --datadir ~/ethdata init /opt/testnet/build/el/geth.json && rm -f ~/ethdata/geth/nodekey +RUN cp -rp ~/ethdata ~/tmpeth && \ + geth --datadir ~/tmpeth init /opt/testnet/build/el/geth.json && \ + geth --datadir ~/tmpeth --http & \ + sleep 5 && \ + curl -q --location 'localhost:8545' \ + --header 'Content-Type: application/json' \ + --data '{ "jsonrpc": "2.0", "id": 14, "method": "eth_getBlockByNumber", "params": ["0x0", false] }' \ + -o /opt/testnet/build/el/genesis_block.json && \ + killall -9 geth && \ + rm -rf ~/tmpeth + ENTRYPOINT ["/opt/testnet/run.sh"] From 98e1d120ccdeadce3403b323484b3488991d2a88 Mon Sep 17 00:00:00 2001 From: David Boreham Date: Tue, 6 Jun 2023 11:08:05 +0800 Subject: [PATCH 6/8] Add missing lighthouse-cli container to pocket stack (#424) Co-authored-by: David Boreham --- app/data/stacks/fixturenet-pocket/stack.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/data/stacks/fixturenet-pocket/stack.yml b/app/data/stacks/fixturenet-pocket/stack.yml index 2f96c53b..84abba1c 100644 --- a/app/data/stacks/fixturenet-pocket/stack.yml +++ b/app/data/stacks/fixturenet-pocket/stack.yml @@ -3,11 +3,13 @@ name: fixturenet-pocket description: "A single node pocket chain that can serve relays from the geth-1 node in eth-fixturenet" repos: - github.com/cerc-io/go-ethereum + - github/com/cerc-io/lighthouse - github.com/pokt-network/pocket-core - github.com/pokt-network/pocket-core-deployments # contains the dockerfile containers: - cerc/go-ethereum - cerc/lighthouse + - cerc/lighthouse-cli - cerc/fixturenet-eth-geth - cerc/fixturenet-eth-lighthouse - cerc/pocket From d19b9a65b9e75b9c726e3745f8493e891ee01ae8 Mon Sep 17 00:00:00 2001 From: David Boreham Date: Mon, 5 Jun 2023 21:59:42 -0600 Subject: [PATCH 7/8] Fix typo --- app/data/stacks/fixturenet-pocket/stack.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/data/stacks/fixturenet-pocket/stack.yml b/app/data/stacks/fixturenet-pocket/stack.yml index 84abba1c..0e39ed89 100644 --- a/app/data/stacks/fixturenet-pocket/stack.yml +++ b/app/data/stacks/fixturenet-pocket/stack.yml @@ -3,7 +3,7 @@ name: fixturenet-pocket description: "A single node pocket chain that can serve relays from the geth-1 node in eth-fixturenet" repos: - github.com/cerc-io/go-ethereum - - github/com/cerc-io/lighthouse + - github.com/cerc-io/lighthouse - github.com/pokt-network/pocket-core - github.com/pokt-network/pocket-core-deployments # contains the dockerfile containers: From 32f8d65bb86509fee305300fa269b21a0f431ee7 Mon Sep 17 00:00:00 2001 From: Nabarun Gogoi Date: Wed, 7 Jun 2023 18:48:59 +0530 Subject: [PATCH 8/8] Update mobymask-v2 stack with lighthouse-cli and branch checkout feature (#425) * Update optimism stack yml for lighthouse-cli * Use branch checkout feature in mobymask stack --- .../compose/docker-compose-peer-test-app.yml | 3 ++- app/data/stacks/fixturenet-optimism/README.md | 8 -------- .../stacks/fixturenet-optimism/l2-only.md | 8 -------- app/data/stacks/fixturenet-optimism/stack.yml | 6 ++++-- app/data/stacks/mobymask-v2/README.md | 20 ------------------- app/data/stacks/mobymask-v2/mobymask-only.md | 16 --------------- app/data/stacks/mobymask-v2/stack.yml | 13 +++++++----- .../watcher-p2p-network/watcher.md | 16 --------------- 8 files changed, 14 insertions(+), 76 deletions(-) diff --git a/app/data/compose/docker-compose-peer-test-app.yml b/app/data/compose/docker-compose-peer-test-app.yml index f1f5e475..649ab8f8 100644 --- a/app/data/compose/docker-compose-peer-test-app.yml +++ b/app/data/compose/docker-compose-peer-test-app.yml @@ -1,8 +1,9 @@ version: '3.2' services: + # Builds and serves the peer-test react-app peer-test-app: - # Builds and serves the peer-test react-app + restart: unless-stopped image: cerc/react-peer:local working_dir: /scripts env_file: diff --git a/app/data/stacks/fixturenet-optimism/README.md b/app/data/stacks/fixturenet-optimism/README.md index 02e06a44..0fd4f94f 100644 --- a/app/data/stacks/fixturenet-optimism/README.md +++ b/app/data/stacks/fixturenet-optimism/README.md @@ -14,14 +14,6 @@ laconic-so --stack fixturenet-optimism setup-repositories # If this throws an error as a result of being already checked out to a branch/tag in a repo, remove the repositories mentioned below and re-run the command ``` -Checkout to the required versions and branches in repos: - -```bash -# Optimism -cd ~/cerc/optimism -git checkout v1.0.4 -``` - Build the container images: ```bash diff --git a/app/data/stacks/fixturenet-optimism/l2-only.md b/app/data/stacks/fixturenet-optimism/l2-only.md index 31397eee..3801b17f 100644 --- a/app/data/stacks/fixturenet-optimism/l2-only.md +++ b/app/data/stacks/fixturenet-optimism/l2-only.md @@ -14,14 +14,6 @@ laconic-so --stack fixturenet-optimism setup-repositories --exclude github.com/c # If this throws an error as a result of being already checked out to a branch/tag in a repo, remove the repositories mentioned below and re-run the command ``` -Checkout to the required versions and branches in repos: - -```bash -# Optimism -cd ~/cerc/optimism -git checkout v1.0.4 -``` - Build the container images: ```bash diff --git a/app/data/stacks/fixturenet-optimism/stack.yml b/app/data/stacks/fixturenet-optimism/stack.yml index 61570e42..c483b8dc 100644 --- a/app/data/stacks/fixturenet-optimism/stack.yml +++ b/app/data/stacks/fixturenet-optimism/stack.yml @@ -3,12 +3,14 @@ name: fixturenet-optimism decription: "Optimism Fixturenet" repos: - github.com/cerc-io/go-ethereum + - github.com/cerc-io/lighthouse - github.com/dboreham/foundry - - github.com/ethereum-optimism/optimism - - github.com/ethereum-optimism/op-geth + - github.com/ethereum-optimism/optimism@v1.0.4 + - github.com/ethereum-optimism/op-geth@v1.101105.2 containers: - cerc/go-ethereum - cerc/lighthouse + - cerc/lighthouse-cli - cerc/fixturenet-eth-geth - cerc/fixturenet-eth-lighthouse - cerc/foundry diff --git a/app/data/stacks/mobymask-v2/README.md b/app/data/stacks/mobymask-v2/README.md index 880b6a35..b4563c42 100644 --- a/app/data/stacks/mobymask-v2/README.md +++ b/app/data/stacks/mobymask-v2/README.md @@ -18,26 +18,6 @@ laconic-so --stack mobymask-v2 setup-repositories NOTE: If repositories already exist and are checked out to different versions, `setup-repositories` command will throw an error. For getting around this, the repositories mentioned below can be removed and then run the command. -Checkout to the required versions and branches in repos - -```bash -# watcher-ts -cd ~/cerc/watcher-ts -git checkout v0.2.41 - -# mobymask-v2-watcher-ts -cd ~/cerc/mobymask-v2-watcher-ts -git checkout v0.1.1 - -# MobyMask -cd ~/cerc/MobyMask -git checkout v0.1.2 - -# Optimism -cd ~/cerc/optimism -git checkout v1.0.4 -``` - Build the container images: ```bash diff --git a/app/data/stacks/mobymask-v2/mobymask-only.md b/app/data/stacks/mobymask-v2/mobymask-only.md index 3dacef7a..1e525f60 100644 --- a/app/data/stacks/mobymask-v2/mobymask-only.md +++ b/app/data/stacks/mobymask-v2/mobymask-only.md @@ -14,22 +14,6 @@ laconic-so --stack mobymask-v2 setup-repositories --include github.com/cerc-io/M # If this throws an error as a result of being already checked out to a branch/tag in a repo, remove the repositories mentioned below and re-run the command ``` -Checkout to the required versions and branches in repos: - -```bash -# watcher-ts -cd ~/cerc/watcher-ts -git checkout v0.2.41 - -# mobymask-v2-watcher-ts -cd ~/cerc/mobymask-v2-watcher-ts -git checkout v0.1.1 - -# MobyMask -cd ~/cerc/MobyMask -git checkout v0.1.2 -``` - Build the container images: ```bash diff --git a/app/data/stacks/mobymask-v2/stack.yml b/app/data/stacks/mobymask-v2/stack.yml index 9ce16ca4..a9eb3b70 100644 --- a/app/data/stacks/mobymask-v2/stack.yml +++ b/app/data/stacks/mobymask-v2/stack.yml @@ -2,21 +2,24 @@ version: "1.0" name: mobymask-v2 repos: - github.com/cerc-io/go-ethereum + - github.com/cerc-io/lighthouse - github.com/dboreham/foundry - - github.com/ethereum-optimism/optimism - - github.com/ethereum-optimism/op-geth - - github.com/cerc-io/watcher-ts - - github.com/cerc-io/mobymask-v2-watcher-ts - - github.com/cerc-io/MobyMask + - github.com/ethereum-optimism/optimism@v1.0.4 + - github.com/ethereum-optimism/op-geth@v1.101105.2 + - github.com/cerc-io/watcher-ts@v0.2.43 + - github.com/cerc-io/mobymask-v2-watcher-ts@v0.1.1 + - github.com/cerc-io/MobyMask@v0.1.2 containers: - cerc/go-ethereum - cerc/lighthouse + - cerc/lighthouse-cli - cerc/fixturenet-eth-geth - cerc/fixturenet-eth-lighthouse - cerc/foundry - cerc/optimism-contracts - cerc/optimism-l2geth - cerc/optimism-op-batcher + - cerc/optimism-op-proposer - cerc/optimism-op-node - cerc/watcher-ts - cerc/watcher-mobymask-v2 diff --git a/app/data/stacks/mobymask-v2/watcher-p2p-network/watcher.md b/app/data/stacks/mobymask-v2/watcher-p2p-network/watcher.md index d5d4d53f..682ca0e7 100644 --- a/app/data/stacks/mobymask-v2/watcher-p2p-network/watcher.md +++ b/app/data/stacks/mobymask-v2/watcher-p2p-network/watcher.md @@ -30,22 +30,6 @@ Clone required repositories: # 100%|##############################################################################################################################################| 1.41k/1.41k [00:18<00:00, 76.4B/s] ``` -Checkout to the required versions and branches in repos: - - ```bash - # watcher-ts - cd ~/cerc/watcher-ts - git checkout v0.2.41 - - # mobymask-v2-watcher-ts - cd ~/cerc/mobymask-v2-watcher-ts - git checkout v0.1.1 - - # MobyMask - cd ~/cerc/MobyMask - git checkout v0.1.2 - ``` - Build the container images: ```bash