bitcoin-dev

Great Consensus Cleanup Revival

Great Consensus Cleanup Revival

Original Postby Eric Voskuil

Posted on: June 24, 2024 00:35 UTC

The discussion revolves around the complexities and potential implications of introducing a new consensus rule regarding transaction size, particularly focusing on coinbase transactions within the context of Bitcoin validation processes.

The initial point of contention is whether determining the coinbase size could be done at an earlier validation stage than detecting a non-null coinbase. Both actions require parsing the coinbase immediately after data is received from the socket read, yet they diverge in their procedural specifics and consequent implications for network consensus.

One proposed rule suggests invalidating transactions (or coinbases) smaller than 64 bytes, introducing a complexity into the system. This division creates a "consensus seam," where transactions are distinguished by being either less than or greater than 64 bytes, potentially complicating validation processes. An alternative approach to validation would involve merely reading or skipping the header (80 bytes) and parsing a specified range of coinbase bytes, with different ranges suggested for size checking (0-65 bytes) versus point checking (6-43 bytes). The latter method does not necessitate any changes to current consensus rules and avoids creating new distinctions within transaction validations.

Critically, the introduction of an arbitrary transaction size validity criterion may lead to more implementation bugs rather than resolving existing issues. It adds complexity by introducing a bifurcation based on transaction size and raises questions about the activation of such a rule. This could lead to unforeseen complications over time, particularly as Bitcoin-related software evolves to rely on these nuances of protocol design. Furthermore, this debate underscores that the proposal does not address the issue of unmalleable block hashes, as duplicate transaction hash malleation would persist regardless of the decision, thus failing to deliver a comprehensive solution to the problem at hand.

The potential benefits of this proposal appear limited to minor bandwidth savings in Simplified Payment Verification (SPV) proofs, which the author finds challenging to justify as a basis for implementing a new consensus rule. This skepticism reflects a broader concern about the trade-offs between introducing additional complexity into the Bitcoin protocol and the marginal gains in efficiency or security that such changes might offer.