mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 05:11:09 +00:00
Move developer-hub to polkadot-sdk-docs (#2598)
This PR is a continuation of https://github.com/paritytech/polkadot-sdk/pull/2102 and part of an initiative started here https://hackmd.io/@romanp/rJ318ZCEp What has been done: - The content under `docs/*` (with the exception of `docs/mermaid`) has been moved to `docs/contributor/` - Developer Hub has been renamed to Polkadot SDK Docs, and the crate has been renamed from `developer-hub` to `polkadot-sdk-docs` - The content under `developer-hub/*` has been moved to `docs/sdk` --- Original PR https://github.com/paritytech/polkadot-sdk/pull/2565, it has been close due to too many rebase conflicts --------- Co-authored-by: Serban Iorga <serban@parity.io> Co-authored-by: Chevdor <chevdor@users.noreply.github.com> Co-authored-by: Egor_P <egor@parity.io> Co-authored-by: Bastian Köcher <git@kchr.de>
This commit is contained in:
@@ -12,7 +12,7 @@ env:
|
|||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
GITHUB_PR: ${{ github.event.pull_request.number }}
|
GITHUB_PR: ${{ github.event.pull_request.number }}
|
||||||
ENGINE: docker
|
ENGINE: docker
|
||||||
PRDOC_DOC: https://github.com/paritytech/polkadot-sdk/blob/master/docs/prdoc.md
|
PRDOC_DOC: https://github.com/paritytech/polkadot-sdk/blob/master/docs/contributor/prdoc.md
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check-prdoc:
|
check-prdoc:
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ bin/node-template/Cargo.lock
|
|||||||
nohup.out
|
nohup.out
|
||||||
polkadot_argument_parsing
|
polkadot_argument_parsing
|
||||||
polkadot.*
|
polkadot.*
|
||||||
|
!docs/sdk/src/polkadot_sdk/polkadot.rs
|
||||||
pwasm-alloc/Cargo.lock
|
pwasm-alloc/Cargo.lock
|
||||||
pwasm-libc/Cargo.lock
|
pwasm-libc/Cargo.lock
|
||||||
release-artifacts
|
release-artifacts
|
||||||
|
|||||||
@@ -125,7 +125,7 @@ build-rustdoc:
|
|||||||
find "$path" -name '*.html' | xargs -I {} -P "$(nproc)" bash -c 'process_file "$@"' _ {}
|
find "$path" -name '*.html' | xargs -I {} -P "$(nproc)" bash -c 'process_file "$@"' _ {}
|
||||||
}
|
}
|
||||||
inject_simple_analytics "./crate-docs"
|
inject_simple_analytics "./crate-docs"
|
||||||
- echo "<meta http-equiv=refresh content=0;url=developer_hub/index.html>" > ./crate-docs/index.html
|
- echo "<meta http-equiv=refresh content=0;url=polkadot_sdk_docs/index.html>" > ./crate-docs/index.html
|
||||||
|
|
||||||
build-implementers-guide:
|
build-implementers-guide:
|
||||||
stage: build
|
stage: build
|
||||||
|
|||||||
@@ -313,7 +313,7 @@ node-bench-regression-guard:
|
|||||||
after_script: [""]
|
after_script: [""]
|
||||||
|
|
||||||
# if this fails run `bot update-ui` in the Pull Request or "./scripts/update-ui-tests.sh" locally
|
# 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:
|
test-frame-ui:
|
||||||
stage: test
|
stage: test
|
||||||
extends:
|
extends:
|
||||||
|
|||||||
Generated
+39
-39
@@ -4383,45 +4383,6 @@ dependencies = [
|
|||||||
"syn 1.0.109",
|
"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]]
|
[[package]]
|
||||||
name = "diff"
|
name = "diff"
|
||||||
version = "0.1.13"
|
version = "0.1.13"
|
||||||
@@ -13013,6 +12974,45 @@ dependencies = [
|
|||||||
"thousands",
|
"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]]
|
[[package]]
|
||||||
name = "polkadot-service"
|
name = "polkadot-service"
|
||||||
version = "1.0.0"
|
version = "1.0.0"
|
||||||
|
|||||||
+1
-1
@@ -106,7 +106,7 @@ members = [
|
|||||||
"cumulus/test/runtime",
|
"cumulus/test/runtime",
|
||||||
"cumulus/test/service",
|
"cumulus/test/service",
|
||||||
"cumulus/xcm/xcm-emulator",
|
"cumulus/xcm/xcm-emulator",
|
||||||
"developer-hub",
|
"docs/sdk",
|
||||||
"polkadot",
|
"polkadot",
|
||||||
"polkadot/cli",
|
"polkadot/cli",
|
||||||
"polkadot/core-primitives",
|
"polkadot/core-primitives",
|
||||||
|
|||||||
@@ -46,12 +46,12 @@ Below are the primary upstream dependencies utilized in this project:
|
|||||||
|
|
||||||
## Security
|
## 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
|
## Contributing & Code of Conduct
|
||||||
|
|
||||||
Ensure you follow our [contribution guidelines](./docs/CONTRIBUTING.md). In every interaction and contribution, this
|
Ensure you follow our [contribution guidelines](./docs/contributor/CONTRIBUTING.md). In every interaction and
|
||||||
project adheres to the [Contributor Covenant Code of Conduct](./docs/CODE_OF_CONDUCT.md).
|
contribution, this project adheres to the [Contributor Covenant Code of Conduct](./docs/contributor/CODE_OF_CONDUCT.md).
|
||||||
|
|
||||||
## Additional Resources
|
## Additional Resources
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
This repository contains both the Cumulus SDK and also specific chains implemented on top of this SDK.
|
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
|
## 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`).
|
`polkadot-parachain` binary (previously called `polkadot-collator`).
|
||||||
|
|
||||||
You may run `polkadot-parachain` locally after building it or using one of the container option described
|
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
|
### Relay Chain Interaction
|
||||||
To operate a parachain node, a connection to the corresponding relay chain is necessary. This can be achieved in one of
|
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
|
./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
|
### Parachains
|
||||||
|
|
||||||
|
|||||||
@@ -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"]
|
|
||||||
@@ -45,7 +45,7 @@ We also need [https://docs.substrate.io/](https://docs.substrate.io/) to be upda
|
|||||||
|
|
||||||
## Announce the deprecation and removal
|
## 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.
|
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
|
Some breaking changes have a bigger impact than others. When the impact is big the release note is not enough, though
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
✄ -----------------------------------------------------------------------------
|
✄ -----------------------------------------------------------------------------
|
||||||
|
|
||||||
Thank you for your Pull Request! 🙏 Please make sure it follows the contribution guidelines outlined in
|
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
|
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.
|
delete this section and leave only the text under the "Description" heading.
|
||||||
|
|
||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
flowchart
|
flowchart
|
||||||
parity[paritytech.github.io] --> devhub[developer_hub]
|
parity[paritytech.github.io] --> devhub[polkadot_sdk_docs]
|
||||||
|
|
||||||
devhub --> polkadot_sdk
|
devhub --> polkadot_sdk
|
||||||
devhub --> reference_docs
|
devhub --> reference_docs
|
||||||
|
|||||||
@@ -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"]
|
||||||
@@ -1,15 +1,15 @@
|
|||||||
<script>
|
<script>
|
||||||
window.addEventListener("DOMContentLoaded", (event) => {
|
window.addEventListener("DOMContentLoaded", (event) => {
|
||||||
// if the crate is one that starts with `developer_hub`
|
// if the crate is one that starts with `polkadot_sdk_docs`
|
||||||
let crate_name = document.querySelector("#main-content > div > h1 > a:nth-child(1)");
|
let crate_name = document.querySelector("#main-content > div > h1 > a:nth-child(1)");
|
||||||
if (!crate_name.textContent.startsWith("developer_hub")) {
|
if (!crate_name.textContent.startsWith("polkadot_sdk_docs")) {
|
||||||
console.log("skipping -- not `developer_hub`");
|
console.log("skipping -- not `polkadot_sdk_docs`");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
let sidebar = document.querySelector(".sidebar");
|
let sidebar = document.querySelector(".sidebar");
|
||||||
let headers = document.querySelectorAll("#main-content h2, #main-content h3, #main-content h4");
|
let headers = document.querySelectorAll("#main-content h2, #main-content h3, #main-content h4");
|
||||||
console.log(`detected developer_hub: headers: ${headers.length}`);
|
console.log(`detected polkadot_sdk_docs: headers: ${headers.length}`);
|
||||||
|
|
||||||
let toc = document.createElement("div");
|
let toc = document.createElement("div");
|
||||||
toc.classList.add("table-of-contents");
|
toc.classList.add("table-of-contents");
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
//! # Polkadot Developer Hub Guides
|
//! # Polkadot SDK Docs Guides
|
||||||
//!
|
//!
|
||||||
//! This crate contains a collection of guides that are foundational to the developers of
|
//! This crate contains a collection of guides that are foundational to the developers of
|
||||||
//! Polkadot SDK. They common user-journeys that are traversed in the Polkadot ecosystem.
|
//! Polkadot SDK. They common user-journeys that are traversed in the Polkadot ecosystem.
|
||||||
+2
-2
@@ -76,7 +76,7 @@
|
|||||||
//! signature of the function: it takes a generic `T::RuntimeOrigin` and returns a
|
//! signature of the function: it takes a generic `T::RuntimeOrigin` and returns a
|
||||||
//! `Result<T::AccountId, _>`. So by the end of this function call, we know that this dispatchable
|
//! `Result<T::AccountId, _>`. So by the end of this function call, we know that this dispatchable
|
||||||
//! was signed by `who`.
|
//! was signed by `who`.
|
||||||
#![doc = docify::embed!("../substrate/frame/system/src/lib.rs", ensure_signed)]
|
#![doc = docify::embed!("../../substrate/frame/system/src/lib.rs", ensure_signed)]
|
||||||
//!
|
//!
|
||||||
//!
|
//!
|
||||||
//! - Where does `mutate`, `get` and `insert` and other storage APIs come from? All of them are
|
//! - Where does `mutate`, `get` and `insert` and other storage APIs come from? All of them are
|
||||||
@@ -84,7 +84,7 @@
|
|||||||
//! into [`frame::prelude::StorageMap::insert`].
|
//! into [`frame::prelude::StorageMap::insert`].
|
||||||
//!
|
//!
|
||||||
//! - The return type of all dispatchable functions is [`frame::prelude::DispatchResult`]:
|
//! - The return type of all dispatchable functions is [`frame::prelude::DispatchResult`]:
|
||||||
#![doc = docify::embed!("../substrate/frame/support/src/dispatch.rs", DispatchResult)]
|
#![doc = docify::embed!("../../substrate/frame/support/src/dispatch.rs", DispatchResult)]
|
||||||
//!
|
//!
|
||||||
//! Which is more or less a normal Rust `Result`, with a custom [`frame::prelude::DispatchError`] as
|
//! Which is more or less a normal Rust `Result`, with a custom [`frame::prelude::DispatchError`] as
|
||||||
//! the `Err` variant. We won't cover this error in detail here, but importantly you should know
|
//! the `Err` variant. We won't cover this error in detail here, but importantly you should know
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
//! # Developer Hub
|
//! # Polkadot SDK Docs
|
||||||
//!
|
//!
|
||||||
//! The Polkadot SDK Developer Hub.
|
//! The Polkadot SDK Developer Documentation.
|
||||||
//!
|
//!
|
||||||
//! This crate is a *minimal*, but *always-accurate* source of information for those wishing to
|
//! This crate is a *minimal*, but *always-accurate* source of information for those wishing to
|
||||||
//! build on the Polkadot SDK.
|
//! build on the Polkadot SDK.
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
//! ## Information Architecture
|
//! ## Information Architecture
|
||||||
//!
|
//!
|
||||||
//! This section paints a picture over the high-level information architecture of this crate.
|
//! This section paints a picture over the high-level information architecture of this crate.
|
||||||
#![doc = simple_mermaid::mermaid!("../../docs/mermaid/IA.mmd")]
|
#![doc = simple_mermaid::mermaid!("../../mermaid/IA.mmd")]
|
||||||
#![allow(rustdoc::invalid_html_tags)] // TODO: remove later. https://github.com/paritytech/polkadot-sdk-docs/issues/65
|
#![allow(rustdoc::invalid_html_tags)] // TODO: remove later. https://github.com/paritytech/polkadot-sdk-docs/issues/65
|
||||||
#![allow(rustdoc::bare_urls)] // TODO: remove later. https://github.com/paritytech/polkadot-sdk-docs/issues/65
|
#![allow(rustdoc::bare_urls)] // TODO: remove later. https://github.com/paritytech/polkadot-sdk-docs/issues/65
|
||||||
#![warn(rustdoc::broken_intra_doc_links)]
|
#![warn(rustdoc::broken_intra_doc_links)]
|
||||||
@@ -70,7 +70,7 @@
|
|||||||
//! > that they already pose, rather than repeating yourself**.
|
//! > that they already pose, rather than repeating yourself**.
|
||||||
//!
|
//!
|
||||||
//! For more details about documenting guidelines, see:
|
//! For more details about documenting guidelines, see:
|
||||||
//! <https://github.com/paritytech/polkadot-sdk/master/docs/DOCUMENTATION_GUIDELINES.md>
|
//! <https://github.com/paritytech/polkadot-sdk/master/docs/contributor/DOCUMENTATION_GUIDELINES.md>
|
||||||
//!
|
//!
|
||||||
//! #### Example: Explaining `#[pallet::call]`
|
//! #### Example: Explaining `#[pallet::call]`
|
||||||
//!
|
//!
|
||||||
@@ -138,7 +138,7 @@
|
|||||||
//! To build this crate properly, with with right HTML headers injected, run:
|
//! To build this crate properly, with with right HTML headers injected, run:
|
||||||
//!
|
//!
|
||||||
//! ```no_compile
|
//! ```no_compile
|
||||||
//! RUSTDOCFLAGS="--html-in-header $(pwd)/developer-hub/headers/toc.html" cargo doc -p developer-hub
|
//! RUSTDOCFLAGS="--html-in-header $(pwd)/docs/sdk/headers/toc.html" cargo doc -p polkadot-sdk-docs
|
||||||
//! ```
|
//! ```
|
||||||
//!
|
//!
|
||||||
//! adding `--no-deps` would speed up the process while development. If even faster build time for
|
//! adding `--no-deps` would speed up the process while development. If even faster build time for
|
||||||
+1
-1
@@ -21,7 +21,7 @@
|
|||||||
//! 1. A *runtime* which represents the state transition function (i.e. "Business Logic") of a
|
//! 1. A *runtime* which represents the state transition function (i.e. "Business Logic") of a
|
||||||
//! blockchain, and is encoded as a WASM blob.
|
//! blockchain, and is encoded as a WASM blob.
|
||||||
//! 2. A node whose primary purpose is to execute the given runtime.
|
//! 2. A node whose primary purpose is to execute the given runtime.
|
||||||
#![doc = simple_mermaid::mermaid!("../../../docs/mermaid/substrate_simple.mmd")]
|
#![doc = simple_mermaid::mermaid!("../../../mermaid/substrate_simple.mmd")]
|
||||||
//!
|
//!
|
||||||
//! *FRAME is the Substrate's framework of choice to build a runtime.*
|
//! *FRAME is the Substrate's framework of choice to build a runtime.*
|
||||||
//!
|
//!
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
//! * [`substrate`], for an overview of what Substrate as the main blockchain framework of Polkadot
|
//! * [`substrate`], for an overview of what Substrate as the main blockchain framework of Polkadot
|
||||||
//! SDK.
|
//! SDK.
|
||||||
//! * [`frame`], to learn about how to write blockchain applications aka. "App Chains".
|
//! * [`frame`], to learn about how to write blockchain applications aka. "App Chains".
|
||||||
//! * Continue with the [`developer_hub`'s "getting started"](crate#getting-started).
|
//! * Continue with the [`polkadot_sdk_docs`'s "getting started"](crate#getting-started).
|
||||||
//!
|
//!
|
||||||
//! ## Components
|
//! ## Components
|
||||||
//!
|
//!
|
||||||
@@ -78,7 +78,7 @@
|
|||||||
//! ### Summary
|
//! ### Summary
|
||||||
//!
|
//!
|
||||||
//! The following diagram summarizes how some of the components of Polkadot SDK work together:
|
//! The following diagram summarizes how some of the components of Polkadot SDK work together:
|
||||||
#![doc = simple_mermaid::mermaid!("../../../docs/mermaid/polkadot_sdk_substrate.mmd")]
|
#![doc = simple_mermaid::mermaid!("../../../mermaid/polkadot_sdk_substrate.mmd")]
|
||||||
//!
|
//!
|
||||||
//! A Substrate-based chain is a blockchain composed of a runtime and a node. As noted above, the
|
//! A Substrate-based chain is a blockchain composed of a runtime and a node. As noted above, the
|
||||||
//! runtime is the application logic of the blockchain, and the node is everything else.
|
//! runtime is the application logic of the blockchain, and the node is everything else.
|
||||||
@@ -86,13 +86,13 @@
|
|||||||
//! former is built with [`frame`], and the latter is built with rest of Substrate.
|
//! former is built with [`frame`], and the latter is built with rest of Substrate.
|
||||||
//!
|
//!
|
||||||
//! > You can think of a Substrate-based chain as a white-labeled blockchain.
|
//! > You can think of a Substrate-based chain as a white-labeled blockchain.
|
||||||
#![doc = simple_mermaid::mermaid!("../../../docs/mermaid/polkadot_sdk_polkadot.mmd")]
|
#![doc = simple_mermaid::mermaid!("../../../mermaid/polkadot_sdk_polkadot.mmd")]
|
||||||
//! Polkadot is itself a Substrate-based chain, composed of the exact same two components. It has
|
//! Polkadot is itself a Substrate-based chain, composed of the exact same two components. It has
|
||||||
//! specialized logic in both the node and the runtime side, but it is not "special" in any way.
|
//! specialized logic in both the node and the runtime side, but it is not "special" in any way.
|
||||||
//!
|
//!
|
||||||
//! A parachain is a "special" Substrate-based chain, whereby both the node and the runtime
|
//! A parachain is a "special" Substrate-based chain, whereby both the node and the runtime
|
||||||
//! components have became "Polkadot-aware" using Cumulus.
|
//! components have became "Polkadot-aware" using Cumulus.
|
||||||
#![doc = simple_mermaid::mermaid!("../../../docs/mermaid/polkadot_sdk_parachain.mmd")]
|
#![doc = simple_mermaid::mermaid!("../../../mermaid/polkadot_sdk_parachain.mmd")]
|
||||||
//!
|
//!
|
||||||
//! ## Notable Upstream Crates
|
//! ## Notable Upstream Crates
|
||||||
//!
|
//!
|
||||||
+1
-1
@@ -54,7 +54,7 @@
|
|||||||
//!
|
//!
|
||||||
//! > A notable Substrate-based blockchain that has built both custom FRAME pallets and custom
|
//! > A notable Substrate-based blockchain that has built both custom FRAME pallets and custom
|
||||||
//! > node-side components is <https://github.com/Cardinal-Cryptography/aleph-node>.
|
//! > node-side components is <https://github.com/Cardinal-Cryptography/aleph-node>.
|
||||||
#![doc = simple_mermaid::mermaid!("../../../docs/mermaid/substrate_dev.mmd")]
|
#![doc = simple_mermaid::mermaid!("../../../mermaid/substrate_dev.mmd")]
|
||||||
//!
|
//!
|
||||||
//! ## Structure
|
//! ## Structure
|
||||||
//!
|
//!
|
||||||
+2
-2
@@ -12,13 +12,13 @@
|
|||||||
//! Then, recall that a typical blockchain system will alter its state through execution of blocks.
|
//! Then, recall that a typical blockchain system will alter its state through execution of blocks.
|
||||||
//! *The component that dictates how this state alteration can happen is called the state transition
|
//! *The component that dictates how this state alteration can happen is called the state transition
|
||||||
//! function*.
|
//! function*.
|
||||||
#![doc = simple_mermaid::mermaid!("../../../docs/mermaid/stf_simple.mmd")]
|
#![doc = simple_mermaid::mermaid!("../../../mermaid/stf_simple.mmd")]
|
||||||
//!
|
//!
|
||||||
//! In Substrate-based blockchains, the state transition function is called the *Runtime*. This is
|
//! In Substrate-based blockchains, the state transition function is called the *Runtime*. This is
|
||||||
//! explained further in [`crate::reference_docs::wasm_meta_protocol`].
|
//! explained further in [`crate::reference_docs::wasm_meta_protocol`].
|
||||||
//!
|
//!
|
||||||
//! With this in mind, we can paint a complete picture of a blockchain as a state machine:
|
//! With this in mind, we can paint a complete picture of a blockchain as a state machine:
|
||||||
#![doc = simple_mermaid::mermaid!("../../../docs/mermaid/stf.mmd")]
|
#![doc = simple_mermaid::mermaid!("../../../mermaid/stf.mmd")]
|
||||||
//!
|
//!
|
||||||
//! In essence, the state of the blockchain at block N is the outcome of applying the state
|
//! In essence, the state of the blockchain at block N is the outcome of applying the state
|
||||||
//! transition function to the the previous state, and the current block as input. This can be
|
//! transition function to the the previous state, and the current block as input. This can be
|
||||||
+1
-1
@@ -30,7 +30,7 @@
|
|||||||
//! ```
|
//! ```
|
||||||
//!
|
//!
|
||||||
//! For clarity, the actual implementation in Substrate looks like this:
|
//! For clarity, the actual implementation in Substrate looks like this:
|
||||||
#![doc = docify::embed!("../substrate/primitives/runtime/src/generic/unchecked_extrinsic.rs", unchecked_extrinsic_encode_impl)]
|
#![doc = docify::embed!("../../substrate/primitives/runtime/src/generic/unchecked_extrinsic.rs", unchecked_extrinsic_encode_impl)]
|
||||||
//!
|
//!
|
||||||
//! Let's look at how each of these details is constructed:
|
//! Let's look at how each of these details is constructed:
|
||||||
//!
|
//!
|
||||||
+1
-1
@@ -104,7 +104,7 @@
|
|||||||
//!
|
//!
|
||||||
//! The above example is almost identical to the well-known (and somewhat notorious) `type
|
//! The above example is almost identical to the well-known (and somewhat notorious) `type
|
||||||
//! BalanceOf` that is often used in the context of [`frame::traits::fungible`].
|
//! BalanceOf` that is often used in the context of [`frame::traits::fungible`].
|
||||||
#![doc = docify::embed!("../substrate/frame/fast-unstake/src/types.rs", BalanceOf)]
|
#![doc = docify::embed!("../../substrate/frame/fast-unstake/src/types.rs", BalanceOf)]
|
||||||
//!
|
//!
|
||||||
//! ## Additional Resources
|
//! ## Additional Resources
|
||||||
//!
|
//!
|
||||||
+4
-4
@@ -33,7 +33,7 @@
|
|||||||
//!
|
//!
|
||||||
//! Therefore, the high-level architecture of a any Substrate-based chain can be demonstrated as
|
//! Therefore, the high-level architecture of a any Substrate-based chain can be demonstrated as
|
||||||
//! follows:
|
//! follows:
|
||||||
#![doc = simple_mermaid::mermaid!("../../../docs/mermaid/substrate_simple.mmd")]
|
#![doc = simple_mermaid::mermaid!("../../../mermaid/substrate_simple.mmd")]
|
||||||
//!
|
//!
|
||||||
//! The node and the runtime need to communicate. This is done through two concepts:
|
//! The node and the runtime need to communicate. This is done through two concepts:
|
||||||
//!
|
//!
|
||||||
@@ -44,7 +44,7 @@
|
|||||||
//! using macros and utilities in [`sp_api`]. For example, [`sp_api::Core`] is the most
|
//! using macros and utilities in [`sp_api`]. For example, [`sp_api::Core`] is the most
|
||||||
//! fundamental runtime API that any blockchain must implement in order to be able to (re)
|
//! fundamental runtime API that any blockchain must implement in order to be able to (re)
|
||||||
//! execute blocks.
|
//! execute blocks.
|
||||||
#![doc = simple_mermaid::mermaid!("../../../docs/mermaid/substrate_client_runtime.mmd")]
|
#![doc = simple_mermaid::mermaid!("../../../mermaid/substrate_client_runtime.mmd")]
|
||||||
//!
|
//!
|
||||||
//! A runtime must have a set of runtime APIs in order to have any meaningful blockchain
|
//! A runtime must have a set of runtime APIs in order to have any meaningful blockchain
|
||||||
//! functionality, but it can also expose more APIs. See TODO as an example of how to add custom
|
//! functionality, but it can also expose more APIs. See TODO as an example of how to add custom
|
||||||
@@ -74,7 +74,7 @@
|
|||||||
//! > The consensus is to your runtime what HTTP is to a web-application. It is the underlying
|
//! > The consensus is to your runtime what HTTP is to a web-application. It is the underlying
|
||||||
//! > engine that enables trustless execution of the runtime in a distributed manner whilst
|
//! > engine that enables trustless execution of the runtime in a distributed manner whilst
|
||||||
//! > maintaining a canonical outcome of that execution.
|
//! > maintaining a canonical outcome of that execution.
|
||||||
#![doc = simple_mermaid::mermaid!("../../../docs/mermaid/substrate_with_frame.mmd")]
|
#![doc = simple_mermaid::mermaid!("../../../mermaid/substrate_with_frame.mmd")]
|
||||||
//!
|
//!
|
||||||
//! ## State
|
//! ## State
|
||||||
//!
|
//!
|
||||||
@@ -91,7 +91,7 @@
|
|||||||
//! In fact, [`sp_core::storage::well_known_keys`] are the only state keys that the node side is
|
//! In fact, [`sp_core::storage::well_known_keys`] are the only state keys that the node side is
|
||||||
//! aware of. The rest of the state, including what logic the runtime has, what balance each user
|
//! aware of. The rest of the state, including what logic the runtime has, what balance each user
|
||||||
//! has and such are all only comprehensible to the runtime.
|
//! has and such are all only comprehensible to the runtime.
|
||||||
#![doc = simple_mermaid::mermaid!("../../../docs/mermaid/state.mmd")]
|
#![doc = simple_mermaid::mermaid!("../../../mermaid/state.mmd")]
|
||||||
//!
|
//!
|
||||||
//! In the above diagram, all of the state keys and values are opaque bytes to the node. The node
|
//! In the above diagram, all of the state keys and values are opaque bytes to the node. The node
|
||||||
//! does not know what they mean, and it does not now what is the type of the corresponding value
|
//! does not know what they mean, and it does not now what is the type of the corresponding value
|
||||||
+3
-3
@@ -212,7 +212,7 @@ that we currently maintain.
|
|||||||
|
|
||||||
### Using Docker
|
### Using Docker
|
||||||
|
|
||||||
[Using Docker](../docs/docker.md)
|
[Using Docker](../docs/contributor/docker.md)
|
||||||
|
|
||||||
### Shell Completion
|
### Shell Completion
|
||||||
|
|
||||||
@@ -222,11 +222,11 @@ that we currently maintain.
|
|||||||
|
|
||||||
### Contributing Guidelines
|
### 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
|
### 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
|
## License
|
||||||
|
|
||||||
|
|||||||
+4
-6
@@ -3,7 +3,7 @@
|
|||||||
[](#LICENSE)
|
[](#LICENSE)
|
||||||
[](https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/pipelines)
|
Status](https://gitlab.parity.io/parity/mirrors/polkadot-sdk/badges/master/pipeline.svg)](https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/pipelines)
|
||||||
[](docs/CONTRIBUTING.md)
|
[](docs/contributor/CONTRIBUTING.md)
|
||||||
[](https://substrate.stackexchange.com/)
|
Exchange](https://img.shields.io/badge/Substrate-Community%20&%20Support-24CC85?logo=stackexchange)](https://substrate.stackexchange.com/)
|
||||||
<p align="center">
|
<p align="center">
|
||||||
@@ -26,15 +26,13 @@ here](https://github.com/paritytech/polkadot-sdk/issues) for anything you suspec
|
|||||||
|
|
||||||
## Contributions & Code of Conduct
|
## Contributions & Code of Conduct
|
||||||
|
|
||||||
Please follow the contributions guidelines as outlined in
|
Please follow the contributions guidelines as outlined in [`docs/contributor/CONTRIBUTING.md`](https://github.com/paritytech/polkadot-sdk/blob/master/docs/contributor/CONTRIBUTING.md).
|
||||||
[`docs/CONTRIBUTING.md`](https://github.com/paritytech/polkadot-sdk/blob/master/docs/CONTRIBUTING.md). In all
|
In all communications and contributions, this project follows the [Contributor Covenant Code of Conduct](https://github.com/paritytech/polkadot-sdk/blob/master/docs/contributor/CODE_OF_CONDUCT.md).
|
||||||
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).
|
|
||||||
|
|
||||||
## Security
|
## Security
|
||||||
|
|
||||||
The security policy and procedures can be found in
|
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
|
## License
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
//!
|
//!
|
||||||
//! ## Documentation
|
//! ## Documentation
|
||||||
//!
|
//!
|
||||||
//! See [`polkadot_sdk::frame`](../developer_hub/polkadot_sdk/frame_runtime/index.html).
|
//! See [`polkadot_sdk::frame`](../polkadot_sdk_docs/polkadot_sdk/frame_runtime/index.html).
|
||||||
//!
|
//!
|
||||||
//! ## Warning: Experimental
|
//! ## Warning: Experimental
|
||||||
//!
|
//!
|
||||||
|
|||||||
Reference in New Issue
Block a user