Skip to content

bip138: clarify receive-only descriptor set, 0 birth time, and BIP32 range - #2298

Merged
jonatack merged 5 commits into
bitcoin:masterfrom
Sjors:2026/09/bip138-metadata
Sep 24, 2026
Merged

jonatack merged 5 commits into
bitcoin:masterfrom
Sjors:2026/09/bip138-metadata

Conversation

@Sjors

@Sjors Sjors commented Sep 23, 2026 •

Copy link
Copy Markdown
Member

This PR makes a couple of clarifications around the descriptor (and bip388 policy) sets.

It adds one test vector, but shouldn't be a breaking change.

Three middle commits:

  • clarify receive-only descriptor sets: add a test vector importing just a receive descriptor, with no metadata
  • clarify derivation ranges using BIP32: clarifies bounds for range
  • bip138: clarify zero and omitted birth times: importers SHOULD rescan from the wallet
    birthday if known, otherwise from genesis.

The first commit introduces a changelog. I'm reusing that commit across a few parallel pull requests.

The last commit updates the changelog; I'll update that depending on merge order.

Record the initial published draft using the BIP3 document-version
and changelog convention.
Make change_descriptor explicitly optional for non-multipath descriptors.
Add a receive-only document vector with no change descriptor or optional
metadata; the existing vectors cover a receive/change pair and multipath.
Identify range bounds as BIP32 non-hardened child indexes, ordered from
start to end.
Explain that zero and omission both mean the birth time is unknown.
Recommend scanning from the wallet birthday if known, otherwise from
genesis.
Record this branch's clarifications and test vectors under draft document
version 0.1.1. Keep the initial-publication entry in the shared first commit.
@Sjors

Sjors commented Sep 23, 2026

Copy link
Copy Markdown
Member Author

cc @pythcoiner

@jonatack jonatack added Metadata Update Changes to Changelog or Preamble without changing the technical content of a BIP. Fixups Minor fixups not worth bothering the BIP author(s) for labels Sep 23, 2026

@murchandamus murchandamus left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly fixup, but changes the semantics of change_descriptor.

Sjors added a commit to Sjors/bitcoin that referenced this pull request Sep 23, 2026
Import the new descriptor-document vector proposed in bitcoin/bips#2298
(descriptor and policy metadata) into the existing descriptor-document fixture.
Check that a document without optional metadata imports one active receive
descriptor and uses time zero when no birth time is supplied.
Sjors added a commit to Sjors/bitcoin that referenced this pull request Sep 23, 2026
Import the new descriptor-document vector proposed in bitcoin/bips#2298
(descriptor and policy metadata) into the existing descriptor-document fixture.
Check that a document without optional metadata imports one active receive
descriptor and uses time zero when no birth time is supplied.
@pythcoiner

Copy link
Copy Markdown
Contributor

ACK 8c13149

@Sjors

Sjors commented Sep 24, 2026

Copy link
Copy Markdown
Member Author

changes the semantics of change_descriptor.

I've always understood and implemented it in the way described here: it's optional.

@pythcoiner

Copy link
Copy Markdown
Contributor

I also had implemented it optional

@jonatack jonatack left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK

@jonatack
jonatack merged commit 7c7cb23 into bitcoin:master Sep 24, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Fixups Minor fixups not worth bothering the BIP author(s) for Metadata Update Changes to Changelog or Preamble without changing the technical content of a BIP.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants