<p>Yes, regtest always uses the same genesis block. It is hardecoded into the software. The parameters that regtest can take are for soft fork deployment so that they can be tested.</p>

CC BY-SA 4.0
2024-04-24T19:14:01.070Z
2024-04-24T19:14:01.070Z
Ava Chow
<p>You might be looking at the wrong place. The line that defines the regtest genesis block is <a href="https://github.com/bitcoin/bitcoin/blob/v27.0/src/kernel/chainparams.cpp#L476" rel="nofollow noreferrer">here</a>.</p>

CC BY-SA 4.0
2024-04-24T19:15:16.727Z
2024-04-24T19:15:16.727Z
Vojtěch Strnad
<p>I would like to know if we have two nodes that are each running the regtest network will the genesis block digest be the same for the nodes or not?  I ask because I notice in chainparams.cpp that regtest takes params whereas mainnet and testnet do not.</p>
<p>If not, how should apps like block explorers deal with this?    It seems they could not know the regtest genesis hash in advance, and might have to query it from a full node based on block height or something.   Is that correct?</p>

<regtest><genesis-block>
Is the Regtest genesis hash always the same or not?
user49396
# Is the Regtest genesis hash always the same or not?

(Asked by: username_0 on 2024-04-24)

I would like to know if we have two nodes that are each running the regtest network will the genesis block digest be the same for the nodes or not? I ask because I notice in chainparams.cpp that regtest takes params whereas mainnet and testnet do not.

If not, how should apps like block explorers deal with this? It seems they could not know the regtest genesis hash in advance, and might have to query it from a full node based on block height or something. Is that correct?

**Tags:** regtest, genesis-block


---

## 2 answers

### Answer by username_1 on 2024-04-24. Score: 2

Yes, regtest always uses the same genesis block. It is hardecoded into the software. The parameters that regtest can take are for soft fork deployment so that they can be tested.


---

### Answer by username_2 on 2024-04-24. Score: 1

You might be looking at the wrong place. The line that defines the regtest genesis block is [here](https://github.com/bitcoin/bitcoin/blob/v27.0/src/kernel/chainparams.cpp#L476).


---

