Skip to content

Conversation

@martinserts
Copy link
Contributor

@martinserts martinserts commented Dec 2, 2025

Description

This PR introduces two main improvements:

1. Automated UTXO Splitting (Chained Transactions)

  • If a transaction requires more UTXOs than allowed by MAX_INPUT_COUNT_PER_TX, the system will now split the transaction.
  • It creates a self-transfer (consolidation) transaction first, followed by a transaction to the intended recipient using the unconfirmed outputs (0-conf).

2. Payment Cancellation API

  • Adds a new endpoint to allow users to cancel a pending payment.

New Environment Variables:

  • MAX_INPUT_COUNT_PER_TX: (Integer) The maximum number of inputs allowed in a single transaction before splitting occurs. Default: 400
  • CONFIRMATION_CHECKER_REQUIRED_CONFIRMATIONS: (Integer) The number of confirmations required. Default: 10

Motivation and Context

Previously, if a user submitted a transaction requiring a massive number of UTXOs (making the TX size/weight too large for standard propagation or block limits), the transaction would simply fail.

This PR solves this by detecting heavy transactions and breaking them down:
Step 1: Create a transaction to self to consolidate inputs.
Step 2: immediately spend the output of Step 1 to pay the recipient (chaining the transactions).

Additionally, we needed a way to manually stop payments, hence the new Cancel API.

Breaking Changes

  • None
  • Requires data directory on base node to be deleted
  • Requires hard fork
  • Other - Please specify

@martinserts martinserts force-pushed the coinjoin branch 3 times, most recently from dc41ccc to a210038 Compare December 4, 2025 12:41
@martinserts martinserts changed the title feat: coinjoin for large transactions feat: UTXO splitting for large TXs & Payment Cancel API Dec 4, 2025
@martinserts martinserts marked this pull request as ready for review December 4, 2025 13:51
@SWvheerden SWvheerden merged commit 7226d01 into tari-project:main Dec 5, 2025
2 checks passed
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.

2 participants