What is the program in Python that print information about the current block the world try to mine (I mean Version, Previous Block, Merkle Root, Time, Bits) plus how many zeros we are looking for for the output of the hash!
-
Do you have a need to a parser for file blk?– vincenzopalazzoSep 23, 2019 at 13:02
-
@vincenzopalazzo I don't understand what do you mean!– PrometheusSep 23, 2019 at 15:48
-
What are you looking for? where do you want to get that information from?– vincenzopalazzoSep 23, 2019 at 15:54
-
@vincenzopalazzo I think that I could get them from a library. How do mining programs get these information?– PrometheusSep 23, 2019 at 16:00
-
From the bitcoin RPC Framework– vincenzopalazzoSep 23, 2019 at 16:03
1 Answer
To take the information of the bitcoin blockchain, you can use the bitcoin core RPC Framework, for use it, you must have all blockchain on your computer
- Download Bitcoin core
- aligns the bitcoin node
- Configure rpc framework
- Use the API to take the information, I prefer using this library with python, this is an example for using it
You can use this documentation for study API
also for a response to the last comment, you can use the API for call the Mining commands but is difficult understand your question "I can print information about the block they're mining now" because the mining is a war for the node and each node can have different information
-
Is it oblige to do steps 1 and 2 and 3? Couldn't I use the API directly? Sep 25, 2019 at 22:57
-
What are the names of functions that I can get information with them? Sep 25, 2019 at 22:58