diff --git a/develop/interoperability/test-and-debug.md b/develop/interoperability/test-and-debug.md index 73e761009..1870861bd 100644 --- a/develop/interoperability/test-and-debug.md +++ b/develop/interoperability/test-and-debug.md @@ -13,7 +13,7 @@ This article explores two indispensable tools for XCM testing, the [XCM Simulato ## XCM Simulator -Setting up a live network with multiple interconnected parachains for XCM testing can be complex and resource-intensive. To address this, the [`xcm-simulator`](https://github.com/paritytech/polkadot-sdk/tree/master/polkadot/xcm/xcm-simulator){target=\_blank} was developed. This versatile tool enables developers to test and experiment with XCM in a controlled, simulated network environment. +Setting up a live network with multiple interconnected parachains for XCM testing can be complex and resource-intensive. To address this, the [`xcm-simulator`](https://github.com/paritytech/polkadot-sdk/tree/polkadot-stable2412/polkadot/xcm/xcm-simulator){target=\_blank} was developed. This versatile tool enables developers to test and experiment with XCM in a controlled, simulated network environment. The `xcm-simulator` offers a fast and efficient way to test [XCM instructions](https://github.com/polkadot-fellows/xcm-format?tab=readme-ov-file#5-the-xcvm-instruction-set){target=\_blank} against the [`xcm-executor`](https://paritytech.github.io/polkadot-sdk/master/staging_xcm_executor/index.html){target=\_blank}. It serves as an experimental playground for developers, supporting features such as: @@ -26,7 +26,7 @@ The `xcm-simulator` achieves this by utilizing mocked runtimes for both the rela The `xcm-simulator` provides the following macros for building a mocked simulation environment: -- [**`decl_test_relay_chain`**](https://github.com/paritytech/polkadot-sdk/blob/master/polkadot/xcm/xcm-simulator/src/lib.rs#L110C14-L110C35){target=\_blank} - implements upward message passing (UMP) for the specified relay chain struct. The struct must define the XCM configuration for the relay chain: +- [**`decl_test_relay_chain`**](https://github.com/paritytech/polkadot-sdk/blob/polkadot-stable2412/polkadot/xcm/xcm-simulator/src/lib.rs#L110C14-L110C35){target=\_blank} - implements upward message passing (UMP) for the specified relay chain struct. The struct must define the XCM configuration for the relay chain: ```rust decl_test_relay_chain! { @@ -38,10 +38,10 @@ The `xcm-simulator` provides the following macros for building a mocked simulati } ``` - The [`relay_ext()`](https://github.com/paritytech/polkadot-sdk/blob/master/polkadot/xcm/xcm-simulator/example/src/lib.rs#L117C1-L139C2){target=\_blank} sets up a test environment for the relay chain with predefined storage, then returns a [`TestExternalities`](https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_frame/testing_prelude/type.TestExternalities.html){target=\_blank} instance for further testing. + The [`relay_ext()`](https://github.com/paritytech/polkadot-sdk/blob/polkadot-stable2412/polkadot/xcm/xcm-simulator/example/src/lib.rs#L117C1-L139C2){target=\_blank} sets up a test environment for the relay chain with predefined storage, then returns a [`TestExternalities`](https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_frame/testing_prelude/type.TestExternalities.html){target=\_blank} instance for further testing. -- [**`decl_test_parachain`**](https://github.com/paritytech/polkadot-sdk/blob/master/polkadot/xcm/xcm-simulator/src/lib.rs#L180){target=\_blank} - implements the [`XcmMessageHandlerT`](https://paritytech.github.io/polkadot-sdk/master/xcm_simulator/trait.XcmpMessageHandlerT.html){target=\_blank} and [`DmpMessageHandlerT`](https://paritytech.github.io/polkadot-sdk/master/xcm_simulator/trait.DmpMessageHandlerT.html){target=\_blank} traits for the specified parachain struct. Requires the parachain struct to include the `XcmpMessageHandler` and `DmpMessageHandler` pallets, which define the logic for processing messages (implemented through [`mock_message_queue`](https://paritytech.github.io/polkadot-sdk/master/xcm_simulator/mock_message_queue/index.html){target=\_blank}). The patter must be the following: +- [**`decl_test_parachain`**](https://github.com/paritytech/polkadot-sdk/blob/polkadot-stable2412/polkadot/xcm/xcm-simulator/src/lib.rs#L180){target=\_blank} - implements the [`XcmMessageHandlerT`](https://paritytech.github.io/polkadot-sdk/master/xcm_simulator/trait.XcmpMessageHandlerT.html){target=\_blank} and [`DmpMessageHandlerT`](https://paritytech.github.io/polkadot-sdk/master/xcm_simulator/trait.DmpMessageHandlerT.html){target=\_blank} traits for the specified parachain struct. Requires the parachain struct to include the `XcmpMessageHandler` and `DmpMessageHandler` pallets, which define the logic for processing messages (implemented through [`mock_message_queue`](https://paritytech.github.io/polkadot-sdk/master/xcm_simulator/mock_message_queue/index.html){target=\_blank}). The patter must be the following: ```rust decl_test_parachain! { @@ -54,12 +54,12 @@ The `xcm-simulator` provides the following macros for building a mocked simulati } ``` - The [`para_ext(para_id: u32)`](https://github.com/paritytech/polkadot-sdk/blob/master/polkadot/xcm/xcm-simulator/example/src/lib.rs#L97C1-L115C2){target=\_blank} function initializes a test environment for a parachain with a specified `para_id`, sets the initial configuration of the parachain, returning a [`TestExternalities`](https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_frame/testing_prelude/type.TestExternalities.html){target=\_blank} instance for testing. + The [`para_ext(para_id: u32)`](https://github.com/paritytech/polkadot-sdk/blob/polkadot-stable2412/polkadot/xcm/xcm-simulator/example/src/lib.rs#L97C1-L115C2){target=\_blank} function initializes a test environment for a parachain with a specified `para_id`, sets the initial configuration of the parachain, returning a [`TestExternalities`](https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_frame/testing_prelude/type.TestExternalities.html){target=\_blank} instance for testing. !!!note Developers can take this idea and define as many parachains as they want, like `ParaA`, `ParaB`, `ParaC`, etc -- [**`decl_test_network`**](https://github.com/paritytech/polkadot-sdk/blob/master/polkadot/xcm/xcm-simulator/src/lib.rs#L292){target=\_blank} - defines a testing network consisting of a relay chain and multiple parachains. Takes a network struct as input and implements functionalities for testing, including [`ParachainXcmRouter`](https://paritytech.github.io/polkadot-sdk/master/xcm_simulator_example/struct.ParachainXcmRouter.html){target=\_blank} and [`RelayChainXcmRouter`](https://paritytech.github.io/polkadot-sdk/master/xcm_simulator_example/struct.RelayChainXcmRouter.html){target=\_blank}. The struct must specify the relay chain and an indexed list of parachains to be included in the network: +- [**`decl_test_network`**](https://github.com/paritytech/polkadot-sdk/blob/polkadot-stable2412/polkadot/xcm/xcm-simulator/src/lib.rs#L292){target=\_blank} - defines a testing network consisting of a relay chain and multiple parachains. Takes a network struct as input and implements functionalities for testing, including [`ParachainXcmRouter`](https://paritytech.github.io/polkadot-sdk/master/xcm_simulator_example/struct.ParachainXcmRouter.html){target=\_blank} and [`RelayChainXcmRouter`](https://paritytech.github.io/polkadot-sdk/master/xcm_simulator_example/struct.RelayChainXcmRouter.html){target=\_blank}. The struct must specify the relay chain and an indexed list of parachains to be included in the network: ```rust decl_test_network! { @@ -82,7 +82,7 @@ For a complete example of how to use the `xcm-simulator`, explore the [`sample`] ## XCM Emulator -The [`xcm-emulator`](https://github.com/paritytech/polkadot-sdk/tree/master/cumulus/xcm/xcm-emulator){target=\_blank} is a tool designed to simulate the execution of XCM programs using predefined runtime configurations. These configurations include those utilized by live networks like Kusama, Polkadot, and the Asset Hub. +The [`xcm-emulator`](https://github.com/paritytech/polkadot-sdk/tree/polkadot-stable2412/cumulus/xcm/xcm-emulator){target=\_blank} is a tool designed to simulate the execution of XCM programs using predefined runtime configurations. These configurations include those utilized by live networks like Kusama, Polkadot, and the Asset Hub. This tool enables testing of cross-chain message passing, providing a way to verify outcomes, weights, and side effects efficiently. @@ -107,9 +107,9 @@ The XCM Emulator provides both advantages and limitations when testing cross-cha The `xcm-emulator` package builds upon the functionality provided by the `xcm-simulator` package, offering the same set of macros while extending their capabilities. In addition to the standard features, `xcm-emulator` introduces new tools that make testing cross-chain communication more comprehensive. -One of the key additions is the [`decl_test_bridges`](https://github.com/paritytech/polkadot-sdk/blob/master/cumulus/xcm/xcm-emulator/src/lib.rs#L1178){target=\_blank} macro. This macro allows developers to define and implement mock bridges for testing interoperability in the Polkadot ecosystem. +One of the key additions is the [`decl_test_bridges`](https://github.com/paritytech/polkadot-sdk/blob/polkadot-stable2412/cumulus/xcm/xcm-emulator/src/lib.rs#L1178){target=\_blank} macro. This macro allows developers to define and implement mock bridges for testing interoperability in the Polkadot ecosystem. -- [**`decl_test_bridges`**](https://github.com/paritytech/polkadot-sdk/blob/master/cumulus/xcm/xcm-emulator/src/lib.rs#L1178){target=\_blank} - enables the creation of multiple bridges between chains, specifying their source chain, target chain, and the handler responsible for processing messages +- [**`decl_test_bridges`**](https://github.com/paritytech/polkadot-sdk/blob/polkadot-stable2412/cumulus/xcm/xcm-emulator/src/lib.rs#L1178){target=\_blank} - enables the creation of multiple bridges between chains, specifying their source chain, target chain, and the handler responsible for processing messages ```rust decl_test_bridges! { diff --git a/develop/interoperability/xcm-config.md b/develop/interoperability/xcm-config.md index 9cfac6e97..d403baaaa 100644 --- a/develop/interoperability/xcm-config.md +++ b/develop/interoperability/xcm-config.md @@ -15,7 +15,7 @@ The executor is highly configurable, with the [XCM builder](https://paritytech.g ## XCM Executor Configuration -The `Config` trait defines the XCM executor’s configuration, which requires several associated types. Each type has specific trait bounds that the concrete implementation must fulfill. Some types, such as `RuntimeCall`, come with a default implementation in most cases, while others use the unit type `()` as the default. For many of these types, selecting the appropriate implementation carefully is crucial. Predefined solutions and building blocks can be adapted to your specific needs. These solutions can be found in the [`xcm-builder`](https://github.com/paritytech/polkadot-sdk/tree/master/polkadot/xcm/xcm-builder){target=\_blank} folder. +The `Config` trait defines the XCM executor’s configuration, which requires several associated types. Each type has specific trait bounds that the concrete implementation must fulfill. Some types, such as `RuntimeCall`, come with a default implementation in most cases, while others use the unit type `()` as the default. For many of these types, selecting the appropriate implementation carefully is crucial. Predefined solutions and building blocks can be adapted to your specific needs. These solutions can be found in the [`xcm-builder`](https://github.com/paritytech/polkadot-sdk/tree/polkadot-stable2412/polkadot/xcm/xcm-builder){target=\_blank} folder. Each type is explained below, along with an overview of some of its implementations: diff --git a/develop/parachains/customize-parachain/add-existing-pallets.md b/develop/parachains/customize-parachain/add-existing-pallets.md index afdd40774..2d68e4c49 100644 --- a/develop/parachains/customize-parachain/add-existing-pallets.md +++ b/develop/parachains/customize-parachain/add-existing-pallets.md @@ -109,7 +109,7 @@ At its core, the `Config` trait typically looks like this: This basic structure shows that every pallet must define certain types, such as `RuntimeEvent` and `WeightInfo`, to function within the runtime. The actual implementation can vary depending on the pallet’s specific needs. ??? "Example - Utility Pallet" - For instance, in the [`utility pallet`](https://github.com/paritytech/polkadot-sdk/tree/master/substrate/frame/utility){target=\_blank}, the `Config` trait is implemented with the following types: + For instance, in the [`utility pallet`](https://github.com/paritytech/polkadot-sdk/tree/polkadot-stable2412/substrate/frame/utility){target=\_blank}, the `Config` trait is implemented with the following types: ```rust --8<-- 'code/develop/parachains/customize-parachain/add-existing-pallets/utility-pallet-config-trait.rs' diff --git a/develop/parachains/customize-parachain/index.md b/develop/parachains/customize-parachain/index.md index 9434f73a4..b7a9a02b0 100644 --- a/develop/parachains/customize-parachain/index.md +++ b/develop/parachains/customize-parachain/index.md @@ -10,7 +10,7 @@ template: index-page.html Learn how to build a custom parachain with Polkadot SDK's FRAME framework, which includes pallet development, testing, smart contracts, and runtime customization. Pallets are modular components within the FRAME ecosystem that contain specific blockchain functionalities. This modularity grants developers increased flexibility and control around which behaviors to include in the core logic of their parachain. -The [FRAME directory](https://github.com/paritytech/polkadot-sdk/tree/master/substrate/frame){target=\_blank} includes a robust library of pre-built pallets you can use as examples or templates to ease development. +The [FRAME directory](https://github.com/paritytech/polkadot-sdk/tree/polkadot-stable2412/substrate/frame){target=\_blank} includes a robust library of pre-built pallets you can use as examples or templates to ease development. ## In This Section @@ -20,7 +20,7 @@ The [FRAME directory](https://github.com/paritytech/polkadot-sdk/tree/master/sub
- +

FRAME Repository

View the source code of the FRAME development environment that provides pallets you can use, modify, and extend to build the runtime logic to suit the needs of your blockchain.

diff --git a/develop/parachains/customize-parachain/overview.md b/develop/parachains/customize-parachain/overview.md index 9098e87f2..eb85ced6c 100644 --- a/develop/parachains/customize-parachain/overview.md +++ b/develop/parachains/customize-parachain/overview.md @@ -29,7 +29,7 @@ Developers have the flexibility to implement any desired behavior in the core lo - Storing information - Enforcing business rules -Pallets also include necessary wiring code to ensure proper integration and functionality within the runtime. FRAME provides a range of [pre-built pallets](https://github.com/paritytech/polkadot-sdk/tree/master/substrate/frame){target=\_blank} for standard and common blockchain functionalities, including consensus algorithms, staking mechanisms, governance systems, and more. These pre-existing pallets serve as building blocks or templates, which developers can use as-is, modify, or reference when creating custom functionalities. +Pallets also include necessary wiring code to ensure proper integration and functionality within the runtime. FRAME provides a range of [pre-built pallets](https://github.com/paritytech/polkadot-sdk/tree/polkadot-stable2412/substrate/frame){target=\_blank} for standard and common blockchain functionalities, including consensus algorithms, staking mechanisms, governance systems, and more. These pre-existing pallets serve as building blocks or templates, which developers can use as-is, modify, or reference when creating custom functionalities. #### Pallet Structure diff --git a/develop/parachains/customize-parachain/pallet-testing.md b/develop/parachains/customize-parachain/pallet-testing.md index 440c2171a..82989778c 100644 --- a/develop/parachains/customize-parachain/pallet-testing.md +++ b/develop/parachains/customize-parachain/pallet-testing.md @@ -15,7 +15,7 @@ This guide will explore how to mock a runtime and test a pallet. For that, the P To test a pallet, a mock runtime is created to simulate the behavior of the blockchain environment where the pallet will be included. This involves defining a minimal runtime configuration that only provides for the required dependencies for the tested pallet. -For a complete example of a mocked runtime, check out the `mock.rs` file in the [Solochain Template](https://github.com/paritytech/polkadot-sdk/blob/master/templates/solochain/pallets/template/src/mock.rs){target=\_blank}. +For a complete example of a mocked runtime, check out the `mock.rs` file in the [Solochain Template](https://github.com/paritytech/polkadot-sdk/blob/polkadot-stable2412/templates/solochain/pallets/template/src/mock.rs){target=\_blank}. A `mock.rs` file defines the mock runtime in a typical Polkadot SDK project. It includes the elements described below. @@ -104,5 +104,5 @@ Some key considerations are: ## Where to Go Next -- Dive into the full implementation of the [`mock.rs`](https://github.com/paritytech/polkadot-sdk/blob/master/templates/solochain/pallets/template/src/mock.rs){target=\_blank} and [`test.rs`](https://github.com/paritytech/polkadot-sdk/blob/master/templates/solochain/pallets/template/src/tests.rs){target=\_blank} files in the [Solochain Template](https://github.com/paritytech/polkadot-sdk/tree/master/templates/solochain){target=_blank} +- Dive into the full implementation of the [`mock.rs`](https://github.com/paritytech/polkadot-sdk/blob/polkadot-stable2412/templates/solochain/pallets/template/src/mock.rs){target=\_blank} and [`test.rs`](https://github.com/paritytech/polkadot-sdk/blob/polkadot-stable2412/templates/solochain/pallets/template/src/tests.rs){target=\_blank} files in the [Solochain Template](https://github.com/paritytech/polkadot-sdk/tree/polkadot-stable2412/templates/solochain){target=_blank} - To evaluate the resource usage of your pallet operations, refer to the [Benchmarking documentation](/develop/parachains/customize-parachain/benchmarking/) for guidance on measuring efficiency \ No newline at end of file diff --git a/develop/parachains/deployment/generate-chain-specs.md b/develop/parachains/deployment/generate-chain-specs.md index 27a414f6a..635194f96 100644 --- a/develop/parachains/deployment/generate-chain-specs.md +++ b/develop/parachains/deployment/generate-chain-specs.md @@ -94,8 +94,8 @@ chain-spec-builder create -r Ensure to replace `` with the path to the runtime Wasm file and `` with the command to insert the runtime into the chain specification. The available commands are: -- **`patch`** - overwrites the runtime's default genesis config with the provided patch. You can check the following [patch file](https://github.com/paritytech/polkadot-sdk/blob/polkadot-stable1985-rc1/substrate/bin/utils/chain-spec-builder/tests/input/patch.json){target=\_blank} as a reference -- **`full`** - build the genesis config for runtime using the JSON file. No defaults will be used. As a reference, you can check the following [full file](https://github.com/paritytech/polkadot-sdk/blob/polkadot-stable1985-rc1/substrate/bin/utils/chain-spec-builder/tests/input/full.json){target=\_blank} +- **`patch`** - overwrites the runtime's default genesis config with the provided patch. You can check the following [patch file](https://github.com/paritytech/polkadot-sdk/blob/polkadot-stable2412/substrate/bin/utils/chain-spec-builder/tests/input/patch.json){target=\_blank} as a reference +- **`full`** - build the genesis config for runtime using the JSON file. No defaults will be used. As a reference, you can check the following [full file](https://github.com/paritytech/polkadot-sdk/blob/polkadot-stable2412/substrate/bin/utils/chain-spec-builder/tests/input/full.json){target=\_blank} - **`default`** - gets the default genesis config for the runtime and uses it in `ChainSpec`. Please note that the default genesis config may not be valid. For some runtimes, initial values should be added there (e.g., session keys, BABE epoch) - **`named-preset`** - uses named preset provided by the runtime to build the chain spec diff --git a/develop/parachains/deployment/image.png b/develop/parachains/deployment/image.png new file mode 100644 index 000000000..2f9dd80b1 Binary files /dev/null and b/develop/parachains/deployment/image.png differ diff --git a/develop/parachains/get-started/build-custom-parachains.md b/develop/parachains/get-started/build-custom-parachains.md index c30c32803..df534491d 100644 --- a/develop/parachains/get-started/build-custom-parachains.md +++ b/develop/parachains/get-started/build-custom-parachains.md @@ -7,7 +7,7 @@ description: Learn how to build custom parachains using the Polkadot SDK, focusi ## Introduction -Building custom parachains with the [Polkadot SDK](https://github.com/paritytech/polkadot-sdk/tree/master){target=\_blank} allows developers to create specialized blockchain solutions tailored to unique requirements. By leveraging [Substrate](https://github.com/paritytech/polkadot-sdk/tree/master/substrate){target=\_blank}—a Rust-based, modular blockchain development framework—the Polkadot SDK provides powerful tools to construct chains that can either stand-alone or connect to Polkadot’s shared security network as parachains. This flexibility empowers projects across various sectors to launch blockchains that meet specific functional, security, and scalability needs. +Building custom parachains with the [Polkadot SDK](https://github.com/paritytech/polkadot-sdk/tree/polkadot-stable2412){target=\_blank} allows developers to create specialized blockchain solutions tailored to unique requirements. By leveraging [Substrate](https://github.com/paritytech/polkadot-sdk/tree/polkadot-stable2412/substrate){target=\_blank}—a Rust-based, modular blockchain development framework—the Polkadot SDK provides powerful tools to construct chains that can either stand-alone or connect to Polkadot’s shared security network as parachains. This flexibility empowers projects across various sectors to launch blockchains that meet specific functional, security, and scalability needs. This guide covers the core steps for building a custom blockchain using the Polkadot SDK, starting from pre-built chain templates. These templates simplify development, providing an efficient starting point that can be further customized, allowing you to focus on implementing the features and modules that set your blockchain apart. @@ -17,11 +17,11 @@ Using pre-built templates is an efficient way to begin building a custom blockch Within the Polkadot SDK, the following templates are available to get you started: -- [**`minimal-template`**](https://github.com/paritytech/polkadot-sdk/tree/master/templates/minimal){target=\_blank} - includes only the essential components necessary for a functioning blockchain. It’s ideal for developers who want to gain familiarity with blockchain basics and test simple customizations before scaling up +- [**`minimal-template`**](https://github.com/paritytech/polkadot-sdk/tree/polkadot-stable2412/templates/minimal){target=\_blank} - includes only the essential components necessary for a functioning blockchain. It’s ideal for developers who want to gain familiarity with blockchain basics and test simple customizations before scaling up -- [**`solochain-template`**](https://github.com/paritytech/polkadot-sdk/tree/master/templates/solochain){target=\_blank} - provides a foundation for creating standalone blockchains with moderate features, including a simple consensus mechanism and several core FRAME pallets. It’s a solid starting point for developers who want a fully functional chain that doesn’t depend on a relay chain +- [**`solochain-template`**](https://github.com/paritytech/polkadot-sdk/tree/polkadot-stable2412/templates/solochain){target=\_blank} - provides a foundation for creating standalone blockchains with moderate features, including a simple consensus mechanism and several core FRAME pallets. It’s a solid starting point for developers who want a fully functional chain that doesn’t depend on a relay chain -- [**`parachain-template`**](https://github.com/paritytech/polkadot-sdk/tree/master/templates/parachain){target=\_blank} - designed for connecting to relay chains like Polkadot, Kusama, or Paseo, this template enables a chain to operate as a parachain. For projects aiming to integrate with Polkadot’s ecosystem, this template offers a great starting point +- [**`parachain-template`**](https://github.com/paritytech/polkadot-sdk/tree/polkadot-stable2412/templates/parachain){target=\_blank} - designed for connecting to relay chains like Polkadot, Kusama, or Paseo, this template enables a chain to operate as a parachain. For projects aiming to integrate with Polkadot’s ecosystem, this template offers a great starting point In addition, several external templates offer unique features and can align with specific use cases or developer familiarity: diff --git a/develop/parachains/get-started/index.md b/develop/parachains/get-started/index.md index 4301cbd53..c6810b0cf 100644 --- a/develop/parachains/get-started/index.md +++ b/develop/parachains/get-started/index.md @@ -28,7 +28,7 @@ Features developers can expect from the Polkadot SDK include:
- +

Polkadot SDK repository

The Polkadot SDK repository provides all the components needed to start building on the Polkadot network. Check out the latest releases, issues, and more.

diff --git a/develop/parachains/get-started/intro-polkadot-sdk.md b/develop/parachains/get-started/intro-polkadot-sdk.md index 5189e9713..ef649b516 100644 --- a/develop/parachains/get-started/intro-polkadot-sdk.md +++ b/develop/parachains/get-started/intro-polkadot-sdk.md @@ -7,7 +7,7 @@ description: Learn about the Polkadot SDK, a robust developer toolkit for buildi ## Introduction -The [Polkadot SDK](https://github.com/paritytech/polkadot-sdk){target=\_blank} is a powerful and versatile developer kit designed to facilitate building on the Polkadot network. It provides the necessary components for creating custom blockchains, parachains, generalized rollups, and more. Written in the Rust programming language, it puts security and robustness at the forefront of its design. +The [Polkadot SDK](https://github.com/paritytech/polkadot-sdk/tree/polkadot-stable2412){target=\_blank} is a powerful and versatile developer kit designed to facilitate building on the Polkadot network. It provides the necessary components for creating custom blockchains, parachains, generalized rollups, and more. Written in the Rust programming language, it puts security and robustness at the forefront of its design. Whether you're building a standalone chain or deploying a parachain on Polkadot, this SDK equips developers with the libraries and tools needed to manage runtime logic, compile the codebase, and utilize core features like staking, governance, and Cross-Consensus Messaging (XCM). It also provides a means for building generalized peer-to-peer systems beyond blockchains. The Polkadot SDK houses the following overall functionality: diff --git a/develop/parachains/maintenance/storage-migrations.md b/develop/parachains/maintenance/storage-migrations.md index 334aef4e8..5568f82e1 100644 --- a/develop/parachains/maintenance/storage-migrations.md +++ b/develop/parachains/maintenance/storage-migrations.md @@ -187,4 +187,4 @@ Multi-block migrations are ideal when dealing with: The primary trade-off is increased implementation complexity, as you must manage the migration state and handle partial completion scenarios. However, multi-block migrations' significant safety benefits and operational reliability are typically worth the increased complexity. -For a complete implementation example of multi-block migrations, refer to the [official example](https://github.com/paritytech/polkadot-sdk/tree/0d7d2177807ec6b3094f4491a45b0bc0d74d3c8b/substrate/frame/examples/multi-block-migrations){target=\_blank} in the Polkadot SDK. \ No newline at end of file +For a complete implementation example of multi-block migrations, refer to the [official example](https://github.com/paritytech/polkadot-sdk/tree/polkadot-stable2412/substrate/frame/examples/multi-block-migrations){target=\_blank} in the Polkadot SDK. \ No newline at end of file diff --git a/develop/smart-contracts/overview.md b/develop/smart-contracts/overview.md index b54cdb0b8..60772871e 100644 --- a/develop/smart-contracts/overview.md +++ b/develop/smart-contracts/overview.md @@ -44,7 +44,7 @@ These strengths do come with certain limitations. Some smart contracts environme Another downside is that smart contracts often follow a gas metering model, where program execution is associated with a given unit and a marketplace is set up to pay for such an execution unit. This fee system is often very rigid, and some complex flows, like account abstraction, have been developed to circumvent this problem. -In contrast, parachains can create their own custom logics (known as pallets or modules), and combine them as the state transition function (STF or runtime) thanks to the modularity provided by the [Polkadot-SDK](https://github.com/paritytech/polkadot-sdk/){target=\_blank}. The different pallets within the parachain runtime can give developers a lot of flexibility when building applications on top of it. +In contrast, parachains can create their own custom logics (known as pallets or modules), and combine them as the state transition function (STF or runtime) thanks to the modularity provided by the [Polkadot-SDK](https://github.com/paritytech/polkadot-sdk/tree/polkadot-stable2412){target=\_blank}. The different pallets within the parachain runtime can give developers a lot of flexibility when building applications on top of it. ``` mermaid flowchart LR @@ -66,7 +66,7 @@ Polkadot's primary purpose is to provide security for parachains that connect to The Polkadot SDK supports multiple smart contract execution environments: - **EVM** - through [Frontier](https://github.com/polkadot-evm/frontier){target=\_blank}. It consists of a full Ethereum JSON RPC compatible client, an Ethereum emulation layer, and a [Rust-based EVM](https://github.com/rust-ethereum/evm){target=\_blank}. This is used by chains like [Acala](https://acala.network/){target=\_blank}, [Astar](https://astar.network/){target=\_blank}, [Moonbeam](https://moonbeam.network){target=\_blank} and more -- **Wasm** - through the [Contracts pallet](https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/contracts/){target=\_blank}. [ink!](https://use.ink/){target=\_blank} is a smart contract language that provides a compiler to Wasm. Wasm contracts can be used by chains like [Astar](https://astar.network/){target=\_blank} +- **Wasm** - through the [Contracts pallet](https://github.com/paritytech/polkadot-sdk/blob/polkadot-stable2412/substrate/frame/contracts/){target=\_blank}. [ink!](https://use.ink/){target=\_blank} is a smart contract language that provides a compiler to Wasm. Wasm contracts can be used by chains like [Astar](https://astar.network/){target=\_blank} - **PolkaVM** - a cutting-edge virtual machine tailored to optimize smart contract execution on Polkadot. Unlike traditional EVMs, PolkaVM is built with a [RISC-V-based register architecture](https://en.wikipedia.org/wiki/RISC-V){target=\_blank} for increased performance and scalability ### EVM Contracts diff --git a/infrastructure/running-a-validator/onboarding-and-offboarding/set-up-validator.md b/infrastructure/running-a-validator/onboarding-and-offboarding/set-up-validator.md index 52ff3e559..6cc6788fe 100644 --- a/infrastructure/running-a-validator/onboarding-and-offboarding/set-up-validator.md +++ b/infrastructure/running-a-validator/onboarding-and-offboarding/set-up-validator.md @@ -155,7 +155,7 @@ docker.io/parity/polkadot:INSERT_VERSION_NUMBER ### Build from Sources -You may build the binaries from source by following the instructions on the [Polkadot SDK repository](https://github.com/paritytech/polkadot-sdk/tree/master/polkadot#building){target=\_blank}. +You may build the binaries from source by following the instructions on the [Polkadot SDK repository](https://github.com/paritytech/polkadot-sdk/tree/polkadot-stable2412/polkadot#building){target=\_blank}. ### Verify Installation diff --git a/polkadot-protocol/architecture/polkadot-chain/pos-consensus.md b/polkadot-protocol/architecture/polkadot-chain/pos-consensus.md index 0c79fa7ad..ead2927bf 100644 --- a/polkadot-protocol/architecture/polkadot-chain/pos-consensus.md +++ b/polkadot-protocol/architecture/polkadot-chain/pos-consensus.md @@ -118,6 +118,6 @@ Key features of BEEFY include: ## Resources - [GRANDPA Rust implementation](https://github.com/paritytech/finality-grandpa){target=\_blank} -- [GRANDPA Pallet](https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/grandpa/src/lib.rs){target=\_blank} +- [GRANDPA Pallet](https://github.com/paritytech/polkadot-sdk/blob/polkadot-stable2412/substrate/frame/grandpa/src/lib.rs){target=\_blank} - [Block Production and Finalization in Polkadot](https://www.crowdcast.io/e/polkadot-block-production){target=\_blank} - Bill Laboon explains how BABE and GRANDPA work together to produce and finalize blocks on Kusama - [Block Production and Finalization in Polkadot: Understanding the BABE and GRANDPA Protocols](https://www.youtube.com/watch?v=1CuTSluL7v4&t=4s){target=\_blank} - Bill Laboon's MIT Cryptoeconomic Systems 2020 academic talk describing Polkadot's hybrid consensus model in-depth \ No newline at end of file diff --git a/polkadot-protocol/architecture/system-chains/asset-hub.md b/polkadot-protocol/architecture/system-chains/asset-hub.md index 934962b32..3c7beab4d 100644 --- a/polkadot-protocol/architecture/system-chains/asset-hub.md +++ b/polkadot-protocol/architecture/system-chains/asset-hub.md @@ -161,7 +161,7 @@ The API supports various asset operations, such as paying transaction fees with ### Parachain Node -To fully leverage the Asset Hub's functionality, developers will need to run a system parachain node. Setting up an Asset Hub node allows users to interact with the parachain in real time, syncing data and participating in the broader Polkadot ecosystem. Guidelines for setting up an [Asset Hub node](https://github.com/paritytech/polkadot-sdk/tree/master/cumulus#asset-hub-){target=\_blank} are available in the Parity documentation. +To fully leverage the Asset Hub's functionality, developers will need to run a system parachain node. Setting up an Asset Hub node allows users to interact with the parachain in real time, syncing data and participating in the broader Polkadot ecosystem. Guidelines for setting up an [Asset Hub node](https://github.com/paritytech/polkadot-sdk/tree/polkadot-stable2412/cumulus#asset-hub-){target=\_blank} are available in the Parity documentation. Using these integration tools, developers can manage assets seamlessly and integrate Asset Hub functionality into their applications, leveraging Polkadot's powerful infrastructure. diff --git a/polkadot-protocol/architecture/system-chains/bridge-hub.md b/polkadot-protocol/architecture/system-chains/bridge-hub.md index eab4ff190..d59188a1a 100644 --- a/polkadot-protocol/architecture/system-chains/bridge-hub.md +++ b/polkadot-protocol/architecture/system-chains/bridge-hub.md @@ -37,7 +37,7 @@ In any given Bridge Hub implementation (Kusama, Polkadot, or other relay chains) Bridge Hub also has a set of components and pallets that support a bridge between Polkadot and Ethereum through [Snowbridge](https://github.com/Snowfork/snowbridge){target=\_blank}. -To view the complete list of which pallets are included in Bridge Hub, visit the Subscan [Runtime Modules](https://bridgehub-polkadot.subscan.io/runtime){target=\_blank} page. Alternatively, the source code for those pallets can be found in the Polkadot SDK [Snowbridge Pallets](https://github.com/paritytech/polkadot-sdk/tree/aff3a0796176ff3c0ee1b89c2f1d811a858f17a8/bridges/snowbridge/pallets){target=\_blank} repository. +To view the complete list of which pallets are included in Bridge Hub, visit the Subscan [Runtime Modules](https://bridgehub-polkadot.subscan.io/runtime){target=\_blank} page. Alternatively, the source code for those pallets can be found in the Polkadot SDK [Snowbridge Pallets](https://github.com/paritytech/polkadot-sdk/tree/polkadot-stable2412/bridges/snowbridge/pallets){target=\_blank} repository. ## Deployed Bridges @@ -47,6 +47,6 @@ To view the complete list of which pallets are included in Bridge Hub, visit the ## Where to Go Next -- Go over the Bridge Hub README in the Polkadot SDK [Bridge-hub Parachains](https://github.com/paritytech/polkadot-sdk/blob/master/cumulus/parachains/runtimes/bridge-hubs/README.md){target=\_blank} repository -- Take a deeper dive into bridging architecture in the Polkadot SDK [High-Level Bridge](https://github.com/paritytech/polkadot-sdk/blob/master/bridges/docs/high-level-overview.md){target=\_blank} documentation +- Go over the Bridge Hub README in the Polkadot SDK [Bridge-hub Parachains](https://github.com/paritytech/polkadot-sdk/blob/polkadot-stable2412/cumulus/parachains/runtimes/bridge-hubs/README.md){target=\_blank} repository +- Take a deeper dive into bridging architecture in the Polkadot SDK [High-Level Bridge](https://github.com/paritytech/polkadot-sdk/blob/polkadot-stable2412/bridges/docs/high-level-overview.md){target=\_blank} documentation - Read more about BEEFY and Bridging in the Polkadot Wiki: [Bridging: BEEFY](https://wiki.polkadot.network/docs/learn-consensus#bridging-beefy){target=\_blank} diff --git a/polkadot-protocol/architecture/system-chains/overview.md b/polkadot-protocol/architecture/system-chains/overview.md index a7259e7ad..250c91bc0 100644 --- a/polkadot-protocol/architecture/system-chains/overview.md +++ b/polkadot-protocol/architecture/system-chains/overview.md @@ -53,7 +53,7 @@ All system parachains are on both Polkadot and Kusama with the following excepti ### Asset Hub -The [Asset Hub](https://github.com/paritytech/polkadot-sdk/tree/master/cumulus#asset-hub-){target=\_blank} is an asset portal for the entire network. It helps asset creators, such as reserve-backed stablecoin issuers, track the total issuance of an asset in the network, including amounts transferred to other parachains. It also serves as the hub where asset creators can perform on-chain operations, such as minting and burning, to manage their assets effectively. +The [Asset Hub](https://github.com/paritytech/polkadot-sdk/tree/polkadot-stable2412/cumulus#asset-hub-){target=\_blank} is an asset portal for the entire network. It helps asset creators, such as reserve-backed stablecoin issuers, track the total issuance of an asset in the network, including amounts transferred to other parachains. It also serves as the hub where asset creators can perform on-chain operations, such as minting and burning, to manage their assets effectively. This asset management logic is encoded directly in the runtime of the chain rather than in smart contracts. The efficiency of executing logic in a parachain allows for fees and deposits that are about 1/10th of what is required on the relay chain. These low fees mean that the Asset Hub is well suited for handling the frequent transactions required when managing balances, transfers, and on-chain assets. diff --git a/polkadot-protocol/basics/blocks-transactions-fees/fees.md b/polkadot-protocol/basics/blocks-transactions-fees/fees.md index 6c4cabbca..9acadd674 100644 --- a/polkadot-protocol/basics/blocks-transactions-fees/fees.md +++ b/polkadot-protocol/basics/blocks-transactions-fees/fees.md @@ -42,7 +42,7 @@ Transaction fees are withdrawn before the transaction is executed. After the tra ## Using the Transaction Payment Pallet -The [Transaction Payment pallet](https://github.com/paritytech/polkadot-sdk/tree/master/substrate/frame/transaction-payment){target=\_blank} provides the basic logic for calculating the inclusion fee. You can also use the Transaction Payment pallet to: +The [Transaction Payment pallet](https://github.com/paritytech/polkadot-sdk/tree/polkadot-stable2412/substrate/frame/transaction-payment){target=\_blank} provides the basic logic for calculating the inclusion fee. You can also use the Transaction Payment pallet to: - Convert a weight value into a deductible fee based on a currency type using [`Config::WeightToFee`](https://docs.rs/pallet-transaction-payment/latest/pallet_transaction_payment/pallet/trait.Config.html#associatedtype.WeightToFee){target=\_blank} - Update the fee for the next block by defining a multiplier based on the chain’s final state at the end of the previous block using [`Config::FeeMultiplierUpdate`](https://docs.rs/pallet-transaction-payment/latest/pallet_transaction_payment/pallet/trait.Config.html#associatedtype.FeeMultiplierUpdate){target=\_blank} @@ -96,7 +96,7 @@ Inclusion fees must be computable before execution and can only represent fixed - Bonds are a type of fee that might be returned or slashed after some on-chain event. For example, you might want to require users to place a bond to participate in a vote. The bond might then be returned at the end of the referendum or slashed if the voter attempted malicious behavior - Deposits are fees that might be returned later. For example, you might require users to pay a deposit to execute an operation that uses storage. The user’s deposit could be returned if a subsequent operation frees up storage - Burn operations are used to pay for a transaction based on its internal logic. For example, a transaction might burn funds from the sender if the transaction creates new storage items to pay for the increased state size -- Limits enable you to enforce constant or configurable limits on specific operations. For example, the default [Staking pallet](https://github.com/paritytech/polkadot-sdk/tree/master/substrate/frame/staking){target=\_blank} only allows nominators to nominate 16 validators to limit the complexity of the validator election process +- Limits enable you to enforce constant or configurable limits on specific operations. For example, the default [Staking pallet](https://github.com/paritytech/polkadot-sdk/tree/polkadot-stable2412/substrate/frame/staking){target=\_blank} only allows nominators to nominate 16 validators to limit the complexity of the validator election process It is important to note that if you query the chain for a transaction fee, it only returns the inclusion fee. @@ -220,5 +220,5 @@ You now know the weight system, how it affects transaction fee computation, and - [Benchmark](/develop/parachains/customize-parachain/benchmarking/) - [`SignedExtension`](https://paritytech.github.io/polkadot-sdk/master/sp_runtime/traits/trait.SignedExtension.html){target=\_blank} -- [Custom weights for the Example pallet](https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/examples/basic/src/weights.rs){target=\_blank} +- [Custom weights for the Example pallet](https://github.com/paritytech/polkadot-sdk/blob/polkadot-stable2412/substrate/frame/examples/basic/src/weights.rs){target=\_blank} - [Web3 Foundation Research](https://research.web3.foundation/Polkadot/overview/token-economics#relay-chain-transaction-fees-and-per-block-transaction-limits){target=\_blank} \ No newline at end of file diff --git a/polkadot-protocol/glossary.md b/polkadot-protocol/glossary.md index dba3045ae..02954cbee 100644 --- a/polkadot-protocol/glossary.md +++ b/polkadot-protocol/glossary.md @@ -116,7 +116,7 @@ Well-known development accounts, such as Alice, Bob, Charlie, Dave, Eve, and Fer bottom drive obey lake curtain smoke basket hold race lonely fit walk ``` -Many tools in the Polkadot SDK ecosystem, such as [`subkey`](https://github.com/paritytech/polkadot-sdk/tree/HEAD/substrate/bin/utils/subkey){target=\_blank}, allow you to implicitly specify an account using a derivation path such as `//Alice`. +Many tools in the Polkadot SDK ecosystem, such as [`subkey`](https://github.com/paritytech/polkadot-sdk/tree/polkadot-stable2412/substrate/bin/utils/subkey){target=\_blank}, allow you to implicitly specify an account using a derivation path such as `//Alice`. ## Digest diff --git a/polkadot-protocol/onchain-governance/overview.md b/polkadot-protocol/onchain-governance/overview.md index 4548197ce..fcfdbafa7 100644 --- a/polkadot-protocol/onchain-governance/overview.md +++ b/polkadot-protocol/onchain-governance/overview.md @@ -82,7 +82,7 @@ See [Cancelling, Killing, and Blacklisting](https://wiki.polkadot.network/docs/l ## Additional Resources -- [**Democracy pallet**](https://github.com/paritytech/polkadot-sdk/tree/master/substrate/frame/democracy/src){target=\_blank} - handles administration of general stakeholder voting +- [**Democracy pallet**](https://github.com/paritytech/polkadot-sdk/tree/polkadot-stable2412/substrate/frame/democracy/src){target=\_blank} - handles administration of general stakeholder voting - [**Gov2: Polkadot’s Next Generation of Decentralised Governance**](https://medium.com/polkadot-network/gov2-polkadots-next-generation-of-decentralised-governance-4d9ef657d11b){target=\_blank} - Medium article by Gavin Wood - [**Polkadot Direction**](https://matrix.to/#/#Polkadot-Direction:parity.io){target=\_blank} - Matrix Element client - [**Polkassembly**](https://polkadot.polkassembly.io/){target=\_blank} - OpenGov dashboard and UI diff --git a/tutorials/polkadot-sdk/parachains/local-chain/spin-your-nodes.md b/tutorials/polkadot-sdk/parachains/local-chain/spin-your-nodes.md index 4df4cd7ba..9ff51bf5a 100644 --- a/tutorials/polkadot-sdk/parachains/local-chain/spin-your-nodes.md +++ b/tutorials/polkadot-sdk/parachains/local-chain/spin-your-nodes.md @@ -36,7 +36,7 @@ There are a couple of Polkadot Wiki articles that may help you better understand There are several ways you can generate keys. The available methods are: - **[`solochain-template-node key` subcommand](https://docs.rs/sc-cli/0.46.0/sc_cli/commands/enum.KeySubcommand.html){target=\_blank}** - the most straightforward method for developers working directly with the node is to use the integrated key generation feature. Using the `key` subcommand, you can generate keys directly from your node's command line interface. This method ensures compatibility with your chain and is convenient for quick setup and testing -- **[subkey](https://github.com/paritytech/polkadot-sdk/tree/master/substrate/bin/utils/subkey){target=\_blank}** - it is a powerful standalone utility specifically designed for Polkadot SDK-based chains. It offers advanced options for key generation, including support for different key types such as `ed25519` and `sr25519`. This tool allows fine-grained control over the key generation process +- **[subkey](https://github.com/paritytech/polkadot-sdk/tree/polkadot-stable2412/substrate/bin/utils/subkey){target=\_blank}** - it is a powerful standalone utility specifically designed for Polkadot SDK-based chains. It offers advanced options for key generation, including support for different key types such as `ed25519` and `sr25519`. This tool allows fine-grained control over the key generation process - **Third-party key generation utilities** - various tools developed by the community ### Generate Local Keys with the Node Template diff --git a/tutorials/polkadot-sdk/system-chains/asset-hub/asset-conversion.md b/tutorials/polkadot-sdk/system-chains/asset-hub/asset-conversion.md index 8c32ca269..cd255d8bb 100644 --- a/tutorials/polkadot-sdk/system-chains/asset-hub/asset-conversion.md +++ b/tutorials/polkadot-sdk/system-chains/asset-hub/asset-conversion.md @@ -9,7 +9,7 @@ description: A guide detailing the step-by-step process of converting assets on Asset Conversion is an Automated Market Maker (AMM) utilizing [Uniswap V2](https://github.com/Uniswap/v2-core){target=\_blank} logic and implemented as a pallet on Polkadot's Asset Hub. For more details about this feature, please visit the [Asset Conversion on Asset Hub](https://wiki.polkadot.network/docs/learn-asset-conversion-assethub){target=\_blank} wiki page. -This guide will provide detailed information about the key functionalities offered by the [Asset Conversion](https://github.com/paritytech/polkadot-sdk/tree/master/substrate/frame/asset-conversion){target=\_blank} pallet on Asset Hub, including: +This guide will provide detailed information about the key functionalities offered by the [Asset Conversion](https://github.com/paritytech/polkadot-sdk/tree/polkadot-stable2412/substrate/frame/asset-conversion){target=\_blank} pallet on Asset Hub, including: - Creating a liquidity pool - Adding liquidity to a pool diff --git a/variables.yml b/variables.yml index dd412cd59..9fb0c7004 100644 --- a/variables.yml +++ b/variables.yml @@ -18,7 +18,8 @@ dependencies: version: v0.0.2 polkadot_sdk: repository_url: https://github.com/paritytech/polkadot-sdk - version: v1.16.2-rc1 + # version: v1.16.2-rc1 + stable_version: polkadot-stable2412 srtool: repository_url: https://github.com/paritytech/srtool version: v0.16.0