<p>I know this is late but I hope someone will find this helpful in the future. After hours of troubleshooting I found out that using the command line and using wget or curl on the url <a href="https://hydra.iohk.io/build/13695229/download/1/testnet-config.json" rel="nofollow noreferrer">http://hydra.iohk.io/build/7370192/download/1/</a>
inside the directory your working with will download the config and genesis files with the correct hash. Hope this helps, Cheers.</p>
<p>eg:</p>
<pre><code>wget https://hydra.iohk.io/build/13695229/download/1/testnet-config.json
wget https://hydra.iohk.io/build/13695229/download/1/testnet-byron-genesis.json
wget https://hydra.iohk.io/build/13695229/download/1/testnet-shelley-genesis.json
etc..
</code></pre>

CC BY-SA 4.0
2022-06-16T17:23:29.780Z
2022-06-16T17:23:29.780Z
DoubleThirty
<p>The main config (mainnet-config or testnet-config) file contains the hash of the related genesis files:</p>
<pre><code>  &quot;AlonzoGenesisFile&quot;: &quot;mainnet-alonzo-genesis.json&quot;,
  &quot;AlonzoGenesisHash&quot;: &quot;7e94a15f55d1e82d10f09203fa1d40f8eede58fd8066542cf6566008068ed874&quot;,
...
  &quot;ByronGenesisFile&quot;: &quot;mainnet-byron-genesis.json&quot;,
  &quot;ByronGenesisHash&quot;: &quot;5f20df933584822601f9e3f8c024eb5eb252fe8cefb24d1317dc3d432e940ebb&quot;,
...
  &quot;ShelleyGenesisFile&quot;: &quot;mainnet-shelley-genesis.json&quot;,
  &quot;ShelleyGenesisHash&quot;: &quot;1a3be38bcbb7911969283716ad7aa550250226b76a61fc51cc9a9a35d9276d81&quot;,
</code></pre>
<p>This is to ensure that all the configurations are in sync.</p>
<p>It might have happenned that you either edited the shelley-genesis or that one is coming from a different batch of config files, and you've just updated the main one without updating the genesis files.</p>
<p>You could try downloading all config files from the same hydra build so that the hashes are correct, or edit the config file accordingly to contain your genesis file hashes, or delete that line <code>ShelleyGenesisHash</code> if you want to skip the hash checks (not recommended)</p>

CC BY-SA 4.0
2021-11-17T22:17:00.597Z
2021-11-17T22:17:00.597Z
andycandy
<p>You have to make sure that your mainnet-shelley-genesis.json is exactly the one you downloaded from there. Adding even a single newline at the end of the file will change the hash. Opening it in an editor might do this, even if you do not change it yourself.</p>

CC BY-SA 4.0
2021-12-22T07:38:41.207Z
2021-12-22T07:38:41.207Z
George - APEX Stake Pool
<p>i have a problem when running cardano-node 1.31.0 mainnet on an ec2 linux pn aws</p>
<p>I become the following error:
<em><strong>Shelley related: Wrong genesis file: the actual hash is &quot;dec31b6d760b1ee8dc82d66eaa92fd492891f17db2565b666c43490a6cde72ab&quot;, but the expected genesis hash given in the node configuration file is &quot;1a3be38bcbb7911969283716ad7aa550250226b76a61fc51cc9a9a35d9276d81&quot;</strong></em></p>
<p>I have tried the config files from the latest recommended build <strong>8111119</strong> and from the build mentioned in the official tutorial <strong>7370192</strong> but it doesn't work.</p>
<p><a href="http://hydra.iohk.io/build/8111119/download/1/." rel="nofollow noreferrer">http://hydra.iohk.io/build/8111119/download/1/.</a>.
<a href="http://hydra.iohk.io/build/7370192/download/1/." rel="nofollow noreferrer">http://hydra.iohk.io/build/7370192/download/1/.</a>.</p>
<p>Which cardano node version is recommended to run on the mainnet on linux actually? And which config files should be run with it to be compatible?</p>
<p>Thanks a lot</p>

