-
Notifications
You must be signed in to change notification settings - Fork 704
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
[Templates] Systematic way to synchronize the templates in this repo and substrate-developer-hub
#3155
Comments
Related to paritytech/polkadot-sdk-docs#67 (comment) . I am an advocate to archive the who devhub org as soon as a MVP for the Rust Docs vision to replace it is in place (perhaps unarchive to update links/redirects when ready to promote the maintained version(s)). IIRC (although I didn't deeply eval the tooling myself) the CI scripts to modify a few files and make a top level Cargo.toml was fairly simple, likely easy to update for this. One other path I would suggest in making a tool (perhaps something for RE: deprecation of even any MVP solo-chain option seems anti-ethos to what I understand Substrate to be: a blockchain building framework. Not exclusively a parachain building one. I sure hope that the SDK doesn't move to try and make it difficult to use Substrate as a product on it's own. That and I would argue maintaining a solo-chain option has benefits to learning (consensus, tokenomics, governance, etc.) for users on how a blockchain works more than just a dev-mode like FRAME engine. A MVP template that is a fully functional blockchain is a great way to read and play with the "real thing" I would surely miss. I would hope maintaining this template would be a relatively light lift, as the relay-chain's needs as a solo-chain are quite closely related to a MVP solo-chain template. |
After brainstorming with @gupnik about this a bit more, using any type of git-based system like submodules and subtrees totally defies the purpose as these nested templates cannot use relative paths in their What we suggest doing is the following:
|
The first step towards #3155 Brings all templates under the following structure ``` templates | parachain | | polkadot-launch | | runtime --> parachain-template-runtime | | pallets --> pallet-parachain-template | | node --> parachain-template-node | minimal | | runtime --> minimal-template-runtime | | pallets --> pallet-minimal-template | | node --> minimal-template-node | solochain | | runtime --> solochain-template-runtime | | pallets --> pallet-template (the naming is not consistent here) | | node --> solochain-template-node ``` The only note-worthy changes in this PR are: - More `Cargo.toml` fields are forwarded to use the one from the workspace. - parachain template now has weights and benchmarks - adds a shell pallet to the minimal template - remove a few unused deps A list of possible follow-ups: - [ ] Unify READMEs, create a parent README for all - [ ] remove references to `docs.substrate.io` in templates - [ ] make all templates use `#[derive_impl]` - [ ] update and unify all licenses - [ ] Remove polkadot launch, use https://github.com/paritytech/polkadot-sdk/blob/35349df993ea2e7c4769914ef5d199e787b23d4c/cumulus/zombienet/examples/small_network.toml instead.
now that #3460 is merged, before attempting to automate the rest, this is what is more or less needed.
This should guarantee that there is a new template that will 100% work from the versions maintained in this repo. Then, we should archive all the ones in https://github.com/substrate-developer-hub/ |
The first step towards paritytech#3155 Brings all templates under the following structure ``` templates | parachain | | polkadot-launch | | runtime --> parachain-template-runtime | | pallets --> pallet-parachain-template | | node --> parachain-template-node | minimal | | runtime --> minimal-template-runtime | | pallets --> pallet-minimal-template | | node --> minimal-template-node | solochain | | runtime --> solochain-template-runtime | | pallets --> pallet-template (the naming is not consistent here) | | node --> solochain-template-node ``` The only note-worthy changes in this PR are: - More `Cargo.toml` fields are forwarded to use the one from the workspace. - parachain template now has weights and benchmarks - adds a shell pallet to the minimal template - remove a few unused deps A list of possible follow-ups: - [ ] Unify READMEs, create a parent README for all - [ ] remove references to `docs.substrate.io` in templates - [ ] make all templates use `#[derive_impl]` - [ ] update and unify all licenses - [ ] Remove polkadot launch, use https://github.com/paritytech/polkadot-sdk/blob/35349df993ea2e7c4769914ef5d199e787b23d4c/cumulus/zombienet/examples/small_network.toml instead.
Step in #3155 Needed for paritytech/eng-automation#6 This PR renames `frame` crate to `polkadot-sdk-frame` as `frame` is not available on crates.io --------- Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
Step in #3155 Needed for paritytech/eng-automation#6 This PR renames `frame` crate to `polkadot-sdk-frame` as `frame` is not available on crates.io --------- Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
Step in paritytech#3155 Needed for paritytech/eng-automation#6 This PR renames `frame` crate to `polkadot-sdk-frame` as `frame` is not available on crates.io --------- Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
- Progresses #3155 ### What's inside A job, that will take each of the three [templates](https://github.com/paritytech/polkadot-sdk/tree/master/templates), yank them out of the monorepo workspace, and push to individual repositories ([1](https://github.com/paritytech/polkadot-sdk-minimal-template), [2](https://github.com/paritytech/polkadot-sdk-parachain-template), [3](https://github.com/paritytech/polkadot-sdk-solochain-template)). In case the build/test does not succeed, a PR such as [this one](paritytech-stg/polkadot-sdk-solochain-template#2) gets created instead. I'm proposing a manual dispatch trigger for now - so we can test and iterate faster - and change it to fully automatic triggered by releases later. The manual trigger looks like this: <img width="340px" src="https://github.com/paritytech/polkadot-sdk/assets/12039224/e87e0fda-23a3-4735-9035-af801e8417fc"/> ### How it works The job replaces dependencies [referenced by git](https://github.com/paritytech/polkadot-sdk/blob/d733c77ee2d2e8e2d5205c552a5efb2e5b5242c8/templates/minimal/pallets/template/Cargo.toml#L25) with a reference to released crates using [psvm](https://github.com/paritytech/psvm). It creates a new workspace for the template, and adapts what's needed from the `polkadot-sdk` workspace. ### See the results The action has been tried out in staging, and the results can be observed here: - [minimal stg](https://github.com/paritytech-stg/polkadot-sdk-minimal-template/) - [parachain stg](https://github.com/paritytech-stg/polkadot-sdk-parachain-template/) - [solochain stg](https://github.com/paritytech-stg/polkadot-sdk-solochain-template/) These are based on the `1.9.0` release (using `release-crates-io-v1.9.0` branch).
This issue has been mentioned on Polkadot Forum. There might be relevant details there: https://forum.polkadot.network/t/paritytech-update-for-april/7646/1 |
@rzadp as part of synchronizing the template, could you please ensure that any reference to |
|
Looking at So I don't have a choice but to remove this reference, otherwise it will not build outside of the monorepo. |
I mean it should be mainly a simple |
This was added in #4119 and I kinda disagree with it even to stay in master. @gupnik can you adjust accordingly? I am of the opinion that |
IMO, the doc-only crate in templates should ideally link to
I was not imagining the Happy to adjust if we have other ways to reference such items. |
Okay this sounds good. If need be, then we remove the reverse link ( |
I see a lot of great progress here, thanks @rzadp and @gupnik! Some action items that I see is: (most of these changes are applied to this repository, and upon next release they would get synchronized)
Once #5 and omni-node is done, all templates should be updated with an option to not build the node side and instead use the omni-node. |
Addresses [this](#3155 (comment)).
- Addresses [this](#3155 (comment)). - Technical content got adopted from the existing [solochain readme](https://github.com/paritytech/polkadot-sdk/tree/master/templates/solochain). - Updated some broken links there. - The docker instructions will work after #4637. - See the [rendered version](https://github.com/paritytech/polkadot-sdk/blob/rzadp/minimal-template-readme/templates/minimal/README.md). --------- Co-authored-by: gupnik <nikhilgupta.iitk@gmail.com>
As requested [here](#3155 (comment)). The Dockerfiles are inspired by [this one](https://github.com/paritytech/polkadot-sdk/blob/aa32faaebf64426becb2feeede347740eb7a3908/docker/dockerfiles/polkadot/polkadot_builder.Dockerfile).
Addresses [this](paritytech#3155 (comment)).
- Addresses [this](paritytech#3155 (comment)). - Technical content got adopted from the existing [solochain readme](https://github.com/paritytech/polkadot-sdk/tree/master/templates/solochain). - Updated some broken links there. - The docker instructions will work after paritytech#4637. - See the [rendered version](https://github.com/paritytech/polkadot-sdk/blob/rzadp/minimal-template-readme/templates/minimal/README.md). --------- Co-authored-by: gupnik <nikhilgupta.iitk@gmail.com>
As requested [here](paritytech#3155 (comment)). The Dockerfiles are inspired by [this one](https://github.com/paritytech/polkadot-sdk/blob/aa32faaebf64426becb2feeede347740eb7a3908/docker/dockerfiles/polkadot/polkadot_builder.Dockerfile).
- Addresses [this](#3155 (comment)). - Revamps the Readme, very similar to [the minimal template](#4649). - Changed `polkadot-launch` to `zombienet`, with instructions how to run it. - See the [rendered version](https://github.com/paritytech/polkadot-sdk/blob/rzadp/parachain-template-readme/templates/parachain/README.md).
After using this tutorial in PBA, there was a few areas to improve it. Moreover, I have: - Improve `your_first_pallet`, link it in README, improve the parent `guide` section. - Updated the templates page, in light of recent efforts related to in #3155 - Added small ref docs about metadata, completed the one about native runtime, added one about host functions. - Remove a lot of unfinished stuff from sdk-docs - update diagram for `Hooks`
- Addresses [this](#3155 (comment)). - Revamps the Readme, very similar to [the minimal template](#4649). - Changed `polkadot-launch` to `zombienet`, with instructions how to run it. - See the [rendered version](https://github.com/paritytech/polkadot-sdk/blob/rzadp/parachain-template-readme/templates/parachain/README.md).
After using this tutorial in PBA, there was a few areas to improve it. Moreover, I have: - Improve `your_first_pallet`, link it in README, improve the parent `guide` section. - Updated the templates page, in light of recent efforts related to in #3155 - Added small ref docs about metadata, completed the one about native runtime, added one about host functions. - Remove a lot of unfinished stuff from sdk-docs - update diagram for `Hooks`
Just as a small update, all three templates have been updated to |
Hey @kianenigma, I see you have added more action items - could you elaborate a bit? For example, I could continue to help if I can. Is the umbrella crate ready to be used, or is that for the future? |
Is something that I'd say @gupnik should do.
I am less sure about this, it is an idea for now. Let's ignore it.
We are ready to do this IMO. |
Addresses [this](paritytech#3155 (comment)).
- Addresses [this](paritytech#3155 (comment)). - Technical content got adopted from the existing [solochain readme](https://github.com/paritytech/polkadot-sdk/tree/master/templates/solochain). - Updated some broken links there. - The docker instructions will work after paritytech#4637. - See the [rendered version](https://github.com/paritytech/polkadot-sdk/blob/rzadp/minimal-template-readme/templates/minimal/README.md). --------- Co-authored-by: gupnik <nikhilgupta.iitk@gmail.com>
As requested [here](paritytech#3155 (comment)). The Dockerfiles are inspired by [this one](https://github.com/paritytech/polkadot-sdk/blob/aa32faaebf64426becb2feeede347740eb7a3908/docker/dockerfiles/polkadot/polkadot_builder.Dockerfile).
- Addresses [this](paritytech#3155 (comment)). - Revamps the Readme, very similar to [the minimal template](paritytech#4649). - Changed `polkadot-launch` to `zombienet`, with instructions how to run it. - See the [rendered version](https://github.com/paritytech/polkadot-sdk/blob/rzadp/parachain-template-readme/templates/parachain/README.md).
After using this tutorial in PBA, there was a few areas to improve it. Moreover, I have: - Improve `your_first_pallet`, link it in README, improve the parent `guide` section. - Updated the templates page, in light of recent efforts related to in paritytech#3155 - Added small ref docs about metadata, completed the one about native runtime, added one about host functions. - Remove a lot of unfinished stuff from sdk-docs - update diagram for `Hooks`
closing in favor of #5242 |
Despite what we had in the [original request](#3155 (comment)), I'm proposing a change to open a PR to the destination template repositories instead of pushing the code. This will give it a chance to run through the destination CI before making changes, and to set stricter branch protection in the destination repos.
Despite what we had in the [original request](paritytech#3155 (comment)), I'm proposing a change to open a PR to the destination template repositories instead of pushing the code. This will give it a chance to run through the destination CI before making changes, and to set stricter branch protection in the destination repos.
https://github.com/substrate-developer-hub/substrate-node-template and https://github.com/substrate-developer-hub/substrate-parachain-template are both in the
substrate-developer-hub
org, and as the commit dates suggest not very up to date.The existence of
substrate-developer-hub
in itself is questionable in my opinion. It is not well maintained, and I much rather everything to be in/paritytech
, and ideally inpolkadot-sdk
repo.But, whatever we decide to do here, we should also do them in a backwards compatible way.
substrate-developer-hub
is used in many external resources and should be kept as an archive.Options include:
Moreover, this also gives the opportunity to re-consider our templates. I personally think we should scrap the
node-template
as it is mainly targeted towards "solo-chain development". The two main templates we want should be:cc @gupnik
Tasks
Outcome:
Next Steps
#5242
The text was updated successfully, but these errors were encountered: