Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Add Parachain Template #620

Merged
merged 31 commits into from
Sep 23, 2021
Merged

Add Parachain Template #620

merged 31 commits into from
Sep 23, 2021

Conversation

HCastano
Copy link
Contributor

This stems from the discussions in paritytech/canvas#88.

The idea is that projects building parachains have to keep up with pretty recent versions
of Cumulus, Polkadot, and Substrate. However, there's no good resource to use as a
reference for what a parachain runtime and node should look like with the latest changes
across all of these repos. As such, we need an equivalent to the node-template for Cumulus.

This template is based off the Canvas parachain, which in turn is based off the
substrate-parachain-template. Both of these projects hope to use this new template as
their reference going forward.

@HCastano
Copy link
Contributor Author

It looks like the CI issue is the same as mentioned here: #605 (comment).

Copy link
Contributor

@riusricardo riusricardo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good so far. I just think that the README could get easily outdated so I prefer a simpler version here.

Cargo.lock Show resolved Hide resolved
parachain-template/README.md Outdated Show resolved Hide resolved
parachain-template/README.md Outdated Show resolved Hide resolved
parachain-template/runtime/src/lib.rs Outdated Show resolved Hide resolved
HCastano and others added 3 commits September 20, 2021 17:23
Co-authored-by: Ricardo Rius <9488369+riusricardo@users.noreply.github.com>
Co-authored-by: Ricardo Rius <9488369+riusricardo@users.noreply.github.com>
Copy link
Contributor

@cmichi cmichi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found some nitpicks, looks good besides that!

parachain-template/README.md Outdated Show resolved Hide resolved
@@ -0,0 +1,3 @@
pub mod chain_spec;
mod rpc;
pub mod service;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this file is not used anywhere, for Substrate's node-template I removed it here.

"flags": [
"--force-authoring",
"--",
"--execution=wasm"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we actually need to specify the execution engine?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, that value is passed to the polkadot full node in the collator node and it is required to make it always follow the latest relay chain logic.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know if there's a reason why this value is not the default?

Copy link
Contributor

@riusricardo riusricardo Sep 22, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No idea, maybe because in the future we want to decouple the polkadot node from the collator giving the user more flexibility. But I'm guessing here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You only need this because we don't use strict spec_version bumps etc. It is also important that you use the same commit in polkadot as you use in your template from polkadot to have the exact same native runtime.

As we can not ensure this, running everything in wasm is more safe.

parachain-template/runtime/build.rs Outdated Show resolved Hide resolved
parathreads [here](https://wiki.polkadot.network/docs/learn-parathreads).

To learn about how to actually use the template to hack together your own parachain check out the
`README` from the [`substrate-parachain-template` repository](https://github.com/substrate-developer-hub/substrate-parachain-template/).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about adding a note here explaining that the template is geared towards Rococo (and thus ROC) and an explanatory link for Rococo?

Copy link
Contributor

@riusricardo riusricardo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

HCastano and others added 4 commits September 22, 2021 10:02
Co-authored-by: Michael Müller <michi@parity.io>
Co-authored-by: Michael Müller <michi@parity.io>
@HCastano
Copy link
Contributor Author

@bkchr do you want to take a quick look at this, or should we go ahead and merge it?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants