Skip to content

Conversation

@goran-ethernal
Copy link
Contributor

🔄 Changes Summary

This PR adds the validation of GlobalExitRoots on aggsender-validator that want to be injected by an aggoracle.

For this purpose, a new gRPC endpoint is added on the validator, called /aggkit.aggsender.validator.v1.AggsenderValidator/ValidateGER:

// Method to validate a Global Exit Root
    rpc ValidateGER(ValidateGERRequest) returns (ValidateGERResponse);

 // Request to validate a GER.
 message ValidateGERRequest {
   // GER to be validated
   agglayer.interop.types.v1.FixedBytes32 ger = 1;
 }

  // Response to a GER validation request.
 message ValidateGERResponse {
   // The signature provided by the aggsender validator.
   agglayer.interop.types.v1.FixedBytes65 signature = 1;
 }

If the given GER exists on the L1 GlobalExitRootManager contract, for a given block finality, the validator will sign the GER, and return a signature. Otherwise, it will fail, and return an error.

⚠️ Breaking Changes

NA

📋 Config Updates

  • 🧾 Diff/Config snippet:
  • Added GlobalExitRootL1 param in the AggSender config which represents the address of the global exit root manager contract on L1.
  • Added GERValidateConfig section to the Validator which is comprised of these parameters:
    • GlobalExitRootL1Addr - address of the global exit root manager contract on L1.
    • BlockFinality - which represents the block finality for which we inject global exit roots. This should be the same as on Aggoracle (for example, Latest/-6 blocks).
[AggSender]
GlobalExitRootL1 = "{{L1Config.polygonZkEVMGlobalExitRootAddress}}"

[Validator]
[Validator.GERValidateConfig]
	GlobalExitRootL1Addr = "{{L1NetworkConfig.GlobalExitRootManagerAddr}}"
	BlockFinality = {{L1InfoTreeSync.BlockFinality}}

✅ Testing

  • 🤖 Automatic: aggkit CI

🐞 Issues

  • Closes #[issue-number]

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds validation and signing of Global Exit Roots (GERs) on the aggsender-validator. The implementation introduces a new gRPC endpoint ValidateGER that validates GERs against the L1 GlobalExitRootManager contract before signing them. The validation checks if a GER exists on the L1 contract at a specified block finality level.

Key Changes:

  • New ValidateGER gRPC endpoint for validating and signing GERs
  • Added L1GERQuerier to check GER existence on L1 GlobalExitRootManager contract
  • Extended validator interfaces and implementations (LocalValidator, RemoteValidator) with GER validation support
  • Configuration updates to support GER validation with block finality settings

Reviewed Changes

Copilot reviewed 31 out of 32 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
aggsender/validator/validator_service.go Adds ValidateGER gRPC endpoint handler for validating and signing GERs
aggsender/validator/validate_certificate.go Implements ValidateGER method in CertificateValidator to check GER existence on L1
aggsender/validator/local_validator.go Adds ValidateAndSignGER method that validates GERs without signing (returns empty signature)
aggsender/validator/remote_validator.go Adds ValidateAndSignGER method with signature validation and extracts common validateSignature helper
aggsender/validator/validator_client.go Adds client method ValidateGER for calling the new gRPC endpoint
aggsender/query/ger_query.go Implements L1GERDataQuerier to query L1 contract for GER existence; renames GERQuerier to L2GERQuerier
aggsender/validator/config.go Adds GERValidateConfig with GlobalExitRootL1Addr and BlockFinality configuration
aggsender/types/interfaces.go Adds new interfaces L1GERQuerier and AgglayerGER; updates validator interfaces with GER methods
cmd/run.go Wires up L1GERQuerier when creating the aggsender validator
aggsender/aggsender.go Creates L1GERQuerier instance for local validator initialization
config/default.go Adds GlobalExitRootL1 configuration parameter to AggSender config
aggsender/validator/proto/v1/validator.proto Updates ValidateGERRequest to use FixedBytes32 type for GER field
aggsender/validator/proto/v1/*.pb.go Regenerated protobuf code with updated generator versions
buf.lock Updates agglayer and interop dependency commits
aggsender/mocks/*.go Adds/updates mocks for new interfaces (L1GERQuerier, AgglayerGER, etc.)

@goran-ethernal goran-ethernal force-pushed the feat/validator-signing-of-gers branch from 9d39297 to 36a9399 Compare November 20, 2025 14:48
@goran-ethernal goran-ethernal force-pushed the feat/validator-signing-of-gers branch from 12aec7e to d5c87f5 Compare December 2, 2025 14:13
@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 2, 2025

Quality Gate Failed Quality Gate failed

Failed conditions
35.9% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants