Skip to content

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

Open
wants to merge 1 commit into
base: feat/prove-default-name
Choose a base branch
from

Conversation

stephenh-axiom-xyz
Copy link
Contributor

Resolves INT-4064

Copy link

group app.proof_time_ms app.cycles app.cells_used leaf.proof_time_ms leaf.cycles leaf.cells_used
verify_fibair (+15 [+1.3%]) 1,147 334,071 17,676,446 - - -
fibonacci (+14 [+0.6%]) 2,485 1,500,277 50,589,503 - - -
regex (+113 [+1.5%]) 7,490 4,165,226 166,511,152 - - -
ecrecover (-31 [-2.2%]) 1,357 (+20412 [+7.1%]) 309,859 (+672913 [+4.7%]) 15,143,099 - - -
pairing (-121 [-2.7%]) 4,438 (+36796 [+2.0%]) 1,857,232 (+1223114 [+1.3%]) 97,055,521 - - -

Commit: 4da0af9

Benchmark Workflow

@@ -322,6 +326,51 @@ impl<E: StarkFriEngine<SC>> GenericSdk<E> {
Ok(proof)
}

pub fn verify_e2e_stark_proof(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Taking

pub fn verify_segments<SC, E>(
as an example and see what's missing.

agg_stark_pk: AggStarkProvingKey,
proof: &VmStarkProof<SC>,
) -> Result<[F; CHUNK]> {
let program_commit =
Copy link
Contributor

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,
Copy link
Contributor

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]> {
Copy link
Contributor

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();
Copy link
Contributor

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();

Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants