BIP78: Allow mixed inputs Redux
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.
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?
Are you suggesting I compile the changes into an addendum document, or something else?
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.
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
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.
GetVirtualSizecan be removed as it is not used anymore.- Can you rename
if (output.OriginalTxOut == feeOutput)toif (originalOutput.OriginalTxOut == feeOutput)
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: 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 yes this is ready to merge
Closes https://github.com/bitcoin/bips/pull/1244.