From ecab80a5bdd496f8758be6abfb1a2df888eec851 Mon Sep 17 00:00:00 2001 From: Bader Youssef Date: Wed, 13 Sep 2023 13:56:39 -0400 Subject: [PATCH 01/11] scaffold --- docs/Parachain/beginner/section4/index.md | 3 +++ docs/Parachain/beginner/section4/initatives.md | 4 ++++ docs/Parachain/beginner/section4/road-to-production.md | 10 ++++++++++ 3 files changed, 17 insertions(+) diff --git a/docs/Parachain/beginner/section4/index.md b/docs/Parachain/beginner/section4/index.md index 195a10e6c..6a3036b20 100644 --- a/docs/Parachain/beginner/section4/index.md +++ b/docs/Parachain/beginner/section4/index.md @@ -4,4 +4,7 @@ title: Moving Forward import DocCardList from '@theme/DocCardList'; +With your new knowledge of how to provision your own local environment for testing relay chain and +parachain configurations, it's time to learn the next steps for your parachain's journey. + diff --git a/docs/Parachain/beginner/section4/initatives.md b/docs/Parachain/beginner/section4/initatives.md index ab3597de7..34a2e1719 100644 --- a/docs/Parachain/beginner/section4/initatives.md +++ b/docs/Parachain/beginner/section4/initatives.md @@ -4,3 +4,7 @@ title: Ecosystem Initiatives sidebar_label: Ecosystem Initiatives description: Explore different avenues for expanding your project within the Polkadot ecosystem. --- + +## Substrate Builders Program + +## Developer Heroes diff --git a/docs/Parachain/beginner/section4/road-to-production.md b/docs/Parachain/beginner/section4/road-to-production.md index 91f46daa2..aebd163f0 100644 --- a/docs/Parachain/beginner/section4/road-to-production.md +++ b/docs/Parachain/beginner/section4/road-to-production.md @@ -4,3 +4,13 @@ title: Road to Production sidebar_label: Road to Production description: Learn the next technical steps to put your parachain to the road of production. --- + +## Parachain Operational Models + +## Existing References + +## Game Theory & Economics + +## Parachain Design Decisions + +## Stuck? Ask on StackExchange, or reach out on the Polkadot Forum From 5487abd7f3498452426d51f640d178c22c6fcb3a Mon Sep 17 00:00:00 2001 From: Bader Youssef Date: Wed, 11 Oct 2023 12:53:16 -0400 Subject: [PATCH 02/11] initatives --- .../beginner/section4/deployment-strat.md | 6 ++++++ docs/Parachain/beginner/section4/initatives.md | 15 +++++++++++++++ sidebars.js | 1 + 3 files changed, 22 insertions(+) create mode 100644 docs/Parachain/beginner/section4/deployment-strat.md diff --git a/docs/Parachain/beginner/section4/deployment-strat.md b/docs/Parachain/beginner/section4/deployment-strat.md new file mode 100644 index 000000000..3a2688738 --- /dev/null +++ b/docs/Parachain/beginner/section4/deployment-strat.md @@ -0,0 +1,6 @@ +--- +id: deployment-strat +title: Deployment Strategies +sidebar_label: Deployment Strategies +description: Explore different relay chains for deploying your parachains +--- diff --git a/docs/Parachain/beginner/section4/initatives.md b/docs/Parachain/beginner/section4/initatives.md index 34a2e1719..faf040b14 100644 --- a/docs/Parachain/beginner/section4/initatives.md +++ b/docs/Parachain/beginner/section4/initatives.md @@ -5,6 +5,21 @@ sidebar_label: Ecosystem Initiatives description: Explore different avenues for expanding your project within the Polkadot ecosystem. --- +The Polkadot ecosystem includes active initiatives for those wishing to build. + ## Substrate Builders Program +The Substrate Builders Program offers a direct connection to a team of experts for developing, +deploying, and scaling your parachain. They provide guidance and mentorship for those wanting to +start their parachain development journey. + +[Learn more here.](https://substrate.io/ecosystem/substrate-builders-program/) + ## Developer Heroes + +The Polkadot Developer Heroes program offers a place for builders to gather, ask questions, and +learn from one another. The program’s goal is to build a strong collaborative community of Polkadot +developers, from new joiners to advanced levels, to drive the growth and evolution of the Polkadot +ecosystem, and in the meantime, to recognize, support, and elevate exceptional developers. + +[Learn more here.](https://www.polkadot.network/blog/introducing-the-polkadot-developer-heroes-program) diff --git a/sidebars.js b/sidebars.js index 4636cd2a6..8ef6a30f7 100644 --- a/sidebars.js +++ b/sidebars.js @@ -414,6 +414,7 @@ module.exports = { items: [ "Parachain/beginner/section4/initatives", "Parachain/beginner/section4/road-to-production", + "Parachain/beginner/section4/deployment-strat", ], }, ], From d14e2656f5f18f9439b220c3533f68d0f48ce822 Mon Sep 17 00:00:00 2001 From: Bader Youssef Date: Wed, 11 Oct 2023 16:19:38 -0400 Subject: [PATCH 03/11] draft road to prod --- .../beginner/section4/deployment-strat.md | 6 ++ .../beginner/section4/road-to-production.md | 79 ++++++++++++++++++- 2 files changed, 83 insertions(+), 2 deletions(-) diff --git a/docs/Parachain/beginner/section4/deployment-strat.md b/docs/Parachain/beginner/section4/deployment-strat.md index 3a2688738..8f0f11ecb 100644 --- a/docs/Parachain/beginner/section4/deployment-strat.md +++ b/docs/Parachain/beginner/section4/deployment-strat.md @@ -4,3 +4,9 @@ title: Deployment Strategies sidebar_label: Deployment Strategies description: Explore different relay chains for deploying your parachains --- + +## Testnet - Deploying on Roccoco + +## Canary - Deploying on Kusama + +## Production - Deploying on Polkadot diff --git a/docs/Parachain/beginner/section4/road-to-production.md b/docs/Parachain/beginner/section4/road-to-production.md index aebd163f0..b247d98f1 100644 --- a/docs/Parachain/beginner/section4/road-to-production.md +++ b/docs/Parachain/beginner/section4/road-to-production.md @@ -5,12 +5,87 @@ sidebar_label: Road to Production description: Learn the next technical steps to put your parachain to the road of production. --- -## Parachain Operational Models +The road to production for a parachain can be a daunting process. Luckily, there is a clear path to +progression from prototype, to testnet, to canary (if desired), to production. + +:::info The following is empirical advice + +The following is mostly based off of common approaches that have been implemented over the years. + +::: + +## Parachain Development Funnel + +A parachain usually goes through the following "development funnel" from prototype to production: + +```mermaid +flowchart LR +subgraph DS["Development Stage"] + PS["Prototype Stage"] --> TS["Testnet Stage"] --> CS["Canary Stage"] --> PRS("Production Stage") +end +subgraph DEP["Deployment"] +LOCAL["Local Relay Chain Development"] --> ROC["Roccoco Testnet Deployment"] --> KSM["Kusama Deployment"] --> DOT("Polkadot Deployment") +end + +DEP --- DS +``` + +Most parachains within the ecosystem have adopted this pattern of deployment. This guide shows you +how to accomplish the first part with a setup catered to local development. After this, it is +typical to look to deploy to a testnet, such as +[Roccoco](./deployment-strat.md#testnet---deploying-on-roccoco). After that, most parachains opt to +either go directly to [Polkadot](./deployment-strat.md#production---deploying-on-polkadot), or setup +a canary network on [Kusama](./deployment-strat.md#canary---deploying-on-kusama). + +There are quite a few parachains which have networks both on Kusama and Polkadot. + +:::info What's the purpose of deploying on a canary network? + +Most parachains use Kusama as a 'chaotic' testing ground for ensuring their network work in a +production-like setting. + +::: ## Existing References -## Game Theory & Economics +There are a number of different parachains to reference. All use Substrate as the base, but have +varying implementations depending on their usecase. ## Parachain Design Decisions +When building a parachain, there are a number of design decisions that go beyond pure code. +Parachains should be concerned with maximizing the blockspace they purchase, whether that is through +auction or pay to go schemes. + +In order to do this, more elaborate schemes containing game theory and economics are often involved +to ensure the parachain itself remains a "closed-feedback loop" so to speak. + +:::info But I thought Polkadot Secures My Parachain For Me? + +The parachain's consensus and finality is guranteed by Polkadot, yes. However, the parachain itself +is responsible for the business logic, whether it chooses to incentivize its collators, any staking +mechanisms, and any other domain specific logic. It is possible for an attacker to exploit a +parachain's mechanism if it isn't designed well or contains a vector for attack. + +::: + +### Game Theory & Economics + +To learn more about **applied** game theory and economics aspects, check out the +[Polkadot Blockchain Academy's](https://polkadot-blockchain-academy.github.io/pba-book/economics/index.html) +section on it. + +### On Collation + +Collators are necessary to keep the parachain syncing and finalizing with the relay chain. A +parachain only really needs one, **honest** collator at minimum, however it is advisable to have +more to ensure resilience. + ## Stuck? Ask on StackExchange, or reach out on the Polkadot Forum + +If you get stuck on a technical issue, make sure to ask on +[The Substrate Stack Exchange](https://substrate.stackexchange.com/). It often has those more +acquainted with the protocol ready to answer any technical questions. + +If you want to get feedback for an idea or consult the wider ecosystem, feel free to post on the +[Polkadot Forum](https://forum.polkadot.network/). From f4ffbcba83406c1d941a0f0a99d1abf1409ec12f Mon Sep 17 00:00:00 2001 From: Bader Youssef Date: Wed, 11 Oct 2023 16:24:07 -0400 Subject: [PATCH 04/11] start deployment strategies --- docs/Parachain/beginner/section4/deployment-strat.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/Parachain/beginner/section4/deployment-strat.md b/docs/Parachain/beginner/section4/deployment-strat.md index 8f0f11ecb..6da52ad0d 100644 --- a/docs/Parachain/beginner/section4/deployment-strat.md +++ b/docs/Parachain/beginner/section4/deployment-strat.md @@ -5,8 +5,14 @@ sidebar_label: Deployment Strategies description: Explore different relay chains for deploying your parachains --- +The following explores different ways one can register a parachain on Roccoco, Kusama, or Polkadot. +Keep in mind that the process of registering on Kusama versus Polkadot is quite similar, however +Kusama has more relaxed auction parameters. + ## Testnet - Deploying on Roccoco -## Canary - Deploying on Kusama +## Candle Auctions + +### Canary - Deploying on Kusama -## Production - Deploying on Polkadot +### Production - Deploying on Polkadot From 9e20022dd25998e1c2acc526f6333882799935a7 Mon Sep 17 00:00:00 2001 From: Bader Youssef Date: Wed, 11 Oct 2023 19:43:06 -0400 Subject: [PATCH 05/11] draft deployment --- .../beginner/section4/deployment-strat.md | 28 +++++++++++++++++-- .../beginner/section4/road-to-production.md | 4 +-- 2 files changed, 27 insertions(+), 5 deletions(-) diff --git a/docs/Parachain/beginner/section4/deployment-strat.md b/docs/Parachain/beginner/section4/deployment-strat.md index 6da52ad0d..68938c4b7 100644 --- a/docs/Parachain/beginner/section4/deployment-strat.md +++ b/docs/Parachain/beginner/section4/deployment-strat.md @@ -5,14 +5,36 @@ sidebar_label: Deployment Strategies description: Explore different relay chains for deploying your parachains --- -The following explores different ways one can register a parachain on Roccoco, Kusama, or Polkadot. +The following explores different ways one can register a parachain on Rococo, Kusama, or Polkadot. Keep in mind that the process of registering on Kusama versus Polkadot is quite similar, however Kusama has more relaxed auction parameters. -## Testnet - Deploying on Roccoco +## Testnet - Deploying on Rococo -## Candle Auctions +Rococo is a testnet for parachains. If you're looking to have a very realistic configuration +(similar to Polkadot's) to connect to, then Rococo is the place to start after you've completed +developing and testing locally. + +Deploying to Rococo requires submitting a form, +[which you may find here.](https://github.com/paritytech/subport/issues/new?assignees=al3mart%2CAlexD10S&labels=Rococo&projects=&template=rococo.yaml) + +This will enable you obtain a parachain slot and subsequently deploy your parachain on Rococo, test +your various mechanisms in an actual multi-chain environment with virtually zero stakes. + +## Achieve a Parachain Slot Candle Auctions + +Obtaining a slot on Polkadot or Kusama is a different process - you will need to participate in a +[candle-style auction](https://wiki.polkadot.network/docs/learn-auction#mechanics-of-a-candle-auction). +Unlike Rococo, you will need to participate in a +[slot auction](https://wiki.polkadot.network/docs/learn-auction) for a slot on either of these +networks. ### Canary - Deploying on Kusama +Find the details to deploy a parachain on +[Kusama here](https://guide.kusama.network/docs/learn-auction). + ### Production - Deploying on Polkadot + +Find the details to deploy a parachain on +[Kusama here](https://wiki.polkadot.network/docs/learn-auction). diff --git a/docs/Parachain/beginner/section4/road-to-production.md b/docs/Parachain/beginner/section4/road-to-production.md index b247d98f1..6d1e530ec 100644 --- a/docs/Parachain/beginner/section4/road-to-production.md +++ b/docs/Parachain/beginner/section4/road-to-production.md @@ -24,7 +24,7 @@ subgraph DS["Development Stage"] PS["Prototype Stage"] --> TS["Testnet Stage"] --> CS["Canary Stage"] --> PRS("Production Stage") end subgraph DEP["Deployment"] -LOCAL["Local Relay Chain Development"] --> ROC["Roccoco Testnet Deployment"] --> KSM["Kusama Deployment"] --> DOT("Polkadot Deployment") +LOCAL["Local Relay Chain Development"] --> ROC["Rococo Testnet Deployment"] --> KSM["Kusama Deployment"] --> DOT("Polkadot Deployment") end DEP --- DS @@ -33,7 +33,7 @@ DEP --- DS Most parachains within the ecosystem have adopted this pattern of deployment. This guide shows you how to accomplish the first part with a setup catered to local development. After this, it is typical to look to deploy to a testnet, such as -[Roccoco](./deployment-strat.md#testnet---deploying-on-roccoco). After that, most parachains opt to +[Rococo](./deployment-strat.md#testnet---deploying-on-Rococo). After that, most parachains opt to either go directly to [Polkadot](./deployment-strat.md#production---deploying-on-polkadot), or setup a canary network on [Kusama](./deployment-strat.md#canary---deploying-on-kusama). From f2d26db18235a433e799440e4896bba62ec288f5 Mon Sep 17 00:00:00 2001 From: Bader Youssef Date: Thu, 12 Oct 2023 08:35:10 -0400 Subject: [PATCH 06/11] deploy --- .../beginner/section4/deployment-strat.md | 26 ++++++++++++++----- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/docs/Parachain/beginner/section4/deployment-strat.md b/docs/Parachain/beginner/section4/deployment-strat.md index 68938c4b7..b41254218 100644 --- a/docs/Parachain/beginner/section4/deployment-strat.md +++ b/docs/Parachain/beginner/section4/deployment-strat.md @@ -6,8 +6,8 @@ description: Explore different relay chains for deploying your parachains --- The following explores different ways one can register a parachain on Rococo, Kusama, or Polkadot. -Keep in mind that the process of registering on Kusama versus Polkadot is quite similar, however -Kusama has more relaxed auction parameters. +Keep in mind that the process of registering on Kusama versus Polkadot is quite similar, with Kusama +having altered parameters for various mechanisms related to parachains leases and crowdloans. ## Testnet - Deploying on Rococo @@ -18,8 +18,8 @@ developing and testing locally. Deploying to Rococo requires submitting a form, [which you may find here.](https://github.com/paritytech/subport/issues/new?assignees=al3mart%2CAlexD10S&labels=Rococo&projects=&template=rococo.yaml) -This will enable you obtain a parachain slot and subsequently deploy your parachain on Rococo, test -your various mechanisms in an actual multi-chain environment with virtually zero stakes. +This will enable you obtain a parachain slot and subsequently deploy your parachain on Rococo and +test your parachain in an actual multi-chain environment. ## Achieve a Parachain Slot Candle Auctions @@ -31,10 +31,22 @@ networks. ### Canary - Deploying on Kusama -Find the details to deploy a parachain on +:::warning More detailed instructions coming soon + +This section is currently incomplete. + +::: + +Find details on how auctions are used to obtain a parachain slot on [Kusama here](https://guide.kusama.network/docs/learn-auction). ### Production - Deploying on Polkadot -Find the details to deploy a parachain on -[Kusama here](https://wiki.polkadot.network/docs/learn-auction). +:::warning More detailed instructions coming soon + +This section is currently incomplete. + +::: + +Find details on how auctions are used to obtain a parachain slot on +[Polkadot here](https://wiki.polkadot.network/docs/learn-auction). From 0dbc6c1f8ce4d698306dd35a3f7eda9d16727e27 Mon Sep 17 00:00:00 2001 From: Bader Youssef Date: Thu, 12 Oct 2023 08:42:45 -0400 Subject: [PATCH 07/11] tweaks --- .../beginner/section4/road-to-production.md | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/docs/Parachain/beginner/section4/road-to-production.md b/docs/Parachain/beginner/section4/road-to-production.md index 6d1e530ec..d485f0524 100644 --- a/docs/Parachain/beginner/section4/road-to-production.md +++ b/docs/Parachain/beginner/section4/road-to-production.md @@ -10,7 +10,8 @@ progression from prototype, to testnet, to canary (if desired), to production. :::info The following is empirical advice -The following is mostly based off of common approaches that have been implemented over the years. +The following is mostly based off of common approaches that have been implemented over the years by +different parachains within the ecosystem. ::: @@ -49,22 +50,23 @@ production-like setting. ## Existing References There are a number of different parachains to reference. All use Substrate as the base, but have -varying implementations depending on their usecase. +varying implementations depending on their usecase. You may find a comphrensive list of these +parachains on [parachains.info](https://parachains.info/). ## Parachain Design Decisions When building a parachain, there are a number of design decisions that go beyond pure code. -Parachains should be concerned with maximizing the blockspace they purchase, whether that is through -auction or pay to go schemes. +Parachains should be concerned with maximizing the blockspace they purchase. In order to do this, more elaborate schemes containing game theory and economics are often involved -to ensure the parachain itself remains a "closed-feedback loop" so to speak. +to ensure the parachain itself remains self-sufficient within its own means and domain-specific +functionality. :::info But I thought Polkadot Secures My Parachain For Me? -The parachain's consensus and finality is guranteed by Polkadot, yes. However, the parachain itself -is responsible for the business logic, whether it chooses to incentivize its collators, any staking -mechanisms, and any other domain specific logic. It is possible for an attacker to exploit a +**The parachain's consensus and finality is guaranteed by Polkadot, yes.** However, the parachain +itself is responsible for the business logic, whether it chooses to incentivize its collators, any +staking mechanisms, and any other domain-specific logic. It is possible for an attacker to exploit a parachain's mechanism if it isn't designed well or contains a vector for attack. ::: From c5c32f183e791e5ad2d78ad8164d03397c22c510 Mon Sep 17 00:00:00 2001 From: bader y Date: Thu, 12 Oct 2023 09:33:29 -0400 Subject: [PATCH 08/11] Update docs/Parachain/beginner/section4/deployment-strat.md Co-authored-by: Radha <86818441+DrW3RK@users.noreply.github.com> --- docs/Parachain/beginner/section4/deployment-strat.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Parachain/beginner/section4/deployment-strat.md b/docs/Parachain/beginner/section4/deployment-strat.md index b41254218..8b72fa83f 100644 --- a/docs/Parachain/beginner/section4/deployment-strat.md +++ b/docs/Parachain/beginner/section4/deployment-strat.md @@ -21,7 +21,7 @@ Deploying to Rococo requires submitting a form, This will enable you obtain a parachain slot and subsequently deploy your parachain on Rococo and test your parachain in an actual multi-chain environment. -## Achieve a Parachain Slot Candle Auctions +## Lease a Parachain Slot through Auctions Obtaining a slot on Polkadot or Kusama is a different process - you will need to participate in a [candle-style auction](https://wiki.polkadot.network/docs/learn-auction#mechanics-of-a-candle-auction). From dd0b5ae2d971464874f691bd8fbd7c069a284ff9 Mon Sep 17 00:00:00 2001 From: bader y Date: Thu, 12 Oct 2023 09:33:35 -0400 Subject: [PATCH 09/11] Update docs/Parachain/beginner/section4/road-to-production.md Co-authored-by: Radha <86818441+DrW3RK@users.noreply.github.com> --- docs/Parachain/beginner/section4/road-to-production.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Parachain/beginner/section4/road-to-production.md b/docs/Parachain/beginner/section4/road-to-production.md index d485f0524..e8e2b9baf 100644 --- a/docs/Parachain/beginner/section4/road-to-production.md +++ b/docs/Parachain/beginner/section4/road-to-production.md @@ -8,7 +8,7 @@ description: Learn the next technical steps to put your parachain to the road of The road to production for a parachain can be a daunting process. Luckily, there is a clear path to progression from prototype, to testnet, to canary (if desired), to production. -:::info The following is empirical advice +:::info The following is an empirical advice The following is mostly based off of common approaches that have been implemented over the years by different parachains within the ecosystem. From ce36759ecd57232a58a3442d47e21b201d72e040 Mon Sep 17 00:00:00 2001 From: bader y Date: Thu, 12 Oct 2023 09:33:50 -0400 Subject: [PATCH 10/11] Update docs/Parachain/beginner/section4/road-to-production.md Co-authored-by: Radha <86818441+DrW3RK@users.noreply.github.com> --- docs/Parachain/beginner/section4/road-to-production.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Parachain/beginner/section4/road-to-production.md b/docs/Parachain/beginner/section4/road-to-production.md index e8e2b9baf..76ad65dd9 100644 --- a/docs/Parachain/beginner/section4/road-to-production.md +++ b/docs/Parachain/beginner/section4/road-to-production.md @@ -80,7 +80,7 @@ section on it. ### On Collation Collators are necessary to keep the parachain syncing and finalizing with the relay chain. A -parachain only really needs one, **honest** collator at minimum, however it is advisable to have +parachain only really needs one **honest** collator at minimum, however, it is advisable to have more to ensure resilience. ## Stuck? Ask on StackExchange, or reach out on the Polkadot Forum From dda7daecfc6a77fccb8d0e2a32c8993019644ad2 Mon Sep 17 00:00:00 2001 From: bader y Date: Thu, 12 Oct 2023 09:33:56 -0400 Subject: [PATCH 11/11] Update docs/Parachain/beginner/section4/road-to-production.md Co-authored-by: Radha <86818441+DrW3RK@users.noreply.github.com> --- docs/Parachain/beginner/section4/road-to-production.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Parachain/beginner/section4/road-to-production.md b/docs/Parachain/beginner/section4/road-to-production.md index 76ad65dd9..4afc310da 100644 --- a/docs/Parachain/beginner/section4/road-to-production.md +++ b/docs/Parachain/beginner/section4/road-to-production.md @@ -83,7 +83,7 @@ Collators are necessary to keep the parachain syncing and finalizing with the re parachain only really needs one **honest** collator at minimum, however, it is advisable to have more to ensure resilience. -## Stuck? Ask on StackExchange, or reach out on the Polkadot Forum +## Stuck with an issue? Ask on StackExchange If you get stuck on a technical issue, make sure to ask on [The Substrate Stack Exchange](https://substrate.stackexchange.com/). It often has those more