Skip to content

Commit c651859

Browse files
authored
ci: Add daily job to check reproducibility of cannon prestate (#10244)
* ci: Add scheduled job to check reproducibility of op-program preimages. * ci: Add slack notification on failure.
1 parent e062e73 commit c651859

File tree

1 file changed

+61
-0
lines changed

1 file changed

+61
-0
lines changed

.circleci/config.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ parameters:
2323
fault_proofs_dispatch:
2424
type: boolean
2525
default: false
26+
reproducibility_dispatch:
27+
type: boolean
28+
default: false
2629
kontrol_dispatch:
2730
type: boolean
2831
default: false
@@ -1143,6 +1146,50 @@ jobs:
11431146
- "op-program/bin/meta.json"
11441147
- "op-program/bin/prestate-proof.json"
11451148

1149+
preimage-reproducibility:
1150+
docker:
1151+
- image: <<pipeline.parameters.ci_builder_image>>
1152+
parameters:
1153+
version:
1154+
type: string
1155+
steps:
1156+
- checkout
1157+
- setup_remote_docker
1158+
- run:
1159+
name: Switch to tag
1160+
command: |
1161+
git fetch
1162+
git checkout "op-program/v<<parameters.version>>"
1163+
git submodule update --init --recursive
1164+
- run:
1165+
name: Set expected prestate hashes
1166+
command: |
1167+
if [[ "<<parameters.version>>" == "0.1.0" ]]; then
1168+
echo 'export EXPECTED_PRESTATE_HASH="0x038942ec840131a63c49fa514a3f0577ae401fd5584d56ad50cdf5a8b41d4538"' >> $BASH_ENV
1169+
elif [[ "<<parameters.version>>" == "0.2.0" ]]; then
1170+
echo 'export EXPECTED_PRESTATE_HASH="0x031e3b504740d0b1264e8cf72b6dde0d497184cfb3f98e451c6be8b33bd3f808"' >> $BASH_ENV
1171+
else
1172+
echo "Unknown prestate version <<parameters.version>>"
1173+
exit 1
1174+
fi
1175+
- run:
1176+
name: Build prestate
1177+
command: make reproducible-prestate
1178+
- run:
1179+
name: Verify prestate
1180+
command: |
1181+
ACTUAL=$(jq -r .pre ./op-program/bin/prestate-proof.json)
1182+
echo "Expected: ${EXPECTED_PRESTATE_HASH}"
1183+
echo "Actual: ${ACTUAL}"
1184+
if [[ "${EXPECTED_PRESTATE_HASH}" != "${ACTUAL}" ]]
1185+
then
1186+
echo "Prestate did not match expected"
1187+
exit 1
1188+
fi
1189+
- notify-failures-on-develop:
1190+
mentions: "@proofs-squad"
1191+
1192+
11461193
devnet-allocs:
11471194
docker:
11481195
- image: <<pipeline.parameters.ci_builder_image>>
@@ -2324,3 +2371,17 @@ workflows:
23242371
context:
23252372
- slack
23262373
- oplabs-etherscan
2374+
2375+
scheduled-preimage-reproducibility:
2376+
when:
2377+
or:
2378+
- equal: [build_daily, <<pipeline.schedule.name>> ]
2379+
# Trigger on manual triggers if explicitly requested
2380+
- equal: [ true, << pipeline.parameters.reproducibility_dispatch >> ]
2381+
jobs:
2382+
- preimage-reproducibility:
2383+
matrix:
2384+
parameters:
2385+
version: ["0.1.0", "0.2.0"]
2386+
context:
2387+
slack

0 commit comments

Comments
 (0)