You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This mirrors the counterparty-owner swap (bobOrder.owner for alice, aliceOrder.owner for bob), but the parameter names (aliceSignedContext / bobSignedContext) are easy to read as "context for alice's order" / "context for bob's order", which led to integrator bugs (e.g. oracle context placed in the wrong slot → signed-context<0 0>() panic on clear).
Context
Single-order paths (quote2, takeOrders4) pass signedContext directly to the order being evaluated — no swap.
Subparser authoring meta says signed context is "provided by the order clearer/taker" (LibRaindexSubParser.sol), but there is no clear clear3-specific doc explaining which calldata slot each order reads.
RaindexV6.clear.context.t.sol documents/test counterparty wiring for order-counterparty(), but not signed-context slot assignment.
Request
Could we confirm whether this cross-assignment is by design? If so, could we add clearer documentation, for example:
NatSpec on clear3 / IRaindexV6.clear3 explaining that each order reads the counterparty-named signed-context slot (or equivalently: oracle/context for order X must be passed in the slot named after X's counterparty).
A short test that passes non-empty signed context into one slot and asserts the expected order's eval receives it (similar to RaindexV6.clear.context.t.sol but for signed context).
Happy to open a PR once the intended semantics are confirmed.
Fixed by #2920: clear3 is removed and clear4 routes each order its own signed context (RaindexV6.sol: alice's calculateOrderIO gets aliceSignedContext, bob's gets bobSignedContext), matching quote3/takeOrders5. Pinned by test/concrete/raindex/RaindexV6.clear.signedContextRouting.t.sol.
Activity
linear commentedon Jul 8, 2026
RAI-1251
thedavidmeister commentedon Oct 27, 2026
Fixed by #2920: clear3 is removed and clear4 routes each order its own signed context (RaindexV6.sol: alice's calculateOrderIO gets aliceSignedContext, bob's gets bobSignedContext), matching quote3/takeOrders5. Pinned by test/concrete/raindex/RaindexV6.clear.signedContextRouting.t.sol.