Skip to content

feat: Update to keylet::sponsorship and sfRemainingOwnerCount#7578

Open
mvadari wants to merge 8 commits into
xrplf/sponsorfrom
mvadari/sponsor/field-updates
Open

feat: Update to keylet::sponsorship and sfRemainingOwnerCount#7578
mvadari wants to merge 8 commits into
xrplf/sponsorfrom
mvadari/sponsor/field-updates

Conversation

@mvadari

@mvadari mvadari commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator

High Level Overview of Change

This PR:

  • Updates keylet::sponsor to keylet::sponsorship
  • Updates sfReserveCount to sfRemainingOwnerCount

Context of Change

Making things easier to read

API Impact

N/A

Copilot AI review requested due to automatic review settings June 19, 2026 00:13

@xrplf-ai-reviewer xrplf-ai-reviewer Bot 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.

No issues.

Review by Claude Sonnet 4.6 · Prompt: V15

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.

Pull request overview

This PR renames the sponsorship keylet helper (keylet::sponsorkeylet::sponsorship) and renames the sfReserveCount protocol field to sfRemainingOwnerCount across core logic, RPC, and tests to improve readability.

Changes:

  • Renamed sponsorship keylet helper usage across transactors, ledger helpers, RPC handler, and tests.
  • Renamed the Sponsorship/SponsorshipSet “reserve count” field to sfRemainingOwnerCount in protocol macros, generated wrappers, and tests.
  • Updated protocol autogen tests and JTx helpers to use the new field name.

Reviewed changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/xrpld/rpc/handlers/ledger/LedgerEntry.cpp RPC ledger entry lookup now uses keylet::sponsorship.
src/tests/libxrpl/protocol_autogen/transactions/SponsorshipSetTests.cpp Updates expected field names in SponsorshipSet autogen tests.
src/tests/libxrpl/protocol_autogen/ledger_entries/SponsorshipTests.cpp Updates Sponsorship ledger entry tests to the new field name.
src/test/rpc/AccountObjects_test.cpp Updates RPC JSON assertions to the new field jsonName.
src/test/jtx/impl/sponsor.cpp Updates JTx SponsorshipSet builders to emit the renamed field.
src/test/app/Sponsor_test.cpp Updates many sponsorship keylet and field references in app-level tests.
src/libxrpl/tx/transactors/Sponsor/SponsorshipTransfer.cpp Updates sponsorship object lookup and reserve field mutation logic.
src/libxrpl/tx/transactors/Sponsor/SponsorshipSet.cpp Updates SponsorshipSet parsing/validation/application to new keylet + field.
src/libxrpl/tx/Transactor.cpp Updates sponsor checks / fee payer logic to use keylet::sponsorship.
src/libxrpl/protocol/Indexes.cpp Renames the keylet computation function implementation.
src/libxrpl/ledger/helpers/AccountRootHelpers.cpp Updates sponsorship object lookup and field adjustment to new names.
include/xrpl/protocol/Indexes.h Renames the public keylet function declaration.
include/xrpl/protocol/detail/transactions.macro Updates SponsorshipSet transaction format to use the renamed field.
include/xrpl/protocol/detail/sfields.macro Renames the SField identifier (affecting JSON field naming).
include/xrpl/protocol/detail/ledger_entries.macro Updates Sponsorship ledger entry format to use the renamed field.
include/xrpl/protocol_autogen/transactions/SponsorshipSet.h Updates generated transaction wrapper to use the renamed field constant.
include/xrpl/protocol_autogen/ledger_entries/Sponsorship.h Updates generated ledger entry wrapper to use the renamed field constant.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread include/xrpl/protocol/Indexes.h
Comment thread src/libxrpl/protocol/Indexes.cpp
Comment thread include/xrpl/protocol/detail/sfields.macro
Comment thread src/libxrpl/ledger/helpers/AccountRootHelpers.cpp Outdated
mvadari and others added 2 commits June 18, 2026 20:22
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

@xrplf-ai-reviewer xrplf-ai-reviewer Bot 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.

Took a pass through this

Compile-breaking omission: adjustOwnerCountHlp( was dropped at line 282 — see inline.


Review by ReviewBot 🤖

Review by Claude Sonnet 4.6 · Prompt: V15

Comment thread src/libxrpl/ledger/helpers/AccountRootHelpers.cpp

@xrplf-ai-reviewer xrplf-ai-reviewer Bot 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.

One compile-breaking typo flagged inline — keylet:: namespace dropped at line 5530.

Review by Claude Sonnet 4.6 · Prompt: V15

Comment thread src/test/app/Sponsor_test.cpp Outdated

@xrplf-ai-reviewer xrplf-ai-reviewer Bot 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.

No issues.

Review by Claude Sonnet 4.6 · Prompt: V15

@codecov

codecov Bot commented Jun 19, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.87500% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 82.2%. Comparing base (d1a77b4) to head (594dddd).

Files with missing lines Patch % Lines
src/xrpld/rpc/handlers/ledger/LedgerEntry.cpp 0.0% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@               Coverage Diff               @@
##           xrplf/sponsor   #7578     +/-   ##
===============================================
- Coverage           82.2%   82.2%   -0.0%     
===============================================
  Files               1016    1016             
  Lines              78401   78402      +1     
  Branches            9012    9012             
===============================================
- Hits               64440   64437      -3     
- Misses             13952   13956      +4     
  Partials               9       9             
Files with missing lines Coverage Δ
include/xrpl/protocol/Indexes.h 100.0% <ø> (ø)
include/xrpl/protocol/detail/ledger_entries.macro 100.0% <ø> (ø)
include/xrpl/protocol/detail/transactions.macro 100.0% <ø> (ø)
...xrpl/protocol_autogen/ledger_entries/Sponsorship.h 100.0% <100.0%> (ø)
...rpl/protocol_autogen/transactions/SponsorshipSet.h 100.0% <100.0%> (ø)
src/libxrpl/ledger/helpers/AccountRootHelpers.cpp 88.3% <100.0%> (+0.1%) ⬆️
src/libxrpl/protocol/Indexes.cpp 96.0% <100.0%> (ø)
src/libxrpl/tx/Transactor.cpp 90.4% <100.0%> (ø)
.../libxrpl/tx/transactors/Sponsor/SponsorshipSet.cpp 98.0% <100.0%> (ø)
...rpl/tx/transactors/Sponsor/SponsorshipTransfer.cpp 90.1% <100.0%> (ø)
... and 1 more

... and 7 files with indirect coverage changes

Impacted file tree graph

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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