Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upstream sync #65

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/actions/setup-environment/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Setup test environment
description: Install everything we need to run the CI pipelines
runs:
using: "composite"
steps:
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1

- name: Install kurtosis
shell: bash
run: |
echo "deb [trusted=yes] https://apt.fury.io/kurtosis-tech/ /" | sudo tee /etc/apt/sources.list.d/kurtosis.list
sudo apt update
sudo apt install kurtosis-cli

- name: Start kurtosis engine
shell: bash
run: kurtosis engine start
1 change: 0 additions & 1 deletion .github/assets/check_rv32imac.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ crates_to_check=(
## optimism
reth-optimism-chainspec
reth-optimism-forks
reth-optimism-primitives
)

# Array to hold the results
Expand Down
1 change: 0 additions & 1 deletion .github/assets/check_wasm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ exclude_crates=(
reth-invalid-block-hooks # reth-provider
reth-libmdbx # mdbx
reth-mdbx-sys # mdbx
reth-payload-builder # reth-metrics
reth-provider # tokio
reth-prune # tokio
reth-stages-api # reth-provider, reth-prune
Expand Down
10 changes: 5 additions & 5 deletions .github/assets/hive/expected_failures.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,13 @@ rpc-compat:
- debug_getRawTransaction/get-invalid-hash (reth)

- eth_call/call-callenv (reth)
- eth_feeHistory/fee-history (reth)
- eth_getStorageAt/get-storage-invalid-key-too-large (reth)
- eth_getStorageAt/get-storage-invalid-key (reth)
- eth_getTransactionReceipt/get-access-list (reth)
- eth_getTransactionReceipt/get-blob-tx (reth)
- eth_getTransactionReceipt/get-dynamic-fee (reth)

# https://github.com/paradigmxyz/reth/issues/13879
- eth_createAccessList/create-al-contract-eip1559 (reth)
- eth_getBlockByNumber/get-genesis (reth)
- eth_getTransactionReceipt/get-setcode-tx (reth)

# https://github.com/paradigmxyz/reth/issues/8732
engine-withdrawals:
- Withdrawals Fork On Genesis (Paris) (reth)
Expand Down Expand Up @@ -49,5 +45,9 @@ engine-cancun:
- Blob Transaction Ordering, Multiple Clients (Cancun) (reth)
- Invalid PayloadAttributes, Missing BeaconRoot, Syncing=True (Cancun) (reth)
- Invalid NewPayload, ExcessBlobGas, Syncing=True, EmptyTxs=False, DynFeeTxs=False (Cancun) (reth)
- Invalid NewPayload, VersionedHashes, Syncing=False, EmptyTxs=False, DynFeeTxs=False (Cancun) (reth)
- Invalid NewPayload, VersionedHashes Version, Syncing=False, EmptyTxs=False, DynFeeTxs=False (Cancun) (reth)
- Invalid NewPayload, Incomplete VersionedHashes, Syncing=False, EmptyTxs=False, DynFeeTxs=False (Cancun) (reth)
- Invalid NewPayload, Extra VersionedHashes, Syncing=False, EmptyTxs=False, DynFeeTxs=False (Cancun) (reth)

sync: []
2 changes: 1 addition & 1 deletion .github/assets/hive/load_images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ IMAGES=(
"/tmp/smoke_genesis.tar"
"/tmp/smoke_network.tar"
"/tmp/ethereum_sync.tar"
"/tmp/reth_image.tar"
"/tmp/op_reth_image.tar"
)

# Loop through the images and load them
Expand Down
25 changes: 25 additions & 0 deletions .github/assets/kurtosis_op_network_params_local.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
ethereum_package:
participants:
- el_type: reth
cl_type: lighthouse
optimism_package:
chains:
- participants:
# first participant is sequencer
- el_type: op-geth
el_image: "ghcr.io/ethereum-optimism/op-geth:kurtosis-ci"
cl_type: op-node
cl_image: "ghcr.io/ethereum-optimism/op-node:kurtosis-ci"
cl_extra_params:
- "--l1.trustrpc=true"
- el_type: op-reth
el_image: "ghcr.io/paradigmxyz/op-reth:kurtosis-ci"
cl_type: op-node
cl_image: "ghcr.io/ethereum-optimism/op-node:kurtosis-ci"
cl_extra_params:
- "--l1.trustrpc=true"
batcher_params:
extra_params:
- "--throttle-interval=0"
network_params:
isthmus_time_offset: 0
18 changes: 18 additions & 0 deletions .github/assets/kurtosis_op_network_params_local_no_op_geth.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
ethereum_package:
participants:
- el_type: reth
cl_type: lighthouse
optimism_package:
chains:
- participants:
- el_type: op-reth
el_image: "ghcr.io/paradigmxyz/op-reth:kurtosis-ci"
cl_type: op-node
cl_image: "ghcr.io/ethereum-optimism/op-node:kurtosis-ci"
cl_extra_params:
- "--l1.trustrpc=true"
batcher_params:
extra_params:
- "--throttle-interval=0"
network_params:
isthmus_time_offset: 0
19 changes: 19 additions & 0 deletions .github/assets/kurtosis_op_network_params_local_no_op_reth.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
ethereum_package:
participants:
- el_type: reth
cl_type: lighthouse
optimism_package:
chains:
- participants:
- el_type: op-geth
el_image: "ghcr.io/ethereum-optimism/op-geth:kurtosis-ci"
cl_type: op-node
cl_image: "ghcr.io/ethereum-optimism/op-node:kurtosis-ci"
cl_extra_params:
- "--l1.trustrpc=true"
batcher_params:
extra_params:
- "--throttle-interval=0"
network_params:
holocene_time_offset: 0
isthmus_time_offset: 0
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
ethereum_package:
participants:
- el_type: reth
cl_type: lighthouse
optimism_package:
chains:
- participants:
# first participant is sequencer
- el_type: op-reth
el_image: "ghcr.io/paradigmxyz/op-reth:kurtosis-ci"
cl_type: op-node
cl_image: "ghcr.io/ethereum-optimism/op-node:kurtosis-ci"
cl_extra_params:
- "--l1.trustrpc=true"
- el_type: op-geth
el_image: "ghcr.io/ethereum-optimism/op-geth:kurtosis-ci"
cl_type: op-node
cl_image: "ghcr.io/ethereum-optimism/op-node:kurtosis-ci"
cl_extra_params:
- "--l1.trustrpc=true"
batcher_params:
extra_params:
- "--throttle-interval=0"
network_params:
holocene_time_offset: 0
isthmus_time_offset: 0
23 changes: 23 additions & 0 deletions .github/assets/kurtosis_op_network_params_remote.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
ethereum_package:
participants:
- el_type: reth
cl_type: lighthouse
optimism_package:
chains:
- participants:
# first participant is sequencer
- el_type: op-geth
el_image: us-docker.pkg.dev/oplabs-tools-artifacts/images/op-geth:latest
cl_type: op-node
cl_image: us-docker.pkg.dev/oplabs-tools-artifacts/images/op-node:latest
cl_extra_params:
- "--l1.trustrpc=true"
- el_type: op-reth
el_image: "ghcr.io/paradigmxyz/op-reth:kurtosis-ci"
cl_type: op-node
cl_image: us-docker.pkg.dev/oplabs-tools-artifacts/images/op-node:latest
cl_extra_params:
- "--l1.trustrpc=true"
batcher_params:
extra_params:
- "--throttle-interval=0"
16 changes: 16 additions & 0 deletions .github/assets/kurtosis_op_network_params_remote_no_op_geth.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
ethereum_package:
participants:
- el_type: reth
cl_type: lighthouse
optimism_package:
chains:
- participants:
- el_type: op-reth
el_image: "ghcr.io/paradigmxyz/op-reth:kurtosis-ci"
cl_type: op-node
cl_image: us-docker.pkg.dev/oplabs-tools-artifacts/images/op-node:latest
cl_extra_params:
- "--l1.trustrpc=true"
batcher_params:
extra_params:
- "--throttle-interval=0"
19 changes: 19 additions & 0 deletions .github/assets/kurtosis_op_network_params_remote_no_op_reth.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
ethereum_package:
participants:
- el_type: reth
cl_type: lighthouse
optimism_package:
chains:
- participants:
- el_type: op-geth
el_image: us-docker.pkg.dev/oplabs-tools-artifacts/images/op-geth:latest
cl_type: op-node
cl_image: us-docker.pkg.dev/oplabs-tools-artifacts/images/op-node:latest
cl_extra_params:
- "--l1.trustrpc=true"
batcher_params:
extra_params:
- "--throttle-interval=0"
network_params:
holocene_time_offset: 0
isthmus_time_offset: 0
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
ethereum_package:
participants:
- el_type: reth
cl_type: lighthouse
optimism_package:
chains:
- participants:
# first participant is sequencer
- el_type: op-reth
el_image: "ghcr.io/paradigmxyz/op-reth:kurtosis-ci"
cl_type: op-node
cl_image: us-docker.pkg.dev/oplabs-tools-artifacts/images/op-node:latest
cl_extra_params:
- "--l1.trustrpc=true"
- el_type: op-geth
el_image: us-docker.pkg.dev/oplabs-tools-artifacts/images/op-geth:latest
cl_type: op-node
cl_image: us-docker.pkg.dev/oplabs-tools-artifacts/images/op-node:latest
cl_extra_params:
- "--l1.trustrpc=true"
batcher_params:
extra_params:
- "--throttle-interval=0"
network_params:
holocene_time_offset: 0
isthmus_time_offset: 0
Empty file.
127 changes: 127 additions & 0 deletions .github/scripts/kurtosis-check-enclave-block-creation.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
#!/usr/bin/env bash

#
#
# This is a test script used mostly in the CI pipeline
#
# It will search for all EL clients in a specified kurtosis enclave
# and will check whether their blocks advance in a reasonable amount of time
#
# Usage:
#
# ./kurtosis-check-enclave-block-creation.sh <ENCLAVE_NAME> [TARGET_BLOCK_NUMBER] [NUMBER_OF_NAPS]
#
#

# Just so that we don't repeat ourselves
ENCLAVES_API_URL=http://127.0.0.1:9779/api/enclaves

# We pass the enclave name and the target block as script arguments
ENCLAVE_NAME=$1
if [ -z "$ENCLAVE_NAME" ]; then
echo "Please specify the enclave name as the first parameter"
exit 1
fi

# We default the target block to a good round 100
TARGET_BLOCK=$2
if [ -z "$TARGET_BLOCK" ]; then
TARGET_BLOCK=100
fi

# The number of sleeps the script will take
NUM_NAPS=$3
if [ -z "$NUM_NAPS" ]; then
NUM_NAPS=100
fi

echo "Checking whether EL clients in enclave $ENCLAVE_NAME reach target block $TARGET_BLOCK in reasonable time ($NUM_NAPS of 5s)"

# Get the enclave UUID from the API
#
# The API reponse is a JSON object with UUIDs as keys. To get the UUID we need to find a value
# with a matching "name" property.
#
# The "| values" at the end of the jq transformation will convert null to an empty string
ENCLAVE_ID=$(curl -s $ENCLAVES_API_URL | jq -r 'to_entries | map(select(.value.name == "'$ENCLAVE_NAME'")) | .[0].key | values')

# Make sure we got something
if [ -z "$ENCLAVE_ID" ]; then
echo "No enclave found for enclave $ENCLAVE_NAME"
exit 1
fi

echo "Got enclave UUID: $ENCLAVE_ID"

# Now get all the EL client services
#
# We assume the convention is to name them op-el-xxx
ENCLAVE_SERVICES=$(curl -s $ENCLAVES_API_URL/$ENCLAVE_ID/services)
ENCLAVE_EL_SERVICES=$(echo $ENCLAVE_SERVICES | jq -r 'to_entries | map(select(.key | startswith("op-el-"))) | map(.value)')

# Now get the EL client names and RPC ports and arrange them into single-line space-delimited strings
#
# This is useful for bash iteration below
ENCLAVE_EL_SERVICE_NAMES=$(echo $ENCLAVE_EL_SERVICES | jq -r 'map(.name) | join(" ")')
ENCLAVE_EL_SERVICE_RPC_PORTS=$(echo $ENCLAVE_EL_SERVICES | jq -r 'map(.public_ports.rpc.number) | join(" ")')

# Make sure we got something
if [ -z "$ENCLAVE_EL_SERVICE_NAMES" ]; then
echo "No EL clients found for enclave $ENCLAVE_NAME"
exit 1
fi

echo "Got enclave EL services: $ENCLAVE_EL_SERVICE_NAMES"
echo "Got enclave EL RPC ports: $ENCLAVE_EL_SERVICE_RPC_PORTS"

# Convert the lists into bash arrays
ENCLAVE_EL_SERVICE_NAMES_ARRAY=($ENCLAVE_EL_SERVICE_NAMES)
ENCLAVE_EL_SERVICE_RPC_PORTS_ARRAY=($ENCLAVE_EL_SERVICE_RPC_PORTS)

# Now check that the clients advance
for STEP in $(seq 1 $NUM_NAPS); do
echo "Check $STEP/$NUM_NAPS"

# Iterate over the names/RPC ports arrays
for I in "${!ENCLAVE_EL_SERVICE_NAMES_ARRAY[@]}"; do
SERVICE_NAME=${ENCLAVE_EL_SERVICE_NAMES_ARRAY[$I]}
SERVICE_RPC_PORT=${ENCLAVE_EL_SERVICE_RPC_PORTS_ARRAY[$I]}
SERVICE_RPC_URL="http://127.0.0.1:$SERVICE_RPC_PORT"

BLOCK_NUMBER=$(cast bn --rpc-url $SERVICE_RPC_URL)
echo " Got block for $SERVICE_NAME: $BLOCK_NUMBER"

# Check whether we reached the target block
if [ "$BLOCK_NUMBER" -gt "$TARGET_BLOCK" ]; then
echo " Target block $TARGET_BLOCK reached for $SERVICE_NAME"

# If so, we remove the service from the array
unset ENCLAVE_EL_SERVICE_NAMES_ARRAY[$I]
unset ENCLAVE_EL_SERVICE_RPC_PORTS_ARRAY[$I]
fi
done

# Since we used unset, we need to reindex the arrays, we need to remove any gaps left behind
ENCLAVE_EL_SERVICE_NAMES_ARRAY=("${ENCLAVE_EL_SERVICE_NAMES_ARRAY[@]}")
ENCLAVE_EL_SERVICE_RPC_PORTS_ARRAY=("${ENCLAVE_EL_SERVICE_RPC_PORTS_ARRAY[@]}")

# Now we check whether the arrays are empty
#
# This means all target blocks have been reached and we can exit fine
if [ ${#ENCLAVE_EL_SERVICE_NAMES_ARRAY[@]} -eq 0 ]; then
echo "All target blocks have been reached. Exiting."
exit 0
fi

sleep 5
done

echo "Target blocks have not been reached for the following services:"

for I in "${!ENCLAVE_EL_SERVICE_NAMES_ARRAY[@]}"; do
SERVICE_NAME=${ENCLAVE_EL_SERVICE_NAMES_ARRAY[$I]}

echo " $SERVICE_NAME"
done

exit 1
Loading