Skip to content

Commit

Permalink
Add prestate-reproducibility CI job
Browse files Browse the repository at this point in the history
  • Loading branch information
ImTei committed Jun 19, 2024
1 parent c85efe9 commit 4a2a66a
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 1 deletion.
41 changes: 40 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ workflows:
requires: ["asterisc-prestate"]
- op-e2e-asterisc-tests:
requires: ["devnet-allocs-including-asterisc"]
- prestate-reproducibility:
matrix:
parameters:
version: ["1.1.0", "1.2.0"]

jobs:
pnpm-monorepo:
Expand Down Expand Up @@ -359,4 +363,39 @@ jobs:
path: /testlogs
when: always
- store_test_results:
path: /tmp/test-results
path: /tmp/test-results

prestate-reproducibility:
docker:
- image: <<pipeline.parameters.ci_builder_image>>
parameters:
version:
type: string
steps:
- checkout
- setup_remote_docker
- run:
name: Fetch submodules for asterisc
command: git submodule update --init
- run:
name: Switch to tag
command: |
cd rvsol/lib/optimism
git fetch
git checkout "op-program/v<<parameters.version>>"
git submodule update --init --recursive
- run:
name: Build prestate
command: make reproducible-prestate
- run:
name: Verify prestate
command: |
EXPECTED_PRESTATE_HASH=$(jq -r '.["op-program"]["<<parameters.version>>"]' ./prestates.json)
ACTUAL=$(jq -r .pre ./bin/prestate-proof.json)
echo "Expected: ${EXPECTED_PRESTATE_HASH}"
echo "Actual: ${ACTUAL}"
if [[ "${EXPECTED_PRESTATE_HASH}" != "${ACTUAL}" ]]
then
echo "Prestate did not match expected"
exit 1
fi
6 changes: 6 additions & 0 deletions prestates.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"op-program": {
"1.1.0": "0x0338dc64405def7e3b9ce8f5076b422a846d831832617d227f13baf219cb5406",
"1.2.0": "0x0399525587d7ffb173aaa43f35e21b78f807a0bd3dc80ea6527f407732726351"
}
}

0 comments on commit 4a2a66a

Please sign in to comment.