Commit Graph
57 Commits
Author SHA1 Message Date
Murch 24e96e870f process: Created ↦ Assigned
```
sed -z -i 's/Created: /Assigned: /' bip-0*.md
sed -z -i 's/Created: /Assigned: /' bip-0*.mediawiki
```
2026-01-12 14:29:51 -08:00
Murch 5207ef92a5 process: Author ↦ Authors
```
sed -z -i 's/Author: /Authors: /' bip-0*.md
sed -z -i 's/Author: /Authors: /' bip-0*.mediawiki
```

Also align correctly in case of multiple authors.
2026-01-12 14:29:00 -08:00
Murch 01352f7f40 process: Post-History ↦ Discussion
Also line up with additional items in the lines below.

```
sed -i -z 's/  Post-History: /  Discussion:   /' bip-0*.md
sed -i -z 's/  Post-History: /  Discussion:   /' bip-0*.mediawiki
```
2026-01-12 14:28:06 -08:00
Murch a233bde4af process: Standards Track ↦ Specification
```
sed -z -i 's/Type: Standards Track/Type: Specification/' bip-0*.md
sed -z -i 's/Type: Standards Track/Type: Specification/' bip-0*.mediawiki
```

After the scripted changes, the changes to BIP-40, BIP-41, and BIP-63
were undone, because it breaks CI.

These three BIPs only exist conceptually and their proposal documents
are missing which causes changes to them ot break the CI. I defer the
changes to these BIPs to a separate pull request to get CI to pass.
2026-01-12 14:22:40 -08:00
Murch 5d3ceb3773 process: Final/Active ↦ Deployed
```
sed -z -i 's/Status: Active/Status: Deployed/' bip-0*.md
sed -z -i 's/Status: Active/Status: Deployed/' bip-0*.mediawiki
sed -z -i 's/Status: Final/Status: Deployed/' bip-0*.md
sed -z -i 's/Status: Final/Status: Deployed/' bip-0*.mediawiki
sed -i 's/| Active/| Deployed/' README.mediawiki
sed -i 's/| Final/| Deployed/' README.mediawiki
```
2026-01-12 14:22:33 -08:00
Yuval Kogman cd19d89e58 scripted-diff: fix BIP 2 field order violations
-BEGIN VERIFY SCRIPT-
set -e
perl <<'-END PERL-'
use strict;
use warnings;

my $topbip = 9999;

my @FieldOrder = qw(
	BIP
	Layer
	Title
	Author
	Authors
	Editor
	Deputies
	Discussions-To
	Comments-Summary
	Comments-URI
	Status
	Type
	Created
	License
	License-Code
	Discussion
	Post-History
	Version
	Requires
	Replaces
	Proposed-Replacement
	Superseded-By
);

