From a797f45d536f886b6cf21940ed72f51e881933f7 Mon Sep 17 00:00:00 2001 From: Juan Girini Date: Mon, 4 Dec 2023 10:49:44 +0100 Subject: [PATCH 01/16] reorganize contributor docs --- .gitlab/pipeline/test.yml | 2 +- README.md | 6 +++--- bridges/scripts/verify-pallets-build.sh | 2 +- cumulus/README.md | 6 +++--- developer-hub/src/meta_contributing.rs | 2 +- docs/{ => contributor}/CODE_OF_CONDUCT.md | 0 docs/{ => contributor}/CONTRIBUTING.md | 0 docs/{ => contributor}/DEPRECATION_CHECKLIST.md | 2 +- docs/{ => contributor}/DOCUMENTATION_GUIDELINES.md | 0 docs/{ => contributor}/PULL_REQUEST_TEMPLATE.md | 2 +- docs/{ => contributor}/SECURITY.md | 0 docs/{ => contributor}/STYLE_GUIDE.md | 0 docs/{ => contributor}/container.md | 0 docs/{ => contributor}/docker.md | 0 docs/{ => contributor}/markdown_linting.md | 0 polkadot/README.md | 6 +++--- substrate/README.md | 8 ++++---- 17 files changed, 18 insertions(+), 18 deletions(-) rename docs/{ => contributor}/CODE_OF_CONDUCT.md (100%) rename docs/{ => contributor}/CONTRIBUTING.md (100%) rename docs/{ => contributor}/DEPRECATION_CHECKLIST.md (98%) rename docs/{ => contributor}/DOCUMENTATION_GUIDELINES.md (100%) rename docs/{ => contributor}/PULL_REQUEST_TEMPLATE.md (96%) rename docs/{ => contributor}/SECURITY.md (100%) rename docs/{ => contributor}/STYLE_GUIDE.md (100%) rename docs/{ => contributor}/container.md (100%) rename docs/{ => contributor}/docker.md (100%) rename docs/{ => contributor}/markdown_linting.md (100%) diff --git a/.gitlab/pipeline/test.yml b/.gitlab/pipeline/test.yml index 265b378ef5bd..f6dad887a68d 100644 --- a/.gitlab/pipeline/test.yml +++ b/.gitlab/pipeline/test.yml @@ -313,7 +313,7 @@ node-bench-regression-guard: after_script: [""] # if this fails run `bot update-ui` in the Pull Request or "./scripts/update-ui-tests.sh" locally -# see ./docs/CONTRIBUTING.md#ui-tests +# see ./docs/contributor/CONTRIBUTING.md#ui-tests test-frame-ui: stage: test extends: diff --git a/README.md b/README.md index 56b3481bafc0..f9f65e4eb07b 100644 --- a/README.md +++ b/README.md @@ -46,12 +46,12 @@ Below are the primary upstream dependencies utilized in this project: ## Security -The security policy and procedures can be found in [docs/SECURITY.md](./docs/SECURITY.md). +The security policy and procedures can be found in [docs/contributor/SECURITY.md](./docs/contributor/SECURITY.md). ## Contributing & Code of Conduct -Ensure you follow our [contribution guidelines](./docs/CONTRIBUTING.md). In every interaction and contribution, this -project adheres to the [Contributor Covenant Code of Conduct](./docs/CODE_OF_CONDUCT.md). +Ensure you follow our [contribution guidelines](./docs/contributor/CONTRIBUTING.md). In every interaction and contribution, this +project adheres to the [Contributor Covenant Code of Conduct](./docs/contributor/CODE_OF_CONDUCT.md). ## Additional Resources diff --git a/bridges/scripts/verify-pallets-build.sh b/bridges/scripts/verify-pallets-build.sh index b96bbf1833b6..cb238c457970 100755 --- a/bridges/scripts/verify-pallets-build.sh +++ b/bridges/scripts/verify-pallets-build.sh @@ -62,7 +62,7 @@ rm -rf $BRIDGES_FOLDER/.config rm -rf $BRIDGES_FOLDER/.github rm -rf $BRIDGES_FOLDER/.maintain rm -rf $BRIDGES_FOLDER/deployments -rm -f $BRIDGES_FOLDER/docs/dockerhub-* +rm -f $BRIDGES_FOLDER/docs/contributor/dockerhub-* rm -rf $BRIDGES_FOLDER/fuzz rm -rf $BRIDGES_FOLDER/modules/beefy rm -rf $BRIDGES_FOLDER/modules/shift-session-manager diff --git a/cumulus/README.md b/cumulus/README.md index 6acbf6dc2ca2..7e145ad7b4ab 100644 --- a/cumulus/README.md +++ b/cumulus/README.md @@ -4,7 +4,7 @@ This repository contains both the Cumulus SDK and also specific chains implemented on top of this SDK. -If you only want to run a **Polkadot Parachain Node**, check out our [container section](./docs/container.md). +If you only want to run a **Polkadot Parachain Node**, check out our [container section](./docs/contributor/container.md). ## Cumulus SDK @@ -34,7 +34,7 @@ A Polkadot [collator](https://wiki.polkadot.network/docs/en/learn-collator) for `polkadot-parachain` binary (previously called `polkadot-collator`). You may run `polkadot-parachain` locally after building it or using one of the container option described -[here](./docs/container.md). +[here](./docs/contributor/container.md). ### Relay Chain Interaction To operate a parachain node, a connection to the corresponding relay chain is necessary. This can be achieved in one of @@ -242,7 +242,7 @@ Once the executable is built, launch collators for each parachain (repeat once e ./target/release/polkadot-parachain --chain $CHAIN --validator ``` -You can also build [using a container](./docs/container.md). +You can also build [using a container](./docs/contributor/container.md). ### Parachains diff --git a/developer-hub/src/meta_contributing.rs b/developer-hub/src/meta_contributing.rs index 70a23f825835..f5a120dee3c1 100644 --- a/developer-hub/src/meta_contributing.rs +++ b/developer-hub/src/meta_contributing.rs @@ -70,7 +70,7 @@ //! > that they already pose, rather than repeating yourself**. //! //! For more details about documenting guidelines, see: -//! +//! //! //! #### Example: Explaining `#[pallet::call]` //! diff --git a/docs/CODE_OF_CONDUCT.md b/docs/contributor/CODE_OF_CONDUCT.md similarity index 100% rename from docs/CODE_OF_CONDUCT.md rename to docs/contributor/CODE_OF_CONDUCT.md diff --git a/docs/CONTRIBUTING.md b/docs/contributor/CONTRIBUTING.md similarity index 100% rename from docs/CONTRIBUTING.md rename to docs/contributor/CONTRIBUTING.md diff --git a/docs/DEPRECATION_CHECKLIST.md b/docs/contributor/DEPRECATION_CHECKLIST.md similarity index 98% rename from docs/DEPRECATION_CHECKLIST.md rename to docs/contributor/DEPRECATION_CHECKLIST.md index fccf93d22737..ffb99e1ec3f7 100644 --- a/docs/DEPRECATION_CHECKLIST.md +++ b/docs/contributor/DEPRECATION_CHECKLIST.md @@ -45,7 +45,7 @@ We also need [https://docs.substrate.io/](https://docs.substrate.io/) to be upda ## Announce the deprecation and removal -**At minimum they should be noted in the release log.** Please see how to document a PR [here](https://github.com/paritytech/polkadot-sdk/blob/master/docs/CONTRIBUTING.md#documentation). +**At minimum they should be noted in the release log.** Please see how to document a PR [here](https://github.com/paritytech/polkadot-sdk/blob/master/docs/contributor/CONTRIBUTING.md#documentation). There you can give instructions based on the audience and tell them what they need to do to upgrade the code. Some breaking changes have a bigger impact than others. When the impact is big the release note is not enough, though diff --git a/docs/DOCUMENTATION_GUIDELINES.md b/docs/contributor/DOCUMENTATION_GUIDELINES.md similarity index 100% rename from docs/DOCUMENTATION_GUIDELINES.md rename to docs/contributor/DOCUMENTATION_GUIDELINES.md diff --git a/docs/PULL_REQUEST_TEMPLATE.md b/docs/contributor/PULL_REQUEST_TEMPLATE.md similarity index 96% rename from docs/PULL_REQUEST_TEMPLATE.md rename to docs/contributor/PULL_REQUEST_TEMPLATE.md index c93ac90c7e32..79a036a235ad 100644 --- a/docs/PULL_REQUEST_TEMPLATE.md +++ b/docs/contributor/PULL_REQUEST_TEMPLATE.md @@ -3,7 +3,7 @@ ✄ ----------------------------------------------------------------------------- Thank you for your Pull Request! 🙏 Please make sure it follows the contribution guidelines outlined in -[this document](https://github.com/paritytech/polkadot-sdk/blob/master/docs/CONTRIBUTING.md) and fill +[this document](https://github.com/paritytech/polkadot-sdk/blob/master/docs/contributor/CONTRIBUTING.md) and fill out the sections below. Once you're ready to submit your PR for review, please delete this section and leave only the text under the "Description" heading. diff --git a/docs/SECURITY.md b/docs/contributor/SECURITY.md similarity index 100% rename from docs/SECURITY.md rename to docs/contributor/SECURITY.md diff --git a/docs/STYLE_GUIDE.md b/docs/contributor/STYLE_GUIDE.md similarity index 100% rename from docs/STYLE_GUIDE.md rename to docs/contributor/STYLE_GUIDE.md diff --git a/docs/container.md b/docs/contributor/container.md similarity index 100% rename from docs/container.md rename to docs/contributor/container.md diff --git a/docs/docker.md b/docs/contributor/docker.md similarity index 100% rename from docs/docker.md rename to docs/contributor/docker.md diff --git a/docs/markdown_linting.md b/docs/contributor/markdown_linting.md similarity index 100% rename from docs/markdown_linting.md rename to docs/contributor/markdown_linting.md diff --git a/polkadot/README.md b/polkadot/README.md index 465fe5555fe4..f27fc86df27c 100644 --- a/polkadot/README.md +++ b/polkadot/README.md @@ -212,7 +212,7 @@ that we currently maintain. ### Using Docker -[Using Docker](../docs/docker.md) +[Using Docker](../docs/contributor/docker.md) ### Shell Completion @@ -222,11 +222,11 @@ that we currently maintain. ### Contributing Guidelines -[Contribution Guidelines](https://github.com/paritytech/polkadot-sdk/blob/master/docs/CONTRIBUTING.md) +[Contribution Guidelines](https://github.com/paritytech/polkadot-sdk/blob/master/docs/contributor/CONTRIBUTING.md) ### Contributor Code of Conduct -[Code of Conduct](https://github.com/paritytech/polkadot-sdk/blob/master/docs/CODE_OF_CONDUCT.md) +[Code of Conduct](https://github.com/paritytech/polkadot-sdk/blob/master/docs/contributor/CODE_OF_CONDUCT.md) ## License diff --git a/substrate/README.md b/substrate/README.md index f7afa7a894d8..7701769435d6 100644 --- a/substrate/README.md +++ b/substrate/README.md @@ -3,7 +3,7 @@ [![GitHub license](https://img.shields.io/badge/license-GPL3%2FApache2-blue)](#LICENSE) [![GitLab Status](https://gitlab.parity.io/parity/mirrors/polkadot-sdk/badges/master/pipeline.svg)](https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/pipelines) -[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](docs/CONTRIBUTING.md) +[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](docs/contributor/CONTRIBUTING.md) [![Stack Exchange](https://img.shields.io/badge/Substrate-Community%20&%20Support-24CC85?logo=stackexchange)](https://substrate.stackexchange.com/)

@@ -27,14 +27,14 @@ here](https://github.com/paritytech/polkadot-sdk/issues) for anything you suspec ## Contributions & Code of Conduct Please follow the contributions guidelines as outlined in -[`docs/CONTRIBUTING.md`](https://github.com/paritytech/polkadot-sdk/blob/master/docs/CONTRIBUTING.md). In all +[`docs/contributor/CONTRIBUTING.md`](https://github.com/paritytech/polkadot-sdk/blob/master/docs/contributor/CONTRIBUTING.md). In all communications and contributions, this project follows the [Contributor Covenant Code of -Conduct](https://github.com/paritytech/polkadot-sdk/blob/master/docs/CODE_OF_CONDUCT.md). +Conduct](https://github.com/paritytech/polkadot-sdk/blob/master/docs/contributor/CODE_OF_CONDUCT.md). ## Security The security policy and procedures can be found in -[`docs/SECURITY.md`](https://github.com/paritytech/polkadot-sdk/blob/master/docs/SECURITY.md). +[`docs/contributor/SECURITY.md`](https://github.com/paritytech/polkadot-sdk/blob/master/docs/contributor/SECURITY.md). ## License From 67c0078994480ba5012d528e857a87d8d7cb2987 Mon Sep 17 00:00:00 2001 From: Juan Girini Date: Mon, 4 Dec 2023 12:20:38 +0100 Subject: [PATCH 02/16] move developer-hub to polkadot-sdk-docs --- .gitlab/pipeline/build.yml | 2 +- Cargo.lock | 78 ++++++++--------- Cargo.toml | 2 +- developer-hub/Cargo.toml | 66 -------------- developer-hub/src/polkadot_sdk/polkadot.rs | 87 ------------------- docs/mermaid/IA.mmd | 2 +- docs/sdk/Cargo.toml | 66 ++++++++++++++ {developer-hub => docs/sdk}/headers/toc.html | 8 +- .../sdk}/src/guides/changing_consensus.rs | 0 .../src/guides/cumulus_enabled_parachain.rs | 0 {developer-hub => docs/sdk}/src/guides/mod.rs | 2 +- .../sdk}/src/guides/xcm_enabled_parachain.rs | 0 .../sdk}/src/guides/your_first_node.rs | 0 .../sdk}/src/guides/your_first_pallet/mod.rs | 4 +- .../guides/your_first_pallet/with_event.rs | 0 .../sdk}/src/guides/your_first_runtime.rs | 0 {developer-hub => docs/sdk}/src/lib.rs | 6 +- .../sdk}/src/meta_contributing.rs | 2 +- .../sdk}/src/polkadot_sdk/cumulus.rs | 0 .../sdk}/src/polkadot_sdk/frame_runtime.rs | 2 +- .../sdk}/src/polkadot_sdk/mod.rs | 8 +- .../sdk}/src/polkadot_sdk/smart_contracts.rs | 0 .../sdk}/src/polkadot_sdk/substrate.rs | 2 +- .../sdk}/src/polkadot_sdk/templates.rs | 0 .../sdk}/src/polkadot_sdk/xcm.rs | 0 .../reference_docs/blockchain_scalibility.rs | 0 .../blockchain_state_machines.rs | 4 +- .../src/reference_docs/chain_spec_genesis.rs | 0 .../sdk}/src/reference_docs/cli.rs | 0 .../src/reference_docs/consensus_swapping.rs | 0 .../src/reference_docs/extrinsic_encoding.rs | 2 +- .../src/reference_docs/fee_less_runtime.rs | 0 .../frame_benchmarking_weight.rs | 0 .../reference_docs/frame_composite_enums.rs | 0 .../sdk}/src/reference_docs/frame_currency.rs | 0 .../sdk}/src/reference_docs/frame_origin.rs | 0 .../reference_docs/frame_runtime_migration.rs | 0 .../reference_docs/frame_system_accounts.rs | 0 .../sdk}/src/reference_docs/glossary.rs | 0 .../sdk}/src/reference_docs/light_nodes.rs | 0 .../sdk}/src/reference_docs/metadata.rs | 0 .../sdk}/src/reference_docs/mod.rs | 0 .../runtime_vs_smart_contract.rs | 0 .../safe_defensive_programming.rs | 0 .../src/reference_docs/signed_extensions.rs | 0 .../reference_docs/trait_based_programming.rs | 2 +- .../sdk}/src/reference_docs/wasm_memory.rs | 0 .../src/reference_docs/wasm_meta_protocol.rs | 8 +- substrate/frame/src/lib.rs | 2 +- 49 files changed, 134 insertions(+), 221 deletions(-) delete mode 100644 developer-hub/Cargo.toml delete mode 100644 developer-hub/src/polkadot_sdk/polkadot.rs create mode 100644 docs/sdk/Cargo.toml rename {developer-hub => docs/sdk}/headers/toc.html (82%) rename {developer-hub => docs/sdk}/src/guides/changing_consensus.rs (100%) rename {developer-hub => docs/sdk}/src/guides/cumulus_enabled_parachain.rs (100%) rename {developer-hub => docs/sdk}/src/guides/mod.rs (96%) rename {developer-hub => docs/sdk}/src/guides/xcm_enabled_parachain.rs (100%) rename {developer-hub => docs/sdk}/src/guides/your_first_node.rs (100%) rename {developer-hub => docs/sdk}/src/guides/your_first_pallet/mod.rs (99%) rename {developer-hub => docs/sdk}/src/guides/your_first_pallet/with_event.rs (100%) rename {developer-hub => docs/sdk}/src/guides/your_first_runtime.rs (100%) rename {developer-hub => docs/sdk}/src/lib.rs (94%) rename {developer-hub => docs/sdk}/src/meta_contributing.rs (98%) rename {developer-hub => docs/sdk}/src/polkadot_sdk/cumulus.rs (100%) rename {developer-hub => docs/sdk}/src/polkadot_sdk/frame_runtime.rs (98%) rename {developer-hub => docs/sdk}/src/polkadot_sdk/mod.rs (95%) rename {developer-hub => docs/sdk}/src/polkadot_sdk/smart_contracts.rs (100%) rename {developer-hub => docs/sdk}/src/polkadot_sdk/substrate.rs (99%) rename {developer-hub => docs/sdk}/src/polkadot_sdk/templates.rs (100%) rename {developer-hub => docs/sdk}/src/polkadot_sdk/xcm.rs (100%) rename {developer-hub => docs/sdk}/src/reference_docs/blockchain_scalibility.rs (100%) rename {developer-hub => docs/sdk}/src/reference_docs/blockchain_state_machines.rs (90%) rename {developer-hub => docs/sdk}/src/reference_docs/chain_spec_genesis.rs (100%) rename {developer-hub => docs/sdk}/src/reference_docs/cli.rs (100%) rename {developer-hub => docs/sdk}/src/reference_docs/consensus_swapping.rs (100%) rename {developer-hub => docs/sdk}/src/reference_docs/extrinsic_encoding.rs (98%) rename {developer-hub => docs/sdk}/src/reference_docs/fee_less_runtime.rs (100%) rename {developer-hub => docs/sdk}/src/reference_docs/frame_benchmarking_weight.rs (100%) rename {developer-hub => docs/sdk}/src/reference_docs/frame_composite_enums.rs (100%) rename {developer-hub => docs/sdk}/src/reference_docs/frame_currency.rs (100%) rename {developer-hub => docs/sdk}/src/reference_docs/frame_origin.rs (100%) rename {developer-hub => docs/sdk}/src/reference_docs/frame_runtime_migration.rs (100%) rename {developer-hub => docs/sdk}/src/reference_docs/frame_system_accounts.rs (100%) rename {developer-hub => docs/sdk}/src/reference_docs/glossary.rs (100%) rename {developer-hub => docs/sdk}/src/reference_docs/light_nodes.rs (100%) rename {developer-hub => docs/sdk}/src/reference_docs/metadata.rs (100%) rename {developer-hub => docs/sdk}/src/reference_docs/mod.rs (100%) rename {developer-hub => docs/sdk}/src/reference_docs/runtime_vs_smart_contract.rs (100%) rename {developer-hub => docs/sdk}/src/reference_docs/safe_defensive_programming.rs (100%) rename {developer-hub => docs/sdk}/src/reference_docs/signed_extensions.rs (100%) rename {developer-hub => docs/sdk}/src/reference_docs/trait_based_programming.rs (98%) rename {developer-hub => docs/sdk}/src/reference_docs/wasm_memory.rs (100%) rename {developer-hub => docs/sdk}/src/reference_docs/wasm_meta_protocol.rs (95%) diff --git a/.gitlab/pipeline/build.yml b/.gitlab/pipeline/build.yml index d6918173d493..377236193cc5 100644 --- a/.gitlab/pipeline/build.yml +++ b/.gitlab/pipeline/build.yml @@ -125,7 +125,7 @@ build-rustdoc: find "$path" -name '*.html' | xargs -I {} -P "$(nproc)" bash -c 'process_file "$@"' _ {} } inject_simple_analytics "./crate-docs" - - echo "" > ./crate-docs/index.html + - echo "" > ./crate-docs/index.html build-implementers-guide: stage: build diff --git a/Cargo.lock b/Cargo.lock index 7bec4ad24ba2..bc413e70f46b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4383,45 +4383,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "developer-hub" -version = "0.0.1" -dependencies = [ - "cumulus-pallet-aura-ext", - "cumulus-pallet-parachain-system", - "docify", - "frame", - "kitchensink-runtime", - "pallet-aura", - "pallet-default-config-example", - "pallet-examples", - "pallet-timestamp", - "parity-scale-codec", - "sc-cli", - "sc-client-db", - "sc-consensus-aura", - "sc-consensus-babe", - "sc-consensus-beefy", - "sc-consensus-grandpa", - "sc-consensus-manual-seal", - "sc-consensus-pow", - "sc-network", - "sc-rpc", - "sc-rpc-api", - "scale-info", - "simple-mermaid 0.1.0 (git+https://github.com/kianenigma/simple-mermaid.git?branch=main)", - "sp-api", - "sp-core", - "sp-io", - "sp-keyring", - "sp-runtime", - "staging-chain-spec-builder", - "staging-node-cli", - "staging-parachain-info", - "subkey", - "substrate-wasm-builder", -] - [[package]] name = "diff" version = "0.1.13" @@ -12945,6 +12906,45 @@ dependencies = [ "thousands", ] +[[package]] +name = "polkadot-sdk-docs" +version = "0.0.1" +dependencies = [ + "cumulus-pallet-aura-ext", + "cumulus-pallet-parachain-system", + "docify", + "frame", + "kitchensink-runtime", + "pallet-aura", + "pallet-default-config-example", + "pallet-examples", + "pallet-timestamp", + "parity-scale-codec", + "sc-cli", + "sc-client-db", + "sc-consensus-aura", + "sc-consensus-babe", + "sc-consensus-beefy", + "sc-consensus-grandpa", + "sc-consensus-manual-seal", + "sc-consensus-pow", + "sc-network", + "sc-rpc", + "sc-rpc-api", + "scale-info", + "simple-mermaid 0.1.0 (git+https://github.com/kianenigma/simple-mermaid.git?branch=main)", + "sp-api", + "sp-core", + "sp-io", + "sp-keyring", + "sp-runtime", + "staging-chain-spec-builder", + "staging-node-cli", + "staging-parachain-info", + "subkey", + "substrate-wasm-builder", +] + [[package]] name = "polkadot-service" version = "1.0.0" diff --git a/Cargo.toml b/Cargo.toml index 5fb7c0f2315b..b694afb3f5e4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -106,7 +106,7 @@ members = [ "cumulus/test/runtime", "cumulus/test/service", "cumulus/xcm/xcm-emulator", - "developer-hub", + "docs/sdk", "polkadot", "polkadot/cli", "polkadot/core-primitives", diff --git a/developer-hub/Cargo.toml b/developer-hub/Cargo.toml deleted file mode 100644 index 56f279c7e107..000000000000 --- a/developer-hub/Cargo.toml +++ /dev/null @@ -1,66 +0,0 @@ -[package] -name = "developer-hub" -description = "The one stop shop for developers of the polakdot-sdk" -license = "GPL-3.0-or-later WITH Classpath-exception-2.0" -homepage = "paritytech.github.io" -repository.workspace = true -authors.workspace = true -edition.workspace = true -# This crate is not publish-able to crates.io for now because of docify. -publish = false -version = "0.0.1" - -[dependencies] -# Needed for all FRAME-based code -parity-scale-codec = { version = "3.0.0", default-features = false } -scale-info = { version = "2.6.0", default-features = false } -frame = { path = "../substrate/frame", features = ["experimental", "runtime"] } -pallet-examples = { path = "../substrate/frame/examples" } -pallet-default-config-example = { path = "../substrate/frame/examples/default-config" } - -# How we build docs in rust-docs -simple-mermaid = { git = "https://github.com/kianenigma/simple-mermaid.git", branch = "main" } -docify = "0.2.6" - -# Polkadot SDK deps, typically all should only be scope such that we can link to their doc item. -node-cli = { package = "staging-node-cli", path = "../substrate/bin/node/cli" } -kitchensink-runtime = { path = "../substrate/bin/node/runtime" } -chain-spec-builder = { package = "staging-chain-spec-builder", path = "../substrate/bin/utils/chain-spec-builder" } -subkey = { path = "../substrate/bin/utils/subkey" } - -# Substrate -sc-network = { path = "../substrate/client/network" } -sc-rpc-api = { path = "../substrate/client/rpc-api" } -sc-rpc = { path = "../substrate/client/rpc" } -sc-client-db = { path = "../substrate/client/db" } -sc-cli = { path = "../substrate/client/cli" } -sc-consensus-aura = { path = "../substrate/client/consensus/aura" } -sc-consensus-babe = { path = "../substrate/client/consensus/babe" } -sc-consensus-grandpa = { path = "../substrate/client/consensus/grandpa" } -sc-consensus-beefy = { path = "../substrate/client/consensus/beefy" } -sc-consensus-manual-seal = { path = "../substrate/client/consensus/manual-seal" } -sc-consensus-pow = { path = "../substrate/client/consensus/pow" } -substrate-wasm-builder = { path = "../substrate/utils/wasm-builder" } - -# Cumulus -cumulus-pallet-aura-ext = { path = "../cumulus/pallets/aura-ext" } -cumulus-pallet-parachain-system = { path = "../cumulus/pallets/parachain-system", features = [ - "parameterized-consensus-hook", -] } -parachain-info = { package = "staging-parachain-info", path = "../cumulus/parachains/pallets/parachain-info" } -pallet-aura = { path = "../substrate/frame/aura", default-features = false } -pallet-timestamp = { path = "../substrate/frame/timestamp" } - -# Primitives -sp-io = { path = "../substrate/primitives/io" } -sp-api = { path = "../substrate/primitives/api" } -sp-core = { path = "../substrate/primitives/core" } -sp-keyring = { path = "../substrate/primitives/keyring" } -sp-runtime = { path = "../substrate/primitives/runtime" } - -[dev-dependencies] -parity-scale-codec = "3.6.5" -scale-info = "2.9.0" - -[features] -experimental = ["pallet-aura/experimental"] diff --git a/developer-hub/src/polkadot_sdk/polkadot.rs b/developer-hub/src/polkadot_sdk/polkadot.rs deleted file mode 100644 index d157a660e564..000000000000 --- a/developer-hub/src/polkadot_sdk/polkadot.rs +++ /dev/null @@ -1,87 +0,0 @@ -//! # Polkadot -//! -//! Implementation of the Polkadot node/host in Rust. -//! -//! ## Learn More and Get Involved -//! -//! - [Polkadot Forum](https://forum.polkadot.network/) -//! - [Polkadot Parachains](https://parachains.info/) -//! - [Polkadot (multi-chain) Explorer](https://subscan.io/) -//! - Polkadot Fellowship -//! - [Manifesto](https://github.com/polkadot-fellows/manifesto) -//! - [Runtimes](https://github.com/polkadot-fellows/runtimes) -//! - [RFCs](https://github.com/polkadot-fellows/rfcs) -//! - [Polkadot Specs](spec.polkadot.network) -//! - [The Polkadot Parachain Host Implementers' Guide](https://paritytech.github.io/polkadot-sdk/book/) -//! - [Whitepaper](https://www.polkadot.network/whitepaper/) -//! -//! ## Alternative Node Implementations 🌈 -//! -//! - [Smoldot](https://crates.io/crates/smoldot-light). Polkadot light node/client. -//! - [KAGOME](https://github.com/qdrvm/kagome). C++ implementation of the Polkadot host. -//! - [Gossamer](https://github.com/ChainSafe/gossamer). Golang implementation of the Polkadot host. -//! -//! ## Platform -//! -//! In this section, we examine what what platform Polkadot exactly provides to developers. -//! -//! ### Polkadot White Paper -//! -//! The original vision of Polkadot (everything in the whitepaper, which was eventually called -//! **Polkadot 1.0**) revolves around the following arguments: -//! -//! * Future is multi-chain, because we need different chains with different specialization to -//! achieve widespread goals. -//! * In other words, no single chain is good enough to achieve all goals. -//! * A multi-chain future will inadvertently suffer from fragmentation of economic security. -//! * This stake fragmentation will make communication over consensus system with varying security -//! levels inherently unsafe. -//! -//! Polkadot's answer to the above is: -//! -//! > The chains of the future must have a way to share their economic security, whilst maintaining -//! > their execution and governance sovereignty. These chains are called "Parachains". -//! -//! * Shared Security: The idea of shared economic security sits at the core of Polkadot. Polkadot -//! enables different parachains* to pool their economic security from Polkadot (i.e. "*Relay -//! Chain*"). -//! * (heterogenous) Sharded Execution: Yet, each parachain is free to have its own execution logic -//! (runtime), which also encompasses governance and sovereignty. Moreover, Polkadot ensures the -//! correct execution of all parachain, without having all of its validators re-execute all -//! parachain blocks. When seen from this perspective, the fact that Polkadot executes different -//! parachains means it is a platform that has fully delivered (the holy grail of) "Full Execution -//! Sharding". TODO: link to approval checking article. https://github.com/paritytech/polkadot-sdk-docs/issues/66 -//! * A framework to build blockchains: In order to materialize the ecosystem of parachains, an easy -//! blockchain framework must exist. This is [Substrate](crate::polkadot_sdk::substrate), -//! [FRAME](crate::polkadot_sdk::frame_runtime) and [Cumulus](crate::polkadot_sdk::cumulus). -//! * A communication language between blockchains: In order for these blockchains to communicate, -//! they need a shared language. [XCM](crate::polkadot_sdk::xcm) is one such language, and the one -//! that is most endorsed in the Polkadot ecosystem. -//! -//! > Note that the interoperability promised by Polkadot is unparalleled in that any two parachains -//! > connected to Polkadot have the same security and can have much better guarantees about the -//! > security of the recipient of any message. TODO: weakest link in bridges systems. https://github.com/paritytech/polkadot-sdk-docs/issues/66 -//! -//! Polkadot delivers the above vision, alongside a flexible means for parachains to schedule -//! themselves with the Relay Chain. To achieve this, Polkadot has been developed with an -//! architecture similar to that of a computer. Polkadot Relay Chain has a number of "cores". Each -//! core is (in simple terms) capable of progressing 1 parachain at a time. For example, a parachain -//! can schedule itself on a single core for 5 relay chain blocks. -//! -//! Within the scope of Polkadot 1.x, two main scheduling ways have been considered: -//! -//! * Long term Parachains, obtained through locking a sum of DOT in an auction system. -//! * on-demand Parachains, purchased through paying DOT to the relay-chain whenever needed. -//! -//! ### The Future -//! -//! After delivering Polkadot 1.x, the future of Polkadot as a protocol and platform is in the hands -//! of the community and the fellowship. This is happening most notable through the RFC process. -//! Some of the RFCs that do alter Polkadot as a platform and have already passed are as follows: -//! -//! - RFC#1: [Agile-coretime](https://github.com/polkadot-fellows/RFCs/blob/main/text/0001-agile-coretime.md): -//! Agile periodic-sale-based model for assigning Coretime on the Polkadot Ubiquitous Computer. -//! - RFC#5: [Coretime-interface](https://github.com/polkadot-fellows/RFCs/blob/main/text/0005-coretime-interface.md): -//! Interface for manipulating the usage of cores on the Polkadot Ubiquitous Computer. -// TODO: add more context and explanations about Polkadot as the Ubiquitous Computer and related -// tech. https://github.com/paritytech/polkadot-sdk-docs/issues/66 diff --git a/docs/mermaid/IA.mmd b/docs/mermaid/IA.mmd index 8fcb74fa0a91..93d3e92814cf 100644 --- a/docs/mermaid/IA.mmd +++ b/docs/mermaid/IA.mmd @@ -1,5 +1,5 @@ flowchart - parity[paritytech.github.io] --> devhub[developer_hub] + parity[paritytech.github.io] --> devhub[polkadot_sdk_docs] devhub --> polkadot_sdk devhub --> reference_docs diff --git a/docs/sdk/Cargo.toml b/docs/sdk/Cargo.toml new file mode 100644 index 000000000000..f5bfd80fd10d --- /dev/null +++ b/docs/sdk/Cargo.toml @@ -0,0 +1,66 @@ +[package] +name = "polkadot-sdk-docs" +description = "The one stop shop for developers of the polakdot-sdk" +license = "GPL-3.0-or-later WITH Classpath-exception-2.0" +homepage = "paritytech.github.io" +repository.workspace = true +authors.workspace = true +edition.workspace = true +# This crate is not publish-able to crates.io for now because of docify. +publish = false +version = "0.0.1" + +[dependencies] +# Needed for all FRAME-based code +parity-scale-codec = { version = "3.0.0", default-features = false } +scale-info = { version = "2.6.0", default-features = false } +frame = { path = "../../substrate/frame", features = ["experimental", "runtime"] } +pallet-examples = { path = "../../substrate/frame/examples" } +pallet-default-config-example = { path = "../../substrate/frame/examples/default-config" } + +# How we build docs in rust-docs +simple-mermaid = { git = "https://github.com/kianenigma/simple-mermaid.git", branch = "main" } +docify = "0.2.6" + +# Polkadot SDK deps, typically all should only be scope such that we can link to their doc item. +node-cli = { package = "staging-node-cli", path = "../../substrate/bin/node/cli" } +kitchensink-runtime = { path = "../../substrate/bin/node/runtime" } +chain-spec-builder = { package = "staging-chain-spec-builder", path = "../../substrate/bin/utils/chain-spec-builder" } +subkey = { path = "../../substrate/bin/utils/subkey" } + +# Substrate +sc-network = { path = "../../substrate/client/network" } +sc-rpc-api = { path = "../../substrate/client/rpc-api" } +sc-rpc = { path = "../../substrate/client/rpc" } +sc-client-db = { path = "../../substrate/client/db" } +sc-cli = { path = "../../substrate/client/cli" } +sc-consensus-aura = { path = "../../substrate/client/consensus/aura" } +sc-consensus-babe = { path = "../../substrate/client/consensus/babe" } +sc-consensus-grandpa = { path = "../../substrate/client/consensus/grandpa" } +sc-consensus-beefy = { path = "../../substrate/client/consensus/beefy" } +sc-consensus-manual-seal = { path = "../../substrate/client/consensus/manual-seal" } +sc-consensus-pow = { path = "../../substrate/client/consensus/pow" } +substrate-wasm-builder = { path = "../../substrate/utils/wasm-builder" } + +# Cumulus +cumulus-pallet-aura-ext = { path = "../../cumulus/pallets/aura-ext" } +cumulus-pallet-parachain-system = { path = "../../cumulus/pallets/parachain-system", features = [ + "parameterized-consensus-hook", +] } +parachain-info = { package = "staging-parachain-info", path = "../../cumulus/parachains/pallets/parachain-info" } +pallet-aura = { path = "../../substrate/frame/aura", default-features = false } +pallet-timestamp = { path = "../../substrate/frame/timestamp" } + +# Primitives +sp-io = { path = "../../substrate/primitives/io" } +sp-api = { path = "../../substrate/primitives/api" } +sp-core = { path = "../../substrate/primitives/core" } +sp-keyring = { path = "../../substrate/primitives/keyring" } +sp-runtime = { path = "../../substrate/primitives/runtime" } + +[dev-dependencies] +parity-scale-codec = "3.6.5" +scale-info = "2.9.0" + +[features] +experimental = ["pallet-aura/experimental"] diff --git a/developer-hub/headers/toc.html b/docs/sdk/headers/toc.html similarity index 82% rename from developer-hub/headers/toc.html rename to docs/sdk/headers/toc.html index d4d017eb207a..a4a074cb4f31 100644 --- a/developer-hub/headers/toc.html +++ b/docs/sdk/headers/toc.html @@ -1,15 +1,15 @@