Closed atenjin closed 1 year ago
Another similar feature I want is able to generate genesis file from current state. This means I can configure the testing environment once (deposit funds, deploy smart contract, doing configuration that is not possible with GenesisConfig, etc) and make a genesis file from it, and reuse it.
Note that it is already possible to export and import blocks out of/into the database, if that's what this issue is about.
The substrate export-state
subcommand introduced in https://github.com/paritytech/substrate/pull/5842 should solve this, right?
Not entirely. We still don't have checkpoints.
The
substrate export-state
subcommand introduced in #5842 should solve this, right?
not the full feature. for now, the export-state just can start the new chain from 0 height. but in fact, the best way is to start the new chain with the same height.
I think it needs a lot of modification for substrate backend part, and related to some consensus part.
According to Kusama Network's YouTube video Part 1: How to Register a Parachain on Polkadot and Kusama it should be possible to generate the genesis file and the runtime wasm file by running the following command:
I tried that using the node-template however, I got an error:
$ ./node-template export-genesis-state --parachain-id 21; ./node-template export-genesis-wasm > wasmfile
error: The subcommand 'export-genesis-state' wasn't recognized
Did you mean 'export-blocks' or 'export-state'?
Also, when I try to run the suggested command, the parachain-id
arg is not recognized:
% ./node-template export-state --parachain-id 2225;
error: Found argument '--parachain-id' which wasn't expected, or isn't valid in this context
So my questions are:
Also, what's the correct command for exporting the runtime wasm, since the export-genesis-wasm
command is not recognized at all?
% ./node-template export-genesis-wasm > wasmfile
error: The subcommand 'export-genesis-wasm' wasn't recognized
@takahser you need to use the parachain node template.
This seems existent with the export-state
subcommand, it is just a matter of using it right.
I think substrate may need a checkpoint feature. it could be used in follow situation