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

4530 Commits

Author SHA1 Message Date
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
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
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
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
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
Antoine Poinsot
ff39733e70 bip54: update sigops test vectors following Inquisition review
This is a batch update to the tests vectors for the limit on legacy signature-checking operations
introduced in BIP 54, following feedack received on the Bitcoin Inquisition PR and from Chris
Stewart's implementation in Bitcoin-S.
2026-03-13 16:50:32 -04:00
Antoine Poinsot
1f21139957 bip54: expand on rationale for non-final coinbase nSequence
Making sure that the coinbase is timelocked is a neat simplification in reasoning about duplicates,
but it has caused some confusions. For instance here:
https://gnusha.org/pi/bitcoindev/e758af9b-72fc-4fdd-8e07-e1126635780an@googlegroups.com/

Fix this by explicitly stating the implications.
2026-03-13 14:21:41 -04:00
Antoine Poinsot
aef4d9e084 bip54: reword "potentially executed" language in sigops limit specification
The paragraph in its entirety is already unambiguous that all signature-checking operations
*present* in the Script (as opposed to *executed*) are counted. However i received feedback that the
"potentially executed" language in the first sentence of this paragraph may be confusing. This is
because it is in theory possible to have a more accurate upper bound by analyzing the possible
spending paths and use the maximum number of signature-checking operations in either to check
against the limit.

