Skip to content

Commit b784e82

Browse files
committed
Merge remote-tracking branch 'origin/master' into bko-bridges-backports-and-nits
2 parents ca62899 + 988103d commit b784e82

File tree

111 files changed

+487
-1053
lines changed

Some content is hidden

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

111 files changed

+487
-1053
lines changed

Cargo.lock

+5-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

+9-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,12 @@ forks](https://img.shields.io/github/forks/paritytech/polkadot-sdk)
2424
## 📚 Documentation
2525

2626
* [🦀 rust-docs](https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/index.html)
27-
* [Introduction](https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/polkadot_sdk/index.html)
28-
to each component of the Polkadot SDK: Substrate, FRAME, Cumulus, and XCM
27+
* [Introduction](https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/polkadot_sdk/index.html)
28+
to each component of the Polkadot SDK: Substrate, FRAME, Cumulus, and XCM
29+
* [Guides](https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/guides/index.html),
30+
namely how to build your first FRAME pallet.
31+
* [Templates](https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/polkadot_sdk/templates/index.html)
32+
for starting a new project.
2933
* Other Resources:
3034
* [Polkadot Wiki -> Build](https://wiki.polkadot.network/docs/build-guide)
3135

@@ -39,6 +43,9 @@ The Polkadot-SDK has two release channels: `stable` and `nightly`. Production so
3943
only use `stable`. `nightly` is meant for tinkerers to try out the latest features. The detailed
4044
release process is described in [RELEASE.md](docs/RELEASE.md).
4145

46+
You can use [`psvm`](https://github.com/paritytech/psvm) to manage your Polkadot-SDK dependency
47+
versions in downstream projects.
48+
4249
### 😌 Stable
4350

4451
`stable` releases have a support duration of **three months**. In this period, the release will not

bridges/bin/runtime-common/src/extensions/check_obsolete_extension.rs

+8-2
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ use sp_runtime::{
3636
transaction_validity::{TransactionPriority, TransactionValidity, ValidTransactionBuilder},
3737
};
3838

39+
// Re-export to avoid include tuplex dependency everywhere.
40+
#[doc(hidden)]
41+
pub mod __private {
42+
pub use tuplex;
43+
}
44+
3945
/// A duplication of the `FilterCall` trait.
4046
///
4147
/// We need this trait in order to be able to implement it for the messages pallet,
@@ -313,7 +319,7 @@ macro_rules! generate_bridge_reject_obsolete_headers_and_messages {
313319
info: &sp_runtime::traits::DispatchInfoOf<Self::Call>,
314320
len: usize,
315321
) -> Result<Self::Pre, sp_runtime::transaction_validity::TransactionValidityError> {
316-
use tuplex::PushBack;
322+
use $crate::extensions::check_obsolete_extension::__private::tuplex::PushBack;
317323
let to_post_dispatch = ();
318324
$(
319325
let (from_validate, call_filter_validity) = <
@@ -336,7 +342,7 @@ macro_rules! generate_bridge_reject_obsolete_headers_and_messages {
336342
len: usize,
337343
result: &sp_runtime::DispatchResult,
338344
) -> Result<(), sp_runtime::transaction_validity::TransactionValidityError> {
339-
use tuplex::PopFront;
345+
use $crate::extensions::check_obsolete_extension::__private::tuplex::PopFront;
340346
let Some((relayer, to_post_dispatch)) = to_post_dispatch else { return Ok(()) };
341347
let has_failed = result.is_err();
342348
$(

bridges/modules/messages/src/mock.rs

-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ impl frame_system::Config for TestRuntime {
8686

8787
#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig)]
8888
impl pallet_balances::Config for TestRuntime {
89-
type ReserveIdentifier = [u8; 8];
9089
type AccountStore = System;
9190
}
9291

bridges/snowbridge/pallets/inbound-queue/src/mock.rs

+1-10
Original file line numberDiff line numberDiff line change
@@ -53,20 +53,11 @@ parameter_types! {
5353
pub const ExistentialDeposit: u128 = 1;
5454
}
5555

56+
#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig)]
5657
impl pallet_balances::Config for Test {
57-
type MaxLocks = ();
58-
type MaxReserves = ();
59-
type ReserveIdentifier = [u8; 8];
6058
type Balance = Balance;
61-
type RuntimeEvent = RuntimeEvent;
62-
type DustRemoval = ();
6359
type ExistentialDeposit = ExistentialDeposit;
6460
type AccountStore = System;
65-
type WeightInfo = ();
66-
type FreezeIdentifier = ();
67-
type MaxFreezes = ();
68-
type RuntimeHoldReason = ();
69-
type RuntimeFreezeReason = ();
7061
}
7162

7263
parameter_types! {

bridges/snowbridge/pallets/system/src/mock.rs

+1-10
Original file line numberDiff line numberDiff line change
@@ -112,20 +112,11 @@ impl frame_system::Config for Test {
112112
type Block = Block;
113113
}
114114

115+
#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig)]
115116
impl pallet_balances::Config for Test {
116-
type MaxLocks = ();
117-
type MaxReserves = ();
118-
type ReserveIdentifier = [u8; 8];
119117
type Balance = Balance;
120-
type RuntimeEvent = RuntimeEvent;
121-
type DustRemoval = ();
122118
type ExistentialDeposit = ConstU128<1>;
123119
type AccountStore = System;
124-
type WeightInfo = ();
125-
type FreezeIdentifier = ();
126-
type MaxFreezes = ();
127-
type RuntimeHoldReason = ();
128-
type RuntimeFreezeReason = ();
129120
}
130121

131122
impl pallet_xcm_origin::Config for Test {

cumulus/pallets/collator-selection/src/mock.rs

+1-12
Original file line numberDiff line numberDiff line change
@@ -53,23 +53,12 @@ impl system::Config for Test {
5353

5454
parameter_types! {
5555
pub const ExistentialDeposit: u64 = 5;
56-
pub const MaxReserves: u32 = 50;
5756
}
5857

58+
#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig)]
5959
impl pallet_balances::Config for Test {
60-
type Balance = u64;
61-
type RuntimeEvent = RuntimeEvent;
62-
type DustRemoval = ();
6360
type ExistentialDeposit = ExistentialDeposit;
6461
type AccountStore = System;
65-
type WeightInfo = ();
66-
type MaxLocks = ();
67-
type MaxReserves = MaxReserves;
68-
type ReserveIdentifier = [u8; 8];
69-
type RuntimeHoldReason = RuntimeHoldReason;
70-
type RuntimeFreezeReason = RuntimeFreezeReason;
71-
type FreezeIdentifier = ();
72-
type MaxFreezes = ConstU32<0>;
7362
}
7463

7564
pub struct Author4;

cumulus/pallets/xcmp-queue/src/mock.rs

+1-12
Original file line numberDiff line numberDiff line change
@@ -85,25 +85,14 @@ impl frame_system::Config for Test {
8585

8686
parameter_types! {
8787
pub const ExistentialDeposit: u64 = 5;
88-
pub const MaxReserves: u32 = 50;
8988
}
9089

9190
pub type Balance = u64;
9291

92+
#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig)]
9393
impl pallet_balances::Config for Test {
94-
type Balance = Balance;
95-
type RuntimeEvent = RuntimeEvent;
96-
type DustRemoval = ();
9794
type ExistentialDeposit = ExistentialDeposit;
9895
type AccountStore = System;
99-
type WeightInfo = ();
100-
type MaxLocks = ();
101-
type MaxReserves = MaxReserves;
102-
type ReserveIdentifier = [u8; 8];
103-
type RuntimeHoldReason = RuntimeHoldReason;
104-
type RuntimeFreezeReason = RuntimeFreezeReason;
105-
type FreezeIdentifier = ();
106-
type MaxFreezes = ConstU32<0>;
10796
}
10897

10998
impl cumulus_pallet_parachain_system::Config for Test {

cumulus/parachains/common/src/impls.rs

+2-14
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ mod tests {
202202
use frame_system::{limits, EnsureRoot};
203203
use pallet_collator_selection::IdentityCollator;
204204
use polkadot_primitives::AccountId;
205-
use sp_core::{ConstU64, H256};
205+
use sp_core::H256;
206206
use sp_runtime::{
207207
traits::{BlakeTwo256, IdentityLookup},
208208
BuildStorage, Perbill,
@@ -224,7 +224,6 @@ mod tests {
224224
parameter_types! {
225225
pub BlockLength: limits::BlockLength = limits::BlockLength::max(2 * 1024);
226226
pub const AvailableBlockRatio: Perbill = Perbill::one();
227-
pub const MaxReserves: u32 = 50;
228227
}
229228

230229
#[derive_impl(frame_system::config_preludes::TestDefaultConfig)]
@@ -253,20 +252,9 @@ mod tests {
253252
type MaxConsumers = frame_support::traits::ConstU32<16>;
254253
}
255254

255+
#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig)]
256256
impl pallet_balances::Config for Test {
257-
type Balance = u64;
258-
type RuntimeEvent = RuntimeEvent;
259-
type DustRemoval = ();
260-
type ExistentialDeposit = ConstU64<1>;
261257
type AccountStore = System;
262-
type MaxLocks = ();
263-
type WeightInfo = ();
264-
type MaxReserves = MaxReserves;
265-
type ReserveIdentifier = [u8; 8];
266-
type RuntimeHoldReason = RuntimeHoldReason;
267-
type RuntimeFreezeReason = RuntimeFreezeReason;
268-
type FreezeIdentifier = ();
269-
type MaxFreezes = ConstU32<1>;
270258
}
271259

272260
pub struct OneAuthor;

cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/Cargo.toml

-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ scale-info = { version = "2.11.1", default-features = false, features = [
2222
"derive",
2323
] }
2424
serde = { optional = true, features = ["derive"], workspace = true, default-features = true }
25-
tuplex = { version = "0.1", default-features = false }
2625

2726
# Substrate
2827
frame-benchmarking = { path = "../../../../../substrate/frame/benchmarking", default-features = false, optional = true }
@@ -218,7 +217,6 @@ std = [
218217
"sp-version/std",
219218
"substrate-wasm-builder",
220219
"testnet-parachains-constants/std",
221-
"tuplex/std",
222220
"xcm-builder/std",
223221
"xcm-executor/std",
224222
"xcm-fee-payment-runtime-api/std",

cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/Cargo.toml

-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ hex-literal = { version = "0.4.1" }
1818
log = { workspace = true }
1919
scale-info = { version = "2.11.1", default-features = false, features = ["derive"] }
2020
serde = { optional = true, features = ["derive"], workspace = true, default-features = true }
21-
tuplex = { version = "0.1", default-features = false }
2221

2322
# Substrate
2423
frame-benchmarking = { path = "../../../../../substrate/frame/benchmarking", default-features = false, optional = true }
@@ -182,7 +181,6 @@ std = [
182181
"sp-version/std",
183182
"substrate-wasm-builder",
184183
"testnet-parachains-constants/std",
185-
"tuplex/std",
186184
"westend-runtime-constants/std",
187185
"xcm-builder/std",
188186
"xcm-executor/std",

docs/mermaid/IA.mmd

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
flowchart
22
parity[paritytech.github.io] --> devhub[polkadot_sdk_docs]
3-
polkadot[polkadot.network] --> devhub[polkadot_sdk_docs]
3+
polkadot_network[polkadot.network] --> devhub[polkadot_sdk_docs]
44

55
devhub --> polkadot_sdk
66
devhub --> reference_docs
@@ -9,5 +9,5 @@ flowchart
99
polkadot_sdk --> substrate
1010
polkadot_sdk --> frame
1111
polkadot_sdk --> cumulus
12-
polkadot_sdk --> polkadot
12+
polkadot_sdk --> polkadot[polkadot node]
1313
polkadot_sdk --> xcm

docs/sdk/Cargo.toml

+10-6
Original file line numberDiff line numberDiff line change
@@ -83,27 +83,31 @@ pallet-democracy = { path = "../../substrate/frame/democracy" }
8383
pallet-uniques = { path = "../../substrate/frame/uniques" }
8484
pallet-nfts = { path = "../../substrate/frame/nfts" }
8585
pallet-scheduler = { path = "../../substrate/frame/scheduler" }
86+
pallet-referenda = { path = "../../substrate/frame/referenda" }
87+
pallet-broker = { path = "../../substrate/frame/broker" }
88+
pallet-babe = { path = "../../substrate/frame/babe" }
8689

8790
# Primitives
8891
sp-io = { path = "../../substrate/primitives/io" }
92+
sp-runtime-interface = { path = "../../substrate/primitives/runtime-interface" }
8993
sp-api = { path = "../../substrate/primitives/api" }
9094
sp-core = { path = "../../substrate/primitives/core" }
9195
sp-keyring = { path = "../../substrate/primitives/keyring" }
9296
sp-runtime = { path = "../../substrate/primitives/runtime" }
9397
sp-arithmetic = { path = "../../substrate/primitives/arithmetic" }
9498
sp-genesis-builder = { path = "../../substrate/primitives/genesis-builder" }
95-
96-
# Misc pallet dependencies
97-
pallet-referenda = { path = "../../substrate/frame/referenda" }
98-
pallet-broker = { path = "../../substrate/frame/broker" }
99-
pallet-babe = { path = "../../substrate/frame/babe" }
100-
10199
sp-offchain = { path = "../../substrate/primitives/offchain" }
102100
sp-version = { path = "../../substrate/primitives/version" }
103101

102+
104103
# XCM
105104
xcm = { package = "staging-xcm", path = "../../polkadot/xcm" }
106105
xcm-docs = { path = "../../polkadot/xcm/docs" }
107106

108107
# runtime guides
109108
chain-spec-guide-runtime = { path = "./src/reference_docs/chain_spec_runtime" }
109+
110+
# Templates
111+
minimal-template-runtime = { path = "../../templates/minimal/runtime" }
112+
solochain-template-runtime = { path = "../../templates/solochain/runtime" }
113+
parachain-template-runtime = { path = "../../templates/parachain/runtime" }

docs/sdk/src/guides/mod.rs

+17-8
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
11
//! # Polkadot SDK Docs Guides
22
//!
3-
//! This crate contains a collection of guides that are foundational to the developers of
4-
//! Polkadot SDK. They are common user-journeys that are traversed in the Polkadot ecosystem.
3+
//! This crate contains a collection of guides that are foundational to the developers of Polkadot
4+
//! SDK. They are common user-journeys that are traversed in the Polkadot ecosystem.
5+
//!
6+
//! 1. [`crate::guides::your_first_pallet`] is your starting point with Polkadot SDK. It contains
7+
//! the basics of
8+
//! building a simple crypto currency with FRAME.
9+
//! 2. [`crate::guides::your_first_runtime`] is the next step in your journey. It contains the
10+
//! basics of building a runtime that contains this pallet, plus a few common pallets from FRAME.
11+
//!
12+
//!
13+
//! Other guides are related to other miscellaneous topics and are listed as modules below.
514
615
/// Write your first simple pallet, learning the most most basic features of FRAME along the way.
716
pub mod your_first_pallet;
@@ -11,18 +20,18 @@ pub mod your_first_pallet;
1120
pub mod your_first_runtime;
1221

1322
/// Running the given runtime with a node. No specific consensus mechanism is used at this stage.
14-
pub mod your_first_node;
15-
16-
/// How to change the consensus engine of both the node and the runtime.
17-
pub mod changing_consensus;
23+
// TODO
24+
// pub mod your_first_node;
1825

1926
/// How to enhance a given runtime and node to be cumulus-enabled, run it as a parachain and connect
2027
/// it to a relay-chain.
21-
pub mod cumulus_enabled_parachain;
28+
// TODO
29+
// pub mod cumulus_enabled_parachain;
2230

2331
/// How to make a given runtime XCM-enabled, capable of sending messages (`Transact`) between itself
2432
/// and the relay chain to which it is connected.
25-
pub mod xcm_enabled_parachain;
33+
// TODO
34+
// pub mod xcm_enabled_parachain;
2635

2736
/// How to enable storage weight reclaiming in a parachain node and runtime.
2837
pub mod enable_pov_reclaim;

0 commit comments

Comments
 (0)