Repository navigation
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The public vault-share escrow behavior change lacks the required API changelog entry documenting the fixVaultV1_1 gate and that existing share issuances retain their escrow flag.
1 open issue
What changed in this PR
This PR prevents newly created vault shares from being escrowed when fixVaultV1_1 is enabled, keeping those shares accessible to VaultClawback. Existing share issuances retain their current behavior.
Changes:
- Register
fixVaultV1_1and gate the share issuance escrow flag. - Test escrow rejection with the amendment enabled and legacy behavior without it.
- Update RPC flag expectations and preserve legacy escrow test scenarios.
| File | Description |
|---|---|
src/test/app/vault/VaultShares_test.cpp |
Test amendment-dependent escrow permissions and holder balances. |
src/test/app/vault/VaultRPC_test.cpp |
Update expected share issuance flags. |
src/test/app/vault/VaultClawback_test.cpp |
Disable the amendment for legacy escrow scenarios. |
src/libxrpl/tx/transactors/vault/VaultCreate.cpp |
Omit the escrow flag when the amendment is enabled. |
include/xrpl/protocol/detail/features.macro |
Register the supported, default-no amendment. |
Review effort: Balanced
Comment on lines
+243
to
+244
| if (!view().rules().enabled(fixVaultV1_1)) | ||
| mptFlags |= lsfMPTCanEscrow; |
| env.close(); | ||
|
|
||
| { | ||
| json::Value jv; |
Contributor
There was a problem hiding this comment.
Wrong type: json::Value doesn't exist. Use Json::Value:
Suggested change
| json::Value jv; | |
| Json::Value jv; |
1 task done
This branch has not been deployed
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
With the new
fixVaultV1_1amendment enabled, vault shares cannot be escrowed.VaultCreateno longer setslsfMPTCanEscrowon the shareMPTokenIssuance.EscrowCreatealso rejects an MPT whose issuerAccountRootcarriessfVaultIDwithtecNO_PERMISSION, so the shares of vaults created before the amendment are rejected too.Today a holder can escrow vault shares and keep them out of reach of the asset issuer's
VaultClawbackuntil the escrow is finished or cancelled.Context of Change
VaultCreatehas setlsfMPTCanEscrowon every transferable share issuance sinceSingleAssetVault, as XLS-65 §3.1.6.2.2 specifies.EscrowCreatereads that flag from the share issuance, not from the vault asset, so shares can be escrowed even when the asset cannot.Escrow moves shares from the holder's
MPTAmounttoLockedAmount.VaultClawbackburns only fromMPTAmount, so escrowed shares are invisible to it. The asset issuer holds the clawback right over shares but never chose to make them escrowable.Share issuances created before the amendment keep the flag. For that reason
escrowLockPreclaimHelper<MPTIssue>checks the issuer rather than the flag. OnlyVaultCreatecreates an account withsfVaultID, so the check matches vault shares and nothing else. An escrow of shares created before the amendment can still be finished or cancelled.The tests that escrow shares to exercise
LockedAmountnow run without the fix. Reported by @Tapanito. The spec change is XRPLF/XRPL-Standards#683.API Impact
libxrplchange (any change that may affectlibxrplor dependents oflibxrpl)