Very concretely, this PR solves the bug that the node could not be run without any arguments without crashing. The problem was that the chain spec in spec.json had, at some point been changed from a raw spec to a plain one.
$ ./target/release/academy-pow
Error: Service(Client(Storage("Error parsing embedded file: invalid length 48, expected a (both 0x-prefixed or not) hex string with length of 40 at line 22 column 62")))
The point of raw chain specs is to make sure that all nodes trying to join a network have the exact same spec. They cannot each generate them because there is some non-determinism in the process. Further, the point of "baking" a spec into the node binary (with include_bytes!) is so that users can easily access popular public networks. We currently do this with one spec that will allow students to easily connect to our class-wide network.
We don't want to ever check in plain (non-raw) specs.
One casualty in the current setup is custom BuildSpecCmd. @fbielejec I have some questions about your intention with that command. See below for details in context.
Very concretely, this PR solves the bug that the node could not be run without any arguments without crashing. The problem was that the chain spec in
spec.json
had, at some point been changed from a raw spec to a plain one.The point of raw chain specs is to make sure that all nodes trying to join a network have the exact same spec. They cannot each generate them because there is some non-determinism in the process. Further, the point of "baking" a spec into the node binary (with
include_bytes!
) is so that users can easily access popular public networks. We currently do this with one spec that will allow students to easily connect to our class-wide network.We don't want to ever check in plain (non-raw) specs.
One casualty in the current setup is custom
BuildSpecCmd
. @fbielejec I have some questions about your intention with that command. See below for details in context.