Great Consensus Cleanup Revival

Posted by AntoineP

Feb 5, 2025/15:30 UTC

The discussion revolves around the specifics of signature operations (sigops) counting in relation to OP_CHECKMULTISIG (CMS) within different Bitcoin script contexts. The current practice for calculating sigops in bare scripts, which is primarily applied to output scripts, attributes 20 sigops to each CMS instance. However, this accounting method changes when considering Pay-to-Script-Hash (P2SH) redeem scripts. In these cases, the number of sigops is determined by the CMS parameter that specifies the number of public keys involved in the operation. For example, a CMS configured as 2 3 OP_CMS would be counted as three sigops, corresponding to the three public keys it checks.

Further details clarify the intended approach for sigop accounting aligns with the methodologies used for P2SH and Segregated Witness (Segwit) transactions. Specifically, the count of sigops in a CMS operation will match the number of keys involved, provided this number does not exceed 16. If the number of keys exceeds 16, the sigop count defaults to 20. This standard applies irrespective of the script type, ensuring consistency across both P2SH and Segwit transactions.

Additionally, there's a mention of a transaction limit related to CHECK*SIG operations, particularly when dealing with bare previous output (prevout) scripts. The email confirms that spending an output from a Pay-to-PubKey (P2PK) transaction counts as a single sigop against a cumulative transaction limit of 2,500 sigops. This includes consideration for the scriptpubkey, the scriptsig, and any relevant redeem script if the transaction utilizes P2SH. This comprehensive approach to sigop accounting is aimed at maintaining transaction integrity and mitigating potential abuse, aligning with broader efforts to ensure scalability and security within the network.

Link to Raw Post

Thread Summary (84 replies)

Mar 24 - Apr 21, 2025

Bitcoin Logo

TLDR

Join Our Newsletter

We’ll email you summaries of the latest discussions from authoritative bitcoin sources, like bitcoin-dev, lightning-dev, and Delving Bitcoin.

Explore all Products

ChatBTC imageBitcoin searchBitcoin TranscriptsSaving SatoshiBitcoin Transcripts Review
Built with 🧡 by the Bitcoin Dev Project
View our public visitor count

We'd love to hear your feedback on this project?

Give Feedback