feat(cketh): sign the attestations a batched sweep needs - #11359
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds threshold-ECDSA attestation signing for queued ckERC20 deposit sweeps.
Changes:
- Groups queued deposits into per-token batches.
- Deduplicates, signs, and event-logs attestations.
- Adds shared fixtures and sweep signing tests.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
attestation/mod.rs |
Exposes and reuses attestation derivation paths. |
state.rs |
Builds batched attestation requests. |
state/automatic_deposits/mod.rs |
Groups sweep targets by token. |
state/automatic_deposits/tests.rs |
Uses shared fixtures. |
sweep/mod.rs |
Signs and records missing attestations. |
sweep/tests.rs |
Tests signing and configuration guards. |
test_fixtures.rs |
Adds shared deposit and token fixtures. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
✅ No security or compliance issues detected. Reviewed everything up to f33a0c6. Security Overview
Detected Code Changes
|
…ured Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Groups the queued deposits into one batch per token, capped at ten deposits each, and resolves the attestation request every deposit in a batch will need. Nothing is signed or enqueued yet. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signs one attestation per deposit in a batch, skipping those already stored so a repeat sweep of the same address costs no threshold-ECDSA signature. A deposit whose attestation fails to sign is only logged for now. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Folds the three attestation tests into one: an account with a deposit in two tokens must yield a single signature, since an attestation binds the account and not the token. Asserts the whole event log, so bypassing it fails the test. Shares the usdc/usdt and deposit_address helpers through test_fixtures rather than keeping them private to the automatic_deposits tests. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The gas fee estimate was refreshed before the queue was known to be non-empty, and it expires on this task's own 60s interval, so an idle minter paid for an eth_feeHistory outcall on every tick. Checking the queue first leaves the estimate where sweep-request construction will consume it. The deposit-helper test asserted a guard it never reached: the fixture it built on configures no sweeper contract, so the run returned at the earlier guard and the test was a duplicate of its sibling. It now starts from a state that gets as far as the helper.
gregorydemay
commented
Aug 27, 2026
gregorydemay
force-pushed
the
gdemay/DEFI-2926-sign-attestations
branch
from
August 27, 2026 19:03
44d30c4 to
019bda3
Compare
mbjorkqvist
approved these changes
Aug 28, 2026
mbjorkqvist
left a comment
Contributor
There was a problem hiding this comment.
Thanks @gregorydemay!
…ep enqueue Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YK3ggw1xtE3HZTGGBu66oD
This was referenced Aug 28, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Why
What