Skip to content

Order perf: SDK output-vault filter + quote timing#88

Open
alastairong1 wants to merge 3 commits into
mainfrom
alastair/order-perf-optimizations
Open

Order perf: SDK output-vault filter + quote timing#88
alastairong1 wants to merge 3 commits into
mainfrom
alastair/order-perf-optimizations

Conversation

@alastairong1
Copy link
Copy Markdown
Contributor

@alastairong1 alastairong1 commented Apr 20, 2026

Summary

  • Set quote batch chunk_size to 4 to avoid exceeding public RPC eth_call gas limits.
  • Add stage timing (orders, quotes, total) to structured logs for order list performance monitoring.
  • Delegate output-vault balance filtering to Raindex via has_positive_output_vault_balance: Some(true) before quote fetching.
  • Remove REST-side formatted balance parsing and local zero-balance quote filtering.
  • Update REST compatibility for the newer Raindex bindings, take-order candidate signature, signed context field, and spec version 5 test fixtures.

Depends On

Stack

Test plan

  • nix develop -c cargo check
  • nix develop -c cargo test routes::orders
  • nix develop -c cargo test
  • nix develop -c rainix-rs-static fails on existing clippy too_many_arguments errors in src/routes/trades.rs route handlers.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 20, 2026

Warning

Rate limit exceeded

@findolor has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 6 minutes and 20 seconds before requesting another review.

To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 3be786a1-78f0-4fb8-82cf-023e35d0a4f8

📥 Commits

Reviewing files that changed from the base of the PR and between 2ca2a6b and d3d80ca.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (7)
  • lib/rain.orderbook
  • src/routes/orders/get_by_owner.rs
  • src/routes/orders/get_by_token.rs
  • src/routes/orders/mod.rs
  • src/routes/swap/mod.rs
  • src/routes/tokens.rs
  • src/test_helpers.rs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch alastair/order-perf-optimizations

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
Review rate limit: 0/1 reviews remaining, refill in 6 minutes and 20 seconds.

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

@findolor findolor changed the base branch from main to graphite-base/88 April 27, 2026 07:33
@findolor findolor force-pushed the alastair/order-perf-optimizations branch from 32bdba9 to 5d118de Compare April 27, 2026 07:33
@findolor findolor changed the base branch from graphite-base/88 to alastair/nginx-hardening April 27, 2026 07:33
Copy link
Copy Markdown
Collaborator

findolor commented Apr 27, 2026


How to use the Graphite Merge Queue

Add the label add-to-gt-merge-queue to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

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

@graphite-app graphite-app Bot force-pushed the alastair/nginx-hardening branch from 7d1d763 to b14e075 Compare April 27, 2026 12:31
@graphite-app graphite-app Bot force-pushed the alastair/order-perf-optimizations branch from 5d118de to 4867e1c Compare April 27, 2026 12:31
@alastairong1 alastairong1 requested a review from findolor April 28, 2026 19:20
Copy link
Copy Markdown
Collaborator

@findolor findolor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the change in this PR belongs in the SDK level since processing the zero balance output vaults for an order doesn't make sense during quoting. We should keep the API simple without any custom logic.

So with that said I will open up a PR in raindex repo that handles this and we can bump raindex submodule here. Then we can remove the filtering logic

@findolor findolor force-pushed the alastair/nginx-hardening branch from b14e075 to 4cd0e5a Compare April 30, 2026 11:19
@findolor findolor force-pushed the alastair/order-perf-optimizations branch from 4867e1c to 881be06 Compare April 30, 2026 11:19
@findolor findolor changed the title Order perf: chunk_size(4) + zero-balance filtering + timing Order perf: SDK output-vault filter + quote timing Apr 30, 2026
@findolor findolor changed the base branch from alastair/nginx-hardening to graphite-base/88 April 30, 2026 11:48
@findolor findolor force-pushed the alastair/order-perf-optimizations branch from 881be06 to 88749a1 Compare April 30, 2026 11:48
@findolor findolor changed the base branch from graphite-base/88 to alastair/neutralize-metaboards April 30, 2026 11:48
@findolor findolor self-assigned this May 4, 2026
alastairong1 and others added 2 commits May 4, 2026 10:16
@findolor findolor changed the base branch from alastair/neutralize-metaboards to graphite-base/88 May 4, 2026 07:17
@findolor findolor force-pushed the graphite-base/88 branch from b63a8ef to 2ca2a6b Compare May 4, 2026 07:17
@findolor findolor force-pushed the alastair/order-perf-optimizations branch from 88749a1 to a901a59 Compare May 4, 2026 07:17
@findolor findolor changed the base branch from graphite-base/88 to main May 4, 2026 07:17
@findolor findolor requested review from JuaniRios and hardyjosh May 4, 2026 07:34
@findolor findolor self-requested a review May 4, 2026 07:34
@findolor findolor dismissed their stale review May 4, 2026 08:53

took over this PR myself

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.

3 participants