Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: arbonino on March 21, 2020, 02:24:05 AM



Title: Missing Block Header stats from Slushpool
Post by: arbonino on March 21, 2020, 02:24:05 AM
Hi, I want to know where I can find the block header stats (version, previous hash, merkle root, timestamp, nbits, nonce) in the Slushpool page. I read the API Guide here https://slushpool.com/help/api/ but it doesnīt show the stats I need to request from the page. Thanks.


Title: Re: Missing Block Header stats from Slushpool
Post by: nc50lc on March 21, 2020, 04:36:12 AM
Do you have a fully synced full node?
If you have, you can get the info yourself using the console/rpc through: getbestblockhash, then getblockheader "block_hash" commands.

You can also use https://chainquery.com/bitcoin-cli/getbestblockhash (https://chainquery.com/bitcoin-cli/getbestblockhash) and https://chainquery.com/bitcoin-cli/getblockheader (https://chainquery.com/bitcoin-cli/getblockheader) to do the same.

Why SlushPool in particular?


Title: Re: Missing Block Header stats from Slushpool
Post by: ABCbits on March 21, 2020, 05:40:40 AM
If you only need to get all block header (not specific ), then all you need to do is follow @nc50lc suggestion. There are alternative besides using Bitcoin Core or https://chainquery.com (https://chainquery.com), such as https://www.blockcypher.com/ (https://www.blockcypher.com/).

But if you need to get header of specific block (which comes from SlushPool API), first you need to get list of block height returned by SlushPool, then use another API to obtain header of the block.


Title: Re: Missing Block Header stats from Slushpool
Post by: arbonino on March 25, 2020, 09:54:17 PM
Do you have a fully synced full node?
If you have, you can get the info yourself using the console/rpc through: getbestblockhash, then getblockheader "block_hash" commands.

You can also use https://chainquery.com/bitcoin-cli/getbestblockhash (https://chainquery.com/bitcoin-cli/getbestblockhash) and https://chainquery.com/bitcoin-cli/getblockheader (https://chainquery.com/bitcoin-cli/getblockheader) to do the same.

Why SlushPool in particular?

Thanks for the replies. I donīt have a full synced node. I donīt know where to execute the commands of the chainquery page, in the console? Do i have to download something to make it work? Slushpool because I want to make a miner using an altera FPGA with a Raspberry Pi 4. My plan is to gather said parameters with the Raspberry and use it only as a communication device (the FPGA would do all the mining). But I donīt know how to request the block header information from the Slushpool page from the Raspberry to give it to the FPGA. The FPGA would mine the block, return the proof of work to the RPi and the RPi would submit said proof to the Slushpool page. I donīt know if I am missing something. The other way would be to request the block header information from the blockchain page, pass it to the FPGA, then the FPGA would return the proof to the RPi and the RPi would submit the proof to the Slushpool page, however I canīt find in which part (code, section) I have to submit this informaion on the Slushpool page. Would this way be more correct?