request BIP number for: "Support for Datastream Compression" [combined summary]



Individual post summaries: Click here to read the original discussion on the bitcoin-dev mailing list

Published on: 2015-11-11T19:11:13+00:00


Summary:

A proposal has been made to incorporate datastream compression into Bitcoin's block relay mechanism. The proposal suggests compressing the data before sending, initially for blocks but potentially for transactions as well. It is estimated that this compression could result in an average of 20% block compression and take 90 milliseconds to compress a full block on a slow laptop.The main advantage of implementing this feature would be to reduce bandwidth usage, although there may also be a slight performance gain during transmission, especially in areas with higher network latency. However, it is important to note that the decision to use this compression method is up to individual nodes, as there are trade-offs between bandwidth savings, CPU performance, and latency.Concerns were raised about the security track record of Zlib, which is the current compression method used by Bitcoin, and its potential vulnerabilities. It was suggested that LZO compression could provide better compression but at the cost of CPU performance.The discussion also touched on the idea of combining multiple blocks into a single "cblocks" message and combining transactions together and compressing them as "ctxs". This would further optimize compression and reduce bandwidth usage. Most blocks and transactions have runs of zeroes and/or highly common bit-patterns, which contributes to useful compression even at smaller sizes.Overall, the conversation revolved around finding ways to save bandwidth in transmitting blocks and transactions while considering the trade-offs between compression ratios, CPU performance, and security. The consensus was that these trade-off decisions should be made locally and negotiated between peers rather than being a required feature of the network P2P.The author of the proposal has submitted a pull request on Bitcoin Core, numbered #6973, for Zlib Block Compression for block relay. The request was made at the request of @sipa, and it is recommended that a Bitcoin Improvement Proposal (BIP) be associated with it. If accepted, the author suggests using the more generic title "Support for Datastream Compression" instead of "Zlib Compression for block relay," as the feature could also be used for transactions in the future.


Updated on: 2023-08-01T16:49:52.058123+00:00