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

Genesis mismatch bug #7428

Closed
2 tasks done
krisbitney opened this issue Feb 3, 2025 · 2 comments
Closed
2 tasks done

Genesis mismatch bug #7428

krisbitney opened this issue Feb 3, 2025 · 2 comments
Labels
I2-bug The node fails to follow expected behavior. I10-unconfirmed Issue might be valid, but it's not yet known.

Comments

@krisbitney
Copy link
Contributor

Is there an existing issue?

  • I have searched the existing issues

Experiencing problems? Have you tried our Stack Exchange first?

  • This is not a support question.

Description of bug

Hi,

I tried asking my question as a support question on the polkadot stackexchange, but I think the issue may be a bug rather than a mistake I am making.

See: https://substrate.stackexchange.com/questions/12187/how-to-overcome-genesis-mismatch

My team and I launched a testnet network built on Substrate. When we launched the testnet, we weren't aware of how chainspecs worked. We didn't realize syncing from the Rust chainspec would break as soon as we pushed an over-the-air runtime upgrade.

New nodes get a "genesis mismatched" error and are unable to sync with the network. I have tried obtaining a chain spec by calling substrate.rpc.syncstate.genSyncSpec on a node that is connected to the network, but the retrieved chain spec does not work. I am under the impression that the retrieved chain spec should work, hence the reason I think this is a bug.

Is this a bug, or is this expected behavior?

This is a huge problem for us. There is no other chain spec JSON file. This is a new network that has received a few patch updates. We don't want to totally reset the testnet. In order to get people to use the testnet and provide feedback, we already incentivized participation with the promise of a future airdrop. Resetting the testnet would reset the records of everyone's usage and upset our community. So we are pretty stuck.

Example of the error:

Report 12D3KooWSLXobU5fj93hM9oY956obg6cV8pYJ4tMdJ4EoekwceWm: -2147483648 to -2147483648. Reason: Genesis mismatch. Banned, disconnecting.

Please consider looking into this. Thank you.

Steps to reproduce

No response

@krisbitney krisbitney added I10-unconfirmed Issue might be valid, but it's not yet known. I2-bug The node fails to follow expected behavior. labels Feb 3, 2025
@bkchr
Copy link
Member

bkchr commented Feb 3, 2025

Not really a bug.

Go back to the exact node version that you used to launch the network. Run your_node build-spec --raw --chain THE_NAME_YOU_USED_TO_LAUNCH_YOUR_CHAIN > chainspec.json.

Then take some other node and run it with your_node --chain PATH/chainspec.json.

@krisbitney
Copy link
Contributor Author

Thank you. You are completely right. I was able to generate a working chain spec using your advice. I am embarrassed to admit how much time I spent researching and experimenting before posting here and getting such a quick response from you. I appreciate your help more than you know! @bkchr

@krisbitney krisbitney closed this as not planned Won't fix, can't repro, duplicate, stale Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I2-bug The node fails to follow expected behavior. I10-unconfirmed Issue might be valid, but it's not yet known.
Projects
None yet
Development

No branches or pull requests

2 participants