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 between plain/raw specs #1029

Open
ales-otf opened this issue Nov 27, 2024 · 0 comments
Open

Genesis mismatch between plain/raw specs #1029

ales-otf opened this issue Nov 27, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@ales-otf
Copy link
Contributor

Describe the bug

The genesis for plain spec variants is different from the genesis from raw spec. This is caused by issue in the script updating the chainspecs: while it kept genesis for raw specs unchanged, it haven't been handling it for plain specs. The script was just rewriting the plain specs. This issue is fixed in this PR. But our plain specs are invalid now.

To Reproduce

  1. Generate a raw spec from a plain one ./target/debug/node-subtensor build-spec --chain plain_spec_finney.json --raw >raw_finney_2.json
  2. Compare the specs using the diff tool diff raw_spec_finney.json raw_finney_2.json

The diff log for reference: diff.txt.

Expected behavior

The genesis should not be changed otherwise you can't connect to the network with the chain spec.

Screenshots

No response

Environment

macOS

Additional context

Plain specs are human-readable chain specs, which are used to generate raw specs. We could restore a plain spec by finding the point, where the last change to raw spec happened. At that point we could generate the matching plain spec.

@ales-otf ales-otf added the bug Something isn't working label Nov 27, 2024
@ales-otf ales-otf self-assigned this Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant