• introduce
• Set up a wallet
• Acquire a ParaID
• Generate parachain genesis and Wasm files
• Start your collator
• Register as a parathread
• Request your parachain slot
• Substrate Tutorials , Substrate 教程
• Contact 联系方式
• introduce
Rococo is Parity's public test network for parachains. This will guide you through how you can onboard your parachain to it.
Before you begin
Because Rococo is a shared test network, this tutorial requires additional steps to prepare your environment that aren't required for local testing. Before you begin, verify the following:
You know how to generate and modify chain specification files as described in Add trusted nodes.
You know how to generate and store keys using one of the methods described in Add trusted nodes.
You have completed the parachain tutorial and tested a parachain on your local computer.
• Set up a wallet
To perform any action on Rococo, you need ROC tokens. To store these, you need a Substrate compatible cryptocurrency wallet. For this operations in any public setting, you can not use development keys and accounts. There are many options available for setting up wallet account. For information about some of these options, see the Build wallets on the Polkadot wiki. If you are just getting started, you can use the polkadot-js extension. After you have an account, be sure to:
Back up your secret seed phrase.
Make note of your accountID that is using the default 42 SS58 prefix for use with Rococo.
To acquire ROC, join the Rococo faucet matrix channel and use the !drip command in the faucet channel to get 100 ROC in your wallet.
https://matrix.to/#/#rococo-faucet:matrix.org
• Acquire a ParaID
With a minimal 5 ROC free balance, register as a parathread on Rococo:
Go to the Polkadot-JS Apps parathreads section for Rococo.
Reserve a unique ParaID. You will be assigned to the next available ID - make note of this.
Note that on Rococo, ParaID numbers 0-999 are reserved for system parachains and 1000-1999 are reserved for public utility parachains. Only numbers 2000 and above that aren't already reserved can be used for community parachains.
• Generate parachain genesis and Wasm files
The files required to register a parachain must explicitly specify the correct relay chain and the right ParaID. In this tutorial, the relay chain is rococo instead of rococo-local used in the Connect a local parachain tutorial.
• Configure your chain specification to use:
Your Rococo ParaID.
Unique alternatives to the development keys and accounts for your collator nodes. While Alice and such accounts will work you should absolutely not use them!
• Generate the appropriate parachain's genesis state for Rococo.
• Generate the parachain runtime Wasm blob for Rococo.
• Start your collator
You must have your collator's peering ports for the embedded relay chain and your parachain publicly accessible and discoverable. This way you are able to peer with Rococo validator nodes, otherwise you will not be able to produce blocks! The peering port is set with the --port -- --port CLI flags, be sure to do this for both nodes separately. It's very likely you want at least your collator's --ws-port port open as well to allow for yourself (and others) to connect with it via the Polkadot Apps UI or API calls.
• Register as a parathread
Before you can become a parachain, you must register as a parathread on Rococo:
• Register as a parathread. using your reserved ParaID.
• Check that you see a registrar.Registered event in the Polkadot-JS application to verify registration succeeded.
• Click Parachains -> Parathreads and verify that your parathread registration is Onboarding:
• Request your parachain slot
After the parachain is active as a parathread, the related project team should open a request for either a permanent or a temporary parachain slot on Rococo.
• Permanent slots are parachain slots assigned to teams who currently have a parachain slot on Polkadot (following a successful slot lease auction) and thus have the needs for continuously testing their codebase for compatibility with the latest bleeding edge features in a real-world live environment (Rococo). Only a limited number of permanent slots are available (see note below).
• Temporary slots are parachain slots that are dynamically allocated in a continuous, round-robbin style roation. At the start of every lease period, a certain number of parathreads—up to a maximum defined in the relay chain's configuration—are automatically upgraded to parachains for a certain duration. The parachains that were active during the ending lease period are automatically downgraded to parathreads to free the slots for others to use in the subsequent period. The temporary slots are meant to be used by teams who do not have a parachain slot yet on Polkadot, and are aiming for one in the near future.
The goal dynamic allocations is to help teams test their runtimes more often, and in a more streamlined manner.
The Rococo runtime requires sudo access to assign slots (AssignSlotOrigin = EnsureRootSelf::AccountId;). The Rococo sudo key is currently controlled by Parity Technologies at this time, so to have the operation required to get a slot, please go to the Subport repo and open a Rococo Slot Request once you complete the above and are ready to connect! A Parity team member will respond once your slot has been activated. Eventually, this process is intended to be community-driven through the Rococo governance framework.
• Using an account with the AssignSlotOrigin origin, follow these steps to assign a temporary slot:
Open Polkadot-JS Apps for Rococo.
Click Developer > Extrinsics.
Select the account you want to use to submit the transaction.
Select the assignedSlots pallet.
Choose the assignTempParachainSlot function.
Insert your reserved ParaID. Make sure you use the ParaID you previously reserved.
Select Current for the LeasePeriodStart. If the current slot is full, you will be assigned the next available slot.
Sign and submit the transaction.
• Given a period lease duration of 1 day, the current settings for assigned parachain slots on Rococo are (at the time of writing):
Permanent slot least duration: 1 year (365 days)
Temporary slot least duration: 3 days
Maximum number of permanent slots: up to 25 permanent slots
Maximum number of temporary slots: up to 20 temporary slots
Maximum temporary slots allocated per leased period: up to 5 temporary slots per 3-day temporary lease periods
After your slot is activated by the Parity team, you can test your parachain on the Rococo test network. Note that when your temporary slot's lease ends, the parachain is automatically downgraded to a parathread. Registered and approved slots are cycled through automatically in a round-robin fashion, so you can expect to come back online as a parachain from time to time.
• Substrate Tutorials , Substrate 教程
CN 中文 Github Substrate 教程 : github.com/565ee/Substrate_CN
CN 中文 CSDN Substrate 教程 : blog.csdn.net/wx468116118
EN 英文 Github Substrate Tutorials : github.com/565ee/Substrate_EN
EN 英文 dev.to Substrate Tutorials : dev.to/565ee
• Contact 联系方式
Homepage : 565.ee
GitHub : github.com/565ee
Email : 565.eee@gmail.com
Facebook : facebook.com/565.ee
Twitter : twitter.com/565_eee
Telegram : t.me/ee_565
Top comments (0)