Joystream / substrate-node-joystream

Joystream Full Node
https://www.joystream.org
GNU General Public License v3.0
15 stars 16 forks source link

`build-spec` with `--raw` fails calculates checksum incorrectly. #75

Closed bwhm closed 4 years ago

bwhm commented 5 years ago

When building a --raw chainspec, the joystream node calculate the checksum for edwards incorrectly. Note that as far as I can tell, it only matters for the session (authority) key.

How to reproduce: (Only tested with v1.0.0 on mac)

$ ./joystream-node build-spec --chain=staging > /path/to/chainspec-test.json

Open chainspec-test.json, find 5EMFiDWoXRjhKdtYV8A1RN7DCWwYuiyaTYWZTa9vyUpYRSif (it occurs three times.)

Without revealing the seed or pubkey, the "invalidaty" of the address can be shown by trying to add it to your address book in pioneer. Replace one or more occurrences with the "correct" address: 5EMFiDWoXRjhKdtYV8A1RN7DCWwYuiyaTYWZTa9vyUpYRUFL

Then:

$ ./joystream-node build-spec --chain /path/to/chainspec-test.json --raw > /path/to/chainspec-raw.json

Building chain spec
Error: Error parsing spec file: InvalidChecksum at line 25 column 9
mnaamani commented 4 years ago

With updated version of substrate this is no longer an issue. Closing.