Rename OrderBook to Raindex#2526
Conversation
Rename all Solidity source contracts, libraries, and scripts from OrderBook naming to Raindex naming. File renames and content updates for src/abstract/, src/concrete/, src/lib/, src/generated/, and script/. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Content and file renames for all test utility, abstract, concrete, and lib test files. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Update root Cargo.toml, crate Cargo.toml files, and all Rust source files. Rename crate names from rain_orderbook_* to raindex_*. Update settings crate types (OrderbookCfg -> RaindexCfg, etc.), YAML keys, module declarations, and file names. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Rename YAML config keys (orderbooks -> raindexes) and bump spec version from 5 to 6. Fix remaining Orderbook type references in js_api yaml module and settings crate. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Update import paths, YAML key strings, and constant prefixes that were missed in the initial Rust rename pass. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Update foundry.toml, flake.nix, .gitignore, .devcontainer.json, package.json, README.md, AGENTS.md, copilot instructions, and GitHub workflow files. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Rename directory, update package.json names and URLs, update build scripts (wasm crate name, wbg json), ARCHITECTURE.md, README.md, test files, and ui-components dependency reference. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Rename Svelte components (DropdownOrderbooksFilter -> DropdownRaindexesFilter, ListViewOrderbookFilters -> ListViewRaindexFilters), update imports, types, and variable names. Update ui-components and raindex package dependencies and URLs. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThis PR performs a comprehensive, repository-wide rename from "Rain Orderbook" to "Raindex" across Rust crates, npm packages, Solidity bindings, CI/CD workflows, configuration, and documentation. Workspace dependencies, crate names, package references, generated bindings, CLI implementations, and all related workflows and documentation are systematically updated to use the new raindex namespace. ChangesOrderbook → Raindex Repository-wide Rebranding
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related issues
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add vm.assume guard to LibOrder.testHashNotEqual (A10-1) - Fix stale NatSpec referencing onlyValidTask in RaindexV6FlashBorrower (CR-3) - Mark already-fixed items (CR-2, A14-3) in triage - Create GitHub issues for 17 remaining findings (#2533-#2539) - Zero PENDING items remain in triage Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… crates Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
RaindexV6 confirmed at 23,437 bytes — identical to pre-rename. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The rainlang word "orderbook" is now "raindex" — this is a breaking change for existing rainlang expressions. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Fix "raindexs" → "raindexes" spelling in test descriptions - Rename OB_NPM_PACKAGE → RAINDEX_NPM_PACKAGE in CI - Rename ob-addr CLI alias → raindex-addr - Update ob-yaml.md URLs → raindex-yaml.md - Fix "order book" → "raindex" in NatSpec comments Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- ob-rs-test → raindex-rs-test - ob-ui-components-prelude → raindex-ui-components-prelude - rainix-ob-cli-artifact → raindex-cli-artifact Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…call Three CI compile failures from the previous merge: - crates/common/.../status/wasm.rs: test fns and ClientStatusBus call sites still referenced ob_id; renamed to raindex_id alongside the existing with_raindex_id constructor - crates/common/.../trades/mod.rs:271: get_trade_detail was calling get_raindex_client (returns ClientRef, no Result) when it needs the subgraph client; switched to get_raindex_subgraph_client - flake.nix test-js-bindings: dropped npm run format-check (script was removed earlier in the no-consumer-prettier migration)
…aindex Resolves 37 conflicts: - UD deletes: dropped vercel-preview-pr-target.yaml (removed in #2573) and the leftover js_api/gui/{deposits,select_tokens}.rs (logic moved to common/raindex_order_builder/ via #2479). - UU code conflicts: kept the orderbook->raindex rename across crates, packages, and Solidity while taking in main's new functionality (multi-subgraph trades_list/trades_count, GUI->OrderBuilder rename, BaseRainterpreterSubParser->BaseRainlangSubParser, ContextProfile::Gui ->ContextProfile::Builder, get_orderbook_yaml->get_raindex_yaml, Orderbook::multicallCall->Raindex::multicallCall). - Lockfiles: Cargo.lock regenerated via cargo generate-lockfile; package-lock.json via npm install --package-lock-only. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Previous merge regenerated Cargo.lock and package-lock.json from scratch, which drifted significantly from main (newer alloy stack, mixed solar-* versions, and an out-of-sync npm tree that failed npm ci on CI). Reset both lockfiles to main's, then reapplied the workspace renames: - Cargo.lock: rain_orderbook_* -> raindex_* (and rain-orderbook-api -> raindex-api) for the renamed workspace crates. - package-lock.json: packages/orderbook -> packages/raindex and the @rainlanguage/orderbook -> @rainlanguage/raindex package id.
…t/order_trade.rs Commit cd18389 wiped this file from 990 lines to 0 (impl block deleted), which broke crates/subgraph/src/raindex_client/performance.rs:12 since it calls order_trades_list_all on RaindexSubgraphClient. Restore the file as it was at cd18389^ and re-apply OrderbookSubgraphClientError -> Raindex rename.
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
… tests
Three rust unit tests in crates/common/src/raindex_order_builder/state_management.rs
were stale relative to YAML rename + spec version bump:
- SERIALIZED_STATE constant (line 402): the base64 blob encodes the YAML
fixtures in raindex_order_builder/mod.rs which got rename-edited
(orderbooks: -> raindexes:, etc.). Updated to the new value produced
by serialize_state() with the current fixtures.
- test_new_from_state_invalid_dotrain: inline dotrain had version: 5,
which now fails at the spec-version check ("expected 6, found 5")
before the test could reach the dotrain-mismatch assertion. Bumped
to version: 6 so parsing proceeds; the dotrain is still distinct from
get_yaml() so DotrainMismatch still fires as expected.
Same root cause as the rust state_management fix: the SERIALIZED_STATE encodes YAML fixtures that got rename-edited (orderbooks: -> raindexes:), so the produced base64 blob no longer matches the constant. Updated to the actual value produced by builder.serializeState() with current fixtures.
Root package.json had prettier deps removed in an earlier branch commit but npm install wasnt re-run, leaving the entries in package-lock.json. Re-run picked up the change.
|
@coderabbitai full review |
✅ Actions performedFull review triggered. |
|
@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:
|
|
Tip For best results, initiate chat on the files or code changes. SIZE=L |
Summary
Comprehensive rename of "OrderBook" / "orderbook" to "Raindex" / "raindex" across the entire codebase and dependent repositories.
What changed
ob_idstruct field →raindex_id(~300 usages)obabbreviation variable names → descriptiveraindex*namessrc/concrete/ob/→src/concrete/raindex/,test/concrete/ob/→test/concrete/raindex/packages/orderbook→packages/raindex(directory rename)[orderbook]→[raindex]ob-rs-test→raindex-rs-test,ob-ui-components-prelude→raindex-ui-components-prelude,rainix-ob-cli-artifact→raindex-cli-artifactOrderbookentity →Raindex, allorderbookfields →raindexob4→raindex"orderbook"→"raindex"(breaking for existing expressions)Companion PRs (merged)
ob-yaml.md→raindex-yaml.md, document version 6Breaking changes
orderbooks:→raindexes:,orderbook:→raindex:.rainfrontmatter and standalone YAML configs must be updatedorderbook_addresscolumns →raindex_addressacross all tables (including PRIMARY KEYs).DB_SCHEMA_VERSIONbumped 2→3Orderbookentity →Raindex, allorderbookfields →raindexon every entity (Vault, Order, Trade, Deposit, Withdrawal, etc.)ob4→raindexob4-*endpoints stop updating"orderbook"field →"raindex"inTakeOrdersReadyResponse. Doc strings updated ("the raindex contract")@rainlanguage/orderbook→@rainlanguage/raindexOrderbookYaml→RaindexYaml,OrderbookYamlError→RaindexYamlError,getOrderbookByAddress()→getRaindexByAddress().orderbook()→.raindex()onRaindexOrder,RaindexVault,TakeOrdersInfo;.orderbookAddress→.raindexAddressonDeploymentTransactionArgs"obId"→"raindexId"on sync status;"orderbookAddress"→"raindexAddress"on vault/order objects;"orderbook"→"raindex"on trade/order objects"orderbook"→"raindex". Sub-parser bytecode and deterministic deploy address changed.rainfiles usingorderbook()must update. New sub-parser must be deployed/orders/[chainId]-[orderbook]-[orderHash]→[raindex], same for vaultsob-addralias →raindex-addrob-rs-test,ob-ui-components-prelude,rainix-ob-cli-artifactrenamedIntentionally preserved
IOrderBookV1-V5Solidity interfaces inlib/rain.raindex.interface/src/interface/deprecated/— historical ABIs for backwards compatibilitycrates/settings/src/local_db_manifest.rsdocumenting the DB column renameraindexsin GraphQL codegen — The Graph framework naively appendssto entity namesMigration checklist
Rebuild remote DB dumps with new schema (
raindex_addresscolumns)Deploy new sub-parser contract (bytecode changed)
Deploy new Goldsky subgraphs (
raindex-*)Update subgraph URLs in all strategy YAML configs
Update
rain.strategiesregistry to version 6 withraindexes:keysUpdate
RAINLANG_URLinpackages/webapp/src/lib/constants.tsto new strategies commitUpdate external
.rainstrategy files:orderbooks:→raindexes:,orderbook:→raindex:,version: 6Update external
.rainsource usingorderbook()word →raindex()Update any API consumers parsing old JSON field names
Update any JS/TS code using
OrderbookYaml→RaindexYaml,.orderbook()→.raindex(), etc.Publish new
@rainlanguage/raindexnpm packageCoordinate npm publish — consumers must explicitly switch from
@rainlanguage/orderbookto@rainlanguage/raindexMerge Rename ob-yaml.md to raindex-yaml.md specs#52 (rename ob-yaml.md → raindex-yaml.md)
Verify Vercel project configs point to
packages/raindex(notpackages/orderbook)Users clear local DB cache (fresh sync required)
Manual end-to-end verification by @Siddharth2207 before merging
Manual end-to-end verification by @hardyjosh before merging
Manual end-to-end verification by @findolor before merging
🤖 Generated with Claude Code
Summary by CodeRabbit
Chores
@rainlanguage/raindex), Rust crate identifiers, CI/CD workflows, configuration files, and build processes throughout the repository.Documentation
Summary by CodeRabbit