transactions with more than MAX_SIGOPS sigops #747

gavinandresen opened this Issue Jan 6, 2012 · 6 comments


None yet
5 participants

gavinandresen commented Jan 6, 2012

Transactions with more than MAX_SIGOPS sigops should not be added to the memory pool, because they can (obviously) never make it into a block.

Probably a good idea to DoS-disconnect clients who send you such transactions, too....

Thanks to makomk for finding this on testnet. This would only be an issue on main-net if you were relaying/mining non-standard transactions or running an updated git HEAD or OP_EVAL backport which defines CHECKMULTISIG as a standard transaction type.


ashleyholman commented May 11, 2014

I thought I would take a look at some old bugs - this one being 2 years old now.

To test this, I need to make a valid transaction with >20,000 sigops (MAX_BLOCK_SIGOPS). Anyone got any pointers on how I could do that?


sipa commented May 11, 2014

OP_CHECKMULTISIG can count as up to 20 sigops.


sipa commented May 11, 2014

See #4150 by the way.


ashleyholman commented May 11, 2014

The code in that thread does appear to fix this exact issue. The only difference is that it introduces a tighter limit of MAX_BLOCK_SIGOPS / 5 per tx. If that one gets merged, I guess this should be closed off.


petertodd commented May 11, 2014

@ashleyholman You can test it with this: The default settings make >20,000 sigops transactions.

Be warned that my test program will likely take all your Bitcoins, cause your wife to leave you, and shoot your dog. (though your resulting country music career may be successful)


laanwj commented Sep 25, 2014

#4150 was merged, closing

laanwj closed this Sep 25, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment