Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Omit previous transaction for taproot inputs #579

Closed
wants to merge 1 commit into from

Conversation

t-bast
Copy link
Member

@t-bast t-bast commented Jan 4, 2024

We include the whole previous transaction in tx_add_input to protect against malleability attacks that affect segwit v0. Since lightning messages are limited to 65kB, this has an annoying consequence: if the input you're trying to spend comes from a large transaction, you cannot use it with the interactive-tx protocol.

This is happening in practice with coinjoins and payouts from mining pools. Since segwit v1+ is not affected by this malleability issue, we can relax that requirement and only send the corresponding txout.

This is proposed to the spec in niftynei/lightning-rfc#18

We include the whole previous transaction in `tx_add_input` to protect
against malleability attacks that affect segwit v0. Since lightning
messages are limited to 65kB, this has an annoying consequence: if the
input you're trying to spend comes from a large transaction, you cannot
use it with the `interactive-tx` protocol.

This is happening in practice with coinjoins and payouts from mining
pools. Since segwit v1+ is not affected by this malleability issue,
we can relax that requirement and only send the corresponding `txout`.
sstone added a commit that referenced this pull request Jan 22, 2024
They use taproot v1, providing the tx output and not the entire tx is safe (see #579).
Here we add the swap-in input output and txout to the swap-in TLV, so this change does not interface with proposed changes to the LN spec.
sstone added a commit that referenced this pull request Jan 23, 2024
They use taproot v1, providing the tx output and not the entire tx is safe (see #579).
Here we add the swap-in input output and txout to the swap-in TLV, so this change does not interface with proposed changes to the LN spec.
sstone added a commit that referenced this pull request Jan 24, 2024
They use taproot v1, providing the tx output and not the entire tx is safe (see #579).
Here we add the swap-in input output and txout to the swap-in TLV, so this change does not interface with proposed changes to the LN spec.
sstone added a commit that referenced this pull request Jan 24, 2024
They use taproot v1, providing the tx output and not the entire tx is safe (see #579).
Here we add the swap-in input output and txout to the swap-in TLV, so this change does not interface with proposed changes to the LN spec.
sstone added a commit that referenced this pull request Jan 29, 2024
They use taproot v1, providing the tx output and not the entire tx is safe (see #579).
Here we add the swap-in input output and txout to the swap-in TLV, so this change does not interface with proposed changes to the LN spec.
@t-bast
Copy link
Member Author

t-bast commented Jan 30, 2024

We unfortunately cannot safely omit the prevtx, it's more subtle than this: https://delvingbitcoin.org/t/malleability-issues-when-creating-shared-transactions-with-segwit-v0/497

@t-bast t-bast closed this Jan 30, 2024
@t-bast t-bast deleted the dual-funding-taproot-inputs branch January 30, 2024 12:06
sstone added a commit that referenced this pull request Feb 6, 2024
They use taproot v1, providing the tx output and not the entire tx is safe (see #579).
Here we add the swap-in input output and txout to the swap-in TLV, so this change does not interface with proposed changes to the LN spec.
sstone added a commit that referenced this pull request Feb 8, 2024
They use taproot v1, providing the tx output and not the entire tx is safe (see #579).
Here we add the swap-in input output and txout to the swap-in TLV, so this change does not interface with proposed changes to the LN spec.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant