bips icon indicating copy to clipboard operation
bips copied to clipboard

BIP78: Allow mixed inputs Redux

Open DanGould opened this issue 1 year ago • 7 comments

This is a follow up to https://github.com/bitcoin/bips/pull/1244/ that

  • separates concerns into individual commits
  • corrects fee verification for a proposal having mixed script inputs while ensuring additional fee indeed paid for input

I know @kixunil is extremely busy to update these days, so I took the liberty to organize the changes we've discussed according to your wants here. @NicolasDorier I hope these changes satisfy your desire for them to be small and problem-focused while maintaining the spirit of the original.


Disallowing mixed inputs was based on incorrect assumption that no wallet supports mixed inputs and thus mixed inputs imply PayJoin. However there are at least three wallets supporting mixed inputs. (Confirmed: Bitcoin Core, LND, Coinomi) Thus it makes sense to enable mixed inputs to avoid a payjoin-specific fingerptint. To avoid compatibility issues a grace period is suggested.

DanGould avatar May 31 '24 15:05 DanGould

It seems to me that you are proposing a number of changes to BIP 78 and the biggest point of friction seems to be to get sign-off from that BIP’s champion. Have you considered alternatively proposing your own variant of BIP 78 with the changes you would like to see and building BIP 77 on top of that?

murchandamus avatar May 31 '24 17:05 murchandamus

Are you suggesting I compile the changes into an addendum document, or something else?

DanGould avatar May 31 '24 19:05 DanGould

Sorry, I thought this was a PR with further changes, in addition to your prior attempt to modify BIP 78. At second glance I realize now that this is a second variant with a reduced scope to the prior. Nevermind, please ignore and carry on.

murchandamus avatar May 31 '24 20:05 murchandamus

I'd still like to cover the edge case I mentioned because it affects some software in the wild but that can be done in a separate PR.

To be crystal clear, you're talking about transaction malleability with regard to output substitution. I think that's outside the scope of this pr but also worthy of amendment. That discussion is: https://github.com/bitcoin/bips/pull/1244/files#r1633516491

DanGould avatar Jun 10 '24 16:06 DanGould

It means that only a single input can be covered by the contribution and the rest should be at the cost of the receiver. Not a big deal, as I welcome that it makes things a little bit simpler while still breaking the heuristic.

  1. GetVirtualSize can be removed as it is not used anymore.
  2. Can you rename if (output.OriginalTxOut == feeOutput) to if (originalOutput.OriginalTxOut == feeOutput)

NicolasDorier avatar Jun 25 '24 00:06 NicolasDorier

Ok @DanGould can you pickup this commit please: https://github.com/NicolasDorier/bips/commit/1cc129ed2b8b9027a1123d7cd1f55509c92c9731

This basically just hardcode the maximum amount to pay for any input.

NicolasDorier avatar Jun 25 '24 03:06 NicolasDorier

@NicolasDorier: It looks like the commit you requested was added. Could you please review this PR and state whether you support or reject these changes?

murchandamus avatar Jul 17 '24 14:07 murchandamus

@murchandamus yes this is ready to merge

NicolasDorier avatar Jan 14 '25 14:01 NicolasDorier

Closes https://github.com/bitcoin/bips/pull/1244.

jonatack avatar Jan 14 '25 15:01 jonatack