This repository was archived by the owner on Nov 6, 2020. It is now read-only.
This repository was archived by the owner on Nov 6, 2020. It is now read-only.
eth_getWork should not return a work package during warp sync #9193
Closed
Description
I'm running:
- Which Parity version?: 2.0.0
- Which operating system?: Linux
- How installed?: binaries
- Are you fully synchronized?: no
- Which network are you connected to?: ethereum
- Did you try to restart the node?: yes
Actual behavior: During a warp sync the eth_getWork request return a valid work package for block number 1:
curl --data '{"method":"eth_getWork","params":[],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST localhost:8545
{"jsonrpc":"2.0","result":["0x08f56f167ae21b2ee9357af7fec564146dbafab7f83d853950185103c3f4bcca","0x0000000000000000000000000000000000000000000000000000000000000000","0x0000000040080100200400801002004008010020040080100200400801002004","0x1"],"id":1}
Expected behavior: eth_getWork should return an error as long as the node is not fully synced:
curl --data '{"method":"eth_getWork","params":[],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST localhost:8545
{"jsonrpc":"2.0","error":{"code":-32001,"message":"Still syncing."},"id":1}