Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intro to Parachain Development Section 4 #133

Merged
merged 12 commits into from
Oct 12, 2023
52 changes: 52 additions & 0 deletions docs/Parachain/beginner/section4/deployment-strat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
id: deployment-strat
title: Deployment Strategies
sidebar_label: Deployment Strategies
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, with Kusama
having altered parameters for various mechanisms related to parachains leases and crowdloans.

## Testnet - Deploying on Rococo

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 and
test your parachain in an actual multi-chain environment.

## Achieve a Parachain Slot Candle Auctions
CrackTheCode016 marked this conversation as resolved.
Show resolved Hide resolved

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

:::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

:::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).
3 changes: 3 additions & 0 deletions docs/Parachain/beginner/section4/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

<DocCardList />
19 changes: 19 additions & 0 deletions docs/Parachain/beginner/section4/initatives.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,22 @@ title: Ecosystem Initiatives
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)
87 changes: 87 additions & 0 deletions docs/Parachain/beginner/section4/road-to-production.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,90 @@ title: Road to Production
sidebar_label: Road to Production
description: Learn the next technical steps to put your parachain to the road of production.
---

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
CrackTheCode016 marked this conversation as resolved.
Show resolved Hide resolved

The following is mostly based off of common approaches that have been implemented over the years by
different parachains within the ecosystem.

:::

## 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["Rococo 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
[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).

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

There are a number of different parachains to reference. All use Substrate as the base, but have
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.

In order to do this, more elaborate schemes containing game theory and economics are often involved
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 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.

:::

### 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
CrackTheCode016 marked this conversation as resolved.
Show resolved Hide resolved
more to ensure resilience.

## Stuck? Ask on StackExchange, or reach out on the Polkadot Forum
CrackTheCode016 marked this conversation as resolved.
Show resolved Hide resolved

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/).
1 change: 1 addition & 0 deletions sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,7 @@ module.exports = {
items: [
"Parachain/beginner/section4/initatives",
"Parachain/beginner/section4/road-to-production",
"Parachain/beginner/section4/deployment-strat",
],
},
],
Expand Down
Loading