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
{{ message }}
Repository navigation
Expose stateOverlay on quote (quote3 / IRaindexV7) #60
The interpreter's eval4 takes a stateOverlay, and post-H01 the on-chain calculate path (RaindexV6.calculateOrderIO(..., stateOverlay)) does too. But the interface's quote entrypoint IRaindexV6.quote2(QuoteV2) has no stateOverlay — the raindex impl is forced to pass new bytes32[](0), so quotes can only ever be evaluated against fresh/empty store state. Callers should be able to pass a stateOverlay to quote and simulate an order's calculate against arbitrary interpreter state.
Shape
Breaking interface addition → new interface version IRaindexV7 (coexists with IRaindexV6):
quote3(QuoteV3 quoteConfig) where QuoteV3 adds a bytes32[] stateOverlay field, or
Overlay format matches the interpreter's: [key0, val0, key1, val1, …] (identical to the calculate kvs). The raindex impl already threads stateOverlay internally — quote3 just forwards the caller-supplied one instead of new bytes32[](0).
Motivation (one example, not the only use)
The H01 fix (rainlanguage/raindex#2627, audit rainlanguage/raindex#2617) threads same-owner calculate writes within a takeOrders4 batch via stateOverlay. quote2 (empty overlay) can't reproduce that, so it over-states availability for a later same-owner order in a batch. With a stateOverlay on quote, a caller can pass the accumulated state and quote accurately. More generally, exposing the overlay lets callers simulate against any state.
changed the title [-]Add a batch-aware quote (quote3 / stateOverlay) — IRaindexV7[/-][+]Expose stateOverlay on quote (quote3 / IRaindexV7)[/+]on Jun 2, 2026
Activity
[-]Add a batch-aware quote (quote3 / stateOverlay) — IRaindexV7[/-][+]Expose stateOverlay on quote (quote3 / IRaindexV7)[/+]