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

4500 Commits

Author SHA1 Message Date
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
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
Ethan Heilman
9fb88a11b7 bip347: Complete OP_CAT (#2090)
* OP_CAT to BIP 0003 format, add usecase

* draft --> complete

* Update bip-0347.mediawiki

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

* BIP347: Update table entry to complete

* Fix breaking test

* Add test vectors

---------

Co-authored-by: Mark "Murch" Erhardt <murch@murch.one>
2026-03-02 10:34:26 -05:00
Sebastian Falbesoner
b4bc0a88b7 BIP-352: add test vector for exceeding K_max limit [receiver side]
Test case: even though there are 2324 outputs targeted to the recipient,
only 2323 are found due to the introduced K_max limit. Any
implementation following the new BIP protocol rule wouldn't create such
a transaction in the first place, but an attacker might do.

Can be tested by
`$ ./bip-0352/reference.py ./bip-0352/send_and_receive_test_vectors.json`
2026-03-02 13:31:46 +01:00
Sebastian Falbesoner
9830fad214 BIP-352: add test vector for exceeding K_max limit [sender side]
Test case: as the (only) recipient group contains 2324 addresses and
thus exceeds the K_max limit by one, sending fails.

Can be tested by
`$ ./bip-0352/reference.py ./bip-0352/send_and_receive_test_vectors.json`
2026-03-02 13:27:28 +01:00
Sebastian Falbesoner
f14132fc77 BIP-352: test vectors: allow to check found output count for receiving
Introduce an optional "n_outputs" field as alternative to the detailed
"outputs" objects (the field was already specified, but not used so
far). Also update the documentation of the fields.
2026-03-02 13:26:31 +01:00
Sebastian Falbesoner
3aa17caaa3 BIP-352: test vectors: allow specifying repeated recipients for sending
Introduce an optional "count" field for recipient objects.
Also update the documentation of the fields.
2026-03-02 13:26:31 +01:00
Sebastian Falbesoner
f665c2c142 BIP-352: introduce per-group recipient limit K_max (=2323)
In theory this is a backwards incompatible protocol change.
Practically, no existing Silent Payments wallets out there supports
sending to such a high quantity of recipients (not even in terms of
_total_ number of recipients), so the K_max limit should be safe to
introduce, without any negative effects in the wallet ecosystem.
2026-03-02 13:26:25 +01:00
Jon Atack
ced24101c7 Merge pull request #2065 from lisenokdonbassenok/fix/bip310-min-bit-count-param 2026-02-28 05:41:50 -08:00
rkrux
0f307780aa BIP-174: port public key terminology from BIP 373 (#2085)
The changes are ported from PR 1705 so that the same public key
terminology is reflected in BIP 174 as well. Please refer this
other PR for more details.
2026-02-27 17:16:00 -08:00
Jon Atack
95465e0b4f BIP20,21: add Superseded-By and Replaces headers (#1984) 2026-02-27 15:43:46 -08:00
Jon Atack
0780663be1 BIP129: Add Requires header (#2019) 2026-02-27 15:18:38 -08:00
MoNyAvA
e76f0439b3 BIP-383: remove extra stray </tt> (#2061) 2026-02-27 15:03:55 -08:00
Mohammad Eglil
53dac1ba29 bip-0044: add Requires header for BIP32 and BIP43 (#2072) 2026-02-27 14:52:53 -08:00
MoNyAvA
edb6856d25 BIP-117: add missing BIP8 reference (#2080) 2026-02-27 14:40:25 -08:00
Oren
9ff061f8b9 BIP128: Timelock-Recovery Storage Format (#2068)
* new bip: timelock recovery storage format

* Comparison with Script-Based Wallets

* Type is Specification

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

* Change Authors to a single Author

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

* Replace OP_VAULT mention with OP_CHECKCONTRACTVERIFY

* Only the Alert Transaction needs to be non-malleable

* Adding discussion link

* limiting the transactions weight

This is important in order to prevent users from creating
recovery-plans that are hard to propagate.

* Explain anchor-addresses

* fix typo

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

* add surname initial to author name

* Explain unintentional initiation of rrecovery-plan.

* limit alert_inputs length to 2439

* updating bip number to 128

* rename to bip-0128.mediawiki

* BIP 128: Timelock-Recovery storage format

* fix field order, change title to uppercase

* Making plugin_version optional

Relevant only in wallets where
the feature is implemented
via a plugin.

* Removing mainnet

Irrelevant. Obviously a monitoring
service for mainnet should
verify that the addresses
are on mainnet.
2026-02-27 12:24:33 -08:00
Mark "Murch" Erhardt
bd56416786 Merge pull request #2107 from murchandamus/2026-02-bip352-add-thestack
BIP352: Add Sebastian Falbesoner as Author
2026-02-25 10:22:21 -08:00
Murch
9e407af625 BIP352: Add Sebastian Falbesoner as Author 2026-02-24 12:55:34 -08:00
YoCheng
97781eae4d BIP85: fix typo in byte value (#2100) 2026-02-13 11:18:59 -08:00
Hunter Beast
eae7d9fc57 BIP360: Pay to Merkle Root (P2MR) (#1670)
Review comments and assistance by:
  Armin Sabouri <armins88@gmail.com>
  D++ <82842780+dplusplus1024@users.noreply.github.com>
  Jameson Lopp <jameson.lopp@gmail.com>
  jbride <jbride2001@yahoo.com>
  Joey Yandle <xoloki@gmail.com>
  Jon Atack <jon@atack.com>
  Jonas Nick <jonasd.nick@gmail.com>
  Kyle Crews <kylecrews@Kyles-Mac-Studio.local>
  Mark "Murch" Erhardt <murch@murch.one>
  notmike-5 <notmike-5@users.noreply.github.com>
  Vojtěch Strnad <43024885+vostrnad@users.noreply.github.com>

Co-authored-by: Ethan Heilman <ethan.r.heilman@gmail.com>
Co-authored-by: Isabel Foxen Duke <110147802+Isabelfoxenduke@users.noreply.github.com>
2026-02-11 13:01:47 -08:00
Dathon Ohm
ed7af6ae7e BIP 110: Reduced Data Temporary Softfork (#2017)
* Reduced Data Temporary Softfork

* BIP-RDTS: update and expand according to PR feedback

* BIP-RDTS: minor updates to wording to address feedback

* Address PR comments: update Reference Implementation and Deployment

* Address PR comments: Clarify deployment name and bit

* Address PR comments: Update BIP number, creation date, and README entry

* Address @murchandamus X comment: Add activation threshold

* Address PR comments: Update to BIP-3; clarify rationale and deployment

* Address PR comments: Clarify scriptPubKey limit rationale and LOCKED_IN behavior
2026-02-06 16:28:07 -08:00
Paul Miller
10c7888885 Escape pipe character in markdown table (#2095) 2026-02-04 14:39:50 -08:00
Jurvis Tan
57869d524a BIP 89: Chain Code Delegation for Private Collaborative Custody (#2004)
* Add Chaincode Delegation BIP

* Update license to BSD-3-Clause and expand blinded signing documentation

* Address initial PR comments

* Update with BIP number assignment

* Fix delegator_sign test vector

* Upgrade secp256k1lab and add license file

- Upgrade vendored secp256k1lab to commit a265da1 (adds type annotations)
- Add COPYING file to satisfy MIT license requirements
- Document secp256k1lab commit reference in BIP text

* Fix type checker and linter issues in reference implementation

- Fix TweakContext to use Scalar types for gacc/tacc
- Replace HashFunction enum with Callable type alias
- Fix bytearray to bytes conversion in blind_sign
- Move imports to top of file
- Fix boolean comparison style (use 'not' instead of '== False')
- Add proper type annotations and casts for dict handling
- Remove unused imports and type ignore comments

* Address PR review comments on terminology and clarity

- Add intro explaining delegation naming (chain code is delegated, not
  signing authority)
- Reorder terminology to list Delegator before Delegatee
- Replace "quorum" with clearer "can co-sign for UTXOs" language
- Clarify derivation constraints in terms of delegatee's extended key
- Rename "Delegatee Signing" section to "Signing Modes"
- Fix "delegatee can apply" to "delegator can produce" (line 112)
- Replace undefined "caller" with "delegatee" (line 173)
- Clarify "Change outputs" to "Tweaks for change outputs" (line 98)
- Add note that message is separate from CCD bundle
- Add note on application-specific verification (addresses, amounts)
- Add transition sentence clarifying non-concurrent protocol scope

* Add changelog entry for 0.1.3

* Fix header: use Authors (plural) for multiple authors

* Fix BIP header format for CI compliance

- Change Type from 'Standards Track' to 'Specification' (valid type)
- Change 'Created' to 'Assigned' (correct field name per BIP format)
- Change 'Post-History' to 'Discussion' (recognized field in buildtable.pl)

* Apply suggestion from @murchandamus

---------

Co-authored-by: Jesse Posner <jesse.posner@gmail.com>
2026-02-04 12:58:08 -08:00
Mark "Murch" Erhardt
5d0f70a5cf Merge pull request #2094 from ajtowns/202601-bip434-copyright
BIP 434: fix license inconsistency
2026-02-02 21:01:54 -08:00
Anthony Towns
3709d73c2f BIP 434: fix license inconsistency 2026-02-03 14:47:51 +10:00
Mark "Murch" Erhardt
29b48129b1 Merge pull request #2092 from ajtowns/202601-feature-shortid
BIP 324, 434: Specify p2p v2 one-byte identifier for FEATURE message
2026-02-02 16:22:41 -08:00
Anthony Towns
a50c0ea32b BIP324, BIP434: Assign message type id for "feature" message 2026-01-31 17:47:59 +10:00
Anthony Towns
df1f098a8b BIP324, BIP183: Add utreexo's p2pv2 message type ids 2026-01-31 17:46:29 +10:00
Anthony Towns
a3370b5c9d BIP 324: Add auxiliary file tracking assignments of one-byte message type IDs 2026-01-31 17:46:29 +10:00
Mark "Murch" Erhardt
43e3983e4b Merge pull request #2086 from ajtowns/202512-bip324-shortid-alias
BIP 324: Clarify equivalence between 1 and 13 byte message types
2026-01-29 10:18:01 -08:00
Mark "Murch" Erhardt
e169a61940 Merge pull request #2084 from theStack/bip374-vendor-secp256k1lab
BIP-374: vendor secp256k1lab and use it for reference implementation
2026-01-28 10:31:32 -08:00
Mark "Murch" Erhardt
3177af3bbf Merge pull request #2076 from ajtowns/202512-p2p-feature
BIP 434: Peer Feature Negotiation
2026-01-27 07:22:58 -08:00