Skip to content
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
@ShookLyngs

Description

@ShookLyngs

Issue

The reasons triggering the INSUFFICIENT_UTXO error are clear:

  1. Not enough satoshi collected to cover the needs of the outputs and fee
  2. 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:

  1. Small value UTXOs (value < minUtxoSatoshi) of an address will be excluded as they're considered dust
  2. If ckbVirtualResult.needPaymasterCell == true, there's an extra payment to the paymaster
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions