Skip to content

Commit 31471d5

Browse files
authored
Merge branch 'main' into patch-2
2 parents 2de917f + 4c232f4 commit 31471d5

File tree

129 files changed

+1219
-16022
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

129 files changed

+1219
-16022
lines changed

.netlify/_redirects

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Redirects from what the browser requests to what we serve
22

3-
/rustdocs https://paritytech.github.io/substrate/master/sc_service/ 301!
3+
/rustdocs https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/index.html 301!
44

55
/how-to-guides /reference/ 301!
66

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,6 @@ Default localhost port configuration:
8686
```env
8787
GATSBY_WEBSITE_URL=http://localhost:8100
8888
GATSBY_DOCS_URL=http://localhost:8200
89-
GATSBY_MARKETPLACE_URL=http://localhost:8300
90-
GATSBY_CAREERS_URL=https://careers.substrate.io
9189
```
9290

9391
**Start development server**

config/menus.js

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const { MARKETPLACE_URL, WEBSITE_URL, CAREERS_URL } = require('./webConsts.js');
1+
const { WEBSITE_URL } = require('./webConsts.js');
22

33
/* the main menu, ids of items must match
44
the submenu's key of this js object */
@@ -58,14 +58,6 @@ const developers = [
5858
url: 'https://paritytech.github.io/substrate/master/sc_service/',
5959
id: 'developers.rustdocs',
6060
},
61-
{
62-
url: MARKETPLACE_URL,
63-
id: 'developers.marketplace',
64-
},
65-
{
66-
url: WEBSITE_URL + '/developers/playground/',
67-
id: 'developers.playground',
68-
},
6961
{
7062
url: WEBSITE_URL + '/developers/smart-contracts/',
7163
id: 'developers.smart-contracts',
@@ -132,10 +124,6 @@ const opportunities = [
132124
url: WEBSITE_URL + '/ecosystem/opportunities/grants',
133125
id: 'ecosystem.opportunities.grants',
134126
},
135-
{
136-
url: CAREERS_URL,
137-
id: 'ecosystem.opportunities.careers',
138-
},
139127
];
140128

