1
0
mirror of https://github.com/bitcoin/bips.git synced 2026-04-20 16:28:39 +00:00
Commit Graph

4548 Commits

Author SHA1 Message Date
conduition
ab2ebe2c5d Corrections to BIP-0361 on rescue protocols 2026-04-17 15:22:59 +00:00
Murch
eec42583f0 Merge pull request #2046 from macgyver13/bip375-reference-testvectors-pr
BIP375: Add test vectors + validator
2026-04-16 17:47:48 -07:00
macgyver13
8c0a9bfa57 BIP-375: add changelog section
Add Changelog section
Begin with version 0.1.0 as this BIP is Draft phase
2026-04-16 14:03:48 -04:00
Murch
78fcc3130b Merge pull request #2122 from darosior/2603_bip54_improvements
BIP 54 test vectors improvements following review in Inquisition
2026-04-15 10:44:47 -07:00
Murch
588431816a Merge pull request #2135 from murchandamus/2026-04-08-deduplicate-psbt-tables
BIP174: Deduplicate type definitions by introducing registry file
2026-04-14 17:19:22 -07:00
Jameson Lopp
86dfa19bef BIP361: Post Quantum Migration and Legacy Signature Sunset (#1895)
* BIP-361

* bip361: Fix background color

* address feedback
2026-04-14 07:37:58 -07:00
Ava Chow
d6ff1bec1d 174: Add changelog and version number 2026-04-13 08:12:35 -07:00
Murch
0a23dbf56a BIP174: Deduplicate per-output type definitions 2026-04-13 08:12:30 -07:00
Murch
d71cd39f69 BIP174: Deduplicate input type definitions 2026-04-13 08:12:00 -07:00
Murch
762e8c785b BIP174: Deduplicate global type definitions 2026-04-13 08:11:19 -07:00
Murch
eb497966e4 Merge pull request #2136 from guggero/bip-0322-clarifications
BIP-322: add clarifications and more test vectors
2026-04-10 16:47:56 -07:00
nymius
ef7703ed8a BIP376: Spending Silent Payment outputs with PSBTs (#2089) 2026-04-10 15:06:48 -07:00
Oli
3ab70c98a7 BIP-0322: turn test vectors into JSON, add more
This commit turns the existing test vectors into a JSON and then adds
more test cases covering the most common script types.
2026-04-10 09:06:36 +02:00
Oli
805bb0b6fc BIP-0322: clarify scriptSig on to_sign for legacy transactions
Before this commit it was not clear that non-native SegWit outputs
(e.g. P2PKH or P2SH-P2WPKH) only work if the correct scriptSig is
provided.
This then also makes it more clear why P2SH-P2WPKH outputs are NOT
supported by the "simple" variant.
2026-04-10 09:06:36 +02:00
Oli
4d36f73e7b BIP-0322: add format clarification table
This commit adds a table that clarifies what script types are compatible
with what signing variant and also makes more clear what the exact
format for the signatures of the different variants are.
2026-04-10 09:06:36 +02:00
macgyver13
b217897a62 BIP-375: fix label byte order used by labelhash
Test vectors with labels now use big-endian byte order instead of little-endian, matching BIP-352 specification

Summary of test vector changes:
- psbt structure: missing PSBT_OUT_SP_V0_INFO field when PSBT_OUT_SP_V0_LABEL set
- can finalize: one P2WPKH input / two mixed outputs - labeled sp output and BIP 32 change
- can finalize: two sp outputs - output 0 uses label=3 / output 1 uses label=1
2026-04-09 18:07:10 -04:00
Oghenovo Usiwoma
c77a6c5996 BIP-352: warn against stopping scan due to wallet policy filtering (#2134)
Adds a warning to the "if no matches are found, stop" scanning
step. Without it, wallet developers may be tempted to apply policy
filtering (e.g. dust) before deciding to continue,
causing subsequent outputs for the same sender to be missed.
2026-04-07 13:51:12 -07:00
Murch
2dfdfba3e3 BIP440: Varops Budget for Script Runtime Constraint, BIP441: Restoration of disabled Script (tapleaf 0xc2) (#2118)
* Varops: Two BIPs for Script Restoration: varops calculations and tapleaf version (0xc2).

Special thanks to Murch for teaching me mediawiki, and so much great
formatting and clarity advice.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

* script restoration: fix MUL cost to account to round up B to word boundary.
Julian points out that the implementation does this, which improves accuracy
for the case of small B (since the term is multiplied: for normal OP_ADD etc
we don't bother, since the difference is very bounded).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

* BIP 440, 441: official numbers, into README.mediawiki and renamed.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

---------

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2026-04-07 08:33:54 -07:00
craigraw
6c2023e542 Merge pull request #2099 from craigraw/descriptorannotations
BIP393: Output Script Descriptor Annotations
2026-04-07 08:31:42 -07:00
Murch
e3874ca825 Merge pull request #2111 from darosior/2603_bip370_output_amount
BIP 370: drop redundant requirement from PSBT_OUT_SCRIPT field description
2026-04-07 08:26:19 -07:00
Murch
02bdb13f13 Merge pull request #2132 from andrewtoth/bip370_missing_test_vectors
BIP370: missing test vectors
2026-04-07 08:24:52 -07:00
macgyver13
897455dab7 BIP-375: skip ineligible inputs when combining ecdh shares
add fake ecdh share and dleq proof to P2SH input for valid test: two inputs using per-input ECDH shares - only eligible inputs contribute shares (P2SH excluded)

remove unused return string from is_input_eligible
2026-04-05 20:52:23 -04:00
macgyver13
6295a70405 BIP-375: clarify eligible inputs restriction in Computing the Output Scripts text 2026-04-05 19:55:53 -04:00
macgyver13
9536c863cf BIP-375: clarify eligible input restriction in Signer text 2026-04-05 19:55:53 -04:00
macgyver13
7b4f1d6b4e BIP-375: address review feedback
correctly label witness_utxo vs non_witness_utxo key in supplementary inputs

Summary of test vector changes:
removed test: 
- psbt structure: empty PSBT_OUT_SCRIPT field when sending to non-sp output
modified test:
- ecdh coverage: only one ineligible P2SH multisig input when PSBT_OUT_SCRIPT set for sp output
- can finalize: one P2PKH input single-signer
- can finalize: two inputs using per-input ECDH shares - only eligible inputs contribute shares (P2SH excluded)
added test: 
- can finalize: two inputs using global ECDH share - only eligible inputs contribute shares (P2SH excluded)
2026-04-05 19:55:53 -04:00
Andrew Toth
1e15fc6fae BIP-370: add invalid test vector for missing PSBT_GLOBAL_TX_VERSION in PSBTv2 2026-04-05 19:24:59 -04:00
Andrew Toth
a07ffa8ccb BIP-370: add invalid test vector for PSBT_GLOBAL_UNSIGNED_TX in PSBTv2 2026-04-05 19:24:59 -04:00
Andrew Toth
87522e80e3 BIP-370: add invalid test vector for PSBT_IN_REQUIRED_HEIGHT_LOCKTIME of 0 2026-04-05 19:24:59 -04:00
macgyver13
cf7a16a5f9 BIP-375: update documentation
Update Test Vectors section
Add README.md to explain validation tooling and dependencies
2026-04-04 09:17:46 -04:00
macgyver13
fb105b7e51 BIP-375: add output scripts validation
Add support for computing bip352 output scripts
Extract ECDH shares and public key from PSBT and aggregate both if necessary
Refactor validate_ecdh_coverage to use collect_input_ecdh_and_pubkey
2026-04-04 09:17:46 -04:00
macgyver13
ab30224051 BIP-375: add input eligibility validation
Verify segwit version >1 not used if silent payment outputs present (bip352)
Verify SIGHASH_ALL requirement
2026-04-04 09:17:46 -04:00
macgyver13
6a91f88030 BIP-375: add ecdh coverage validation
Add deps/dleq.py (Adapted from bip-0374/reference.py)
Extract pubkey from PSBT inputs 
- PSBT_IN_BIP32_DERIVATION
- PSBT_IN_WITNESS_UTXO for P2TR
Add script type helpers
- bip352 input eligibility helpers
2026-04-04 09:17:46 -04:00
macgyver13
66053ae879 BIP-375: add test_runner and validate PSBT structure
Implement psbt structure checks
Add test_runner.py for processing test vectors
2026-04-04 09:17:46 -04:00
macgyver13
fc9918d8c0 BIP-375: add BIP375PSBT extension classes
BIP375PSBT (a PSBT subclass that deserializes into BIP375PSBTMap instances)
BIP375PSBTMap (a PSBTMap subclass with BIP-375 field access helpers)
2026-04-04 09:17:46 -04:00
macgyver13
8b46bd63b5 BIP-375: add test vector file 2026-04-04 09:17:46 -04:00
Rusty Russell
78e7562de3 BIP 440, 441: official numbers, into README.mediawiki and renamed.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2026-03-29 14:33:12 +10:30
Rusty Russell
32035058b4 script restoration: fix MUL cost to account to round up B to word boundary.
Julian points out that the implementation does this, which improves accuracy
for the case of small B (since the term is multiplied: for normal OP_ADD etc
we don't bother, since the difference is very bounded).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2026-03-29 14:33:12 +10:30
Rusty Russell
977342a943 Varops: Two BIPs for Script Restoration: varops calculations and tapleaf version (0xc2).
Special thanks to Murch for teaching me mediawiki, and so much great
formatting and clarity advice.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2026-03-29 14:32:59 +10:30
moonsettler
805c9b54f6 BIP442: Update reference links (#2129) 2026-03-24 13:37:30 -07:00
macgyver13
e70510193f Merge commit '96000a36c22f6528e834c54f0d115db675198e57' as 'bip-0375/deps/secp256k1lab' 2026-03-23 17:42:04 -04:00
macgyver13
eedb7f9a31 Squashed 'bip-0375/deps/secp256k1lab/' content from commit 44dc4bd
git-subtree-dir: bip-0375/deps/secp256k1lab
git-subtree-split: 44dc4bd893b8f03e621585e3bf255253e0e0fbfb
2026-03-23 17:42:04 -04:00
macgyver13
a8aa5ed548 BIP-375: Add bitcoin test framework as dependency - deps/bitcoin_test 2026-03-23 17:42:04 -04:00
Mark "Murch" Erhardt
4e1d44ed72 Merge pull request #2127 from theStack/bip174-global_version-mandatory-in-v2
BIP-174: mark PSBT_GLOBAL_VERSION as required for v2
2026-03-23 11:37:52 -07:00
Sebastian Falbesoner
fa731d21c4 BIP-174: mark PSBT_GLOBAL_VERSION as required for v2 2026-03-20 16:45:50 +01:00
Gregory Sanders
2778442c21 Add BIP446: OP_TEMPLATEHASH, BIP448: Taproot-native (Re)bindable Transactions (#1974)
Co-authored-by: Antoine Poinsot <darosior@protonmail.com>
2026-03-17 13:01:23 -07:00
Oren
351ceef274 BIP-128: exact specification for the checksum calculation (#2121) 2026-03-16 11:25:46 -07:00
Antoine Poinsot
fa608987ea bip54: add another transaction size test case
Ariard mentioned he would like to see a test case for a 64-byte transaction spending a Taproot
output with an annex. I took the opportunity to also make the output be an OP_RETURN with a 2-byte
push, as another semi-realistic transaction.
2026-03-16 10:21:04 -04:00
Antoine Poinsot
977300dad6 bip54: restructure timestamp test vectors into a tree
The test vectors were initially designed to maximally simple, which led to much redundancy. That was
probably too close to one extreme on the spectrum between simplicity and efficiency.

Here we shave off 20k lines by simply representing the header chains as a tree instead of list of
lists by duplicating all common headers.
2026-03-16 10:21:04 -04:00
Antoine Poinsot
4f94c5f01f bip54: make test vectors POSIX-compliant (newline at EOF)
This was pointed out during the Bitcoin Inquisition PR review
2026-03-13 16:50:48 -04:00
Antoine Poinsot
78126a5f0c bip54: move comment as first element in txsize test vectors
This is part of feedback received during the Bitcoin Inquisition PR review.
2026-03-13 16:50:33 -04:00