Skip to content

Empty inputs when balancing a transaction with only withdrawals #495

@mmontin

Description

@mmontin

When balancing a transaction, there is a certain setting which can lead to an empty set of inputs:

  • the transaction does more withdrawals than what it consumes (and thus have a positive balance)
  • the difference is sufficient to account for the transaction fee
  • the difference minus the fee is either exactly 0 or sufficient to account for the min ada of the generated utxo

This makes sense that no input would be provided in that setting, however the ledger does not accept transactions with not inputs. We need to either:

  • document this behavior and let users handle it case by case (which is pretty easy with the balancing options)
  • handle this case in the balancing process and artificially add a dummy input in such transactions

I believe the option 2 should be advocated as we try to generate transactions that move as far as possible in the validation process, and this is somewhat an easy fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions