# Great Consensus Cleanup Revival

**URL:** <https://delvingbitcoin.org/t/great-consensus-cleanup-revival/710>\
**Category:** Protocol Design\
**Created:** [March 24, 2024, 5:29pm UTC](https://delvingbitcoin.org/t/great-consensus-cleanup-revival/710 "2024-03-24T17:29:42Z")\
**Posts on this page:** 1\
**Showing post:** 69

<div class="post-metadata">

**Author:** ![ajtowns](https://delvingbitcoin.org/user_avatar/delvingbitcoin.org/ajtowns/32/417_2.png) [@ajtowns](https://delvingbitcoin.org/u/ajtowns)\
**Post date:** [February 6, 2025, 2:19am UTC](https://delvingbitcoin.org/t/great-consensus-cleanup-revival/710/69 "2025-02-06T02:19:22Z")

</div>

I think it would be helpful if we could have distinct names for the two limits here – keep “sigop” for signatures that appear in the p2sh, p2wsh and the output scriptPubKey, and use something new for the new limit (“sigchecked”? “legacysig”?)

> [@AntoineP](#):
>
> The number of sigops in a CMS is the number of keys if it’s inferior or equal to 16, and 20 otherwise.

The condition is whether the script is `OP_1` … `OP_16` immediately followed by CMS, versus anything else, not strictly the number of keys. So eg `1 1 ADD CMS` will be treated as 20 sigops, not 2, and `0 0 0 CHECKMULTISIG` also counts as 20 sigops, rather than 0. It also counts CHECK\*SIG opcodes from unexecuted branches, so `IF <P> CHECKSIG ELSE <Q> CHECKSIG ENDIF` counts as 2 sigops while `IF <P> ELSE <Q> ENDIF CHECKSIG` counts as 1.

---

_[View the full topic](https://delvingbitcoin.org/t/great-consensus-cleanup-revival/710)._
