Skip to content

Fix sponsor reserve accounting edge cases#7575

Open
yinyiqian1 wants to merge 8 commits into
XRPLF:xrplf/sponsorfrom
yinyiqian1:fix-sponsir-tickets
Open

Fix sponsor reserve accounting edge cases#7575
yinyiqian1 wants to merge 8 commits into
XRPLF:xrplf/sponsorfrom
yinyiqian1:fix-sponsir-tickets

Conversation

@yinyiqian1

@yinyiqian1 yinyiqian1 commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

High Level Overview of Change

  • Disallows path-based sponsored account creation, so tfSponsorCreatedAccount cannot bypass the direct XRP payment reserve checks through SendMax / Paths.
  • Corrects sponsored Vault reserve accounting so Vault sponsorship counts for 2 reserves: the Vault and its pseudo-account.
  • Allow SponsorshipTransfer to modify Vault sponsor (NoPriv -> MayModifyVault)
  • (Removed this commit because it duplicates 7542)Restricts NFTokenPage reserve sponsorship during NFTokenAcceptOffer so only buyer-submitted accepts can sponsor the buyer’s new NFTokenPage.

Context of Change

API Impact

  • Public API: New feature (new methods and/or new fields)
  • Public API: Breaking change (in general, breaking changes should only impact the next api_version)
  • libxrpl change (any change that may affect libxrpl or dependents of libxrpl)
  • Peer protocol change (must be backward compatible or bump the peer protocol version)

@yinyiqian1 yinyiqian1 changed the title Fix sponsir tickets Fix sponsor reserve accounting edge cases Jun 18, 2026
@codecov

codecov Bot commented Jun 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.2%. Comparing base (d1a77b4) to head (09ce53d).

Additional details and impacted files

Impacted file tree graph

@@               Coverage Diff               @@
##           xrplf/sponsor   #7575     +/-   ##
===============================================
- Coverage           82.2%   82.2%   -0.0%     
===============================================
  Files               1016    1016             
  Lines              78401   78407      +6     
  Branches            9012    9014      +2     
===============================================
+ Hits               64440   64443      +3     
- Misses             13952   13955      +3     
  Partials               9       9             
Files with missing lines Coverage Δ
include/xrpl/protocol/detail/transactions.macro 100.0% <ø> (ø)
...rotocol_autogen/transactions/SponsorshipTransfer.h 100.0% <ø> (ø)
src/libxrpl/tx/invariants/VaultInvariant.cpp 98.4% <100.0%> (+<0.1%) ⬆️
...rpl/tx/transactors/Sponsor/SponsorshipTransfer.cpp 90.2% <100.0%> (+0.1%) ⬆️
src/libxrpl/tx/transactors/payment/Payment.cpp 92.4% <100.0%> (+<0.1%) ⬆️

... and 2 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.

1 participant