Skip to content

policy: raise MAX_STANDARD_TX_SIGOPS to 16,000 for Bitcoin Computer - #12

Merged
senasgr-eth merged 1 commit into
mainfrom
raise-max-standard-tx-sigops
Jul 28, 2026
Merged

policy: raise MAX_STANDARD_TX_SIGOPS to 16,000 for Bitcoin Computer#12
senasgr-eth merged 1 commit into
mainfrom
raise-max-standard-tx-sigops

Conversation

@reallyshadydev

@reallyshadydev reallyshadydev commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

Summary

Raises the per-transaction policy sigops limit from 4,000 to 16,000 so Bitcoin Computer (and similar) transactions are no longer rejected with bad-txns-too-many-sigops.

Scope

  • Policy only — no consensus change
  • MAX_BLOCK_SIGOPS remains 20,000 (MAX_BLOCK_SIZE / 50)
  • Older nodes stay more restrictive on relay; they do not fork

Context

Requested while integrating WOJAK into Bitcoin Computer:
bitcoin-computer/monorepo#456 (comment)

As noted there, the 4,000 limit is standardness, not consensus. Raising it is enough to relay a few BC transactions per block without a hard fork. Matches Bitcoin’s MAX_STANDARD_TX_SIGOPS_COST (16,000).

Test plan

  • Build node (wojakcoind / wojakcoin-cli) with this change
  • On regtest, broadcast high-sigop txs that would fail under the old 4,000 limit
  • Confirm acceptance into mempool / rejection above 16,000
  • Confirm block packing still respects unchanged 20,000 consensus limit

Regtest results

Built from branch raise-max-standard-tx-sigops, ran a local regtest node with -bytespersigop=0 so the density rule does not mask the per-tx sigops limit. Crafted 1-in / 1-out txs whose scriptPubKey is N × OP_CHECKSIG (legacy sigop count = N), signed via wallet, and submitted with sendrawtransaction.

Policy limit (MAX_STANDARD_TX_SIGOPS = 16,000)

Sigops Expected Result
100 (under old 4k) accept ACCEPTED cd615922…
5,000 (over old 4k, under 16k) accept ACCEPTED 2c053861…
16,000 (= new max) accept ACCEPTED 9e894d5d…
16,001 (over new max) reject REJECTED -26 bad-txns-too-many-sigops

All four cases PASS. The 5,000-sigop case is exactly the class of failure reported against Bitcoin Computer (bad-txns-too-many-sigops under the old 4,000 policy).

Consensus still 20k (MAX_BLOCK_SIGOPS unchanged)

Mempool held the three accepted txs (100 + 5,000 + 16,000 = 21,100 sigops total > 20,000 block budget). After generate 1:

  • Block included: coinbase + 100-sigop + 5,000-sigop txs
  • Left in mempool: 16,000-sigop tx (would exceed block sigops with the others)

So relay/mine policy is raised; block consensus packing still enforces the pre-existing 20,000 ceiling.

Policy/standardness only — no consensus change. Older nodes remain more
restrictive on relay and do not fork.

Unblocks Bitcoin Computer (and similar metaprotocol) transactions that
were rejected with bad-txns-too-many-sigops under the pre-SegWit 4,000
per-tx limit. Matches Bitcoin's MAX_STANDARD_TX_SIGOPS_COST while leaving
MAX_BLOCK_SIGOPS at 20,000.

Refs: bitcoin-computer/monorepo#456 (ltardivo)
@senasgr-eth
senasgr-eth merged commit 31b3339 into main Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants