Minor DoS vulnerability in BIP144 lack of tx witness data size limit



Summary:

On October 11, 2022, Loki Verloren highlighted a problem with BIP144 when discussing the recent 998 of 999 multisig segwit transaction. The issue is that a single transaction witness can be the same as the maximum block size. This means that there is now a special case with a block over 33k worth of witness data. A concrete limit should be set on the maximum size of a transaction witness, and this should be discussed in a more general sense about total transaction sizes. Adding arbitrary size restrictions to consensus may result in burned coins, which makes it an additional complexity for negative gain. Therefore, it is important to come up with a proper specification to implement the limit on the maximum size of a transaction witness. In the absence of a specification, it becomes impossible to properly implement, and the status quo devolves to the actual implementation in the bitcoin core repository code. Loki Verloren suggests that the weight calculation should escalate exponentially to discourage putting transactions like this on the chain. The price for the recent transaction was equivalent to about $5 to do this. Overall, there are a number of issues with adding arbitrary size restrictions to consensus, but most of all, it is important to address the problem with BIP144 and set a concrete limit on the maximum size of a transaction witness.


Updated on: 2023-06-16T01:43:09.596142+00:00