Skip to content

Genesis mismatch between plain/raw specs #1029

Open
@ales-otf

Description

@ales-otf

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.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions