A set of scripts to help para registration in Tanssi.
Use at your own risk!
From this directory
yarn install
Script that allows to perform several actions related to para registration, for instance:
This is done with yarn register-para register subcommand. This will ask for several things:
--chainwhich should point to the raw chain spec file that we want to register--account-priv-keythe private key of the account that we want to use to issue the transaction. It does not need to be ths sudo account.--urlendpoint of the Tanssi network in which we want to issue the transaction.
yarn register-para register --chain template-container-2002.json --account-priv-key "0xe5be9a5092b81bca64be81d212e7f2f9eba183bb7a90954f7b76361f6edb5c0a" --url "ws://127.0.0.1:9948"
This is done with yarn register-para setBootNodes subcommand, and it allows to set bootnodes for a given container-chain. This will ask for several things:
-
--para-idthe para id for which we want to register the bootnodes -
--account-priv-keythe private key of the account that we want to use to issue the transaction. IT NEEDS TO BE SUDO. -
--urlendpoint of the Tanssi network in which we want to issue the transaction. -
--keep-existingwhether to keep existing bootnodes for such para-id or just replace all by the new one -
--bootnodenew bootnode to be added as string -
--mark-valid-for-collatingwhether we additionally want to immediatly mark as valid for collation the container-chain
yarn register-para setBootNodes --para-id 2002 --account-priv-key "0xe5be9a5092b81bca64be81d212e7f2f9eba183bb7a90954f7b76361f6edb5c0a" --url "ws://127.0.0.1:9948" --keep-existing --bootnode "/ip4/127.0.0.1/tcp/33051/ws/p2p/12D3KooWSDsmAa7iFbHdQW4X8B2KbeRYPDLarK6EbevUSYfGkeQw"
This is done with yarn register-para markValidForCollating subcommand and it allows to mark a container-chain as valid for collation. This will ask for several things:
--para-idthe para id we want to mark as valid for collation--account-priv-keythe private key of the account that we want to use to issue the transaction. IT NEEDS TO BE SUDO.--urlendpoint of the Tanssi network in which we want to issue the transaction.
yarn register-para markValidForCollating --para-id 2002 --account-priv-key "0xe5be9a5092b81bca64be81d212e7f2f9eba183bb7a90954f7b76361f6edb5c0a" --url "ws://127.0.0.1:9948"
This is done with yarn register-para deregister subcommand and it allows to de-register a container-chain from Tanssi. This will ask for several things:
--para-idthe para id we want to mark as valid for collation--account-priv-keythe private key of the account that we want to use to issue the transaction. IT NEEDS TO BE SUDO.--urlendpoint of the Tanssi network in which we want to issue the transaction.
yarn register-para deregister --para-id 2002 --account-priv-key "0xe5be9a5092b81bca64be81d212e7f2f9eba183bb7a90954f7b76361f6edb5c0a" --url "ws://127.0.0.1:9948"
Script that allows to download a chain-spec, with bootnodes and type from Tanssi registered onchain data. Can be done with download-chainspec. It will ask for the following parameters:
--outputoutput file for the chain-spec file--para-idthe para id for which we want to download the chain-spec--urlendpoint of the Tanssi network in which we want to issue the transaction.--relay-chainthe relay-chain that we want to put in the chain-spec--chain-typethe chain-type we want to put in the chain-spec
yarn download-chainspec --output thispec.json --para-id 2000 --url "ws://127.0.0.1:9948" --relay-chain "rococo" --chain-type "Live"