policy: raise MAX_STANDARD_TX_SIGOPS to 16,000 for Bitcoin Computer - #12
Merged
Conversation
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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
MAX_BLOCK_SIGOPSremains 20,000 (MAX_BLOCK_SIZE / 50)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
wojakcoind/wojakcoin-cli) with this changeRegtest results
Built from branch
raise-max-standard-tx-sigops, ran a local regtest node with-bytespersigop=0so the density rule does not mask the per-tx sigops limit. Crafted 1-in / 1-out txs whosescriptPubKeyisN × OP_CHECKSIG(legacy sigop count = N), signed via wallet, and submitted withsendrawtransaction.Policy limit (
MAX_STANDARD_TX_SIGOPS = 16,000)cd615922…2c053861…9e894d5d…-26 bad-txns-too-many-sigopsAll four cases PASS. The 5,000-sigop case is exactly the class of failure reported against Bitcoin Computer (
bad-txns-too-many-sigopsunder the old 4,000 policy).Consensus still 20k (
MAX_BLOCK_SIGOPSunchanged)Mempool held the three accepted txs (100 + 5,000 + 16,000 = 21,100 sigops total > 20,000 block budget). After
generate 1:So relay/mine policy is raised; block consensus packing still enforces the pre-existing 20,000 ceiling.