bitcoin-dev

Compressed Bitcoin Transactions

Compressed Bitcoin Transactions

Original Postby Tom Briar

Posted on: January 9, 2024 15:31 UTC

Tom's email presents updates to the Bitcoin Core reference implementation, focusing on modifications to the Compressed Transaction Schema.

Notable changes include phasing out nLocktime grinding and introducing a relative block height for compressed inputs, along with a new format of variable integers.

The revised Transaction Compression Schema aims to reduce transaction sizes by omitting regenerable data during decompression, such as valid signatures. It achieves significant size reduction by replacing previous output identifiers with block height and index. This method is less effective for recent transactions due to the need for blockchain access during decompression.

Taproot keyspend transactions benefit from minimal size due to their witness structure. Legacy and Segwit transactions can also be optimized through public key recovery methods. The schema targets applications like steganography and satellite/radio broadcasts where bandwidth is limited but processing power for decompression is available. Users are encouraged to configure transactions for improved compressibility, though the compression process includes exceptions, notably the optional Txid/Vout pair compression, which provides 50% savings without full commitment to the schema.

The document outlines four methods to minimize transaction sizes: metadata packing, using compact integers, employing compressed signatures with public key recovery, and substituting txid/vout pairs with blockheight and output index. However, the last approach may complicate decompression in the event of a block reorganization.

Schema documentation details the encoding of various transaction elements, including version, counts, locktime, and script types, alongside specifications for handling input and output data.

An optimal transaction type for compression is identified, providing potential savings across several fields. Test vectors demonstrate the compression effectiveness for Taproot and Legacy transactions.

For in-depth technical understanding, the email refers readers to the "compressed_transactions.md" document and the Draft PR on the Bitcoin GitHub repository at https://github.com/bitcoin/bitcoin/pull/29134.

The accompanying dataset appears to consist of cryptocurrency transaction data, indicated by hexadecimal strings and cryptographic components. It contrasts uncompressed legacy transaction formats with their compressed counterparts, highlighting the complex structures and verification mechanisms essential for secure blockchain transactions. Further context would enhance the analysis of these transactions' significance within the broader cryptocurrency space.