141129
const resources = [

config/siteMetadata.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const menus = require('./menus.js');
2-
const { WEBSITE_URL, DOCS_URL, MARKETPLACE_URL, CAREERS_URL } = require('./webConsts.js');
2+
const { WEBSITE_URL, DOCS_URL } = require('./webConsts.js');
33

44
module.exports = {
55
menus,
@@ -10,8 +10,6 @@ module.exports = {
1010
siteUrl: DOCS_URL,
1111
websiteUrl: WEBSITE_URL,
1212
docsUrl: DOCS_URL,
13-
marketplaceUrl: MARKETPLACE_URL,
14-
careersUrl: CAREERS_URL,
1513
author: 'Parity WebDev/W3F WebOps',
1614
pressEmail: '[email protected]',
1715

config/webConsts.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
const WEBSITE_URL = process.env.GATSBY_WEBSITE_URL;
22
const DOCS_URL = process.env.GATSBY_DOCS_URL;
3-
const MARKETPLACE_URL = process.env.GATSBY_MARKETPLACE_URL;
4-
const CAREERS_URL = process.env.GATSBY_CAREERS_URL;
53

64
module.exports = {
75
WEBSITE_URL,
86
DOCS_URL,
9-
MARKETPLACE_URL,
10-
CAREERS_URL,
117
};

content/config/nav.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
menu:
2+
- polkadot-sdk
23
- quick-start
34
- learn
45
- install
@@ -10,6 +11,10 @@ menu:
1011
- reference
1112
- community
1213

14+
polkadot-sdk:
15+
title: Substrate to Polkadot SDK
16+
url: /polkadot-sdk/
17+
1318
quick-start:
1419
title: Quick start
1520
url: /quick-start/
@@ -84,7 +89,7 @@ install:
8489
url: /install/developer-tools/
8590
- title: Troubleshoot Rust issues
8691
url: /install/troubleshoot-rust-issues/
87-
92+
8893
#design:
8994
# title: Design
9095
# url: /design/
@@ -156,7 +161,7 @@ test:
156161
url: /test/simulate-parachains/
157162
- title: Check runtime
158163
url: /test/check-runtime/
159-
164+
160165
deploy:
161166
title: Deploy
162167
url: /deploy/

content/locales/en/menus.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
"developers.home": "Home",
1515
"developers.docs": "Docs",
1616
"developers.rustdocs": "Rust Docs",
17-
"developers.marketplace": "Marketplace",
18-
"developers.playground": "Playground",
1917
"developers.smart-contracts": "Smart Contracts",
2018
"developers.substrate-connect": "Substrate Connect",
2119
"developers.rococo-network": "Rococo Network",
@@ -32,7 +30,6 @@
3230

3331
"ecosystem.opportunities.hackathons": "Hackathons",
3432
"ecosystem.opportunities.grants": "Grants",
35-
"ecosystem.opportunities.careers": "Careers",
3633

3734
"ecosystem.resources.seminar": "Substrate Seminar",
3835
"ecosystem.resources.past-seminars": "Past Seminars",

content/md/en/docs/build/build-process.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs"));
6161

6262
This code includes the compact WebAssembly binary (`WASM_BINARY`) and the uncompressed WebAssembly binary generated by the compiler (`WASM_BINARY_BLOATY`) in its compilation result, and the final executable binary for the project is generated.
6363

64-
At each stage of the build process, the WebAssembly binary is compressed to a smaller and smaller size.
64+
At each stage of the build process, the WebAssembly binary is compressed to a smaller size than earlier.
6565
For example, you can compare the sizes of each WebAssembly binary artifact for Polkadot:
6666

6767
```bash
@@ -118,7 +118,7 @@ For example, you might want to use the native runtime for initial synchronizatio
118118
To use the native runtime for synchronizing blocks, you can start the node using the `--execution-syncing native` or `--execution-syncing native-else-wasm` command-line option.
119119

120120
For information about using the command-line options to specify an execution strategy for all or specific operations, see [node-template](/reference/command-line-tools/node-template).
121-
For information about the execution strategy variant, see [ExecutionStrategy](https://paritytech.github.io/substrate/master/sp_state_machine/enum.ExecutionStrategy.html)
121+
For information about the execution strategy variant, see [ExecutionStrategy](https://paritytech.github.io/substrate/master/sc_cli/arg_enums/enum.ExecutionStrategy.html)
122122

123123
## Building WebAssembly without a native runtime
124124

@@ -127,7 +127,7 @@ After an initial WebAssembly runtime is provided, the blob that represents the W
127127
In some rare cases, you might want to compile the WebAssembly target without the native runtime.
128128
For example, if you're testing a WebAssembly runtime to prepare for a forkless upgrade, you might want to compile just the new WebAssembly binary.
129129

130-
Although it's a rare use case, you can use the [build-only-wasm.sh](https://github.com/paritytech/substrate/blob/master/.maintain/build-only-wasm.sh) script to build the `no_std` WebAssembly binary without compiling the native runtime.
130+
Although it's a rare use case, you can use the [build-only-wasm.sh](https://github.com/paritytech/polkadot-sdk/blob/master/substrate/.maintain/build-only-wasm.sh) script to build the `no_std` WebAssembly binary without compiling the native runtime.
131131

132132
You can also use the `wasm-runtime-overrides` command-line option to load the WebAssembly from the file system.
133133

@@ -138,6 +138,6 @@ This option is primarily used for faster compile time when you don't need to upd
138138

139139
## Where to go next
140140

141-
- [Wasm-builder README](https://github.com/paritytech/substrate/blob/master/utils/wasm-builder/README.md)
141+
- [Wasm-builder source](https://github.com/paritytech/polkadot-sdk/blob/master/substrate/utils/wasm-builder/src/lib.rs)
142142
- [Rust compilation options](https://doc.rust-lang.org/cargo/commands/cargo-build.html#compilation-options)
143143
- [Discussion: Removing the native runtime](https://github.com/paritytech/substrate/issues/10579)

content/md/en/docs/build/genesis-configuration.md

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ description:
44
keywords:
55
---
66

7+
<div class="warning">
8+
Please refer to the <a href="https://paritytech.github.io/polkadot-sdk/master/frame_support/pallet_macros/attr.genesis_build.html">Rust docs</a> for the most up-to-date documentation on this topic.
9+
</div>
10+
11+
712
The first block produced by any blockchain is referred to as the genesis block.
813
The hash associated with this block is the top-level parent of all blocks produced after that first block.
914

@@ -14,7 +19,7 @@ As you learned in [Chain specification](/build/chain-spec/), the chain specifica
1419
However, the chain specification doesn't create the storage items that get initialized when you start a node.
1520
Instead, the storage items are defined in the pallets included in the runtime as described in [Runtime storage](/build/runtime-storage/).
1621

17-
After you create storage items for the runtime, you can choose whether they should be set to some initial value as part of the genesis configuration and included in the genesis block.
22+
After you create storage items for the runtime, you can choose whether they should be set to some initial value as part of the genesis configuration and included in the genesis block.
1823
To specify the storage items that you want to set an initial state for, Substrate provides two specialized FRAME attribute macros.
1924

2025
The macros you can use to initialize storage items as part of the genesis configuration for a chain are:
@@ -115,12 +120,17 @@ All of the `GenesisConfig` types for the pallets that included in the constructi
115120
The aggregated `RuntimeGenesisConfig` implements the [`BuildStorage`](https://paritytech.github.io/substrate/master/sp_runtime/trait.BuildStorage.html) trait to build all of the initial storage items for the runtime.
116121
For example, the node template runtime builds storage items for the following pallets that have a `RuntimeGenesisConfig` specified by default:
117122

118-
- [System pallet](#system-pallet)
119-
- [Aura pallet](#aura-pallet)
120-
- [Grandpa pallet](#grandpa-pallet)
121-
- [Balances pallet](#balances-pallet)
122-
- [TransactionPayment pallet](#transactionpayment-pallet)
123-
- [Sudo pallet](#sudo-pallet)
123+
- [Configure a simple storage value](#configure-a-simple-storage-value)
124+
- [Configure macros in the pallet](#configure-macros-in-the-pallet)
125+
- [Configure the chain specification](#configure-the-chain-specification)
126+
- [Adding genesis configuration to the runtime](#adding-genesis-configuration-to-the-runtime)
127+
- [System pallet](#system-pallet)
128+
- [Aura pallet](#aura-pallet)
129+
- [Grandpa pallet](#grandpa-pallet)
130+
- [Balances pallet](#balances-pallet)
131+
- [TransactionPayment pallet](#transactionpayment-pallet)
132+
- [Sudo pallet](#sudo-pallet)
133+
- [Initialize storage items within a pallet](#initialize-storage-items-within-a-pallet)
124134

125135
### System pallet
126136

@@ -193,7 +203,7 @@ pub struct RuntimeGenesisConfig {
193203

194204
Ultimately, the `RuntimeGenesisConfig` is exposed by way of the [`ChainSpec`](https://paritytech.github.io/substrate/master/sc_chain_spec/trait.ChainSpec.html) trait.
195205

196-
For a more complete example of genesis storage configuration for Substrate, see the [chain specification that ships with the Substrate code base](https://github.com/paritytech/substrate/blob/master/bin/node/cli/src/chain_spec.rs).
206+
For a more complete example of genesis storage configuration for Substrate, see the [chain specification that ships with the Substrate code base](https://github.com/paritytech/polkadot-sdk/blob/master/substrate/bin/node/cli/src/chain_spec.rs).
197207

198208
## Initialize storage items within a pallet
199209

content/md/en/docs/build/origins.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ keywords:
55
- origins
66
---
77

8+
<div class="warning">
9+
Please refer to the <a href="https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/reference_docs/frame_origin/index.html">Rust docs</a> for the most up-to-date documentation on this topic.
10+
</div>
11+
812
The runtime origin is used by dispatchable functions to check where a call has come from.
913

1014
## Raw origins
@@ -50,7 +54,7 @@ You can look at the source code of the [Sudo module](https://paritytech.github.i
5054
In addition to the three core origin types, runtime developers are also able to define custom origins.
5155
These can be used as authorization checks inside functions from specific modules in your runtime, or to define custom access-control logic around the sources of runtime requests.
5256

53-
Customizing origins allows runtime developers to specify valid origins depending on their runtime logic. For example, it may be desirable to restrict access of certain functions to special custom origins and authorize dispatch calls only from members of a [collective](https://github.com/paritytech/substrate/tree/master/frame/collective). The advantage of using custom origins is that it provides runtime developers a way to configure privileged access over dispatch calls to the runtime.
57+
Customizing origins allows runtime developers to specify valid origins depending on their runtime logic. For example, it may be desirable to restrict access of certain functions to special custom origins and authorize dispatch calls only from members of a [collective](https://github.com/paritytech/polkadot-sdk/tree/master/substrate/frame/collective). The advantage of using custom origins is that it provides runtime developers a way to configure privileged access over dispatch calls to the runtime.
5458

5559
## Next steps
5660

@@ -60,11 +64,11 @@ Customizing origins allows runtime developers to specify valid origins depending
6064

6165
### Examples
6266

63-
- View the [Sudo pallet](https://github.com/paritytech/substrate/tree/master/frame/sudo) to see how it allows a user to call with `Root` and `Signed` origin.
67+
- View the [Sudo pallet](https://github.com/paritytech/polkadot-sdk/tree/master/substrate/frame/sudo) to see how it allows a user to call with `Root` and `Signed` origin.
6468

65-
- View the [Timestamp pallet](https://github.com/paritytech/substrate/tree/master/frame/timestamp) to see how it validates an a call with `None` origin.
69+
- View the [Timestamp pallet](https://github.com/paritytech/polkadot-sdk/tree/master/substrate/frame/timestamp) to see how it validates an a call with `None` origin.
6670

67-
- View the [Collective pallet](https://github.com/paritytech/substrate/tree/master/frame/collective) to see how it constructs a custom `Member` origin.
71+
- View the [Collective pallet](https://github.com/paritytech/polkadot-sdk/tree/master/substrate/frame/collective) to see how it constructs a custom `Member` origin.
6872

6973
- View our recipe for creating and using a custom origin.
7074

content/md/en/docs/build/pallet-coupling.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ keywords:
66
- pallet design
77
---
88

9+
<div class="warning">
10+
Please refer to the <a href="https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/reference_docs/frame_pallet_coupling/index.html">Rust Docs</a> for the most up-to-date documentation on this topic.
11+
</div>
12+
913
The term **coupling** is often used to describe the degree to which two software modules depend on each other.
1014
For example, in object-oriented programming tight coupling and loose coupling are used to describe the relationship between objects classes:
1115

@@ -104,10 +108,10 @@ In general, loose coupling provides more flexibility than tight coupling and is
104108
It guarantees better maintainability, reusability, and extensibility of your code.
105109
However, tight coupling can be useful for pallets that are less complex or that have more overlap in methods and types than differences.
106110

107-
In FRAME, there are two pallets that are tightly coupled to [`pallet_treasury`](https://github.com/paritytech/substrate/tree/master/frame/treasury):
111+
In FRAME, there are two pallets that are tightly coupled to [`pallet_treasury`](https://github.com/paritytech/polkadot-sdk/tree/master/substrate/frame/treasury):
108112

109-
- [Bounties pallet](https://github.com/paritytech/substrate/tree/master/frame/bounties)
110-
- [Tipping pallet](https://github.com/paritytech/substrate/tree/master/frame/tips)
113+
- [Bounties pallet](https://github.com/paritytech/polkadot-sdk/tree/master/substrate/frame/bounties)
114+
- [Tipping pallet](https://github.com/paritytech/polkadot-sdk/tree/master/substrate/frame/tips)
111115

112116
As a general rule, the more complex a pallet is, the less desirable it is to tightly couple it.
113117
This evokes a concept in computer science called [cohesion](<https://en.wikipedia.org/wiki/Cohesion_(computer_science)>), a metric used to examine the overall quality of a software system.

content/md/en/docs/build/randomness.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Substrate includes two examples of how to implement the `Randomness` trait in pa
4141
You should only use this pallet in applications with low security requirements or when testing randomness-consuming applications.
4242
You shouldn't use this pallet in a production environment.
4343

44-
= The [BABE pallet](https://paritytech.github.io/substrate/master/pallet_babe/index.html) provides randomness by using verifiable random functions.
44+
- The [BABE pallet](https://paritytech.github.io/substrate/master/pallet_babe/index.html) provides randomness by using verifiable random functions.
4545

4646
This pallet provides production-grade randomness, and is used in Polkadot.
4747
If you select this pallet as the source of randomness your blockchain must use the blind assignment of blockchain extension ([BABE](/reference/glossary/#blind-assignment-of-blockchain-extension-babe)) slot-based consensus for producing blocks.

0 commit comments

Comments
 (0)