kernel: support for serializing witness-stripped transactions/blocks? #34960

issue theStack openend this issue on March 30, 2026
  1. theStack commented at 11:06 pm on March 30, 2026: contributor

    Please describe the feature you’d like to see added.

    In the course of writing a BIP54 compliance checking tool using libbitcoinkernel, I’ve locally added a new C API function for serializing transactions without witness data (btck_transaction_to_bytes_witness_stripped) to check for rule 3. This alone is probably not a convincing use case (witness-stripping the serialized tx by hand seems feasible, particularly for this case where only 1-in-1-out txs are candidates), but I’m wondering whether it’s generally in scope of the project to add support for serializing witness-stripped transactions/blocks. On first sight this seems unnecessary due to widespread segwit support, but my thinking is that potential node implementations built on bitcoinkernel would e.g. still need it to serve peers that don’t signal NODE_WITNESS in their version message.

    Thoughts? Happy to hear API suggestions (new parameter to existing to_bytes functions vs. separate functions?) and submit a PR if it’s considered in scope.

    No response

    Describe the solution you’d like

    No response

    Describe any alternatives you’ve considered

    No response

    Please leave any additional context

    No response

  2. theStack added the label Feature on Mar 30, 2026


theStack

Labels
Feature


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-03-31 12:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me