Maintainers Dev Call [Oct 28] #118
notmandatory
started this conversation in
Dev Calls
Replies: 4 comments 3 replies
|
Evan's notes from the call (copied from Proton doc): Agenda
Minutes
Todo
|
0 replies
@evanlinjin is there a quick way to find this PRs? I didn't get in that in the notes. |
3 replies
|
0 replies
|
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
BDK Architecture Releases and Contribution Policy
Session Goal
Reduce maintainer workload while preserving contribution quality, including review of Evan’s short replacement PRs for low-effort submissions and development of a sustainable policy for bot-generated or AI-assisted contributions.
Clarify how BDK should support Bitcoin Core RPC, particularly whether the Bitcoin Core chain source requires a Sans-I/O core that can work with both blocking and asynchronous transports without duplicating business logic.
Define the scope of
bdk_txrelative to Rust PSBT v2, including transaction construction, coin selection, signing, finalization, persistence, and the boundary between BDK-specific policy and upstream PSBT functionality.Plan the BDK Wallet 4.0 alpha release process, including whether removing integrated signers should be the first flagship change and when to incorporate the forthcoming BDK Chain 0.24 release.
Explore practical controls for low-quality external contributions without closing the project to legitimate newcomers, including issue-first contribution flows, vouching, allowlists, disclosure policies, and limits on simultaneous submissions.
Ideas Generated
Evan created concise replacement PRs for several low-effort contributions. Each should require no more than approximately 30 minutes to review, and reviewers should assign themselves before starting to avoid duplicated work.
Three relevant Bitcoin Core RPC implementations were identified for comparison:
Rust Bitcoin’s
corepcclient: https://git.rust-bitcoin.org/rust-bitcoin/corepc/src/branch/master/clientAlpen Labs’ asynchronous client: https://github.com/alpenlabs/bitcoind-async-client
BDK’s current client: https://github.com/bitcoindevkit/bdk-bitcoind-client
José’s client was described as production-oriented and asynchronous, while Jamil’s client was described as blocking, maintained, and audited. Using either would address one execution model but would not directly provide the shared blocking/async architecture sought for BDK’s chain sources.
Evan proposed a Sans-I/O RPC core because embedding either blocking or async I/O would require separate chain-source implementations and duplicate substantial logic. Async support is itself fragmented across Tokio and futures-style traits, further increasing the duplicated surface.
The intended Sans-I/O dependency direction would keep transport outside the core. Request construction and response interpretation would be transport-independent, while callers could supply blocking, Tokio, futures-based, or other HTTP/network layers.
TVPeter explained that the current BDK Bitcoin Core client already separates some request formation and response interpretation from HTTP and permits a custom HTTP implementation. Evan clarified that it still encapsulates I/O behind generic client types, so it does not yet meet the stricter Sans-I/O model and still creates separate blocking and async cores.
The experimental Electrum streaming chain source was cited as BDK’s current Sans-I/O example. Evan noted that it is presently housed among experimental crates rather than in a dedicated repository and can inform the Bitcoin Core design.
Participants considered three primary RPC approaches: depend on an existing async or blocking client, maintain a separate BDK client, or integrate a minimal Sans-I/O client directly into BDK’s Bitcoin Core chain-source crate.
Thunderbiscuit emphasized identifying actual production demand before building a general-purpose client. A public production client would require broad RPC command coverage, support across multiple Bitcoin Core versions, and ongoing maintenance for users’ preferred methods; the earlier BDK direction had instead been a small internal client supporting only BDK’s needs.
Server-side BDK users were suggested as likely beneficiaries of direct Bitcoin Core support, but no confirmed major production user of the current limited BDK RPC client was identified. Known production demand remains stronger for BDK Wallet stability and BDK Chain 0.24.
The chain source appears to need only a small set of basic RPC operations—approximately ten or fewer—including retrieving blocks, headers, chain-tip information, transactions, and mempool data. Wallet RPC methods are not required.
A generic raw-call facility could allow downstream users to invoke unsupported RPC commands without BDK maintaining typed methods for every command. A Sans-I/O trait could also associate request and response types while allowing users to wrap and implement additional types themselves.
Evan objected to compile-time Bitcoin Core version feature flags for the chain source. The preferred behavior is runtime version detection followed by selection of the best supported RPC method, which is important for library users who cannot know which Bitcoin Core version an application will encounter.
Nymius suggested enabling all compatible Core RPC type features, if they are not mutually exclusive, and implementing runtime switching in BDK. This remains an option to investigate.
Participants proposed documenting the RPC alternatives, architecture, trade-offs, version strategy, and possible trait shapes in an Architecture Decision Record. The ADR can include code sketches and may also produce reusable guidance for BDK’s two major I/O domains: networking and persistence.
For
bdk_tx, Nymius asked whether the crate still has a clear purpose after its original goals shifted. The initial goals included replacing Wallet’s transaction builder and moving from BDK’s policy model toward Miniscript’s planning model.Evan described the intended scope of
bdk_txas the complete transaction-creation flow: coin control, coin selection, transaction planning, signing-related configuration, and final transaction production, with better error locality and an API usable independently ofbdk_wallet.Nymius described Rust PSBT v2 as a role-based pipeline—such as creator, updater, signer, finalizer, and extractor—without the old embedded unsigned-transaction model. The types guide a PSBT through construction, enrichment, signing, validation, finalization, and extraction.
Rust PSBT v2 does not perform BDK-specific coin selection, UTXO filtering, coin control, or high-level wallet policy. It can, however, carry and validate the transaction data produced by those operations and may replace significant portions of BDK’s post-selection processing.
One possible boundary is for
bdk_txto perform BDK-specific planning and coin selection, then emit the initial Rust PSBT v2 role and optionally provide wrappers or helpers throughout the remaining role pipeline.Another proposed responsibility for
bdk_txis to provide opinionated BDK defaults and ergonomic helpers rather than requiring users to manipulate PSBT fields directly. Examples include signing options and restrictions on accepted sighash types.A key unresolved persistence case is whether a PSBT v2 can be serialized, sent elsewhere for signing, reloaded after an application restart, and then finalized without retaining additional wallet or
bdk_txstate. The currentbdk_txfinalizer cannot simply be restarted in this scenario.The boundary between Rust PSBT and
bdk_txcan be tested by determining what state is required for restartable finalization and whether that state belongs in the PSBT representation, the BDK transaction layer, or the wallet.Noah’s survey of roughly 70 projects found that 15 used the
trust_witness_utxosigning option. Four projects—identified as Cupcake, Spaces, Bitmask, and BitKit Core—explicitly enabled acceptance of all sighash types; most others relied on BDK’s default behavior of rejecting sighashes that do not commit to all inputs and outputs.Rust PSBT currently accepts the supplied sighash rather than enforcing BDK’s existing default. Options discussed included enforcing the safer default in
bdk_tx, exposing separate checked and unchecked Rust PSBT APIs, or allowing BDK wrappers to set the appropriate behavior.Thunderbiscuit suggested that users needing removed signing options during migration could temporarily add Rust PSBT as a dependency, convert or deserialize the PSBT into its types, and use the necessary flags there. This needs validation against the actual code path.
The proposed BDK Wallet 4.0 strategy is to release a sequence of potentially breaking alphas rather than immediately promising 4.0 stability. Stable users can remain on the polished 3.2 line, while users needing new functionality can adopt the alphas.
An approximately eight-week alpha cadence was discussed. Alpha 1 is tentatively targeted for December 10, with removal of integrated signers as the proposed flagship feature; multi-keychain support was suggested as a possible Alpha 2 feature.
Participants also wanted an alpha to consume the performance and architecture improvements already merged into BDK Chain. BDK Chain 0.24 is not ready yet because key work remains, including the chain-query-to-chain-task change for MTP and potentially the stalled topological-sort work needed for canonicalization.
BDK Chain 0.24 integration could be part of Alpha 1 if it becomes ready and provides sufficient user-facing value, or it could form a later alpha milestone by itself. No pressure was placed on the chain maintainers to release prematurely.
For AI-assisted contributions, Noah proposed three broad options: retain the current process with a written policy, add vouching labels or trusted/untrusted filtering, or block PRs from unapproved new contributors until they meet a simple trust criterion.
An issue-first workflow received support: newcomers would describe the problem before submitting code, and maintainers or trusted automation could produce the implementation. This preserves useful reports while reducing the security and review risks of accepting arbitrary generated patches.
Rust Bitcoin’s practice was discussed as a precedent: apparently AI-generated or low-quality contributions may be closed and recreated by maintainers, and new contributors are expected to establish trust through issues or substantive review rather than immediately submitting trivial generated PRs.
A vouch system could label or filter submissions based on an allowlist and blacklist without initially preventing submission. A stricter CI workflow could automatically close PRs from accounts not on an approved list.
The approved-account list could be maintained in a shared
.githubrepository or another central location and consumed by multiple BDK repositories. A simpler repository-local list is also possible but would duplicate administration.TVPeter suggested limiting the number of open PRs a new contributor may have at once, potentially through CI, so one person cannot create several simultaneous low-quality submissions. The feasibility of enforcing this through GitHub remains unconfirmed.
LDK’s locally hosted review bot and simple-PR bot were discussed as a possible future model. Maintainers can direct the PR bot from an issue, review its patch, and request revisions, while review-bot output is supplemental and can be collapsed or ignored.
Evan argued that AI output should be human-filtered before being presented to the full maintainer group. Local execution may be preferable where one maintainer can remove poor suggestions rather than forcing several maintainers to assess unfiltered output.
Participants questioned whether AI disclosure should apply universally, since established maintainers already use AI tools and some new contributors may produce better work with local AI review. Rust Bitcoin’s disclosure rule was characterized primarily as a quality-control mechanism for new contributors rather than a universal ban on assisted development.
Promising Concepts
A minimal, integrated Sans-I/O Bitcoin Core RPC layer is the leading architecture to investigate. It would serve BDK’s chain-source needs, support blocking and multiple async runtimes through external transports, avoid duplicated core logic, and leave room for generic raw calls.
The RPC implementation should remain deliberately scoped to BDK’s requirements unless concrete external production users justify a broader client. This avoids taking on full command coverage and multi-version maintenance without demonstrated demand.
Runtime Bitcoin Core version detection is preferable to forcing downstream applications to compile against a single version feature. Enabling all compatible upstream types and selecting the correct behavior dynamically is worth validating.
An ADR is the preferred mechanism for reaching an RPC decision. It should compare external-client dependencies, an independent BDK client, and an inline chain-source client while documenting maintainability, complexity, testing, transport abstraction, supported methods, and version handling.
bdk_txappears most valuable as the BDK-specific planning and policy layer around Rust PSBT v2 rather than as a duplicate PSBT implementation. Coin selection, coin control, wallet-derived state, opinionated defaults, ergonomic helpers, and restartable workflow support remain plausible responsibilities.The persisted-finalization experiment is a strong test for the
bdk_tx/Rust PSBT boundary. If a serialized PSBT v2 contains everything needed after signing,bdk_txcan be thinner; if additional state is required, the ownership and serialization of that state must be designed explicitly.Removing integrated signers remains a plausible flagship feature for BDK Wallet 4.0 Alpha 1 if Rust PSBT can cover migration needs such as
trust_witness_utxoand sighash handling. The approach should remain provisional until the end-to-end workflow is demonstrated.A series of breaking 4.0 alphas offers a way to ship major changes earlier without prematurely imposing stable-API guarantees. BDK Wallet 3.2 would remain the recommended stable path during the transition.
BDK Chain 0.24 should be integrated into a wallet alpha once its intended work is complete and sufficiently tested. It may fit Alpha 1 if timing permits, but Alpha 2 or a dedicated integration alpha is acceptable.
For contributions, a written AI policy plus an issue-first workflow is the most immediately actionable direction. It can reduce low-quality patches while preserving useful issue reports and allowing maintainers to recreate valid fixes safely.
Vouching or allowlist-based controls remain promising if the written policy and normal moderation do not sufficiently reduce noise. They offer a middle ground between unrestricted PR creation and closing external contributions entirely.
Maintainer-controlled automation is preferable to accepting arbitrary autonomous submissions. Future bots should operate from reviewed issues, expose their work for human review, and never merge changes without maintainer approval.
Evaluation Criteria
The RPC design should minimize duplicated logic across blocking, Tokio, futures-based, and other environments while keeping the architecture readable, testable, and maintainable.
Any BDK RPC implementation should be assessed against confirmed BDK use cases rather than hypothetical general-purpose demand. Required method coverage, supported Bitcoin Core versions, production users, and expected maintenance cost should be explicit.
Depending on an external client should be evaluated for audit status, maintenance activity, async or blocking constraints, compatibility with BDK’s Sans-I/O chain-source direction, and exposure to upstream API changes.
The Sans-I/O prototype should demonstrate clean dependency inversion: request construction and response parsing remain independent of transport, while the caller supplies HTTP or network execution.
Bitcoin Core version handling should support both controlled server deployments and applications that connect to user-managed nodes of unknown versions. Runtime compatibility should not require shipping multiple incompatible client builds.
The
bdk_txboundary should avoid duplicating Rust PSBT functionality while retaining BDK-specific responsibilities such as coin selection, policy defaults, wallet context, signing safeguards, and user-friendly transaction workflows.Rust PSBT migration should be tested against real options found in downstream projects, especially
trust_witness_utxo, non-SIGHASH_ALLbehavior, separate signing and finalization, and serialization across process restarts.A BDK Wallet alpha should have a clear flagship capability, a documented migration path, and enough implementation maturity to provide useful feedback even though breaking changes remain allowed.
BDK Chain 0.24 should not be released merely to satisfy the wallet schedule. It should have no known regressions, include the intended release-critical changes, and clearly identify any blocked or stale work.
Contribution controls should reduce review noise and malicious-code risk without excluding legitimate newcomers who can explain a real problem and engage with maintainers.
Any vouching or allowlist mechanism should be inexpensive to administer across repositories, transparent enough for contributors to understand, and reversible if it creates excessive friction.
AI policy should focus on accountability and output quality: contributors must understand and stand behind their submissions, maintainers must be able to close low-quality work efficiently, and automated output must remain subject to human judgment.
Next Steps
Reviewers should work through Evan’s concise replacement PRs, assigning themselves before review to prevent duplicated effort. Evan estimated that each review should take no more than approximately 30 minutes.
TVPeter volunteered to draft the Bitcoin Core RPC ADR as a PR under the BDK repository’s
docs/ADRdirectory, using the existing examples and template. The ADR should capture alternatives, trade-offs, a potential Sans-I/O design, supported RPC scope, and Bitcoin Core version handling.Evan and other maintainers will answer TVPeter’s questions and discuss the RPC proposal directly on the ADR PR. The document may include trait or code examples if useful.
The RPC investigation should inventory the exact methods currently required by the chain source and determine whether all needed upstream Core RPC types can be enabled together for runtime version selection.
Matthew will investigate the issue 83 finalization scenario during the following week: create and serialize a PSBT v2, send it for signing, simulate an application restart, reload it, and determine whether finalization requires state beyond the PSBT. He will add findings to the issue.
Nymius will continue work on Rust PSBT v2, with the signer already in a relatively mature state and updater and finalizer work planned next. He will use BDK edge cases to assess which behavior belongs upstream and which belongs in
bdk_tx.Thunderbiscuit will test whether Rust PSBT can provide a practical migration path for signing options after signer removal, including whether Book of BDK guidance can present it as an additional workflow.
Nymius will write down the open signing-option and sighash-policy questions in a
bdk_txissue so maintainers can review and answer them asynchronously.Evan will organize the intended BDK Chain 0.24 work so contributors can identify release-critical PRs, including the chain-task/MTP work and the status of canonicalization’s topological-sort dependency.
Thunderbiscuit will create a BDK Wallet issue to bump BDK Chain to 0.24 and link it to the relevant chain milestone or meta-tracking work. He will later decide, with input from Evan, whether it belongs in the Alpha 1 or Alpha 2 milestone.
The tentative target for BDK Wallet 4.0 Alpha 1 is December 10. Removing signers remains the candidate flagship feature, while BDK Chain 0.24 integration depends on release readiness and may move to a later alpha.
Maintainers should review and comment on Noah’s AI-policy PR and bot-contribution discussion:
Policy PR: docs: add AI contribution policy bdk#2446
Discussion issue: Managing PR volume and slop bdk#2447
The contribution-policy discussion should continue in those GitHub threads rather than attempting an immediate final decision. Feedback should address issue-first contributions, disclosure expectations, vouching, allowlists, PR-volume limits, and human review of automated output.
All reactions