Payment Protocol does not accept outputs with zero amounts #3095

issue jherrerob opened this issue on October 15, 2013
  1. jherrerob commented at 2:02 PM on October 15, 2013: none

    According to BIP0070, if I understood it correctly, the outputs with amount set to zero should be valid:

    "If the sum of outputs.amount is zero, the customer will be asked how much to pay, and the bitcoin client may choose any or all of the Outputs (if there are more than one) for payment"

    The current implementation raises this error: "Requested payment amount (0.00BTC) too small"

    This happens either with non signed or signed payment requests.

    There are some use cases where I believe it would be useful to have zero amount outputs, for example having a donation payment request available for anyone who wants to donate or using it to send valid M-N scripts as a payment method. The signed Payment Request would still allow to verify the identity of the recipient.

    Be aware that solving this would probably increase the priority of this other bug: #2936 Which I have just updated with more information.

  2. Diapolo commented at 7:07 PM on October 15, 2013: none

    I guess this is not because of non BIP0070-conformance, but because an IsDust(CTransaction::nMinRelayTxFee) is applied to the amount.

  3. Diapolo commented at 7:39 PM on October 22, 2013: none

    #3130 will clear up the message a bit.

  4. jherrerob commented at 7:58 AM on October 23, 2013: none

    I believe the "isDust" check should not be done for zero amount payment requests until the user has been able to change the amount. Might be part of the confirmation message box that pops up just before sending the bitcoins.

    Which would allow what the BIP states: "If the sum of outputs.amount is zero, the customer will be asked how much to pay". Using the current implementation on signed payment requests the user is never asked how much to pay, he just gets an error.

    That makes zero amount payment requests invalid and can not be used for donations, non-address scripts, etc.

  5. laanwj added the label GUI on Jan 8, 2015
  6. laanwj removed the label BIP on Jan 8, 2015
  7. laanwj commented at 11:25 AM on April 28, 2016: member

    This is addressed in PR #7376.

  8. laanwj commented at 6:34 AM on August 6, 2019: member

    Closing payment protocol specific issues; as that functionality is going to be deprecated in the near future it's not worth working on.

  9. laanwj closed this on Aug 6, 2019

  10. DrahtBot locked this on Dec 16, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-21 18:16 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me