This repository was archived by the owner on May 27, 2025. It is now read-only.
This repository was archived by the owner on May 27, 2025. It is now read-only.
The INSUFFICIENT_UTXO error is not clear enough #260
Open
Description
Issue
The reasons triggering the INSUFFICIENT_UTXO
error are clear:
- Not enough satoshi collected to cover the needs of the outputs and fee
- Not enough satoshi collected to generate a change output (change output value < minUtxoSatoshi)
However, it's hard to prompt a specific reason that causes the error because there could be indirect causes:
- Small value UTXOs (
value < minUtxoSatoshi
) of an address will be excluded as they're considered dust - If
ckbVirtualResult.needPaymasterCell == true
, there's an extra payment to the paymaster - The change output's defined value must be >= minUtxoSatoshi
Possible Resolutions
- I think this is somewhat a lack-of-documentation issue, and if we can provide a better version of the documentation, things could be easier. For starters, we could write a "Common Errors" section in the documentation, explaining what the errors actually mean in reality and guiding users to find the actual cause or reason for the error.
- For the indirect cause 3 mentioned above, we could add an option to allow treating the change value as fee if the value is smaller than the minUtxoSatoshi, instead of always generating a change output for that. Related issue: Don't create change output (uneconomical output) if not worthy #183.