IntersectMBO / cardano-node

The core component that is used to participate in a Cardano decentralised blockchain.
https://cardano.org
Apache License 2.0
3.06k stars 720 forks source link

[BUG] - The latest configuration file, "conway-genesis.json", reports an error in v8.1.1. #5569

Open Albert-Youngg opened 10 months ago

Albert-Youngg commented 10 months ago

Summary The latest configuration file, "conway-genesis.json", reports an error in v8.1.1.

I downloaded the configuration file from here. curl -O -J https://book.world.dev.cardano.org/environments/mainnet/config.json curl -O -J https://book.world.dev.cardano.org/environments/mainnet/db-sync-config.json curl -O -J https://book.world.dev.cardano.org/environments/mainnet/submit-api-config.json curl -O -J https://book.world.dev.cardano.org/environments/mainnet/topology.json curl -O -J https://book.world.dev.cardano.org/environments/mainnet/byron-genesis.json curl -O -J https://book.world.dev.cardano.org/environments/mainnet/shelley-genesis.json curl -O -J https://book.world.dev.cardano.org/environments/mainnet/alonzo-genesis.json curl -O -J https://book.world.dev.cardano.org/environments/mainnet/conway-genesis.json

However, an error occurred while using cardano-node v8.1.1, causing it to fail to start.

image

Completion of the proposal: Conway related : There was an error parsing the genesis file: /ada/config/conway-genesis.json Error: "Error in $: key \"genDelegs\" not found"

gituser commented 9 months ago

I have the same issue with cardano-node v8.1.2 and latest cardano-wallet.

Is there anyone who could look into this?

@Albert-Youngg EDIT: here is a fix:

Change your config.json conway section to this:

...
"ConwayGenesisFile": "conway-genesis.json",
"ConwayGenesisHash": "f28f1c1280ea0d32f8cd3143e268650d6c1a8e221522ce4a7d20d62fc09783e1",
...

and put into conway-genesis.json:

{
  "genDelegs": {}
}
zhy827827 commented 9 months ago

I have the same problem. I modified the configuration file according to the above method, but the error reported

Conway related : Wrong genesis file: the actual hash is "f7d46bdd3b3c8caf38351c4eef3346a89241707270be0d6106e8a407db294cc6", but the expected genesis hash given in the node configuration file is "f28f1c1280ea0d32f8cd3143e268650d6c1a8e221522ce4a7d20d62fc09783e1"
smelc commented 9 months ago

@zhy827827> in your config.json file, you currently have:

  "ConwayGenesisHash": "f28f1c1280ea0d32f8cd3143e268650d6c1a8e221522ce4a7d20d62fc09783e1",

but it needs to be:

  "ConwayGenesisHash": "f7d46bdd3b3c8caf38351c4eef3346a89241707270be0d6106e8a407db294cc6",

That's because you modified the Conway genesis file, and so its hash changed (the hash is kind of a zipped summary of the file). You must reflect this change in the config.json file, to acknowledge the change.

AdmiralOOM commented 8 months ago

After fixing the GenDelegs, it still throws error. Conway related : There was an error parsing the genesis file: /cardano/preview/config/conway-genesis.json Error: "Error in $: endOfInput"

Thunfeld commented 8 months ago

After fixing the GenDelegs, it still throws error. Conway related : There was an error parsing the genesis file: /cardano/preview/config/conway-genesis.json Error: "Error in $: endOfInput"

Yes i have the same problem, tried some stuff to fix it but nothing worked.

smelc commented 8 months ago

@AdmiralOOM, @Thunfeld> can you post your set of config files that trigger this error? So that we can try reproducing it.

RdeWilde commented 8 months ago

This also happens in 8.1.2 on mainnet. Any update as this is a blocking production issue?

I guess it happens because it is re-using Shelley's genesis read function? https://github.com/IntersectMBO/cardano-node/blob/03fb7f78f8d8cffd3ea2151791dd8771184a52ae/cardano-node/src/Cardano/Node/Protocol/Conway.hs#L24

Thunfeld commented 8 months ago

@smelc I think that it has nothing to with te config.json file.
because everthing is right in this file but there is somthing wrong in the cardano-node dir. I installed cardano-node --version 8.7.3 but for some reason it installed 8.7.1 this could be the issue. also i was not able to upgrade from this version so i had to remove the hole dir. What i dit to fix it:

rm -r cardano-node

and

rm -r mainnet

Maybe you can get away without removing the db dir but im not sure about this.

git fetch --all --recurse-submodules --tags
git tag | sort -V
git checkout tags/8.7.3

so after a clean install everything worked again. make sure to check the installed version afterwards.

cardano-node --version
albert-kevin commented 7 months ago

the config files are flawed, you can fix this by using the correct config files downloaded from here https://book.world.dev.cardano.org/environments instead of github

for example: base_url="https://book.world.dev.cardano.org/environments" network="preview" curl -O -J $base_url/$network/config.json curl -O -J $base_url/$network/db-sync-config.json curl -O -J $base_url/$network/submit-api-config.json curl -O -J $base_url/$network/topology.json curl -O -J $base_url/$network/byron-genesis.json curl -O -J $base_url/$network/shelley-genesis.json curl -O -J $base_url/$network/alonzo-genesis.json curl -O -J $base_url/$network/conway-genesis.json

gulla0 commented 1 day ago

the config files are flawed, you can fix this by using the correct config files downloaded from here https://book.world.dev.cardano.org/environments instead of github

for example: base_url="https://book.world.dev.cardano.org/environments" network="preview" curl -O -J $base_url/$network/config.json curl -O -J $base_url/$network/db-sync-config.json curl -O -J $base_url/$network/submit-api-config.json curl -O -J $base_url/$network/topology.json curl -O -J $base_url/$network/byron-genesis.json curl -O -J $base_url/$network/shelley-genesis.json curl -O -J $base_url/$network/alonzo-genesis.json curl -O -J $base_url/$network/conway-genesis.json

Hey Kevin, that worked for me. TY!