Skip to content

twap: grant one next-block retry before dropping on InvalidEip1271Signature#473

Open
mfw78 wants to merge 1 commit into
feat/m4-conditional-order-removedfrom
feat/m4-eip1271-one-block-retry
Open

twap: grant one next-block retry before dropping on InvalidEip1271Signature#473
mfw78 wants to merge 1 commit into
feat/m4-conditional-order-removedfrom
feat/m4-eip1271-one-block-retry

Conversation

@mfw78

@mfw78 mfw78 commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

What

Adds RetryAction::DropOnRepeat: the first InvalidEip1271Signature refusal for a watch retries on the next block instead of dropping; a repeat refusal on a later block drops as before. Tracked via a refused: block marker on the watch, cleared on an accepted submit. Reclassifies the InvalidEip1271Signature row in classification.toml/classification_data.rs from drop to drop-on-repeat. The denied wire error stays coarse, so cow_venue::classify_denied re-derives the action from the errorType prefix 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-sdk and videre-sdk keeper unit tests cover the marker set/clear/repeat-drop lifecycle; cow-venue adapter and classification tests cover the drop-on-repeat row and classify_denied prefix recovery; composable-cow sweep tests cover the marker clear on acceptance.

AI Assistance

Implemented with AI assistance under human direction and review.

…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant