Automated test coverage for the Batch transaction feature (XLS-56), grouped by the invariant or execution mode each test exercises with 189 tests.
| Category | Test Count |
|---|---|
| Execution Modes | 42 |
| Multi-Account & Multi-Sign | 23 |
| Tickets, Replay & Metadata | 7 |
| Vault, Loan & Transaction Types | 24 |
| Signature & Structural Validation | 10 |
| Security & Adversarial | 56 |
| Cross-Feature Interactions | 27 |
| Total | 189 |
1. Execution Modes
AllOrNothing
- Test Batch allornothing all payments succeed
- Test Batch allornothing submit batch multiple times
- Test Batch allornothing one payment fails
- Test Batch allornothing all payments fail
- Test Batch allornothing mixed transaction types
- Test Batch allornothing fee calculation
- Test Batch allornothing max inner transactions
- Test Batch allornothing more than max inner transactions
- Test Batch allornothing cash same check multiple times
- Test Batch allornothing fail and then succeed
- Test Batch allornothing with tickets
- Test Batch allornothing deep rollback on late inner failure
- Test Batch allornothing value conservation
OnlyOne
- Test Batch onlyone first succeeds
- Test Batch onlyone first fails second succeeds
- Test Batch onlyone all fail
- Test Batch onlyone offer priority
- Test Batch onlyone max inner transactions
- Test Batch onlyone more than max inner transactions
- Test Batch onlyone cash same check multiple times
- Test Batch onlyone fail and then succeed
UntilFailure
- Test Batch untilfailure all succeed
- Test Batch untilfailure stops at first
- Test Batch untilfailure stops at second
- Test Batch untilfailure stops at third
- Test Batch untilfailure sequential setup
- Test Batch untilfailure progressive payments
- Test Batch untilfailure mixed success failure pattern
- Test Batch untilfailure max inner transactions
- Test Batch untilfailure more than max inner transactions
- Test Batch untilfailure cash same check multiple times
- Test Batch untilfailure fail and then succeed
Independent
- Test Batch independent all succeed
- Test Batch independent some fail
- Test Batch independent all fail
- Test Batch independent parallel operations
- Test Batch independent mixed transaction types
- Test Batch independent account setup operations
- Test Batch independent max transactions
- Test Batch independent more than max transactions
- Test Batch independent cash same check multiple times
- Test Batch independent fail and then succeed
2. Multi-Account & Multi-Sign
Multi-Account
- Test Batch multiaccount workflow all payments succeed
- Test Batch multiaccount atomic swap xrp for xrp
- Test Batch multiaccount atomic swap xrp for token
- Test Batch multiaccount circular three way swap
- Test Batch multiaccount with submitter not in inner txns
- Test Batch multiaccount without signers
- Test Batch multiaccount with max signers
- Test Batch multiaccount with more than max signers
- Test Batch multiaccount txn1 fails txn2 succeeds
- Test Batch multiaccount create check succeeds cash check fails
- Test Batch multiaccount delete accounts too soon with other account as signer
- Test Batch multiaccount delete accounts after flag ledger with other account as signer
- Test Batch multiaccount delete submitting account after flag ledger with no signer
- Test Batch multiaccount delete submitting account after flag ledger with signer
- Test Batch multiaccount alice creates offer bob creates offer
- Test Batch multiaccount create nftokenmint nftokenoffercreate fails reverts nftokenmint
- Test Batch multiaccount exploit steal funds
- Test Batch multiaccount ticket based outer succeeds
Multi-Sign
- Test multisigned outer batch succeeds
- Test multisigned outer with multisigned batch signer succeeds
- Test multisigned outer below quorum rejected tefBAD_QUORUM
- Test multisigned batch signer below quorum rejected tefBAD_QUORUM
- Test multisigned outer with unauthorized signer rejected tefBAD_SIGNATURE
3. Tickets, Replay & Metadata
Tickets
- Test Batch inner txns consume tickets succeeds
- Test Batch inner tickets used out of order succeeds
- Test Batch inner with sequence and ticket rejected temSEQ_AND_TICKET
- Test Batch duplicate ticket same account rejected temREDUNDANT
- Test Batch nonexistent ticket rolls back allornothing
Replay
- Test Batch resubmission is rejected and pays inner once
Metadata
- Test Batch inner txns carry parent batch id and share ledger
4. Vault, Loan & Transaction Types
Single-Asset Vault (SAV)
- Test Batch with vault create
- Test Batch with vault set
- Test Batch with vault deposit
- Test Batch with vault withdraw
- Test Batch with vault delete
- Test Batch with vault clawback
LoanBroker / Loan
- Test Batch with loan broker set
- Test Batch with loan broker delete
- Test Batch with loan broker cover deposit
- Test Batch with loan broker cover withdraw
- Test Batch with loan broker cover clawback
- Test Batch with loan set
- Test Batch with loan pay
- Test Batch with loan delete
- Test Batch with loan manage
Supported Transaction Types
- Test Batch transaction type trustset
- Test Batch transaction type offercreate
- Test Batch transaction type account set
- Test Batch transaction type escrow create
- Test Batch transaction type check create
- Test Batch transaction type nftokenmint
- Test Batch with ticket create transaction
- Test Batch transaction type signerlistset
- Test Batch transaction type depositpreauth
5. Signature & Structural Validation (V1.1 Readiness)
Readiness / Preimage
- Test Batch v1.1 preimage matches pr1010 single
- Test Batch v1.1 preimage matches pr1010 multi
- Test Batch v1.1 preimage layout
- Test batchsigners signature binds outer account sequence and signer account
- Test Batch signers sorted by account id
- Test sdk encode for signing batch natively binds account and sequence
Preflight Error Ordering
- Test Batch inner tx with negative fee rejected at preflight
- Test Batch inner tx with positive xrp fee rejected at preflight
- Test Batch inner tx with iou fee rejected at preflight
- Test Batch inner tx with zero fee passes fee preflight
6. Security & Adversarial
Structural / Flag Enforcement
- Test Batch empty raw transactions
- Test Batch with one raw transaction
- Test Batch with all inner transactions having no tfInnerBatchTxn flag
- Test Batch with some inner transactions having no tfInnerBatchTxn flag
- Test Batch with all inner transactions having incorrect tfInnerBatchTxn flag
- Test Batch with tfInnerBatchTxn flag set for outer transaction
- Test Batch with no mode set for outer transaction
- Test Batch with invalid mode set for outer transaction
- Test Batch with inner transactions having no fee field
- Test Batch with inner transactions having invalid fee values
- Test Batch with inner transactions having bad fee values
- Test Batch with inner transactions with SigningPubKey
- Test Batch with inner transactions with fee and SigningPubKey
- Test Batch with inner transactions with TxnSignature
- Test Batch with inner transactions with Signers
- Test Batch with inner transactions with SponsorSignature
- Test Batch with inner transactions with CounterpartySignature
- Test Batch with invalid inner transactions
- Test Batch inside non empty batch
- Test Batch inside empty batch
- Test Batch inner txns with same sequence leaves no state change
- Test Batch inner txns with same sequence
- Test Batch inner txns with past sequence
- Test Batch inner txns with future not incremental sequences
- Test Batch with account does not exist
- Test Batch with deposit auth on account
- Test Batch with master key disabled on account
- Test Batch all payments with destination account not funded
Adversarial Attack Matrix
- Test Batch with single inner tx returns temARRAY_EMPTY
- Test inner tx with non zero fee returns temBAD_FEE
- Test inner tx with non empty signing pubkey returns temBAD_REGKEY
- Test inner tx missing inner batch flag returns temINVALID_FLAG
- Test standalone payment with tfInnerBatchTxn flag rejected
- Test Batch with outer account in BatchSigners rejected
- Test Batch with duplicate BatchSigners rejected
- Test Batch with BatchSigner for unrelated account rejected
- Test Batch BatchSigners signature for different batch rejected
- Test Batch with single inner transaction rejected temARRAY_EMPTY
- Test Batch with nested inner batch rejected
- Test Batch with duplicate inner sequences rejected temREDUNDANT
- Test Batch inner setregularkey succeeds when outer signed by master
- Test Batch innerbatch flag on standalone payment rejected
- Test Batch v1.1 oversized inner array rejected as tem
- Test Batch v1.1 far oversized inner array survives eager hashing
- Test Batch v1.1 far oversized inner array at scale survives eager hashing
- Test Batch v1.1 batchsigner sig bound to outer sequence
- Test Batch v1.1 batchsigner sig bound to outer account
- Test Batch v1.1 unsorted batchsigners rejected
- Test Batch v1.1 standalone tx with inner batch flag rejected
- Test Batch v1.1 standalone oversized path stays tel
- Test Batch v1.1 batchsigners over kmax rejected
- Test non batch tx with raw transactions rejected at construction
- Test non batch raw transactions rejection does not crash server
- Test Batch outer with sfDelegate rejected by notdelegable template
- Test Batch inner notdelegable type with sfDelegate inner rejected
- Test Batch inner delegated without permission grant returns terNO_DELEGATE_PERMISSION
7. Cross-Feature Interactions
Delegation
- Test delegate as outer account executes delegated inner succeeds
- Test delegate as batch signer authorizes delegated inner succeeds
- Test delegated inner without batch signer rejected temBAD_SIGNER
- Test delegated inner signed by account holder rejected temBAD_SIGNER
- Test delegate without permission inner fails and batch rolls back
Sponsorship
- Test outer batch with reserve sponsorship flag rejected temINVALID_FLAG
- Test inner batch txn with fee sponsorship rejected temINVALID_FLAG
- Test inner batch txn with sponsor signature material rejected temBAD_SIGNATURE
- Test prefunded fee sponsored outer batch succeeds
Confidential MPT
- Test Batch confidential mpt two sends with stale proof allornothing
- Test Batch confidential mpt independent send with one failing
- Test Batch confidential mpt convert then merge inbox allornothing
- Test Batch delegated send missing permission allornothing
- Test Batch delegated send with delegate as outer needs no batch signer
- Test Batch delegated send with delegate as outer with batch signer
- Test Batch confidential mpt two chained sends same sender allornothing
- Test Batch confidential mpt send then convert back same sender allornothing
- Test Batch confidential mpt three chained sends same sender allornothing
- Test Batch confidential mpt chained send wrong predicted ciphertext fails
- Test Batch only one with two valid chained sends executes first only
- Test Batch only one first send to unconverted fails falls through to second
- Test Batch until failure first send commits then stale second fails
- Test Batch allornothing issuer lock then alice send rolls back both
- Test Batch independent three holders converts coa aggregate correct
- Test Batch allornothing inner revokes delegate then later inner uses it rolls back
- Test Batch two chained delegated sends from same delegator both commit
- Test delegated send after delegator loses domain membership fails
Top comments (0)