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

Revamp the Readme of the minimal template #4649

Merged
merged 23 commits into from
Jun 3, 2024
Merged

Conversation

rzadp
Copy link
Contributor

@rzadp rzadp commented May 30, 2024

@rzadp rzadp added R0-silent Changes should not be mentioned in any release notes T11-documentation This PR/Issue is related to documentation. labels May 30, 2024
@rzadp rzadp requested review from kianenigma and gupnik May 30, 2024 13:09
You can generate and view the [Rust
Docs](https://doc.rust-lang.org/cargo/commands/cargo-doc.html) for this template
with this command:
> This is a minimal template for creating a [Substrate](https://substrate.io/) blockchain.
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we already avoid linking to substrate.io overall? it is all future refactor if we leave it like this.

I suppose for all of this we can either find a replacement, or bring it to polkadot-sdk-docs crate.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK, I'll try to find replacement for those substrate.io links.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have removed all substrate.io links. I also revamped the sub-readmes for Node, Pallets and Runtime, please take another look.


# Docs
Copy link
Contributor

Choose a reason for hiding this comment

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

So the question is what is the minimal template?

The main difference between the minimal template and others is that it has the least number of components to run.

In the runtime side, this template only has a handful of pallets, which you can list.

On the node side, this template has no consensus and can run both with custom block time via CLI. see enum Consensus in the node folder.

In general, for palying around with a single node, this template is best.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I felt like some more introduction of what you're looking at is missing.

I added something based on this comment.


- 🧹 Do not persist the state.
- 💰 Are preconfigured with a genesis state that includes several prefunded development accounts.
- 🧑‍⚖️ Development accounts are used as default validator authorities and a `sudo` account.
Copy link
Contributor

Choose a reason for hiding this comment

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

Does the template actually have this? needs to be double checked

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The accounts are prefunded, and I sent a sudo extrinsic from Alice and it worked.
Not sure what to check in terms of default validator authorities.

Screenshot 2024-05-31 at 10 11 31

Copy link
Contributor

Choose a reason for hiding this comment

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

there are no validators in this setup, you can remove it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed.


😇 Please refer to the monorepo's [contribution guidelines](https://github.com/paritytech/polkadot-sdk/blob/master/docs/contributor/CONTRIBUTING.md) and [Code of Conduct](https://github.com/paritytech/polkadot-sdk/blob/master/docs/contributor/CODE_OF_CONDUCT.md).

## Getting Help
Copy link
Contributor

Choose a reason for hiding this comment

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

This is great.

@@ -0,0 +1,38 @@
# Node

A blockchain node is an application that allows users to participate in a
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That was helpful.

packages required to compile this template.

👉 Check the
[Substrate Install](https://docs.substrate.io/install/) instructions for your platform for
Copy link
Contributor

Choose a reason for hiding this comment

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

For this, we have:

rust-setup.md in solochain template
and https://getsubstrate.io/ is a legacy project that needs to be archived.

For now I suggest is to remove both of these, add one single bash file to polkadot-sdk that installs latest rust and whatever else you need and reference to it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There used to be this init.sh script in the old repo that did this.

Do you know why it was abandoned and eventually removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For now I wrote a minimal instruction, until we have a script or a doc that could be linked.

@rzadp rzadp changed the title Update the Readme of the minimal template Revamp the Readme of the minimal template May 31, 2024
@rzadp
Copy link
Contributor Author

rzadp commented May 31, 2024

I have made some minor changes in the main readme, and a major change in Node, Runtime and Pallets sub-readmes.

I believe we shouldn't have deep technical info there (links instead), otherwise it will be an additional liability to keep up to date.

@kianenigma Please take another look, in my eye it all looks neat now.

Copy link
Contributor

@kianenigma kianenigma left a comment

Choose a reason for hiding this comment

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

Huge step forward!

After PBA, we can do another round in all templates, but for now this is great.

I would say the most important low hanging next step is to give some love to the parachain template as well, make sure it runs + basic README etc.

@rzadp
Copy link
Contributor Author

rzadp commented Jun 3, 2024

Looking for a second approval please.
@gupnik ?

templates/minimal/node/README.md Outdated Show resolved Hide resolved
Co-authored-by: gupnik <nikhilgupta.iitk@gmail.com>
@rzadp rzadp enabled auto-merge June 3, 2024 09:28
@rzadp rzadp added this pull request to the merge queue Jun 3, 2024
Merged via the queue into master with commit dfb01aa Jun 3, 2024
150 of 155 checks passed
@rzadp rzadp deleted the rzadp/minimal-template-readme branch June 3, 2024 11:05
ordian added a commit that referenced this pull request Jun 4, 2024
* master: (106 commits)
  [ci] Delete unused flow (#4676)
  Fix umbrella CI check and fix the C&P message (#4670)
  Add Dockerfiles to the templates (#4637)
  Revamp the Readme of the minimal template (#4649)
  Add chain-spec-builder docker image (#4655)
  Update Amforc bootnodes for Kusama and Polkadot (#4668)
  make all storage items in parachain-system public (#4645)
  [Pools] Refactors and runtime apis for DelegateStake (#4537)
  update amforc westend and its parachain bootnodes (#4641)
  Better error for missing index in CRV2 (#4643)
  Implement `XcmPaymentApi` and `DryRunApi` on all system parachains (#4634)
  Use Unlicense for templates (#4628)
  collator-protocol: remove `elastic-scaling-experimental` feature (#4595)
  Update `runtime_type` ref doc with the new "Associated Type Bounds" (#4624)
  Adds ability to specify chain type in chain-spec-builder (#4542)
  Fix broken windows build (#4636)
  Beefy client generic on aduthority Id (#1816)
  pallet-staking: Put tests behind `cfg(debug_assertions)` (#4620)
  Broker new price adapter (#4521)
  Change `XcmDryRunApi::dry_run_extrinsic` to take a call instead (#4621)
  ...
hitchhooker pushed a commit to ibp-network/polkadot-sdk that referenced this pull request Jun 5, 2024
- 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>
github-merge-queue bot pushed a commit that referenced this pull request Jun 10, 2024
- 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).
Ank4n pushed a commit that referenced this pull request Jun 14, 2024
- 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).
TarekkMA pushed a commit to moonbeam-foundation/polkadot-sdk that referenced this pull request Aug 2, 2024
- 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>
TarekkMA pushed a commit to moonbeam-foundation/polkadot-sdk that referenced this pull request Aug 2, 2024
- 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).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
R0-silent Changes should not be mentioned in any release notes T11-documentation This PR/Issue is related to documentation.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants