Repository navigation
Route each clear4 signed context to its own order - #2920
Conversation
|
Caution Review failedThe pull request is closed. Walkthrough
Merge Risk:
|
…ntext-routing Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
clear4 evaluates alice with aliceSignedContext and bob with bobSignedContext, matching quote3/takeOrders5. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ntext-routing Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Drops the clear3 selector test duplicated by the base branch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ting Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ting Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ting Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@coderabbitai assess this PR size classification for the totality of the PR with the following criterias and report it in your comment: S/M/L PR Classification Guidelines:This guide helps classify merged pull requests by effort and complexity rather than just line count. The goal is to assess the difficulty and scope of changes after they have been completed. Small (S)Characteristics:
Review Effort: Would have taken 5-10 minutes Examples:
Medium (M)Characteristics:
Review Effort: Would have taken 15-30 minutes Examples:
Large (L)Characteristics:
Review Effort: Would have taken 45+ minutes Examples:
Additional Factors to ConsiderWhen deciding between sizes, also consider:
Notes:
|
Closes #2850
Stacked on #2929 (V7 adoption:
IRaindexV7,SignedContextV2, domains column,signer-domainword, renames, Rust/JS/subgraph/oracle). This PR's diff against it is only theclear4routing fix and its tests.Problem
clear4(likeclear3before it) evaluates alice's order withbobSignedContextand bob's withaliceSignedContext. That contradicts the interface docs and the per-order routingquote3/takeOrders5use. Per the ruling on #2850, V6 stays as shipped and the fix lands with the V7 interface break.Fix
clear4evaluates alice withaliceSignedContextand bob withbobSignedContext.Why this is correct
Each order's expression asserts the signer, domain and content it sees, so routing is pinned by what the signer signed, not by slot index. Under the old routing alice would see bob's signer and domain.
Evidence
Head
3cdb7c888ee2728520c1027376d513d40908314e, locally at rainix2aea60e5:Build.solx2, forge build,script/build.sh, forge fmt). The resulting pins are identical to the previously verified head5195e565c; the tree differs from it only in tests.forge test: 759 passed, 3 failed, 762 total. The 3 areFLARE_RPC_URLunset.cargo test --workspace: 1927 passed, 0 failed.pre-commit run --all-filesin sol-shell and rust-shell: pass, no changes.QA
RaindexV6.clear.signedContextRouting.t.sol:testClearRoutesEachSignedContextToItsOwnOrder(distinct signers/domains/content per order, clear succeeds),testClearRevertsWhenSignedContextsAreSwapped(revertsalice signer),testClearRevertsWhenDomainsAreSwapped(same signer and content, only the domain differs; revertsalice domain). All three fail on Adopt IRaindexV7 and SignedContextV2 #2929 routing.RaindexV6.clear.*, each reverted after):clear4routing swapped back to the base PR's (alice <-bobSignedContext, bob <-aliceSignedContext) -> killed by all three routing tests; M09 (order-eval domains zeroed) and M10 (domains dropped) -> killed bytestClearRoutesEachSignedContextToItsOwnOrder,testClearRevertsWhenDomainsAreSwappedand the base PR'stestClearEvalSeesSignedContextV2. The base PR'stestClearEvalSeesSignedContextV2passes under both routings, as intended.MessageHashUtils.toTypedDataHash(domainSeparator, LibContext.hashStruct(...))andvm.sign.clear4behind a loud interface break; the break (removedclear3selector) is in the base PR, the routing is here.🤖 Generated with Claude Code
Summary by CodeRabbit