Skip to content

Conversation

@alrevuelta
Copy link
Collaborator

@alrevuelta alrevuelta commented Nov 5, 2025

WIP: Do not merge.

Notes (to be organized):

  • This PR introduces support for proof aggregation, which allows to verify multiple aggchain state transitions in a single call, verifying an aggregated proof.
  • The proof aggregation route logic from the AgglayerGateway reuses the storage slot of the deprecated PP route. Some types are reused as well. Roles are reused as well and names are not changed to avoid breaking changes. See comments.
  • This PR introduces breaking changes. Old proofs will no longer verify. The function verifyPessimisticTrustedAggregator no longer exists and now verifyAggregatedProofTrusted shall be used. This new function wont work with PolygonPessimisticConsensus, as that path is deprecated as well.
  • New versions:
    • AgglayerGateway = v2.0.0
    • AgglayerManager = v2.0.0
  • A new event is introduced:
    • VerifyAggregatedProof(bytes32 indexed prevArer, bytes32 indexed newArer)

TODO:

  • Finish implementation
  • Tests
    • Fix existing tests
    • Fix test with real prover
    • Test upgrades
    • Test multi proofs (mocked/real)
  • Initialize lastAgglayerRollupExitRoot

Comment on lines 165 to 186
/// @notice Adds a verifier route. This enable proofs to be routed to this verifier.
/// @dev Only callable by the owner. The owner is responsible for ensuring that the specified
/// verifier is correct with a valid VERIFIER_HASH. Once a route to a verifier is added, it
/// cannot be removed.
/// @param pessimisticVKeySelector The verifier selector to add.
/// @param verifier The address of the verifier contract. This verifier MUST implement the
/// ISP1VerifierWithHash interface.
/// @param pessimisticVKey The verification key to be used for verifying pessimistic proofs.
function addPessimisticVKeyRoute(
bytes4 pessimisticVKeySelector,
address verifier,
bytes32 pessimisticVKey
) external;

/// @notice Freezes a verifier route. This prevents proofs from being routed to this verifier.
/// @dev Only callable by the owner. Once a route to a verifier is frozen, it cannot be
/// unfrozen.
/// @param pessimisticVKeySelector The verifier selector to freeze.
function freezePessimisticVKeyRoute(
bytes4 pessimisticVKeySelector
) external;

Copy link
Collaborator

Choose a reason for hiding this comment

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

why delet and not replace the funcitons in the interface?¿

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

wops, missed this comment. fixed
cea36c2

@alrevuelta alrevuelta changed the base branch from feature/v12 to polpesconsensus-clean1 December 2, 2025 10:01
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.

3 participants