my $bipnum = 0;
while (++$bipnum <= $topbip) {
	my $fn = sprintf "bip-%04d.mediawiki", $bipnum;
	my $is_markdown = 0;
	if (!-e $fn) {
		$fn = sprintf "bip-%04d.md", $bipnum;
		$is_markdown = 1;
	}
	-e $fn || next;
	open my $F, "<", $fn or die "$!";

	my (@before, %preamble, @after);

	if ($is_markdown) {
		while (<$F>) {
			push @before, $_;
			last if m[^(?:\xef\xbb\xbf)?```$]
		}
		die "No ``` in $fn" if eof $F;
	} else {
		while (<$F>) {
			push @before, $_;
			last if m[^(?:\xef\xbb\xbf)?<pre>$];
		}
		die "No <pre> in $fn" if eof $F;
	}
	my %found;
	my ($title, $author, $status, $type, $layer);
	my ($field, $val, @field_order);
	while (<$F>) {
		push @after, $_ and last if ($is_markdown && m[^```$]);
		push @after, $_ and last if (!$is_markdown && m[^</pre>$]);

		if (m[^  ([\w-]+)\: (.*\S)$]) {
			$field = $1;
			$val = $2;
		} elsif (m[^  ( +)(.*\S)$]) {
			$val = $2;
		} else {
			die "Bad line in $fn preamble";
		}

		push @{$preamble{$field} ||= []}, $_;
	}
	push @after, <$F>;
	close $F or die $!;

	open my $W, ">", "$fn" or die "$!";

	print $W @before;
	print $W map { @$_ } grep { defined } delete @preamble{@FieldOrder};
	die "Unknown fields: @{[ keys %preamble ]}" if %preamble;
	print $W @after;

	close $W or die $!;
}
-END PERL-
-END VERIFY SCRIPT-
2025-07-20 14:29:13 -06:00
Jon Atack a093c34607 bip341: replace broken twitter link 2025-05-20 08:08:27 -06:00
5767f44499 BIP-341: Explain the 64-byte signature format
Co-authored-by: Pieter Wuille <pieter@wuille.net>
Co-authored-by: Anthony Towns <aj@erisian.com.au>
2025-01-06 16:08:33 -07:00
Orfeas Stefanos Thyfronitis Litos f085cc2922 Make link title more specific (#1652) 2024-07-25 11:50:08 -07:00
Luke Dashjr 04a9656810 Merge pull request #1406 from real-or-random/patch-18
BIP341: Fix definition of NUMS point
2023-06-29 13:48:49 -04:00
raphjaph c0148c872d Improve BIP-341 wording
Reading the spec closely the different language used for serialization of input outpoints and input amounts was
confusing on first read. This change uses the same language
for both, which makes it easier to read.
2023-03-10 22:19:31 +01:00
Christian Lewe 43fa7cf13d Mark Taproot BIPs as Final 2023-02-19 16:16:13 +01:00
Tim Ruffing 6e7e5a2523 BIP341: Use the term "NUMS" 2023-01-12 13:50:46 +01:00
Tim Ruffing 996dd77b10 BIP341: Fix definition of NUMS point 2023-01-12 13:41:06 +01:00
Jonas Nick 3d243d8a49 BIP 341: allow taproot_sign_key with no script tree
In contrast to taproot_output_script, taproot_sign_key was not able to deal with
a script_tree that is None. This commit fixes taproot_sign_key such that it can
sign for such outputs.

This commit avoids changing the behavior of the functions except
taproot_sign_key at the cost of having some code duplication. Alternatively, one
could let taproot_tree_helper deal with a None script_tree directly.
2023-01-04 14:31:44 +00:00
kallewoof 79bb53dde5 Merge pull request #1379 from DariusParvin/bip341-aux_rand
BIP341: add aux_rand argument to taproot_sign_key
2023-01-04 10:55:06 +09:00
Darius Parvin e24f685971 BIP341: add bip340_aux_rand argument to taproot_sign_key 2022-11-03 21:25:39 -07:00
Jonas Nick be340277fc BIP 341: Fix taproot_tweak_pubkey
`lift_x` returns `None` if the input integer is not an X coordinate on the curve
to indicate failure. `point_add`, on the other hand, interprets `None` as the
point at infinity. Therefore, without this commit, if the internal `pubkey` is
not a valid X coordinate, the function will not fail, which contradicts the
specification in the "Script validation rules section". Instead, it sets `Q` to
`t*G`.
2022-10-24 20:33:05 +00:00
Darius Parvin 3cdfe1bd16 BIP 341: add missing conversions between bytes and int
Convert seckey0 to bytes at the start of the function.
Return the output as bytes for consistency with the rest of the code.
2022-09-28 15:45:02 -07:00
Jonas Nick 2119931f01 BIP 341: add missing conversion from bytes to int 2022-08-16 15:09:14 +00:00
Luke Dashjr 0d8ea5b45b Merge pull request #1232 from Olf0/patch-1
[Nit] Add full stop to conclude sentence
2022-01-15 23:10:47 +00:00
kallewoof 13bd88f50c Merge pull request #1230 from dr-orlovsky/patch-9
BIP-341: explicitly allow softforks with future leaf versions
2022-01-07 11:14:58 +09:00
MarcoFalke 9fe72607ce Mention activation heights in BIP 341 2021-11-13 17:04:02 +01:00
Pieter Wuille e35a46ecf3 BIP341 test vectors 2021-11-12 12:08:19 -05:00
olf fc661ac943 [Nit] Add full stop to conclude sentence
... because in a normative document, it shall be obvious that this sentence was not accidentally truncated.
(Concerns final sentence of footnote / cite-reference 20, https://github.com/bitcoin/bips/edit/master/bip-0341.mediawiki#cite_ref-20-0)
2021-11-12 00:56:35 +01:00
kallewoof b15514325e Merge pull request #1224 from brandonblack/master
BIP341/342: Implementation clarifications
2021-11-11 23:31:17 +09:00
Ian Shipman da78942ddd Fixes a link in BIP 341 2021-11-10 14:26:56 -06:00
Dr. Maxim Orlovsky 592cb6fa0c BIP-341: allow future softforks for leaf version signature verification
Currently the BIP-341 and BIP-342 leave the question of how to verify signature for non-`0xC0` leaf version scripts undefined. I haven't checked the Bitcoin Core code for that matter yet, but (1) I think we need to cover signature validation of non-`0xC0` leaf version scripts in this standard and (2) the only way of doing that is "always succeed" rule for the future leaf version values (otherwise we will need a hard fork to introduce them).
2021-11-08 22:07:28 +01:00
Brandon Black 6222dc45a3 BIP341: Clarify tweaking of secret keys 2021-11-03 15:05:51 -07:00
Brandon Black d690408080 BIP341/342: Clarify SigHash extensions
* Pull the definition of the extension in BIP342 to its own section
* Add a section to BIP341 on validating script path signatures
* Clarify that SigMsg does not produce the message being signed, but
a common portion of it
2021-11-03 15:05:49 -07:00
Brandon Black 736e79c938 BIP341: SigHash: Clarify encoding of script pub keys 2021-11-01 07:29:05 -07:00
Brandon Black 5b9b44cc79 BIP341: SigHash: Clarify SIGHASH_DEFAULT 2021-11-01 07:20:40 -07:00
Riccardo Casatta 9cf5c72b56 remove int_from_bytes in lift_x call since it is done internally 2021-07-14 16:42:39 +02:00
Raulo 5919ade31c Replaces Bech32 by Bech32m in BIP341
Segwit version 1 is encoded by Bech32m given by BIP350
2021-06-14 09:27:50 +00:00
eugene b1dbe62a21 BIP 341: fix tuple index 2021-04-26 17:43:41 -04:00
Luke Dashjr 40b10c83db Merge pull request #1104 from ajtowns/202103-bip341-speedy-trial-mtp
BIP341: speedy trial activation parameters
2021-04-25 21:54:10 +00:00
Anthony Towns 93d1b15285 BIP341: add brackets to avoid ambiguity due to precendence rules around bipwise ops 2021-04-14 02:45:56 +10:00
Jonas Nick 43b5f171dc BIP 341/342: Add link to Bitcoin Core test vectors
Also remove mention of non-existing examples.
2021-04-13 15:04:17 +00:00
Anthony Towns ce5f89fe0d BIP341: add testnet3 parameters 2021-04-13 01:35:07 +10:00
Anthony Towns d582d0bd31 BIP341: document simplified bip9 states 2021-04-08 21:25:10 +10:00
Anthony Towns 0f95720639 BIP341: bip9 speedy trial parameters 2021-04-08 21:24:13 +10:00
Anthony Towns a516c135ab BIP341/342: document current deployment status 2021-03-26 06:33:05 +10:00
MarcoFalke d8531483f5 bip 341/342: Replace CCompactSize with CompactSize 2020-09-03 14:37:50 -07:00
Luke Dashjr 336f948d37 Merge pull request #982 from sipa/bip-taproot
BIP340 updates: even R, new tags, small fixups, clarifications
2020-08-27 02:10:55 +00:00
Pieter Wuille 8a3db73a84 Rename lift_x_even_y to lift_x 2020-08-20 13:24:20 -07:00
Pieter Wuille b9ea863727 Use consistent capitalization of tag TapSighash 2020-07-28 13:50:50 -07:00
Jonas Nick 15fba98cf4 bip-341: add missing Post-History 2020-05-15 12:57:49 +00:00
Jonas Nick dde165749e bip-341: Commit to all scriptPubKeys in SigMsg 2020-05-15 12:33:01 +00:00
Jonas Nick 0916da6594 BIP-0341: Replace notion of is_negated with parity bit 2020-03-27 15:14:43 +00:00
Jonas Nick 4ea021f28c BIP-0341: Avoid decompressing the output public key in script spends 2020-03-06 14:20:08 +00:00