Geth 1.13 (Cancun) update (#8)
- Changes contract tests for EIP-6780 (selfdestruct change) - see cerc-io/ipld-eth-server#264. - Beacon block roots are now injected into the blockchain before processing transactions (https://eips.ethereum.org/EIPS/eip-4788) Reviewed-on: #8 Reviewed-by: jonathanface <jonathanface@noreply.git.vdb.to>
This commit was merged in pull request #8.
This commit is contained in:
@@ -2,10 +2,11 @@
|
||||
|
||||
set -eu
|
||||
|
||||
geth_endpoint="$1"
|
||||
geth_endpoint="${1:-$ETH_HTTP_PATH}"
|
||||
|
||||
latest_block_hex=$(curl -s $geth_endpoint -X POST -H "Content-Type: application/json" \
|
||||
--data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":42}' | \
|
||||
jq -r .result)
|
||||
python3 -c 'import json, sys; print(int(json.load(sys.stdin)["result"], 16))' \
|
||||
)
|
||||
|
||||
printf "%d" $latest_block_hex
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
#!/bin/bash
|
||||
# Builds and deploys a stack with only what we need.
|
||||
# This script assumes we are running in the project root.
|
||||
|
||||
set -e
|
||||
|
||||
CONFIG_DIR=$(readlink -f "${CONFIG_DIR:-$(mktemp -d)}")
|
||||
|
||||
# Point stack-orchestrator to the multi-project root
|
||||
export CERC_REPO_BASE_DIR="${CERC_REPO_BASE_DIR:-..}"
|
||||
# v5 migrations only go up to version 18
|
||||
echo CERC_STATEDIFF_DB_GOOSE_MIN_VER=18 >> $CONFIG_DIR/stack.env
|
||||
|
||||
laconic_so="${LACONIC_SO:-laconic-so} --stack fixturenet-plugeth-tx --verbose"
|
||||
|
||||
set -x
|
||||
|
||||
if [[ -z $SKIP_BUILD ]]; then
|
||||
$laconic_so setup-repositories \
|
||||
--exclude github.com/cerc-io/ipld-eth-server,github.com/cerc-io/tx-spammer,github.com/dboreham/foundry \
|
||||
--branches-file ./test/stack-refs.txt
|
||||
|
||||
$laconic_so build-containers \
|
||||
--exclude cerc/ipld-eth-server,cerc/keycloak,cerc/tx-spammer,cerc/foundry
|
||||
fi
|
||||
|
||||
$laconic_so deploy \
|
||||
--include fixturenet-plugeth,ipld-eth-db \
|
||||
--env-file $CONFIG_DIR/stack.env \
|
||||
--cluster test up
|
||||
|
||||
set +x
|
||||
|
||||
bootnode_endpoint=localhost:$(docker port test-fixturenet-eth-bootnode-geth-1 9898 | head -1 | cut -d':' -f2)
|
||||
geth_endpoint=localhost:$(docker port test-fixturenet-eth-geth-1-1 8545 | head -1 | cut -d':' -f2)
|
||||
|
||||
# Extract the chain config and ID from genesis file
|
||||
curl -s $bootnode_endpoint/geth.json | jq '.config' > "$CONFIG_DIR/chain.json"
|
||||
|
||||
# Output vars if we are running on Github
|
||||
if [[ -n "$GITHUB_ENV" ]]; then
|
||||
echo ETH_CHAIN_ID="$(jq '.chainId' $CONFIG_DIR/chain.json)" >> "$GITHUB_ENV"
|
||||
echo ETH_CHAIN_CONFIG="$CONFIG_DIR/chain.json" >> "$GITHUB_ENV"
|
||||
echo ETH_HTTP_PATH=$geth_endpoint >> "$GITHUB_ENV"
|
||||
# Read a private key so we can send from a funded account
|
||||
echo DEPLOYER_PRIVATE_KEY="$(curl -s $bootnode_endpoint/accounts.csv | head -1 | cut -d',' -f3)" >> "$GITHUB_ENV"
|
||||
fi
|
||||
|
||||
export PGPASSWORD=password
|
||||
query_blocks_exist='SELECT exists(SELECT block_number FROM ipld.blocks LIMIT 1);'
|
||||
|
||||
echo "Waiting until we have some data written..."
|
||||
until [[ "$(psql -qtA cerc_testing -h localhost -U vdbm -p 8077 -c "$query_blocks_exist")" -eq 't' ]]; do
|
||||
sleep 2
|
||||
done
|
||||
Executable
+55
@@ -0,0 +1,55 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex -o pipefail
|
||||
|
||||
stack_dir=$(readlink -f "$1")
|
||||
[[ -d "$stack_dir" ]]
|
||||
|
||||
CONFIG_DIR=$(readlink -f "${CONFIG_DIR:-$(mktemp -d)}")
|
||||
# By default assume we are running in the project root.
|
||||
export CERC_REPO_BASE_DIR="${CERC_REPO_BASE_DIR:-$(git rev-parse --show-toplevel)/..}"
|
||||
|
||||
laconic_so="laconic-so --verbose --stack $stack_dir"
|
||||
|
||||
# Don't run geth/plugeth in the debugger, it will swallow error backtraces
|
||||
echo CERC_REMOTE_DEBUG=false >> $CONFIG_DIR/stack.env
|
||||
# Passing this lets us run eth_call forwarding tests without running ipld-eth-db
|
||||
echo CERC_RUN_STATEDIFF=${CERC_RUN_STATEDIFF:-true} >> $CONFIG_DIR/stack.env
|
||||
|
||||
|
||||
if [[ -z $SKIP_BUILD ]]; then
|
||||
# Prevent conflicting tty output
|
||||
export BUILDKIT_PROGRESS=plain
|
||||
|
||||
$laconic_so setup-repositories \
|
||||
--exclude git.vdb.to/cerc-io/ipld-eth-server
|
||||
$laconic_so build-containers \
|
||||
--exclude cerc/ipld-eth-server
|
||||
fi
|
||||
|
||||
if ! $laconic_so deploy \
|
||||
--exclude ipld-eth-server \
|
||||
--env-file $CONFIG_DIR/stack.env \
|
||||
--cluster test up
|
||||
then
|
||||
$laconic_so deploy --cluster test logs
|
||||
exit 1
|
||||
fi
|
||||
|
||||
set +x
|
||||
|
||||
# Get IPv4 endpoint of geth and bootnode file server
|
||||
bootnode_endpoint=localhost:$(docker port test-fixturenet-eth-bootnode-geth-1 9898 | head -1 | cut -d':' -f2)
|
||||
geth_endpoint=localhost:$(docker port test-fixturenet-eth-geth-1-1 8545 | head -1 | cut -d':' -f2)
|
||||
|
||||
# Extract the chain config and ID from genesis file
|
||||
curl -s $bootnode_endpoint/geth.json | jq '.config' > "$CONFIG_DIR/chain.json"
|
||||
|
||||
# Output vars if we are running on Github
|
||||
if [[ -n "$GITHUB_ENV" ]]; then
|
||||
echo ETH_CHAIN_ID="$(jq '.chainId' $CONFIG_DIR/chain.json)" >> "$GITHUB_ENV"
|
||||
echo ETH_CHAIN_CONFIG="$CONFIG_DIR/chain.json" >> "$GITHUB_ENV"
|
||||
echo ETH_HTTP_PATH=$geth_endpoint >> "$GITHUB_ENV"
|
||||
# Read a private key so we can send from a funded account
|
||||
echo DEPLOYER_PRIVATE_KEY="$(curl -s $bootnode_endpoint/accounts.csv | head -1 | cut -d',' -f3)" >> "$GITHUB_ENV"
|
||||
fi
|
||||
Reference in New Issue
Block a user