What is Bitcoin's "genesis hash"?

2

From Lightning Network documentation:

Used in several of the BOLT documents to denote the genesis hash of a target blockchain. This allows nodes to create and reference channels on several blockchains. Nodes are to ignore any messages that reference a chain_hash that are unknown to them. Unlike bitcoin-cli, the hash is not reversed but is used directly.

For the main chain Bitcoin blockchain, the chain_hash value MUST be (encoded in hex): 6fe28c0ab6f1b372c1a6a246ae63f74f931e8365e15a089c68d6190000000000.

However this wiki entry about Bitcoin's genesis block has

GetHash() = 0x000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f

Indeed, inputting the latter value into blockchain.info yields Block 0, while the former value cannot be found on blockchain.info.

Why does the value 6fe28c0ab6f1b372c1a6a246ae63f74f931e8365e15a089c68d6190000000000 appear in Lightning Network as "Bitcoin's genesis hash"?

ripper234

Posted 2018-04-25T15:49:40.340

Reputation: 25 852

Answers

8

They're exactly the same number; one is written in little endian notation and the other is big endian. Notice that the bytes (two-hex-digit pairs) are exactly reversed from one to the other.

Block explorers like blockchain.info usually expect big-endian for block hashes. The proof-of-work requirement means that the most significant bits have to be zero, so big endian makes it easier to see this.

Nate Eldredge

Posted 2018-04-25T15:49:40.340

Reputation: 22 182

1

It is the same hash but reversed since bitcoin transmits data using little endian format (most significant byte last)

Mike D

Posted 2018-04-25T15:49:40.340

Reputation: 2 066