feat: Update to keylet::sponsorship and sfRemainingOwnerCount#7578
Open
mvadari wants to merge 8 commits into
Open
feat: Update to keylet::sponsorship and sfRemainingOwnerCount#7578mvadari wants to merge 8 commits into
keylet::sponsorship and sfRemainingOwnerCount#7578mvadari wants to merge 8 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR renames the sponsorship keylet helper (keylet::sponsor → keylet::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
sfRemainingOwnerCountin 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.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ 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
🚀 New features to boost your workflow:
|
oleks-rip
approved these changes
Jun 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
High Level Overview of Change
This PR:
keylet::sponsortokeylet::sponsorshipsfReserveCounttosfRemainingOwnerCountContext of Change
Making things easier to read
API Impact
N/A