Skip to content

Commit

Permalink
fix links, content polish
Browse files Browse the repository at this point in the history
  • Loading branch information
nuke-web3 committed Oct 8, 2021
1 parent e940d88 commit 8e1d159
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 42 deletions.
8 changes: 4 additions & 4 deletions src/components/DevNavMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -691,19 +691,19 @@ DevNavMenuTuts.set('cumulusTutorial', [
items: [
{
title: `Start a Relay Chain`,
link: '/tutorials/v3/cumulus/pt1',
link: '/tutorials/v3/cumulus/start-relay',
},
{
title: `Connect to a Parachain`,
link: '/tutorials/v3/cumulus/pt2',
link: '/tutorials/v3/cumulus/connect-parachain',
},
{
title: `Launch a Parachain Testnet`,
link: '/tutorials/v3/cumulus/pt3',
link: '/tutorials/v3/cumulus/polkadot-launch',
},
// {
// title: `Register on Rococo`,
// link: '/tutorials/v3/cumulus/pt4',
// link: '/tutorials/v3/cumulus/rococo',
// },
],
},
Expand Down
8 changes: 4 additions & 4 deletions v3/tutorials/09-cumulus/a-start-relay/index.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Start a Relay Chain
slug: /tutorials/v3/cumulus/pt1
slug: /tutorials/v3/cumulus/start-relay
version: 'polkadot-0.9.10'
section: tutorials
category: parachains
Expand Down Expand Up @@ -414,8 +414,8 @@ If you would like even more validators, or to customize the relay chain in some
reading!

<AccentButton
text={`Don't need a custom relay spec? Jump to connecting to your relay chain ->`}
link={`../pt2`}
text={`Don't need a custom relay spec? Jump to connecting your parachain ->`}
link={`../connect-parachain`}
/>

## Create a custom relay chain spec (optional)
Expand Down Expand Up @@ -633,4 +633,4 @@ for details on inserting these keys into your various nodes.
## Next steps

So now that we have a layer 0 blockchain ready to go... we can start connecting layer 1 parachains
to it! In the [next section](../pt3) we dive in!
to it! In the next section we dive in!
15 changes: 8 additions & 7 deletions v3/tutorials/09-cumulus/b-connecting-to-relay/index.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Connect to a Parachain
slug: /tutorials/v3/cumulus/pt2
slug: /tutorials/v3/cumulus/connect-parachain
version: 'polkadot-0.9.10'
section: tutorials
category: parachains
Expand Down Expand Up @@ -90,7 +90,7 @@ collator binary you have roughly following these instructions.
#### Generate a parachain genesis state

To register a parachain, the relay chain needs to know the parachain's
[genesis state](../runtime/chain-specs#the-genesis-state). The collator node can export that state
[genesis state](../../../../v3/runtime/chain-specs#the-genesis-state). The collator node can export that state
to a file for us. The following command will create a file containing the parachain's entire genesis
state, hex-encoded:

Expand Down Expand Up @@ -228,7 +228,7 @@ sure to do that first.

If you are running a network with more than two validators you can add more parachains through the
same interface with the parameters adjusted accordingly using any mix of these options. More details
on this can be found [in here](../pt1#3-starting-additional-validators-optional).
on this can be found [in here](start-relay#starting-additional-validators-optional).

#### Option 1: `paraSudoWrapper.sudoScheduleParaInitialize`

Expand Down Expand Up @@ -274,7 +274,7 @@ page.
`}
/>

Please first follow the [Rococo registration](../pt4) instructions, with the exception of asking for
Please first follow the [Rococo registration](pt4) instructions, with the exception of asking for
a slot lease to be awarded or participating in a slot auction on a public testnet or mainnet. Here
we will use `sudo` to grant ourselves a lease instead. You should have an onboarded parathread:

Expand Down Expand Up @@ -304,7 +304,8 @@ The collator should start producing parachain blocks (aka collating) once the re
successful **and a new relay chain epoch has begun**!

> This may take a while! Be patient as you wait for a new epoch to begin first.
> This is 10 blocks for the [rococo `chain-spec.json`](../pt1#1-chain-specification)
> This is 10 blocks for the
> example <a href="/assets/tutorials/cumulus/chainspecs/rococo-custom-2-raw.json" download> rococo-custom-2-raw.json</a>
> included in this tutorial.
Finally, the collator should start producing log messages like the following:
Expand Down Expand Up @@ -439,7 +440,7 @@ parachain.
You should have _at least_ 2 **validators** (relay chain nodes) running for every **collator**
(parachain nodes) on your network. This is why we have included a prebuilt 3 and 4 validator
chain spec for you in [the first section](../pt1#pre-configured-chain-spec-files), and you
chain spec for you in [the first section](start-relay#pre-configured-chain-spec-files), and you
can add more as needed, described there.
### Start a second collator
Expand Down Expand Up @@ -485,5 +486,5 @@ the `--collator` flag.
## Next steps
That was _quite a lot of work_ to get a parachain up and running! Don't fret though, in the
[next section](../pt3) we learn about how to _completely automate_ all the steps we did in this
next section we learn about how to _completely automate_ all the steps we did in this
tutorial thus far to configure a parachain... and much more!
52 changes: 29 additions & 23 deletions v3/tutorials/09-cumulus/c-polkadot-launch/index.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Launch a Parachain Testnet
slug: /tutorials/v3/cumulus/pt3
slug: /tutorials/v3/cumulus/polkadot-launch
version: 'polkadot-0.9.10'
section: tutorials
category: parachains
Expand All @@ -14,16 +14,16 @@ relevantSkills:
- XCMP
---

The final part of the workshop will step you through how to use the <ExternalLink
url="https://github.com/paritytech/polkadot-launch"> polkadot-launch </ExternalLink> tool to
_rapidly_ launch a full parachain testnet with multiple parachains and a common relaychain.
The final part of the workshop will step you through how to use
the <ExternalLink url="https://github.com/paritytech/polkadot-launch"> polkadot-launch </ExternalLink>
tool to _rapidly_ launch a full parachain testnet with multiple parachains and a common relaychain.

> Note that it is still recommended to understand [the manual process](../pt1), as this script is
> It is still highly recommended to understand [the manual process](start-relay), as this script is
> not a perfect fit for all use cases, and when things go wrong, you know how to troubleshoot.
## Learning outcomes

- Use `polkadot-launch` to launch a parachain environment
- Use `polkadot-launch` to configure and deploy a parachain testnet

## How `polkadot-launch` works

Expand All @@ -36,8 +36,8 @@ to configure as you specify.

### Option A: Global install

For most cases, you do not need to edit `polkadot-launch`. Run the following command to install the
script globally in your environment:
For most cases, you do not need to modify `polkadot-launch` itself. Run the following command to
install the script globally in your environment:

```bash
yarn global add polkadot-launch
Expand All @@ -48,7 +48,7 @@ polkadot-launch --version

### Option B: Clone & run locally

If you find you need to edit the script, or otherwise would like to build this yourself, do:
If you find you need to edit the tool, or otherwise would like to build this yourself:

```bash
git clone git@github.com:paritytech/polkadot-launch.git
Expand All @@ -60,18 +60,19 @@ node dist/cli.js --version
# 1.7.0
```

If you think your edits are valuable, please consider <ExternalLink url="https://github.com/paritytech/polkadot-launch">opening a PR</ExternalLink>.
> If you think your edits are valuable, please
> consider <ExternalLink url="https://github.com/paritytech/polkadot-launch">opening a PR</ExternalLink>!
## `polkadot-launch` overview

1. Build your relay chain (with the runtimes you want enabled) and any parachains **with matching**
**versions(!!)** cloned and compiled. Generate or acquire the proper chainspecs, genesis files,
and runtime Wasm blobs for your chains ([instructions here](../pt1)). You will need all these
and runtime Wasm blobs for your chains ([instructions here](start-relay)). You will need all these
files and binaries to use your configuration moving forward.

2. Write a config file for `polkadot-launch` to fit your needs.

3. Launch and do initial registration tasks automatically with `polkadot-launch`
3. Launch (your initial registration tasks automatically)

The important new aspect here is the config file. Here is one to get started:

Expand Down Expand Up @@ -104,7 +105,7 @@ Each parachain has one node setup.

## Launch a network

Now you can start your network with the next commands:
Start with:

```bash
mkdir polkadot-config
Expand All @@ -113,11 +114,11 @@ cd polkadot-config
polkadot-launch relay-3-validators--2paras-1collator.json
```

If everything goes well, you should see messages similar to the following:
If everything goes well, you should see messages similar to:

![polkadot-launch-log.png](../../../../src/images/tutorials/09-cumulus/polkadot-launch-log.png)

Now in your current working directory you will find the relay chain node logs are written to
Now in your **current working directory** you will find the relay chain node logs are written to
`alice.log`, `bob.log`, and `charlie.log` for your three validators. While the parachain logs are
indicated with the websocket port numbers they are listening to, `9988.log`and `9999.log`. There
are also customized chain spec files used to launch the networks.
Expand All @@ -143,9 +144,10 @@ showing two parachains being connected to the relay chain.

<Message
type={`green`}
title={`Congratulation`}
title={`All done!`}
text={`You have automated the launch of a 3-node relay chain, and two parachains with a
single node using \`polkadot-launch\` CLI utility.`}
single node using \`polkadot-launch\` CLI utility and avoided all the initial manual overhead of starting
node and registering parachains!`}
/>

Next, we will go through in details the configuration parameters that `polkadot-launch` recognizes
Expand Down Expand Up @@ -298,9 +300,8 @@ values, and is meant to run with a single node only.
]
```

Their meanings are similar to their counterparts in [`parachains` section](). Note that since
a simple parachain only has one node, configs that was originally in `nodes` property are flattened
into one level now.
Note that since a simple parachain only has one node, configs that was originally in `nodes`
property are flattened into one level now.

### `hrmpChannels` section

Expand Down Expand Up @@ -332,13 +333,18 @@ communicating both ways.

Finally, we have `types`, and `finalization`.

- `types`: [custom Substrate types](https://polkadot.js.org/docs/api/start/types.extend/) to be fed
into Polkadot-JS API.
- `types`: <ExternalLink url="https://polkadot.js.org/docs/api/start/types.extend/"> custom Substrate types </ExternalLink>
to be fed into Polkadot-JS API.
- `finalization`: either `true` or `false`, whether you want transactions submitted to the network
to wait for finalization.

## Next steps

Now we have the ability to configure complex networks to thoroughly test locally. But what about transitioning
to a production system? How do you connect to a relay chain that exists already and get a parachain
slot there? In the [next section](../pt4) we learn about how to connect to Rococo.
slot there? In the [next section](rococo) we learn about how to register on and connect to Rococo.

<!--
FIXME TODO: once rococo registration is live again, uncomment the next page
(src/components/DevNavMenu.tsx) and remove the link above
-->
8 changes: 4 additions & 4 deletions v3/tutorials/09-cumulus/d-rococo/index.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Register on Rococo
slug: /tutorials/v3/cumulus/pt4
slug: /tutorials/v3/cumulus/rococo
version: 'polkadot-0.9.10'
section: tutorials
category: parachains
Expand Down Expand Up @@ -81,15 +81,15 @@ All parachains will need to register as a parathread first. You will need:

- **5 ROCs** deposit to register a para ID.

- [Reserve a unique para ID](../pt2#1-reserve-a-para-id). This will be assigned to the next
- [Reserve a unique para ID](connect-parachain#1-reserve-a-para-id). This will be assigned to the next
available ID. This integer will be greater than `2000`, as `0-999` are reserved for <ExternalLink url="https://wiki.polkadot.network/docs/learn-common-goods#system-level-chains">system parachains</ExternalLink> and
`1000-1999` are reserved for <ExternalLink url="https://wiki.polkadot.network/docs/learn-common-goods#public-utility-chains">public utility parachains</ExternalLink>.

- Your parachain genesis state. Refer to the
[genesis state export process](../pt2#3-generate-parachain-genesis-state).
[genesis state export process](connect-parachain#3-generate-parachain-genesis-state).

- Your parachain Wasm runtime. Refer to the
[Wasm runtime export process](../pt2#4-obtain-wasm-runtime-validation-function).
[Wasm runtime export process](connect-parachain#4-obtain-wasm-runtime-validation-function).

The procedure will be as followed:

Expand Down

0 comments on commit 8e1d159

Please sign in to comment.