Skip to content

refactor: Migrate first handlers to rpc-spec - #3199

Merged
godexsoft merged 35 commits into
XRPLF:developfrom
godexsoft:refactor/consteval-specs-first-handlers
Sep 11, 2026
Merged

refactor: Migrate first handlers to rpc-spec#3199
godexsoft merged 35 commits into
XRPLF:developfrom
godexsoft:refactor/consteval-specs-first-handlers

Conversation

@godexsoft

@godexsoft godexsoft commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

This PR migrates account_info and account_currencies as the first two handlers to use rpc-spec system.
It also migrates Clio to rpc-spec 0.1.8 and fixes a discrepancy in how we handle malformed ledger hash/index.

@codecov

codecov Bot commented Sep 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@godexsoft
godexsoft changed the base branch from develop to refactor/consteval-specs-dual-path September 8, 2026 13:12
@godexsoft
godexsoft requested a review from a team as a code owner September 8, 2026 13:12

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

It changes runtime request validation/parsing behavior by migrating core RPC handlers to a new external spec/version, and that surface area warrants final human verification beyond unit-test alignment.

Pull request overview

This PR migrates the account_info and account_currencies RPC handlers to the shared xrpl-rpc-spec typed-handler system (spec::HandlerFor<Input>), aligning Clio’s validation/parsing and warning behavior with rpc-spec, and bumps the rpc-spec dependency to 0.1.8.

Changes:

  • Refactors AccountInfoHandler and AccountCurrenciesHandler to use rpc-spec typed inputs (including LedgerSpecifier) and removes legacy in-repo JSON parsing/spec code for these handlers.
  • Updates and extends unit tests to match rpc-spec validation errors and warning serialization (toJsonArray), adding additional parameter-validation coverage for account_currencies.
  • Updates dependency pins (Conan xrpl-rpc-spec to 0.1.8) and bumps a couple of GitHub Actions SHA pins.
File summaries
File Description
tests/unit/rpc/handlers/AllHandlerTests.cpp Updates typed AccountInfoHandler::Input construction to use AccountID conversion helper.
tests/unit/rpc/handlers/AccountInfoTests.cpp Aligns expected validation messages/warnings with rpc-spec and converts warnings to JSON arrays.
tests/unit/rpc/handlers/AccountCurrenciesTests.cpp Adds/updates validation tests consistent with rpc-spec parsing and warning conversion.
src/rpc/handlers/AccountInfo.hpp Migrates handler definition to spec::HandlerFor<...> and rpc-spec input types.
src/rpc/handlers/AccountInfo.cpp Switches ledger resolution to LedgerSpecifier path and removes legacy JSON-to-Input parsing.
src/rpc/handlers/AccountCurrencies.hpp Migrates handler definition to spec::HandlerFor<...> and rpc-spec input types.
src/rpc/handlers/AccountCurrencies.cpp Switches ledger resolution to LedgerSpecifier path and removes legacy JSON-to-Input parsing.
conanfile.py Bumps xrpl-rpc-spec dependency to 0.1.8.
conan.lock Updates locked xrpl-rpc-spec reference to 0.1.8.
.github/workflows/docs.yml Updates actions/deploy-pages pin to v5.0.1 SHA.
.github/actions/build-docker-image/action.yml Updates docker/setup-qemu-action pin to v4.3.0 SHA.
Review details
  • Files reviewed: 10/11 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@godexsoft
godexsoft changed the base branch from refactor/consteval-specs-dual-path to develop September 9, 2026 14:01
Comment thread src/rpc/handlers/AccountCurrencies.cpp
Comment thread src/rpc/handlers/AccountCurrencies.hpp Outdated
Comment thread src/rpc/handlers/AccountInfo.cpp Outdated
Comment thread src/rpc/handlers/AccountInfo.cpp Outdated
Comment thread src/rpc/handlers/AccountInfo.hpp Outdated
Comment thread tests/unit/rpc/handlers/AccountInfoTests.cpp
@godexsoft
godexsoft merged commit 899661e into XRPLF:develop Sep 11, 2026
118 of 120 checks passed
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