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

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

Open
7 of 18 tasks
kianenigma opened this issue Aug 5, 2024 · 1 comment
Open
7 of 18 tasks

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

kianenigma opened this issue Aug 5, 2024 · 1 comment
Labels
C1-mentor A task where a mentor is available. Please indicate in the issue who the mentor could be. C2-good-first-issue A task for a first time contributor to become familiar with the Polkadot-SDK. I6-meta A specific issue for grouping tasks or bugs of a specific category.

Comments

@kianenigma
Copy link
Contributor

kianenigma commented Aug 5, 2024

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!

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]

  • minimal
  • solochain
  • parachain

Use #[derive_impl]

Note that this also means in the testing code of the template pallet that lives in each template. For production, there is still an ongoing exploration by @gupnik to see if we can use it or not. See #5111 (comment)

  • minimal
  • solochain
  • parachain

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 + Provide chopsticks.yaml

This is an important step in the direction of omni-nodes: our templates should be such that they encourage you to not build the node all the time. We achieve this by:

  1. Adding configuration + guides on how to locally run your runtime with just chopsticks (and maybe someday with a add dev-omni-node #5117 or similar)
  2. The node doesn't even compile by default when you do cargo br. It should be feature gated.
  • 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 :)

@kianenigma kianenigma added I6-meta A specific issue for grouping tasks or bugs of a specific category. T17-Templates This PR/Issue is related to templates labels Aug 5, 2024
@michalkucharczyk
Copy link
Contributor

Just for a record: here is a comment with some pending-follow-ups improvements that can be done in the context of Provide GenesisConfig presets task:
#4739 (comment)

@kianenigma kianenigma added C1-mentor A task where a mentor is available. Please indicate in the issue who the mentor could be. C2-good-first-issue A task for a first time contributor to become familiar with the Polkadot-SDK. and removed T17-Templates This PR/Issue is related to templates labels Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C1-mentor A task where a mentor is available. Please indicate in the issue who the mentor could be. C2-good-first-issue A task for a first time contributor to become familiar with the Polkadot-SDK. I6-meta A specific issue for grouping tasks or bugs of a specific category.
Projects
Status: Milestone 1
Development

No branches or pull requests

2 participants