Repository navigation
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #976 +/- ##
========================================
Coverage 97.60% 97.60%
========================================
Files 84 84
Lines 11001 11001
========================================
Hits 10738 10738
Misses 263 263 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This comment was marked as resolved.
This comment was marked as resolved.
odudex
force-pushed
the
fix/trim-segwit-prev-tx-from-signed-psbt
branch
from
November 15, 2026 11:44
1be8f8e to
1f3a4ac
Compare
Member
|
ACK at 1f3a4ac, while hoping for more reviews/acks/approval. |
jdlcdl
approved these changes
Nov 15, 2026
Contributor
|
tACK 1f3a4ac tested with sparrow, 2 input p2wpkh spend, with and without the change. signed QR payload is ~30% smaller now, sparrow combines and broadcasts fine. LGTM |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is this PR for?
To mitigate the "unproven fee" attack, we asked coordinators such as Sparrow to include the full previous transaction (
non_witness_utxo) on segwit inputs, so Krux can prove the input amounts and the fee before signing.Krux was also sending those transactions back. When signing to QR code the PSBT is trimmed, but since 27ccb7b the trim kept
non_witness_utxowhenever present. The coordinator already has that data andwitness_utxois enough for a segwit input, so it only inflated the signed payload and the number of QR frames.Change
The trimmed PSBT no longer includes
non_witness_utxofor segwit inputs that carrywitness_utxo.Unchanged: validation before signing, legacy inputs (which still keep it) and Sign to SD card (not trimmed).
Changes made to:
Did you build the code and tested on device?
What is the purpose of this pull request?