Repository navigation
feat(minter): re-arm the automatic deposits of a dropped sweep - #284
Draft
gregorydemay wants to merge 6 commits into
Draft
gregorydemay wants to merge 6 commits into
gregorydemay wants to merge 6 commits into
Conversation
gregorydemay
added this pull request to stack #288
October 14, 2026 08:50
gregorydemay
force-pushed
the
DEFI-2780-09-rearm-dropped-sweeps
branch
from
October 14, 2026 09:04
cbcba4e to
0df76d9
Compare
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Re-arm outcomes depend on transient watchlist capacity and therefore diverge during event replay.
1 open finding
What changed in this PR
Re-arms automatic deposits after failed or expired sweeps.
Changes:
- Adds watchlist re-arm logic and failure handling.
- Returns dropped deposits for re-registration.
- Adds tests and updates design documentation.
| File | Description |
|---|---|
minter/src/state/watchlist/tests.rs |
Tests re-arm behavior. |
minter/src/state/watchlist/mod.rs |
Implements watchlist re-arming. |
minter/src/state/tests.rs |
Tests sweep failure and replay. |
minter/src/state/mod.rs |
Re-arms deposits when sweeps are dropped. |
minter/src/state/deposits/tests.rs |
Tests returned dropped deposits. |
minter/src/state/deposits/mod.rs |
Returns deposits from dropped sweeps. |
minter/src/state/audit.rs |
Passes event timestamps during replay. |
docs/src/development/design.md |
Documents restored watch windows. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| /// addresses are swept again without the user's intervention. | ||
| fn drop_sweep(&mut self, signature: &Signature, timestamp: u64) { | ||
| for deposit in self.deposits.drop_swept(signature) { | ||
| let rearmed = self.watchlist.rearm(timestamp, &deposit); |
gregorydemay
force-pushed
the
DEFI-2780-09-rearm-dropped-sweeps
branch
from
October 14, 2026 09:18
0df76d9 to
b76a77e
Compare
gregorydemay
force-pushed
the
DEFI-2780-09-rearm-dropped-sweeps
branch
from
October 14, 2026 09:20
b76a77e to
be1849f
Compare
gregorydemay
force-pushed
the
DEFI-2780-09-rearm-dropped-sweeps
branch
from
October 14, 2026 09:35
be1849f to
d1767df
Compare
gregorydemay
force-pushed
the
DEFI-2780-09-rearm-dropped-sweeps
branch
from
October 14, 2026 09:56
d1767df to
e24f6a2
Compare
gregorydemay
force-pushed
the
DEFI-2780-09-rearm-dropped-sweeps
branch
from
October 14, 2026 11:19
e24f6a2 to
faea046
Compare
gregorydemay
force-pushed
the
DEFI-2780-09-rearm-dropped-sweeps
branch
from
October 15, 2026 09:04
7355d82 to
5fc15da
Compare
gregorydemay
force-pushed
the
DEFI-2780-09-rearm-dropped-sweeps
branch
from
October 15, 2026 09:54
5fc15da to
8468edb
Compare
gregorydemay
force-pushed
the
DEFI-2780-09-rearm-dropped-sweeps
branch
from
October 15, 2026 11:28
8468edb to
d5113cb
Compare
gregorydemay
force-pushed
the
DEFI-2780-09-rearm-dropped-sweeps
branch
from
October 15, 2026 12:30
d5113cb to
60bab47
Compare
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…re-arm test Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The re-arm registers the account again instead of restoring the window end recorded with the deposit, so a drop after the original window re-arms as well and the window-closed error disappears. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…w name Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This branch has not been deployed
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.

When the sweep of a deposit detected by the automatic deposit flow of #272 fails or expires, the account is put back on the watchlist for a fresh window, if the watchlist has room, so that the funds still on the deposit address are swept again without the user's intervention. Covered by unit tests of the re-arm and of the replay of the event log.
🤖 Generated with Claude Code