Skip to content

Conversation

TomBriar
Copy link

This is a draft PR and reference implementation for a Compressed Bitcoin Transaction, As stated in the doc the main application for this is steganography, satellite/radio broadcast, and other low bandwidth channels with a high CPU availability on decompression.

doc: Added Compressed Transaction Schema Documentation
util: Added a variable length bitstream encoder
script: Added the rest of the IsPayTo Script functions, And Split ExtractDestination into two functions for ease of use
node: Added a vector based coin lookup
primitives: Added Compressed Transaction
validation: Added OutPoint Compression methods to the chainstate class
rpc: Added RPC endpoints for compression and decompression of Transactions
test: Added Tests for the RPC and new Primitive
fuzz: Added a fuzz test for Compressed Transactions

Link to first post on the bitcoin mailing list:
https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2023-August/021924.html

@DrahtBot
Copy link
Contributor

DrahtBot commented Dec 22, 2023

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Code Coverage

For detailed information about the code coverage, see the test coverage report.

Reviews

See the guideline for information on the review process.

Type Reviewers
Concept ACK 1440000bytes

If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #29280 (Implement OP_CHECKTEMPLATEVERIFY by reardencode)
  • #29221 (Implement 64 bit arithmetic op codes in the Script interpreter by Christewart)
  • #29050 (Add OP_TXHASH and OP_CHECKTXHASHVERIFY opcodes by stevenroose)
  • #28930 (wallet: Add scan_utxo option to getbalances RPC by BrandonOdiwuor)

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

@1440000bytes

This comment was marked as abuse.

@TomBriar TomBriar force-pushed the 2023-05--tx-compression branch 3 times, most recently from c1cceb3 to 0430476 Compare December 26, 2023 19:51
@achow101
Copy link
Member

Is this intended to be used for storage, p2p relay, or something else? If for our storage, I would be interested in seeing benchmarks as this would have an effect on how quickly things can be pulled from disk to be relayed. If for relay, then I think there should first be a BIP that describes the protocol for using compression and how that is negotiated. And if neither of those, then I don't think it's within the scope of Bitcoin Core. It seems to be a pretty significant maintenance burden for something that, as implemented, is only used by specific new RPCs.

@TomBriar TomBriar force-pushed the 2023-05--tx-compression branch from 0430476 to 1ecfbd7 Compare January 2, 2024 14:04
@TomBriar TomBriar force-pushed the 2023-05--tx-compression branch 4 times, most recently from f202aab to ba03fc9 Compare January 3, 2024 16:28
@TomBriar TomBriar force-pushed the 2023-05--tx-compression branch 5 times, most recently from edfe03b to b35fd06 Compare January 4, 2024 16:20
@maflcko
Copy link
Member

maflcko commented Feb 22, 2024

And if neither of those, then I don't think it's within the scope of Bitcoin Core. It seems to be a pretty significant maintenance burden for something that, as implemented, is only used by specific new RPCs.

My understanding is that it requires the chainstate, so this is written inside of Bitcoin Core. However, I am also wondering if existing RPCs can be used to query the chainstate, or if the RPC interface could be extended, if needed. Putting this piece of code directly in the satellite broadcast software seems easier and preferable.

@TomBriar TomBriar force-pushed the 2023-05--tx-compression branch from 7e8511c to 7ca85bf Compare March 7, 2024 18:18
@TomBriar TomBriar force-pushed the 2023-05--tx-compression branch 2 times, most recently from e9d3ac7 to 8c8c47d Compare March 9, 2024 18:10
@TomBriar TomBriar force-pushed the 2023-05--tx-compression branch from 8c8c47d to 9fafa2b Compare March 9, 2024 21:34
…nsaction, For valid assets_tests run compression tests, Added unit tests for new primitives
@TomBriar TomBriar force-pushed the 2023-05--tx-compression branch from 9fafa2b to a850ab0 Compare March 10, 2024 13:18
@maflcko
Copy link
Member

maflcko commented Mar 11, 2024

Closing for now due to lack of replies to questions. Please reply below, and leave a comment if this should be reopened.

@TomBriar
Copy link
Author

Hi,

This is a reference implementation for the compression scheme described in this WIP BIP:
bitcoin/bips#1556

It may be a bit heavy to be PR'd into bitcoin core at this time, although it has a great application for both the P2P and Storage in bitcoin core. Another project that implements the same schema is underway as an external tool and the RPC commands were found to be sufficient.

Thanks-
Tom.

@bitcoin bitcoin locked and limited conversation to collaborators May 14, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants