diff --git a/stack-orchestrator/compose/docker-compose-fixturenet-eth.yml b/stack-orchestrator/compose/docker-compose-fixturenet-eth.yml index 4608a2a..c4ba80d 100644 --- a/stack-orchestrator/compose/docker-compose-fixturenet-eth.yml +++ b/stack-orchestrator/compose/docker-compose-fixturenet-eth.yml @@ -22,8 +22,6 @@ services: - SYS_PTRACE environment: CERC_REMOTE_DEBUG: ${CERC_REMOTE_DEBUG:-true} - CERC_RUN_STATEDIFF: ${CERC_RUN_STATEDIFF:-detect} - CERC_STATEDIFF_DB_NODE_ID: 1 CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG} env_file: - ../config/fixturenet-eth/fixturenet-eth.env diff --git a/stack-orchestrator/config/fixturenet-eth/fixturenet-eth.env b/stack-orchestrator/config/fixturenet-eth/fixturenet-eth.env index 695c8fa..9943882 100644 --- a/stack-orchestrator/config/fixturenet-eth/fixturenet-eth.env +++ b/stack-orchestrator/config/fixturenet-eth/fixturenet-eth.env @@ -11,17 +11,7 @@ JWT="0x6cdcac3501046a08e186730dd8bd136cfaf0fdc1fc955f6e15ad3068c0ff2af0" # URL to download the ENR of the lighthouse bootnode (generated at first start). ENR_URL="http://fixturenet-eth-bootnode-lighthouse:3000/bootnode/enr.dat" -# DB connection settings for statediffing (see docker-compose-db.yml) -CERC_STATEDIFF_DB_HOST="ipld-eth-db" -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:-18} -CERC_STATEDIFF_DB_LOG_STATEMENTS="${CERC_STATEDIFF_DB_LOG_STATEMENTS:-false}" -CERC_STATEDIFF_WORKERS=2 - -CERC_GETH_VMODULE="statediff/*=5,rpc/*=5" +CERC_GETH_VMODULE="rpc/*=5" CERC_GETH_VERBOSITY=${CERC_GETH_VERBOSITY:-3} # Used by Lighthouse diff --git a/stack-orchestrator/container-build/cerc-fixturenet-eth-geth/run-el.sh b/stack-orchestrator/container-build/cerc-fixturenet-eth-geth/run-el.sh index f84befd..d45e144 100755 --- a/stack-orchestrator/container-build/cerc-fixturenet-eth-geth/run-el.sh +++ b/stack-orchestrator/container-build/cerc-fixturenet-eth-geth/run-el.sh @@ -50,65 +50,6 @@ else 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 - - OTHER_OPTS="" - # miner options were removed in v1.12 - GETH_VERSION=$(geth --version | grep -io '[0-9][0-9a-z.-]*') - if echo -e "$GETH_VERSION\n1.12" | sort -Vc; then - OTHER_OPTS="--miner.threads=1" - fi - $START_CMD \ --datadir="${CERC_ETH_DATADIR}" \ --bootnodes="${ENODE}" \ @@ -116,7 +57,7 @@ else --http \ --http.addr="0.0.0.0" \ --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="*" \ --authrpc.addr="0.0.0.0" \ --authrpc.vhosts="*" \ @@ -124,7 +65,7 @@ else --ws \ --ws.addr="0.0.0.0" \ --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="*" \ --networkid="${NETWORK_ID}" \ --netrestrict="${NETRESTRICT}" \ @@ -136,10 +77,9 @@ else --metrics \ --metrics.addr="0.0.0.0" \ --verbosity=${CERC_GETH_VERBOSITY:-3} \ - --log.vmodule="${CERC_GETH_VMODULE:-statediff/*=5}" \ + --log.vmodule="${CERC_GETH_VMODULE}" \ --miner.etherbase="${ETHERBASE}" \ ${OTHER_OPTS} \ - ${STATEDIFF_OPTS} \ & geth_pid=$! diff --git a/stack-orchestrator/stacks/fixturenet-eth/README.md b/stack-orchestrator/stacks/fixturenet-eth/README.md index 398b8b3..0ee926f 100644 --- a/stack-orchestrator/stacks/fixturenet-eth/README.md +++ b/stack-orchestrator/stacks/fixturenet-eth/README.md @@ -59,60 +59,6 @@ $ laconic-so --stack ~/cerc/fixturenet-eth-stacks/stacks/fixturenet-eth deploy e 3 ``` -## Additional pieces - -Several other containers can used with the basic `fixturenet-eth`: - -* `ipld-eth-db` (enables statediffing) -* `ipld-eth-server` (GQL and Ethereum API server, requires `ipld-eth-db`) -* `ipld-eth-beacon-db` and `ipld-eth-beacon-indexer` (for indexing Beacon chain blocks) -* `eth-probe` (captures eth1 tx gossip) -* `keycloak` (nginx proxy with keycloak auth for API authentication) -* `tx-spammer` (generates and sends automated transactions to the fixturenet) - -It is not necessary to use them all at once, but a complete example follows: - -``` -# Setup -$ laconic-so setup-repositories --include git.vdb.to/cerc-io/go-ethereum,git.vdb.to/cerc-io/ipld-eth-db,git.vdb.to/cerc-io/ipld-eth-server,github.com/cerc-io/ipld-eth-beacon-db,github.com/cerc-io/ipld-eth-beacon-indexer,github.com/cerc-io/eth-probe,git.vdb.to/cerc-io/tx-spammer - -# Build -$ laconic-so build-containers --include cerc/go-ethereum,cerc/lighthouse,cerc/fixturenet-eth-geth,cerc/fixturenet-eth-lighthouse,cerc/ipld-eth-db,cerc/ipld-eth-server,cerc/ipld-eth-beacon-db,cerc/ipld-eth-beacon-indexer,cerc/eth-probe,cerc/keycloak,cerc/tx-spammer - -# Deploy -$ laconic-so deploy-system --include db,fixturenet-eth,ipld-eth-server,ipld-eth-beacon-db,ipld-eth-beacon-indexer,eth-probe,keycloak,tx-spammer up - -# Status - -$ container-build/cerc-fixturenet-eth-lighthouse/scripts/status.sh -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 - -$ docker ps -f 'name=laconic' --format 'table {{.Names}}\t{{.Ports}}' | cut -d'-' -f3- | sort -NAMES PORTS -eth-probe-db-1 0.0.0.0:55849->5432/tcp -eth-probe-mq-1 -eth-probe-probe-1 -fixturenet-eth-bootnode-geth-1 8545-8546/tcp, 30303/udp, 0.0.0.0:55847->9898/tcp, 0.0.0.0:55848->30303/tcp -fixturenet-eth-bootnode-lighthouse-1 -fixturenet-eth-geth-1-1 8546/tcp, 30303/tcp, 30303/udp, 0.0.0.0:55851->8545/tcp -fixturenet-eth-geth-2-1 8545-8546/tcp, 30303/tcp, 30303/udp -fixturenet-eth-lighthouse-1-1 0.0.0.0:55858->8001/tcp -fixturenet-eth-lighthouse-2-1 -ipld-eth-beacon-db-1 127.0.0.1:8076->5432/tcp -ipld-eth-beacon-indexer-1 -ipld-eth-db-1 127.0.0.1:8077->5432/tcp -ipld-eth-server-1 127.0.0.1:8081-8082->8081-8082/tcp -keycloak-1 8443/tcp, 0.0.0.0:55857->8080/tcp -keycloak-db-1 0.0.0.0:55850->5432/tcp -keycloak-nginx-1 0.0.0.0:55859->80/tcp -migrations-1 -tx-spammer-1 -``` - ## Clean up Stop all services running in the background: