diff --git a/.snippets/code/tutorials/polkadot-sdk/parachains/connect-to-relay-chain/acquire-a-testnet-slot/acquire-a-testnet-slot-2.html b/.snippets/code/tutorials/polkadot-sdk/parachains/connect-to-relay-chain/acquire-a-testnet-slot/acquire-a-testnet-slot-2.html
deleted file mode 100644
index 19e9bba40..000000000
--- a/.snippets/code/tutorials/polkadot-sdk/parachains/connect-to-relay-chain/acquire-a-testnet-slot/acquire-a-testnet-slot-2.html
+++ /dev/null
@@ -1,7 +0,0 @@
-
- ./target/release/parachain-template-node build-spec --chain plain-parachain-chainspec.json --disable-default-bootnode --raw > raw-parachain-chainspec.json
-
- 2024-09-11 09:48:15 Building chain spec
- 2024-09-11 09:48:15 assembling new collators for new session 0 at #0
- 2024-09-11 09:48:15 assembling new collators for new session 1 at #0
-
diff --git a/.snippets/code/tutorials/polkadot-sdk/parachains/connect-to-relay-chain/acquire-a-testnet-slot/deploy-on-paseo-3.html b/.snippets/code/tutorials/polkadot-sdk/parachains/connect-to-relay-chain/acquire-a-testnet-slot/deploy-on-paseo-3.html
new file mode 100644
index 000000000..2bf570722
--- /dev/null
+++ b/.snippets/code/tutorials/polkadot-sdk/parachains/connect-to-relay-chain/acquire-a-testnet-slot/deploy-on-paseo-3.html
@@ -0,0 +1,8 @@
+
+ polkadot-omni-node key generate-node-key --base-path /tmp/parachain/pubs-demo --chain raw-parachain-chainspec.json
+
+ 2024-09-11 09:48:15 Building chain spec
+ Generating key in "/tmp/parachain/pubs-demo/chains/live/network/secret_ed25519"
+ 12D3KooWJH816dWizsft7MXVrv1nH3dHnGsHxD1qdyQm9mMAbo7Z
+
+
\ No newline at end of file
diff --git a/.snippets/code/tutorials/polkadot-sdk/parachains/connect-to-relay-chain/prepare-parachain/prepare-parachain-3.html b/.snippets/code/tutorials/polkadot-sdk/parachains/connect-to-relay-chain/prepare-parachain/prepare-parachain-3.html
index 48ed76714..6b10cbea1 100644
--- a/.snippets/code/tutorials/polkadot-sdk/parachains/connect-to-relay-chain/prepare-parachain/prepare-parachain-3.html
+++ b/.snippets/code/tutorials/polkadot-sdk/parachains/connect-to-relay-chain/prepare-parachain/prepare-parachain-3.html
@@ -1,11 +1,5 @@
- ./target/release/parachain-template-node build-spec \
- --chain plain-parachain-chainspec.json \
- --disable-default-bootnode \
- --raw > raw-parachain-chainspec.json
-
- 2024-09-10 14:34:58 Building chain spec
- 2024-09-10 14:34:59 assembling new collators for new session 0 at #0
- 2024-09-10 14:34:59 assembling new collators for new session 1 at #0
+ polkadot-omni-node export-genesis-state --chain raw-parachain-chainspec.json para-2000-genesis-state
+ 2024-09-10 14:41:13 🔨 Initializing Genesis block/state (state: 0xb089…1830, header-hash: 0x6b0b…bd69)
diff --git a/.snippets/code/tutorials/polkadot-sdk/parachains/connect-to-relay-chain/prepare-parachain/prepare-parachain-4.html b/.snippets/code/tutorials/polkadot-sdk/parachains/connect-to-relay-chain/prepare-parachain/prepare-parachain-4.html
index c5bb4cef7..3f7098e42 100644
--- a/.snippets/code/tutorials/polkadot-sdk/parachains/connect-to-relay-chain/prepare-parachain/prepare-parachain-4.html
+++ b/.snippets/code/tutorials/polkadot-sdk/parachains/connect-to-relay-chain/prepare-parachain/prepare-parachain-4.html
@@ -1,5 +1,20 @@
- ./target/release/parachain-template-node export-genesis-state \ --chain raw-parachain-chainspec.json para-2000-genesis-state
- 2024-09-10 14:41:13 🔨 Initializing Genesis block/state (state: 0xb089…1830, header-hash: 0x6b0b…bd69)
+ polkadot-omni-node \
+ --charlie \
+ --collator \
+ --force-authoring \
+ --chain raw-parachain-chainspec.json \
+ --base-path /tmp/charlie-parachain/ \
+ --unsafe-force-node-key-generation \
+ --port 40333 \
+ --rpc-port 8844 \
+ -- \
+ --chain INSERT_RELAY_CHAIN_PATH/local-raw-spec.json \
+ --port 30333 \
+ --rpc-port 9946
+
+ 2024-09-10 16:26:30 [Parachain] PoV size { header: 0.21875kb, extrinsics: 3.6103515625kb, storage_proof: 3.150390625kb }
+ 2024-09-10 16:26:30 [Parachain] Compressed PoV size: 6.150390625kb
+ 2024-09-10 16:26:33 [Relaychain] 💤 Idle (2 peers), best: #1729 (0x3aa4…cb6b), finalized #1726 (0xff7a…4352), ⬇ 9.1kiB/s ⬆ 3.8kiB/s
diff --git a/.snippets/code/tutorials/polkadot-sdk/parachains/connect-to-relay-chain/prepare-parachain/prepare-parachain-5.html b/.snippets/code/tutorials/polkadot-sdk/parachains/connect-to-relay-chain/prepare-parachain/prepare-parachain-5.html
deleted file mode 100644
index d02f4ce36..000000000
--- a/.snippets/code/tutorials/polkadot-sdk/parachains/connect-to-relay-chain/prepare-parachain/prepare-parachain-5.html
+++ /dev/null
@@ -1,20 +0,0 @@
-
- ./target/release/parachain-template-node \
- --charlie \
- --collator \
- --force-authoring \
- --chain raw-parachain-chainspec.json \
- --base-path /tmp/charlie-parachain/ \
- --unsafe-force-node-key-generation \
- --port 40333 \
- --rpc-port 8844 \
- -- \
- --chain INSERT_RELAY_CHAIN_PATH/local-raw-spec.json \
- --port 30333 \
- --rpc-port 9946
-
- 2024-09-10 16:26:30 [Parachain] PoV size { header: 0.21875kb, extrinsics: 3.6103515625kb, storage_proof: 3.150390625kb }
- 2024-09-10 16:26:30 [Parachain] Compressed PoV size: 6.150390625kb
- 2024-09-10 16:26:33 [Relaychain] 💤 Idle (2 peers), best: #1729 (0x3aa4…cb6b), finalized #1726 (0xff7a…4352), ⬇ 9.1kiB/s ⬆ 3.8kiB/s
-
-
diff --git a/images/tutorials/polkadot-sdk/parachains/connect-to-relay-chain/acquire-a-testnet-slot/acquire-a-testnet-slot-10.webp b/images/tutorials/polkadot-sdk/parachains/connect-to-relay-chain/acquire-a-testnet-slot/acquire-a-testnet-slot-10.webp
new file mode 100644
index 000000000..2222c3b3b
Binary files /dev/null and b/images/tutorials/polkadot-sdk/parachains/connect-to-relay-chain/acquire-a-testnet-slot/acquire-a-testnet-slot-10.webp differ
diff --git a/images/tutorials/polkadot-sdk/parachains/connect-to-relay-chain/acquire-a-testnet-slot/acquire-a-testnet-slot-9.webp b/images/tutorials/polkadot-sdk/parachains/connect-to-relay-chain/acquire-a-testnet-slot/acquire-a-testnet-slot-9.webp
new file mode 100644
index 000000000..ed4fcc414
Binary files /dev/null and b/images/tutorials/polkadot-sdk/parachains/connect-to-relay-chain/acquire-a-testnet-slot/acquire-a-testnet-slot-9.webp differ
diff --git a/tutorials/polkadot-sdk/parachains/.pages b/tutorials/polkadot-sdk/parachains/.pages
index 920bb7dd9..d8ee84754 100644
--- a/tutorials/polkadot-sdk/parachains/.pages
+++ b/tutorials/polkadot-sdk/parachains/.pages
@@ -3,4 +3,5 @@ nav:
- index.md
- local-chain
- connect-to-relay-chain
+ - deploy-to-relay-chain
- build-custom-pallet
\ No newline at end of file
diff --git a/tutorials/polkadot-sdk/parachains/connect-to-relay-chain/.pages b/tutorials/polkadot-sdk/parachains/connect-to-relay-chain/.pages
index a2d468201..80c6bbd03 100644
--- a/tutorials/polkadot-sdk/parachains/connect-to-relay-chain/.pages
+++ b/tutorials/polkadot-sdk/parachains/connect-to-relay-chain/.pages
@@ -1,6 +1,5 @@
-title: Connect to a Relay Chain
+title: Connect to a Local Relay Chain
nav:
- index.md
- - 'Prepare Relay Chain': prepare-relay-chain.md
- - 'Prepare Parachain': prepare-parachain.md
- - 'Acquire a TestNet Slot': acquire-a-testnet-slot.md
+ - 'Prepare A Local Relay Chain': prepare-relay-chain.md
+ - 'Prepare Local Parachain': prepare-parachain.md
\ No newline at end of file
diff --git a/tutorials/polkadot-sdk/parachains/connect-to-relay-chain/prepare-parachain.md b/tutorials/polkadot-sdk/parachains/connect-to-relay-chain/prepare-parachain.md
index 623d77613..105370c44 100644
--- a/tutorials/polkadot-sdk/parachains/connect-to-relay-chain/prepare-parachain.md
+++ b/tutorials/polkadot-sdk/parachains/connect-to-relay-chain/prepare-parachain.md
@@ -40,7 +40,7 @@ To build the parachain template, follow these steps:
2. Change the directory to the cloned repository
```bash
- cd polkadot-sdk-solochain-template
+ cd polkadot-sdk-parachain-template
```
3. Build the parachain template collator
@@ -108,28 +108,22 @@ To modify the default chain specification, follow these steps:
1. Generate the plain text chain specification for the parachain template node by running the following command
```bash
- ./target/release/parachain-template-node build-spec \
- --disable-default-bootnode > plain-parachain-chainspec.json
+ chain-spec-builder create --relay-chain paseo \
+ --para-id 4508 \
+ -r \
+ default
```
2. Open the plain text chain specification for the parachain template node in a text editor
-3. Set the `para_id` to the parachain identifier that you previously reserved. For example, if your reserved identifier is `2000`, set the `para_id` field to `2000`:
-
- ```json
- --8<-- 'code/tutorials/polkadot-sdk/parachains/connect-to-relay-chain/prepare-parachain/prepare-parachain-2.json:1:4'
- --8<-- 'code/tutorials/polkadot-sdk/parachains/connect-to-relay-chain/prepare-parachain/prepare-parachain-2.json:6:6'
- --8<-- 'code/tutorials/polkadot-sdk/parachains/connect-to-relay-chain/prepare-parachain/prepare-parachain-2.json:13:15'
- ```
-
-4. Set the `parachainId` to the parachain identifier that you previously reserved. For example, if your reserved identifier is `2000`, set the `parachainId` field to `2000`
+3. Set the `parachainId` to the parachain identifier that you previously reserved. For example, if your reserved identifier is `2000`, set the `parachainId` field to `2000`
```json
--8<-- 'code/tutorials/polkadot-sdk/parachains/connect-to-relay-chain/prepare-parachain/prepare-parachain-2.json:1:2'
--8<-- 'code/tutorials/polkadot-sdk/parachains/connect-to-relay-chain/prepare-parachain/prepare-parachain-2.json:6:15'
```
-5. If you complete this tutorial simultaneously as anyone on the same local network, an additional step is needed to prevent accidentally peering with their nodes. Find the following line and add characters to make your `protocolId` unique
+4. If you complete this tutorial simultaneously as anyone on the same local network, an additional step is needed to prevent accidentally peering with their nodes. Find the following line and add characters to make your `protocolId` unique
```json
--8<-- 'code/tutorials/polkadot-sdk/parachains/connect-to-relay-chain/prepare-parachain/prepare-parachain-2.json:1:2'
@@ -137,21 +131,14 @@ To modify the default chain specification, follow these steps:
--8<-- 'code/tutorials/polkadot-sdk/parachains/connect-to-relay-chain/prepare-parachain/prepare-parachain-2.json:13:15'
```
-6. Save your changes and close the plain text chain specification file
+5. Save your changes and close the plain text chain specification file
-7. Generate a raw chain specification file from the modified chain specification file by running the following command
+6. Generate a raw chain specification file from the modified chain specification file by running the following command
```bash
- ./target/release/parachain-template-node build-spec \
- --chain plain-parachain-chainspec.json \
- --disable-default-bootnode \
- --raw > raw-parachain-chainspec.json
+ chain-spec-builder convert-to-raw plain-parachain-chainspec.json
```
- After running the command, you will see the following output:
-
- --8<-- 'code/tutorials/polkadot-sdk/parachains/connect-to-relay-chain/prepare-parachain/prepare-parachain-3.html'
-
## Prepare the Parachain Collator
With the local relay chain running and the raw chain specification for the parachain template updated, you can start the parachain collator node and export information about its runtime and genesis state.
@@ -163,8 +150,8 @@ To prepare the parachain collator to be registered:
The relay chain needs the parachain-specific runtime validation logic to validate parachain blocks. You can export the Wasm runtime for a parachain collator node by running a command similar to the following:
```bash
- ./target/release/parachain-template-node export-genesis-wasm \
- --chain raw-parachain-chainspec.json para-2000-wasm
+ polkadot-omni-node export-genesis-wasm \
+ --chain raw-parachain-chainspec.json para-2000-wasm
```
2. Generate a parachain genesis state
@@ -172,13 +159,13 @@ To prepare the parachain collator to be registered:
To register a parachain, the relay chain needs to know the genesis state of the parachain. You can export the entire genesis state—hex-encoded—to a file by running a command similar to the following:
```bash
- ./target/release/parachain-template-node export-genesis-state \
- --chain raw-parachain-chainspec.json para-2000-genesis-state
+ polkadot-omni-node export-genesis-state \
+ --chain raw-parachain-chainspec.json para-2000-state
```
After running the command, you will see the following output:
- --8<-- 'code/tutorials/polkadot-sdk/parachains/connect-to-relay-chain/prepare-parachain/prepare-parachain-4.html'
+ --8<-- 'code/tutorials/polkadot-sdk/parachains/connect-to-relay-chain/prepare-parachain/prepare-parachain-3.html'
!!!note
You should note that the runtime and state you export must be for the genesis block. You can't connect a parachain with any previous state to a relay chain. All parachains must start from block 0 on the relay chain. See [Convert a Solo Chain](https://docs.substrate.io/reference/how-to-guides/parachains/convert-a-solo-chain/){target=\_blank} for details on how the parachain template was created and how to convert the chain logic—not its history or state migrations—to a parachain.
@@ -186,7 +173,7 @@ To prepare the parachain collator to be registered:
3. Start a collator node with a command similar to the following
```bash
- ./target/release/parachain-template-node \
+ polkadot-omni-node \
--charlie \
--collator \
--force-authoring \
@@ -206,7 +193,7 @@ To prepare the parachain collator to be registered:
After running the command, you will see the following output:
- --8<-- 'code/tutorials/polkadot-sdk/parachains/connect-to-relay-chain/prepare-parachain/prepare-parachain-5.html'
+ --8<-- 'code/tutorials/polkadot-sdk/parachains/connect-to-relay-chain/prepare-parachain/prepare-parachain-4.html'
## Register With the Local Relay Chain
@@ -273,7 +260,7 @@ To reset the blockchain state, follow these steps:
2. Purge the parachain collator state by running the following command
```bash
- ./target/release/parachain-template-node purge-chain \
+ polkadot-omni-node purge-chain \
--chain raw-parachain-chainspec.json
```
diff --git a/tutorials/polkadot-sdk/parachains/connect-to-relay-chain/prepare-relay-chain.md b/tutorials/polkadot-sdk/parachains/connect-to-relay-chain/prepare-relay-chain.md
index f4aaaa4cf..d5477897f 100644
--- a/tutorials/polkadot-sdk/parachains/connect-to-relay-chain/prepare-relay-chain.md
+++ b/tutorials/polkadot-sdk/parachains/connect-to-relay-chain/prepare-relay-chain.md
@@ -100,8 +100,7 @@ To start the validator nodes, follow these steps:
1. Generate the plain text chain specification file:
```bash
- ./target/release/polkadot build-spec \
- --chain rococo-local-testnet > /tmp/plain-local-chainspec.json
+ chain-spec-builder create -r default
```
!!! note
@@ -109,11 +108,9 @@ To start the validator nodes, follow these steps:
2. Convert the plain text chain specification file to the raw format:
- ```bash
- ./target/release/polkadot build-spec \
- --chain plain-local-chainspec.json \
- --raw > /tmp/raw-local-chainspec.json
- ```
+ ```bash
+ chain-spec-builder convert-to-raw plain-parachain-chainspec.json
+ ````
2. Start the first validator using the `alice` account by running the following command:
@@ -165,4 +162,4 @@ To start the validator nodes, follow these steps:
--8<-- 'code/tutorials/polkadot-sdk/parachains/connect-to-relay-chain/prepare-relay-chain/prepare-relay-chain-2.html'
-Once the relay chain nodes are running, you can proceed to the next tutorial to [set up a test parachain node and connect it](/tutorials/polkadot-sdk/parachains/connect-to-relay-chain/prepare-parachain) to the relay chain.
+Once the relay chain nodes are running, you can proceed to the next tutorial to [set up a test parachain node and connect it](/tutorials/polkadot-sdk/parachains/connect-to-relay-chain/prepare-parachain) to the relay chain.
\ No newline at end of file
diff --git a/tutorials/polkadot-sdk/parachains/deploy-to-relay-chain/.pages b/tutorials/polkadot-sdk/parachains/deploy-to-relay-chain/.pages
new file mode 100644
index 000000000..b477c5370
--- /dev/null
+++ b/tutorials/polkadot-sdk/parachains/deploy-to-relay-chain/.pages
@@ -0,0 +1,4 @@
+title: Deploy to a Relay Chain
+nav:
+ - index.md
+ - 'Deploy on Paseo TestNet': deploy-on-paseo.md
\ No newline at end of file
diff --git a/tutorials/polkadot-sdk/parachains/connect-to-relay-chain/acquire-a-testnet-slot.md b/tutorials/polkadot-sdk/parachains/deploy-to-relay-chain/deploy-on-paseo.md
similarity index 59%
rename from tutorials/polkadot-sdk/parachains/connect-to-relay-chain/acquire-a-testnet-slot.md
rename to tutorials/polkadot-sdk/parachains/deploy-to-relay-chain/deploy-on-paseo.md
index 3e2d229ac..456b960a7 100644
--- a/tutorials/polkadot-sdk/parachains/connect-to-relay-chain/acquire-a-testnet-slot.md
+++ b/tutorials/polkadot-sdk/parachains/deploy-to-relay-chain/deploy-on-paseo.md
@@ -1,9 +1,9 @@
---
-title: Acquire a TestNet Slot
-description: This guide walks you through the journey of securing a TestNet slot on Paseo for your parachain, detailing each step to a successful registration.
+title: Deploy on Paseo TestNet
+description: This guide walks you through the journey of deploying your Polkadot SDK blockchain on Paseo, detailing each step to a successful TestNet deployment.
---
-# Acquire a TestNet Slot
+# Deploy on Paseo
## Introduction
@@ -14,18 +14,22 @@ This tutorial demonstrates deploying a parachain on a public test network like t
Before you start, you need to have the following prerequisites:
- You know how to generate and modify chain specification files as described in the [Generate Chain Specs](/develop/parachains/deployment/generate-chain-specs){target=\_blank} section
+- You have installed the [`polkadot-omni-node`](https://github.com/paritytech/polkadot-sdk/blob/master/cumulus/polkadot-omni-node/README.md){target=\_blank} and [`chain-spec-builder`](https://crates.io/crates/staging-chain-spec-builder){target=\_blank} binaries
- You know how to generate and store keys as described in the [Spin Your Nodes](/tutorials/polkadot-sdk/parachains/local-chain/spin-your-nodes){target=\_blank} tutorial
- You have completed the [Prepare a Local Relay Chain](/tutorials/polkadot-sdk/parachains/connect-to-relay-chain/prepare-relay-chain/){target=\_blank} and the [Prepare a Local Parachain](/tutorials/polkadot-sdk/parachains/connect-to-relay-chain/prepare-parachain/){target=\_blank} tutorials on your local computer
## Get Started with an Account and Tokens
-To perform any action on Paseo, you need PAS tokens, which can be requested from the [Polkadot Faucet](https://faucet.polkadot.io/){target=\_blank}. Also, to store the tokens, you must have access to a Substrate-compatible digital currency wallet. Development keys and accounts should never hold assets of actual value and should not be used for production. Many options are available for holding digital currency—including hardware wallets and browser-based applications—and some are more reputable than others. You should do your own research before selecting one.
+To perform any action on Paseo, you need PAS tokens, which can be requested from the [Polkadot Faucet](https://faucet.polkadot.io/){target=\_blank}. To store the tokens, you must have access to a Substrate-compatible wallet. Go to the [Wallets and Extensions](https://wiki.polkadot.network/docs/wallets-and-extensions){target=\_blank} page on the Polkadot Wiki to view different options for a wallet, or use the [Polkadot.js browser extension](https://polkadot.js.org/extension/){target=\_blank}, which is suitable for development purposes.
-However, you can use the [Polkadot.js Apps](https://polkadot.js.org/apps/){target=\_blank} interface to get you started for testing purposes.
+!!!warning
+ Development keys and accounts should never hold assets of actual value and should not be used for production.
+
+The [Polkadot.js Apps](https://polkadot.js.org/apps/){target=\_blank} interface can be used to get you started for testing purposes.
To prepare an account, follow these steps:
-1. Open the [Polkadot.js Apps](https://polkadot.js.org/apps/){target=\_blank} interface and connect to the Paseo network
+1. Open the [Polkadot.js Apps](https://polkadot.js.org/apps/){target=\_blank} interface and connect to the Paseo network. Alternatively use this link to connect directly to Paseo: [Polkadot.js Apps: Paseo](https://polkadot.js.org/apps/?rpc=wss://paseo.dotters.network#/explorer){target=\_blank}
![](/images/tutorials/polkadot-sdk/parachains/connect-to-relay-chain/acquire-a-testnet-slot/acquire-a-testnet-slot-1.webp)
@@ -47,7 +51,7 @@ To prepare an account, follow these steps:
## Reserve a Parachain Identifier
-You must reserve a parachain identifier before registering a parathread on Paseo. The steps are similar to the ones you followed in [Prepare a Local Parachain](/tutorials/polkadot-sdk/parachains/connect-to-relay-chain/prepare-parachain){target=_\blank} to reserve an identifier on the local relay chain. However, for the public TestNet, you'll be assigned the next available identifier.
+You must reserve a parachain identifier (ID) before registering your parachain on Paseo. The steps are similar to the ones you followed in [Prepare a Local Parachain](/tutorials/polkadot-sdk/parachains/connect-to-relay-chain/prepare-parachain){target=_\blank} to reserve an identifier on the local relay chain. However, for the public TestNet, you'll be assigned the next available identifier.
To reserve a parachain identifier, follow these steps:
@@ -57,7 +61,7 @@ To reserve a parachain identifier, follow these steps:
![](/images/tutorials/polkadot-sdk/parachains/connect-to-relay-chain/acquire-a-testnet-slot/acquire-a-testnet-slot-5.webp)
-2. Register a parathread
+2. Register a ParaId
1. Select the **Parathreads** tab
2. Click on the **+ ParaId** button
@@ -73,29 +77,26 @@ To reserve a parachain identifier, follow these steps:
![](/images/tutorials/polkadot-sdk/parachains/connect-to-relay-chain/acquire-a-testnet-slot/acquire-a-testnet-slot-8.webp)
-## Modify the Chain Specification File
+## Generate the Chain Specification
The files required to register a parachain must specify the correct relay chain to connect to and the parachain identifier you have been assigned. To make these changes, you must build and modify the chain specification file for your parachain. In this tutorial, the relay chain is `paseo`, and the parachain identifier is `4508`.
To modify the chain specification:
-1. Generate the plain text chain specification for the parachain template node by running the following command:
+1. Generate the plain chain specification for the parachain template node by running the following command. You should find your runtime's Wasm file inside `target/release/wbuild`:
```bash
- ./target/release/parachain-template-node build-spec \
- --disable-default-bootnode > plain-parachain-chainspec.json
+ chain-spec-builder create --relay-chain paseo \
+ --para-id 4508 \
+ -r \
+ default
```
+!!!info
+ Be sure to use the `*.compact.compressed.wasm` version of your file when generating your chain specification.
2. Open the plain text chain specification for the parachain template node in a text editor
-3. Set `relay_chain` to `paseo` and `para_id` to the identifier you've been assigned. For example, if your reserved identifier is 4508, set the `para_id` field to `4508`:
-
- ```json
- --8<-- 'code/tutorials/polkadot-sdk/parachains/connect-to-relay-chain/acquire-a-testnet-slot/acquire-a-testnet-slot-1.json:1:4'
- --8<-- 'code/tutorials/polkadot-sdk/parachains/connect-to-relay-chain/acquire-a-testnet-slot/acquire-a-testnet-slot-1.json:23:25'
- ```
-
-4. Set the `parachainId` to the parachain identifier that you previously reserved:
+3. Set the `parachainId` to the parachain identifier that you previously reserved:
```json
--8<-- 'code/tutorials/polkadot-sdk/parachains/connect-to-relay-chain/acquire-a-testnet-slot/acquire-a-testnet-slot-1.json::2'
@@ -103,7 +104,7 @@ To modify the chain specification:
--8<-- 'code/tutorials/polkadot-sdk/parachains/connect-to-relay-chain/acquire-a-testnet-slot/acquire-a-testnet-slot-1.json:22:25'
```
-5. Add the public key for your account to the session keys section. Each configured session key will require a running collator:
+4. Add the public key for your account to the session keys section. Each configured session key will require a running collator:
```json
--8<-- 'code/tutorials/polkadot-sdk/parachains/connect-to-relay-chain/acquire-a-testnet-slot/acquire-a-testnet-slot-1.json::2'
@@ -111,20 +112,15 @@ To modify the chain specification:
--8<-- 'code/tutorials/polkadot-sdk/parachains/connect-to-relay-chain/acquire-a-testnet-slot/acquire-a-testnet-slot-1.json:11:25'
```
-6. Save your changes and close the plain text chain specification file
+5. Save your changes and close the plain text chain specification file
-7. Generate a raw chain specification file from the modified chain specification file:
+6. Convert the modified plain chain specification file to a raw chain specification file:
```bash
- ./target/release/parachain-template-node build-spec \
- --chain plain-parachain-chainspec.json \
- --disable-default-bootnode \
- --raw > raw-parachain-chainspec.json
- ```
-
- After running the command, you will see the following output:
+ chain-spec-builder convert-to-raw plain-parachain-chainspec.json
+ ````
- --8<-- 'code/tutorials/polkadot-sdk/parachains/connect-to-relay-chain/acquire-a-testnet-slot/acquire-a-testnet-slot-2.html'
+ You should now see your chain specification containing SCALE-encoded hex values versus plain text.
## Export Required Files
@@ -133,29 +129,56 @@ To prepare the parachain collator to be registered on Paseo, follow these steps:
1. Export the Wasm runtime for the parachain by running a command similar to the following:
```bash
- ./target/release/parachain-template-node export-genesis-wasm \
- --chain raw-parachain-chainspec.json para-4508-wasm
+ polkadot-omni-node export-genesis-wasm \
+ --chain raw-parachain-chainspec.json para-wasm
```
2. Export the genesis state for the parachain by running a command similar to the following:
```bash
- ./target/release/parachain-template-node export-genesis-state \
- --chain raw-parachain-chainspec.json para-4508-state
+ polkadot-omni-node export-genesis-state \
+ --chain raw-parachain-chainspec.json para-state
```
+## Register a Parathread
+
+Once you have the genesis state and runtime, you can now register these with your parachain ID.
+
+1. Go to the [Parachains > Parathreads](https://polkadot.js.org/apps/#/parachains/parathreads){target=\_blank} tab, and select **+ Parathread**
+
+2. You should see fields to place your runtime Wasm and genesis state respectively, along with the parachain ID. Select your parachain ID, and upload `para-wasm` in the "code" field and `para-state` in the "initial state" field:
+
+![](/images/tutorials/polkadot-sdk/parachains/connect-to-relay-chain/acquire-a-testnet-slot/acquire-a-testnet-slot-9.webp)
+
+3. Confirm your details and **+ Submit** button, where there should be a new Parathread with your parachain ID and an active **Deregister** button:
+
+![](/images/tutorials/polkadot-sdk/parachains/connect-to-relay-chain/acquire-a-testnet-slot/acquire-a-testnet-slot-10.webp)
+
+Your parachain's runtime logic and genesis are now part of the relay chain. The next step is to ensure you are able to run a collator to produce blocks for your parachain.
+
## Start the Collator Node
+Before starting a collator, generate a node key. A node key is responsible for communicating with other nodes over Libp2p:
+
+```bash
+polkadot-omni-node key generate-node-key \
+ --base-path /tmp/parachain/pubs-demo \
+ --chain raw-parachain-chainspec.json
+```
+
+After running the command, you should see the following output, indicating the base path now has a suitable node key:
+
+--8<-- 'code/tutorials/polkadot-sdk/parachains/connect-to-relay-chain/acquire-a-testnet-slot/deploy-on-paseo-3.html'
+
You must have the ports for the collator publicly accessible and discoverable to enable parachain nodes to peer with Paseo validator nodes to produce blocks. You can specify the ports with the `--port` command-line option. For example, you can start the collator with a command similar to the following:
```bash
-./target/release/parachain-template-node --collator \
+polkadot-omni-node --collator \
--chain raw-parachain-chainspec.json \
--base-path /tmp/parachain/pubs-demo \
--port 50333 \
--rpc-port 8855 \
-- \
- --execution wasm \
--chain paseo \
--port 50343 \
--rpc-port 9988
@@ -163,11 +186,13 @@ You must have the ports for the collator publicly accessible and discoverable to
In this example, the first `--port` setting specifies the port for the collator node and the second `--port` specifies the embedded relay chain node port. The first `--rpc-port` setting specifies the port you can connect to the collator. The second `--rpc-port` specifies the port for connecting to the embedded relay chain.
-## Obtain Coretime
+## Producing Blocks
With your parachain collator operational, the next step is acquiring coretime. This is essential for ensuring your parachain's security through the relay chain. [Agile Coretime](https://wiki.polkadot.network/docs/learn-agile-coretime){target=\_blank} enhances Polkadot's resource management, offering developers greater economic adaptability. Once you have configured your parachain, you can follow two paths:
- Bulk coretime is purchased via the Broker pallet on the respective coretime system parachain. You can purchase bulk coretime on the coretime chain and assign the purchased core to the registered `ParaID`
- On-demand coretime is ordered via the `OnDemandAssignment` pallet, which is located on the respective relay chain
+Once coretime is correctly assigned to your parachain, whether bulk or on-demand, blocks should be produced (provided your collator is running).
+
For more information on coretime, refer to the [Coretime](/polkadot-protocol/architecture/system-chains/coretime/){target=\_blank} documentation.
diff --git a/tutorials/polkadot-sdk/parachains/deploy-to-relay-chain/index.md b/tutorials/polkadot-sdk/parachains/deploy-to-relay-chain/index.md
new file mode 100644
index 000000000..d58493cec
--- /dev/null
+++ b/tutorials/polkadot-sdk/parachains/deploy-to-relay-chain/index.md
@@ -0,0 +1,25 @@
+---
+title: Deploy on a Relay Chain
+description: Learn how to deploy on a live relay chain including, how to acquire Coretime, manage / setup collators, and what artifacts are needed to deploy your parachain.
+hide:
+ - feedback
+template: index-page.html
+---
+
+# Deploy to a Relay Chain
+
+Deploying to a relay chain generally involves the following steps:
+
+1. Reserving your Parachain's ID
+2. Uploading the genesis state and runtime
+3. Ensuring you have collators ready to deploy (or at least one running locally to produce blocks)
+4. Obtaining Coretime - Either Bulk (long term block production) or On Demand (ordering blocks as you need)
+
+Depending on the relay chain you are deploying on, the costs for registering the runtime and genesis state will vary. If you are registering on a TestNet like [Paseo](/develop/networks/#paseo), you will have to apply for a slot through a form or ask for enough PAS to register your runtime code:
+
+- [Paseo Parachain Onboarding Form](https://github.com/paseo-network/support/issues/new?assignees=al3mart%2Chbulgarini%2Ceduclerici-zondax&labels=onboard-para&projects=&template=onboard-parachain.yaml&title=%5BParachain+Onboarding+%7C+Slot+Request%5D+ParaId%3A+%3Cyour_paraId%3E){target=\_blank}
+- [Paseo Support Matrix Chat Room](https://matrix.to/#/#paseo-testnet-support:parity.io){target=\_blank}
+
+## In This Section
+
+:::INSERT_IN_THIS_SECTION:::
\ No newline at end of file