Skip to content

Avoid displaying unverified PSBT fees - #662

Open
Jacksper13 wants to merge 3 commits into
dev-v2.4.0from
fix/unverified-psbt-fees
Open

Avoid displaying unverified PSBT fees#662
Jacksper13 wants to merge 3 commits into
dev-v2.4.0from
fix/unverified-psbt-fees

Conversation

@Jacksper13

@Jacksper13 Jacksper13 commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • cross-check witness_utxo against the hash-verified previous transaction when both PSBT fields are present
  • mark fees as unverified when collaborative inputs provide only unbound witness amounts
  • suppress misleading percentage warnings and display an explicit unverified-fee warning
  • preserve existing SegWit classification, history-cache, and serialization behavior
  • add parser, fee-policy, history-cache, and review-rendering regression coverage

Impact

Ordinary single-wallet SegWit transactions continue to display their network fee. Witness-only amounts for inputs Passport will sign retain the existing numeric display because the signature commits to that input amount and the history cache detects changed amounts across signing attempts.

Collaborative transactions whose external input amounts cannot be independently checked now identify the fee as unverified instead of displaying an attacker-controlled value.

Testing

  • focused PSBT fee unit script under CPython with MicroPython compatibility stubs
  • python -m py_compile on changed Python files
  • python -m pycodestyle on changed Python files
  • python -m reuse lint-file ports/stm32/boards/Passport/modules/tests/unit/psbt_fee.py
  • git diff --check

The native Unix simulator build was not available locally; GitHub CI provides the firmware and simulator build validation.

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