HomePhabricator

[ecash-wallet] Automatically consolidate utxos and retry on max sersize errors

Description

[ecash-wallet] Automatically consolidate utxos and retry on max sersize errors

Summary:
This is a common enough edge case that is sufficiently terrible to explain to users that the lib should just handle it.

It's possible to hit a tx size error because the user must consolidate utxos. In this case, the user probably does not know what UTXOs are or why they should be consolidated. We just want to fulfill the action.

Adding auto utxo consolidation at the lib level is the best way to handle this.

Going forward, we can also look at alternative utxo selection strategies, ways to make this event less likely. But for now this solves most of the problem. We are already configured to build an array of txs that fulfill a given action; in this case, this array simply needs some additional txs before the action tx(s) to consolidate utxos.

Test Plan: npm test

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

Differential Revision: https://reviews.bitcoinabc.org/D19800

Details

Provenance
bytesofmanAuthored on Apr 8 2026, 19:54
bytesofmanPushed on Apr 12 2026, 17:39
Reviewer
Restricted Project
Differential Revision
D19800: [ecash-wallet] Automatically consolidate utxos and retry on max sersize errors
Parents
rABCcbb32cfd8354: [marlin] Add lots of end to end send tests
Branches
Unknown
Tags
Unknown