BIP147 minor error [combined summary]



Individual post summaries: Click here to read the original discussion on the bitcoin-dev mailing list

Published on: 2016-03-22T10:39:51+00:00


Summary:

On March 21, 2016, Sergio Demian Lerner reported a minor error in BIP147 to the bitcoin-dev mailing list. The BIP147 defines the cost of a sigop in traditional script as 4 and the cost of a sigop in a witness program as 1. The new rule states that the total sigop cost should be no more than 80,000. However, the code implements the rule differently, using the condition (nSigOps + (nWitSigOps + 3)/4 > MAX_BLOCK_SIGOPS) to determine if there is an error. This implementation does not align with what was defined in the BIP147.To demonstrate the error in the implemented code, Lerner provided an example. He stated that nSigOps = 1 and nWitSigOps = 79999, which does not violate the BIP147 definition but does cause an error in the implemented code. This discrepancy between the BIP definition and the code's implementation can lead to confusion and potential issues in the Bitcoin network.Lerner highlighted this error in a post to the bitcoin-dev mailing list, drawing attention to the need for the code to accurately reflect the rules defined in BIP147. By addressing this issue and ensuring consistency between the BIP and the code, developers can prevent such errors and maintain the integrity of the Bitcoin protocol.


Updated on: 2023-08-01T17:58:31.296609+00:00