Skip to content

Harden validation of malformed and inconsistent inputs - #1358

Merged
NicolasDorier merged 10 commits into
masterfrom
warden/small-fixes
Oct 8, 2026
Merged

NicolasDorier merged 10 commits into
masterfrom
warden/small-fixes

Conversation

@NicolasDorier

@NicolasDorier NicolasDorier commented Oct 8, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

This hardens several public parsing, signing, and transaction-building paths so malformed or internally inconsistent inputs fail predictably instead of being accepted, misinterpreted, or producing unrelated exceptions.

  • Reject invalid Base58 and Bech32 data safely, including non-ASCII Base58 characters and long Bech32 strings with invalid checksums.
  • Keep PSBT input metadata consistent, preserve independent CoinJoin copies, and validate input and output indexes.
  • Validate key relationships, taproot script signatures, and Miniscript key requirements before use.
  • Reject splitting negative amounts, conflicting coin metadata, and invalid transaction-builder fee or output-subtraction requests.

Compatibility

Callers that previously supplied mismatched extended keys, inconsistent PSBT UTXO records, negative amounts to Split(), conflicting metadata for one outpoint, or invalid builder indexes will now receive validation errors. Identical coins may still be shared across builder groups, and other valid inputs retain their existing behavior.

@NicolasDorier
NicolasDorier merged commit 7ec34bb into master Oct 8, 2026
10 checks passed
@NicolasDorier
NicolasDorier deleted the warden/small-fixes branch October 8, 2026 03:05
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