CC BY-SA 4.0
2021-11-17T17:29:53.113Z
Is it related to this question? https://cardano.stackexchange.com/questions/4567/problem-when-running-cardano-node-on-aws If not, can you please update your question including the command you are using.
georgeos
<cardano-node>
Shelley related: Wrong genesis file - cardano-node 1.31.0 - linux-x86_64 - ghc-8.10
# Shelley related: Wrong genesis file - cardano-node 1.31.0 - linux-x86_64 - ghc-8.10

(Asked by: username_0 on 2021-11-17)

i have a problem when running cardano-node 1.31.0 mainnet on an ec2 linux pn aws

I become the following error:
***Shelley related: Wrong genesis file: the actual hash is "dec31b6d760b1ee8dc82d66eaa92fd492891f17db2565b666c43490a6cde72ab", but the expected genesis hash given in the node configuration file is "1a3be38bcbb7911969283716ad7aa550250226b76a61fc51cc9a9a35d9276d81"***

I have tried the config files from the latest recommended build **8111119** and from the build mentioned in the official tutorial **7370192** but it doesn't work.

<http://hydra.iohk.io/build/8111119/download/1/.>.
<http://hydra.iohk.io/build/7370192/download/1/.>.

Which cardano node version is recommended to run on the mainnet on linux actually? And which config files should be run with it to be compatible?

Thanks a lot

**Tags:** cardano-node
> **Comments:**
> **username_1**: Is it related to this question? https://cardano.stackexchange.com/questions/4567/problem-when-running-cardano-node-on-aws If not, can you please update your question including the command you are using.  

---

## 3 answers

### Answer by username_2 on 2022-06-16. Score: 0

I know this is late but I hope someone will find this helpful in the future. After hours of troubleshooting I found out that using the command line and using wget or curl on the url http://hydra.iohk.io/build/7370192/download/1/
inside the directory your working with will download the config and genesis files with the correct hash. Hope this helps, Cheers.
eg:
wget https://hydra.iohk.io/build/13695229/download/1/testnet-config.json
wget https://hydra.iohk.io/build/13695229/download/1/testnet-byron-genesis.json
wget https://hydra.iohk.io/build/13695229/download/1/testnet-shelley-genesis.json
etc..


---

### Answer by username_3 on 2021-11-17. Score: 0

The main config (mainnet-config or testnet-config) file contains the hash of the related genesis files:
  "AlonzoGenesisFile": "mainnet-alonzo-genesis.json",
  "AlonzoGenesisHash": "7e94a15f55d1e82d10f09203fa1d40f8eede58fd8066542cf6566008068ed874",
...
  "ByronGenesisFile": "mainnet-byron-genesis.json",
  "ByronGenesisHash": "5f20df933584822601f9e3f8c024eb5eb252fe8cefb24d1317dc3d432e940ebb",
...
  "ShelleyGenesisFile": "mainnet-shelley-genesis.json",
  "ShelleyGenesisHash": "1a3be38bcbb7911969283716ad7aa550250226b76a61fc51cc9a9a35d9276d81",

This is to ensure that all the configurations are in sync.
It might have happenned that you either edited the shelley-genesis or that one is coming from a different batch of config files, and you've just updated the main one without updating the genesis files.
You could try downloading all config files from the same hydra build so that the hashes are correct, or edit the config file accordingly to contain your genesis file hashes, or delete that line ShelleyGenesisHash if you want to skip the hash checks (not recommended)


---

### Answer by username_4 on 2021-12-22. Score: 0

You have to make sure that your mainnet-shelley-genesis.json is exactly the one you downloaded from there. Adding even a single newline at the end of the file will change the hash. Opening it in an editor might do this, even if you do not change it yourself.


---

