Skip to content

Make polkadot-sdk templates OMNI and GREAT again -- part 2 #5242

@kianenigma

Description

@kianenigma

Note

The follow-up to #3155, and a huge shoutout to @rzadp so far for his help.

Now we have a new system that syncs our 3 templates into 3 repos, every few weeks, all automatic, guaranteed to work.

The purpose of these 3 templates will be to demonstrate all the latest features of polkadot-sdk, and act as un-opinionated starting points. We expect other teams to build more opinionated templates, and feel free to add these to https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/polkadot_sdk/templates/index.html

I have spread the word of what needs to be done to push the template revamp to full completion in the above issue, but the thread has gotten a bit unorganized by now. In this issue, I will re-iterate the action items.

Tip

All of the work mentioned here is, in my opinion, high impact, and relatively simple. This means: great oppurtunity for both Parity and external contributors!

FRAME / Umbrella Related

Integrate latest features of FRAME and umbrella crates into templates.

Use polkadot-sdk and polkadot-sdk-frame

The entire template should mostly be 3 crates: polkadot-sdk plus, codec and scale-info. For the case of polkadot-sdk-frame, please use prelude::*. If a prelude is missing something, open a PR and add it. If there should be further preludes (e.g. frame::benchmarking_prelude::*?) please add one.

I have logged a few important issues about polkadot-sdk-frame that are not solved yet either, most notably:

Use #[frame::runtime]

Prepare Templates for OMNI Node future

see: #5568

Provide GenesisConfig presets.

The runtime should start exposing at least a development genesis-config, which should be used for testing. Other chain-specs that are currently embedded in the node should also be replicated.

Make node compilation optional - #5940

The node doesn't compile by default when you do cargo build. It should be feature gated behind --features with-node. By default, the template only compiles the runtime and produces a wam. Instead, the user is invited to download polkadot-omni-node/polkadot-parachain.

This makes having ARM binaries quite important: #802

To run this wasm, one is expected to use do either of:

List:

  • 🚨 minimal
  • solochain: Should not happen, as the omni-node cannot support running a solochain
  • 🚨 parachain

Provide chopsticks.yaml

  • minimal
  • solochain
  • 🚨 parachain

Mark templates in substrate-developer-hub as archived.

More ideas? Yes, Sky's the limit!

There is a lot more that can be done to make the polkadot-sdk templates look nice. Be creative and proactive! Look to your favorite tools, repos and templates, and see what elements they have that make enjoy using them, and being them over :)

Metadata

Metadata

Labels

C1-mentorA task where a mentor is available. Please indicate in the issue who the mentor could be.C2-good-first-issueA task for a first time contributor to become familiar with the Polkadot-SDK.I6-metaA specific issue for grouping tasks or bugs of a specific category.

Type

No type

Projects

Status

Milestone 0

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions