I want to know how through using this library I can print information about the current block that the world mine right now and I mean by that: Version, Previous Block, Merkle Root, Time, Bits, and how many zeros we are looking for for the output of the hash.

2 Answers 2


Unless you're a miner you can't get that info. You can get the information of the last block but in order for the current you would have to mine it yourself and then win to be correct.


With order.

The world mines multiple blocks at once, with only one block chosen by consensus to be kept.

If you want to get some information from bitcoin’s RPC you should consider using your own node.

You can call the RPC method getmininginfo but this command might not return the mining information you are searching for (an example Previous Block is not correct).

With the following information you can have the following problem:

  • Previous Block: The Previous Block is not equal to all networks at the same moment;
  • Merkle Root: Every block can contain different transactions and in a different order

And on your question of how you can use the library python-bitcoinrpc, you can see my Python3 script for one example. you can find the script here

  • Do you mean that there is more than one of these information?!
    – Prometheus
    Dec 5, 2019 at 17:22
  • No, I say, every miner can be mining the different block because the network peer-to-peer doesn't ensure the same information to all nodes. an example you have A, B, C mining nodes, if you create a transaction, the information of transaction can contain only in the C mem-pool and not in the A, B nodes. in conclusion you don't say "What is the block minend now" because the block mined could be more Dec 5, 2019 at 20:26
  • Well, How can I get information about node A for example?!!!
    – Prometheus
    Dec 5, 2019 at 20:48
  • The unique information can you get to the mining is contains inside the command RPC bitcoin form this documentation in the section Mining Dec 5, 2019 at 21:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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