twap: grant one next-block retry before dropping on InvalidEip1271Signature#473
Open
mfw78 wants to merge 1 commit into
Open
twap: grant one next-block retry before dropping on InvalidEip1271Signature#473mfw78 wants to merge 1 commit into
mfw78 wants to merge 1 commit into
Conversation
…nature A first-time user's Safe wiring and ComposableCoW create() land in one block, so the orderbook rejects the first submission against its own head and the keeper dropped a valid watch. The classification table gains a drop-on-repeat action, the retry ledger records the refused block and gates one next-block retry, and a denied refusal re-enters the table by its errorType prefix so the grace survives the coarse venue-error collapse. A repeat on a later block still drops.
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.
What
Adds
RetryAction::DropOnRepeat: the firstInvalidEip1271Signaturerefusal for a watch retries on the next block instead of dropping; a repeat refusal on a later block drops as before. Tracked via arefused:block marker on the watch, cleared on an accepted submit. Reclassifies theInvalidEip1271Signaturerow inclassification.toml/classification_data.rsfromdroptodrop-on-repeat. Thedeniedwire error stays coarse, socow_venue::classify_deniedre-derives the action from theerrorTypeprefix in the detail string on both the videre-sdk keeper sweep and the legacy composable-cow sweep.Why
A first-time TWAP user's Safe wiring and
ComposableCoW.create()can land in the same block as the indexed event. Shepherd polls and submits inside that block, faster than an orderbook node can verify against its own head, so a signature that is valid one block later is rejected and the watch is dropped permanently. Treating only a repeated refusal as permanent absorbs the one-block indexing race while still dropping genuinely broken signatures.Closes #320
Testing
nexum-sdkandvidere-sdkkeeper unit tests cover the marker set/clear/repeat-drop lifecycle;cow-venueadapter and classification tests cover thedrop-on-repeatrow andclassify_deniedprefix recovery;composable-cowsweep tests cover the marker clear on acceptance.AI Assistance
Implemented with AI assistance under human direction and review.