fix: alert on a failing cancel and slow it to hourly - #721
Merged
MoonBoi9001 merged 3 commits intoOct 2, 2026
Merged
MoonBoi9001 merged 3 commits into
MoonBoi9001 merged 3 commits into
Conversation
A cancel the contract rejected while it was being prepared was never counted as a failed attempt, so one that always failed that way was retried, with an error logged, every 5 minutes for ever. It now counts like a cancel that reverts once mined, so it reaches the give-up limit and alert.
Once a cancel failed 10 times dipper never looked at the agreement again, so if it later ended it stayed cancelling for good, its fees counted and its indexer kept out of selection. It is now read hourly, without sending more cancels, and closed once the chain shows it ended.
Counting refusals before sending meant a paused manager used up every agreement's 10 attempts in under an hour, and dipper then never sent their cancels again once it was unpaused. It now alerts once at the limit and keeps retrying hourly, so those cancels resume by themselves.
MoonBoi9001
added this pull request to stack #723
October 2, 2026 22:01
MoonBoi9001
removed this pull request from stack #723
October 2, 2026 22:01
MoonBoi9001
added this pull request to stack #724
October 2, 2026 22:04
MoonBoi9001
marked this pull request as ready for review
October 2, 2026 22:04
MoonBoi9001
removed this pull request from stack #724
October 2, 2026 22:10
MoonBoi9001
added this pull request to stack #725
October 2, 2026 22:10
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.
A cancel the contract refuses before it is sent now counts towards the retry's limit of 10, so one that always fails that way raises the alert instead of retrying silently, and once an agreement reaches the limit dipper keeps retrying it hourly rather than every few minutes, closing it once the chain shows it ended instead of leaving it cancelling with its indexer kept out of selection.