Skip to content

Keep protocol primitives native to bitcoin-rs #172

Description

@gosunuts

crates/primitives will remain a native bitcoin-rs implementation rather than adopting rust-bitcoin canonical types.

The expected benefit from replacing Tx, Block, Header, OutPoint, hashes, sighash, encoding, network types, and related primitives with rust-bitcoin equivalents is not large enough to justify the migration cost, compatibility layer, and tighter dependency coupling.

Principles:

  • Keep protocol/domain primitives implemented and owned by bitcoin-rs.
  • Remove rust-bitcoin dependencies from crates/primitives where they exist solely to provide or mirror Bitcoin primitive types, encoding, sighash, network, hash, transaction, block, header, or outpoint functionality.
  • Do not add wrapper or conversion layers solely for rust-bitcoin compatibility.
  • Keep storage/UTXO-specific packed representations where useful.
  • External libraries may still be used where they provide clear standalone value, but they should not define bitcoin-rs's core primitive vocabulary.

The target state is that crates/primitives is self-contained with respect to Bitcoin protocol primitives and does not depend on rust-bitcoin for those responsibilities.

RPC compatibility is a separate decision and is intentionally out of scope for this issue.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions