Add Statemint Genesis Values (#817) (#905)

* Add Statemint Genesis Values (#817)

* add some docs to genesis scripts

* move statemint test chainspec

* add initial (draft) version of statemint chain spec

* adjust genesis value script

* add Statemint genesis Aura keys

* add bootnodes to statemint-genesis spec

* Add checks, debug and doc (#790)

* Add checks, debug and doc

* Update scripts/generate_genesis_value.sh

Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>

* Update scripts/generate_genesis_value.sh

Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>

Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>

* default to official shell rpc endpoint for genesis values

* remove statemint test chain spec

* add Statemint chain spec and genesis values

* sort statemint genesis values

* some script docs adjustments

Co-authored-by: Chevdor <chevdor@users.noreply.github.com>

* cargo fmt

Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>
Co-authored-by: Chevdor <chevdor@users.noreply.github.com>
This commit is contained in:
Squirrel
2022-01-19 10:43:46 +00:00
committed by GitHub
parent 9c4aa3b21f
commit 7ce3fe4e0d
9 changed files with 275 additions and 60 deletions
+5
View File
@@ -2,6 +2,10 @@ const fs = require("fs");
const { exit } = require("process");
const { xxhashAsHex } = require("@polkadot/util-crypto");
// Utility script scraping a chain spec for the genesis keys and values and writing them out as a
// json array of pairs. Filters the keys for anything already present in a shell runtime and sorts
// the output for reproducibility.
if (!process.argv[2] || !process.argv[3]) {
console.log("usage: node generate_keys <input chainspec> <output json>");
exit();
@@ -49,6 +53,7 @@ fs.readFile(input, "utf8", (err, data) => {
Object.entries(spec.genesis.raw.top).filter(
([key, value]) => !startsWith(key, filter_prefixes)
);
genesis.sort();
fs.writeFileSync(output, JSON.stringify(genesis));
});