I'm running:
- Parity version: 1.8.0
- Operating system: MacOS
- And installed: git clone something something
I try to run Parity with Ropsten Testnet (via config, just that nothing else).
I download on an external volume to save diskspace (i dont have enough space to download directly).
I already tried this several times, but i couldn't manage to finish the download in one session (slow connection).
Everytime I restart via "cargo run --release" it starts downloading some snapshots, maybe 0-3 more and then it encounters some error like this:
2017-09-11 21:21:49 Stage 5 block verification failed for #50258 (5c4d…eb4d)
Error: Block(InvalidGasUsed(Mismatch { expected: 82410, found: 98892 }))
Usually it trys to download the same snapshot for eternity and won't proceed. This time it threw this:
2017-09-11 21:21:49 Stage 5 block verification failed for #50258 (5c4d…eb4d)
Error: Block(InvalidGasUsed(Mismatch { expected: 82410, found: 98892 }))
2017-09-11 21:21:55 Syncing #50257 5745…df8c 0 blk/s 0 tx/s 0 Mgas/s 0+ 0 Qed #50256 6/25 peers 185 KiB chain 67 MiB db 0 bytes queue 80 KiB sync RPC: 2 conn, 1 req/s, 62 µs
====================
stack backtrace:
Thread 'IO Worker #1' panicked at 'nonce will return Some when given BlockId::Latest. nonce was given BlockId::Latest. Therefore nonce has returned Some; qed', src/libcore/option.rs:819
This is a bug. Please report it at:
https://github.com/paritytech/parity/issues/new
Abort trap: 6
that's why I am posting it here 👍
What's the exact version of your client?
Starting Parity/v1.8.0-unstable-03e039b-20170911/x86_64-macos/rustc1.20.0
In my case I have run into this problem on my private testnet that has been running with mostly "geth" clients for 2 months.
I have tried the following parity versions:
Parity/v1.6.8-beta-c396229-20170608/x86_64-linux-gnu/rustc1.17.0
Parity/v1.7.2-beta-9f47909-20170918/x86_64-linux-gnu/rustc1.19.0
The error:
2017-09-24 22:27:10 UTC Stage 5 block verification failed for #415756 (79ff…3b70)
Error: Block(InvalidGasUsed(Mismatch { expected: 10944, found: 13444 }))
The block in question:
> eth.getBlock(415756, true)
{
difficulty: 1673216,
extraData: "0xd783010600846765746887676f312e382e31856c696e7578",
gasLimit: 4712388,
gasUsed: 10944,
hash: "0x79ff4377b3f696db4da1985c2957df22fbe93cb7fdb65ddc1296ce01339c3b70",
logsBloom: "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
miner: "0xad94486b5005418dbb46a77eb2fd0c8046bfb858",
mixHash: "0x1a23c9443c078ba33254dbabfc2677e4dfdb662e4214859a5fd04e89fe638068",
nonce: "0x2b04e0bf595fc478",
number: 415756,
parentHash: "0xde4d58060904a8645166054774be170b2bcd4b078f6c3431fc2b7334710cc748",
receiptsRoot: "0x8832cf7e048b0fd4d9aa0097d631c07fb8b77064f9e74095d89cf8625fde9245",
sha3Uncles: "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
size: 651,
stateRoot: "0x4ace268313b6ad86e290f1984e0882ede0043b5c85b63c73984b9ac06078f20b",
timestamp: 1506261859,
totalDifficulty: 450539221396,
transactions: [{
blockHash: "0x79ff4377b3f696db4da1985c2957df22fbe93cb7fdb65ddc1296ce01339c3b70",
blockNumber: 415756,
from: "0x6509389cdf535b4652036daf63df63b488e385ce",
gas: 32830,
gasPrice: 21000000000,
hash: "0x2a239cd3dcbd6d9dccf6b1d48e5cd7b6e590072383f2d2e5f1358ff23a26cd1a",
input: "0x41c0e1b5",
nonce: 5,
r: "0x529f9fe89d8f5c67d592b1eeee2d3d52741d0ab2020a9ba9efc8b3594b41df47",
s: "0x9ce1b67014e6bcb9b05b12f39a444ec0f9d1a33a659acf2ad4964650737ab20",
to: "0x977069a679a60cc9981ce569cfb8b7ab707b2023",
transactionIndex: 0,
v: "0x50eaf88",
value: 0
}],
transactionsRoot: "0xe6db10e0f4998ef8c26ae4a07e4a10ed12cc3f84e293606457a107ac209c7612",
uncles: []
}
@edevil might be unrelated.
@ildr3him could you try 1.7.2?
@5chdn I'll open a new issue. Maybe it's a bug.
@ildr3him 2nd issue is #5968
I am getting same error in my private network of 5 authority nodes and 4 normal sync nodes. The error I receive is:
2018-01-22 17:18:09 UTC IO Worker #1 WARN client Stage 5 block verification failed for #126690 (478c?0ba7)
Error: Block(InvalidGasUsed(Mismatch { expected: 23769, found: 500000 }))
I tried folowing steps to avoid this error:
base-path of this normal sync node.But still, it receives the above mentioned error. I don't know why it is not syncing.
If I keep the engine_signer on, then it continues with its own chain.
Can you check what Parity version was used to produce that block? Did you update the chainspec when switching between versions? I think it might be some of the byzantium features enabled by default (or misconfigured in chainspec file).
Can you check what Parity version was used to produce that block?
Yes, the block in question was produced by authority node running v1.8.4
Did you update the chainspec when switching between versions?
No, there has been no change in chain-spec file. All nodes are using same specifications
Out of 5,
3 authority are running: Parity//v1.8.4-beta-c74c8c1-20171211/x86_64-linux-gnu/rustc1.22.1
2 authority are running: Parity//v1.8.5-beta-54bae9a-20171228/x86_64-linux-gnu/rustc1.22.1
One of the authority running v1.8.5 has gone out of sync.
My chain-spec file is here.
I followed these steps in attempt to solve the problem:
parity --config config.toml db kill# before them.The sync stops at problematic block and stays there with an error message:
WARN client Stage 5 block verification failed for #126690 (478c?0ba7)
To avoid this error:
Error: Block(InvalidGasUsed(Mismatch
I copied data from chains directory of one correctly synced server to the server which was giving this error while syncing. So now, I have my all authority nodes correctly synced.
I am still unable to find root cause of this error which keeps arising after about ten to twelve hours.
2018-01-29 22:24:25 UTC IO Worker #2 WARN client Stage 5 block verification failed for #126690 (478c?0ba7)
Error: Block(InvalidGasUsed(Mismatch { expected: 23769, found: 500000 }))
I was able to correct those errors after I included most of the EIPs mentioned in mainnet genesis. My new genesis has following parameters and it works without those errors.
"params": {
"gasLimitBoundDivisor": "0x400",
"maximumExtraDataSize": "0x20",
"minGasLimit": "0x1388",
"networkID" : "0x1EB372",
"eip155Transition": 0,
"validateChainIdTransition": 0,
"eip140Transition": 0,
"eip211Transition": 0,
"eip214Transition": 0,
"eip658Transition": 0
},
That's good to know. I also want to implement a PoA blockchain for a project and was thinking of using parity. Please report back if you find more problems. :)