apollo_starknet_os_program,starknet_os: support PROOF_VERSION_V1 in check_proof_facts#14014
Conversation
PR SummaryMedium Risk Overview Renames the Cairo constant Reviewed by Cursor Bugbot for commit 46e192d. Bugbot is set up for automated code reviews on this repo. Configure here. |
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Yoni-Starkware
left a comment
There was a problem hiding this comment.
@Yoni-Starkware made 1 comment.
Reviewable status: 0 of 6 files reviewed, 1 unresolved discussion.
crates/apollo_starknet_os_program/src/cairo/starkware/starknet/core/os/execution/execution_constraints.cairo line 57 at r1 (raw file):
tempvar v1_diff = proof_header.proof_version - PROOF_VERSION_V1; assert v0_diff * v1_diff = 0; }
Suggestion:
// Validate the proof header.
static_assert ProofHeader.SIZE == 3;
let proof_header = cast(proof_facts, ProofHeader*);
assert proof_header.proof_variant = VIRTUAL_SNOS;
assert is_program_hash_allowed(proof_header.program_hash) = TRUE;
// Proof variant must be VIRTUAL_SNOS; proof version may be V0 (legacy) or V1 (current).
with_attr error_message("Unsupported proof version") {
tempvar proof_version = proof_header.proof_version;
assert (proof_version - PROOF_VERSION_V1) * (proof_version - PROOF_VERSION_V1) = 0;
}af28490 to
39b9d56
Compare
01c985a to
a2f547a
Compare
d0f4a98 to
d72bed0
Compare
90c0ffc to
e357e34
Compare
d72bed0 to
c496f63
Compare
e357e34 to
9396eaa
Compare
04f95dd to
558f5fc
Compare
106b8dd to
c1edbac
Compare
558f5fc to
8436836
Compare
AvivYossef-starkware
left a comment
There was a problem hiding this comment.
@AvivYossef-starkware reviewed 6 files and all commit messages, and made 1 comment.
Reviewable status: all files reviewed, 1 unresolved discussion.
c1edbac to
e78c9e8
Compare
693e3ee to
4ffdb3c
Compare
e78c9e8 to
2b0ff64
Compare
2b0ff64 to
8a42f7c
Compare
4ffdb3c to
46e192d
Compare

No description provided.