test: Verify private-vault DEX permissions survive domain loss (FN-82) - #7937
Open
tyalymov wants to merge 1 commit into
Open
test: Verify private-vault DEX permissions survive domain loss (FN-82)#7937tyalymov wants to merge 1 commit into
tyalymov wants to merge 1 commit into
Conversation
Adds regression coverage for a standup concern that a private-vault depositor might still sell shares on the DEX, or move them P2P, after losing Permissioned Domain membership. Both the seller leg (testDomainLossAfterAcquisition) and the buyer leg (testDomainCheckBuyerSideOffer) are already blocked correctly by requireAuth's live domain recheck; no code fix is required.
tyalymov
force-pushed
the
tialymov/FN-82-private_vault_dex_domain_regression_tests
branch
from
August 3, 2026 17:48
3e7b61f to
2796177
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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
Adds two regression tests to
Vault_test.cppconfirming that a private-vault depositor who loses Permissioned Domain membership after acquiring shares is correctly blocked from further DEX (CLOB) activity, on both the seller and buyer legs. No production code changes.Ref: FN-82.
Context of Change
A standup discussion (see the FN-82 Jira comment thread) raised a suspicion that current code might still allow placing or filling a CLOB offer selling vault shares even after the seller's Permissioned Domain access was revoked. Auditing
requireAuth/enforceMPTokenAuthorization(include/xrpl/ledger/helpers/MPTokenHelpers.cpp) and running these tests shows the concern doesn't hold: the domain check is re-verified live on every relevant operation, so the suspected gap doesn't exist. These tests capture that as a permanent regression check, covering:testDomainLossAfterAcquisition: a depositor who loses domain access after acquiring shares is blocked from further P2P transfer (tecNO_AUTH) and from creating a CLOB sell offer (tecUNFUNDED_OFFER).testDomainCheckBuyerSideOffer: an account that never held domain access is blocked from buying shares via a crossing CLOB offer (tecNO_AUTH).A separate, unrelated gap found during the same audit (
VaultWithdrawnot checking Layer 2 for third-party withdrawal destinations) is filed as FN-83 and is out of scope for this PR.API Impact
libxrplchange (any change that may affectlibxrplor dependents oflibxrpl)Test Plan
Test-only change; no production code touched.
testDomainLossAfterAcquisition,testDomainCheckBuyerSideOfferinsrc/test/app/Vault_test.cpp.xrpld --unittest=Vault: 413 cases, 0 failures.