-
Notifications
You must be signed in to change notification settings - Fork 59
feat: ability to verify e2e STARK proof + CLI command #1689
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: feat/prove-default-name
Are you sure you want to change the base?
Conversation
Commit: 4da0af9 |
@@ -322,6 +326,51 @@ impl<E: StarkFriEngine<SC>> GenericSdk<E> { | |||
Ok(proof) | |||
} | |||
|
|||
pub fn verify_e2e_stark_proof( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Taking
openvm/crates/vm/src/arch/vm.rs
Line 735 in 4da0af9
pub fn verify_segments<SC, E>( |
agg_stark_pk: AggStarkProvingKey, | ||
proof: &VmStarkProof<SC>, | ||
) -> Result<[F; CHUNK]> { | ||
let program_commit = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check if all required AIRs are present. Otherwise .main_trace[PROGRAM_CACHED_TRACE_INDEX]
could be about another AIR.
@@ -322,6 +326,51 @@ impl<E: StarkFriEngine<SC>> GenericSdk<E> { | |||
Ok(proof) | |||
} | |||
|
|||
pub fn verify_e2e_stark_proof( | |||
&self, | |||
agg_stark_pk: AggStarkProvingKey, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pass a reference instead of a value.
&self, | ||
agg_stark_pk: AggStarkProvingKey, | ||
proof: &VmStarkProof<SC>, | ||
) -> Result<[F; CHUNK]> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Return AppExecutionCommit
instead of just exe commit.
.per_air | ||
.iter() | ||
.find(|p| p.air_id == PUBLIC_VALUES_AIR_ID) | ||
.unwrap(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this function returns a Result
, throw an error instead of panic when PublicValueAir
is absent.
.unwrap(); | ||
let pvs: &VmVerifierPvs<_> = | ||
public_values_air_proof_data.public_values[..VmVerifierPvs::<u8>::width()].borrow(); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check if program terminates with exit code = 0.
Resolves INT-4064