Skip to content

wallet: Privatize Core descriptor records - #64

Open
BenWestgate wants to merge 1 commit into
reviewability-v1from
codex/63-private-core-descriptors
Open

BenWestgate wants to merge 1 commit into
reviewability-v1from
codex/63-private-core-descriptors

Conversation

@BenWestgate

Copy link
Copy Markdown
Owner

What

  • remove core_descriptors from the supported package API;
  • remove the unused public-deriver protocol/branch from wallet.py;
  • keep private import-record construction as _core_descriptors for the Bitcoin Core adapter, tests, and repository tools;
  • make public-API and installed-wheel checks assert that descriptor-record construction is not exported.

Why

Bitcoin Core already owns the EC-dependent public derivation path. Exposing descriptor import records as a package API duplicates that boundary and leaves an obsolete abstraction that external callers do not need. This keeps master_xprv unchanged and preserves arbitrary --account behavior in the Core integration.

Validation

  • focused wallet/public-API/Core suite: 60 passed;
  • same focused suite under python -O: 60 passed;
  • compileall and git diff --check: pass;
  • installed production tree: 4,861 logical review lines, below the authorized <5200 cap.

The local system interpreter is Python 3.14 without the repository dev environment, so Ruff, mypy, and the legacy bip32 differential oracle are left to the normal GitHub matrix.

Fixes #63.

AI assistance was used to implement and validate this user-authorized branch-to-branch contribution.

The package-level core_descriptors adapter exposes import-record construction that runtime callers no longer need. Bitcoin Core already owns public derivation, while private descriptor construction is only an implementation detail of the Core adapter.

Remove the unused public-deriver protocol and branch, keep the record builder private, and make installed/public-API checks enforce that boundary. Internal tests and verification tools continue to exercise the same fixed descriptor templates and arbitrary account handling.

Fixes #63
@BenWestgate BenWestgate added area: api Public and supported Python API boundaries. area: wallet/core Wallet integration and Bitcoin Core boundaries. gate: adversarial review Resolve, merge, or explicitly defer before the next full adversarial review. labels Sep 28, 2026 — with ChatGPT Codex Connector

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: api Public and supported Python API boundaries. area: wallet/core Wallet integration and Bitcoin Core boundaries. gate: adversarial review Resolve, merge, or explicitly defer before the next full adversarial review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant