perf(cketh): stop making a detected deposit wait to be swept - #11260
Closed
gregorydemay wants to merge 2 commits into
Closed
perf(cketh): stop making a detected deposit wait to be swept#11260gregorydemay wants to merge 2 commits into
gregorydemay wants to merge 2 commits into
Conversation
gregorydemay
force-pushed
the
greg/DEFI-2926-sweep-without-waiting
branch
from
August 21, 2026 14:46
aaa2e91 to
2f95092
Compare
gregorydemay
force-pushed
the
greg/DEFI-2926-anvil-sweep-harness
branch
2 times, most recently
from
August 25, 2026 07:16
d741cac to
4d0133d
Compare
gregorydemay
force-pushed
the
greg/DEFI-2926-sweep-without-waiting
branch
from
August 25, 2026 07:16
2f95092 to
5f0941a
Compare
gregorydemay
force-pushed
the
greg/DEFI-2926-anvil-sweep-harness
branch
from
August 25, 2026 10:05
4d0133d to
461eaba
Compare
gregorydemay
force-pushed
the
greg/DEFI-2926-sweep-without-waiting
branch
from
August 25, 2026 10:05
5f0941a to
83a984a
Compare
gregorydemay
force-pushed
the
greg/DEFI-2926-anvil-sweep-harness
branch
from
August 25, 2026 11:21
461eaba to
954ac72
Compare
gregorydemay
force-pushed
the
greg/DEFI-2926-sweep-without-waiting
branch
from
August 25, 2026 11:21
83a984a to
f5efe4d
Compare
gregorydemay
force-pushed
the
greg/DEFI-2926-anvil-sweep-harness
branch
from
August 25, 2026 12:55
954ac72 to
cd56d0a
Compare
gregorydemay
force-pushed
the
greg/DEFI-2926-sweep-without-waiting
branch
from
August 25, 2026 12:55
f5efe4d to
4756f7b
Compare
gregorydemay
force-pushed
the
greg/DEFI-2926-anvil-sweep-harness
branch
from
August 25, 2026 13:05
cd56d0a to
a988856
Compare
gregorydemay
force-pushed
the
greg/DEFI-2926-sweep-without-waiting
branch
from
August 25, 2026 13:05
4756f7b to
b492cc9
Compare
gregorydemay
force-pushed
the
greg/DEFI-2926-anvil-sweep-harness
branch
from
August 25, 2026 13:17
a988856 to
b02f84d
Compare
gregorydemay
force-pushed
the
greg/DEFI-2926-sweep-without-waiting
branch
from
August 25, 2026 13:17
b492cc9 to
f501df0
Compare
gregorydemay
force-pushed
the
greg/DEFI-2926-anvil-sweep-harness
branch
from
August 25, 2026 14:27
b02f84d to
741e33a
Compare
gregorydemay
force-pushed
the
greg/DEFI-2926-sweep-without-waiting
branch
2 times, most recently
from
August 25, 2026 14:32
2acbeef to
ed49cc6
Compare
gregorydemay
force-pushed
the
greg/DEFI-2926-anvil-sweep-harness
branch
from
August 25, 2026 15:45
bf87e2e to
80c65bb
Compare
gregorydemay
force-pushed
the
greg/DEFI-2926-sweep-without-waiting
branch
from
August 25, 2026 15:45
ed49cc6 to
b60e904
Compare
gregorydemay
force-pushed
the
greg/DEFI-2926-anvil-sweep-harness
branch
from
August 25, 2026 15:50
80c65bb to
6814d95
Compare
gregorydemay
force-pushed
the
greg/DEFI-2926-sweep-without-waiting
branch
from
August 25, 2026 15:50
b60e904 to
a5631ab
Compare
gregorydemay
force-pushed
the
greg/DEFI-2926-anvil-sweep-harness
branch
from
August 26, 2026 05:55
6814d95 to
104b780
Compare
gregorydemay
force-pushed
the
greg/DEFI-2926-sweep-without-waiting
branch
from
August 26, 2026 05:55
a5631ab to
41b9eda
Compare
gregorydemay
force-pushed
the
greg/DEFI-2926-anvil-sweep-harness
branch
from
August 26, 2026 06:00
104b780 to
f16ec5a
Compare
gregorydemay
force-pushed
the
greg/DEFI-2926-sweep-without-waiting
branch
3 times, most recently
from
August 26, 2026 07:10
22394cb to
a64d29f
Compare
gregorydemay
force-pushed
the
greg/DEFI-2926-anvil-sweep-harness
branch
2 times, most recently
from
August 26, 2026 07:22
3da307d to
bd26fcc
Compare
gregorydemay
force-pushed
the
greg/DEFI-2926-sweep-without-waiting
branch
2 times, most recently
from
August 26, 2026 07:29
abaf601 to
ba23dc2
Compare
gregorydemay
force-pushed
the
greg/DEFI-2926-anvil-sweep-harness
branch
from
August 26, 2026 07:29
bd26fcc to
f8885cf
Compare
gregorydemay
force-pushed
the
greg/DEFI-2926-sweep-without-waiting
branch
from
August 26, 2026 08:01
ba23dc2 to
bb9503d
Compare
gregorydemay
force-pushed
the
greg/DEFI-2926-anvil-sweep-harness
branch
from
August 26, 2026 08:01
f8885cf to
90bd109
Compare
gregorydemay
force-pushed
the
greg/DEFI-2926-sweep-without-waiting
branch
from
August 26, 2026 08:36
bb9503d to
50a28dd
Compare
gregorydemay
force-pushed
the
greg/DEFI-2926-anvil-sweep-harness
branch
from
August 26, 2026 08:36
90bd109 to
8983b73
Compare
gregorydemay
force-pushed
the
greg/DEFI-2926-sweep-without-waiting
branch
from
August 26, 2026 08:56
50a28dd to
f98677a
Compare
gregorydemay
force-pushed
the
greg/DEFI-2926-anvil-sweep-harness
branch
from
August 26, 2026 08:56
8983b73 to
2295f0b
Compare
gregorydemay
force-pushed
the
greg/DEFI-2926-sweep-without-waiting
branch
from
August 26, 2026 11:51
f98677a to
4cc740b
Compare
gregorydemay
force-pushed
the
greg/DEFI-2926-anvil-sweep-harness
branch
2 times, most recently
from
August 26, 2026 16:38
2bb495f to
7dbcf5e
Compare
gregorydemay
force-pushed
the
greg/DEFI-2926-sweep-without-waiting
branch
from
August 26, 2026 16:38
4cc740b to
678e89c
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Reduces ckETH deposit-crediting latency by triggering sweep processing immediately after enqueueing.
Changes:
- Schedules immediate sweeper transaction processing.
- Documents interaction with the periodic sender.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/sweep/mod.rs |
Adds immediate processing trigger. |
src/main.rs |
Clarifies periodic timer behavior. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+347
to
+349
| ic_cdk_timers::set_timer(Duration::from_secs(0), async { | ||
| process_sweeper_transactions().await; | ||
| }); |
gregorydemay
force-pushed
the
greg/DEFI-2926-anvil-sweep-harness
branch
from
August 26, 2026 17:03
7dbcf5e to
76e5ad9
Compare
gregorydemay
force-pushed
the
greg/DEFI-2926-sweep-without-waiting
branch
2 times, most recently
from
August 26, 2026 17:38
46d43d8 to
9c030ed
Compare
gregorydemay
force-pushed
the
greg/DEFI-2926-anvil-sweep-harness
branch
from
August 26, 2026 17:38
76e5ad9 to
56379f6
Compare
gregorydemay
force-pushed
the
greg/DEFI-2926-anvil-sweep-harness
branch
from
August 27, 2026 07:56
56379f6 to
4ba45e6
Compare
gregorydemay
force-pushed
the
greg/DEFI-2926-sweep-without-waiting
branch
from
August 27, 2026 07:56
9c030ed to
3999da2
Compare
…-sweep-without-waiting
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
Suppressed comments (1)
rs/ethereum/cketh/minter/src/sweep/mod.rs:357
- This kick can be lost when the interval-driven send task is already running.
process_sweeper_transactionsreturns immediately if itsSweeperSendguard is held (lines 75–84); if that task has already taken its request batch, it will only notice this newly enqueued request in its final pending check and schedule the normal 3-minute retry. Thus a fresh deposit can still incur substantial avoidable latency exactly when enqueue and send ticks overlap. Please make the wake-up coalescing: an enqueue that races with an active sender must cause another prompt pass after that sender releases its guard, rather than relying on the normal retry interval.
ic_cdk_timers::set_timer(Duration::from_secs(0), async {
process_sweeper_transactions().await;
});
Contributor
Author
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
enqueue_batched_sweepkicks the send task immediately after enqueueing, instead of leaving the new sweeps for its next tick.