-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sync stopped at 382452 with error: block contains too many signature operations - got 20001, max 20000 #47
Comments
Built from last code, it gives me the same result. |
I'm seeing this as well. Same block. |
The block in question is from 2015. So it's not choking on a > 1mb block. |
I did see that issue when I synced but it's possible the bug was introduced after I synced. |
Only thing I can think of is maybe it's counting OP_CHECKDATASIG and that pushed it over the limit. But that opcode should have been (and still is) invalid so I don't know why a block would contain it. |
So the code is counting OP_CHECKDATASIG https://github.com/gcash/bchd/blob/master/txscript/script.go#L617 But I don't know how this part of the code is being reached by this block as the block should not contain any OP_CHECKDATASIGs |
I lost my chain data on accident and it's taking forever to resync. @romainPellerin any chance you can send me yours to I can test this OP_CHECKDATASIG theory? |
I can send you mine. But I think you need to copy the data before you test because it will mark the block as invalid and not process it again after that. |
Cool, sounds good. |
So when that block was created the op code was different. Any chance someone spammed the chain with: OP_UNKNOWN186 = 0xba // 186 Then the bytes would match this condition... I think we need to put a guard on this increment based on whether the nov upgrade is active. |
Good call. That definitely needs to be dependent on the fork being active to be correct. |
I'll examine the block when I it to confirm that's the only issue here. |
Oh it's the coinbase input script that contains the offending opcodes. Which is why it's passing validation since the input isn't validated. Not sure why max sig ops is being checked on the coinbase though. |
Looking at the ABC code I think the coinbase input script is counted. They use a flag to decide whether or not to count the CHECKDATASIG. Maybe #51 is the best way to handle it. |
Fixed. |
I am running a bchd node with txindex=1 and addrindex=1 and was syncing it for the past few days, it stopped at block height 382452:
I will go ahead and get the last version of bchd, but is this a none issue @cpacia ?
The text was updated successfully, but these errors were encountered: