Skip to content

Conversation

@MarcosNicolau
Copy link
Member

@MarcosNicolau MarcosNicolau commented May 5, 2025

Description

Adds missing functions for users to integrate an application with AlignedProofAggregationService. This consists of:

  • A way for user to verify that their proof has been aggregated on chain: For that the verifyProofInclusion in ProofAggregationService contract was added. Given the proof program id, public inputs and the merkle proof, it constructs the merkle root and returns a boolean indicating if the aggregated proof exists or not.
  • check_proof_verification: Given a proof, it queries the logs to find the proof, rebuilds the Merkle tree using the blob, and returns the Merkle path and root for the proof. This path is used as input for the verifyProofInclusion function in the contract.
  • is_proof_verified_on_chain: Similar to what is_proof_verified already does but in this case it calls the verifyProofInclusion in the contract. This is mostly used for simulations and the former should be preferred.

How to test it
To test it, you can do it via the example in #1925.

Type of change

  • New feature

Checklist

  • “Hotfix” to testnet, everything else to staging
  • Linked to Github Issue
  • This change depends on code or research by an external entity
    • Acknowledgements were updated to give credit
  • Unit tests added
  • This change requires new documentation.
    • Documentation has been added/updated.
  • This change is an Optimization
    • Benchmarks added/run
  • Has a known issue
  • If your PR changes the Operator compatibility (Ex: Upgrade prover versions)
    • This PR adds compatibility for operator for both versions and do not change batcher/docs/examples
    • This PR updates batcher and docs/examples to the newer version. This requires the operator are already updated to be compatible

@MarcosNicolau MarcosNicolau changed the base branch from testnet to refactor/use-lambdaworks-merkle-tree May 5, 2025 21:04
@MarcosNicolau MarcosNicolau self-assigned this May 5, 2025
@MarcosNicolau MarcosNicolau marked this pull request as ready for review May 7, 2025 14:20
@JuArce JuArce changed the title feat: verify aggregated proof on chain feat(aggregation_mode): verify aggregated proof on chain May 8, 2025
Copy link
Collaborator

@JuArce JuArce left a comment

Choose a reason for hiding this comment

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

There is missing updating the docs for the new functions
Also there is missing how to test this PR

Base automatically changed from refactor/use-lambdaworks-merkle-tree to staging May 8, 2025 20:29
@MarcosNicolau
Copy link
Member Author

There is missing updating the docs for the new functions
Also there is missing how to test this PR

#1925 adds an example with a guide to test this!

JuArce and others added 4 commits May 14, 2025 15:27
fix: add missing new line
chore: update program ids
# Conflicts:
#	contracts/scripts/anvil/state/alignedlayer-deployed-anvil-state.json
@MarcosNicolau MarcosNicolau force-pushed the feat/verify-agg-proof-on-chain branch from 572609f to fcb581a Compare May 15, 2025 16:19
Base automatically changed from fix/tree-openzeppelin-compliant to staging May 15, 2025 20:22
JuArce added 2 commits May 16, 2025 11:21
# Conflicts:
#	batcher/aligned-sdk/src/sdk/aggregation.rs
#	contracts/scripts/anvil/state/alignedlayer-deployed-anvil-state.json
update ethereum package contracts
add missing new line
@MarcosNicolau MarcosNicolau force-pushed the feat/verify-agg-proof-on-chain branch from 2959292 to 4352e3b Compare May 19, 2025 14:49
@MauroToscano MauroToscano enabled auto-merge May 20, 2025 14:43
@MauroToscano MauroToscano added this pull request to the merge queue May 20, 2025
Merged via the queue into staging with commit 124eba8 May 20, 2025
6 checks passed
@MauroToscano MauroToscano deleted the feat/verify-agg-proof-on-chain branch May 20, 2025 15:38
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.

4 participants