This commit rewords the first sentence to use the word "present" to be extra-clear before even
describing how the accounting is performed in later sentences.
2026-03-13 11:14:20 -04:00
Mark "Murch" Erhardt
b382728379 Merge pull request #2087 from theStack/bip352-vendor-secp256k1lab
BIP-352: vendor secp256k1lab and use it for reference implementation
2026-03-06 14:39:56 -05:00
Sebastian Falbesoner
249bdef156 BIP-352: mention secp256k1lab in BIP text
also fix a small grammar nit (s/are provided/is provided/)
2026-03-06 15:19:09 +01:00
Jon Atack
c0644a054f BIP32: edits by ddustin for clarity (picks up PR785) (#1903)
Co-authored-by: Dusty Daemon <dustinpaystaxes@gmail.com>
Co-authored-by: Pieter Wuille <pieter@wuille.net>
Co-authored-by: Murch <murch@murch.one>
2026-03-05 14:29:32 -05:00
Jon Atack
1656f62a44 Merge pull request #1943 from prestoalvarez/patch-1
BIP69: examples file fixes and update to python3
2026-03-05 10:52:14 -08:00
craigraw
41f9957630 BIP392: Silent Payment Output Script Descriptors (#2047)
* Add sp() output descriptor format for BIP352 Silent Payments

* Update headers and remove space after comma in descriptors

* Add label ranges with examples

* Update with assigned number and adjust preamble for BIP3

* BIP392: Add table entry to README

* Add two argument key expression form and remove birthday and label arguments

* Add BIP392 sp() descriptor to BIP380 script expressions table

* Add sp() descriptor to BIP390 allowed expressions and add musig() example to BIP392

* Add changelog and version header to BIP390
2026-03-05 11:02:52 -05:00
Luke Dashjr
b3ab91fa46 Merge remote-tracking branch 'origin-pull/2115/head' 2026-03-05 03:38:54 +00:00
Dathon Ohm
44b72212f2 BIP-110: Update deployment section with EXPIRED state; add GBT subsection to specification 2026-03-04 21:22:52 -06:00
Dathon Ohm
ddd5db9a63 BIP-110: Clarify rule 2 witness stack element exclusions 2026-03-04 21:01:23 -06:00
Antoine Poinsot
175790ee7f BIP 370: remove redundant field inclusion comment in OUT_SCRIPT description
There are already "Requiring inclusion" / "Requiring exclusion" columns that specify that.
2026-03-04 10:15:46 -05:00
moonsettler
f61d4b8ba3 BIP442: OP_PAIRCOMMIT (#1699)
* Add: PAIRCOMMIT

* New revision with Brandon Black

* Fix: Authors and spelling merklize

* Fix: header

* Rework based on feedback from PR 1699

commit ae69991b77830021c34e31d1a65ac6987e2ca1ba
Author: moonsettler <moonsettler@protonmail.com>
Date:   Tue Sep 23 02:23:43 2025 +0200

    Update references

commit 6adcb4e559cd2b67553fa57d193474906c138721
Author: moonsettler <moonsettler@protonmail.com>
Date:   Tue Sep 23 02:15:14 2025 +0200

    General computation simplify wording

commit 2f911cb4ab4b938697e39cb34974fa6fc12bf3b2
Author: moonsettler <moonsettler@protonmail.com>
Date:   Tue Sep 23 01:36:41 2025 +0200

    Rework based on feedback from PR 1699

* More readeable scripts & fix footnotes

* Format and readability improvements

* Update general computation section

* THIKCS cost compare

* Reference BIP-446

* Standard -> Specification

Co-authored-by: Mark "Murch" Erhardt <murch@murch.one>

* Update header to BIP-3 compatible

Co-authored-by: Mark "Murch" Erhardt <murch@murch.one>

* Add: Post-History

* Update Cost comparison table

* Post-History -> Discussion

Co-authored-by: Mark "Murch" Erhardt <murch@murch.one>
2026-03-03 14:38:26 -05:00
Sebastian Falbesoner
f2ffa99a4a BIP-352: take use of vendored secp256k1lab for reference implementation
This allows to remove secp256k1.py and replace the secp256k1-specific
parts in the reference implementation. Replacement guide:

    * ECKey -> Scalar
    * ECKey.set(seckey_bytes) -> Scalar.from_bytes_checked(seckey_bytes)
    * seckey.get_pubkey() -> seckey * G
    * seckey.get_bytes() -> seckey.to_bytes()
    * seckey.add(tweak_bytes) -> seckey + Scalar.from_bytes_checked(tweak_bytes)
    * seckey.negate() -> seckey = -seckey
    * seckey.sign_schnorr -> schnorr_sign(..., seckey.to_bytes(), ...)

    * ECPubKey -> GE
    * ECPubKey.set(pubkey_bytes) -> GE.from_bytes_{xonly,compressed}(pubkey_bytes)
    * pubkey.get_y() % 2 == 0 -> pubkey.has_even_y()
    * pubkey.get_bytes(False) -> pubkey.to_bytes_compressed()
    * pubkey.get_bytes() -> pubkey.to_bytes_xonly()
    * not pubkey.valid -> pubkey.infinity
    * pubkey.verify_schnorr -> schnorr_verify(..., pubkey.to_bytes_xonly(), ...)

    * TaggedHash -> tagged_hash
    * hashlib.sha256(preimage).digest() -> hash_sha256(preimage)
2026-03-02 19:17:21 +01:00
Sebastian Falbesoner
511bb99dc4 Merge commit '53b590e190f798131a10a16194261243abdf6b4d' as 'bip-0352/secp256k1lab' 2026-03-02 19:16:00 +01:00
Sebastian Falbesoner
53b590e190 Squashed 'bip-0352/secp256k1lab/' content from commit 44dc4bd
git-subtree-dir: bip-0352/secp256k1lab
git-subtree-split: 44dc4bd893b8f03e621585e3bf255253e0e0fbfb
2026-03-02 19:16:00 +01:00
Casey Rodarmor
6eb7cb38fb Merge pull request #2110 from casey/fix-readme-link
Fix mailing list link in readme
2026-03-02 11:56:42 -05:00
Mark "Murch" Erhardt
6eb01f01bc Merge pull request #2106 from theStack/bip352_limit_max-k-PR
BIP-352: introduce per-group recipient limit K_max (=2323)
2026-03-02 11:54:09 -05:00