Skip to content

chore: bump lib/rain.orderbook to quote-counterparty-msg-sender#79

Closed
hardyjosh wants to merge 1 commit into2026-04-14-api-gated-signingfrom
2026-04-15-api-quote-counterparty
Closed

chore: bump lib/rain.orderbook to quote-counterparty-msg-sender#79
hardyjosh wants to merge 1 commit into2026-04-14-api-gated-signingfrom
2026-04-15-api-quote-counterparty

Conversation

@hardyjosh
Copy link
Copy Markdown
Contributor

@hardyjosh hardyjosh commented Apr 15, 2026

Caution

Chained to rainlanguage/raindex#2550 (itself chained to #2547) and #78. Merge order: raindex#2547 → raindex#2550 → this → st0x.rest.api#78. Submodule pointer rebased onto main of each dependency before merging.

Motivation

The parent PR #78 introduced the gating SignedContextInjector but gated orders still never got picked by the API — they were silently filtered at quote time. Root cause: orderbook.quote2 via Multicall3 set msg.sender = Multicall3, so the strategy's :ensure(equal-to(signed-context<0 0>() order-counterparty())) always reverted during quoting. Fixed in rainlanguage/raindex#2550 by switching the quote RPC to orderbook-native multicall(bytes[]) (delegatecall — preserves msg.sender) with from=counterparty.

Solution

Submodule bump only. The API already threaded counterparty through get_order_quotes_batch_with_injector via the injector; with the upstream fix in place, it now actually arrives at quote2 as msg.sender, gated orders simulate correctly, and the API returns takeOrders4 calldata that targets our gated orders.

Checks

By submitting this for review, I'm confirming I've done the following:

  • added comprehensive test coverage for any changes in logic
  • made this PR as small as possible
  • linked any relevant issues or PRs
  • included screenshots (if this involves a change to a front-end/dashboard)

Summary by CodeRabbit

  • Chores
    • Updated orderbook module to the latest version.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 15, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 3e549728-faa6-4fcd-ab1c-000bef2f5d69

📥 Commits

Reviewing files that changed from the base of the PR and between f7635f8 and 91b2d58.

📒 Files selected for processing (1)
  • lib/rain.orderbook

📝 Walkthrough

Walkthrough

This pull request updates the lib/rain.orderbook submodule reference to a newer commit hash. The change consists of a single submodule pointer update with no modifications to the repository's own code, logic, or interfaces.

Changes

Cohort / File(s) Summary
Submodule Update
lib/rain.orderbook
Updated submodule commit reference from 6894f14... to 4dfef89...

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

Suggested reviewers

  • 0xgleb

Poem

🐰 A submodule hops to new ground,
Fresh commits in the orderbook found,
Version bumped with care so bright,
Rain.orderbook now updated right! 📚✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main change: a submodule bump of lib/rain.orderbook to a specific commit referenced by the branch name 'quote-counterparty-msg-sender'.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 2026-04-15-api-quote-counterparty

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

Picks up the quote RPC refactor in rainlanguage/raindex#2550: quotes
now use orderbook-native `multicall(bytes[])` with
`from=counterparty`, preserving `msg.sender` through the batch. This
is what lets API-gated strategies (whose `calculate-io` asserts
`signed-context<0 0>() == order-counterparty()`) actually survive the
quote stage and enter the take-orders selection instead of being
silently filtered.

No code changes in this repo — the counterparty was already threaded
through to the rain.orderbook quote layer via the injector flow in
the parent PR; it just wasn't being used by the RPC layer until the
submodule fix.

Depends on rainlanguage/raindex#2550.
@hardyjosh hardyjosh force-pushed the 2026-04-15-api-quote-counterparty branch from 6f50c37 to 91b2d58 Compare April 15, 2026 13:45
@hardyjosh hardyjosh marked this pull request as ready for review April 15, 2026 15:33
@hardyjosh
Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 15, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@hardyjosh
Copy link
Copy Markdown
Contributor Author

Superseded by #78 — submodule bump folded into the gating PR.

@hardyjosh hardyjosh closed this Apr 15, 2026
@hardyjosh hardyjosh deleted the 2026-04-15-api-quote-counterparty branch April 15, 2026 18:15
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