Skip to content

Add Confidential MPT (XLS-0096) Phase 1 faulty transaction workloads#59

Draft
manasip-prog wants to merge 2 commits into
mainfrom
manasip/confidential-mpt-workload
Draft

Add Confidential MPT (XLS-0096) Phase 1 faulty transaction workloads#59
manasip-prog wants to merge 2 commits into
mainfrom
manasip/confidential-mpt-workload

Conversation

@manasip-prog
Copy link
Copy Markdown
Collaborator

@manasip-prog manasip-prog commented May 27, 2026

Summary

Adds Phase 1 (faulty/rejection-only) transaction handlers for Confidential MPT (XLS-0096) fuzzing. These handlers generate deliberately malformed transactions to exercise rippled's server-side validation paths.

Transaction Types

Type Endpoint Mutations
ConfidentialMPTMergeInbox /confidential/merge_inbox/random fake MPT ID, non-holder, issuer-as-holder, invalid flags, non-owner auth
ConfidentialMPTConvert /confidential/convert/random garbage/wrong-length proofs, ciphertexts, blinding factors, zero/negative/overflow amount, point-not-on-curve, key-without-proof, proof-without-key, invalid flags, non-owner auth
ConfidentialMPTSend /confidential/send/random garbage/wrong-length proofs, ciphertexts, commitments, self-send, fake MPT ID, non-participant, send-to-issuer, invalid flags, non-owner auth
ConfidentialMPTConvertBack /confidential/convert_back/random garbage/wrong-length proofs, ciphertexts, commitments, fake MPT ID, negative/overflow/overdraw amounts, invalid flags, non-owner auth
ConfidentialMPTClawback /confidential/clawback/random garbage/wrong-length proofs, ciphertexts, non-issuer, self-clawback, fake MPT ID, negative/overflow amounts, invalid flags, non-owner auth

Design

  • ~50 unique mutations across 5 handlers covering structural, cryptographic blob, and semantic fault categories
  • Uses raw JSON-RPC submission (_submit_raw via GenericRequest) to bypass xrpl-py client-side validation, allowing deliberately malformed transactions to reach rippled's server-side validation
  • Every mutation branch produces a distinct invalid transaction — zero no-op paths
  • All handlers include non_owner_submission (Account A signs, Account B in tx) to test tefBAD_AUTH
  • _submit_raw catches XRPLException from overflow amount mutations (values > 2^63) so the tx_submitted assertion still fires

Local Test Results

Tested against standalone rippled (xrpld-3.2.0-b0) with the 4-terminal local setup (rippled, ledger_accept loop, workload server, curl).

Verification Checks

Check Result
check-imports ✅ All imports pass
check-endpoints ✅ All 5 confidential endpoints registered (68 total)
All 5 endpoints respond ✅ HTTP 200 OK
No crashes/exceptions ✅ Zero warnings, zero errors in server log
seen assertions fire ✅ All 5 types hit
Stress test (100 requests) ✅ 20 per type, all submitted
Overflow amount handling XRPLRequestFailureException caught in _submit_raw

Submitted Events (from SDK JSONL)

20x workload::submitted : ConfidentialMPTSend
20x workload::submitted : ConfidentialMPTMergeInbox
20x workload::submitted : ConfidentialMPTConvertBack
20x workload::submitted : ConfidentialMPTConvert
20x workload::submitted : ConfidentialMPTClawback

Assertion Hits

HIT: workload::seen : ConfidentialMPTClawback
HIT: workload::seen : ConfidentialMPTConvert
HIT: workload::seen : ConfidentialMPTConvertBack
HIT: workload::seen : ConfidentialMPTMergeInbox
HIT: workload::seen : ConfidentialMPTSend

Note on Engine Results

The local rippled (xrpld-3.2.0-b0) does not yet include the Confidential MPT amendment, so all transactions return invalidParams (Field 'tx_json.TransactionType' has invalid data). This confirms the workload code is solid — no crashes, proper submission flow. Actual rejection testing (temMALFORMED, tefBAD_AUTH, etc.) requires a rippled built from the confidential-mpt branch, which is the target environment in Antithesis.

Files Changed

  • workload/src/workload/transactions/confidential_mpt.py — 5 handlers (~490 lines)
  • workload/src/workload/params.py — 12 new confidential generators
  • workload/src/workload/transactions/__init__.py — 5 REGISTRY entries
  • workload/src/workload/transactions/tickets.py — 5 _TICKET_EXCLUDED entries
  • scripts/check-imports, scripts/check-endpoints — updated
  • 5 new shell scripts in test_composer/all_transactions/

Phase 2 (Future)

Valid transaction handlers require the mpt-crypto library for real ZK proofs and will be added in a follow-up PR once the library is available.


Pull Request opened by Augment Code with guidance from the PR author

Implements 5 faulty/rejection-only handlers for Confidential MPT fuzzing:
- ConfidentialMPTMergeInbox: fake MPT ID, non-holder, issuer-as-holder, invalid flags, non-owner auth
- ConfidentialMPTConvert: garbage/wrong-length proofs, ciphertexts, blinding factors, zero amount, negative amount, overflow, point-not-on-curve, key-without-proof, proof-without-key, invalid flags, non-owner auth
- ConfidentialMPTSend: garbage/wrong-length proofs, ciphertexts, commitments, self-send, fake MPT ID, non-participant, send-to-issuer, invalid flags, non-owner auth
- ConfidentialMPTConvertBack: garbage/wrong-length proofs, ciphertexts, commitments, fake MPT ID, negative/overflow/overdraw amounts, invalid flags, non-owner auth
- ConfidentialMPTClawback: garbage/wrong-length proofs, ciphertexts, non-issuer, self-clawback, fake MPT ID, negative/overflow amounts, invalid flags, non-owner auth

~50 unique mutations across all handlers covering structural, cryptographic blob, and semantic fault categories.

Uses raw JSON-RPC submission (_submit_raw) to bypass xrpl-py client-side validation, allowing deliberately malformed transactions to reach rippled server-side validation.

Files:
- workload/src/workload/transactions/confidential_mpt.py (new)
- workload/src/workload/params.py (confidential generators)
- workload/src/workload/transactions/__init__.py (REGISTRY)
- workload/src/workload/transactions/tickets.py (_TICKET_EXCLUDED)
- scripts/check-imports, scripts/check-endpoints
- 5 test_composer shell scripts
Overflow amount mutations (values > 2^63) cause rippled's JSON parser
to reject the request, raising XRPLRequestFailureException in xrpl-py.
Catch it in _submit_raw so the tx_submitted assertion still fires
instead of bubbling up as a warning to the endpoint handler.
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