feat: Implement prove_evm_with_deferred() method in Pico SDK To Generate EVM-friendly Aggregated Proofs
#60
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
prove_evm()method would not work for Aggregator programs, i.e. any guest programs that batch and verify existing proofs withverify_pico_proof()will fail. This is because it internally callsself.prove()which in turn discards all deferred proofs that is written tostdinby callingwrite_pico_proof()for proof aggregation on the host-side.This as a result, causes the
COMBINEphase of the proving chain to fail for the Aggregator.In this PR, I implemented a
prove_evm_with_deferred()method that callsprove_combine()instead ofprove(). Once a combined proof has returned, it would continue along the proving chain ( COMPRESS -> EMBED -> ONCHAIN ) to generate a proof that is verifiable on-chain.Host side programs that want to generate EVM-friendly aggregated proofs, would then simply call
prove_evm_with_deferred().I have a working demo of the Pico zkVM integration with our AWS Nitro Attestation, which generates aggregated proof of verification for multiple Nitro Enclave Attestations.
I look forward to hearing your feedback! :)