New BIP: Limiting excessive SignatureHash operation



Summary:

The proposed BIP aims to prevent excessive SignatureHash operation in Bitcoin network. The amount of data hashing in SignatureHash is proportional to the size of transaction, leading to O(n^2) growth as the number of sigops in a transaction increases. BIP143 introduced a new SignatureHash algorithm in segregated witness transactions. However, it was not able to fix pre-segregated witness transactions. The proposed BIP defines a new type of block-level resources limit, with several (optional) script restrictions, to prevent excessive SignatureHash operation. Transaction hashable size (TxHashableSize) is defined as the size of a transaction serialized without witness data (BIP144) and has scriptSig in all inputs replaced by zero-size script. The SignatureHash equivalent operation (SigHashOp) is defined as the maximum possible number of times that a sigop would perform SignatureHash at the TxHashableSize. There are two ways to estimate the SigHashOp: Loose estimation and Tight estimation.


Updated on: 2023-05-19T23:59:10.145063+00:00