Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Same ChainSpec generates different genesis hash from different versions #6683

Open
nazarhussain opened this issue Feb 10, 2024 · 0 comments
Open

Comments

@nazarhussain
Copy link

Description
I am using a particular ChainSpec configuration to run a test network to be utilized in simulation testing for the https://github.com/ChainSafe/lodestar/. We had been using an older version of the Nethermind and recently tried to upgrade. I observed that with the same ChainSpec file we have (attached), upgrading Nethermind generates different Genesis Hash, while it's the same after upgrading the Geth.

I also observed that behavior started from Nethermind 1.19.x and utpto the recent version.

Steps to Reproduce

  • Run the different versions of Nethermind in docker.

Actual behavior

docker run --rm -v .:/data nethermind/nethermind:1.19.1 --Init.ChainSpecPath /data/chain.json --config none --JsonRpc.EngineHost 0.0.0.0 --JsonRpc.EnginePort 8456 --log DEBUG

======================== Nethermind initialization completed ========================
This node    : enode://f9e2da80032478b8b93a9c17ac8567655739cec4eb55f3f3f8b7240832f41e2a4e40c7d34a0bae2ea629cce5fb5fc92c2992ade96c88fb7ea19782e9344b3730@89.245.211.118:30303
RPC modules  : 
Node address : 0xff6265bfbd5b8a48d199d21ca5b3f0f80fddfb25 (do not use as an account)
Mem est tx   :     82MB
Mem est DB   :      0MB
JSON RPC     : http://127.0.0.1:8545 ; http://0.0.0.0:8456
Genesis hash : 0xf38ae76089af72208e7361435c0c71c5b2a0929679472e620828a426f677793f
External IP  : 89.245.211.118
Ethereum     : tcp://89.245.211.118:30303
Discovery    : udp://89.245.211.118:30303
Client id    : Nethermind/v1.19.1+6fa13930/linux-x64/dotnet7.0.5
Chainspec    : /data/chain.json
Chain head   : 0
Chain ID     : 1234
===================================================================================== 

and with older version

docker run --rm -v .:/data nethermind/nethermind:1.18.2 --Init.ChainSpecPath /data/chain.json --config none --JsonRpc.EngineHost 0.0.0.0 --JsonRpc.EnginePort 8456 --log DEBUG 

======================== Nethermind initialization completed ========================
This node    : enode://f2f63a064b540bc1acdd7e63c611a0760bf199c84e92d3701b20cd8b1d33aef0dd7a76fef359077c1a5692988a2924de4e3419980aaca6207e11fbe66edef733@89.245.211.118:30303
RPC modules  : 
Node address : 0x3db69616cd7d93d68c941612417d69441afbcde9 (do not use as an account)
Mem est tx   :     82MB
Mem est DB   :      0MB
JSON RPC     : http://127.0.0.1:8545 ; http://0.0.0.0:8456
Genesis hash : 0x746996dc37bad2b0748c25dbd812c4ee69590fc3d46c47a8aa47e5e563de73a6
External IP  : 89.245.211.118
Ethereum     : tcp://89.245.211.118:30303
Discovery    : udp://89.245.211.118:30303
Client id    : Nethermind/v1.18.2+22c00906/linux-x64/dotnet7.0.5
Chainspec    : /data/chain.json
Chain head   : 0
Chain ID     : 1234
===================================================================================== 

Notice how the Genesis Hash is different. As per the Geth we are running the later with 1.18.x is the correct genesis hash.

Expected behavior

With same chain spec and genesis configuration, there should be same genesis hash produced.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant