For discussion: limit transaction size to mitigate CVE-2013-2292



Summary:

The email thread starts with a suggestion that the script execution code should have run time maximums to avoid a potential CPU exhaustion attack. Gavin Andresen then introduces a draft BIP titled "Limit maximum transaction size" aimed at mitigating the potential attack by limiting the maximum size of a transaction included in a block. Sergio Demian Lerner had reported that a maliciously constructed block could take several minutes to validate due to the way signature hashes are computed for OP_CHECKSIG/OP_CHECKMULTISIG, resulting in O(n^2) scaling if there are no limits on n or m (the number of signature operations and bytes in the transaction). An alternative to this BIP would be to limit the number of signature operations in a single transaction instead of limiting size. However, this might not be compatible with future opcodes that require larger-than-100,000-byte transactions. The BIP proposes that after deployment, the maximum serialized size of a transaction allowed in a block shall be 100,000 bytes. This change will be deployed with BIP 100 or BIP 101. Software that assembles transactions into blocks and that validates blocks must be updated to reject oversize transactions.


Updated on: 2023-06-10T03:01:57.514923+00:00