When i use eth_getWork, i get only 3 parameters:

DATA, 32 Bytes - current block header pow-hash
DATA, 32 Bytes - the seed hash used for the DAG.
DATA, 32 Bytes - the boundary condition ("target"), 2^256 / difficulty.

How can I calculate curent block number? I need this for generate dag file and get ca


1 Answer 1


You can just use eth_blockNumber

  • no, i can`t use this command unsuported in mining. Only eth_getWork and eth_submitWork Jun 23, 2016 at 10:49
  • 1
    @TarasEndick maybe edit your question and add some more details why you are limited to these calls.
    – q9f
    Jun 24, 2016 at 9:07
  • I'm writing a miner , which connects to the pool. And the pool does not recognize such a command eth_blockNumber. For mining need only eth_getWork and eth_submitWork. I can not understand how I get the number of the block using only these commands . Jun 24, 2016 at 12:54
  • @TarasEndick my understanding of the distributed nature of ethereum is that the concept of "current block" is local to each node. Your node can have one "current block" and another node can have different "current block" it is only after the network has synchronized and a sufficient number of confirmations have accumulated that any particular block has any real validity, and that can only be verified from the data you have on your own node, therefore there is no point in supporting a remote api call to other nodes asking what the "current block number" is. Jan 18, 2019 at 22:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.