Skip to content

Conversation

@t-bast
Copy link
Member

@t-bast t-bast commented Apr 1, 2025

We verify that details about all inputs are provided to the sign function. While this isn't mandatory for segwit v0, it ensures that all of our existing tests exercise this codepath and reduces the risk that we forget to provide some wallet inputs, which would result in an invalid signature which would be hard to investigate.

With this change, some of the unit tests started failing, which showed that we weren't correctly setting wallet inputs in the fee-bumping case in ReplaceableTxFunder, which we've fixed.

We also add a test in TransactionsSpec.scala to verify that signing fails when details about some inputs are missing.

This PR targets #3047

We verify that details about all inputs are provided to the `sign`
function. While this isn't mandatory for segwit v0, it ensures that
all of our existing tests exercise this codepath and reduces the risk
that we forget to provide some wallet inputs, which would result in an
invalid signature which would be hard to investigate.

With this change, some of the unit tests started failing, which showed
that we weren't correctly setting wallet inputs in the fee-bumping case
in `ReplaceableTxFunder`, which we've fixed.

We also add a test in `TransactionsSpec.scala` to verify that signing
fails when details about some inputs are missing.
@t-bast t-bast merged commit c9341fc into sign-all-spent-utxos Apr 1, 2025
@t-bast t-bast deleted the sign-all-spent-utxos-bast branch April 1, 2025 14:16
sstone added a commit that referenced this pull request Apr 1, 2025
…ds (#3047)

* ChannelKeyManager: add a map of spent outputs to sign() methods

This is needed to sign inputs that spend taproot outputs. These outputs are typically wallet inputs added to a transaction to bump it.

* Stricter requirements on input details for signing (#3052)

We verify that details about all inputs are provided to the `sign` function. While this isn't mandatory for segwit v0, it ensures that all of our existing tests exercise this codepath and reduces the risk that we forget to provide some wallet inputs, which would result in an invalid signature which would be hard to investigate.

With this change, some of the unit tests started failing, which showed that we weren't correctly setting wallet inputs in the fee-bumping case in `ReplaceableTxFunder`, which we've fixed.

We also add a test in `TransactionsSpec.scala` to verify that signing fails when details about some inputs are missing.

---------

Co-authored-by: Bastien Teinturier <[email protected]>
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.

3 participants