Skip to content
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
@peterbitfly

Description

@peterbitfly

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}

Metadata

Metadata

Assignees

No one assigned

    Labels

    F3-annoyance 💩The client behaves within expectations, however this “expected behaviour” itself is at issue.M6-rpcapi 📣RPC API.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions