spec(XLS-65): Update VaultDeposit failure conditions and state changes - #552
spec(XLS-65): Update VaultDeposit failure conditions and state changes#552Tapanito wants to merge 36 commits into
Conversation
…tion - Add Example JSON sections for Vault ledger entry and all transactions (VaultCreate, VaultSet, VaultDelete, VaultDeposit, VaultWithdraw, VaultClawback, Payment) with real transaction data - Add invariants for the Vault ledger entry (universal checks) and all transaction types derived from the ValidVault invariant checker - Restructure section 10 from "API" to "RPC: vault_info" matching the amendment template format with Request Fields, Response Fields, Failure Conditions, Example Request, and Example Response subsections - Update response fields table with missing fields (Data, Asset.mpt_issuance_id, shares.DomainID, shares.MPTokenMetadata) and correct Always Present values - Update response examples to use proper JSON format with response envelope - Add section 9.1 Fields for Payment transaction - Remove Index section and all Return to Index links Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Reorganize top-level sections: Abstract (1), Introduction (2), Specification (3), Rationale (4), Security Considerations (5), Appendix - Move all ledger entry, transaction, and RPC sections under "3. Specification" as subsections (3.1-3.9) - Remove "1.1 Overview" heading, merge content into Introduction body - Renumber Introduction subsections: Terminology (2.1), Actors (2.2), Connecting to the Vault (2.3) - Demote all specification headings by one level with new numbering - Add Rationale section explaining decoupled vault design - Rename FAQ section to "Appendix A: FAQ" with A.x numbering - Fix heading levels for Key Variables and Vault State Update Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Remove functional additions (invariants, example JSONs, error codes) added in this branch and retain only structural changes that bring the spec into conformance with AMENDMENT_TEMPLATE.md and XLS_TEMPLATE.md. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Convert failure conditions and state changes from numbered lists back to master's original nested bullet-point format. Keep the Data Verification / Protocol-Level Failures subsection headers as template compliance, but use master's original content and structure inside them. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Convert bullet points in Failure Conditions and State Changes sections to numbered lists with nested sub-numbering, per template requirements. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Mayukha Vadari <mvadari@gmail.com>
…-deposit # Conflicts: # XLS-0065-single-asset-vault/README.md
tyalymov
left a comment
There was a problem hiding this comment.
Same question as in #549: in 3.5.2.2 the order of the failure conditions doesn't match the evaluation order in preclaim/doApply. Two spots:
private-domain auth is listed before the freeze/lock checks, but the code checks freeze/lock first;
tecINSUFFICIENT_FUNDS is listed before the vault-scale tecPRECISION_LOSS, but the code checks precision first.
Is the numbered list meant to be the evaluation order? If so, can we reorder to match?
3.5.2.2 now follows the actual preclaim evaluation order: MPT transferability/lock, IOU freeze, and shares-locked checks are checked before private-domain authorization; vault-scale tecPRECISION_LOSS is checked before tecINSUFFICIENT_FUNDS. Addresses review feedback on PR #552.
|
Confirmed against |
Syncs the VaultDeposit spec section with the current implementation in
src/libxrpl/tx/transactors/vault/VaultDeposit.cpp.Data Verification (3.5.2.1) — was
_None._, now has two items:temMALFORMED)temBAD_AMOUNT)Protocol-Level Failures (3.5.2.2) — extended from 7 to 13 items:
tecNO_AUTH; not a valid domain member →tecNO_AUTH)tecLOCKED)tecNO_AUTH)tecPRECISION_LOSS)tecPRECISION_LOSS)tecPRECISION_LOSS)tecPATH_DRY)State Changes (3.5.3) — corrected:
Amountdue to IOU scale rounding)