transactions with more than MAX_SIGOPS sigops #747

Closed
gavinandresen opened this Issue Jan 6, 2012 · 6 comments

Comments

Projects
None yet
5 participants
Contributor

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.

Contributor

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?

Owner

sipa commented May 11, 2014

OP_CHECKMULTISIG can count as up to 20 sigops.

Owner

sipa commented May 11, 2014

See #4150 by the way.

Contributor

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.

Member

petertodd commented May 11, 2014

@ashleyholman You can test it with this: https://github.com/petertodd/tx-flood-attack 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)

Owner

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