Skip to content

feat(coprocessor): allow skipping verify proof requests during GW catchup#2005

Merged
mergify[bot] merged 1 commit intomainfrom
antoniu/skip-verify-proof
Feb 19, 2026
Merged

feat(coprocessor): allow skipping verify proof requests during GW catchup#2005
mergify[bot] merged 1 commit intomainfrom
antoniu/skip-verify-proof

Conversation

@antoniupop
Copy link
Copy Markdown
Collaborator

This is needed when spinning up a coprocessor as the keygen/crsgen events can be quite far back and we don't necessarily want to replay all verify proof requests since genesis if we don't have the precise location of these events.

@antoniupop antoniupop requested review from a team as code owners February 18, 2026 10:13
@cla-bot cla-bot bot added the cla-signed label Feb 18, 2026
@antoniupop antoniupop force-pushed the antoniu/skip-verify-proof branch from 209543e to 9797b44 Compare February 18, 2026 11:24
@antoniupop
Copy link
Copy Markdown
Collaborator Author

@claude /pr-review

@claude
Copy link
Copy Markdown

claude bot commented Feb 18, 2026

Claude finished @antoniupop's task in 1m 45s —— View job


[AUTOMATED]

PR Review: feat(coprocessor): allow skipping verify proof requests during GW catchup

  • Gather context and read changed files
  • Analyze changes for bugs, correctness, and design issues
  • Validate findings
  • Post final review

Summary

This PR adds a --replay-skip-verify-proof CLI flag to the gateway listener that, when enabled during replay/catchup mode, skips VerifyProofRequest events. This is useful when bootstrapping a new coprocessor, where keygen/crsgen events may be far in the past and replaying all verify proof requests since genesis is undesirable.

Changes are clean and well-structured across 5 files: CLI arg definition, config propagation, core logic, default value, and helm chart documentation.


Issue Found (Confidence: 90/100)

Bug: Skip applies to ALL input_verification_address events, not just VerifyProofRequest

In gw_listener.rs (lines 198-202), the skip is placed before the event is decoded and matched:

if log.address() == self.input_verification_address {
    if replay_from_block.is_some() && self.conf.replay_skip_verify_proof {
        debug!(log = ?log, "Skipping VerifyProofRequest during replay");
        continue;  // ← skips ALL events from this address
    }
    if let Ok(event) = InputVerification::InputVerificationEvents::decode_log(&log.inner) {
        match event.data {
            InputVerification::InputVerificationEvents::VerifyProofRequest(request) => { ... }
            _ => { error!(log = ?log, "Unknown InputVerification event"); }
        }
    }
}

The continue at line 201 skips the entire input_verification_address log processing, meaning any event type emitted by this contract (not just VerifyProofRequest) would be silently skipped during replay. The log message says "Skipping VerifyProofRequest" but it hasn't actually verified that the event is a VerifyProofRequest.

Currently this may be safe if VerifyProofRequest is the only event emitted by that contract, but it's fragile — if additional event types are added to the InputVerification contract in the future, they would be silently dropped during replay with no warning.

Suggested fix: Move the skip inside the match arm, after the event has been decoded:

if log.address() == self.input_verification_address {
    if let Ok(event) = InputVerification::InputVerificationEvents::decode_log(&log.inner) {
        match event.data {
            InputVerification::InputVerificationEvents::VerifyProofRequest(request) => {
                if replay_from_block.is_some() && self.conf.replay_skip_verify_proof {
                    debug!(log = ?log, "Skipping VerifyProofRequest during replay");
                    continue;
                }
                self.verify_proof_request(db_pool, request, log.clone()).await
                    .inspect(|_| { verify_proof_success += 1; })
                    .inspect_err(|e| {
                        error!(error = %e, "VerifyProofRequest processing failed");
                        VERIFY_PROOF_FAIL_COUNTER.inc();
                    })?;
            },
            _ => { error!(log = ?log, "Unknown InputVerification event"); }
        }
    } else {
        error!(log = ?log, "Failed to decode InputVerification event log");
    }
}

Fix this →


Nits

  1. PR title typo: "guring" → "during"

  2. Nit: default_value_t = false in gw_listener.rs line 88 — for bool fields in clap, you can simply omit the default_value_t since bool defaults to false already. Using #[arg(long, help = "...")] would suffice. Non-blocking.


What looks good

  • ✅ The replay_from_block.is_some() guard ensures the skip only applies during replay mode and not during normal operation
  • ✅ After replay finishes (*replay_from_block = None at line 274), the guard correctly deactivates the skip
  • ✅ Helm chart documentation is properly updated with the new flag as a commented-out option
  • ✅ Chart version bumped appropriately (0.8.1 → 0.8.2)
  • ✅ Default value of false is sensible — opt-in behavior
  • ✅ Config propagation is clean through CLI → ConfigSettings → listener

@antoniupop antoniupop changed the title feat(coprocessor): allow skipping verify proof requests guring GW catchup feat(coprocessor): allow skipping verify proof requests during GW catchup Feb 18, 2026
@mergify
Copy link
Copy Markdown

mergify bot commented Feb 18, 2026

🧪 CI Insights

Here's what we observed from your CI run for 9797b44.

🟢 All jobs passed!

But CI Insights is watching 👀

@antoniupop
Copy link
Copy Markdown
Collaborator Author

@Mergifyio queue

@mergify
Copy link
Copy Markdown

mergify bot commented Feb 18, 2026

Merge Queue Status

Rule: main


This pull request spent 1 hour 4 minutes 27 seconds in the queue, including 3 minutes 4 seconds running CI.

Required conditions to merge
  • check-success = run-e2e-tests / fhevm-e2e-test
  • any of [🛡 GitHub branch protection]:
    • check-neutral = coprocessor-cargo-test/cargo-tests (bpr)
    • check-skipped = coprocessor-cargo-test/cargo-tests (bpr)
    • check-success = coprocessor-cargo-test/cargo-tests (bpr)
  • #approved-reviews-by >= 1 [🛡 GitHub branch protection]
  • #changes-requested-reviews-by = 0 [🛡 GitHub branch protection]
  • #review-threads-unresolved = 0 [🛡 GitHub branch protection]
  • branch-protection-review-decision = APPROVED [🛡 GitHub branch protection]
  • any of [🛡 GitHub branch protection]:
    • check-success = common-pull-request/lint (bpr)
    • check-neutral = common-pull-request/lint (bpr)
    • check-skipped = common-pull-request/lint (bpr)
  • any of [🛡 GitHub branch protection]:
    • check-skipped = coprocessor-cargo-listener-tests/cargo-tests (bpr)
    • check-neutral = coprocessor-cargo-listener-tests/cargo-tests (bpr)
    • check-success = coprocessor-cargo-listener-tests/cargo-tests (bpr)
  • any of [🛡 GitHub branch protection]:
    • check-success = coprocessor-dependency-analysis/dependencies-check (bpr)
    • check-neutral = coprocessor-dependency-analysis/dependencies-check (bpr)
    • check-skipped = coprocessor-dependency-analysis/dependencies-check (bpr)
  • any of [🛡 GitHub branch protection]:
    • check-skipped = gateway-contracts-deployment-tests/sc-deploy (bpr)
    • check-neutral = gateway-contracts-deployment-tests/sc-deploy (bpr)
    • check-success = gateway-contracts-deployment-tests/sc-deploy (bpr)
  • any of [🛡 GitHub branch protection]:
    • check-skipped = kms-connector-tests/test-connector (bpr)
    • check-neutral = kms-connector-tests/test-connector (bpr)
    • check-success = kms-connector-tests/test-connector (bpr)

Reason

The merge conditions cannot be satisfied due to failing checks

Failing checks:

Hint

You may have to fix your CI before adding the pull request to the queue again.
If you update this pull request, to fix the CI, it will automatically be requeued once the queue conditions match again.
If you think this was a flaky issue instead, you can requeue the pull request, without updating it, by posting a @mergifyio queue comment.

@mergify mergify bot added the queued label Feb 18, 2026
mergify bot added a commit that referenced this pull request Feb 18, 2026
@mergify mergify bot added dequeued and removed queued labels Feb 18, 2026
@antoniupop
Copy link
Copy Markdown
Collaborator Author

@Mergifyio queue

@mergify
Copy link
Copy Markdown

mergify bot commented Feb 19, 2026

Merge Queue Status

Rule: main


This pull request spent 2 hours 54 minutes 29 seconds in the queue, including 1 hour 53 minutes 19 seconds running CI.

Required conditions to merge
  • #approved-reviews-by >= 1 [🛡 GitHub branch protection]
  • #changes-requested-reviews-by = 0 [🛡 GitHub branch protection]
  • #review-threads-unresolved = 0 [🛡 GitHub branch protection]
  • branch-protection-review-decision = APPROVED [🛡 GitHub branch protection]
  • check-success = run-e2e-tests / fhevm-e2e-test
  • any of [🛡 GitHub branch protection]:
    • check-success = common-pull-request/lint (bpr)
    • check-neutral = common-pull-request/lint (bpr)
    • check-skipped = common-pull-request/lint (bpr)
  • any of [🛡 GitHub branch protection]:
    • check-success = coprocessor-cargo-listener-tests/cargo-tests (bpr)
    • check-neutral = coprocessor-cargo-listener-tests/cargo-tests (bpr)
    • check-skipped = coprocessor-cargo-listener-tests/cargo-tests (bpr)
  • any of [🛡 GitHub branch protection]:
    • check-success = coprocessor-cargo-test/cargo-tests (bpr)
    • check-neutral = coprocessor-cargo-test/cargo-tests (bpr)
    • check-skipped = coprocessor-cargo-test/cargo-tests (bpr)
  • any of [🛡 GitHub branch protection]:
    • check-success = coprocessor-dependency-analysis/dependencies-check (bpr)
    • check-neutral = coprocessor-dependency-analysis/dependencies-check (bpr)
    • check-skipped = coprocessor-dependency-analysis/dependencies-check (bpr)
  • any of [🛡 GitHub branch protection]:
    • check-skipped = gateway-contracts-deployment-tests/sc-deploy (bpr)
    • check-neutral = gateway-contracts-deployment-tests/sc-deploy (bpr)
    • check-success = gateway-contracts-deployment-tests/sc-deploy (bpr)
  • any of [🛡 GitHub branch protection]:
    • check-skipped = kms-connector-tests/test-connector (bpr)
    • check-neutral = kms-connector-tests/test-connector (bpr)
    • check-success = kms-connector-tests/test-connector (bpr)

@antoniupop
Copy link
Copy Markdown
Collaborator Author

@Mergifyio refresh

@mergify
Copy link
Copy Markdown

mergify bot commented Feb 19, 2026

refresh

✅ Pull request refreshed

@antoniupop
Copy link
Copy Markdown
Collaborator Author

@Mergifyio requeue

@mergify
Copy link
Copy Markdown

mergify bot commented Feb 19, 2026

requeue

☑️ Command requeue ignored because it is already running from a previous command.

@mergify mergify bot removed the merge-queued label Feb 19, 2026
mergify bot added a commit that referenced this pull request Feb 19, 2026
@mergify mergify bot merged commit ad06d43 into main Feb 19, 2026
62 checks passed
@mergify mergify bot deleted the antoniu/skip-verify-proof branch February 19, 2026 12:37
@mergify mergify bot removed the queued label Feb 19, 2026
antoniupop added a commit that referenced this pull request Feb 19, 2026
…chup (#2005)

feat(coprocessor): allow skipping verify proof requests guring GW catchup
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