Skip to content

Conversation

instagibbs
Copy link
Owner

No description provided.

The recovery scriptPubKey needs to be prefixed with its CompactSize-encoded length.
Since only Bull Bitcoin Mobile and Cake wallet are currently deployed in
production, both using PDK, and the `+` character is causing some
friction, this change seems justified to avoid similar issues with
future implementations.
nothingmuch and others added 23 commits July 10, 2025 22:06
The rationale for this change is that since `-` instead of `+` breaks
compatibility anyway, the marginal cost of removing this
unusual/surprising requirement for reverse lexicographical ordering is
zero.
BIP 77: Delimit fragment params with  `-` instead of `+`
BIP69: fix function name typo in example code
SPDX doesn't have an official identifier for "public domain", at least
not for the simple "This document is placed into the public domain"
declarations used in some BIPs, see
https://wiki.spdx.org/view/Legal_Team/Decisions/Dealing_with_Public_Domain_within_SPDX_Files
for the rationale provided by their legal team. The rationale is sound,
but It's possible to create "user-defined" identifiers of the form
LicenseRef-X. This is a good idea here to make sure that all SPDX
expression will be formally valid.

And in our case, all "PD" BIPs match the following pseudo regex, so
there's not much potential for confusion:

    "This (document|BIP|work|proposal) is (hereby)? (placed)? in the
    public domain."

So it makes sense to keep using a single identifier for all of these.
That's a bit of legal nitpicking, sorry. CC0 contains something like a
public domain dedication along with a fallback license, so it's neither
entirely. Some call it a "legal instrument". I prefer not calling it
anything.
I think that requirement is not helpful. I don't think hat including
additional licenses will be overwhelming to the reader. If anything, it
will obfuscates the actual licensing conditions. (Anyway, this should be
super rare.)
The actual reason why I suggest this is that I think that's a great
default choice for a new BIP, so it's a perfect example. CC0-1.0 is a
great liberal choice for the BIP document (and test vectors etc.), and
MIT is the common choice for code in our ecosystem. Putting both BIP and
code under the "OR" avoids any confusion about which part is licensed
under which terms and also avoids any hassle when reorganizing, e.g.,
when moving code out of the BIP Markdown file to a separate file etc.

But I don't want this PR to recommend a license, so let me sell this
change as an editorial change to an example, which is warranted because
the MIT is much more known than FSFAP, in particular in this ecosystem.
…nvention

Aligns the first field in the serialization table with the rest, which use plural “bytes” (e.g., “4 bytes: child number”) for consistency.
-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-
The specified field order is consistent with both BIPs 2 and 3. The
ordering of fields which are only present in one or the other is
ambiguous, e.g. as in `Proposed-Replacement` and `Superseded-By` but
only one of these applies to a given BIP.

The `Editor` field is spurious, only being used in BIP 69, and appears
after Author.
* nothingmuch-field-ordering-pr:
  CI: Enforce BIP 2 & 3 field ordering requirements
  scripted-diff: fix BIP 2 field order violations
BIP77: fix links to Client/Directory interactions
BIP352: be explicit for the input_hash corner case
jonatack and others added 27 commits August 20, 2025 21:53
BIP85: replace Base64 by Base85 in PWD BASE85 section
Co-authored-by: 1BitcoinBoWP1FZ4xwTNkq6XksKidmgYYw <[email protected]>
BIP155 was deployed in Bitcoin Core version v0.21.0, and has been in use for
almost 5 years.

New networks may be added to the reserved network IDs table when they're
needed, either in this BIP or in a new one.

If BIP3 is activated, I think BIP155 would become Deployed.

Co-authored-by: Murch <[email protected]>
Co-authored-by: laanwj <[email protected]>
…tatus

BIP155: update status from Draft to Final
BIP328: fix assignment in bytes_to_point function
BIP388: fix variable name in from_descriptor() to prevent NameError
…mediate-comp

BIP352: Add intermediate vector material for silent payments
…tatus-from-Proposed-to-Final

BIP111: update status from Proposed to Final
…-158_to_final

BIPs 157, 158: update status to Final, add Requires header
…in-tampered-proof

BIP374: in tests, pass message when verifying proof with message
@instagibbs
Copy link
Owner Author

opened bitcoin#1974

@instagibbs instagibbs closed this Sep 19, 2025
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.