Skip to content
Open
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
74 changes: 31 additions & 43 deletions .github/workflows/main-eest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
name: Run functional tests
runs-on: ubuntu-latest
needs: extract-rust-version
timeout-minutes: 120 # TODO: change to 60 once the exex witness generation is optimized.
timeout-minutes: 120

steps:
- name: Checkout repository
Expand All @@ -41,19 +41,6 @@ jobs:
- name: Cleanup Space
uses: ./.github/actions/cleanup # zizmor: ignore[unpinned-uses]

- name: Install bitcoind
env:
BITCOIND_VERSION: "30.2"
BITCOIND_ARCH: "x86_64-linux-gnu"
run: |
curl -fsSLO --proto "=https" --tlsv1.3 "https://bitcoincore.org/bin/bitcoin-core-$BITCOIND_VERSION/bitcoin-$BITCOIND_VERSION-$BITCOIND_ARCH.tar.gz"
curl -fsSLO --proto "=https" --tlsv1.3 "https://bitcoincore.org/bin/bitcoin-core-$BITCOIND_VERSION/SHA256SUMS"
sha256sum --ignore-missing --check SHA256SUMS
tar xzf "bitcoin-$BITCOIND_VERSION-$BITCOIND_ARCH.tar.gz"
sudo install -m 0755 -t /usr/local/bin bitcoin-"$BITCOIND_VERSION"/bin/*
bitcoind --version
rm -rf SHA256SUMS "bitcoin-$BITCOIND_VERSION" "bitcoin-$BITCOIND_VERSION-$BITCOIND_ARCH.tar.gz"

- name: Install uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
Expand Down Expand Up @@ -81,57 +68,58 @@ jobs:
uses: ./.github/actions/sp1-core-runner-override # zizmor: ignore[unpinned-uses]

- name: Build Cargo project
run: cargo build --locked -F debug-utils -F sequencer --bin strata --bin strata-signer --bin strata-datatool --bin strata-test-cli
run: |
cargo build --locked -p alpen-client --no-default-features --features sequencer --bin alpen-client

- name: Run basic env in fntests
- name: Run alpen EEST env in fntests
env:
NO_COLOR: "1"
LOG_LEVEL: "info"
run: |
sudo apt-get install -y screen
NEWPATH="$(realpath target/debug/)"
export PATH="${NEWPATH}:${PATH}"
which strata
which alpen-client
cd functional-tests
screen -dmS basic_env uv run python entry.py --keep-alive basic
sleep 20 # Wait for the service to start
screen -dmS alpen_eest_env uv run python entry.py --keep-alive alpen_eest
if ! ../contrib/wait-for-json-rpc.sh http://localhost:30303 120; then
find _dd -type f -name "service.log" -print -exec tail -100 {} \; || true
exit 1
fi

- name: Capture EEST start block
run: |
START_BLOCK="$(curl -sf -X POST http://localhost:30303 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' \
| python3 -c 'import json,sys; print(int(json.load(sys.stdin)["result"], 16))')"
echo "EEST_START_BLOCK=${START_BLOCK}" >> "${GITHUB_ENV}"

- name: Run tests
id: runtests
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
git clone https://github.com/alpenlabs/execution-spec-tests
cd execution-spec-tests
uv python install 3.11
uv python pin 3.11
uv sync --all-extras
uv run solc-select use 0.8.24 --always-install
uv run execute remote \
-m state_test \
--fork=Prague \
--rpc-endpoint=http://localhost:12603 \
--rpc-seed-key 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 \
--rpc-chain-id 2892 \
--tx-wait-timeout 30 \
-v
./contrib/run-eest-remote.sh \
--rpc-endpoint http://localhost:30303 \
--fork Prague \
--tx-wait-timeout 120
continue-on-error: true

- name: Generate a proof of EE blocks execution.
working-directory: docker
- name: Assert EEST blocks reached confirmed EE/OL status
if: always() && steps.runtests.outcome != 'skipped'
run: |
chmod +x test_ee_proof.sh
./test_ee_proof.sh local
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the whole purpose of this entire pipeline, at least the way I designed it, was to have our EE proofs (for now, chunk proofs) to be generated against the EF tests load (e.g. against the blocks with all these crazy transactions).
without this, we are quite literally testing pure Reth EVM against EF tests (which is pointless).

IMO, the essense of the effort should be directed towards restoring that logic (and re-adopting it for chunk proofs).

./contrib/assert-eest-prover-pipeline.sh \
--rpc-endpoint http://localhost:30303 \
--bitcoin-rpc-url http://user:password@localhost:18444 \
--bitcoin-wallet testwallet \
--advanced-from "${EEST_START_BLOCK}" \
--timeout 900

- name: Stop service
if: always()
run: |
screen -S basic_env -X quit
screen -S alpen_eest_env -X quit || true

- name: Check tests execution
# the purpose of the workflow is twofold:
# - run the EF tests
# - make sure EE proof is completed with EF txns (regardless if some tests have failed)
# Thus, we check the whole logic here.
if: steps.runtests.outcome == 'failure'
run: |
echo "Functional tests failed"
Expand Down
102 changes: 67 additions & 35 deletions .github/workflows/staging-eest.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Ethereum Execution Spec tests against staging docker.
name: Ethereum Execution Spec tests against staging alpen-client docker.

on:
schedule:
Expand All @@ -19,12 +19,31 @@ jobs:
runs-on: ubuntu-latest
environment:
name: development
timeout-minutes: 30
timeout-minutes: 120
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v5
with:
persist-credentials: false

- name: Extract Rust toolchain version
id: extract
uses: ./.github/actions/extract-rust-version # zizmor: ignore[unpinned-uses]

- name: Set up Rust
env:
RUST_NIGHTLY: ${{ steps.extract.outputs.rust-version }}
run: |
rustup toolchain install "$RUST_NIGHTLY" --profile minimal
rustup default "$RUST_NIGHTLY"

- name: Install protoc
uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0

- name: Rust cache
uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2
with:
cache-on-failure: true

- name: Configure AWS ECR Details
uses: aws-actions/configure-aws-credentials@ec61189d14ec14c8efccab744f656cffd0e33f37 # v4
with:
Expand Down Expand Up @@ -58,53 +77,66 @@ jobs:
docker pull "${IMG_URL}"
docker tag "${IMG_URL}" "alpen-client:latest"

- name: Generate alpen-client keys
- name: Generate full-stack docker config
run: |
pip3 install coincurve
cd docker && ./init-alpen-client-keys.sh
cargo build --locked --release --bin strata-datatool
cd docker
./init-network.sh --sequencer ../target/release/strata-datatool

- name: Start services
run: |
docker compose --env-file docker/.env.alpen-client \
docker compose --env-file docker/.env.alpen \
-f docker/docker-compose-eest.yml up -d --build

- name: Wait for alpen-client to be ready
run: |
echo "Waiting for alpen-client RPC..."
for _i in $(seq 1 30); do
if curl -sf -X POST http://localhost:8545 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' > /dev/null 2>&1; then
echo "alpen-client RPC is up"
exit 0
fi
sleep 2
done
echo "alpen-client failed to start"
docker logs alpen_eest
exit 1
if ! ./contrib/wait-for-json-rpc.sh http://localhost:8545 60; then
echo "alpen-client failed to start"
docker logs alpen_eest
exit 1
fi

- name: Capture EEST start block
run: |
START_BLOCK="$(curl -sf -X POST http://localhost:8545 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' \
| python3 -c 'import json,sys; print(int(json.load(sys.stdin)["result"], 16))')"
echo "EEST_START_BLOCK=${START_BLOCK}" >> "${GITHUB_ENV}"

- name: Run tests
id: runtests
run: |
./contrib/run-eest-remote.sh \
--rpc-endpoint http://localhost:8545 \
--fork Prague \
--tx-wait-timeout 120
continue-on-error: true

- name: Assert EEST blocks reached confirmed EE/OL status
if: always() && steps.runtests.outcome != 'skipped'
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
git clone https://github.com/alpenlabs/execution-spec-tests
cd execution-spec-tests
uv python install 3.11
uv python pin 3.11
uv sync --all-extras
uv run solc-select use 0.8.24 --always-install
uv run execute remote \
-m state_test \
--fork=Shanghai \
--rpc-endpoint=http://localhost:8545 \
--rpc-seed-key 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 \
--rpc-chain-id 2892 \
--tx-wait-timeout 30 \
-v
./contrib/assert-eest-prover-pipeline.sh \
--rpc-endpoint http://localhost:8545 \
--bitcoin-rpc-url http://rpcuser:rpcpassword@localhost:18443 \
--bitcoin-wallet default \
--advanced-from "${EEST_START_BLOCK}" \
--timeout 900

- name: Tear down services
if: always()
run: |
docker logs alpen_eest || true
docker compose --env-file docker/.env.alpen-client \
-f docker/docker-compose-eest.yml down
docker logs eest_strata || true
docker logs eest_bitcoind || true
if [ -f docker/.env.alpen ]; then
docker compose --env-file docker/.env.alpen \
-f docker/docker-compose-eest.yml down
fi

- name: Check tests execution
if: steps.runtests.outcome == 'failure'
run: |
echo "Functional tests failed"
exit 1
9 changes: 7 additions & 2 deletions bin/alpen-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,12 @@ sequencer = [
]
# SP1 remote proving for the EE chunk + acct provers. Required for
# production; native-only test builds can drop this feature.
sp1 = ["dep:zkaleido-sp1-host", "strata-paas/remote", "strata-zkvm-hosts/sp1"]
sp1 = [
"dep:strata-zkvm-hosts",
"dep:zkaleido-sp1-host",
"strata-paas/remote",
"strata-zkvm-hosts/sp1",
]

[[bin]]
name = "alpen-client"
Expand Down Expand Up @@ -73,7 +78,7 @@ strata-proofimpl-alpen-chunk.workspace = true
strata-service.workspace = true
strata-snark-acct-runtime.workspace = true
strata-snark-acct-types.workspace = true
strata-zkvm-hosts.workspace = true
strata-zkvm-hosts = { workspace = true, optional = true }
zkaleido.workspace = true
zkaleido-sp1-host = { workspace = true, optional = true }

Expand Down
Loading
Loading