# Great Consensus Cleanup Revival

**URL:** <https://delvingbitcoin.org/t/great-consensus-cleanup-revival/710>\
**Category:** Protocol Design\
**Created:** [March 24, 2024, 5:29pm UTC](https://delvingbitcoin.org/t/great-consensus-cleanup-revival/710 "2024-03-24T17:29:42Z")\
**Posts on this page:** 1\
**Showing post:** 37

<div class="post-metadata">

**Author:** ![evoskuil](https://delvingbitcoin.org/user_avatar/delvingbitcoin.org/evoskuil/32/391_2.png) [@evoskuil](https://delvingbitcoin.org/u/evoskuil)\
**Post date:** [August 27, 2024, 5:53pm UTC](https://delvingbitcoin.org/t/great-consensus-cleanup-revival/710/37 "2024-08-27T17:53:45Z")

</div>

> [@harding](#):
>
> I previously mentioned that it inflates proof sizes by about 70%, but I now think it’s greater than that (I think verification of the initial bytes of the coinbase transaction are required, which means the entire coinbase transaction needs to be downloaded to calculate its txid, which can inflate proof size by up to almost 1 MB).

According to my quick computations, the average coinbase size for all blocks up to the most recent halving is 256 bytes and starting from segwit activation is 260 bytes. The average Merkle tree depth is 8 and 11 respectively. This implies an average segwit-era download cost of `11*32 + 260 = 612` bytes to validate the Merkle proofs for _all txs_ of a given block (.34 seconds on a 14,400 baud modem).

Given the speeds involved and these averages, basing such a decision on worst case seems unreasonable to me. The [largest coinbase in the above BTC history](https://blockstream.info/tx/f36222943ad100899acbd8300f943ee2c127babef879d8a3c0696c0d914e04ca) is 31,353 bytes, while the [largest in the segwit era](https://blockstream.info/tx/296fd33e4cb75e6746d3f80f31bef8cb19bf1952690b72b1cec9198e3967a937) is just 6,825 bytes.

> [@harding](#):
>
> the client now needs a way to request a coinbase transaction even if it doesn’t know its txid

Its block hash is a sufficient coinbase identifier.

> Another way to fix SPV wallets is to require, along with a Merkle-proof of the inclusion of a transaction E, a Merkle proof for the coinbase transaction. Because building a dual transaction-node for the coinbase transaction requires brute-forcing 225 bits, showing a valid coinbase and its corresponding Merkle inclusion proof is enough to discover the tree height. Both the E branch and the coinbase branch should have equal tree depths. - [Leaf-Node weakness in Bitcoin Merkle Tree Design](https://bitslog.com/2018/06/09/leaf-node-weakness-in-bitcoin-merkle-tree-design/)

---

_[View the full topic](https://delvingbitcoin.org/t/great-consensus-cleanup-revival/710)._
