Add recursive-tree e2e goldens over the leaf bootloader#388
Add recursive-tree e2e goldens over the leaf bootloader#388YairVaknin-starkware wants to merge 1 commit into
Conversation
PR SummaryLow Risk Overview
Reviewed by Cursor Bugbot for commit f2839a4. Bugbot is set up for automated code reviews on this repo. Configure here. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## yairv/packed_node_preprocessed_root #388 +/- ##
=======================================================================
+ Coverage 65.59% 65.88% +0.28%
=======================================================================
Files 45 45
Lines 5906 5906
=======================================================================
+ Hits 3874 3891 +17
+ Misses 2032 2015 -17 🚀 New features to boost your workflow:
|
83cda2e to
4ce7228
Compare
OmriEshhar1
left a comment
There was a problem hiding this comment.
@OmriEshhar1 made 1 comment.
Reviewable status: 0 of 21 files reviewed, 1 unresolved discussion (waiting on Gali-StarkWare and YairVaknin-starkware).
a discussion (no related file):
it looks like there are at least 3 separate changes here:
- refactor in leaf_prover (prove_leaf_from_files)
- changes to canonical
- 'golden' test
Consider separating to 3 (or more) more manageable PRs.
4ce7228 to
8d5a7ef
Compare
2e6febc to
e833b2d
Compare
8d5a7ef to
22adf2a
Compare
YairVaknin-starkware
left a comment
There was a problem hiding this comment.
@YairVaknin-starkware made 1 comment.
Reviewable status: 0 of 22 files reviewed, 1 unresolved discussion (waiting on Gali-StarkWare and OmriEshhar1).
a discussion (no related file):
Previously, OmriEshhar1 wrote…
it looks like there are at least 3 separate changes here:
- refactor in leaf_prover (prove_leaf_from_files)
- changes to canonical
- 'golden' test
Consider separating to 3 (or more) more manageable PRs.
Done.
e833b2d to
7eb6b56
Compare
22adf2a to
fc028e9
Compare
7eb6b56 to
a8e328f
Compare
fc028e9 to
976e3e6
Compare
a8e328f to
982b962
Compare
976e3e6 to
1bec20e
Compare
OmriEshhar1
left a comment
There was a problem hiding this comment.
@OmriEshhar1 reviewed 22 files and all commit messages, and resolved 1 discussion.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on Gali-StarkWare).
1bec20e to
5059e8a
Compare
982b962 to
83646a1
Compare
5059e8a to
fa3345e
Compare
OmriEshhar1
left a comment
There was a problem hiding this comment.
@OmriEshhar1 reviewed 12 files and all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on Gali-StarkWare).
Add goldens at `test_data/goldens/four_leaves/`: a real leaf (the leaf simple bootloader running a simple-output task, proven end-to-end by `leaf_prover`, wrapped into a `LeafInput` with the hashed-output preimage injected the way the backend does) duplicated 4x and folded. `root_outputs.json` is the root's eight raw u32 digest words; `root_packed.json` carries only per-node preprocessed roots down to each leaf's `Plain` preimage reveal (every digest in between is recomputable). `supported_preprocessed_roots.json` is the unpacker's trust-anchor list (the circuit-world analogue of the supported program hash lists). The committed `leaf_simple_bootloader_compiled.json` is compiled from the main starkware repo revision that moves `run_simple_bootloader_single_task` into `run_simple_bootloader.cairo` (the goldens are proven against it). The new `test_golden_four_leaves_e2e` test is the true end-to-end AND the goldens generator: it runs `leaf_prover` itself (via `prove_leaf_from_files`), folds 4 copies, and asserts both the independently recomputed hash tree (every hash layer, from the raw preimage up) and equality with the committed goldens; run with `FIX=1` to regenerate them (see the e2e module docs). The fold e2e tests load the golden leaf, replacing the interim `leaf_fixture.json` (same content), which is removed. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
83646a1 to
ae52f97
Compare
fa3345e to
f2839a4
Compare
Gali-StarkWare
left a comment
There was a problem hiding this comment.
@Gali-StarkWare reviewed 22 files and all commit messages, and made 1 comment.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on YairVaknin-starkware).
crates/stwo_run_and_prove_recursive_tree/src/tests.rs line 211 at r5 (raw file):
} /// The golden `leaf_prover` output the cheaper e2e folds duplicate their leaves from: the leaf
I didn't know we're in ancient greece :)
Code quote:
The golden `leaf_prover`
Add goldens at
test_data/goldens/four_leaves/: a real leaf (the leaf simple bootloader running a simple-output task, proven end-to-end byleaf_prover, wrapped into aLeafInputwith the hashed-output preimage injected the way the backend does) duplicated 4x and folded.supported_preprocessed_roots.jsonis the unpacker's trust-anchor list (the circuit-world analogue of the supported program hash lists). The committedleaf_simple_bootloader_compiled.json(landed in #391) is compiled from the main starkware repo revision that movesrun_simple_bootloader_single_taskintorun_simple_bootloader.cairo(the goldens are proven against it).The new
test_golden_four_leaves_e2etest is the true end-to-end AND the goldens generator: it runsleaf_proveritself (viaprove_leaf_from_files), folds 4 copies, and asserts both the independently recomputed hash tree (every hash layer, from the raw preimage up) and equality with the committed goldens; run withFIX=1to regenerate them (see the e2e module docs). The fold e2e tests switch from the interimleaf_fixture.json(same content, removed here) to the golden leaf.Stack (4/4): prove_leaf_from_files (#390) ← retarget canonical (#391) ← PackedNode roots (#392) ← this.
🤖 Generated with Claude Code
This change is