How to decode the block hash?

0

I got the block hash from zmq.

00000000000000000045c639280aee532c5b12b03c80bfdec7aae674fd8246e0

I want to decode the above block hash. Could anyone tell me how to decode the above block hash?

merklexy

Posted 2018-04-16T06:36:57.790

Reputation: 87

Answers

3

What do you mean by "decode"?

A hash algorithm is a one-way function.

The hash-function takes some block header information (timestamp, nonce, a hash of all transactions) and returns such a hexadecimal value. There is no way to "decode" such a hash.

Its reason is just to identify a unique block (and deciding wheather someone gets the block reward or not). There are no other information stored in 00000000000000000045c639280aee532c5b12b03c80bfdec7aae674fd8246e0


But if you have the blockchain on your PC or if you enter the block hash at a block explorer, you can get information about that specific block: https://blockchain.info/block-index/1696955/00000000000000000045c639280aee532c5b12b03c80bfdec7aae674fd8246e0

ndsvw

Posted 2018-04-16T06:36:57.790

Reputation: 1 947

2

I believe what merklexy wanted to know is how to get information about the block. And the answer is, you cannot get details about the block from its hash. If you have access to the bitcoin command line interface (bitcoin-cli) then you can simply execute

bitcoin-cli getblock 00000000000000000045c639280aee532c5b12b03c80bfdec7aae674fd8246e0

Tobias Koller

Posted 2018-04-16T06:36:57.790

Reputation: 21