New answers tagged

4

I am curious about where the actual hex value of the data that generates that hash with a lot of zeroes is. It is a composite of values from the block - in brief, it is the concatenated binary (represented here in hex notation) little endian value of each of the fields: version + previous_block_hash + merkle_root_hash + time + bits + nonce of the block ...


0

The first 80 bytes of each block are the block header. You can get the block header for a given block hash by using the getblockheader RPC method. You can get the block hash for a given block height by using the getblockhash RPC method.


3

You're missing multiple parts here. If that's your complete code, you don't seem to be adding a nonce to your preimage at all. You will need to generate a nonce, add it to the preimage, and test the corresponding digest against your acceptance criteria. To that end, you probably want to use a while loop that continues rolling random nonces and testing ...


Top 50 recent answers are included