AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Informational 18 Bitcoin

Merge rust-bitcoin/rust-bitcoin#6809: addresses: Add `AddressParams` type and remove most uses of network types

Public commit record

What the developer wrote

Authored by Andrew Poelstra

91/100 · Strong
Merge rust-bitcoin/rust-bitcoin#6809: addresses: Add `AddressParams` type and remove most uses of network types

d8146e8a2ccddef2c67dd78eb3141d9b8edc6d4f addresses: Remove From<Network> for AddressParams (Mitchell Bagot)
b82c9a5294d4f658bdbb4a4b779167e854d7d789 addresses: Remove From impls with KnownHrp and network types (Mitchell Bagot)
a3d4b10e0d0cf4f3421ed2dd6a5c1e22d7b30712 addresses: Replace uses of NetworkKind and Params with AddressParams (Mitchell Bagot)
6ee899e66c9f600187665f5e52c17ab5abb05156 addresses: Replace public uses of Network with AddressParams (Mitchell Bagot)
e556084cc77b14fcb456cbd82872dc88cd73c661 addresses: Add AddressParams type (Mitchell Bagot)

Pull request description:

The Network and NetworkKind types are currently used in the public API of the addresses crate. However, while the bitcoin-network-kind crate is 1.0, these types are not really stable the same way as other stable crate types are. Instead, we should aim to remove their use from the public API in favour of a to-be-stable AddressParams type.

Add AddressParams type with const values for current set of networks.
Replace all public uses of bitcoin-network-kind types, except for Address::network_kind(), with appropriate AddressParams replacements.


ACKs for top commit:
tcharding:
ACK d8146e8a2ccddef2c67dd78eb3141d9b8edc6d4f
apoelstra:
ACK d8146e8a2ccddef2c67dd78eb3141d9b8edc6d4f; successfully ran local tests; hopefully we don't get too many https://github.com/rust-bitcoin/rust-bitcoin/issues/3166 complaints over this


Tree-SHA512: 6f1600111266544c818a161cdd14244582b169990d4a20b7297e47fd3ce1210c19c0c1b25d08a9d5324f2970c3b0e7c7652fd549a53a6cb8aa0755d0f29a0d17
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This is a routine API refactoring in the rust-bitcoin library. It introduces a new AddressParams type and replaces most public uses of the older Network/NetworkKind types when creating or validating Bitcoin addresses. There is no security vulnerability here; it is a design change to make the address crate's public API more stable.

Recommended action

No security action required. Users of the library should update call sites from Network/NetworkKind/KnownHrp to AddressParams constants or use the new From<Params> conversion.

Security signals we found

01

No memory-safety issues, cryptographic errors, or input-validation changes observed

02

No new unsafe blocks, no new dependencies, no new parsing of untrusted data

03

API surface change only: parameter types replaced with semantically equivalent AddressParams

04

NetworkValidationError field renamed from required: Network to required: AddressParams, preserving validation behavior

Risk score

Why this scored 18/100

Our methodology →
Potential impact 0/30
Exploitability 0/25
Stealth signal 0/15
Affected reach 5/15
Confidence 9/10
Evidence quality 4/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.