delvingbitcoin
Great Consensus Cleanup Revival
Posted on: April 5, 2024 02:30 UTC
The discussion revolves around the implications of limiting the size of scriptPubKeys on the growth of the UTXO (Unspent Transaction Output) set.
There is an analysis that suggests simply reducing the maximum size of scriptPubKeys may not effectively limit the worst-case growth of the UTXO set. This is because the creation and storage of a UTXO involve not just the space taken by the value and the script but also additional bytes for the coinbase flag and block height, making smaller outputs potentially more space-consuming in the UTXO set than fewer larger ones.
Further examination highlights that there are other, perhaps more compelling, reasons for limiting the size of scriptPubKeys. One reason is that, given the development of P2SH (Pay to Script Hash) approaches, large scriptPubKeys become unnecessary. Another significant reason is related to the distribution of validation costs. In scenarios where a large and complex spending condition is encoded within a scriptPubKey, the cost of this complexity is spread across many blocks in terms of signature operation counts and weight limits. However, the actual computational expense incurred by nodes validating these transactions is concentrated at the time of spending. Thus, limiting scriptPubKeys could shift the validation burden more equitably.
A proposed limit of 105 bytes for scriptPubKeys is suggested as being sufficient to cover all standard cases currently observed, such as k-of-3 bare multisig setups and op_return operations, while also providing adequate space for larger P2SH-style hashes. This includes examples like approximately 50 bytes for taproot-style commitments using a BLS12-381 curve or about 66 bytes for a SHA512 hash. This proposal aims to strike a balance between ensuring flexibility in transaction types and controlling the growth and computational demands on the UTXO set.