From 0e9d3953e53033f0cfa28699cf6257d6fe5dbe9c Mon Sep 17 00:00:00 2001 From: ParityReleases Date: Tue, 10 Jun 2025 08:44:40 +0000 Subject: [PATCH 001/128] Bump node version to 1.19.0 in polkadot-cli --- polkadot/node/primitives/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/polkadot/node/primitives/src/lib.rs b/polkadot/node/primitives/src/lib.rs index 8c2e88c53fcac..3a187ce5e03b2 100644 --- a/polkadot/node/primitives/src/lib.rs +++ b/polkadot/node/primitives/src/lib.rs @@ -62,7 +62,7 @@ pub use disputes::{ /// relatively rare. /// /// The associated worker binaries should use the same version as the node that spawns them. -pub const NODE_VERSION: &'static str = "1.18.5"; +pub const NODE_VERSION: &'static str = "1.19.0"; // For a 16-ary Merkle Prefix Trie, we can expect at most 16 32-byte hashes per node // plus some overhead: From fcef81fc71c382919c519db01965f1b7224cb02a Mon Sep 17 00:00:00 2001 From: ParityReleases Date: Tue, 10 Jun 2025 08:44:44 +0000 Subject: [PATCH 002/128] Bump node version to 1.19.0 in polkadot-omni-node-lib --- cumulus/polkadot-omni-node/lib/src/nodes/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cumulus/polkadot-omni-node/lib/src/nodes/mod.rs b/cumulus/polkadot-omni-node/lib/src/nodes/mod.rs index b951c4ed5f48f..a227175dbc119 100644 --- a/cumulus/polkadot-omni-node/lib/src/nodes/mod.rs +++ b/cumulus/polkadot-omni-node/lib/src/nodes/mod.rs @@ -25,7 +25,7 @@ use sc_service::{Configuration, TaskManager}; /// The current node version for cumulus official binaries, which takes the basic /// SemVer form `..`. It should correspond to the latest /// `polkadot` version of a stable release. -pub const NODE_VERSION: &'static str = "1.18.5"; +pub const NODE_VERSION: &'static str = "1.19.0"; /// Trait that extends the `DynNodeSpec` trait with manual seal related logic. /// From 2161c8e52016b862ec12b153d69591a19c7519a2 Mon Sep 17 00:00:00 2001 From: ParityReleases Date: Tue, 10 Jun 2025 08:44:45 +0000 Subject: [PATCH 003/128] Bump spec_version to 1_019_000 --- cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs | 2 +- cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs | 2 +- .../runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs | 2 +- .../runtimes/bridge-hubs/bridge-hub-westend/src/lib.rs | 2 +- .../runtimes/collectives/collectives-westend/src/lib.rs | 2 +- cumulus/parachains/runtimes/coretime/coretime-rococo/src/lib.rs | 2 +- .../parachains/runtimes/coretime/coretime-westend/src/lib.rs | 2 +- cumulus/parachains/runtimes/glutton/glutton-westend/src/lib.rs | 2 +- cumulus/parachains/runtimes/people/people-rococo/src/lib.rs | 2 +- cumulus/parachains/runtimes/people/people-westend/src/lib.rs | 2 +- polkadot/runtime/rococo/src/lib.rs | 2 +- polkadot/runtime/westend/src/lib.rs | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs b/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs index acc6bf63ff454..b701a3264502d 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs @@ -129,7 +129,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: alloc::borrow::Cow::Borrowed("statemine"), impl_name: alloc::borrow::Cow::Borrowed("statemine"), authoring_version: 1, - spec_version: 1_018_001, + spec_version: 1_019_000, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 16, diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs index 3696319485171..730d0cb24a49b 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs @@ -133,7 +133,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: alloc::borrow::Cow::Borrowed("westmint"), impl_name: alloc::borrow::Cow::Borrowed("westmint"), authoring_version: 1, - spec_version: 1_018_006, + spec_version: 1_019_000, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 16, diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs index c8b41e1cb40e5..9ae47d43c279f 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs @@ -253,7 +253,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: alloc::borrow::Cow::Borrowed("bridge-hub-rococo"), impl_name: alloc::borrow::Cow::Borrowed("bridge-hub-rococo"), authoring_version: 1, - spec_version: 1_018_001, + spec_version: 1_019_000, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 6, diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/lib.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/lib.rs index 0021a5191f755..258510279ef71 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/lib.rs @@ -243,7 +243,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: alloc::borrow::Cow::Borrowed("bridge-hub-westend"), impl_name: alloc::borrow::Cow::Borrowed("bridge-hub-westend"), authoring_version: 1, - spec_version: 1_018_002, + spec_version: 1_019_000, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 6, diff --git a/cumulus/parachains/runtimes/collectives/collectives-westend/src/lib.rs b/cumulus/parachains/runtimes/collectives/collectives-westend/src/lib.rs index 2f3ad0e1ffefe..4e4f736e636a5 100644 --- a/cumulus/parachains/runtimes/collectives/collectives-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/collectives/collectives-westend/src/lib.rs @@ -126,7 +126,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: alloc::borrow::Cow::Borrowed("collectives-westend"), impl_name: alloc::borrow::Cow::Borrowed("collectives-westend"), authoring_version: 1, - spec_version: 1_018_001, + spec_version: 1_019_000, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 6, diff --git a/cumulus/parachains/runtimes/coretime/coretime-rococo/src/lib.rs b/cumulus/parachains/runtimes/coretime/coretime-rococo/src/lib.rs index 82e9683b6f4b5..6b12ba95861fc 100644 --- a/cumulus/parachains/runtimes/coretime/coretime-rococo/src/lib.rs +++ b/cumulus/parachains/runtimes/coretime/coretime-rococo/src/lib.rs @@ -159,7 +159,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: alloc::borrow::Cow::Borrowed("coretime-rococo"), impl_name: alloc::borrow::Cow::Borrowed("coretime-rococo"), authoring_version: 1, - spec_version: 1_018_001, + spec_version: 1_019_000, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 2, diff --git a/cumulus/parachains/runtimes/coretime/coretime-westend/src/lib.rs b/cumulus/parachains/runtimes/coretime/coretime-westend/src/lib.rs index 0c102108dfe2a..23a6d4b664e82 100644 --- a/cumulus/parachains/runtimes/coretime/coretime-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/coretime/coretime-westend/src/lib.rs @@ -159,7 +159,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: alloc::borrow::Cow::Borrowed("coretime-westend"), impl_name: alloc::borrow::Cow::Borrowed("coretime-westend"), authoring_version: 1, - spec_version: 1_018_001, + spec_version: 1_019_000, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 2, diff --git a/cumulus/parachains/runtimes/glutton/glutton-westend/src/lib.rs b/cumulus/parachains/runtimes/glutton/glutton-westend/src/lib.rs index 071f3c24afebf..a26d8c9612c1a 100644 --- a/cumulus/parachains/runtimes/glutton/glutton-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/glutton/glutton-westend/src/lib.rs @@ -103,7 +103,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: alloc::borrow::Cow::Borrowed("glutton-westend"), impl_name: alloc::borrow::Cow::Borrowed("glutton-westend"), authoring_version: 1, - spec_version: 1_018_001, + spec_version: 1_019_000, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 1, diff --git a/cumulus/parachains/runtimes/people/people-rococo/src/lib.rs b/cumulus/parachains/runtimes/people/people-rococo/src/lib.rs index 42b5a0b11dd4e..6d3567c2016b0 100644 --- a/cumulus/parachains/runtimes/people/people-rococo/src/lib.rs +++ b/cumulus/parachains/runtimes/people/people-rococo/src/lib.rs @@ -146,7 +146,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: alloc::borrow::Cow::Borrowed("people-rococo"), impl_name: alloc::borrow::Cow::Borrowed("people-rococo"), authoring_version: 1, - spec_version: 1_018_001, + spec_version: 1_019_000, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 1, diff --git a/cumulus/parachains/runtimes/people/people-westend/src/lib.rs b/cumulus/parachains/runtimes/people/people-westend/src/lib.rs index 14a29430f2799..957b429b50cda 100644 --- a/cumulus/parachains/runtimes/people/people-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/people/people-westend/src/lib.rs @@ -145,7 +145,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: alloc::borrow::Cow::Borrowed("people-westend"), impl_name: alloc::borrow::Cow::Borrowed("people-westend"), authoring_version: 1, - spec_version: 1_018_001, + spec_version: 1_019_000, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 2, diff --git a/polkadot/runtime/rococo/src/lib.rs b/polkadot/runtime/rococo/src/lib.rs index 6f26c3962eebc..de13cae4c9c23 100644 --- a/polkadot/runtime/rococo/src/lib.rs +++ b/polkadot/runtime/rococo/src/lib.rs @@ -184,7 +184,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: alloc::borrow::Cow::Borrowed("rococo"), impl_name: alloc::borrow::Cow::Borrowed("parity-rococo-v2.0"), authoring_version: 0, - spec_version: 1_018_001, + spec_version: 1_019_000, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 26, diff --git a/polkadot/runtime/westend/src/lib.rs b/polkadot/runtime/westend/src/lib.rs index 810033ffdc27b..3e50ba833e951 100644 --- a/polkadot/runtime/westend/src/lib.rs +++ b/polkadot/runtime/westend/src/lib.rs @@ -178,7 +178,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: alloc::borrow::Cow::Borrowed("westend"), impl_name: alloc::borrow::Cow::Borrowed("parity-westend"), authoring_version: 2, - spec_version: 1_018_002, + spec_version: 1_019_000, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 27, From e2af364e6e5ca56ef48135487ad6c76b41d0be7b Mon Sep 17 00:00:00 2001 From: ParityReleases Date: Tue, 10 Jun 2025 08:44:47 +0000 Subject: [PATCH 004/128] Reordering prdocs for the release stable2506 --- prdoc/{ => stable2506}/pr_3811.prdoc | 0 prdoc/{ => stable2506}/pr_5620.prdoc | 0 prdoc/{ => stable2506}/pr_5884.prdoc | 0 prdoc/{ => stable2506}/pr_6010.prdoc | 0 prdoc/{ => stable2506}/pr_6137.prdoc | 0 prdoc/{ => stable2506}/pr_6312.prdoc | 0 prdoc/{ => stable2506}/pr_6324.prdoc | 0 prdoc/{ => stable2506}/pr_6827.prdoc | 0 prdoc/{ => stable2506}/pr_7220.prdoc | 0 prdoc/{ => stable2506}/pr_7229.prdoc | 0 prdoc/{ => stable2506}/pr_7375.prdoc | 0 prdoc/{ => stable2506}/pr_7556.prdoc | 0 prdoc/{ => stable2506}/pr_7592.prdoc | 0 prdoc/{ => stable2506}/pr_7597.prdoc | 0 prdoc/{ => stable2506}/pr_7666.prdoc | 0 prdoc/{ => stable2506}/pr_7682.prdoc | 0 prdoc/{ => stable2506}/pr_7719.prdoc | 0 prdoc/{ => stable2506}/pr_7720.prdoc | 0 prdoc/{ => stable2506}/pr_7730.prdoc | 0 prdoc/{ => stable2506}/pr_7762.prdoc | 0 prdoc/{ => stable2506}/pr_7833.prdoc | 0 prdoc/{ => stable2506}/pr_7857.prdoc | 0 prdoc/{ => stable2506}/pr_7867.prdoc | 0 prdoc/{ => stable2506}/pr_7882.prdoc | 0 prdoc/{ => stable2506}/pr_7936.prdoc | 0 prdoc/{ => stable2506}/pr_7944.prdoc | 0 prdoc/{ => stable2506}/pr_7955.prdoc | 0 prdoc/{ => stable2506}/pr_7960.prdoc | 0 prdoc/{ => stable2506}/pr_7980.prdoc | 0 prdoc/{ => stable2506}/pr_7995.prdoc | 0 prdoc/{ => stable2506}/pr_8001.prdoc | 0 prdoc/{ => stable2506}/pr_8021.prdoc | 0 prdoc/{ => stable2506}/pr_8038.prdoc | 0 prdoc/{ => stable2506}/pr_8069.prdoc | 0 prdoc/{ => stable2506}/pr_8072.prdoc | 0 prdoc/{ => stable2506}/pr_8102.prdoc | 0 prdoc/{ => stable2506}/pr_8103.prdoc | 0 prdoc/{ => stable2506}/pr_8118.prdoc | 0 prdoc/{ => stable2506}/pr_8122.prdoc | 0 prdoc/{ => stable2506}/pr_8127.prdoc | 0 prdoc/{ => stable2506}/pr_8130.prdoc | 0 prdoc/{ => stable2506}/pr_8134.prdoc | 0 prdoc/{ => stable2506}/pr_8148.prdoc | 0 prdoc/{ => stable2506}/pr_8153.prdoc | 0 prdoc/{ => stable2506}/pr_8163.prdoc | 0 prdoc/{ => stable2506}/pr_8164.prdoc | 0 prdoc/{ => stable2506}/pr_8171.prdoc | 0 prdoc/{ => stable2506}/pr_8179.prdoc | 0 prdoc/{ => stable2506}/pr_8197.prdoc | 0 prdoc/{ => stable2506}/pr_8208.prdoc | 0 prdoc/{ => stable2506}/pr_8212.prdoc | 0 prdoc/{ => stable2506}/pr_8230.prdoc | 0 prdoc/{ => stable2506}/pr_8234.prdoc | 0 prdoc/{ => stable2506}/pr_8238.prdoc | 0 prdoc/{ => stable2506}/pr_8248.prdoc | 0 prdoc/{ => stable2506}/pr_8254.prdoc | 0 prdoc/{ => stable2506}/pr_8262.prdoc | 0 prdoc/{ => stable2506}/pr_8271.prdoc | 0 prdoc/{ => stable2506}/pr_8273.prdoc | 0 prdoc/{ => stable2506}/pr_8274.prdoc | 0 prdoc/{ => stable2506}/pr_8281.prdoc | 0 prdoc/{ => stable2506}/pr_8289.prdoc | 0 prdoc/{ => stable2506}/pr_8299.prdoc | 0 prdoc/{ => stable2506}/pr_8310.prdoc | 0 prdoc/{ => stable2506}/pr_8311.prdoc | 0 prdoc/{ => stable2506}/pr_8314.prdoc | 0 prdoc/{ => stable2506}/pr_8316.prdoc | 0 prdoc/{ => stable2506}/pr_8323.prdoc | 0 prdoc/{ => stable2506}/pr_8327.prdoc | 0 prdoc/{ => stable2506}/pr_8332.prdoc | 0 prdoc/{ => stable2506}/pr_8337.prdoc | 0 prdoc/{ => stable2506}/pr_8339.prdoc | 0 prdoc/{ => stable2506}/pr_8344.prdoc | 0 prdoc/{ => stable2506}/pr_8345.prdoc | 0 prdoc/{ => stable2506}/pr_8369.prdoc | 0 prdoc/{ => stable2506}/pr_8370.prdoc | 0 prdoc/{ => stable2506}/pr_8376.prdoc | 0 prdoc/{ => stable2506}/pr_8382.prdoc | 0 prdoc/{ => stable2506}/pr_8387.prdoc | 0 prdoc/{ => stable2506}/pr_8409.prdoc | 0 prdoc/{ => stable2506}/pr_8422.prdoc | 0 prdoc/{ => stable2506}/pr_8441.prdoc | 0 prdoc/{ => stable2506}/pr_8443.prdoc | 0 prdoc/{ => stable2506}/pr_8445.prdoc | 0 prdoc/{ => stable2506}/pr_8461.prdoc | 0 prdoc/{ => stable2506}/pr_8470.prdoc | 0 prdoc/{ => stable2506}/pr_8473.prdoc | 0 prdoc/{ => stable2506}/pr_8477.prdoc | 0 prdoc/{ => stable2506}/pr_8500.prdoc | 0 prdoc/{ => stable2506}/pr_8504.prdoc | 0 prdoc/{ => stable2506}/pr_8528.prdoc | 0 prdoc/{ => stable2506}/pr_8531.prdoc | 0 prdoc/{ => stable2506}/pr_8533.prdoc | 0 prdoc/{ => stable2506}/pr_8535.prdoc | 0 prdoc/{ => stable2506}/pr_8545.prdoc | 0 prdoc/{ => stable2506}/pr_8547.prdoc | 0 prdoc/{ => stable2506}/pr_8554.prdoc | 0 prdoc/{ => stable2506}/pr_8559.prdoc | 0 prdoc/{ => stable2506}/pr_8584.prdoc | 0 prdoc/{ => stable2506}/pr_8587.prdoc | 0 prdoc/{ => stable2506}/pr_8594.prdoc | 0 prdoc/{ => stable2506}/pr_8599.prdoc | 0 prdoc/{ => stable2506}/pr_8606.prdoc | 0 prdoc/{ => stable2506}/pr_8630.prdoc | 0 prdoc/{ => stable2506}/pr_8633.prdoc | 0 prdoc/{ => stable2506}/pr_8650.prdoc | 0 prdoc/{ => stable2506}/pr_8652.prdoc | 0 prdoc/{ => stable2506}/pr_8662.prdoc | 0 prdoc/{ => stable2506}/pr_8664.prdoc | 0 prdoc/{ => stable2506}/pr_8667.prdoc | 0 prdoc/{ => stable2506}/pr_8669.prdoc | 0 prdoc/{ => stable2506}/pr_8679.prdoc | 0 prdoc/{ => stable2506}/pr_8687.prdoc | 0 prdoc/{ => stable2506}/pr_8688.prdoc | 0 prdoc/{ => stable2506}/pr_8700.prdoc | 0 prdoc/{ => stable2506}/pr_8702.prdoc | 0 prdoc/{ => stable2506}/pr_8704.prdoc | 0 prdoc/{ => stable2506}/pr_8708.prdoc | 0 prdoc/{ => stable2506}/pr_8715.prdoc | 0 prdoc/{ => stable2506}/pr_8718.prdoc | 0 prdoc/{ => stable2506}/pr_8724.prdoc | 0 prdoc/{ => stable2506}/pr_8725.prdoc | 0 prdoc/{ => stable2506}/pr_8734.prdoc | 0 prdoc/{ => stable2506}/pr_8745.prdoc | 0 prdoc/{ => stable2506}/pr_8750.prdoc | 0 125 files changed, 0 insertions(+), 0 deletions(-) rename prdoc/{ => stable2506}/pr_3811.prdoc (100%) rename prdoc/{ => stable2506}/pr_5620.prdoc (100%) rename prdoc/{ => stable2506}/pr_5884.prdoc (100%) rename prdoc/{ => stable2506}/pr_6010.prdoc (100%) rename prdoc/{ => stable2506}/pr_6137.prdoc (100%) rename prdoc/{ => stable2506}/pr_6312.prdoc (100%) rename prdoc/{ => stable2506}/pr_6324.prdoc (100%) rename prdoc/{ => stable2506}/pr_6827.prdoc (100%) rename prdoc/{ => stable2506}/pr_7220.prdoc (100%) rename prdoc/{ => stable2506}/pr_7229.prdoc (100%) rename prdoc/{ => stable2506}/pr_7375.prdoc (100%) rename prdoc/{ => stable2506}/pr_7556.prdoc (100%) rename prdoc/{ => stable2506}/pr_7592.prdoc (100%) rename prdoc/{ => stable2506}/pr_7597.prdoc (100%) rename prdoc/{ => stable2506}/pr_7666.prdoc (100%) rename prdoc/{ => stable2506}/pr_7682.prdoc (100%) rename prdoc/{ => stable2506}/pr_7719.prdoc (100%) rename prdoc/{ => stable2506}/pr_7720.prdoc (100%) rename prdoc/{ => stable2506}/pr_7730.prdoc (100%) rename prdoc/{ => stable2506}/pr_7762.prdoc (100%) rename prdoc/{ => stable2506}/pr_7833.prdoc (100%) rename prdoc/{ => stable2506}/pr_7857.prdoc (100%) rename prdoc/{ => stable2506}/pr_7867.prdoc (100%) rename prdoc/{ => stable2506}/pr_7882.prdoc (100%) rename prdoc/{ => stable2506}/pr_7936.prdoc (100%) rename prdoc/{ => stable2506}/pr_7944.prdoc (100%) rename prdoc/{ => stable2506}/pr_7955.prdoc (100%) rename prdoc/{ => stable2506}/pr_7960.prdoc (100%) rename prdoc/{ => stable2506}/pr_7980.prdoc (100%) rename prdoc/{ => stable2506}/pr_7995.prdoc (100%) rename prdoc/{ => stable2506}/pr_8001.prdoc (100%) rename prdoc/{ => stable2506}/pr_8021.prdoc (100%) rename prdoc/{ => stable2506}/pr_8038.prdoc (100%) rename prdoc/{ => stable2506}/pr_8069.prdoc (100%) rename prdoc/{ => stable2506}/pr_8072.prdoc (100%) rename prdoc/{ => stable2506}/pr_8102.prdoc (100%) rename prdoc/{ => stable2506}/pr_8103.prdoc (100%) rename prdoc/{ => stable2506}/pr_8118.prdoc (100%) rename prdoc/{ => stable2506}/pr_8122.prdoc (100%) rename prdoc/{ => stable2506}/pr_8127.prdoc (100%) rename prdoc/{ => stable2506}/pr_8130.prdoc (100%) rename prdoc/{ => stable2506}/pr_8134.prdoc (100%) rename prdoc/{ => stable2506}/pr_8148.prdoc (100%) rename prdoc/{ => stable2506}/pr_8153.prdoc (100%) rename prdoc/{ => stable2506}/pr_8163.prdoc (100%) rename prdoc/{ => stable2506}/pr_8164.prdoc (100%) rename prdoc/{ => stable2506}/pr_8171.prdoc (100%) rename prdoc/{ => stable2506}/pr_8179.prdoc (100%) rename prdoc/{ => stable2506}/pr_8197.prdoc (100%) rename prdoc/{ => stable2506}/pr_8208.prdoc (100%) rename prdoc/{ => stable2506}/pr_8212.prdoc (100%) rename prdoc/{ => stable2506}/pr_8230.prdoc (100%) rename prdoc/{ => stable2506}/pr_8234.prdoc (100%) rename prdoc/{ => stable2506}/pr_8238.prdoc (100%) rename prdoc/{ => stable2506}/pr_8248.prdoc (100%) rename prdoc/{ => stable2506}/pr_8254.prdoc (100%) rename prdoc/{ => stable2506}/pr_8262.prdoc (100%) rename prdoc/{ => stable2506}/pr_8271.prdoc (100%) rename prdoc/{ => stable2506}/pr_8273.prdoc (100%) rename prdoc/{ => stable2506}/pr_8274.prdoc (100%) rename prdoc/{ => stable2506}/pr_8281.prdoc (100%) rename prdoc/{ => stable2506}/pr_8289.prdoc (100%) rename prdoc/{ => stable2506}/pr_8299.prdoc (100%) rename prdoc/{ => stable2506}/pr_8310.prdoc (100%) rename prdoc/{ => stable2506}/pr_8311.prdoc (100%) rename prdoc/{ => stable2506}/pr_8314.prdoc (100%) rename prdoc/{ => stable2506}/pr_8316.prdoc (100%) rename prdoc/{ => stable2506}/pr_8323.prdoc (100%) rename prdoc/{ => stable2506}/pr_8327.prdoc (100%) rename prdoc/{ => stable2506}/pr_8332.prdoc (100%) rename prdoc/{ => stable2506}/pr_8337.prdoc (100%) rename prdoc/{ => stable2506}/pr_8339.prdoc (100%) rename prdoc/{ => stable2506}/pr_8344.prdoc (100%) rename prdoc/{ => stable2506}/pr_8345.prdoc (100%) rename prdoc/{ => stable2506}/pr_8369.prdoc (100%) rename prdoc/{ => stable2506}/pr_8370.prdoc (100%) rename prdoc/{ => stable2506}/pr_8376.prdoc (100%) rename prdoc/{ => stable2506}/pr_8382.prdoc (100%) rename prdoc/{ => stable2506}/pr_8387.prdoc (100%) rename prdoc/{ => stable2506}/pr_8409.prdoc (100%) rename prdoc/{ => stable2506}/pr_8422.prdoc (100%) rename prdoc/{ => stable2506}/pr_8441.prdoc (100%) rename prdoc/{ => stable2506}/pr_8443.prdoc (100%) rename prdoc/{ => stable2506}/pr_8445.prdoc (100%) rename prdoc/{ => stable2506}/pr_8461.prdoc (100%) rename prdoc/{ => stable2506}/pr_8470.prdoc (100%) rename prdoc/{ => stable2506}/pr_8473.prdoc (100%) rename prdoc/{ => stable2506}/pr_8477.prdoc (100%) rename prdoc/{ => stable2506}/pr_8500.prdoc (100%) rename prdoc/{ => stable2506}/pr_8504.prdoc (100%) rename prdoc/{ => stable2506}/pr_8528.prdoc (100%) rename prdoc/{ => stable2506}/pr_8531.prdoc (100%) rename prdoc/{ => stable2506}/pr_8533.prdoc (100%) rename prdoc/{ => stable2506}/pr_8535.prdoc (100%) rename prdoc/{ => stable2506}/pr_8545.prdoc (100%) rename prdoc/{ => stable2506}/pr_8547.prdoc (100%) rename prdoc/{ => stable2506}/pr_8554.prdoc (100%) rename prdoc/{ => stable2506}/pr_8559.prdoc (100%) rename prdoc/{ => stable2506}/pr_8584.prdoc (100%) rename prdoc/{ => stable2506}/pr_8587.prdoc (100%) rename prdoc/{ => stable2506}/pr_8594.prdoc (100%) rename prdoc/{ => stable2506}/pr_8599.prdoc (100%) rename prdoc/{ => stable2506}/pr_8606.prdoc (100%) rename prdoc/{ => stable2506}/pr_8630.prdoc (100%) rename prdoc/{ => stable2506}/pr_8633.prdoc (100%) rename prdoc/{ => stable2506}/pr_8650.prdoc (100%) rename prdoc/{ => stable2506}/pr_8652.prdoc (100%) rename prdoc/{ => stable2506}/pr_8662.prdoc (100%) rename prdoc/{ => stable2506}/pr_8664.prdoc (100%) rename prdoc/{ => stable2506}/pr_8667.prdoc (100%) rename prdoc/{ => stable2506}/pr_8669.prdoc (100%) rename prdoc/{ => stable2506}/pr_8679.prdoc (100%) rename prdoc/{ => stable2506}/pr_8687.prdoc (100%) rename prdoc/{ => stable2506}/pr_8688.prdoc (100%) rename prdoc/{ => stable2506}/pr_8700.prdoc (100%) rename prdoc/{ => stable2506}/pr_8702.prdoc (100%) rename prdoc/{ => stable2506}/pr_8704.prdoc (100%) rename prdoc/{ => stable2506}/pr_8708.prdoc (100%) rename prdoc/{ => stable2506}/pr_8715.prdoc (100%) rename prdoc/{ => stable2506}/pr_8718.prdoc (100%) rename prdoc/{ => stable2506}/pr_8724.prdoc (100%) rename prdoc/{ => stable2506}/pr_8725.prdoc (100%) rename prdoc/{ => stable2506}/pr_8734.prdoc (100%) rename prdoc/{ => stable2506}/pr_8745.prdoc (100%) rename prdoc/{ => stable2506}/pr_8750.prdoc (100%) diff --git a/prdoc/pr_3811.prdoc b/prdoc/stable2506/pr_3811.prdoc similarity index 100% rename from prdoc/pr_3811.prdoc rename to prdoc/stable2506/pr_3811.prdoc diff --git a/prdoc/pr_5620.prdoc b/prdoc/stable2506/pr_5620.prdoc similarity index 100% rename from prdoc/pr_5620.prdoc rename to prdoc/stable2506/pr_5620.prdoc diff --git a/prdoc/pr_5884.prdoc b/prdoc/stable2506/pr_5884.prdoc similarity index 100% rename from prdoc/pr_5884.prdoc rename to prdoc/stable2506/pr_5884.prdoc diff --git a/prdoc/pr_6010.prdoc b/prdoc/stable2506/pr_6010.prdoc similarity index 100% rename from prdoc/pr_6010.prdoc rename to prdoc/stable2506/pr_6010.prdoc diff --git a/prdoc/pr_6137.prdoc b/prdoc/stable2506/pr_6137.prdoc similarity index 100% rename from prdoc/pr_6137.prdoc rename to prdoc/stable2506/pr_6137.prdoc diff --git a/prdoc/pr_6312.prdoc b/prdoc/stable2506/pr_6312.prdoc similarity index 100% rename from prdoc/pr_6312.prdoc rename to prdoc/stable2506/pr_6312.prdoc diff --git a/prdoc/pr_6324.prdoc b/prdoc/stable2506/pr_6324.prdoc similarity index 100% rename from prdoc/pr_6324.prdoc rename to prdoc/stable2506/pr_6324.prdoc diff --git a/prdoc/pr_6827.prdoc b/prdoc/stable2506/pr_6827.prdoc similarity index 100% rename from prdoc/pr_6827.prdoc rename to prdoc/stable2506/pr_6827.prdoc diff --git a/prdoc/pr_7220.prdoc b/prdoc/stable2506/pr_7220.prdoc similarity index 100% rename from prdoc/pr_7220.prdoc rename to prdoc/stable2506/pr_7220.prdoc diff --git a/prdoc/pr_7229.prdoc b/prdoc/stable2506/pr_7229.prdoc similarity index 100% rename from prdoc/pr_7229.prdoc rename to prdoc/stable2506/pr_7229.prdoc diff --git a/prdoc/pr_7375.prdoc b/prdoc/stable2506/pr_7375.prdoc similarity index 100% rename from prdoc/pr_7375.prdoc rename to prdoc/stable2506/pr_7375.prdoc diff --git a/prdoc/pr_7556.prdoc b/prdoc/stable2506/pr_7556.prdoc similarity index 100% rename from prdoc/pr_7556.prdoc rename to prdoc/stable2506/pr_7556.prdoc diff --git a/prdoc/pr_7592.prdoc b/prdoc/stable2506/pr_7592.prdoc similarity index 100% rename from prdoc/pr_7592.prdoc rename to prdoc/stable2506/pr_7592.prdoc diff --git a/prdoc/pr_7597.prdoc b/prdoc/stable2506/pr_7597.prdoc similarity index 100% rename from prdoc/pr_7597.prdoc rename to prdoc/stable2506/pr_7597.prdoc diff --git a/prdoc/pr_7666.prdoc b/prdoc/stable2506/pr_7666.prdoc similarity index 100% rename from prdoc/pr_7666.prdoc rename to prdoc/stable2506/pr_7666.prdoc diff --git a/prdoc/pr_7682.prdoc b/prdoc/stable2506/pr_7682.prdoc similarity index 100% rename from prdoc/pr_7682.prdoc rename to prdoc/stable2506/pr_7682.prdoc diff --git a/prdoc/pr_7719.prdoc b/prdoc/stable2506/pr_7719.prdoc similarity index 100% rename from prdoc/pr_7719.prdoc rename to prdoc/stable2506/pr_7719.prdoc diff --git a/prdoc/pr_7720.prdoc b/prdoc/stable2506/pr_7720.prdoc similarity index 100% rename from prdoc/pr_7720.prdoc rename to prdoc/stable2506/pr_7720.prdoc diff --git a/prdoc/pr_7730.prdoc b/prdoc/stable2506/pr_7730.prdoc similarity index 100% rename from prdoc/pr_7730.prdoc rename to prdoc/stable2506/pr_7730.prdoc diff --git a/prdoc/pr_7762.prdoc b/prdoc/stable2506/pr_7762.prdoc similarity index 100% rename from prdoc/pr_7762.prdoc rename to prdoc/stable2506/pr_7762.prdoc diff --git a/prdoc/pr_7833.prdoc b/prdoc/stable2506/pr_7833.prdoc similarity index 100% rename from prdoc/pr_7833.prdoc rename to prdoc/stable2506/pr_7833.prdoc diff --git a/prdoc/pr_7857.prdoc b/prdoc/stable2506/pr_7857.prdoc similarity index 100% rename from prdoc/pr_7857.prdoc rename to prdoc/stable2506/pr_7857.prdoc diff --git a/prdoc/pr_7867.prdoc b/prdoc/stable2506/pr_7867.prdoc similarity index 100% rename from prdoc/pr_7867.prdoc rename to prdoc/stable2506/pr_7867.prdoc diff --git a/prdoc/pr_7882.prdoc b/prdoc/stable2506/pr_7882.prdoc similarity index 100% rename from prdoc/pr_7882.prdoc rename to prdoc/stable2506/pr_7882.prdoc diff --git a/prdoc/pr_7936.prdoc b/prdoc/stable2506/pr_7936.prdoc similarity index 100% rename from prdoc/pr_7936.prdoc rename to prdoc/stable2506/pr_7936.prdoc diff --git a/prdoc/pr_7944.prdoc b/prdoc/stable2506/pr_7944.prdoc similarity index 100% rename from prdoc/pr_7944.prdoc rename to prdoc/stable2506/pr_7944.prdoc diff --git a/prdoc/pr_7955.prdoc b/prdoc/stable2506/pr_7955.prdoc similarity index 100% rename from prdoc/pr_7955.prdoc rename to prdoc/stable2506/pr_7955.prdoc diff --git a/prdoc/pr_7960.prdoc b/prdoc/stable2506/pr_7960.prdoc similarity index 100% rename from prdoc/pr_7960.prdoc rename to prdoc/stable2506/pr_7960.prdoc diff --git a/prdoc/pr_7980.prdoc b/prdoc/stable2506/pr_7980.prdoc similarity index 100% rename from prdoc/pr_7980.prdoc rename to prdoc/stable2506/pr_7980.prdoc diff --git a/prdoc/pr_7995.prdoc b/prdoc/stable2506/pr_7995.prdoc similarity index 100% rename from prdoc/pr_7995.prdoc rename to prdoc/stable2506/pr_7995.prdoc diff --git a/prdoc/pr_8001.prdoc b/prdoc/stable2506/pr_8001.prdoc similarity index 100% rename from prdoc/pr_8001.prdoc rename to prdoc/stable2506/pr_8001.prdoc diff --git a/prdoc/pr_8021.prdoc b/prdoc/stable2506/pr_8021.prdoc similarity index 100% rename from prdoc/pr_8021.prdoc rename to prdoc/stable2506/pr_8021.prdoc diff --git a/prdoc/pr_8038.prdoc b/prdoc/stable2506/pr_8038.prdoc similarity index 100% rename from prdoc/pr_8038.prdoc rename to prdoc/stable2506/pr_8038.prdoc diff --git a/prdoc/pr_8069.prdoc b/prdoc/stable2506/pr_8069.prdoc similarity index 100% rename from prdoc/pr_8069.prdoc rename to prdoc/stable2506/pr_8069.prdoc diff --git a/prdoc/pr_8072.prdoc b/prdoc/stable2506/pr_8072.prdoc similarity index 100% rename from prdoc/pr_8072.prdoc rename to prdoc/stable2506/pr_8072.prdoc diff --git a/prdoc/pr_8102.prdoc b/prdoc/stable2506/pr_8102.prdoc similarity index 100% rename from prdoc/pr_8102.prdoc rename to prdoc/stable2506/pr_8102.prdoc diff --git a/prdoc/pr_8103.prdoc b/prdoc/stable2506/pr_8103.prdoc similarity index 100% rename from prdoc/pr_8103.prdoc rename to prdoc/stable2506/pr_8103.prdoc diff --git a/prdoc/pr_8118.prdoc b/prdoc/stable2506/pr_8118.prdoc similarity index 100% rename from prdoc/pr_8118.prdoc rename to prdoc/stable2506/pr_8118.prdoc diff --git a/prdoc/pr_8122.prdoc b/prdoc/stable2506/pr_8122.prdoc similarity index 100% rename from prdoc/pr_8122.prdoc rename to prdoc/stable2506/pr_8122.prdoc diff --git a/prdoc/pr_8127.prdoc b/prdoc/stable2506/pr_8127.prdoc similarity index 100% rename from prdoc/pr_8127.prdoc rename to prdoc/stable2506/pr_8127.prdoc diff --git a/prdoc/pr_8130.prdoc b/prdoc/stable2506/pr_8130.prdoc similarity index 100% rename from prdoc/pr_8130.prdoc rename to prdoc/stable2506/pr_8130.prdoc diff --git a/prdoc/pr_8134.prdoc b/prdoc/stable2506/pr_8134.prdoc similarity index 100% rename from prdoc/pr_8134.prdoc rename to prdoc/stable2506/pr_8134.prdoc diff --git a/prdoc/pr_8148.prdoc b/prdoc/stable2506/pr_8148.prdoc similarity index 100% rename from prdoc/pr_8148.prdoc rename to prdoc/stable2506/pr_8148.prdoc diff --git a/prdoc/pr_8153.prdoc b/prdoc/stable2506/pr_8153.prdoc similarity index 100% rename from prdoc/pr_8153.prdoc rename to prdoc/stable2506/pr_8153.prdoc diff --git a/prdoc/pr_8163.prdoc b/prdoc/stable2506/pr_8163.prdoc similarity index 100% rename from prdoc/pr_8163.prdoc rename to prdoc/stable2506/pr_8163.prdoc diff --git a/prdoc/pr_8164.prdoc b/prdoc/stable2506/pr_8164.prdoc similarity index 100% rename from prdoc/pr_8164.prdoc rename to prdoc/stable2506/pr_8164.prdoc diff --git a/prdoc/pr_8171.prdoc b/prdoc/stable2506/pr_8171.prdoc similarity index 100% rename from prdoc/pr_8171.prdoc rename to prdoc/stable2506/pr_8171.prdoc diff --git a/prdoc/pr_8179.prdoc b/prdoc/stable2506/pr_8179.prdoc similarity index 100% rename from prdoc/pr_8179.prdoc rename to prdoc/stable2506/pr_8179.prdoc diff --git a/prdoc/pr_8197.prdoc b/prdoc/stable2506/pr_8197.prdoc similarity index 100% rename from prdoc/pr_8197.prdoc rename to prdoc/stable2506/pr_8197.prdoc diff --git a/prdoc/pr_8208.prdoc b/prdoc/stable2506/pr_8208.prdoc similarity index 100% rename from prdoc/pr_8208.prdoc rename to prdoc/stable2506/pr_8208.prdoc diff --git a/prdoc/pr_8212.prdoc b/prdoc/stable2506/pr_8212.prdoc similarity index 100% rename from prdoc/pr_8212.prdoc rename to prdoc/stable2506/pr_8212.prdoc diff --git a/prdoc/pr_8230.prdoc b/prdoc/stable2506/pr_8230.prdoc similarity index 100% rename from prdoc/pr_8230.prdoc rename to prdoc/stable2506/pr_8230.prdoc diff --git a/prdoc/pr_8234.prdoc b/prdoc/stable2506/pr_8234.prdoc similarity index 100% rename from prdoc/pr_8234.prdoc rename to prdoc/stable2506/pr_8234.prdoc diff --git a/prdoc/pr_8238.prdoc b/prdoc/stable2506/pr_8238.prdoc similarity index 100% rename from prdoc/pr_8238.prdoc rename to prdoc/stable2506/pr_8238.prdoc diff --git a/prdoc/pr_8248.prdoc b/prdoc/stable2506/pr_8248.prdoc similarity index 100% rename from prdoc/pr_8248.prdoc rename to prdoc/stable2506/pr_8248.prdoc diff --git a/prdoc/pr_8254.prdoc b/prdoc/stable2506/pr_8254.prdoc similarity index 100% rename from prdoc/pr_8254.prdoc rename to prdoc/stable2506/pr_8254.prdoc diff --git a/prdoc/pr_8262.prdoc b/prdoc/stable2506/pr_8262.prdoc similarity index 100% rename from prdoc/pr_8262.prdoc rename to prdoc/stable2506/pr_8262.prdoc diff --git a/prdoc/pr_8271.prdoc b/prdoc/stable2506/pr_8271.prdoc similarity index 100% rename from prdoc/pr_8271.prdoc rename to prdoc/stable2506/pr_8271.prdoc diff --git a/prdoc/pr_8273.prdoc b/prdoc/stable2506/pr_8273.prdoc similarity index 100% rename from prdoc/pr_8273.prdoc rename to prdoc/stable2506/pr_8273.prdoc diff --git a/prdoc/pr_8274.prdoc b/prdoc/stable2506/pr_8274.prdoc similarity index 100% rename from prdoc/pr_8274.prdoc rename to prdoc/stable2506/pr_8274.prdoc diff --git a/prdoc/pr_8281.prdoc b/prdoc/stable2506/pr_8281.prdoc similarity index 100% rename from prdoc/pr_8281.prdoc rename to prdoc/stable2506/pr_8281.prdoc diff --git a/prdoc/pr_8289.prdoc b/prdoc/stable2506/pr_8289.prdoc similarity index 100% rename from prdoc/pr_8289.prdoc rename to prdoc/stable2506/pr_8289.prdoc diff --git a/prdoc/pr_8299.prdoc b/prdoc/stable2506/pr_8299.prdoc similarity index 100% rename from prdoc/pr_8299.prdoc rename to prdoc/stable2506/pr_8299.prdoc diff --git a/prdoc/pr_8310.prdoc b/prdoc/stable2506/pr_8310.prdoc similarity index 100% rename from prdoc/pr_8310.prdoc rename to prdoc/stable2506/pr_8310.prdoc diff --git a/prdoc/pr_8311.prdoc b/prdoc/stable2506/pr_8311.prdoc similarity index 100% rename from prdoc/pr_8311.prdoc rename to prdoc/stable2506/pr_8311.prdoc diff --git a/prdoc/pr_8314.prdoc b/prdoc/stable2506/pr_8314.prdoc similarity index 100% rename from prdoc/pr_8314.prdoc rename to prdoc/stable2506/pr_8314.prdoc diff --git a/prdoc/pr_8316.prdoc b/prdoc/stable2506/pr_8316.prdoc similarity index 100% rename from prdoc/pr_8316.prdoc rename to prdoc/stable2506/pr_8316.prdoc diff --git a/prdoc/pr_8323.prdoc b/prdoc/stable2506/pr_8323.prdoc similarity index 100% rename from prdoc/pr_8323.prdoc rename to prdoc/stable2506/pr_8323.prdoc diff --git a/prdoc/pr_8327.prdoc b/prdoc/stable2506/pr_8327.prdoc similarity index 100% rename from prdoc/pr_8327.prdoc rename to prdoc/stable2506/pr_8327.prdoc diff --git a/prdoc/pr_8332.prdoc b/prdoc/stable2506/pr_8332.prdoc similarity index 100% rename from prdoc/pr_8332.prdoc rename to prdoc/stable2506/pr_8332.prdoc diff --git a/prdoc/pr_8337.prdoc b/prdoc/stable2506/pr_8337.prdoc similarity index 100% rename from prdoc/pr_8337.prdoc rename to prdoc/stable2506/pr_8337.prdoc diff --git a/prdoc/pr_8339.prdoc b/prdoc/stable2506/pr_8339.prdoc similarity index 100% rename from prdoc/pr_8339.prdoc rename to prdoc/stable2506/pr_8339.prdoc diff --git a/prdoc/pr_8344.prdoc b/prdoc/stable2506/pr_8344.prdoc similarity index 100% rename from prdoc/pr_8344.prdoc rename to prdoc/stable2506/pr_8344.prdoc diff --git a/prdoc/pr_8345.prdoc b/prdoc/stable2506/pr_8345.prdoc similarity index 100% rename from prdoc/pr_8345.prdoc rename to prdoc/stable2506/pr_8345.prdoc diff --git a/prdoc/pr_8369.prdoc b/prdoc/stable2506/pr_8369.prdoc similarity index 100% rename from prdoc/pr_8369.prdoc rename to prdoc/stable2506/pr_8369.prdoc diff --git a/prdoc/pr_8370.prdoc b/prdoc/stable2506/pr_8370.prdoc similarity index 100% rename from prdoc/pr_8370.prdoc rename to prdoc/stable2506/pr_8370.prdoc diff --git a/prdoc/pr_8376.prdoc b/prdoc/stable2506/pr_8376.prdoc similarity index 100% rename from prdoc/pr_8376.prdoc rename to prdoc/stable2506/pr_8376.prdoc diff --git a/prdoc/pr_8382.prdoc b/prdoc/stable2506/pr_8382.prdoc similarity index 100% rename from prdoc/pr_8382.prdoc rename to prdoc/stable2506/pr_8382.prdoc diff --git a/prdoc/pr_8387.prdoc b/prdoc/stable2506/pr_8387.prdoc similarity index 100% rename from prdoc/pr_8387.prdoc rename to prdoc/stable2506/pr_8387.prdoc diff --git a/prdoc/pr_8409.prdoc b/prdoc/stable2506/pr_8409.prdoc similarity index 100% rename from prdoc/pr_8409.prdoc rename to prdoc/stable2506/pr_8409.prdoc diff --git a/prdoc/pr_8422.prdoc b/prdoc/stable2506/pr_8422.prdoc similarity index 100% rename from prdoc/pr_8422.prdoc rename to prdoc/stable2506/pr_8422.prdoc diff --git a/prdoc/pr_8441.prdoc b/prdoc/stable2506/pr_8441.prdoc similarity index 100% rename from prdoc/pr_8441.prdoc rename to prdoc/stable2506/pr_8441.prdoc diff --git a/prdoc/pr_8443.prdoc b/prdoc/stable2506/pr_8443.prdoc similarity index 100% rename from prdoc/pr_8443.prdoc rename to prdoc/stable2506/pr_8443.prdoc diff --git a/prdoc/pr_8445.prdoc b/prdoc/stable2506/pr_8445.prdoc similarity index 100% rename from prdoc/pr_8445.prdoc rename to prdoc/stable2506/pr_8445.prdoc diff --git a/prdoc/pr_8461.prdoc b/prdoc/stable2506/pr_8461.prdoc similarity index 100% rename from prdoc/pr_8461.prdoc rename to prdoc/stable2506/pr_8461.prdoc diff --git a/prdoc/pr_8470.prdoc b/prdoc/stable2506/pr_8470.prdoc similarity index 100% rename from prdoc/pr_8470.prdoc rename to prdoc/stable2506/pr_8470.prdoc diff --git a/prdoc/pr_8473.prdoc b/prdoc/stable2506/pr_8473.prdoc similarity index 100% rename from prdoc/pr_8473.prdoc rename to prdoc/stable2506/pr_8473.prdoc diff --git a/prdoc/pr_8477.prdoc b/prdoc/stable2506/pr_8477.prdoc similarity index 100% rename from prdoc/pr_8477.prdoc rename to prdoc/stable2506/pr_8477.prdoc diff --git a/prdoc/pr_8500.prdoc b/prdoc/stable2506/pr_8500.prdoc similarity index 100% rename from prdoc/pr_8500.prdoc rename to prdoc/stable2506/pr_8500.prdoc diff --git a/prdoc/pr_8504.prdoc b/prdoc/stable2506/pr_8504.prdoc similarity index 100% rename from prdoc/pr_8504.prdoc rename to prdoc/stable2506/pr_8504.prdoc diff --git a/prdoc/pr_8528.prdoc b/prdoc/stable2506/pr_8528.prdoc similarity index 100% rename from prdoc/pr_8528.prdoc rename to prdoc/stable2506/pr_8528.prdoc diff --git a/prdoc/pr_8531.prdoc b/prdoc/stable2506/pr_8531.prdoc similarity index 100% rename from prdoc/pr_8531.prdoc rename to prdoc/stable2506/pr_8531.prdoc diff --git a/prdoc/pr_8533.prdoc b/prdoc/stable2506/pr_8533.prdoc similarity index 100% rename from prdoc/pr_8533.prdoc rename to prdoc/stable2506/pr_8533.prdoc diff --git a/prdoc/pr_8535.prdoc b/prdoc/stable2506/pr_8535.prdoc similarity index 100% rename from prdoc/pr_8535.prdoc rename to prdoc/stable2506/pr_8535.prdoc diff --git a/prdoc/pr_8545.prdoc b/prdoc/stable2506/pr_8545.prdoc similarity index 100% rename from prdoc/pr_8545.prdoc rename to prdoc/stable2506/pr_8545.prdoc diff --git a/prdoc/pr_8547.prdoc b/prdoc/stable2506/pr_8547.prdoc similarity index 100% rename from prdoc/pr_8547.prdoc rename to prdoc/stable2506/pr_8547.prdoc diff --git a/prdoc/pr_8554.prdoc b/prdoc/stable2506/pr_8554.prdoc similarity index 100% rename from prdoc/pr_8554.prdoc rename to prdoc/stable2506/pr_8554.prdoc diff --git a/prdoc/pr_8559.prdoc b/prdoc/stable2506/pr_8559.prdoc similarity index 100% rename from prdoc/pr_8559.prdoc rename to prdoc/stable2506/pr_8559.prdoc diff --git a/prdoc/pr_8584.prdoc b/prdoc/stable2506/pr_8584.prdoc similarity index 100% rename from prdoc/pr_8584.prdoc rename to prdoc/stable2506/pr_8584.prdoc diff --git a/prdoc/pr_8587.prdoc b/prdoc/stable2506/pr_8587.prdoc similarity index 100% rename from prdoc/pr_8587.prdoc rename to prdoc/stable2506/pr_8587.prdoc diff --git a/prdoc/pr_8594.prdoc b/prdoc/stable2506/pr_8594.prdoc similarity index 100% rename from prdoc/pr_8594.prdoc rename to prdoc/stable2506/pr_8594.prdoc diff --git a/prdoc/pr_8599.prdoc b/prdoc/stable2506/pr_8599.prdoc similarity index 100% rename from prdoc/pr_8599.prdoc rename to prdoc/stable2506/pr_8599.prdoc diff --git a/prdoc/pr_8606.prdoc b/prdoc/stable2506/pr_8606.prdoc similarity index 100% rename from prdoc/pr_8606.prdoc rename to prdoc/stable2506/pr_8606.prdoc diff --git a/prdoc/pr_8630.prdoc b/prdoc/stable2506/pr_8630.prdoc similarity index 100% rename from prdoc/pr_8630.prdoc rename to prdoc/stable2506/pr_8630.prdoc diff --git a/prdoc/pr_8633.prdoc b/prdoc/stable2506/pr_8633.prdoc similarity index 100% rename from prdoc/pr_8633.prdoc rename to prdoc/stable2506/pr_8633.prdoc diff --git a/prdoc/pr_8650.prdoc b/prdoc/stable2506/pr_8650.prdoc similarity index 100% rename from prdoc/pr_8650.prdoc rename to prdoc/stable2506/pr_8650.prdoc diff --git a/prdoc/pr_8652.prdoc b/prdoc/stable2506/pr_8652.prdoc similarity index 100% rename from prdoc/pr_8652.prdoc rename to prdoc/stable2506/pr_8652.prdoc diff --git a/prdoc/pr_8662.prdoc b/prdoc/stable2506/pr_8662.prdoc similarity index 100% rename from prdoc/pr_8662.prdoc rename to prdoc/stable2506/pr_8662.prdoc diff --git a/prdoc/pr_8664.prdoc b/prdoc/stable2506/pr_8664.prdoc similarity index 100% rename from prdoc/pr_8664.prdoc rename to prdoc/stable2506/pr_8664.prdoc diff --git a/prdoc/pr_8667.prdoc b/prdoc/stable2506/pr_8667.prdoc similarity index 100% rename from prdoc/pr_8667.prdoc rename to prdoc/stable2506/pr_8667.prdoc diff --git a/prdoc/pr_8669.prdoc b/prdoc/stable2506/pr_8669.prdoc similarity index 100% rename from prdoc/pr_8669.prdoc rename to prdoc/stable2506/pr_8669.prdoc diff --git a/prdoc/pr_8679.prdoc b/prdoc/stable2506/pr_8679.prdoc similarity index 100% rename from prdoc/pr_8679.prdoc rename to prdoc/stable2506/pr_8679.prdoc diff --git a/prdoc/pr_8687.prdoc b/prdoc/stable2506/pr_8687.prdoc similarity index 100% rename from prdoc/pr_8687.prdoc rename to prdoc/stable2506/pr_8687.prdoc diff --git a/prdoc/pr_8688.prdoc b/prdoc/stable2506/pr_8688.prdoc similarity index 100% rename from prdoc/pr_8688.prdoc rename to prdoc/stable2506/pr_8688.prdoc diff --git a/prdoc/pr_8700.prdoc b/prdoc/stable2506/pr_8700.prdoc similarity index 100% rename from prdoc/pr_8700.prdoc rename to prdoc/stable2506/pr_8700.prdoc diff --git a/prdoc/pr_8702.prdoc b/prdoc/stable2506/pr_8702.prdoc similarity index 100% rename from prdoc/pr_8702.prdoc rename to prdoc/stable2506/pr_8702.prdoc diff --git a/prdoc/pr_8704.prdoc b/prdoc/stable2506/pr_8704.prdoc similarity index 100% rename from prdoc/pr_8704.prdoc rename to prdoc/stable2506/pr_8704.prdoc diff --git a/prdoc/pr_8708.prdoc b/prdoc/stable2506/pr_8708.prdoc similarity index 100% rename from prdoc/pr_8708.prdoc rename to prdoc/stable2506/pr_8708.prdoc diff --git a/prdoc/pr_8715.prdoc b/prdoc/stable2506/pr_8715.prdoc similarity index 100% rename from prdoc/pr_8715.prdoc rename to prdoc/stable2506/pr_8715.prdoc diff --git a/prdoc/pr_8718.prdoc b/prdoc/stable2506/pr_8718.prdoc similarity index 100% rename from prdoc/pr_8718.prdoc rename to prdoc/stable2506/pr_8718.prdoc diff --git a/prdoc/pr_8724.prdoc b/prdoc/stable2506/pr_8724.prdoc similarity index 100% rename from prdoc/pr_8724.prdoc rename to prdoc/stable2506/pr_8724.prdoc diff --git a/prdoc/pr_8725.prdoc b/prdoc/stable2506/pr_8725.prdoc similarity index 100% rename from prdoc/pr_8725.prdoc rename to prdoc/stable2506/pr_8725.prdoc diff --git a/prdoc/pr_8734.prdoc b/prdoc/stable2506/pr_8734.prdoc similarity index 100% rename from prdoc/pr_8734.prdoc rename to prdoc/stable2506/pr_8734.prdoc diff --git a/prdoc/pr_8745.prdoc b/prdoc/stable2506/pr_8745.prdoc similarity index 100% rename from prdoc/pr_8745.prdoc rename to prdoc/stable2506/pr_8745.prdoc diff --git a/prdoc/pr_8750.prdoc b/prdoc/stable2506/pr_8750.prdoc similarity index 100% rename from prdoc/pr_8750.prdoc rename to prdoc/stable2506/pr_8750.prdoc From 71628056a06df8cf35026460fe89874001d20df2 Mon Sep 17 00:00:00 2001 From: "paritytech-release-backport-bot[bot]" <191369287+paritytech-release-backport-bot[bot]@users.noreply.github.com> Date: Tue, 10 Jun 2025 21:30:14 +0200 Subject: [PATCH 005/128] [stable2506] Backport #8755 (#8815) Backport #8755 into `stable2506` from iulianbarbu. See the [documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md) on how to use this bot. --------- Signed-off-by: Iulian Barbu Co-authored-by: Iulian Barbu <14218860+iulianbarbu@users.noreply.github.com> Co-authored-by: EgorPopelyaev --- .../scripts/release/build-linux-release.sh | 7 +++++- .github/workflows/release-20_build-rc.yml | 22 ++++++++++--------- .github/workflows/release-build-binary.yml | 8 +++++-- ...buid.yml => release-reusable-rc-build.yml} | 11 +++++++--- 4 files changed, 32 insertions(+), 16 deletions(-) rename .github/workflows/{release-reusable-rc-buid.yml => release-reusable-rc-build.yml} (97%) diff --git a/.github/scripts/release/build-linux-release.sh b/.github/scripts/release/build-linux-release.sh index 413a3274edf30..40898058b758e 100755 --- a/.github/scripts/release/build-linux-release.sh +++ b/.github/scripts/release/build-linux-release.sh @@ -9,6 +9,11 @@ BIN=$1 PACKAGE=${2:-$BIN} +# must be given as feature1,feature2,feature3... +FEATURES=$3 +if [ -n "$FEATURES" ]; then + FEATURES="--features ${FEATURES}" +fi PROFILE=${PROFILE:-production} ARTIFACTS=/artifacts/$BIN @@ -17,7 +22,7 @@ echo "Artifacts will be copied into $ARTIFACTS" mkdir -p "$ARTIFACTS" git log --pretty=oneline -n 1 -time cargo build --profile $PROFILE --locked --verbose --bin $BIN --package $PACKAGE +time cargo build --profile $PROFILE --locked --verbose --bin $BIN --package $PACKAGE $FEATURES echo "Artifact target: $ARTIFACTS" diff --git a/.github/workflows/release-20_build-rc.yml b/.github/workflows/release-20_build-rc.yml index 594356d4a06ba..6b4c67b832685 100644 --- a/.github/workflows/release-20_build-rc.yml +++ b/.github/workflows/release-20_build-rc.yml @@ -47,7 +47,7 @@ jobs: build-polkadot-binary: needs: [validate-inputs] if: ${{ inputs.binary == 'polkadot' || inputs.binary == 'all' }} - uses: "./.github/workflows/release-reusable-rc-buid.yml" + uses: "./.github/workflows/release-reusable-rc-build.yml" with: binary: '["polkadot", "polkadot-prepare-worker", "polkadot-execute-worker"]' package: polkadot @@ -69,7 +69,7 @@ jobs: build-polkadot-parachain-binary: needs: [validate-inputs] if: ${{ inputs.binary == 'polkadot-parachain' || inputs.binary == 'all' }} - uses: "./.github/workflows/release-reusable-rc-buid.yml" + uses: "./.github/workflows/release-reusable-rc-build.yml" with: binary: '["polkadot-parachain"]' package: "polkadot-parachain-bin" @@ -91,12 +91,13 @@ jobs: build-polkadot-omni-node-binary: needs: [validate-inputs] if: ${{ inputs.binary == 'polkadot-omni-node' || inputs.binary == 'all' }} - uses: "./.github/workflows/release-reusable-rc-buid.yml" + uses: "./.github/workflows/release-reusable-rc-build.yml" with: binary: '["polkadot-omni-node"]' package: "polkadot-omni-node" release_tag: ${{ needs.validate-inputs.outputs.release_tag }} target: x86_64-unknown-linux-gnu + features: runtime-benchmarks secrets: PGP_KMS_KEY: ${{ secrets.PGP_KMS_KEY }} PGP_KMS_HASH: ${{ secrets.PGP_KMS_HASH }} @@ -113,7 +114,7 @@ jobs: build-frame-omni-bencher-binary: needs: [validate-inputs] if: ${{ inputs.binary == 'frame-omni-bencher' || inputs.binary == 'all' }} - uses: "./.github/workflows/release-reusable-rc-buid.yml" + uses: "./.github/workflows/release-reusable-rc-build.yml" with: binary: '["frame-omni-bencher"]' package: "frame-omni-bencher" @@ -135,7 +136,7 @@ jobs: build-chain-spec-builder-binary: needs: [validate-inputs] if: ${{ inputs.binary == 'chain-spec-builder' || inputs.binary == 'all' }} - uses: "./.github/workflows/release-reusable-rc-buid.yml" + uses: "./.github/workflows/release-reusable-rc-build.yml" with: binary: '["chain-spec-builder"]' package: staging-chain-spec-builder @@ -157,7 +158,7 @@ jobs: build-polkadot-macos-binary: needs: [validate-inputs] if: ${{ inputs.binary == 'polkadot' || inputs.binary == 'all' }} - uses: "./.github/workflows/release-reusable-rc-buid.yml" + uses: "./.github/workflows/release-reusable-rc-build.yml" with: binary: '["polkadot", "polkadot-prepare-worker", "polkadot-execute-worker"]' package: polkadot @@ -179,7 +180,7 @@ jobs: build-polkadot-parachain-macos-binary: needs: [validate-inputs] if: ${{ inputs.binary == 'polkadot-parachain' || inputs.binary == 'all' }} - uses: "./.github/workflows/release-reusable-rc-buid.yml" + uses: "./.github/workflows/release-reusable-rc-build.yml" with: binary: '["polkadot-parachain"]' package: polkadot-parachain-bin @@ -201,12 +202,13 @@ jobs: build-polkadot-omni-node-macos-binary: needs: [validate-inputs] if: ${{ inputs.binary == 'polkadot-omni-node' || inputs.binary == 'all' }} - uses: "./.github/workflows/release-reusable-rc-buid.yml" + uses: "./.github/workflows/release-reusable-rc-build.yml" with: binary: '["polkadot-omni-node"]' package: polkadot-omni-node release_tag: ${{ needs.validate-inputs.outputs.release_tag }} target: aarch64-apple-darwin + features: runtime-benchmarks secrets: PGP_KMS_KEY: ${{ secrets.PGP_KMS_KEY }} PGP_KMS_HASH: ${{ secrets.PGP_KMS_HASH }} @@ -223,7 +225,7 @@ jobs: build-frame-omni-bencher-macos-binary: needs: [validate-inputs] if: ${{ inputs.binary == 'frame-omni-bencher' || inputs.binary == 'all' }} - uses: "./.github/workflows/release-reusable-rc-buid.yml" + uses: "./.github/workflows/release-reusable-rc-build.yml" with: binary: '["frame-omni-bencher"]' package: frame-omni-bencher @@ -245,7 +247,7 @@ jobs: build-chain-spec-builder-macos-binary: needs: [validate-inputs] if: ${{ inputs.binary == 'chain-spec-builder' || inputs.binary == 'all' }} - uses: "./.github/workflows/release-reusable-rc-buid.yml" + uses: "./.github/workflows/release-reusable-rc-build.yml" with: binary: '["chain-spec-builder"]' package: staging-chain-spec-builder diff --git a/.github/workflows/release-build-binary.yml b/.github/workflows/release-build-binary.yml index 59a8f9da7cc92..a5adab421a8a4 100644 --- a/.github/workflows/release-build-binary.yml +++ b/.github/workflows/release-build-binary.yml @@ -18,6 +18,10 @@ on: required: true default: "release" description: "The profile to use for the binary build" + features: + required: false + type: string + description: "Features to enable when building the binary (must be a list of comma-separated features)" jobs: @@ -63,10 +67,10 @@ jobs: if [ "${{ inputs.binary }}" = "polkadot" ]; then for binary in polkadot polkadot-prepare-worker polkadot-execute-worker; do echo "Building $binary..." - ./.github/scripts/release/build-linux-release.sh $binary ${{ inputs.package }} "${PROFILE}" + ./.github/scripts/release/build-linux-release.sh $binary ${{ inputs.package }} "${PROFILE}" ${{ inputs.features }} done else - ./.github/scripts/release/build-linux-release.sh ${{ inputs.binary }} ${{ inputs.package }} "${PROFILE}" + ./.github/scripts/release/build-linux-release.sh ${{ inputs.binary }} ${{ inputs.package }} "${PROFILE}" ${{ inputs.features }} fi - name: Upload ${{ inputs.binary }} artifacts diff --git a/.github/workflows/release-reusable-rc-buid.yml b/.github/workflows/release-reusable-rc-build.yml similarity index 97% rename from .github/workflows/release-reusable-rc-buid.yml rename to .github/workflows/release-reusable-rc-build.yml index 1de2053013841..9061c43e60e08 100644 --- a/.github/workflows/release-reusable-rc-buid.yml +++ b/.github/workflows/release-reusable-rc-build.yml @@ -24,6 +24,11 @@ on: required: true type: string + features: + description: Features to be enabled when building the binary (must be a list of comma-separated features) + required: false + type: string + secrets: PGP_KMS_KEY: required: true @@ -82,7 +87,7 @@ jobs: - name: Install pgpkkms run: | # Install pgpkms that is used to sign built artifacts - python3 -m pip install "pgpkms @ git+https://github.com/paritytech-release/pgpkms.git@e7f806f99e9be5c52f0b4a536b7d4ef9c3e695ed" + python3 -m pip install "pgpkms @ git+https://github.com/paritytech-release/pgpkms.git@e7f806f99e9be5c52f0b4a536b7d4ef9c3e695ed" --break-system-packages which pgpkms - name: Checkout sources @@ -101,7 +106,7 @@ jobs: - name: Build binary run: | git config --global --add safe.directory "${GITHUB_WORKSPACE}" #avoid "detected dubious ownership" error - ./.github/scripts/release/build-linux-release.sh ${{ matrix.binaries }} ${{ inputs.package }} + ./.github/scripts/release/build-linux-release.sh ${{ matrix.binaries }} ${{ inputs.package }} ${{ inputs.features }} - name: Generate artifact attestation uses: actions/attest-build-provenance@db473fddc028af60658334401dc6fa3ffd8669fd # v2.3.0 @@ -216,7 +221,7 @@ jobs: - name: Build binary run: | git config --global --add safe.directory "${GITHUB_WORKSPACE}" #avoid "detected dubious ownership" error - ./.github/scripts/release/build-macos-release.sh ${{ matrix.binaries }} ${{ inputs.package }} + ./.github/scripts/release/build-macos-release.sh ${{ matrix.binaries }} ${{ inputs.package }} ${{ inputs.features }} - name: Generate artifact attestation uses: actions/attest-build-provenance@db473fddc028af60658334401dc6fa3ffd8669fd # v2.3.0 From b807828317cd5fd7c9d41d8156d71d7bd59010d2 Mon Sep 17 00:00:00 2001 From: EgorPopelyaev Date: Tue, 10 Jun 2025 22:07:02 +0200 Subject: [PATCH 006/128] Fix build pipeline --- .github/workflows/release-reusable-rc-build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-reusable-rc-build.yml b/.github/workflows/release-reusable-rc-build.yml index 9061c43e60e08..7838869e7a2f7 100644 --- a/.github/workflows/release-reusable-rc-build.yml +++ b/.github/workflows/release-reusable-rc-build.yml @@ -87,7 +87,7 @@ jobs: - name: Install pgpkkms run: | # Install pgpkms that is used to sign built artifacts - python3 -m pip install "pgpkms @ git+https://github.com/paritytech-release/pgpkms.git@e7f806f99e9be5c52f0b4a536b7d4ef9c3e695ed" --break-system-packages + python3 -m pip install "pgpkms @ git+https://github.com/paritytech-release/pgpkms.git@e7f806f99e9be5c52f0b4a536b7d4ef9c3e695ed" which pgpkms - name: Checkout sources @@ -209,7 +209,7 @@ jobs: - name: Install pgpkkms run: | # Install pgpkms that is used to sign built artifacts - python3 -m pip install "pgpkms @ git+https://github.com/paritytech-release/pgpkms.git@e7f806f99e9be5c52f0b4a536b7d4ef9c3e695ed" + python3 -m pip install "pgpkms @ git+https://github.com/paritytech-release/pgpkms.git@e7f806f99e9be5c52f0b4a536b7d4ef9c3e695ed" --break-system-packages - name: Import gpg keys shell: bash From 46dae3e7d3b301fb1744192126b015db622d2fac Mon Sep 17 00:00:00 2001 From: "paritytech-release-backport-bot[bot]" <191369287+paritytech-release-backport-bot[bot]@users.noreply.github.com> Date: Wed, 11 Jun 2025 15:59:07 +0200 Subject: [PATCH 007/128] [stable2506] Backport #8820 (#8822) Backport #8820 into `stable2506` from EgorPopelyaev. See the [documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md) on how to use this bot. Co-authored-by: Egor_P --- .github/workflows/release-30_publish_release_draft.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-30_publish_release_draft.yml b/.github/workflows/release-30_publish_release_draft.yml index 8c8e228301592..e45642ec58c89 100644 --- a/.github/workflows/release-30_publish_release_draft.yml +++ b/.github/workflows/release-30_publish_release_draft.yml @@ -43,7 +43,7 @@ jobs: needs: [ validate-inputs ] uses: "./.github/workflows/release-srtool.yml" with: - excluded_runtimes: "asset-hub-rococo bridge-hub-rococo coretime-rococo people-rococo rococo rococo-parachain substrate-test bp cumulus-test kitchensink minimal-template parachain-template penpal polkadot-test seedling shell frame-try sp solochain-template polkadot-sdk-docs-first" + excluded_runtimes: "asset-hub-rococo bridge-hub-rococo coretime-rococo people-rococo rococo rococo-parachain substrate-test bp cumulus-test kitchensink minimal-template parachain-template penpal polkadot-test seedling shell frame-try sp solochain-template polkadot-sdk-docs-first pallet-staking-async-parachain pallet-staking-async-rc frame-storage-access-test yet-another-parachain" build_opts: "--features on-chain-release-build" profile: production permissions: From 0431632116bb34ee65133245a0fb965a460d55c5 Mon Sep 17 00:00:00 2001 From: "paritytech-release-backport-bot[bot]" <191369287+paritytech-release-backport-bot[bot]@users.noreply.github.com> Date: Mon, 23 Jun 2025 13:21:02 +0000 Subject: [PATCH 008/128] [stable2506] Backport #8833 (#8899) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Backport #8833 into `stable2506` from AndreiEres. This backport includes a major version bump due to internal API changes that only affect the polkadot binary. Since stable2506 hasn’t been released yet and no other downstream users are impacted, the change is considered safe. See the [documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md) on how to use this bot. Co-authored-by: Andrei Eres Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- Cargo.lock | 1 - .../node/core/candidate-validation/src/lib.rs | 9 +- polkadot/node/core/pvf/common/src/execute.rs | 2 + polkadot/node/core/pvf/common/src/lib.rs | 10 ++ polkadot/node/core/pvf/common/src/prepare.rs | 5 +- .../node/core/pvf/execute-worker/src/lib.rs | 49 ++++++-- .../node/core/pvf/prepare-worker/Cargo.toml | 1 - .../node/core/pvf/prepare-worker/src/lib.rs | 18 ++- polkadot/node/core/pvf/src/artifacts.rs | 33 +++++- polkadot/node/core/pvf/src/error.rs | 3 + polkadot/node/core/pvf/src/execute/queue.rs | 38 +++++- .../core/pvf/src/execute/worker_interface.rs | 28 +++-- polkadot/node/core/pvf/src/host.rs | 70 ++++++++++-- .../core/pvf/src/prepare/worker_interface.rs | 3 +- polkadot/node/core/pvf/tests/it/main.rs | 108 +++++++++++++++++- prdoc/pr_8833.prdoc | 15 +++ 16 files changed, 331 insertions(+), 62 deletions(-) create mode 100644 prdoc/pr_8833.prdoc diff --git a/Cargo.lock b/Cargo.lock index 588012408d76f..56a294a5eae36 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -15483,7 +15483,6 @@ dependencies = [ name = "polkadot-node-core-pvf-prepare-worker" version = "7.0.0" dependencies = [ - "blake3", "cfg-if", "criterion", "libc", diff --git a/polkadot/node/core/candidate-validation/src/lib.rs b/polkadot/node/core/candidate-validation/src/lib.rs index 0c2bcc281daf7..c4913b6b31b63 100644 --- a/polkadot/node/core/candidate-validation/src/lib.rs +++ b/polkadot/node/core/candidate-validation/src/lib.rs @@ -965,6 +965,8 @@ async fn validate_candidate_exhaustive( Ok(ValidationResult::Invalid(InvalidCandidate::ExecutionError(err))), Err(ValidationError::PossiblyInvalid(PossiblyInvalidError::RuntimeConstruction(err))) => Ok(ValidationResult::Invalid(InvalidCandidate::ExecutionError(err))), + Err(ValidationError::PossiblyInvalid(err @ PossiblyInvalidError::CorruptedArtifact)) => + Ok(ValidationResult::Invalid(InvalidCandidate::ExecutionError(err.to_string()))), Err(ValidationError::PossiblyInvalid(PossiblyInvalidError::AmbiguousJobDeath(err))) => Ok(ValidationResult::Invalid(InvalidCandidate::ExecutionError(format!( @@ -1148,7 +1150,7 @@ trait ValidationBackend { let mut num_death_retries_left = 1; let mut num_job_error_retries_left = 1; let mut num_internal_retries_left = 1; - let mut num_runtime_construction_retries_left = 1; + let mut num_execution_error_retries_left = 1; loop { // Stop retrying if we exceeded the timeout. if total_time_start.elapsed() + retry_delay > exec_timeout { @@ -1168,9 +1170,10 @@ trait ValidationBackend { break_if_no_retries_left!(num_internal_retries_left), Err(ValidationError::PossiblyInvalid( - PossiblyInvalidError::RuntimeConstruction(_), + PossiblyInvalidError::RuntimeConstruction(_) | + PossiblyInvalidError::CorruptedArtifact, )) => { - break_if_no_retries_left!(num_runtime_construction_retries_left); + break_if_no_retries_left!(num_execution_error_retries_left); self.precheck_pvf(pvf.clone()).await?; // In this case the error is deterministic // And a retry forces the ValidationBackend diff --git a/polkadot/node/core/pvf/common/src/execute.rs b/polkadot/node/core/pvf/common/src/execute.rs index cff3f3b86e952..cf5ae19897a17 100644 --- a/polkadot/node/core/pvf/common/src/execute.rs +++ b/polkadot/node/core/pvf/common/src/execute.rs @@ -81,6 +81,8 @@ pub enum JobResponse { InvalidCandidate(String), /// PoV decompression failed PoVDecompressionFailure, + /// The artifact is corrupted, re-prepare the artifact and try again. + CorruptedArtifact, } impl JobResponse { diff --git a/polkadot/node/core/pvf/common/src/lib.rs b/polkadot/node/core/pvf/common/src/lib.rs index 30d0aa4452811..49544e5d42a53 100644 --- a/polkadot/node/core/pvf/common/src/lib.rs +++ b/polkadot/node/core/pvf/common/src/lib.rs @@ -33,6 +33,7 @@ pub use sp_tracing; const LOG_TARGET: &str = "parachain::pvf-common"; use codec::{Decode, Encode}; +use sp_core::H256; use std::{ io::{self, Read, Write}, mem, @@ -88,6 +89,15 @@ pub fn framed_recv_blocking(r: &mut (impl Read + Unpin)) -> io::Result> Ok(buf) } +#[derive(Debug, Default, Clone, Copy, Encode, Decode, PartialEq, Eq)] +#[repr(transparent)] +pub struct ArtifactChecksum(H256); + +/// Compute the checksum of the given artifact. +pub fn compute_checksum(data: &[u8]) -> ArtifactChecksum { + ArtifactChecksum(H256::from_slice(&sp_crypto_hashing::twox_256(data))) +} + #[cfg(all(test, not(feature = "test-utils")))] mod tests { use super::*; diff --git a/polkadot/node/core/pvf/common/src/prepare.rs b/polkadot/node/core/pvf/common/src/prepare.rs index 4cd1beb309918..c56daf81fcb5f 100644 --- a/polkadot/node/core/pvf/common/src/prepare.rs +++ b/polkadot/node/core/pvf/common/src/prepare.rs @@ -14,6 +14,7 @@ // You should have received a copy of the GNU General Public License // along with Polkadot. If not, see . +use crate::ArtifactChecksum; use codec::{Decode, Encode}; use std::path::PathBuf; @@ -21,7 +22,7 @@ use std::path::PathBuf; #[derive(Debug, Clone, Default, Encode, Decode)] pub struct PrepareWorkerSuccess { /// Checksum of the compiled PVF. - pub checksum: String, + pub checksum: ArtifactChecksum, /// Stats of the current preparation run. pub stats: PrepareStats, } @@ -29,6 +30,8 @@ pub struct PrepareWorkerSuccess { /// Result of PVF preparation if successful. #[derive(Debug, Clone, Default)] pub struct PrepareSuccess { + /// Checksum of the compiled PVF. + pub checksum: ArtifactChecksum, /// Canonical path to the compiled artifact. pub path: PathBuf, /// Size in bytes diff --git a/polkadot/node/core/pvf/execute-worker/src/lib.rs b/polkadot/node/core/pvf/execute-worker/src/lib.rs index 4b7c167cc9ec3..88a3af985bb5d 100644 --- a/polkadot/node/core/pvf/execute-worker/src/lib.rs +++ b/polkadot/node/core/pvf/execute-worker/src/lib.rs @@ -39,6 +39,7 @@ use nix::{ unistd::{ForkResult, Pid}, }; use polkadot_node_core_pvf_common::{ + compute_checksum, error::InternalValidationError, execute::{Handshake, JobError, JobResponse, JobResult, WorkerError, WorkerResponse}, executor_interface::params_to_wasmtime_semantics, @@ -49,7 +50,7 @@ use polkadot_node_core_pvf_common::{ thread::{self, WaitOutcome}, PipeFd, WorkerInfo, WorkerKind, }, - worker_dir, + worker_dir, ArtifactChecksum, }; use polkadot_node_primitives::{BlockData, PoV, POV_BOMB_LIMIT}; use polkadot_parachain_primitives::primitives::ValidationResult; @@ -87,7 +88,9 @@ fn recv_execute_handshake(stream: &mut UnixStream) -> io::Result { Ok(handshake) } -fn recv_request(stream: &mut UnixStream) -> io::Result<(PersistedValidationData, PoV, Duration)> { +fn recv_request( + stream: &mut UnixStream, +) -> io::Result<(PersistedValidationData, PoV, Duration, ArtifactChecksum)> { let pvd = framed_recv_blocking(stream)?; let pvd = PersistedValidationData::decode(&mut &pvd[..]).map_err(|_| { io::Error::new( @@ -111,7 +114,17 @@ fn recv_request(stream: &mut UnixStream) -> io::Result<(PersistedValidationData, "execute pvf recv_request: failed to decode duration".to_string(), ) })?; - Ok((pvd, pov, execution_timeout)) + + let artifact_checksum = framed_recv_blocking(stream)?; + let artifact_checksum = + ArtifactChecksum::decode(&mut &artifact_checksum[..]).map_err(|_| { + io::Error::new( + io::ErrorKind::Other, + "execute pvf recv_request: failed to decode artifact checksum".to_string(), + ) + })?; + + Ok((pvd, pov, execution_timeout, artifact_checksum)) } /// Sends an error to the host and returns the original error wrapped in `io::Error`. @@ -166,14 +179,15 @@ pub fn worker_entrypoint( let execute_thread_stack_size = max_stack_size(&executor_params); loop { - let (pvd, pov, execution_timeout) = recv_request(&mut stream).map_err(|e| { - map_and_send_err!( - e, - InternalValidationError::HostCommunication, - &mut stream, - worker_info - ) - })?; + let (pvd, pov, execution_timeout, artifact_checksum) = recv_request(&mut stream) + .map_err(|e| { + map_and_send_err!( + e, + InternalValidationError::HostCommunication, + &mut stream, + worker_info + ) + })?; gum::debug!( target: LOG_TARGET, ?worker_info, @@ -192,6 +206,19 @@ pub fn worker_entrypoint( ) })?; + if artifact_checksum != compute_checksum(&compiled_artifact_blob) { + send_result::( + &mut stream, + Ok(WorkerResponse { + job_response: JobResponse::CorruptedArtifact, + duration: Duration::ZERO, + pov_size: 0, + }), + worker_info, + )?; + continue; + } + let (pipe_read_fd, pipe_write_fd) = pipe2_cloexec().map_err(|e| { map_and_send_err!( e, diff --git a/polkadot/node/core/pvf/prepare-worker/Cargo.toml b/polkadot/node/core/pvf/prepare-worker/Cargo.toml index c54d48540388c..9921cf73aea05 100644 --- a/polkadot/node/core/pvf/prepare-worker/Cargo.toml +++ b/polkadot/node/core/pvf/prepare-worker/Cargo.toml @@ -16,7 +16,6 @@ name = "prepare_rococo_runtime" harness = false [dependencies] -blake3 = { workspace = true } cfg-if = { workspace = true } gum = { workspace = true, default-features = true } libc = { workspace = true } diff --git a/polkadot/node/core/pvf/prepare-worker/src/lib.rs b/polkadot/node/core/pvf/prepare-worker/src/lib.rs index 533abe414a0a9..cfe86200624a8 100644 --- a/polkadot/node/core/pvf/prepare-worker/src/lib.rs +++ b/polkadot/node/core/pvf/prepare-worker/src/lib.rs @@ -26,6 +26,7 @@ const LOG_TARGET: &str = "parachain::pvf-prepare-worker"; use crate::memory_stats::max_rss_stat::{extract_max_rss_stat, get_max_rss_thread}; #[cfg(any(target_os = "linux", feature = "jemalloc-allocator"))] use crate::memory_stats::memory_tracker::{get_memory_tracker_loop_stats, memory_tracker_loop}; +use codec::{Decode, Encode}; use nix::{ errno::Errno, sys::{ @@ -35,22 +36,17 @@ use nix::{ unistd::{ForkResult, Pid}, }; use polkadot_node_core_pvf_common::{ - executor_interface::{prepare, prevalidate}, - worker::{pipe2_cloexec, PipeFd, WorkerInfo}, -}; - -use codec::{Decode, Encode}; -use polkadot_node_core_pvf_common::{ + compute_checksum, error::{PrepareError, PrepareWorkerResult}, - executor_interface::create_runtime_from_artifact_bytes, + executor_interface::{create_runtime_from_artifact_bytes, prepare, prevalidate}, framed_recv_blocking, framed_send_blocking, prepare::{MemoryStats, PrepareJobKind, PrepareStats, PrepareWorkerSuccess}, pvf::PvfPrepData, worker::{ - cpu_time_monitor_loop, get_total_cpu_usage, recv_child_response, run_worker, send_result, - stringify_errno, stringify_panic_payload, + cpu_time_monitor_loop, get_total_cpu_usage, pipe2_cloexec, recv_child_response, run_worker, + send_result, stringify_errno, stringify_panic_payload, thread::{self, spawn_worker_thread, WaitOutcome}, - WorkerKind, + PipeFd, WorkerInfo, WorkerKind, }, worker_dir, ProcessTime, }; @@ -718,7 +714,7 @@ fn handle_parent_process( return Err(PrepareError::IoErr(err.to_string())) }; - let checksum = blake3::hash(&artifact.as_ref()).to_hex().to_string(); + let checksum = compute_checksum(&artifact.as_ref()); Ok(PrepareWorkerSuccess { checksum, stats: PrepareStats { diff --git a/polkadot/node/core/pvf/src/artifacts.rs b/polkadot/node/core/pvf/src/artifacts.rs index 1126a0c90c8ce..3530de0993978 100644 --- a/polkadot/node/core/pvf/src/artifacts.rs +++ b/polkadot/node/core/pvf/src/artifacts.rs @@ -56,7 +56,7 @@ use crate::{host::PrecheckResultSender, worker_interface::WORKER_DIR_PREFIX}; use always_assert::always; -use polkadot_node_core_pvf_common::{error::PrepareError, pvf::PvfPrepData}; +use polkadot_node_core_pvf_common::{error::PrepareError, pvf::PvfPrepData, ArtifactChecksum}; use polkadot_parachain_primitives::primitives::ValidationCodeHash; use polkadot_primitives::ExecutorParamsPrepHash; use std::{ @@ -120,11 +120,12 @@ impl ArtifactId { pub struct ArtifactPathId { pub(crate) id: ArtifactId, pub(crate) path: PathBuf, + pub(crate) checksum: ArtifactChecksum, } impl ArtifactPathId { - pub(crate) fn new(artifact_id: ArtifactId, path: &Path) -> Self { - Self { id: artifact_id, path: path.to_owned() } + pub(crate) fn new(artifact_id: ArtifactId, path: &Path, checksum: ArtifactChecksum) -> Self { + Self { id: artifact_id, path: path.to_owned(), checksum } } } @@ -135,6 +136,8 @@ pub enum ArtifactState { /// That means that the artifact should be accessible through the path obtained by the artifact /// id (unless, it was removed externally). Prepared { + /// The checksum of the compiled artifact. + checksum: ArtifactChecksum, /// The path of the compiled artifact. path: PathBuf, /// The time when the artifact was last needed. @@ -212,6 +215,21 @@ impl Artifacts { self.inner.keys().cloned().collect() } + #[cfg(feature = "test-utils")] + pub fn replace_artifact_checksum( + &mut self, + checksum: ArtifactChecksum, + new_checksum: ArtifactChecksum, + ) { + for artifact in self.inner.values_mut() { + if let ArtifactState::Prepared { checksum: c, .. } = artifact { + if *c == checksum { + *c = new_checksum; + } + } + } + } + /// Create an empty table and the cache directory on-disk if it doesn't exist. pub async fn new(cache_path: &Path) -> Self { // Make sure that the cache path directory and all its parents are created. @@ -265,13 +283,14 @@ impl Artifacts { &mut self, artifact_id: ArtifactId, path: PathBuf, + checksum: ArtifactChecksum, last_time_needed: SystemTime, size: u64, ) { // See the precondition. always!(self .inner - .insert(artifact_id, ArtifactState::Prepared { path, last_time_needed, size }) + .insert(artifact_id, ArtifactState::Prepared { path, checksum, last_time_needed, size }) .is_none()); } @@ -376,18 +395,21 @@ mod tests { artifacts.insert_prepared( artifact_id1.clone(), path1.clone(), + Default::default(), mock_now - Duration::from_secs(5), 1024, ); artifacts.insert_prepared( artifact_id2.clone(), path2.clone(), + Default::default(), mock_now - Duration::from_secs(10), 1024, ); artifacts.insert_prepared( artifact_id3.clone(), path3.clone(), + Default::default(), mock_now - Duration::from_secs(15), 1024, ); @@ -421,18 +443,21 @@ mod tests { artifacts.insert_prepared( artifact_id1.clone(), path1.clone(), + Default::default(), mock_now - Duration::from_secs(5), 1024, ); artifacts.insert_prepared( artifact_id2.clone(), path2.clone(), + Default::default(), mock_now - Duration::from_secs(10), 1024, ); artifacts.insert_prepared( artifact_id3.clone(), path3.clone(), + Default::default(), mock_now - Duration::from_secs(15), 1024, ); diff --git a/polkadot/node/core/pvf/src/error.rs b/polkadot/node/core/pvf/src/error.rs index e68ba595ef5a1..f00956ab336be 100644 --- a/polkadot/node/core/pvf/src/error.rs +++ b/polkadot/node/core/pvf/src/error.rs @@ -98,6 +98,9 @@ pub enum PossiblyInvalidError { /// Possibly related to local issues or dirty node update. May be retried with re-preparation. #[error("possibly invalid: runtime construction: {0}")] RuntimeConstruction(String), + /// The artifact is corrupted, re-prepare the artifact and try again. + #[error("possibly invalid: artifact is corrupted")] + CorruptedArtifact, } impl From for ValidationError { diff --git a/polkadot/node/core/pvf/src/execute/queue.rs b/polkadot/node/core/pvf/src/execute/queue.rs index 69355b8fd55df..3464e0d990859 100644 --- a/polkadot/node/core/pvf/src/execute/queue.rs +++ b/polkadot/node/core/pvf/src/execute/queue.rs @@ -503,6 +503,26 @@ async fn handle_job_finish( None, ) }, + Ok(WorkerInterfaceResponse { + worker_response: WorkerResponse { job_response: JobResponse::CorruptedArtifact, .. }, + idle_worker, + }) => { + let (tx, rx) = oneshot::channel(); + queue + .from_queue_tx + .unbounded_send(FromQueue::RemoveArtifact { + artifact: artifact_id.clone(), + reply_to: tx, + }) + .expect("from execute queue receiver is listened by the host; qed"); + ( + Some(idle_worker), + Err(ValidationError::PossiblyInvalid(PossiblyInvalidError::CorruptedArtifact)), + None, + Some(rx), + None, + ) + }, Err(WorkerInterfaceError::InternalError(err)) | Err(WorkerInterfaceError::WorkerError(WorkerError::InternalError(err))) => @@ -906,7 +926,11 @@ mod tests { }); let pov = Arc::new(PoV { block_data: BlockData(b"pov".to_vec()) }); ExecuteJob { - artifact: ArtifactPathId { id: artifact_id(0), path: PathBuf::new() }, + artifact: ArtifactPathId { + id: artifact_id(0), + path: PathBuf::new(), + checksum: Default::default(), + }, exec_timeout: Duration::from_secs(10), exec_kind: PvfExecKind::Approval, pvd, @@ -1070,7 +1094,11 @@ mod tests { let mut result_rxs = vec![]; let (result_tx, _result_rx) = oneshot::channel(); let relevant_job = ExecuteJob { - artifact: ArtifactPathId { id: artifact_id(0), path: PathBuf::new() }, + artifact: ArtifactPathId { + id: artifact_id(0), + path: PathBuf::new(), + checksum: Default::default(), + }, exec_timeout: Duration::from_secs(1), exec_kind: PvfExecKind::Backing(relevant_relay_parent), pvd: Arc::new(PersistedValidationData::default()), @@ -1083,7 +1111,11 @@ mod tests { for _ in 0..10 { let (result_tx, result_rx) = oneshot::channel(); let expired_job = ExecuteJob { - artifact: ArtifactPathId { id: artifact_id(0), path: PathBuf::new() }, + artifact: ArtifactPathId { + id: artifact_id(0), + path: PathBuf::new(), + checksum: Default::default(), + }, exec_timeout: Duration::from_secs(1), exec_kind: PvfExecKind::Backing(old_relay_parent), pvd: Arc::new(PersistedValidationData::default()), diff --git a/polkadot/node/core/pvf/src/execute/worker_interface.rs b/polkadot/node/core/pvf/src/execute/worker_interface.rs index 77bd6bedd75c7..545d7c6f568bb 100644 --- a/polkadot/node/core/pvf/src/execute/worker_interface.rs +++ b/polkadot/node/core/pvf/src/execute/worker_interface.rs @@ -30,7 +30,7 @@ use futures_timer::Delay; use polkadot_node_core_pvf_common::{ error::InternalValidationError, execute::{Handshake, WorkerError, WorkerResponse}, - worker_dir, SecurityStatus, + worker_dir, ArtifactChecksum, SecurityStatus, }; use polkadot_node_primitives::PoV; use polkadot_primitives::{ExecutorParams, PersistedValidationData}; @@ -139,16 +139,18 @@ pub async fn start_work( ); with_worker_dir_setup(worker_dir, pid, &artifact.path, |worker_dir| async move { - send_request(&mut stream, pvd, pov, execution_timeout).await.map_err(|error| { - gum::warn!( - target: LOG_TARGET, - worker_pid = %pid, - validation_code_hash = ?artifact.id.code_hash, - "failed to send an execute request: {}", - error, - ); - Error::InternalError(InternalValidationError::HostCommunication(error.to_string())) - })?; + send_request(&mut stream, pvd, pov, execution_timeout, artifact.checksum) + .await + .map_err(|error| { + gum::warn!( + target: LOG_TARGET, + worker_pid = %pid, + validation_code_hash = ?artifact.id.code_hash, + "failed to send an execute request: {}", + error, + ); + Error::InternalError(InternalValidationError::HostCommunication(error.to_string())) + })?; // We use a generous timeout here. This is in addition to the one in the child process, in // case the child stalls. We have a wall clock timeout here in the host, but a CPU timeout @@ -291,10 +293,12 @@ async fn send_request( pvd: Arc, pov: Arc, execution_timeout: Duration, + artifact_checksum: ArtifactChecksum, ) -> io::Result<()> { framed_send(stream, &pvd.encode()).await?; framed_send(stream, &pov.encode()).await?; - framed_send(stream, &execution_timeout.encode()).await + framed_send(stream, &execution_timeout.encode()).await?; + framed_send(stream, &artifact_checksum.encode()).await } async fn recv_result(stream: &mut UnixStream) -> io::Result> { diff --git a/polkadot/node/core/pvf/src/host.rs b/polkadot/node/core/pvf/src/host.rs index 8252904095b3f..1ab060c69e43b 100644 --- a/polkadot/node/core/pvf/src/host.rs +++ b/polkadot/node/core/pvf/src/host.rs @@ -31,6 +31,8 @@ use futures::{ channel::{mpsc, oneshot}, Future, FutureExt, SinkExt, StreamExt, }; +#[cfg(feature = "test-utils")] +use polkadot_node_core_pvf_common::ArtifactChecksum; use polkadot_node_core_pvf_common::{ error::{PrecheckResult, PrepareError}, prepare::PrepareSuccess, @@ -159,13 +161,41 @@ impl ValidationHost { .await .map_err(|_| "the inner loop hung up".to_string()) } + + /// Replace the artifact checksum with a new one. + /// + /// Only for test purposes to imitate a corruption of the artifact on disk. + #[cfg(feature = "test-utils")] + pub async fn replace_artifact_checksum( + &mut self, + checksum: ArtifactChecksum, + new_checksum: ArtifactChecksum, + ) -> Result<(), String> { + self.to_host_tx + .send(ToHost::ReplaceArtifactChecksum { checksum, new_checksum }) + .await + .map_err(|_| "the inner loop hung up".to_string()) + } } enum ToHost { - PrecheckPvf { pvf: PvfPrepData, result_tx: PrecheckResultSender }, + PrecheckPvf { + pvf: PvfPrepData, + result_tx: PrecheckResultSender, + }, ExecutePvf(ExecutePvfInputs), - HeadsUp { active_pvfs: Vec }, - UpdateActiveLeaves { update: ActiveLeavesUpdate, ancestors: Vec }, + HeadsUp { + active_pvfs: Vec, + }, + UpdateActiveLeaves { + update: ActiveLeavesUpdate, + ancestors: Vec, + }, + #[cfg(feature = "test-utils")] + ReplaceArtifactChecksum { + checksum: ArtifactChecksum, + new_checksum: ArtifactChecksum, + }, } struct ExecutePvfInputs { @@ -507,6 +537,10 @@ async fn handle_to_host( handle_heads_up(artifacts, prepare_queue, active_pvfs).await?, ToHost::UpdateActiveLeaves { update, ancestors } => handle_update_active_leaves(execute_queue, update, ancestors).await?, + #[cfg(feature = "test-utils")] + ToHost::ReplaceArtifactChecksum { checksum, new_checksum } => { + artifacts.replace_artifact_checksum(checksum, new_checksum); + }, } Ok(()) @@ -573,7 +607,7 @@ async fn handle_execute_pvf( if let Some(state) = artifacts.artifact_state_mut(&artifact_id) { match state { - ArtifactState::Prepared { ref path, last_time_needed, .. } => { + ArtifactState::Prepared { ref path, checksum, last_time_needed, .. } => { let file_metadata = std::fs::metadata(path); if file_metadata.is_ok() { @@ -583,7 +617,7 @@ async fn handle_execute_pvf( send_execute( execute_queue, execute::ToQueue::Enqueue { - artifact: ArtifactPathId::new(artifact_id, path), + artifact: ArtifactPathId::new(artifact_id, path, *checksum), pending_execution_request: PendingExecutionRequest { exec_timeout, pvd, @@ -827,8 +861,8 @@ async fn handle_prepare_done( continue } - let path = match &result { - Ok(success) => success.path.clone(), + let (path, checksum) = match &result { + Ok(success) => (success.path.clone(), success.checksum), Err(error) => { let _ = result_tx.send(Err(ValidationError::from(error.clone()))); continue @@ -838,7 +872,7 @@ async fn handle_prepare_done( send_execute( execute_queue, execute::ToQueue::Enqueue { - artifact: ArtifactPathId::new(artifact_id.clone(), &path), + artifact: ArtifactPathId::new(artifact_id.clone(), &path, checksum), pending_execution_request: PendingExecutionRequest { exec_timeout, pvd, @@ -853,8 +887,8 @@ async fn handle_prepare_done( } *state = match result { - Ok(PrepareSuccess { path, size, .. }) => - ArtifactState::Prepared { path, last_time_needed: SystemTime::now(), size }, + Ok(PrepareSuccess { checksum, path, size, .. }) => + ArtifactState::Prepared { checksum, path, last_time_needed: SystemTime::now(), size }, Err(error) => { let last_time_failed = SystemTime::now(); let num_failures = *num_failures + 1; @@ -1239,8 +1273,20 @@ pub(crate) mod tests { builder.cleanup_config = ArtifactsCleanupConfig::new(1024, Duration::from_secs(0)); let path1 = generate_artifact_path(cache_path); let path2 = generate_artifact_path(cache_path); - builder.artifacts.insert_prepared(artifact_id(1), path1.clone(), mock_now, 1024); - builder.artifacts.insert_prepared(artifact_id(2), path2.clone(), mock_now, 1024); + builder.artifacts.insert_prepared( + artifact_id(1), + path1.clone(), + Default::default(), + mock_now, + 1024, + ); + builder.artifacts.insert_prepared( + artifact_id(2), + path2.clone(), + Default::default(), + mock_now, + 1024, + ); let mut test = builder.build(); let mut host = test.host_handle(); diff --git a/polkadot/node/core/pvf/src/prepare/worker_interface.rs b/polkadot/node/core/pvf/src/prepare/worker_interface.rs index 718416e8be76a..04044ab677c3e 100644 --- a/polkadot/node/core/pvf/src/prepare/worker_interface.rs +++ b/polkadot/node/core/pvf/src/prepare/worker_interface.rs @@ -209,7 +209,7 @@ async fn handle_response( // TODO: Add `checksum` to `ArtifactPathId`. See: // https://github.com/paritytech/polkadot-sdk/issues/2399 let PrepareWorkerSuccess { - checksum: _, + checksum, stats: PrepareStats { cpu_time_elapsed, memory_stats, observed_wasm_code_len }, } = match result.clone() { Ok(result) => result, @@ -266,6 +266,7 @@ async fn handle_response( Ok(()) => Outcome::Concluded { worker, result: Ok(PrepareSuccess { + checksum, path: artifact_path, size, stats: PrepareStats { diff --git a/polkadot/node/core/pvf/tests/it/main.rs b/polkadot/node/core/pvf/tests/it/main.rs index 9b24e7b64c89c..46dd98d92bc7d 100644 --- a/polkadot/node/core/pvf/tests/it/main.rs +++ b/polkadot/node/core/pvf/tests/it/main.rs @@ -24,6 +24,7 @@ use polkadot_node_core_pvf::{ PossiblyInvalidError, PrepareError, PrepareJobKind, PvfPrepData, ValidationError, ValidationHost, JOB_TIMEOUT_WALL_CLOCK_FACTOR, }; +use polkadot_node_core_pvf_common::{compute_checksum, ArtifactChecksum}; use polkadot_node_primitives::{PoV, POV_BOMB_LIMIT}; use polkadot_node_subsystem::messages::PvfExecKind; use polkadot_parachain_primitives::primitives::{BlockData, ValidationResult}; @@ -138,6 +139,19 @@ impl TestHost { result_rx.await.unwrap() } + async fn replace_artifact_checksum( + &self, + checksum: ArtifactChecksum, + new_checksum: ArtifactChecksum, + ) { + self.host + .lock() + .await + .replace_artifact_checksum(checksum, new_checksum) + .await + .unwrap(); + } + #[cfg(all(feature = "ci-only-tests", target_os = "linux"))] async fn security_status(&self) -> SecurityStatus { self.host.lock().await.security_status.clone() @@ -386,9 +400,10 @@ async fn deleting_prepared_artifact_does_not_dispute() { assert_matches!(result, Err(ValidationError::Invalid(InvalidCandidate::HardTimeout))); } -// Test that corruption of a prepared artifact does not lead to a dispute when we try to execute it. +// Test that corruption of a prepared artifact due to disk issues does not lead to a dispute when we +// try to execute it. #[tokio::test] -async fn corrupted_prepared_artifact_does_not_dispute() { +async fn corrupted_on_disk_prepared_artifact_does_not_dispute() { let host = TestHost::new().await; let cache_dir = host.cache_dir.path(); let pvd = PersistedValidationData { @@ -429,6 +444,95 @@ async fn corrupted_prepared_artifact_does_not_dispute() { assert!(artifact_path.path().exists()); + // Try to validate, artifact should get removed because of the corruption. + let result = host + .validate_candidate( + test_parachain_halt::wasm_binary_unwrap(), + pvd, + pov, + Default::default(), + H256::default(), + ) + .await; + + assert_matches!( + result, + Err(ValidationError::PossiblyInvalid(PossiblyInvalidError::CorruptedArtifact)) + ); + + // because of CorruptedArtifact we may retry + host.precheck_pvf(test_parachain_halt::wasm_binary_unwrap(), Default::default()) + .await + .unwrap(); + + // The actual artifact removal is done concurrently + // with sending of the result of the execution + // it is not a problem for further re-preparation as + // artifact filenames are random + for _ in 1..5 { + if !artifact_path.path().exists() { + break; + } + tokio::time::sleep(Duration::from_secs(1)).await; + } + + assert!( + !artifact_path.path().exists(), + "the corrupted artifact ({}) should be deleted by the host", + artifact_path.path().display() + ); +} + +// Test that corruption of a prepared artifact does not lead to a dispute when we try to execute it. +#[tokio::test] +async fn corrupted_prepared_artifact_does_not_dispute() { + let host = TestHost::new().await; + let cache_dir = host.cache_dir.path(); + let pvd = PersistedValidationData { + parent_head: Default::default(), + relay_parent_number: 1u32, + relay_parent_storage_root: H256::default(), + max_pov_size: 4096 * 1024, + }; + let pov = PoV { block_data: BlockData(Vec::new()) }; + + let _stats = host + .precheck_pvf(test_parachain_halt::wasm_binary_unwrap(), Default::default()) + .await + .unwrap(); + + // Manually corrupting the prepared artifact from disk. The in-memory artifacts table won't + // change. + let (artifact_path, checksum, new_checksum) = { + // Get the artifact path (asserting it exists). + let mut cache_dir: Vec<_> = std::fs::read_dir(cache_dir).unwrap().collect(); + // Should contain the artifact and the worker dir. + assert_eq!(cache_dir.len(), 2); + let mut artifact_path = cache_dir.pop().unwrap().unwrap(); + if artifact_path.path().is_dir() { + artifact_path = cache_dir.pop().unwrap().unwrap(); + } + + let checksum = + compute_checksum(&std::fs::read(artifact_path.path()).expect("artifact exists")); + let new_artifact = b"corrupted wasm"; + let new_checksum = compute_checksum(new_artifact); + + // Corrupt the artifact. + let mut f = std::fs::OpenOptions::new() + .write(true) + .truncate(true) + .open(artifact_path.path()) + .unwrap(); + f.write_all(new_artifact).unwrap(); + f.flush().unwrap(); + (artifact_path, checksum, new_checksum) + }; + + assert!(artifact_path.path().exists()); + + host.replace_artifact_checksum(checksum, new_checksum).await; + // Try to validate, artifact should get removed because of the corruption. let result = host .validate_candidate( diff --git a/prdoc/pr_8833.prdoc b/prdoc/pr_8833.prdoc new file mode 100644 index 0000000000000..e3d82d324bc58 --- /dev/null +++ b/prdoc/pr_8833.prdoc @@ -0,0 +1,15 @@ +title: 'Check artifact integrity before execution' +doc: +- audience: Node Dev + description: In case of a corrupted artifact, we can find it out before execution and re-prepare the artifact. +crates: +- name: polkadot-node-core-pvf-common + bump: major +- name: polkadot-node-core-pvf + bump: major +- name: polkadot-node-core-pvf-prepare-worker + bump: minor +- name: polkadot-node-core-pvf-execute-worker + bump: minor +- name: polkadot-node-core-candidate-validation + bump: minor From 7b03c8b83e0eadbce1de2fc191d13a08e5aba791 Mon Sep 17 00:00:00 2001 From: "paritytech-release-backport-bot[bot]" <191369287+paritytech-release-backport-bot[bot]@users.noreply.github.com> Date: Mon, 23 Jun 2025 15:15:52 +0000 Subject: [PATCH 009/128] [stable2506] Backport #8816 (#8826) Backport #8816 into `stable2506` from iulianbarbu. See the [documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md) on how to use this bot. Signed-off-by: Iulian Barbu Co-authored-by: Iulian Barbu <14218860+iulianbarbu@users.noreply.github.com> --- .github/scripts/release/build-macos-release.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/scripts/release/build-macos-release.sh b/.github/scripts/release/build-macos-release.sh index ba6dcc65d6509..4edb6746d73f5 100755 --- a/.github/scripts/release/build-macos-release.sh +++ b/.github/scripts/release/build-macos-release.sh @@ -14,12 +14,17 @@ PROFILE=${PROFILE:-production} # write, so make it relative to github workspace. ARTIFACTS=$GITHUB_WORKSPACE/artifacts/$BIN VERSION=$(git tag -l --contains HEAD | grep -E "^v.*") +# must be given as feature1,feature2,feature3... +FEATURES=$3 +if [ -n "$FEATURES" ]; then + FEATURES="--features ${FEATURES}" +fi echo "Artifacts will be copied into $ARTIFACTS" mkdir -p "$ARTIFACTS" git log --pretty=oneline -n 1 -time cargo build --profile $PROFILE --locked --verbose --bin $BIN --package $PACKAGE +time cargo build --profile $PROFILE --locked --verbose --bin $BIN --package $PACKAGE $FEATURES echo "Artifact target: $ARTIFACTS" From 16ff6dbe67162b048ac308d8a2bacc6f449c26fb Mon Sep 17 00:00:00 2001 From: "paritytech-release-backport-bot[bot]" <191369287+paritytech-release-backport-bot[bot]@users.noreply.github.com> Date: Wed, 25 Jun 2025 11:12:21 +0200 Subject: [PATCH 010/128] [stable2506] Backport #8787 (#8914) Backport #8787 into `stable2506` from karolk91. See the [documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md) on how to use this bot. Co-authored-by: Karol Kokoszka Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Branislav Kontur --- Cargo.lock | 21 ++ Cargo.toml | 1 + .../emulated/common/Cargo.toml | 2 + .../emulated/common/src/macros.rs | 16 ++ .../emulated/common/src/xcm_helpers.rs | 70 +++++ .../tests/governance/westend/Cargo.toml | 32 +++ .../tests/governance/westend/src/common.rs | 54 ++++ .../tests/governance/westend/src/lib.rs | 33 +++ .../westend/src/open_gov_on_relay.rs | 247 ++++++++++++++++++ prdoc/pr_8787.prdoc | 13 + .../frame/system/benchmarking/src/inner.rs | 2 +- substrate/frame/system/src/lib.rs | 10 + substrate/frame/system/src/tests.rs | 2 +- 13 files changed, 501 insertions(+), 2 deletions(-) create mode 100644 cumulus/parachains/integration-tests/emulated/tests/governance/westend/Cargo.toml create mode 100644 cumulus/parachains/integration-tests/emulated/tests/governance/westend/src/common.rs create mode 100644 cumulus/parachains/integration-tests/emulated/tests/governance/westend/src/lib.rs create mode 100644 cumulus/parachains/integration-tests/emulated/tests/governance/westend/src/open_gov_on_relay.rs create mode 100644 prdoc/pr_8787.prdoc diff --git a/Cargo.lock b/Cargo.lock index 56a294a5eae36..29d6b6ed5abb9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5872,12 +5872,14 @@ dependencies = [ "cumulus-pallet-xcmp-queue", "cumulus-primitives-core", "frame-support", + "frame-system", "hex-literal", "pallet-asset-conversion", "pallet-assets", "pallet-balances", "pallet-bridge-messages", "pallet-message-queue", + "pallet-whitelist", "pallet-xcm", "pallet-xcm-bridge-hub", "parachains-common", @@ -7514,6 +7516,25 @@ dependencies = [ "testnet-parachains-constants", ] +[[package]] +name = "governance-westend-integration-tests" +version = "0.0.0" +dependencies = [ + "collectives-westend-runtime", + "emulated-integration-tests-common", + "frame-support", + "frame-system", + "pallet-utility", + "pallet-whitelist", + "pallet-xcm", + "parity-scale-codec", + "sp-core 28.0.0", + "sp-runtime 31.0.1", + "staging-xcm", + "westend-runtime", + "westend-system-emulated-network", +] + [[package]] name = "governor" version = "0.6.0" diff --git a/Cargo.toml b/Cargo.toml index 3b8d5374be6ec..85dc656481aa1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -112,6 +112,7 @@ members = [ "cumulus/parachains/integration-tests/emulated/tests/collectives/collectives-westend", "cumulus/parachains/integration-tests/emulated/tests/coretime/coretime-rococo", "cumulus/parachains/integration-tests/emulated/tests/coretime/coretime-westend", + "cumulus/parachains/integration-tests/emulated/tests/governance/westend", "cumulus/parachains/integration-tests/emulated/tests/people/people-rococo", "cumulus/parachains/integration-tests/emulated/tests/people/people-westend", "cumulus/parachains/pallets/collective-content", diff --git a/cumulus/parachains/integration-tests/emulated/common/Cargo.toml b/cumulus/parachains/integration-tests/emulated/common/Cargo.toml index 4ff6ed6763f25..9b64325237699 100644 --- a/cumulus/parachains/integration-tests/emulated/common/Cargo.toml +++ b/cumulus/parachains/integration-tests/emulated/common/Cargo.toml @@ -18,10 +18,12 @@ paste = { workspace = true, default-features = true } # Substrate frame-support = { workspace = true, default-features = true } +frame-system = { workspace = true, default-features = true } pallet-asset-conversion = { workspace = true, default-features = true } pallet-assets = { workspace = true, default-features = true } pallet-balances = { workspace = true, default-features = true } pallet-message-queue = { workspace = true, default-features = true } +pallet-whitelist = { workspace = true, default-features = true } sc-consensus-grandpa = { workspace = true, default-features = true } sp-authority-discovery = { workspace = true, default-features = true } sp-consensus-babe = { workspace = true, default-features = true } diff --git a/cumulus/parachains/integration-tests/emulated/common/src/macros.rs b/cumulus/parachains/integration-tests/emulated/common/src/macros.rs index 2e5dcc6f0551a..bc162a9c0f860 100644 --- a/cumulus/parachains/integration-tests/emulated/common/src/macros.rs +++ b/cumulus/parachains/integration-tests/emulated/common/src/macros.rs @@ -21,6 +21,7 @@ pub use pallet_asset_conversion; pub use pallet_assets; pub use pallet_balances; pub use pallet_message_queue; +pub use pallet_whitelist; pub use pallet_xcm; pub use frame_support::assert_ok; @@ -1113,3 +1114,18 @@ macro_rules! create_pool_with_native_on { } }; } + +#[macro_export] +macro_rules! assert_whitelisted { + ($chain:ident, $expected_call_hash:expr) => { + type RuntimeEvent = <$chain as $crate::macros::Chain>::RuntimeEvent; + $crate::macros::assert_expected_events!( + $chain, + vec![ + RuntimeEvent::Whitelist($crate::macros::pallet_whitelist::Event::CallWhitelisted { call_hash }) => { + call_hash: *call_hash == $expected_call_hash, + }, + ] + ); + }; +} diff --git a/cumulus/parachains/integration-tests/emulated/common/src/xcm_helpers.rs b/cumulus/parachains/integration-tests/emulated/common/src/xcm_helpers.rs index 309a62ec1e12f..a990e70434b1e 100644 --- a/cumulus/parachains/integration-tests/emulated/common/src/xcm_helpers.rs +++ b/cumulus/parachains/integration-tests/emulated/common/src/xcm_helpers.rs @@ -21,6 +21,11 @@ use sp_core::H256; use xcm::{prelude::*, DoubleEncoded}; use xcm_emulator::Chain; +use crate::impls::{bx, Encode}; +use frame_support::dispatch::{DispatchResultWithPostInfo, PostDispatchInfo}; +use sp_runtime::traits::{Dispatchable, Hash}; +use xcm::{VersionedLocation, VersionedXcm}; + /// Helper method to build a XCM with a `Transact` instruction and paying for its execution pub fn xcm_transact_paid_execution( call: DoubleEncoded<()>, @@ -112,3 +117,68 @@ where { pallet_xcm::xcm_helpers::find_xcm_sent_message_id::<::Runtime>(C::events()) } + +/// Wraps a runtime call in a whitelist preimage call and dispatches it +pub fn dispatch_whitelisted_call_with_preimage( + call: T::RuntimeCall, + origin: T::RuntimeOrigin, +) -> DispatchResultWithPostInfo +where + T: Chain, + T::Runtime: pallet_whitelist::Config, + T::RuntimeCall: From> + + Into<::RuntimeCall> + + Dispatchable, +{ + T::execute_with(|| { + let whitelist_call: T::RuntimeCall = + pallet_whitelist::Call::::dispatch_whitelisted_call_with_preimage { + call: Box::new(call.into()), + } + .into(); + whitelist_call.dispatch(origin) + }) +} + +/// Builds a `pallet_xcm::send` call to authorize an upgrade at the provided location, +/// wrapped in an unpaid XCM `Transact` with `OriginKind::Superuser`. +pub fn build_xcm_send_authorize_upgrade_call( + location: Location, + code_hash: &H256, + fallback_max_weight: Option, +) -> T::RuntimeCall +where + T: Chain, + T::Runtime: pallet_xcm::Config, + T::RuntimeCall: Encode + From>, + D: Chain, + D::Runtime: frame_system::Config, + D::RuntimeCall: Encode + From>, +{ + let transact_call: D::RuntimeCall = + frame_system::Call::authorize_upgrade { code_hash: *code_hash }.into(); + + let call: T::RuntimeCall = pallet_xcm::Call::send { + dest: bx!(VersionedLocation::from(location)), + message: bx!(VersionedXcm::from(Xcm(vec![ + UnpaidExecution { weight_limit: Unlimited, check_origin: None }, + Transact { + origin_kind: OriginKind::Superuser, + fallback_max_weight, + call: transact_call.encode().into(), + } + ]))), + } + .into(); + call +} + +/// Encodes a runtime call and returns its H256 hash +pub fn call_hash_of(call: &T::RuntimeCall) -> H256 +where + T: Chain, + T::Runtime: frame_system::Config, + T::RuntimeCall: Encode, +{ + ::Hashing::hash_of(&call) +} diff --git a/cumulus/parachains/integration-tests/emulated/tests/governance/westend/Cargo.toml b/cumulus/parachains/integration-tests/emulated/tests/governance/westend/Cargo.toml new file mode 100644 index 0000000000000..fe57924de231c --- /dev/null +++ b/cumulus/parachains/integration-tests/emulated/tests/governance/westend/Cargo.toml @@ -0,0 +1,32 @@ +[package] +name = "governance-westend-integration-tests" +version = "0.0.0" +authors.workspace = true +edition.workspace = true +license = "Apache-2.0" +description = "Westend governance integration tests with xcm-emulator" +publish = false + +[lints] +workspace = true + +[dependencies] +codec = { workspace = true, default-features = true } + +# Substrate +frame-support = { workspace = true, default-features = true } +frame-system = { workspace = true, default-features = true } +pallet-utility = { workspace = true, default-features = true } +pallet-whitelist = { workspace = true, default-features = true } +sp-core = { workspace = true, default-features = true } +sp-runtime = { workspace = true, default-features = true } + +pallet-xcm = { workspace = true, default-features = true } +xcm = { workspace = true, default-features = true } + +emulated-integration-tests-common = { workspace = true } + +# Local +collectives-westend-runtime = { workspace = true } +westend-runtime = { workspace = true } +westend-system-emulated-network = { workspace = true } diff --git a/cumulus/parachains/integration-tests/emulated/tests/governance/westend/src/common.rs b/cumulus/parachains/integration-tests/emulated/tests/governance/westend/src/common.rs new file mode 100644 index 0000000000000..b0e01c03b189b --- /dev/null +++ b/cumulus/parachains/integration-tests/emulated/tests/governance/westend/src/common.rs @@ -0,0 +1,54 @@ +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +use crate::imports::*; + +/// CollectivesWestend dispatches `pallet_xcm::send` with `OriginKind:Xcm` to the dest with encoded +/// whitelist call. +#[cfg(test)] +pub fn collectives_send_whitelist( + dest: Location, + encoded_whitelist_call: impl FnOnce() -> Vec, +) { + CollectivesWestend::execute_with(|| { + type RuntimeEvent = ::RuntimeEvent; + type RuntimeCall = ::RuntimeCall; + type RuntimeOrigin = ::RuntimeOrigin; + type Runtime = ::Runtime; + + let send_whitelist_call = RuntimeCall::PolkadotXcm(pallet_xcm::Call::::send { + dest: bx!(VersionedLocation::from(dest)), + message: bx!(VersionedXcm::from(Xcm(vec![ + UnpaidExecution { weight_limit: Unlimited, check_origin: None }, + Transact { + origin_kind: OriginKind::Xcm, + fallback_max_weight: None, + call: encoded_whitelist_call().into(), + } + ]))), + }); + + use collectives_westend_runtime::fellowship::pallet_fellowship_origins::Origin::Fellows as FellowsOrigin; + let fellows_origin: RuntimeOrigin = FellowsOrigin.into(); + assert_ok!(send_whitelist_call.dispatch(fellows_origin)); + assert_expected_events!( + CollectivesWestend, + vec![ + RuntimeEvent::PolkadotXcm(pallet_xcm::Event::Sent { .. }) => {}, + ] + ); + }); +} diff --git a/cumulus/parachains/integration-tests/emulated/tests/governance/westend/src/lib.rs b/cumulus/parachains/integration-tests/emulated/tests/governance/westend/src/lib.rs new file mode 100644 index 0000000000000..1c4aa01baccab --- /dev/null +++ b/cumulus/parachains/integration-tests/emulated/tests/governance/westend/src/lib.rs @@ -0,0 +1,33 @@ +// Copyright (C) Parity Technologies and the various Polkadot contributors, see Contributions.md +// for a list of specific contributors. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#[cfg(test)] +mod imports { + pub(crate) use emulated_integration_tests_common::{ + impls::{assert_expected_events, bx, TestExt}, + xcm_emulator::Chain, + }; + pub(crate) use frame_support::assert_ok; + pub(crate) use sp_runtime::traits::Dispatchable; + pub(crate) use westend_system_emulated_network::CollectivesWestendPara as CollectivesWestend; + pub(crate) use xcm::{latest::prelude::*, VersionedLocation, VersionedXcm}; +} + +#[cfg(test)] +mod common; + +#[cfg(test)] +mod open_gov_on_relay; diff --git a/cumulus/parachains/integration-tests/emulated/tests/governance/westend/src/open_gov_on_relay.rs b/cumulus/parachains/integration-tests/emulated/tests/governance/westend/src/open_gov_on_relay.rs new file mode 100644 index 0000000000000..c891578e6ee84 --- /dev/null +++ b/cumulus/parachains/integration-tests/emulated/tests/governance/westend/src/open_gov_on_relay.rs @@ -0,0 +1,247 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +use crate::{common::*, imports::*}; +use codec::Encode; +use emulated_integration_tests_common::{ + assert_whitelisted, + impls::RelayChain, + xcm_emulator::{Chain, Parachain, TestExt}, + xcm_helpers::{ + build_xcm_send_authorize_upgrade_call, call_hash_of, + dispatch_whitelisted_call_with_preimage, + }, +}; +use frame_support::assert_err; +use sp_runtime::DispatchError; +use westend_runtime::governance::pallet_custom_origins::Origin; +use westend_system_emulated_network::{ + AssetHubWestendPara as AssetHubWestend, BridgeHubWestendPara as BridgeHubWestend, + CoretimeWestendPara as CoretimeWestend, PeopleWestendPara as PeopleWestend, + WestendRelay as Westend, +}; + +use westend_system_emulated_network::westend_emulated_chain::westend_runtime::Dmp; + +#[test] +fn relaychain_can_authorize_upgrade_for_itself() { + let code_hash = [1u8; 32].into(); + type WestendRuntime = ::Runtime; + type WestendRuntimeCall = ::RuntimeCall; + type WestendRuntimeOrigin = ::RuntimeOrigin; + + let authorize_upgrade = + WestendRuntimeCall::Utility(pallet_utility::Call::::force_batch { + calls: vec![ + // upgrade the relaychain + WestendRuntimeCall::System(frame_system::Call::authorize_upgrade { code_hash }), + ], + }); + + // bad origin + let invalid_origin: WestendRuntimeOrigin = Origin::StakingAdmin.into(); + // ok origin + let ok_origin: WestendRuntimeOrigin = Origin::WhitelistedCaller.into(); + + let call_hash = call_hash_of::(&authorize_upgrade); + + // Err - when dispatch non-whitelisted + assert_err!( + dispatch_whitelisted_call_with_preimage::( + authorize_upgrade.clone(), + ok_origin.clone() + ), + DispatchError::Module(sp_runtime::ModuleError { + index: 36, + error: [3, 0, 0, 0], + message: Some("CallIsNotWhitelisted") + }) + ); + + // whitelist + collectives_send_whitelist(Location::parent(), || { + WestendRuntimeCall::Whitelist(pallet_whitelist::Call::::whitelist_call { + call_hash, + }) + .encode() + }); + + // Err - when dispatch wrong origin + assert_err!( + dispatch_whitelisted_call_with_preimage::( + authorize_upgrade.clone(), + invalid_origin + ), + DispatchError::BadOrigin + ); + + // check before + Westend::execute_with(|| assert!(::System::authorized_upgrade().is_none())); + + // ok - authorized + assert_ok!(dispatch_whitelisted_call_with_preimage::(authorize_upgrade, ok_origin)); + + // check after - authorized + Westend::execute_with(|| { + assert_eq!( + ::System::authorized_upgrade().unwrap().code_hash(), + &code_hash + ) + }); +} + +#[test] +fn relaychain_can_authorize_upgrade_for_system_chains() { + type WestendRuntime = ::Runtime; + type WestendRuntimeCall = ::RuntimeCall; + type WestendRuntimeOrigin = ::RuntimeOrigin; + + Westend::execute_with(|| { + Dmp::make_parachain_reachable(AssetHubWestend::para_id()); + Dmp::make_parachain_reachable(BridgeHubWestend::para_id()); + Dmp::make_parachain_reachable(CollectivesWestend::para_id()); + Dmp::make_parachain_reachable(CoretimeWestend::para_id()); + Dmp::make_parachain_reachable(PeopleWestend::para_id()); + }); + + let code_hash_asset_hub = [1u8; 32].into(); + let code_hash_bridge_hub = [2u8; 32].into(); + let code_hash_collectives = [3u8; 32].into(); + let code_hash_coretime = [4u8; 32].into(); + let code_hash_people = [5u8; 32].into(); + + let authorize_upgrade = + WestendRuntimeCall::Utility(pallet_utility::Call::::force_batch { + calls: vec![ + build_xcm_send_authorize_upgrade_call::( + Westend::child_location_of(AssetHubWestend::para_id()), + &code_hash_asset_hub, + None, + ), + build_xcm_send_authorize_upgrade_call::( + Westend::child_location_of(BridgeHubWestend::para_id()), + &code_hash_bridge_hub, + None, + ), + build_xcm_send_authorize_upgrade_call::( + Westend::child_location_of(CollectivesWestend::para_id()), + &code_hash_collectives, + None, + ), + build_xcm_send_authorize_upgrade_call::( + Westend::child_location_of(CoretimeWestend::para_id()), + &code_hash_coretime, + None, + ), + build_xcm_send_authorize_upgrade_call::( + Westend::child_location_of(PeopleWestend::para_id()), + &code_hash_people, + None, + ), + ], + }); + + // bad origin + let invalid_origin: WestendRuntimeOrigin = Origin::StakingAdmin.into(); + // ok origin + let ok_origin: WestendRuntimeOrigin = Origin::WhitelistedCaller.into(); + + let call_hash = call_hash_of::(&authorize_upgrade); + + // Err - when dispatch non-whitelisted + assert_err!( + dispatch_whitelisted_call_with_preimage::( + authorize_upgrade.clone(), + ok_origin.clone() + ), + DispatchError::Module(sp_runtime::ModuleError { + index: 36, + error: [3, 0, 0, 0], + message: Some("CallIsNotWhitelisted") + }) + ); + + // whitelist + collectives_send_whitelist(Location::parent(), || { + WestendRuntimeCall::Whitelist(pallet_whitelist::Call::::whitelist_call { + call_hash, + }) + .encode() + }); + + Westend::execute_with(|| { + assert_whitelisted!(Westend, call_hash); + }); + + // Err - when dispatch wrong origin + assert_err!( + dispatch_whitelisted_call_with_preimage::( + authorize_upgrade.clone(), + invalid_origin + ), + DispatchError::BadOrigin + ); + + // check before + AssetHubWestend::execute_with(|| { + assert!(::System::authorized_upgrade().is_none()) + }); + BridgeHubWestend::execute_with(|| { + assert!(::System::authorized_upgrade().is_none()) + }); + CollectivesWestend::execute_with(|| { + assert!(::System::authorized_upgrade().is_none()) + }); + CoretimeWestend::execute_with(|| { + assert!(::System::authorized_upgrade().is_none()) + }); + PeopleWestend::execute_with(|| { + assert!(::System::authorized_upgrade().is_none()) + }); + + // ok - authorized + assert_ok!(dispatch_whitelisted_call_with_preimage::(authorize_upgrade, ok_origin)); + + AssetHubWestend::execute_with(|| { + assert_eq!( + ::System::authorized_upgrade().unwrap().code_hash(), + &code_hash_asset_hub + ) + }); + // check after - authorized + BridgeHubWestend::execute_with(|| { + assert_eq!( + ::System::authorized_upgrade().unwrap().code_hash(), + &code_hash_bridge_hub + ) + }); + CollectivesWestend::execute_with(|| { + assert_eq!( + ::System::authorized_upgrade().unwrap().code_hash(), + &code_hash_collectives + ) + }); + CoretimeWestend::execute_with(|| { + assert_eq!( + ::System::authorized_upgrade().unwrap().code_hash(), + &code_hash_coretime + ) + }); + PeopleWestend::execute_with(|| { + assert_eq!( + ::System::authorized_upgrade().unwrap().code_hash(), + &code_hash_people + ) + }); +} diff --git a/prdoc/pr_8787.prdoc b/prdoc/pr_8787.prdoc new file mode 100644 index 0000000000000..e0a30183a0114 --- /dev/null +++ b/prdoc/pr_8787.prdoc @@ -0,0 +1,13 @@ +title: Westend governance authorize_upgrade integration tests +doc: +- audience: Runtime Dev + description: |- + Integration tests covering `authorize_upgrade` with whitelisting via Collectives for Westend network + +crates: +- name: emulated-integration-tests-common + bump: minor +- name: frame-system + bump: minor +- name: frame-system-benchmarking + bump: patch \ No newline at end of file diff --git a/substrate/frame/system/benchmarking/src/inner.rs b/substrate/frame/system/benchmarking/src/inner.rs index 0fb592f3dbba7..72131c66caf0f 100644 --- a/substrate/frame/system/benchmarking/src/inner.rs +++ b/substrate/frame/system/benchmarking/src/inner.rs @@ -205,7 +205,7 @@ mod benchmarks { #[extrinsic_call] authorize_upgrade(RawOrigin::Root, hash); - assert!(System::::authorized_upgrade().is_some()); + assert_eq!(System::::authorized_upgrade().unwrap().code_hash(), &hash); Ok(()) } diff --git a/substrate/frame/system/src/lib.rs b/substrate/frame/system/src/lib.rs index 06253efc0104e..21e2d77367906 100644 --- a/substrate/frame/system/src/lib.rs +++ b/substrate/frame/system/src/lib.rs @@ -271,6 +271,16 @@ where check_version: bool, } +#[cfg(any(feature = "std", feature = "runtime-benchmarks", test))] +impl CodeUpgradeAuthorization +where + T: Config, +{ + pub fn code_hash(&self) -> &T::Hash { + &self.code_hash + } +} + /// Information about the dispatch of a call, to be displayed in the /// [`ExtrinsicSuccess`](Event::ExtrinsicSuccess) and [`ExtrinsicFailed`](Event::ExtrinsicFailed) /// events. diff --git a/substrate/frame/system/src/tests.rs b/substrate/frame/system/src/tests.rs index 2c1abfd85fc37..59137f4bf9d46 100644 --- a/substrate/frame/system/src/tests.rs +++ b/substrate/frame/system/src/tests.rs @@ -741,7 +741,7 @@ fn set_code_via_authorization_works() { System::assert_has_event( SysEvent::UpgradeAuthorized { code_hash: hash, check_version: true }.into(), ); - assert!(System::authorized_upgrade().is_some()); + assert_eq!(System::authorized_upgrade().unwrap().code_hash(), &hash); // Can't be sneaky let mut bad_runtime = substrate_test_runtime_client::runtime::wasm_binary_unwrap().to_vec(); From e8308f6a2165b4b15d75c8c47579e528a6ebfbcc Mon Sep 17 00:00:00 2001 From: "paritytech-release-backport-bot[bot]" <191369287+paritytech-release-backport-bot[bot]@users.noreply.github.com> Date: Wed, 25 Jun 2025 12:28:11 +0000 Subject: [PATCH 011/128] [stable2506] Backport #8973 (#8979) Backport #8973 into `stable2506` from AndreiEres. See the [documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md) on how to use this bot. Co-authored-by: Andrei Eres Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- polkadot/node/network/bridge/src/metrics.rs | 22 +++++++++++++++------ prdoc/pr_8973.prdoc | 9 +++++++++ 2 files changed, 25 insertions(+), 6 deletions(-) create mode 100644 prdoc/pr_8973.prdoc diff --git a/polkadot/node/network/bridge/src/metrics.rs b/polkadot/node/network/bridge/src/metrics.rs index 083a2a71aa0f8..91effc88d22ee 100644 --- a/polkadot/node/network/bridge/src/metrics.rs +++ b/polkadot/node/network/bridge/src/metrics.rs @@ -47,12 +47,11 @@ impl Metrics { } pub fn note_peer_count(&self, peer_set: PeerSet, version: ProtocolVersion, count: usize) { - self.0.as_ref().map(|metrics| { - metrics - .peer_count - .with_label_values(&[peer_set_label(peer_set, version)]) - .set(count as u64) - }); + if let Some(metrics) = self.0.as_ref() { + let label = peer_set_label(peer_set, version); + metrics.peer_count.with_label_values(&[label]).set(count as u64); + metrics.peer_connectivity.with_label_values(&[label]).observe(count as f64); + } } pub fn on_notification_received( @@ -131,6 +130,7 @@ impl Metrics { #[derive(Clone)] pub(crate) struct MetricsInner { peer_count: prometheus::GaugeVec, + peer_connectivity: prometheus::HistogramVec, connected_events: prometheus::CounterVec, disconnected_events: prometheus::CounterVec, desired_peer_count: prometheus::GaugeVec, @@ -165,6 +165,16 @@ impl metrics::Metrics for Metrics { )?, registry, )?, + peer_connectivity: prometheus::register( + prometheus::HistogramVec::new( + prometheus::HistogramOpts::new( + "polkadot_parachain_peer_connectivity", + "Histogram of peer counts on a parachain-related peer-set to track connectivity patterns", + ).buckets(vec![0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 10.0, 15.0, 20.0, 25.0, 30.0, 40.0, 50.0, 100.0, 250.0, 500.0, 1000.0]), + &["protocol"] + )?, + registry, + )?, connected_events: prometheus::register( prometheus::CounterVec::new( prometheus::Opts::new( diff --git a/prdoc/pr_8973.prdoc b/prdoc/pr_8973.prdoc new file mode 100644 index 0000000000000..5e43d3b464e79 --- /dev/null +++ b/prdoc/pr_8973.prdoc @@ -0,0 +1,9 @@ +title: Add polkadot_parachain_peer_connectivity metric +doc: +- audience: Node Dev + description: |- + Adds `polkadot_parachain_peer_connectivity` histogram metric to better understand connectivity patterns. + +crates: +- name: polkadot-network-bridge + bump: patch From c2a088e8de1fba277c916df044f82f2886ce7e5b Mon Sep 17 00:00:00 2001 From: "paritytech-release-backport-bot[bot]" <191369287+paritytech-release-backport-bot[bot]@users.noreply.github.com> Date: Wed, 25 Jun 2025 15:29:48 +0000 Subject: [PATCH 012/128] [stable2506] Backport #8596 (#8970) Backport #8596 into `stable2506` from michalkucharczyk. See the [documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md) on how to use this bot. --------- Co-authored-by: Michal Kucharczyk <1728078+michalkucharczyk@users.noreply.github.com> Co-authored-by: Iulian Barbu <14218860+iulianbarbu@users.noreply.github.com> Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Egor_P --- Cargo.lock | 1 + prdoc/pr_8596.prdoc | 8 + substrate/client/transaction-pool/Cargo.toml | 1 + .../client/transaction-pool/benches/basics.rs | 3 +- .../client/transaction-pool/src/common/api.rs | 150 +++- .../client/transaction-pool/src/common/mod.rs | 4 + .../src/common/sliding_stat.rs | 617 ++++++++++++++ .../transaction-pool/src/common/tests.rs | 6 +- .../fork_aware_txpool/fork_aware_txpool.rs | 585 +++++++++----- .../fork_aware_txpool/revalidation_worker.rs | 16 +- .../src/fork_aware_txpool/tx_mem_pool.rs | 671 ++++++++++----- .../tx_mem_pool/tx_mem_pool_map.rs | 764 ++++++++++++++++++ .../src/fork_aware_txpool/view.rs | 32 +- .../src/fork_aware_txpool/view_store.rs | 83 +- .../client/transaction-pool/src/graph/mod.rs | 2 +- .../client/transaction-pool/src/graph/pool.rs | 80 +- .../transaction-pool/src/graph/tracked_map.rs | 22 +- .../src/graph/validated_pool.rs | 36 +- substrate/client/transaction-pool/src/lib.rs | 3 +- .../src/single_state_txpool/revalidation.rs | 29 +- .../single_state_txpool.rs | 11 +- .../client/transaction-pool/tests/fatp.rs | 12 +- .../transaction-pool/tests/fatp_common/mod.rs | 3 +- .../transaction-pool/tests/fatp_invalid.rs | 12 +- .../transaction-pool/tests/fatp_limits.rs | 52 +- .../transaction-pool/tests/fatp_prios.rs | 26 +- .../runtime/transaction-pool/src/lib.rs | 3 +- 27 files changed, 2637 insertions(+), 595 deletions(-) create mode 100644 prdoc/pr_8596.prdoc create mode 100644 substrate/client/transaction-pool/src/common/sliding_stat.rs create mode 100644 substrate/client/transaction-pool/src/fork_aware_txpool/tx_mem_pool/tx_mem_pool_map.rs diff --git a/Cargo.lock b/Cargo.lock index 29d6b6ed5abb9..9c2477b01573e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -20648,6 +20648,7 @@ dependencies = [ "linked-hash-map", "parity-scale-codec", "parking_lot 0.12.3", + "rstest", "sc-block-builder", "sc-client-api", "sc-transaction-pool-api", diff --git a/prdoc/pr_8596.prdoc b/prdoc/pr_8596.prdoc new file mode 100644 index 0000000000000..105e375cee14b --- /dev/null +++ b/prdoc/pr_8596.prdoc @@ -0,0 +1,8 @@ +title: '`fatxpool`: limits handling optimizations and fixes' +doc: +- audience: Node Dev + description: |- + This PR adds some optimization and fixes in handling limits in fork-aware transaction pool. +crates: +- name: sc-transaction-pool + bump: major diff --git a/substrate/client/transaction-pool/Cargo.toml b/substrate/client/transaction-pool/Cargo.toml index dea881ccef547..b51ceb45d0986 100644 --- a/substrate/client/transaction-pool/Cargo.toml +++ b/substrate/client/transaction-pool/Cargo.toml @@ -49,6 +49,7 @@ tracing = { workspace = true, default-features = true } anyhow = { workspace = true } assert_matches = { workspace = true } criterion = { workspace = true, default-features = true } +rstest = { workspace = true } sc-block-builder = { workspace = true, default-features = true } sp-consensus = { workspace = true, default-features = true } substrate-test-runtime = { workspace = true } diff --git a/substrate/client/transaction-pool/benches/basics.rs b/substrate/client/transaction-pool/benches/basics.rs index 74dd69a8aaf8d..0672d47f70431 100644 --- a/substrate/client/transaction-pool/benches/basics.rs +++ b/substrate/client/transaction-pool/benches/basics.rs @@ -64,8 +64,9 @@ impl ChainApi for TestApi { fn validate_transaction( &self, at: ::Hash, - _source: TransactionSource, + _: TransactionSource, uxt: Arc<::Extrinsic>, + _: ValidateTransactionPriority, ) -> Self::ValidationFuture { let uxt = (*uxt).clone(); let transfer = TransferData::try_from(&uxt) diff --git a/substrate/client/transaction-pool/src/common/api.rs b/substrate/client/transaction-pool/src/common/api.rs index 14212a51a8558..b428582a01803 100644 --- a/substrate/client/transaction-pool/src/common/api.rs +++ b/substrate/client/transaction-pool/src/common/api.rs @@ -18,16 +18,13 @@ //! Chain api required for the transaction pool. -use crate::LOG_TARGET; -use codec::Encode; -use futures::{ - channel::{mpsc, oneshot}, - future::{ready, Future, FutureExt, Ready}, - lock::Mutex, - SinkExt, StreamExt, +use crate::{ + common::{sliding_stat::DurationSlidingStats, STAT_SLIDING_WINDOW}, + graph::ValidateTransactionPriority, + insert_and_log_throttled, LOG_TARGET, LOG_TARGET_STAT, }; -use std::{marker::PhantomData, pin::Pin, sync::Arc}; - +use codec::Encode; +use futures::future::{ready, Future, FutureExt, Ready}; use prometheus_endpoint::Registry as PrometheusRegistry; use sc_client_api::{blockchain::HeaderBackend, BlockBackend}; use sp_api::{ApiExt, ProvideRuntimeApi}; @@ -39,38 +36,85 @@ use sp_runtime::{ transaction_validity::{TransactionSource, TransactionValidity}, }; use sp_transaction_pool::runtime_api::TaggedTransactionQueue; +use std::{ + marker::PhantomData, + pin::Pin, + sync::Arc, + time::{Duration, Instant}, +}; +use tokio::sync::{mpsc, oneshot, Mutex}; use super::{ error::{self, Error}, metrics::{ApiMetrics, ApiMetricsExt}, }; use crate::graph; -use tracing::{trace, warn}; +use tracing::{trace, warn, Level}; /// The transaction pool logic for full client. pub struct FullChainApi { client: Arc, _marker: PhantomData, metrics: Option>, - validation_pool: mpsc::Sender + Send>>>, + validation_pool_normal: mpsc::Sender + Send>>>, + validation_pool_maintained: mpsc::Sender + Send>>>, + validate_transaction_normal_stats: DurationSlidingStats, + validate_transaction_maintained_stats: DurationSlidingStats, } /// Spawn a validation task that will be used by the transaction pool to validate transactions. fn spawn_validation_pool_task( name: &'static str, - receiver: Arc + Send>>>>>, + receiver_normal: Arc + Send>>>>>, + receiver_maintained: Arc + Send>>>>>, spawner: &impl SpawnEssentialNamed, + stats: DurationSlidingStats, + blocking_stats: DurationSlidingStats, ) { spawner.spawn_essential_blocking( name, Some("transaction-pool"), async move { loop { - let task = receiver.lock().await.next().await; - match task { - None => return, - Some(task) => task.await, - } + let start = Instant::now(); + + let task = { + let receiver_maintained = receiver_maintained.clone(); + let receiver_normal = receiver_normal.clone(); + tokio::select! { + Some(task) = async { + receiver_maintained.lock().await.recv().await + } => { task } + Some(task) = async { + receiver_normal.lock().await.recv().await + } => { task } + else => { + return + } + } + }; + + let blocking_duration = { + let start = Instant::now(); + task.await; + start.elapsed() + }; + + insert_and_log_throttled!( + Level::DEBUG, + target:LOG_TARGET_STAT, + prefix:format!("validate_transaction_inner_stats"), + stats, + start.elapsed().into() + ); + insert_and_log_throttled!( + Level::DEBUG, + target:LOG_TARGET_STAT, + prefix:format!("validate_transaction_blocking_stats"), + blocking_stats, + blocking_duration.into() + ); + trace!(target:LOG_TARGET, duration=?start.elapsed(), "spawn_validation_pool_task"); } } .boxed(), @@ -84,6 +128,9 @@ impl FullChainApi { prometheus: Option<&PrometheusRegistry>, spawner: &impl SpawnEssentialNamed, ) -> Self { + let stats = DurationSlidingStats::new(Duration::from_secs(STAT_SLIDING_WINDOW)); + let blocking_stats = DurationSlidingStats::new(Duration::from_secs(STAT_SLIDING_WINDOW)); + let metrics = prometheus.map(ApiMetrics::register).and_then(|r| match r { Err(error) => { warn!( @@ -96,13 +143,41 @@ impl FullChainApi { Ok(api) => Some(Arc::new(api)), }); - let (sender, receiver) = mpsc::channel(0); + let (sender, receiver) = mpsc::channel(1); + let (sender_maintained, receiver_maintained) = mpsc::channel(1); let receiver = Arc::new(Mutex::new(receiver)); - spawn_validation_pool_task("transaction-pool-task-0", receiver.clone(), spawner); - spawn_validation_pool_task("transaction-pool-task-1", receiver, spawner); - - FullChainApi { client, validation_pool: sender, _marker: Default::default(), metrics } + let receiver_maintained = Arc::new(Mutex::new(receiver_maintained)); + spawn_validation_pool_task( + "transaction-pool-task-0", + receiver.clone(), + receiver_maintained.clone(), + spawner, + stats.clone(), + blocking_stats.clone(), + ); + spawn_validation_pool_task( + "transaction-pool-task-1", + receiver, + receiver_maintained, + spawner, + stats.clone(), + blocking_stats.clone(), + ); + + FullChainApi { + client, + validation_pool_normal: sender, + validation_pool_maintained: sender_maintained, + _marker: Default::default(), + metrics, + validate_transaction_normal_stats: DurationSlidingStats::new(Duration::from_secs( + STAT_SLIDING_WINDOW, + )), + validate_transaction_maintained_stats: DurationSlidingStats::new(Duration::from_secs( + STAT_SLIDING_WINDOW, + )), + } } } @@ -132,10 +207,25 @@ where at: ::Hash, source: TransactionSource, uxt: graph::ExtrinsicFor, + validation_priority: ValidateTransactionPriority, ) -> Self::ValidationFuture { + let start = Instant::now(); let (tx, rx) = oneshot::channel(); let client = self.client.clone(); - let mut validation_pool = self.validation_pool.clone(); + let (stats, validation_pool, prefix) = + if validation_priority == ValidateTransactionPriority::Maintained { + ( + self.validate_transaction_maintained_stats.clone(), + self.validation_pool_maintained.clone(), + "validate_transaction_maintained_stats", + ) + } else { + ( + self.validate_transaction_normal_stats.clone(), + self.validation_pool_normal.clone(), + "validate_transaction_stats", + ) + }; let metrics = self.metrics.clone(); async move { @@ -155,10 +245,20 @@ where .map_err(|e| Error::RuntimeApi(format!("Validation pool down: {:?}", e)))?; } - match rx.await { + let validity = match rx.await { Ok(r) => r, Err(_) => Err(Error::RuntimeApi("Validation was canceled".into())), - } + }; + + insert_and_log_throttled!( + Level::DEBUG, + target:LOG_TARGET_STAT, + prefix:prefix, + stats, + start.elapsed().into() + ); + + validity } .boxed() } diff --git a/substrate/client/transaction-pool/src/common/mod.rs b/substrate/client/transaction-pool/src/common/mod.rs index d35f6c2fea0e7..7e7711682da16 100644 --- a/substrate/client/transaction-pool/src/common/mod.rs +++ b/substrate/client/transaction-pool/src/common/mod.rs @@ -22,6 +22,7 @@ pub(crate) mod api; pub(crate) mod enactment_state; pub(crate) mod error; pub(crate) mod metrics; +pub(crate) mod sliding_stat; #[cfg(test)] pub(crate) mod tests; pub(crate) mod tracing_log_xt; @@ -29,6 +30,9 @@ pub(crate) mod tracing_log_xt; use futures::StreamExt; use std::sync::Arc; +/// Stat sliding window, in seconds for per-transaction activities. +pub(crate) const STAT_SLIDING_WINDOW: u64 = 3; + /// Inform the transaction pool about imported and finalized blocks. pub async fn notification_future(client: Arc, txpool: Arc) where diff --git a/substrate/client/transaction-pool/src/common/sliding_stat.rs b/substrate/client/transaction-pool/src/common/sliding_stat.rs new file mode 100644 index 0000000000000..3ac7681b6f0cb --- /dev/null +++ b/substrate/client/transaction-pool/src/common/sliding_stat.rs @@ -0,0 +1,617 @@ +// This file is part of Substrate. + +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +//! Logging helper. Sliding window statistics with retention-based pruning. +//! +//! `SlidingStats` tracks timestamped values and computes statistical summaries +//! (min, max, average, percentiles, count) over a rolling time window. +//! +//! Old entries are automatically pruned based on a configurable retention `Duration`. +//! Values can be logged periodically using `insert_with_log` or the `insert_and_log_throttled!` +//! macro. + +use std::{ + collections::{BTreeSet, HashMap, VecDeque}, + fmt::Display, + sync::Arc, + time::{Duration, Instant}, +}; +use tokio::sync::RwLock; + +mod sealed { + pub trait HasDefaultStatFormatter {} +} + +impl sealed::HasDefaultStatFormatter for u32 {} +impl sealed::HasDefaultStatFormatter for i64 {} + +pub trait StatFormatter { + fn format_stat(value: f64) -> String; +} + +impl StatFormatter for T +where + T: Display + sealed::HasDefaultStatFormatter, +{ + fn format_stat(value: f64) -> String { + format!("{value:.2}") + } +} + +#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)] +pub struct StatDuration(pub std::time::Duration); + +impl Into for StatDuration { + fn into(self) -> f64 { + self.0.as_secs_f64() + } +} + +impl Into for Duration { + fn into(self) -> StatDuration { + StatDuration(self) + } +} + +impl std::fmt::Display for StatDuration { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "{:?}", self.0) + } +} + +impl StatFormatter for StatDuration { + fn format_stat(value: f64) -> String { + format!("{:?}", Duration::from_secs_f64(value)) + } +} + +/// Sliding window statistics collector. +/// +/// `SlidingStats` maintains a rolling buffer of values with timestamps, +/// automatically pruning values older than the configured `retention` period. +/// It provides percentile queries (e.g., p50, p95), min/max, average, and count. +pub struct SlidingStats { + inner: Arc>>, +} + +/// Sync version of `SlidingStats` +pub struct SyncSlidingStats { + inner: Arc>>, +} + +/// A type alias for `SlidingStats` specialized for durations with human-readable formatting. +/// +/// Wraps `std::time::Duration` values using `StatDuration`, allowing for statistical summaries +/// (e.g. p50, p95, average) to be displayed in units like nanoseconds, milliseconds, or seconds. +pub type DurationSlidingStats = SlidingStats; + +/// Sync version of `DurationSlidingStats` +pub type SyncDurationSlidingStats = SyncSlidingStats; + +/// Internal state of the statistics buffer. +pub struct Inner { + /// How long to retain items after insertion. + retention: Duration, + + /// Counter to assign unique ids to each entry. + next_id: usize, + + /// Maps id to actual value + timestamp. + entries: HashMap>, + + /// Queue of IDs in insertion order for expiration. + by_time: VecDeque, + + /// Set of values with ids, ordered by value. + by_value: BTreeSet<(T, usize)>, + + /// The time stamp of most recent insertion with log. + /// + /// Used to throttle debug messages. + last_log: Option, +} + +impl Default for Inner { + fn default() -> Self { + Self { + retention: Default::default(), + next_id: Default::default(), + entries: Default::default(), + by_time: Default::default(), + by_value: Default::default(), + last_log: None, + } + } +} + +impl Display for Inner +where + T: Ord + Copy + Into + std::fmt::Display + StatFormatter, +{ + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let mut parts = Vec::new(); + + parts.push(format!("count={}", self.count())); + if let Some(min) = self.min() { + parts.push(format!("min={}", min)); + } + if let Some(max) = self.max() { + parts.push(format!("max={}", max)); + } + if let Some(avg) = self.avg() { + parts.push(format!("avg={}", ::format_stat(avg))); + } + + for p in [50, 90, 95, 99] { + let val = self.percentile(p); + if val.is_finite() { + parts.push(format!("p{}={}", p, ::format_stat(val))); + } + } + parts.push(format!("span={:?}", self.retention)); + write!(f, "{}", parts.join(", ")) + } +} + +/// A value inserted into the buffer, along with its insertion time. +#[derive(Clone, Copy)] +struct Entry { + timestamp: Instant, + value: T, +} + +impl SlidingStats +where + T: Ord + Copy, +{ + /// Creates a new `SlidingStats` with the given retention duration. + pub fn new(retention: Duration) -> Self { + Self { inner: Arc::new(RwLock::new(Inner { retention, ..Default::default() })) } + } + + /// Inserts a value into the buffer, timestamped with `Instant::now()`. + /// + /// May trigger pruning of old items. + #[cfg(test)] + pub async fn insert(&self, value: T) { + self.inner.write().await.insert(value) + } + + /// Inserts a value into the buffer with provided timestamp. + /// + /// May trigger pruning of old items. + #[cfg(test)] + pub async fn insert_using_timestamp(&self, value: T, now: Instant) { + self.inner.write().await.insert_using_timestamp(value, now) + } + + #[cfg(test)] + pub async fn len(&self) -> usize { + self.inner.read().await.len() + } + + /// Grants temporary read-only access to the locked inner structure, + /// passing it into the provided closure. + /// + /// Intended to dump stats and prune inner based on current timestamp. + #[cfg(test)] + pub async fn with_inner(&self, f: impl FnOnce(&mut Inner) -> R) -> R { + let mut guard = self.inner.write().await; + f(&mut *guard) + } +} + +impl SyncSlidingStats +where + T: Ord + Copy, +{ + /// Creates a new `SlidingStats` with the given retention duration. + pub fn new(retention: Duration) -> Self { + Self { + inner: Arc::new(parking_lot::RwLock::new(Inner { retention, ..Default::default() })), + } + } +} + +impl SlidingStats +where + T: Ord + Copy + Into + std::fmt::Display + StatFormatter, +{ + /// Inserts a value and optionally returns a formatted log string of the current stats. + /// + /// If enough time has passed since the last log (determined by `log_interval` or retention), + /// this method returns `Some(log_string)`, otherwise it returns `None`. + /// + /// This method performs: + /// - Automatic pruning of expired entries + /// - Throttling via `last_log` timestamp + /// + /// Note: The newly inserted value may not be included in the returned summary. + pub async fn insert_with_log( + &self, + value: T, + log_interval: Option, + now: Instant, + ) -> Option { + let mut inner = self.inner.write().await; + inner.insert_with_log(value, log_interval, now) + } +} + +impl SyncSlidingStats +where + T: Ord + Copy + Into + std::fmt::Display + StatFormatter, +{ + pub fn insert_with_log( + &self, + value: T, + log_interval: Option, + now: Instant, + ) -> Option { + let mut inner = self.inner.write(); + inner.insert_with_log(value, log_interval, now) + } +} + +impl Inner +where + T: Ord + Copy, +{ + #[cfg(test)] + fn insert(&mut self, value: T) { + self.insert_using_timestamp(value, Instant::now()) + } + + /// Refer to [`SlidingStats::insert_using_timestamp`] + fn insert_using_timestamp(&mut self, value: T, now: Instant) { + let id = self.next_id; + self.next_id += 1; + + let entry = Entry { timestamp: now, value }; + + self.entries.insert(id, entry); + self.by_time.push_back(id); + self.by_value.insert((value, id)); + + self.prune(now); + } + + /// Returns the minimum value in the current window. + pub fn min(&self) -> Option { + self.by_value.first().map(|(v, _)| *v) + } + + /// Returns the maximum value in the current window. + pub fn max(&self) -> Option { + self.by_value.last().map(|(v, _)| *v) + } + + /// Returns the number of items currently retained. + pub fn count(&self) -> usize { + self.len() + } + + /// Explicitly prunes expired items from the buffer. + /// + /// This is also called automatically during insertions. + pub fn prune(&mut self, now: Instant) { + let cutoff = now - self.retention; + + while let Some(&oldest_id) = self.by_time.front() { + let expired = match self.entries.get(&oldest_id) { + Some(entry) => entry.timestamp < cutoff, + None => { + debug_assert!(false); + true + }, + }; + + if !expired { + break; + } + + if let Some(entry) = self.entries.remove(&oldest_id) { + self.by_value.remove(&(entry.value, oldest_id)); + } else { + debug_assert!(false); + } + self.by_time.pop_front(); + } + } + + pub fn len(&self) -> usize { + debug_assert_eq!(self.entries.len(), self.by_time.len()); + debug_assert_eq!(self.entries.len(), self.by_value.len()); + self.entries.len() + } +} + +impl Inner +where + T: Ord + Copy + Into, +{ + /// Returns the average (mean) of values in the current window. + pub fn avg(&self) -> Option { + let len = self.len(); + if len == 0 { + None + } else { + Some(self.entries.values().map(|e| e.value.into()).sum::() / len as f64) + } + } + + /// Returns the value at the given percentile (e.g., 0.5 for p50). + /// + /// Returns `None` if the buffer is empty. + // note: copied from: https://docs.rs/statrs/0.18.0/src/statrs/statistics/slice_statistics.rs.html#164-182 + pub fn percentile(&self, percentile: usize) -> f64 { + if self.len() == 0 || percentile > 100 { + return f64::NAN; + } + + let tau = percentile as f64 / 100.0; + let len = self.len(); + + let h = (len as f64 + 1.0 / 3.0) * tau + 1.0 / 3.0; + let hf = h as i64; + + if hf <= 0 || percentile == 0 { + return self.min().map(|v| v.into()).unwrap_or(f64::NAN); + } + + if hf >= len as i64 || percentile == 100 { + return self.max().map(|v| v.into()).unwrap_or(f64::NAN); + } + + let mut iter = self.by_value.iter().map(|(v, _)| (*v).into()); + + let a = iter.nth((hf as usize).saturating_sub(1)).unwrap_or(f64::NAN); + let b = iter.next().unwrap_or(f64::NAN); + + a + (h - hf as f64) * (b - a) + } +} + +impl Inner +where + T: Ord + Copy + Into + std::fmt::Display + StatFormatter, +{ + /// Refer to [`SlidingStats::insert_with_log`] + pub fn insert_with_log( + &mut self, + value: T, + log_interval: Option, + now: Instant, + ) -> Option { + let Some(last_log) = self.last_log else { + self.last_log = Some(now); + self.insert_using_timestamp(value, now); + return None; + }; + + let log_interval = log_interval.unwrap_or(self.retention); + let should_log = now.duration_since(last_log) >= log_interval; + let result = should_log.then(|| { + self.last_log = Some(now); + format!("{self}") + }); + self.insert_using_timestamp(value, now); + result + } +} + +impl Clone for SlidingStats { + fn clone(&self) -> Self { + Self { inner: Arc::clone(&self.inner) } + } +} + +impl Clone for SyncSlidingStats { + fn clone(&self) -> Self { + Self { inner: Arc::clone(&self.inner) } + } +} + +/// Inserts a value into a `SlidingStats` and conditionally logs the current stats using `tracing`. +/// +/// This macro inserts the given `$value` into the `$stats` collector only if tracing is enabled +/// for the given `$target` and `$level`. The log will be emiited only if enough time has passed +/// since the last logged output (as tracked by the internal last_log timestamp). +/// +/// The macro respects throttling: stats will not be logged more frequently than either the +/// explicitly provided `log_interval` or the stats' retention period (if no interval is given). +/// +/// Note that: +/// - Logging is skipped unless `tracing::enabled!` returns true for the target and level. +/// - All entries older than the retention period will be logged and pruned, +/// - The newly inserted value may not be included in the logged statistics output (it is inserted +/// *after* the log decision). +#[macro_export] +macro_rules! insert_and_log_throttled { + ( + $level:expr, + target: $target:expr, + log_interval: $log_interval:expr, + prefix: $prefix:expr, + $stats:expr, + $value:expr + ) => {{ + if tracing::enabled!(target: $target, $level) { + let now = Instant::now(); + if let Some(msg) = $stats.insert_with_log($value, Some($log_interval), now).await { + tracing::event!(target: $target, $level, "{}: {}", $prefix, msg); + } + } + }}; + + ( + $level:expr, + target: $target:expr, + prefix: $prefix:expr, + $stats:expr, + $value:expr + ) => {{ + if tracing::enabled!(target: $target, $level) { + let now = std::time::Instant::now(); + if let Some(msg) = $stats.insert_with_log($value, None, now).await { + tracing::event!(target: $target, $level, "{}: {}", $prefix, msg); + } + } + }}; +} + +/// Sync version of `insert_and_log_throttled` +#[macro_export] +macro_rules! insert_and_log_throttled_sync { + ( + $level:expr, + target: $target:literal, + prefix: $prefix:expr, + $stats:expr, + $value:expr + ) => {{ + if tracing::enabled!(target: $target, $level) { + let now = std::time::Instant::now(); + if let Some(msg) = $stats.insert_with_log($value, None, now){ + tracing::event!(target: $target, $level, "{}: {}", $prefix, msg); + } + } + }}; +} + +#[cfg(test)] +mod test { + use super::*; + use std::time::{Duration, Instant}; + + #[tokio::test] + async fn retention_prunes_old_items() { + let stats = SlidingStats::::new(Duration::from_secs(10)); + + let base = Instant::now(); + for i in 0..5 { + stats.insert_using_timestamp(i * 10, base + Duration::from_secs(i * 5)).await; + } + assert_eq!(stats.len().await, 3); + + stats.insert_using_timestamp(999, base + Duration::from_secs(26)).await; + + assert_eq!(stats.len().await, 2); + } + + #[tokio::test] + async fn retention_prunes_old_items2() { + let stats = SlidingStats::::new(Duration::from_secs(10)); + + let base = Instant::now(); + for i in 0..100 { + stats.insert_using_timestamp(i * 10, base + Duration::from_secs(5)).await; + } + assert_eq!(stats.len().await, 100); + + stats.insert_using_timestamp(999, base + Duration::from_secs(16)).await; + + let len = stats.len().await; + assert_eq!(len, 1); + } + + #[tokio::test] + async fn insert_with_log_message_contains_all_old_items() { + let stats = SlidingStats::::new(Duration::from_secs(100)); + + let base = Instant::now(); + for _ in 0..10 { + stats.insert_with_log(1, None, base + Duration::from_secs(5)).await; + } + assert_eq!(stats.len().await, 10); + + let output = stats.insert_with_log(1, None, base + Duration::from_secs(200)).await.unwrap(); + assert!(output.contains("count=10")); + + let len = stats.len().await; + assert_eq!(len, 1); + } + + #[tokio::test] + async fn insert_with_log_message_prunes_all_old_items() { + let stats = SlidingStats::::new(Duration::from_secs(25)); + + let base = Instant::now(); + for i in 0..10 { + stats.insert_with_log(1, None, base + Duration::from_secs(i * 5)).await; + } + assert_eq!(stats.len().await, 6); + + let output = stats.insert_with_log(1, None, base + Duration::from_secs(200)).await.unwrap(); + assert!(output.contains("count=6")); + + let len = stats.len().await; + assert_eq!(len, 1); + } + + #[tokio::test] + async fn test_avg_min_max() { + let stats = SlidingStats::::new(Duration::from_secs(100)); + let base = Instant::now(); + + stats.insert_using_timestamp(10, base).await; + stats.insert_using_timestamp(20, base + Duration::from_secs(1)).await; + stats.insert_using_timestamp(30, base + Duration::from_secs(2)).await; + + stats + .with_inner(|inner| { + assert_eq!(inner.count(), 3); + assert_eq!(inner.avg(), Some(20.0)); + assert_eq!(inner.min(), Some(10)); + assert_eq!(inner.max(), Some(30)); + }) + .await; + } + + #[tokio::test] + async fn duration_format() { + let stats = SlidingStats::::new(Duration::from_secs(100)); + stats.insert(Duration::from_nanos(100).into()).await; + let output = stats.with_inner(|i| format!("{i}")).await; + assert!(output.contains("max=100ns")); + + let stats = SlidingStats::::new(Duration::from_secs(100)); + stats.insert(Duration::from_micros(100).into()).await; + let output = stats.with_inner(|i| format!("{i}")).await; + assert!(output.contains("max=100µs")); + + let stats = SlidingStats::::new(Duration::from_secs(100)); + stats.insert(Duration::from_millis(100).into()).await; + let output = stats.with_inner(|i| format!("{i}")).await; + assert!(output.contains("max=100ms")); + + let stats = SlidingStats::::new(Duration::from_secs(100)); + stats.insert(Duration::from_secs(100).into()).await; + let output = stats.with_inner(|i| format!("{i}")).await; + assert!(output.contains("max=100s")); + + let stats = SlidingStats::::new(Duration::from_secs(100)); + stats.insert(Duration::from_nanos(100).into()).await; + stats.insert(Duration::from_micros(100).into()).await; + stats.insert(Duration::from_millis(100).into()).await; + stats.insert(Duration::from_secs(100).into()).await; + let output = stats.with_inner(|i| format!("{i}")).await; + println!("{output}"); + assert_eq!(output, "count=4, min=100ns, max=100s, avg=25.025025025s, p50=50.05ms, p90=100s, p95=100s, p99=100s, span=100s"); + } +} diff --git a/substrate/client/transaction-pool/src/common/tests.rs b/substrate/client/transaction-pool/src/common/tests.rs index c391beb21b07f..71caf005333de 100644 --- a/substrate/client/transaction-pool/src/common/tests.rs +++ b/substrate/client/transaction-pool/src/common/tests.rs @@ -18,7 +18,10 @@ //! Testing related primitives for internal usage in this crate. -use crate::graph::{BlockHash, ChainApi, ExtrinsicFor, NumberFor, RawExtrinsicFor}; +use crate::{ + graph::{BlockHash, ChainApi, ExtrinsicFor, NumberFor, RawExtrinsicFor}, + ValidateTransactionPriority, +}; use codec::Encode; use parking_lot::Mutex; use sc_transaction_pool_api::error; @@ -78,6 +81,7 @@ impl ChainApi for TestApi { at: ::Hash, _source: TransactionSource, uxt: ExtrinsicFor, + _: ValidateTransactionPriority, ) -> Self::ValidationFuture { let uxt = (*uxt).clone(); self.validation_requests.lock().push(uxt.clone()); diff --git a/substrate/client/transaction-pool/src/fork_aware_txpool/fork_aware_txpool.rs b/substrate/client/transaction-pool/src/fork_aware_txpool/fork_aware_txpool.rs index 3553465668e31..cc655db91f0f9 100644 --- a/substrate/client/transaction-pool/src/fork_aware_txpool/fork_aware_txpool.rs +++ b/substrate/client/transaction-pool/src/fork_aware_txpool/fork_aware_txpool.rs @@ -23,13 +23,17 @@ use super::{ import_notification_sink::MultiViewImportNotificationSink, metrics::{EventsMetricsCollector, MetricsLink as PrometheusMetrics}, multi_view_listener::MultiViewListener, - tx_mem_pool::{InsertionInfo, TxMemPool, TXMEMPOOL_TRANSACTION_LIMIT_MULTIPLIER}, + tx_mem_pool::{InsertionInfo, TxMemPool}, view::View, view_store::ViewStore, }; use crate::{ api::FullChainApi, - common::tracing_log_xt::{log_xt_debug, log_xt_trace}, + common::{ + sliding_stat::DurationSlidingStats, + tracing_log_xt::{log_xt_debug, log_xt_trace}, + STAT_SLIDING_WINDOW, + }, enactment_state::{EnactmentAction, EnactmentState}, fork_aware_txpool::{ dropped_watcher::{DroppedReason, DroppedTransaction}, @@ -40,7 +44,8 @@ use crate::{ base_pool::{TimedTransactionSource, Transaction}, BlockHash, ExtrinsicFor, ExtrinsicHash, IsValidator, Options, RawExtrinsicFor, }, - ReadyIteratorFor, LOG_TARGET, + insert_and_log_throttled, ReadyIteratorFor, ValidateTransactionPriority, LOG_TARGET, + LOG_TARGET_STAT, }; use async_trait::async_trait; use futures::{ @@ -53,8 +58,8 @@ use parking_lot::Mutex; use prometheus_endpoint::Registry as PrometheusRegistry; use sc_transaction_pool_api::{ error::Error as TxPoolApiError, ChainEvent, ImportNotificationStream, - MaintainedTransactionPool, PoolStatus, TransactionFor, TransactionPool, TransactionPriority, - TransactionSource, TransactionStatusStreamFor, TxHash, TxInvalidityReportMap, + MaintainedTransactionPool, PoolStatus, TransactionFor, TransactionPool, TransactionSource, + TransactionStatusStreamFor, TxHash, TxInvalidityReportMap, }; use sp_blockchain::{HashAndNumber, TreeRoute}; use sp_core::traits::SpawnEssentialNamed; @@ -68,16 +73,22 @@ use std::{ collections::{BTreeMap, HashMap, HashSet}, pin::Pin, sync::Arc, - time::Instant, + time::{Duration, Instant}, }; use tokio::select; -use tracing::{debug, info, trace, warn}; +use tracing::{debug, info, instrument, trace, warn, Level}; /// The maximum block height difference before considering a view or transaction as timed-out /// due to a finality stall. When the difference exceeds this threshold, elements are treated /// as stale and are subject to cleanup. const FINALITY_TIMEOUT_THRESHOLD: usize = 128; +/// The number of transactions that will be sent from the mempool to the newly created view during +/// the maintain process. +//todo [#8835]: better approach is needed - maybe time-budget approach? +//note: yap parachain block size. +const MEMPOOL_TO_VIEW_BATCH_SIZE: usize = 7_000; + /// Fork aware transaction pool task, that needs to be polled. pub type ForkAwareTxPoolTask = Pin + Send>>; @@ -112,10 +123,10 @@ where /// /// `ready_iterator` is a closure that generates the result data to be sent to the pollers. fn trigger(&mut self, at: Block::Hash, ready_iterator: impl Fn() -> T) { - trace!(target: LOG_TARGET, ?at, keys = ?self.pollers.keys(), "fatp::trigger"); + debug!(target: LOG_TARGET, ?at, keys = ?self.pollers.keys(), "fatp::trigger"); let Some(pollers) = self.pollers.remove(&at) else { return }; pollers.into_iter().for_each(|p| { - debug!(target: LOG_TARGET, "trigger ready signal at block {}", at); + debug!(target: LOG_TARGET, "fatp::trigger trigger ready signal at block {}", at); let _ = p.send(ready_iterator()); }); } @@ -183,6 +194,12 @@ where /// Intended to be used in the finality stall cleanups and also as a cache for all in-block /// transactions. included_transactions: Mutex, Vec>>>, + + /// Stats for submit call durations + submit_stats: DurationSlidingStats, + + /// Stats for submit_and_watch call durations + submit_and_watch_stats: DurationSlidingStats, } impl ForkAwareTxPool @@ -198,7 +215,7 @@ where best_block_hash: Block::Hash, finalized_hash: Block::Hash, finality_timeout_threshold: Option, - ) -> (Self, ForkAwareTxPoolTask) { + ) -> (Self, [ForkAwareTxPoolTask; 2]) { Self::new_test_with_limits( pool_api, best_block_hash, @@ -220,20 +237,21 @@ where future_limits: crate::PoolLimit, mempool_max_transactions_count: usize, finality_timeout_threshold: Option, - ) -> (Self, ForkAwareTxPoolTask) { + ) -> (Self, [ForkAwareTxPoolTask; 2]) { let (listener, listener_task) = MultiViewListener::new_with_worker(Default::default()); let listener = Arc::new(listener); let (import_notification_sink, import_notification_sink_task) = MultiViewImportNotificationSink::new_with_worker(); - let mempool = Arc::from(TxMemPool::new( + let (mempool, mempool_task) = TxMemPool::new( pool_api.clone(), listener.clone(), Default::default(), mempool_max_transactions_count, ready_limits.total_bytes + future_limits.total_bytes, - )); + ); + let mempool = Arc::from(mempool); let (dropped_stream_controller, dropped_stream) = MultiViewDroppedWatcherController::::new(); @@ -278,8 +296,12 @@ where finality_timeout_threshold: finality_timeout_threshold .unwrap_or(FINALITY_TIMEOUT_THRESHOLD), included_transactions: Default::default(), + submit_stats: DurationSlidingStats::new(Duration::from_secs(STAT_SLIDING_WINDOW)), + submit_and_watch_stats: DurationSlidingStats::new(Duration::from_secs( + STAT_SLIDING_WINDOW, + )), }, - combined_tasks, + [combined_tasks, mempool_task], ) } @@ -299,11 +321,13 @@ where ExtrinsicHash, >, ) { + let dropped_stats = DurationSlidingStats::new(Duration::from_secs(STAT_SLIDING_WINDOW)); loop { let Some(dropped) = dropped_stream.next().await else { debug!(target: LOG_TARGET, "fatp::dropped_monitor_task: terminated..."); break; }; + let start = Instant::now(); let tx_hash = dropped.tx_hash; trace!( target: LOG_TARGET, @@ -313,7 +337,7 @@ where ); match dropped.reason { DroppedReason::Usurped(new_tx_hash) => { - if let Some(new_tx) = mempool.get_by_hash(new_tx_hash) { + if let Some(new_tx) = mempool.get_by_hash(new_tx_hash).await { view_store.replace_transaction(new_tx.source(), new_tx.tx(), tx_hash).await; } else { trace!( @@ -328,9 +352,16 @@ where }, }; - mempool.remove_transactions(&[tx_hash]); + mempool.remove_transactions(&[tx_hash]).await; import_notification_sink.clean_notified_items(&[tx_hash]); view_store.listener.transaction_dropped(dropped); + insert_and_log_throttled!( + Level::DEBUG, + target:LOG_TARGET_STAT, + prefix:"dropped_stats", + dropped_stats, + start.elapsed().into() + ); } } @@ -361,13 +392,14 @@ where let (import_notification_sink, import_notification_sink_task) = MultiViewImportNotificationSink::new_with_worker(); - let mempool = Arc::from(TxMemPool::new( + let (mempool, blocking_mempool_task) = TxMemPool::new( pool_api.clone(), listener.clone(), metrics.clone(), - TXMEMPOOL_TRANSACTION_LIMIT_MULTIPLIER * options.total_count(), + options.total_count(), options.ready.total_bytes + options.future.total_bytes, - )); + ); + let mempool = Arc::from(mempool); let (dropped_stream_controller, dropped_stream) = MultiViewDroppedWatcherController::::new(); @@ -393,6 +425,11 @@ where } .boxed(); spawner.spawn_essential("txpool-background", Some("transaction-pool"), combined_tasks); + spawner.spawn_essential_blocking( + "txpool-background", + Some("transaction-pool"), + blocking_mempool_task, + ); Self { mempool, @@ -411,6 +448,10 @@ where is_validator, finality_timeout_threshold: FINALITY_TIMEOUT_THRESHOLD, included_transactions: Default::default(), + submit_stats: DurationSlidingStats::new(Duration::from_secs(STAT_SLIDING_WINDOW)), + submit_and_watch_stats: DurationSlidingStats::new(Duration::from_secs( + STAT_SLIDING_WINDOW, + )), } } @@ -455,8 +496,8 @@ where /// Returns a number of unwatched and watched transactions in internal mempool. /// /// Intended for use in unit tests. - pub fn mempool_len(&self) -> (usize, usize) { - self.mempool.unwatched_and_watched_count() + pub async fn mempool_len(&self) -> (usize, usize) { + self.mempool.unwatched_and_watched_count().await } /// Returns a set of future transactions for given block hash. @@ -484,7 +525,7 @@ where pub async fn ready_at_light(&self, at: Block::Hash) -> ReadyIteratorFor { let start = Instant::now(); let api = self.api.clone(); - trace!( + debug!( target: LOG_TARGET, ?at, "fatp::ready_at_light" @@ -546,19 +587,20 @@ where to_be_removed = all_extrinsics.len(), after_count, duration = ?start.elapsed(), - "fatp::ready_at_light" + "fatp::ready_at_light -> light" ); Box::new(tmp_view.pool.validated_pool().ready()) - } else if let Some((most_recent_view, _)) = self - .view_store - .most_recent_view - .read() - .and_then(|at| self.view_store.get_view_at(at, true)) - { + } else if let Some(most_recent_view) = self.view_store.most_recent_view.read().clone() { // Fallback for the case when `at` is not on the already known fork. // Falls back to the most recent view, which may include txs which // are invalid or already included in the blocks but can still yield a // partially valid ready set, which is still better than including nothing. + debug!( + target: LOG_TARGET, + ?at, + duration = ?start.elapsed(), + "fatp::ready_at_light -> most_recent_view" + ); Box::new(most_recent_view.pool.validated_pool().ready()) } else { let empty: ReadyIteratorFor = Box::new(std::iter::empty()); @@ -658,6 +700,143 @@ where ); (false, pending) } + + /// Refer to [`Self::submit_and_watch`] + async fn submit_and_watch_inner( + &self, + at: Block::Hash, + source: TransactionSource, + xt: TransactionFor, + ) -> Result>>, ChainApi::Error> { + let xt = Arc::from(xt); + + let insertion = match self.mempool.push_watched(source, xt.clone()).await { + Ok(result) => result, + Err(TxPoolApiError::ImmediatelyDropped) => + self.attempt_transaction_replacement(source, true, xt.clone()).await?, + Err(e) => return Err(e.into()), + }; + + self.metrics.report(|metrics| metrics.submitted_transactions.inc()); + self.events_metrics_collector.report_submitted(&insertion); + + match self.view_store.submit_and_watch(at, insertion.source, xt).await { + Err(e) => { + self.mempool.remove_transactions(&[insertion.hash]).await; + Err(e.into()) + }, + Ok(mut outcome) => { + self.mempool + .update_transaction_priority(outcome.hash(), outcome.priority()) + .await; + Ok(outcome.expect_watcher()) + }, + } + } + + /// Refer to [`Self::submit_at`] + async fn submit_at_inner( + &self, + source: TransactionSource, + xts: Vec>, + ) -> Result, ChainApi::Error>>, ChainApi::Error> { + let view_store = self.view_store.clone(); + trace!( + target: LOG_TARGET, + count = xts.len(), + active_views_count = self.active_views_count(), + "fatp::submit_at" + ); + log_xt_trace!(target: LOG_TARGET, xts.iter().map(|xt| self.tx_hash(xt)), "fatp::submit_at"); + let xts = xts.into_iter().map(Arc::from).collect::>(); + let mempool_results = self.mempool.extend_unwatched(source, &xts).await; + + if view_store.is_empty() { + return Ok(mempool_results + .into_iter() + .map(|r| r.map(|r| r.hash).map_err(Into::into)) + .collect::>()) + } + + // Submit all the transactions to the mempool + let retries = mempool_results + .into_iter() + .zip(xts.clone()) + .map(|(result, xt)| async move { + match result { + Err(TxPoolApiError::ImmediatelyDropped) => + self.attempt_transaction_replacement(source, false, xt).await, + _ => result, + } + }) + .collect::>(); + + let mempool_results = futures::future::join_all(retries).await; + + // Collect transactions that were successfully submitted to the mempool... + let to_be_submitted = mempool_results + .iter() + .zip(xts) + .filter_map(|(result, xt)| { + result.as_ref().ok().map(|insertion| { + self.events_metrics_collector.report_submitted(&insertion); + (insertion.source.clone(), xt) + }) + }) + .collect::>(); + + self.metrics + .report(|metrics| metrics.submitted_transactions.inc_by(to_be_submitted.len() as _)); + + // ... and submit them to the view_store. Please note that transactions rejected by mempool + // are not sent here. + let mempool = self.mempool.clone(); + let results_map = view_store.submit(to_be_submitted.into_iter()).await; + let mut submission_results = reduce_multiview_result(results_map).into_iter(); + + // Note for composing final result: + // + // For each failed insertion into the mempool, the mempool result should be placed into + // the returned vector. + // + // For each successful insertion into the mempool, the corresponding + // view_store submission result needs to be examined (merged_results): + // - If there is an error during view_store submission, the transaction is removed from + // the mempool, and the final result recorded in the vector for this transaction is the + // view_store submission error. + // + // - If the view_store submission is successful, the transaction priority is updated in the + // mempool. + // + // Finally, it collects the hashes of updated transactions or submission errors (either + // from the mempool or view_store) into a returned vector (final_results). + const RESULTS_ASSUMPTION : &str = + "The number of Ok results in mempool is exactly the same as the size of view_store submission result. qed."; + let merged_results = mempool_results.into_iter().map(|result| { + result.map_err(Into::into).and_then(|insertion| { + Ok((insertion.hash, submission_results.next().expect(RESULTS_ASSUMPTION))) + }) + }); + + let mut final_results = vec![]; + for r in merged_results { + match r { + Ok((hash, submission_result)) => match submission_result { + Ok(r) => { + mempool.update_transaction_priority(r.hash(), r.priority()).await; + final_results.push(Ok(r.hash())); + }, + Err(e) => { + mempool.remove_transactions(&[hash]).await; + final_results.push(Err(e)); + }, + }, + Err(e) => final_results.push(Err(e)), + } + } + + Ok(final_results) + } } /// Converts the input view-to-statuses map into the output vector of statuses. @@ -731,94 +910,25 @@ where source: TransactionSource, xts: Vec>, ) -> Result, Self::Error>>, Self::Error> { - let view_store = self.view_store.clone(); - debug!( + let start = Instant::now(); + trace!( target: LOG_TARGET, count = xts.len(), active_views_count = self.active_views_count(), "fatp::submit_at" ); log_xt_trace!(target: LOG_TARGET, xts.iter().map(|xt| self.tx_hash(xt)), "fatp::submit_at"); - let xts = xts.into_iter().map(Arc::from).collect::>(); - let mempool_results = self.mempool.extend_unwatched(source, &xts); - if view_store.is_empty() { - return Ok(mempool_results - .into_iter() - .map(|r| r.map(|r| r.hash).map_err(Into::into)) - .collect::>()) - } + let result = self.submit_at_inner(source, xts).await; - // Submit all the transactions to the mempool - let retries = mempool_results - .into_iter() - .zip(xts.clone()) - .map(|(result, xt)| async move { - match result { - Err(TxPoolApiError::ImmediatelyDropped) => - self.attempt_transaction_replacement(source, false, xt).await, - _ => result, - } - }) - .collect::>(); - - let mempool_results = futures::future::join_all(retries).await; - - // Collect transactions that were successfully submitted to the mempool... - let to_be_submitted = mempool_results - .iter() - .zip(xts) - .filter_map(|(result, xt)| { - result.as_ref().ok().map(|insertion| { - self.events_metrics_collector.report_submitted(&insertion); - (insertion.source.clone(), xt) - }) - }) - .collect::>(); - - self.metrics - .report(|metrics| metrics.submitted_transactions.inc_by(to_be_submitted.len() as _)); - - // ... and submit them to the view_store. Please note that transactions rejected by mempool - // are not sent here. - let mempool = self.mempool.clone(); - let results_map = view_store.submit(to_be_submitted.into_iter()).await; - let mut submission_results = reduce_multiview_result(results_map).into_iter(); - - // Note for composing final result: - // - // For each failed insertion into the mempool, the mempool result should be placed into - // the returned vector. - // - // For each successful insertion into the mempool, the corresponding - // view_store submission result needs to be examined: - // - If there is an error during view_store submission, the transaction is removed from - // the mempool, and the final result recorded in the vector for this transaction is the - // view_store submission error. - // - // - If the view_store submission is successful, the transaction priority is updated in the - // mempool. - // - // Finally, it collects the hashes of updated transactions or submission errors (either - // from the mempool or view_store) into a returned vector. - const RESULTS_ASSUMPTION : &str = - "The number of Ok results in mempool is exactly the same as the size of view_store submission result. qed."; - Ok(mempool_results - .into_iter() - .map(|result| { - result.map_err(Into::into).and_then(|insertion| { - submission_results.next().expect(RESULTS_ASSUMPTION).inspect_err(|_| { - mempool.remove_transactions(&[insertion.hash]); - }) - }) - }) - .map(|r| { - r.map(|r| { - mempool.update_transaction_priority(&r); - r.hash() - }) - }) - .collect::>()) + insert_and_log_throttled!( + Level::DEBUG, + target:LOG_TARGET_STAT, + prefix:"submit_stats", + self.submit_stats, + start.elapsed().into() + ); + result } /// Submits a single transaction and returns a future resolving to the submission results. @@ -847,40 +957,29 @@ where /// status updates. /// /// Actual transaction submission process is delegated to the `ViewStore` internal instance. + #[instrument(level = Level::TRACE, skip_all, target = "txpool", name = "fatp::submit_and_watch")] async fn submit_and_watch( &self, at: ::Hash, source: TransactionSource, xt: TransactionFor, ) -> Result>>, Self::Error> { + let start = Instant::now(); trace!( target: LOG_TARGET, tx_hash = ?self.tx_hash(&xt), views = self.active_views_count(), "fatp::submit_and_watch" ); - let xt = Arc::from(xt); - - let insertion = match self.mempool.push_watched(source, xt.clone()) { - Ok(result) => result, - Err(TxPoolApiError::ImmediatelyDropped) => - self.attempt_transaction_replacement(source, true, xt.clone()).await?, - Err(e) => return Err(e.into()), - }; - - self.metrics.report(|metrics| metrics.submitted_transactions.inc()); - self.events_metrics_collector.report_submitted(&insertion); - - self.view_store - .submit_and_watch(at, insertion.source, xt) - .await - .inspect_err(|_| { - self.mempool.remove_transactions(&[insertion.hash]); - }) - .map(|mut outcome| { - self.mempool.update_transaction_priority(&outcome); - outcome.expect_watcher() - }) + let result = self.submit_and_watch_inner(at, source, xt).await; + insert_and_log_throttled!( + Level::DEBUG, + target:LOG_TARGET_STAT, + prefix:"submit_and_watch_stats", + self.submit_and_watch_stats, + start.elapsed().into() + ); + result } /// Reports invalid transactions to the transaction pool. @@ -904,7 +1003,7 @@ where let removed = self.view_store.report_invalid(at, invalid_tx_errors); let removed_hashes = removed.iter().map(|tx| tx.hash).collect::>(); - self.mempool.remove_transactions(&removed_hashes); + self.mempool.clone().remove_transactions_sync(removed_hashes.clone()); self.import_notification_sink.clean_notified_items(&removed_hashes); self.metrics @@ -924,7 +1023,8 @@ where self.view_store .most_recent_view .read() - .map(|hash| self.view_store.status()[&hash].clone()) + .as_ref() + .map(|v| v.status()) .unwrap_or(PoolStatus { ready: 0, ready_bytes: 0, future: 0, future_bytes: 0 }) } @@ -952,15 +1052,15 @@ where /// block (for which maintain process was accomplished). // todo [#5491]: api change: we probably should have at here? fn ready_transaction(&self, tx_hash: &TxHash) -> Option> { - let most_recent_view = self.view_store.most_recent_view.read(); - let result = most_recent_view - .map(|block_hash| self.view_store.ready_transaction(block_hash, tx_hash)) - .flatten(); + let most_recent_view_hash = + self.view_store.most_recent_view.read().as_ref().map(|v| v.at.hash); + let result = most_recent_view_hash + .and_then(|block_hash| self.view_store.ready_transaction(block_hash, tx_hash)); trace!( target: LOG_TARGET, ?tx_hash, is_ready = result.is_some(), - ?most_recent_view, + most_recent_view = ?most_recent_view_hash, "ready_transaction" ); result @@ -1017,15 +1117,19 @@ where _at: Block::Hash, xt: sc_transaction_pool_api::LocalTransactionFor, ) -> Result { - debug!( + trace!( target: LOG_TARGET, active_views_count = self.active_views_count(), "fatp::submit_local" ); let xt = Arc::from(xt); - let result = - self.mempool.extend_unwatched(TransactionSource::Local, &[xt.clone()]).remove(0); + // note: would be nice to get rid of sync methods one day. See: #8912 + let result = self + .mempool + .clone() + .extend_unwatched_sync(TransactionSource::Local, vec![xt.clone()]) + .remove(0); let insertion = match result { Err(TxPoolApiError::ImmediatelyDropped) => self.attempt_transaction_replacement_sync( @@ -1039,10 +1143,12 @@ where self.view_store .submit_local(xt) .inspect_err(|_| { - self.mempool.remove_transactions(&[insertion.hash]); + self.mempool.clone().remove_transactions_sync(vec![insertion.hash]); }) .map(|outcome| { - self.mempool.update_transaction_priority(&outcome); + self.mempool + .clone() + .update_transaction_priority_sync(outcome.hash(), outcome.priority()); outcome.hash() }) .or_else(|_| Ok(insertion.hash)) @@ -1062,6 +1168,7 @@ where /// block. /// /// If the view is correctly created, `ready_at` pollers for this block will be triggered. + #[instrument(level = Level::TRACE, skip_all, target = "txpool", name = "fatp::handle_new_block")] async fn handle_new_block(&self, tree_route: &TreeRoute) { let hash_and_number = match tree_route.last() { Some(hash_and_number) => hash_and_number, @@ -1076,7 +1183,7 @@ where }; if self.has_view(&hash_and_number.hash) { - trace!( + debug!( target: LOG_TARGET, ?hash_and_number, "view already exists for block" @@ -1098,7 +1205,7 @@ where View::start_background_revalidation(view, self.revalidation_queue.clone()).await; } - self.finality_stall_cleanup(hash_and_number); + self.finality_stall_cleanup(hash_and_number).await; } /// Cleans up transactions and views outdated by potential finality stalls. @@ -1110,7 +1217,7 @@ where /// /// Additionally, this method triggers the view store to handle and remove stale views caused by /// the finality stall. - fn finality_stall_cleanup(&self, at: &HashAndNumber) { + async fn finality_stall_cleanup(&self, at: &HashAndNumber) { let (oldest_block_number, finality_timedout_blocks) = { let mut included_transactions = self.included_transactions.lock(); @@ -1154,7 +1261,7 @@ where for (block_hash, tx_hashes) in finality_timedout_blocks { self.view_store.listener.transactions_finality_timeout(&tx_hashes, block_hash); - self.mempool.remove_transactions(&tx_hashes); + self.mempool.remove_transactions(&tx_hashes).await; self.import_notification_sink.clean_notified_items(&tx_hashes); self.view_store.dropped_stream_controller.remove_transactions(tx_hashes.clone()); } @@ -1186,6 +1293,7 @@ where at: &HashAndNumber, tree_route: &TreeRoute, ) -> Option>> { + let enter = Instant::now(); debug!( target: LOG_TARGET, ?at, @@ -1193,6 +1301,7 @@ where ?tree_route, "build_new_view" ); + let (mut view, view_dropped_stream, view_aggregated_stream) = if let Some(origin_view) = origin_view { let (mut view, view_dropped_stream, view_aggragated_stream) = @@ -1215,6 +1324,12 @@ where self.is_validator.clone(), ) }; + debug!( + target: LOG_TARGET, + ?at, + duration = ?enter.elapsed(), + "build_new_view::clone_view" + ); let start = Instant::now(); // 1. Capture all import notification from the very beginning, so first register all @@ -1263,6 +1378,13 @@ where ); let view = Arc::from(view); self.view_store.insert_new_view(view.clone(), tree_route).await; + + debug!( + target: LOG_TARGET, + duration = ?enter.elapsed(), + ?at, + "build_new_view" + ); Some(view) } @@ -1275,7 +1397,7 @@ where return txs.clone() }; - trace!( + debug!( target: LOG_TARGET, ?at, "fetch_block_transactions from api" @@ -1346,10 +1468,11 @@ where /// If there are no views, and mempool transaction is reported as invalid for the given view, /// the transaction is notified as invalid and removed from the mempool. async fn update_view_with_mempool(&self, view: &View) { + let xts_count = self.mempool.unwatched_and_watched_count().await; debug!( target: LOG_TARGET, view_at = ?view.at, - xts_count = ?self.mempool.unwatched_and_watched_count(), + ?xts_count, active_views_count = self.active_views_count(), "update_view_with_mempool" ); @@ -1357,25 +1480,37 @@ where let (hashes, xts_filtered): (Vec<_>, Vec<_>) = self .mempool - .clone_transactions() + .with_transactions(|iter| { + iter.filter(|(hash, _)| !view.is_imported(&hash) && !included_xts.contains(&hash)) + .map(|(k, v)| (*k, v.clone())) + //todo [#8835]: better approach is needed - maybe time-budget approach? + .take(MEMPOOL_TO_VIEW_BATCH_SIZE) + .collect::>() + }) + .await .into_iter() - .filter(|(hash, _)| !view.is_imported(hash)) - .filter(|(hash, _)| !included_xts.contains(&hash)) .map(|(tx_hash, tx)| (tx_hash, (tx.source(), tx.tx()))) .unzip(); let results = view - .submit_many(xts_filtered) + .submit_many(xts_filtered, ValidateTransactionPriority::Maintained) .await .into_iter() .zip(hashes) - .map(|(result, tx_hash)| { - result - .map(|outcome| self.mempool.update_transaction_priority(&outcome.into())) - .or_else(|_| Err(tx_hash)) + .map(|(result, tx_hash)| async move { + if let Ok(outcome) = result { + Ok(self + .mempool + .update_transaction_priority(outcome.hash(), outcome.priority()) + .await) + } else { + Err(tx_hash) + } }) .collect::>(); + let results = futures::future::join_all(results).await; + let submitted_count = results.len(); debug!( @@ -1395,7 +1530,7 @@ where for result in results { if let Err(tx_hash) = result { self.view_store.listener.transactions_invalidated(&[tx_hash]); - self.mempool.remove_transactions(&[tx_hash]); + self.mempool.remove_transactions(&[tx_hash]).await; } } } @@ -1511,11 +1646,9 @@ where self.included_transactions.lock().insert(key.clone(), enacted_log); }); - self.metrics.report(|metrics| { - metrics - .unknown_from_block_import_txs - .inc_by(self.mempool.count_unknown_transactions(pruned_log.iter()) as _) - }); + let unknown_count = self.mempool.count_unknown_transactions(pruned_log.iter()).await; + self.metrics + .report(|metrics| metrics.unknown_from_block_import_txs.inc_by(unknown_count as _)); //resubmit { @@ -1540,45 +1673,54 @@ where let mut resubmitted_to_report = 0; - resubmit_transactions.extend( - block_transactions - .into_iter() - .map(|tx| (self.hash_of(&tx), tx)) - .filter(|(tx_hash, _)| { - let contains = pruned_log.contains(&tx_hash); - - // need to count all transactions, not just filtered, here - resubmitted_to_report += 1; - - if !contains { - trace!( - target: LOG_TARGET, - ?tx_hash, - ?hash, - "Resubmitting from retracted block" - ); - } - !contains - }) - .map(|(tx_hash, tx)| { - //find arc if tx is known - self.mempool - .get_by_hash(tx_hash) - .map(|tx| (tx.source(), tx.tx())) - .unwrap_or_else(|| { - // These transactions are coming from retracted blocks, we - // should simply consider them external. - (TimedTransactionSource::new_external(true), Arc::from(tx)) - }) - }), + let txs = block_transactions.into_iter().map(|tx| (self.hash_of(&tx), tx)).filter( + |(tx_hash, _)| { + let contains = pruned_log.contains(&tx_hash); + + // need to count all transactions, not just filtered, here + resubmitted_to_report += 1; + + if !contains { + trace!( + target: LOG_TARGET, + ?tx_hash, + ?hash, + "Resubmitting from retracted block" + ); + } + !contains + }, ); + let mut result = vec![]; + for (tx_hash, tx) in txs { + result.push( + //find arc if tx is known + self.mempool + .get_by_hash(tx_hash) + .await + .map(|tx| (tx.source(), tx.tx())) + .unwrap_or_else(|| { + // These transactions are coming from retracted blocks, we + // should simply consider them external. + (TimedTransactionSource::new_external(true), Arc::from(tx)) + }), + ); + } + resubmit_transactions.extend(result); self.metrics.report(|metrics| { metrics.resubmitted_retracted_txs.inc_by(resubmitted_to_report) }); } - let _ = view.pool.resubmit_at(&hash_and_number, resubmit_transactions).await; + let _ = view + .pool + .resubmit_at( + &hash_and_number, + resubmit_transactions, + ValidateTransactionPriority::Maintained, + ) + .await; } } @@ -1588,6 +1730,7 @@ where /// - executing the on finalized procedure for the view store, /// - purging finalized transactions from the mempool and triggering mempool revalidation, async fn handle_finalized(&self, finalized_hash: Block::Hash, tree_route: &[Block::Hash]) { + let start = Instant::now(); let finalized_number = self.api.block_id_to_number(&BlockId::Hash(finalized_hash)); debug!( target: LOG_TARGET, @@ -1616,7 +1759,7 @@ where ) .await; } else { - trace!( + debug!( target: LOG_TARGET, ?finalized_number, "handle_finalized: revalidation/cleanup skipped: could not resolve finalized block number" @@ -1629,6 +1772,7 @@ where target: LOG_TARGET, active_views_count = self.active_views_count(), included_transactions_len = ?self.included_transactions.lock().len(), + duration = ?start.elapsed(), "handle_finalized after" ); } @@ -1647,22 +1791,20 @@ where /// /// If no lower-priority transaction is found, the function returns an error indicating the /// transaction was dropped immediately. + #[instrument(level = Level::TRACE, skip_all, target = "txpool", name = "fatp::attempt_transaction_replacement")] async fn attempt_transaction_replacement( &self, source: TransactionSource, watched: bool, xt: ExtrinsicFor, ) -> Result>, TxPoolApiError> { - let at = self + let best_view = self .view_store .most_recent_view .read() - .ok_or(TxPoolApiError::ImmediatelyDropped)?; - - let (best_view, _) = self - .view_store - .get_view_at(at, false) - .ok_or(TxPoolApiError::ImmediatelyDropped)?; + .as_ref() + .ok_or(TxPoolApiError::ImmediatelyDropped)? + .clone(); let (xt_hash, validated_tx) = best_view .pool @@ -1672,6 +1814,7 @@ where TimedTransactionSource::from_transaction_source(source, false), xt.clone(), crate::graph::CheckBannedBeforeVerify::Yes, + ValidateTransactionPriority::Submitted, ) .await; @@ -1679,7 +1822,9 @@ where return Err(TxPoolApiError::ImmediatelyDropped) }; - self.attempt_transaction_replacement_inner(xt, xt_hash, priority, source, watched) + let insertion_info = + self.mempool.try_insert_with_replacement(xt, priority, source, watched).await?; + self.post_attempt_transaction_replacement(xt_hash, insertion_info) } /// Sync version of [`Self::attempt_transaction_replacement`]. @@ -1693,7 +1838,10 @@ where .view_store .most_recent_view .read() - .ok_or(TxPoolApiError::ImmediatelyDropped)?; + .as_ref() + .ok_or(TxPoolApiError::ImmediatelyDropped)? + .at + .hash; let ValidTransaction { priority, .. } = self .api @@ -1704,20 +1852,19 @@ where TransactionValidityError::Unknown(u) => TxPoolApiError::UnknownTransaction(u), })?; let xt_hash = self.hash_of(&xt); - self.attempt_transaction_replacement_inner(xt, xt_hash, priority, source, watched) + + let insertion_info = self + .mempool + .clone() + .try_insert_with_replacement_sync(xt, priority, source, watched)?; + self.post_attempt_transaction_replacement(xt_hash, insertion_info) } - fn attempt_transaction_replacement_inner( + fn post_attempt_transaction_replacement( &self, - xt: ExtrinsicFor, tx_hash: ExtrinsicHash, - priority: TransactionPriority, - source: TransactionSource, - watched: bool, + insertion_info: InsertionInfo>, ) -> Result>, TxPoolApiError> { - let insertion_info = - self.mempool.try_insert_with_replacement(xt, priority, source, watched)?; - for worst_hash in &insertion_info.removed { trace!( target: LOG_TARGET, @@ -1778,7 +1925,7 @@ where match result { Err(error) => { - trace!( + debug!( target: LOG_TARGET, %error, "enactment_state::update error" @@ -1805,7 +1952,7 @@ where ChainEvent::Finalized { hash, ref tree_route } => { self.handle_finalized(hash, tree_route).await; - trace!( + debug!( target: LOG_TARGET, ?tree_route, ?prev_finalized_block, @@ -1815,10 +1962,10 @@ where } let duration = start.elapsed(); - + let mempool_len = self.mempool_len().await; info!( target: LOG_TARGET, - txs = ?self.mempool_len(), + txs = ?mempool_len, a = self.active_views_count(), i = self.inactive_views_count(), views = ?self.views_stats(), @@ -1828,7 +1975,7 @@ where ); self.metrics.report(|metrics| { - let (unwatched, watched) = self.mempool_len(); + let (unwatched, watched) = mempool_len; let _ = ( self.active_views_count().try_into().map(|v| metrics.active_views.set(v)), self.inactive_views_count().try_into().map(|v| metrics.inactive_views.set(v)), diff --git a/substrate/client/transaction-pool/src/fork_aware_txpool/revalidation_worker.rs b/substrate/client/transaction-pool/src/fork_aware_txpool/revalidation_worker.rs index 24f71982c7816..be1c850aa09a2 100644 --- a/substrate/client/transaction-pool/src/fork_aware_txpool/revalidation_worker.rs +++ b/substrate/client/transaction-pool/src/fork_aware_txpool/revalidation_worker.rs @@ -30,7 +30,7 @@ use sp_runtime::traits::Block as BlockT; use super::{tx_mem_pool::TxMemPool, view_store::ViewStore}; use futures::prelude::*; -use tracing::{trace, warn}; +use tracing::{debug, warn}; use super::view::{FinishRevalidationWorkerChannels, View}; @@ -135,7 +135,7 @@ where view: Arc>, finish_revalidation_worker_channels: FinishRevalidationWorkerChannels, ) { - trace!( + debug!( target: LOG_TARGET, view_at_hash = ?view.at.hash, "revalidation_queue::revalidate_view: Sending view to revalidation queue" @@ -170,7 +170,7 @@ where view_store: Arc>, finalized_hash: HashAndNumber, ) { - trace!( + debug!( target: LOG_TARGET, ?finalized_hash, "Sent mempool to revalidation queue" @@ -201,7 +201,7 @@ mod tests { use crate::{ common::tests::{uxt, TestApi}, fork_aware_txpool::view::FinishRevalidationLocalChannels, - TimedTransactionSource, + TimedTransactionSource, ValidateTransactionPriority, }; use futures::executor::block_on; use substrate_test_runtime::{AccountId, Transfer, H256}; @@ -223,10 +223,10 @@ mod tests { nonce: 0, }); - let _ = block_on(view.submit_many(std::iter::once(( - TimedTransactionSource::new_external(false), - uxt.clone().into(), - )))); + let _ = block_on(view.submit_many( + std::iter::once((TimedTransactionSource::new_external(false), uxt.clone().into())), + ValidateTransactionPriority::Submitted, + )); assert_eq!(api.validation_requests().len(), 1); let (finish_revalidation_request_tx, finish_revalidation_request_rx) = diff --git a/substrate/client/transaction-pool/src/fork_aware_txpool/tx_mem_pool.rs b/substrate/client/transaction-pool/src/fork_aware_txpool/tx_mem_pool.rs index 559f11da4cdb2..e67566baa8b33 100644 --- a/substrate/client/transaction-pool/src/fork_aware_txpool/tx_mem_pool.rs +++ b/substrate/client/transaction-pool/src/fork_aware_txpool/tx_mem_pool.rs @@ -25,54 +25,60 @@ //! - the transaction can be invalid on some forks (and thus the associated views may not contain //! it), while on other forks tx can be valid. Depending on which view is chosen to be cloned, //! such transaction could not be present in the newly created view. +//! +//! Sync methods (with `_sync` suffix) are also exposed, and it should be safe to call them from +//! sync or non-tokio contenxt. These methods are required for implementing some non-async methods. +//! See for some more information. The implementation of the +//! bridging is based on passing messages from sync context to tokio thread. -use std::{ - cmp::Ordering, - collections::{HashMap, HashSet}, - sync::{ - atomic::{self, AtomicU64}, - Arc, - }, - time::Instant, -}; - -use futures::FutureExt; +use futures::{future::join_all, FutureExt}; use itertools::Itertools; use parking_lot::RwLock; -use tracing::{debug, trace}; - use sc_transaction_pool_api::{TransactionPriority, TransactionSource}; use sp_blockchain::HashAndNumber; use sp_runtime::{ traits::Block as BlockT, transaction_validity::{InvalidTransaction, TransactionValidityError}, }; +use std::{ + collections::HashSet, + future::Future, + pin::Pin, + sync::{ + atomic::{self, AtomicU64}, + mpsc::{ + channel as sync_bridge_channel, Receiver as SyncBridgeReceiver, + Sender as SyncBridgeSender, + }, + Arc, + }, + time::Instant, +}; +use tracing::{debug, trace}; use crate::{ common::tracing_log_xt::log_xt_trace, graph, - graph::{base_pool::TimedTransactionSource, tracked_map::Size, ExtrinsicFor, ExtrinsicHash}, - LOG_TARGET, + graph::{base_pool::TimedTransactionSource, ExtrinsicFor, ExtrinsicHash}, + ValidateTransactionPriority, LOG_TARGET, }; use super::{ - metrics::MetricsLink as PrometheusMetrics, - multi_view_listener::MultiViewListener, - view_store::{ViewStore, ViewStoreSubmitOutcome}, + metrics::MetricsLink as PrometheusMetrics, multi_view_listener::MultiViewListener, + view_store::ViewStore, }; +mod tx_mem_pool_map; + /// The minimum interval between single transaction revalidations. Given in blocks. pub(crate) const TXMEMPOOL_REVALIDATION_PERIOD: u64 = 10; /// The number of transactions revalidated in single revalidation batch. pub(crate) const TXMEMPOOL_MAX_REVALIDATION_BATCH_SIZE: usize = 1000; -/// The maximum number of transactions kept in the mem pool. Given as multiple of -/// the view's total limit. -pub const TXMEMPOOL_TRANSACTION_LIMIT_MULTIPLIER: usize = 4; +const SYNC_BRIDGE_EXPECT: &str = "The mempool blocking task shall not be terminated. qed."; /// Represents the transaction in the intermediary buffer. -#[derive(Debug)] pub(crate) struct TxInMemPool where Block: BlockT, @@ -175,7 +181,65 @@ where } } -impl Size for Arc> +impl std::fmt::Debug for TxInMemPool +where + Block: BlockT, + ChainApi: graph::ChainApi + 'static, +{ + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.debug_struct("TxInMemPool") + .field("watched", &self.watched) + .field("tx", &"...") + .field("bytes", &self.bytes) + .field("source", &self.source) + .field("validated_at", &self.validated_at) + .field("priority", &self.priority) + .finish() + } +} + +impl std::cmp::PartialEq for TxInMemPool +where + Block: BlockT, + ChainApi: graph::ChainApi + 'static, +{ + fn eq(&self, other: &Self) -> bool { + self.watched == other.watched && + self.tx == other.tx && + self.bytes == other.bytes && + self.source == other.source && + *self.priority.read() == *other.priority.read() && + self.validated_at.load(atomic::Ordering::Relaxed) == + other.validated_at.load(atomic::Ordering::Relaxed) + } +} + +#[derive(Debug, Clone, Copy, Eq, PartialEq)] +struct MempoolTxPriority(pub Option); + +impl Ord for MempoolTxPriority { + fn cmp(&self, other: &Self) -> std::cmp::Ordering { + match (&self.0, &other.0) { + (Some(a), Some(b)) => a.cmp(b), + (Some(_), None) => std::cmp::Ordering::Less, + (None, Some(_)) => std::cmp::Ordering::Greater, + (None, None) => std::cmp::Ordering::Equal, + } + } +} +impl From> for MempoolTxPriority { + fn from(value: Option) -> Self { + MempoolTxPriority(value) + } +} + +impl PartialOrd for MempoolTxPriority { + fn partial_cmp(&self, other: &Self) -> Option { + Some(self.cmp(other)) + } +} + +impl tx_mem_pool_map::Size for Arc> where Block: BlockT, ChainApi: graph::ChainApi + 'static, @@ -185,8 +249,33 @@ where } } -type InternalTxMemPoolMap = - graph::tracked_map::TrackedMap, Arc>>; +impl tx_mem_pool_map::PriorityAndTimestamp for Arc> +where + Block: BlockT, + ChainApi: graph::ChainApi + 'static, +{ + type Priority = MempoolTxPriority; + type Timestamp = Option; + + fn priority(&self) -> Self::Priority { + TxInMemPool::priority(self).into() + } + + fn timestamp(&self) -> Self::Timestamp { + self.source().timestamp + } +} + +type InternalTxMemPoolMap = tx_mem_pool_map::SizeTrackedStore< + ExtrinsicHash, + tx_mem_pool_map::PriorityKey>, + Arc>, +>; + +/// Internal (blocking) task for bridging sync and async code. +/// +/// Should be polled in blocking task. +pub type TxMemPoolBlockingTask = Pin + Send>>; /// An intermediary transactions buffer. /// @@ -210,6 +299,9 @@ where /// Provides a side-channel allowing to send per-transaction state changes notification. listener: Arc>, + /// Channel used to send the requests from the sync code. + sync_channel: SyncBridgeSender>, + /// A map that stores the transactions currently in the memory pool. /// /// The key is the hash of the transaction, and the value is a wrapper @@ -257,15 +349,21 @@ where metrics: PrometheusMetrics, max_transactions_count: usize, max_transactions_total_bytes: usize, - ) -> Self { - Self { - api, - listener, - transactions: Default::default(), - metrics, - max_transactions_count, - max_transactions_total_bytes, - } + ) -> (Self, TxMemPoolBlockingTask) { + let (sync_channel, rx) = sync_bridge_channel(); + let task = Self::sync_bridge_task(rx); + ( + Self { + api, + listener, + sync_channel, + transactions: Default::default(), + metrics, + max_transactions_count, + max_transactions_total_bytes, + }, + task.boxed(), + ) } /// Creates a new `TxMemPool` instance for testing purposes. @@ -275,34 +373,37 @@ where max_transactions_count: usize, max_transactions_total_bytes: usize, ) -> Self { + let (sync_channel, rx) = sync_bridge_channel(); + tokio::task::spawn_blocking(move || Self::sync_bridge_task(rx)); Self { api, listener: Arc::from(MultiViewListener::new_with_worker(Default::default()).0), transactions: Default::default(), metrics: Default::default(), + sync_channel, max_transactions_count, max_transactions_total_bytes, } } /// Retrieves a transaction by its hash if it exists in the memory pool. - pub(super) fn get_by_hash( + pub(super) async fn get_by_hash( &self, hash: ExtrinsicHash, ) -> Option>> { - self.transactions.read().get(&hash).map(Clone::clone) + self.transactions.read().await.get(&hash).map(Clone::clone) } /// Returns a tuple with the count of unwatched and watched transactions in the memory pool. - pub fn unwatched_and_watched_count(&self) -> (usize, usize) { - let transactions = self.transactions.read(); + pub async fn unwatched_and_watched_count(&self) -> (usize, usize) { + let transactions = self.transactions.read().await; let watched_count = transactions.values().filter(|t| t.is_watched()).count(); (transactions.len() - watched_count, watched_count) } /// Returns a total number of transactions kept within mempool. pub fn len(&self) -> usize { - self.transactions.read().len() + self.transactions.len() } /// Returns the number of bytes used by all extrinsics in the the pool. @@ -319,12 +420,12 @@ where /// Attempts to insert a transaction into the memory pool, ensuring it does not /// exceed the maximum allowed transaction count. - fn try_insert( + async fn try_insert( &self, tx_hash: ExtrinsicHash, tx: TxInMemPool, ) -> Result>, sc_transaction_pool_api::error::Error> { - let mut transactions = self.transactions.write(); + let mut transactions = self.transactions.write().await; let bytes = self.transactions.bytes(); @@ -362,7 +463,7 @@ where /// /// Returns a `Result` containing `InsertionInfo` if the new transaction is successfully /// inserted; otherwise, returns an appropriate error indicating the failure. - pub(super) fn try_insert_with_replacement( + pub(super) async fn try_insert_with_replacement( &self, new_tx: ExtrinsicFor, priority: TransactionPriority, @@ -375,103 +476,88 @@ where return Err(sc_transaction_pool_api::error::Error::ImmediatelyDropped); } - let mut transactions = self.transactions.write(); + let mut transactions = self.transactions.write().await; if transactions.contains_key(&hash) { return Err(sc_transaction_pool_api::error::Error::AlreadyImported(Box::new(hash))); } - let mut sorted = transactions - .iter() - .filter_map(|(h, v)| v.priority().map(|_| (*h, v.clone()))) - .collect::>(); - // When pushing higher prio transaction, we need to find a number of lower prio txs, such // that the sum of their bytes is ge then size of new tx. Otherwise we could overflow size // limits. Naive way to do it - rev-sort by priority and eat the tail. // reverse (oldest, lowest prio last) - sorted.sort_by(|(_, a), (_, b)| match b.priority().cmp(&a.priority()) { - Ordering::Equal => match (a.source.timestamp, b.source.timestamp) { - (Some(a), Some(b)) => b.cmp(&a), - _ => Ordering::Equal, - }, - ordering => ordering, - }); - - let mut total_size_removed = 0usize; - let mut to_be_removed = vec![]; - let free_bytes = self.max_transactions_total_bytes - self.transactions.bytes(); - - loop { - let Some((worst_hash, worst_tx)) = sorted.pop() else { - return Err(sc_transaction_pool_api::error::Error::ImmediatelyDropped); - }; - - if worst_tx.priority() >= new_tx.priority() { - return Err(sc_transaction_pool_api::error::Error::ImmediatelyDropped); - } - - total_size_removed += worst_tx.bytes; - to_be_removed.push(worst_hash); - - if free_bytes + total_size_removed >= new_tx.bytes { - break; - } - } - let source = new_tx.source(); - transactions.insert(hash, Arc::from(new_tx)); - for worst_hash in &to_be_removed { - transactions.remove(worst_hash); - } + let new_tx = Arc::new(new_tx); + let insertion_result = transactions.try_insert_with_replacement( + self.max_transactions_total_bytes, + hash, + new_tx, + ); debug_assert!(!self.is_limit_exceeded(transactions.len(), self.transactions.bytes())); - - Ok(InsertionInfo::new_with_removed(hash, source, to_be_removed)) + match insertion_result { + None => Err(sc_transaction_pool_api::error::Error::ImmediatelyDropped), + Some(to_be_removed) => Ok(InsertionInfo::new_with_removed(hash, source, to_be_removed)), + } } /// Adds a new unwatched transactions to the internal buffer not exceeding the limit. /// /// Returns the vector of results for each transaction, the order corresponds to the input /// vector. - pub(super) fn extend_unwatched( + pub(super) async fn extend_unwatched( &self, source: TransactionSource, xts: &[ExtrinsicFor], ) -> Vec>, sc_transaction_pool_api::error::Error>> { - let result = xts - .iter() - .map(|xt| { - let (hash, length) = self.api.hash_and_length(&xt); - self.try_insert(hash, TxInMemPool::new_unwatched(source, xt.clone(), length)) - }) - .collect::>(); - result + let insert_futures = xts.into_iter().map(|xt| { + let api = self.api.clone(); + let xt = xt.clone(); + async move { + let (hash, length) = api.hash_and_length(&xt); + self.try_insert(hash, TxInMemPool::new_unwatched(source, xt, length)).await + } + }); + + join_all(insert_futures).await } /// Adds a new watched transaction to the memory pool if it does not exceed the maximum allowed /// transaction count. - pub(super) fn push_watched( + pub(super) async fn push_watched( &self, source: TransactionSource, xt: ExtrinsicFor, ) -> Result>, sc_transaction_pool_api::error::Error> { let (hash, length) = self.api.hash_and_length(&xt); self.try_insert(hash, TxInMemPool::new_watched(source, xt.clone(), length)) + .await } - /// Clones and returns a `HashMap` of references to all transactions in the memory pool. - pub(super) fn clone_transactions( - &self, - ) -> HashMap, Arc>> { - self.transactions.clone_map() + /// Provides read-only access to all transctions via an iterator. + /// + /// This function allows to iterate over all stored transaction without cloning. + /// The provided closure receives an iterator over references to keys and values. + /// + /// Note: Typically some filtering should be applied and required items can be cloned and return + /// outside the closure if required. Transacaction are `Arc` so clone shall be cheap. + pub(super) async fn with_transactions(&self, f: F) -> R + where + F: Fn( + std::collections::hash_map::Iter< + ExtrinsicHash, + Arc>, + >, + ) -> R, + { + self.transactions.read().await.with_items(f) } /// Removes transactions with given hashes from the memory pool. - pub(super) fn remove_transactions(&self, tx_hashes: &[ExtrinsicHash]) { + pub(super) async fn remove_transactions(&self, tx_hashes: &[ExtrinsicHash]) { log_xt_trace!(target: LOG_TARGET, tx_hashes, "mempool::remove_transaction"); - let mut transactions = self.transactions.write(); + let mut transactions = self.transactions.write().await; for tx_hash in tx_hashes { transactions.remove(tx_hash); } @@ -489,26 +575,32 @@ where let start = Instant::now(); let (count, input) = { - let transactions = self.transactions.clone_map(); - ( - transactions.len(), - transactions - .into_iter() - .filter(|xt| { + self.transactions.len(), + self.with_transactions(|iter| { + iter.filter(|(_, xt)| { let finalized_block_number = finalized_block.number.into().as_u64(); - xt.1.validated_at.load(atomic::Ordering::Relaxed) + + xt.validated_at.load(atomic::Ordering::Relaxed) + TXMEMPOOL_REVALIDATION_PERIOD < finalized_block_number }) - .sorted_by_key(|tx| tx.1.validated_at.load(atomic::Ordering::Relaxed)) - .take(TXMEMPOOL_MAX_REVALIDATION_BATCH_SIZE), + .sorted_by_key(|(_, tx)| tx.validated_at.load(atomic::Ordering::Relaxed)) + .take(TXMEMPOOL_MAX_REVALIDATION_BATCH_SIZE) + .map(|(k, v)| (*k, v.clone())) + .collect::>() + }) + .await, ) }; let validations_futures = input.into_iter().map(|(xt_hash, xt)| { self.api - .validate_transaction(finalized_block.hash, xt.source.clone().into(), xt.tx()) + .validate_transaction( + finalized_block.hash, + xt.source.clone().into(), + xt.tx(), + ValidateTransactionPriority::Maintained, + ) .map(move |validation_result| { xt.validated_at .store(finalized_block.number.into().as_u64(), atomic::Ordering::Relaxed); @@ -563,7 +655,7 @@ where "purge_finalized_transactions" ); log_xt_trace!(target: LOG_TARGET, finalized_xts, "purged finalized transactions"); - let mut transactions = self.transactions.write(); + let mut transactions = self.transactions.write().await; finalized_xts.iter().for_each(|t| { transactions.remove(t); }); @@ -590,7 +682,7 @@ where } { - let mut transactions = self.transactions.write(); + let mut transactions = self.transactions.write().await; invalid_hashes_subtrees.iter().for_each(|tx_hash| { transactions.remove(&tx_hash); }); @@ -619,32 +711,225 @@ where /// Updates the priority of transaction stored in mempool using provided view_store submission /// outcome. - pub(super) fn update_transaction_priority(&self, outcome: &ViewStoreSubmitOutcome) { - outcome.priority().map(|priority| { - self.transactions - .write() - .get_mut(&outcome.hash()) - .map(|p| *p.priority.write() = Some(priority)) - }); + pub(super) async fn update_transaction_priority( + &self, + hash: ExtrinsicHash, + prio: Option, + ) { + if let Some(priority) = prio { + let mut transactions = self.transactions.write().await; + + transactions.update_item(&hash, |t| { + *t.priority.write() = Some(priority); + }); + } } /// Counts the number of transactions in the provided iterator of hashes /// that are not known to the pool. - pub(super) fn count_unknown_transactions<'a>( + pub(super) async fn count_unknown_transactions<'a>( &self, hashes: impl Iterator>, ) -> usize { - let transactions = self.transactions.read(); + let transactions = self.transactions.read().await; hashes.filter(|tx_hash| !transactions.contains_key(tx_hash)).count() } } +/// Convenient return type of extend_unwatched +type ExtendUnwatchedResult = + Vec>, sc_transaction_pool_api::error::Error>>; + +/// Convenient return type of try_insert_with_replacement +type TryInsertWithReplacementResult = + Result>, sc_transaction_pool_api::error::Error>; + +/// Helper enum defining what requests can be made from sync code. +enum TxMemPoolSyncRequest +where + Block: BlockT, + ChainApi: graph::ChainApi + 'static, +{ + RemoveTransactions( + Arc>, + Vec>, + SyncBridgeSender<()>, + ), + ExtendUnwatched( + Arc>, + TransactionSource, + Vec>, + SyncBridgeSender>, + ), + UpdateTransactionPriority( + Arc>, + ExtrinsicHash, + Option, + SyncBridgeSender<()>, + ), + TryInsertWithReplacement( + Arc>, + ExtrinsicFor, + TransactionPriority, + TransactionSource, + bool, + SyncBridgeSender>, + ), +} + +impl TxMemPoolSyncRequest +where + Block: BlockT, + ChainApi: graph::ChainApi + 'static, +{ + fn remove_transactions( + mempool: Arc>, + hashes: Vec>, + ) -> (SyncBridgeReceiver<()>, Self) { + let (tx, rx) = sync_bridge_channel(); + (rx, Self::RemoveTransactions(mempool, hashes, tx)) + } + + fn extend_unwatched( + mempool: Arc>, + source: TransactionSource, + xts: Vec>, + ) -> (SyncBridgeReceiver>, Self) { + let (tx, rx) = sync_bridge_channel(); + (rx, Self::ExtendUnwatched(mempool, source, xts, tx)) + } + + fn update_transaction_priority( + mempool: Arc>, + hash: ExtrinsicHash, + prio: Option, + ) -> (SyncBridgeReceiver<()>, Self) { + let (tx, rx) = sync_bridge_channel(); + (rx, Self::UpdateTransactionPriority(mempool, hash, prio, tx)) + } + + fn try_insert_with_replacement( + mempool: Arc>, + new_tx: ExtrinsicFor, + priority: TransactionPriority, + source: TransactionSource, + watched: bool, + ) -> (SyncBridgeReceiver>, Self) { + let (tx, rx) = sync_bridge_channel(); + (rx, Self::TryInsertWithReplacement(mempool, new_tx, priority, source, watched, tx)) + } +} + +impl TxMemPool +where + Block: BlockT, + ChainApi: graph::ChainApi + 'static, + ::Hash: Unpin, +{ + async fn sync_bridge_task(rx: SyncBridgeReceiver>) { + for request in rx { + Self::handle_request(request).await; + } + } + + async fn handle_request(request: TxMemPoolSyncRequest) { + match request { + TxMemPoolSyncRequest::RemoveTransactions(mempool, hashes, tx) => { + mempool.remove_transactions(&hashes).await; + if let Err(error) = tx.send(()) { + debug!(target: LOG_TARGET, ?error, "RemoveTransaction: sending response failed"); + } + }, + TxMemPoolSyncRequest::ExtendUnwatched(mempool, source, txs, tx) => { + let result = mempool.extend_unwatched(source, &txs).await; + if let Err(error) = tx.send(result) { + debug!(target: LOG_TARGET, ?error, "ExtendUnwatched: sending response failed"); + } + }, + TxMemPoolSyncRequest::UpdateTransactionPriority(mempool, hash, prio, tx) => { + let result = mempool.update_transaction_priority(hash, prio).await; + if let Err(error) = tx.send(result) { + debug!(target: LOG_TARGET, ?error, "UpdateTransactionPriority2: sending response failed"); + } + }, + TxMemPoolSyncRequest::TryInsertWithReplacement( + mempool, + new_tx, + priority, + source, + watched, + tx, + ) => { + let result = + mempool.try_insert_with_replacement(new_tx, priority, source, watched).await; + if let Err(error) = tx.send(result) { + debug!(target: LOG_TARGET, ?error, "TryInsertWithReplacementSync: sending response failed"); + } + }, + } + } + + pub(super) fn try_insert_with_replacement_sync( + self: Arc, + new_tx: ExtrinsicFor, + priority: TransactionPriority, + source: TransactionSource, + watched: bool, + ) -> Result>, sc_transaction_pool_api::error::Error> { + let (response, request) = TxMemPoolSyncRequest::try_insert_with_replacement( + self.clone(), + new_tx, + priority, + source, + watched, + ); + let _ = self.sync_channel.send(request); + response.recv().expect(SYNC_BRIDGE_EXPECT) + } + + pub(super) fn extend_unwatched_sync( + self: Arc, + source: TransactionSource, + xts: Vec>, + ) -> Vec>, sc_transaction_pool_api::error::Error>> + { + let (response, request) = TxMemPoolSyncRequest::extend_unwatched(self.clone(), source, xts); + let _ = self.sync_channel.send(request); + response.recv().expect(SYNC_BRIDGE_EXPECT) + } + + pub(super) fn remove_transactions_sync( + self: Arc, + tx_hashes: Vec>, + ) { + let (response, request) = + TxMemPoolSyncRequest::remove_transactions(self.clone(), tx_hashes); + let _ = self.sync_channel.send(request); + response.recv().expect(SYNC_BRIDGE_EXPECT) + } + + pub(super) fn update_transaction_priority_sync( + self: Arc, + hash: ExtrinsicHash, + prio: Option, + ) { + let (response, request) = + TxMemPoolSyncRequest::update_transaction_priority(self.clone(), hash, prio); + let _ = self.sync_channel.send(request); + response.recv().expect(SYNC_BRIDGE_EXPECT) + } +} + #[cfg(test)] mod tx_mem_pool_tests { + use futures::future::join_all; use substrate_test_runtime::{AccountId, Extrinsic, ExtrinsicBuilder, Transfer, H256}; use substrate_test_runtime_client::Sr25519Keyring::*; - use crate::{common::tests::TestApi, graph::ChainApi}; + use crate::{ + common::tests::TestApi, fork_aware_txpool::view_store::ViewStoreSubmitOutcome, + graph::ChainApi, + }; use super::*; @@ -657,15 +942,15 @@ mod tx_mem_pool_tests { }) } - #[test] - fn extend_unwatched_obeys_limit() { + #[tokio::test] + async fn extend_unwatched_obeys_limit() { let max = 10; let api = Arc::from(TestApi::default()); let mempool = TxMemPool::new_test(api, max, usize::MAX); let xts = (0..max + 1).map(|x| Arc::from(uxt(x as _))).collect::>(); - let results = mempool.extend_unwatched(TransactionSource::External, &xts); + let results = mempool.extend_unwatched(TransactionSource::External, &xts).await; assert!(results.iter().take(max).all(Result::is_ok)); assert!(matches!( results.into_iter().last().unwrap().unwrap_err(), @@ -673,8 +958,8 @@ mod tx_mem_pool_tests { )); } - #[test] - fn extend_unwatched_detects_already_imported() { + #[tokio::test] + async fn extend_unwatched_detects_already_imported() { sp_tracing::try_init_simple(); let max = 10; let api = Arc::from(TestApi::default()); @@ -683,7 +968,7 @@ mod tx_mem_pool_tests { let mut xts = (0..max - 1).map(|x| Arc::from(uxt(x as _))).collect::>(); xts.push(xts.iter().last().unwrap().clone()); - let results = mempool.extend_unwatched(TransactionSource::External, &xts); + let results = mempool.extend_unwatched(TransactionSource::External, &xts).await; assert!(results.iter().take(max - 1).all(Result::is_ok)); assert!(matches!( results.into_iter().last().unwrap().unwrap_err(), @@ -691,33 +976,33 @@ mod tx_mem_pool_tests { )); } - #[test] - fn push_obeys_limit() { + #[tokio::test] + async fn push_obeys_limit() { let max = 10; let api = Arc::from(TestApi::default()); let mempool = TxMemPool::new_test(api, max, usize::MAX); let xts = (0..max).map(|x| Arc::from(uxt(x as _))).collect::>(); - let results = mempool.extend_unwatched(TransactionSource::External, &xts); + let results = mempool.extend_unwatched(TransactionSource::External, &xts).await; assert!(results.iter().all(Result::is_ok)); let xt = Arc::from(uxt(98)); - let result = mempool.push_watched(TransactionSource::External, xt); + let result = mempool.push_watched(TransactionSource::External, xt).await; assert!(matches!( result.unwrap_err(), sc_transaction_pool_api::error::Error::ImmediatelyDropped )); let xt = Arc::from(uxt(99)); - let mut result = mempool.extend_unwatched(TransactionSource::External, &[xt]); + let mut result = mempool.extend_unwatched(TransactionSource::External, &[xt]).await; assert!(matches!( result.pop().unwrap().unwrap_err(), sc_transaction_pool_api::error::Error::ImmediatelyDropped )); } - #[test] - fn push_detects_already_imported() { + #[tokio::test] + async fn push_detects_already_imported() { let max = 10; let api = Arc::from(TestApi::default()); let mempool = TxMemPool::new_test(api, 2 * max, usize::MAX); @@ -726,39 +1011,48 @@ mod tx_mem_pool_tests { let xt0 = xts.iter().last().unwrap().clone(); let xt1 = xts.iter().next().unwrap().clone(); - let results = mempool.extend_unwatched(TransactionSource::External, &xts); + let results = mempool.extend_unwatched(TransactionSource::External, &xts).await; assert!(results.iter().all(Result::is_ok)); - let result = mempool.push_watched(TransactionSource::External, xt0); + let result = mempool.push_watched(TransactionSource::External, xt0).await; assert!(matches!( result.unwrap_err(), sc_transaction_pool_api::error::Error::AlreadyImported(_) )); - let mut result = mempool.extend_unwatched(TransactionSource::External, &[xt1]); + let mut result = mempool.extend_unwatched(TransactionSource::External, &[xt1]).await; assert!(matches!( result.pop().unwrap().unwrap_err(), sc_transaction_pool_api::error::Error::AlreadyImported(_) )); } - #[test] - fn count_works() { + #[tokio::test] + async fn count_works() { + sp_tracing::try_init_simple(); + trace!(target:LOG_TARGET,line=line!(),"xxx"); + let max = 100; let api = Arc::from(TestApi::default()); let mempool = TxMemPool::new_test(api, max, usize::MAX); + trace!(target:LOG_TARGET,line=line!(),"xxx"); let xts0 = (0..10).map(|x| Arc::from(uxt(x as _))).collect::>(); + trace!(target:LOG_TARGET,line=line!(),"xxx"); - let results = mempool.extend_unwatched(TransactionSource::External, &xts0); + let results = mempool.extend_unwatched(TransactionSource::External, &xts0).await; + trace!(target:LOG_TARGET,line=line!(),"xxx"); assert!(results.iter().all(Result::is_ok)); + trace!(target:LOG_TARGET,line=line!(),"xxx"); let xts1 = (0..5).map(|x| Arc::from(uxt(2 * x))).collect::>(); - let results = xts1 - .into_iter() - .map(|t| mempool.push_watched(TransactionSource::External, t)) - .collect::>(); + trace!(target:LOG_TARGET,line=line!(),"xxx"); + let results = + xts1.into_iter().map(|t| mempool.push_watched(TransactionSource::External, t)); + trace!(target:LOG_TARGET,line=line!(),"xxx"); + let results = join_all(results).await; + trace!(target:LOG_TARGET,line=line!(),"xxx"); assert!(results.iter().all(Result::is_ok)); - assert_eq!(mempool.unwatched_and_watched_count(), (10, 5)); + assert_eq!(mempool.unwatched_and_watched_count().await, (10, 5)); } /// size of large extrinsic @@ -768,8 +1062,8 @@ mod tx_mem_pool_tests { ExtrinsicBuilder::new_include_data(vec![x as u8; 1024]).build() } - #[test] - fn push_obeys_size_limit() { + #[tokio::test] + async fn push_obeys_size_limit() { sp_tracing::try_init_simple(); let max = 10; let api = Arc::from(TestApi::default()); @@ -779,27 +1073,27 @@ mod tx_mem_pool_tests { let total_xts_bytes = xts.iter().fold(0, |r, x| r + api.hash_and_length(&x).1); - let results = mempool.extend_unwatched(TransactionSource::External, &xts); + let results = mempool.extend_unwatched(TransactionSource::External, &xts).await; assert!(results.iter().all(Result::is_ok)); assert_eq!(mempool.bytes(), total_xts_bytes); let xt = Arc::from(large_uxt(98)); - let result = mempool.push_watched(TransactionSource::External, xt); + let result = mempool.push_watched(TransactionSource::External, xt).await; assert!(matches!( result.unwrap_err(), sc_transaction_pool_api::error::Error::ImmediatelyDropped )); let xt = Arc::from(large_uxt(99)); - let mut result = mempool.extend_unwatched(TransactionSource::External, &[xt]); + let mut result = mempool.extend_unwatched(TransactionSource::External, &[xt]).await; assert!(matches!( result.pop().unwrap().unwrap_err(), sc_transaction_pool_api::error::Error::ImmediatelyDropped )); } - #[test] - fn replacing_txs_works_for_same_tx_size() { + #[tokio::test] + async fn replacing_txs_works_for_same_tx_size() { sp_tracing::try_init_simple(); let max = 10; let api = Arc::from(TestApi::default()); @@ -811,7 +1105,7 @@ mod tx_mem_pool_tests { let hi_prio = u64::MAX; let total_xts_bytes = xts.iter().fold(0, |r, x| r + api.hash_and_length(&x).1); - let (submit_outcomes, hashes): (Vec<_>, Vec<_>) = xts + let (submit_outcomes, hashes): (Vec>, Vec<_>) = xts .iter() .map(|t| { let h = api.hash_and_length(t).0; @@ -819,26 +1113,27 @@ mod tx_mem_pool_tests { }) .unzip(); - let results = mempool.extend_unwatched(TransactionSource::External, &xts); + let results = mempool.extend_unwatched(TransactionSource::External, &xts).await; assert!(results.iter().all(Result::is_ok)); assert_eq!(mempool.bytes(), total_xts_bytes); - submit_outcomes - .into_iter() - .for_each(|o| mempool.update_transaction_priority(&o)); + for o in submit_outcomes { + mempool.update_transaction_priority(o.hash(), o.priority()).await; + } let xt = Arc::from(large_uxt(98)); let hash = api.hash_and_length(&xt).0; let result = mempool .try_insert_with_replacement(xt, hi_prio, TransactionSource::External, false) + .await .unwrap(); assert_eq!(result.hash, hash); assert_eq!(result.removed, hashes[0..1]); } - #[test] - fn replacing_txs_removes_proper_size_of_txs() { + #[tokio::test] + async fn replacing_txs_removes_proper_size_of_txs() { sp_tracing::try_init_simple(); let max = 10; let api = Arc::from(TestApi::default()); @@ -850,7 +1145,7 @@ mod tx_mem_pool_tests { let hi_prio = u64::MAX; let total_xts_bytes = xts.iter().fold(0, |r, x| r + api.hash_and_length(&x).1); - let (submit_outcomes, hashes): (Vec<_>, Vec<_>) = xts + let (submit_outcomes, hashes): (Vec>, Vec<_>) = xts .iter() .map(|t| { let h = api.hash_and_length(t).0; @@ -858,14 +1153,14 @@ mod tx_mem_pool_tests { }) .unzip(); - let results = mempool.extend_unwatched(TransactionSource::External, &xts); + let results = mempool.extend_unwatched(TransactionSource::External, &xts).await; assert!(results.iter().all(Result::is_ok)); assert_eq!(mempool.bytes(), total_xts_bytes); assert_eq!(total_xts_bytes, max * LARGE_XT_SIZE); - submit_outcomes - .into_iter() - .for_each(|o| mempool.update_transaction_priority(&o)); + for o in submit_outcomes { + mempool.update_transaction_priority(o.hash(), o.priority()).await; + } //this one should drop 2 xts (size: 1130): let xt = Arc::from(ExtrinsicBuilder::new_include_data(vec![98 as u8; 1025]).build()); @@ -873,14 +1168,15 @@ mod tx_mem_pool_tests { assert_eq!(length, 1130); let result = mempool .try_insert_with_replacement(xt, hi_prio, TransactionSource::External, false) + .await .unwrap(); assert_eq!(result.hash, hash); assert_eq!(result.removed, hashes[0..2]); } - #[test] - fn replacing_txs_removes_proper_size_and_prios() { + #[tokio::test] + async fn replacing_txs_removes_proper_size_and_prios() { sp_tracing::try_init_simple(); const COUNT: usize = 10; let api = Arc::from(TestApi::default()); @@ -891,7 +1187,7 @@ mod tx_mem_pool_tests { let hi_prio = u64::MAX; let total_xts_bytes = xts.iter().fold(0, |r, x| r + api.hash_and_length(&x).1); - let (submit_outcomes, hashes): (Vec<_>, Vec<_>) = xts + let (submit_outcomes, hashes): (Vec>, Vec<_>) = xts .iter() .enumerate() .map(|(prio, t)| { @@ -900,13 +1196,13 @@ mod tx_mem_pool_tests { }) .unzip(); - let results = mempool.extend_unwatched(TransactionSource::External, &xts); + let results = mempool.extend_unwatched(TransactionSource::External, &xts).await; assert!(results.iter().all(Result::is_ok)); assert_eq!(mempool.bytes(), total_xts_bytes); - submit_outcomes - .into_iter() - .for_each(|o| mempool.update_transaction_priority(&o)); + for o in submit_outcomes { + mempool.update_transaction_priority(o.hash(), o.priority()).await; + } //this one should drop 3 xts (each of size 1129) let xt = Arc::from(ExtrinsicBuilder::new_include_data(vec![98 as u8; 2154]).build()); @@ -915,14 +1211,15 @@ mod tx_mem_pool_tests { assert_eq!(length, 2 * LARGE_XT_SIZE + 1); let result = mempool .try_insert_with_replacement(xt, hi_prio, TransactionSource::External, false) + .await .unwrap(); assert_eq!(result.hash, hash); assert!(result.removed.iter().eq(hashes[COUNT - 3..COUNT].iter().rev())); } - #[test] - fn replacing_txs_skips_lower_prio_tx() { + #[tokio::test] + async fn replacing_txs_skips_lower_prio_tx() { sp_tracing::try_init_simple(); const COUNT: usize = 10; let api = Arc::from(TestApi::default()); @@ -934,7 +1231,7 @@ mod tx_mem_pool_tests { let low_prio = 10u64; let total_xts_bytes = xts.iter().fold(0, |r, x| r + api.hash_and_length(&x).1); - let submit_outcomes = xts + let submit_outcomes: Vec> = xts .iter() .map(|t| { let h = api.hash_and_length(t).0; @@ -942,17 +1239,18 @@ mod tx_mem_pool_tests { }) .collect::>(); - let results = mempool.extend_unwatched(TransactionSource::External, &xts); + let results = mempool.extend_unwatched(TransactionSource::External, &xts).await; assert!(results.iter().all(Result::is_ok)); assert_eq!(mempool.bytes(), total_xts_bytes); - submit_outcomes - .into_iter() - .for_each(|o| mempool.update_transaction_priority(&o)); + for o in submit_outcomes { + mempool.update_transaction_priority(o.hash(), o.priority()).await; + } let xt = Arc::from(large_uxt(98)); - let result = - mempool.try_insert_with_replacement(xt, low_prio, TransactionSource::External, false); + let result = mempool + .try_insert_with_replacement(xt, low_prio, TransactionSource::External, false) + .await; // lower prio tx is rejected immediately assert!(matches!( @@ -961,8 +1259,8 @@ mod tx_mem_pool_tests { )); } - #[test] - fn replacing_txs_is_skipped_if_prios_are_not_set() { + #[tokio::test] + async fn replacing_txs_is_skipped_if_prios_are_not_set() { sp_tracing::try_init_simple(); const COUNT: usize = 10; let api = Arc::from(TestApi::default()); @@ -974,7 +1272,7 @@ mod tx_mem_pool_tests { let total_xts_bytes = xts.iter().fold(0, |r, x| r + api.hash_and_length(&x).1); - let results = mempool.extend_unwatched(TransactionSource::External, &xts); + let results = mempool.extend_unwatched(TransactionSource::External, &xts).await; assert!(results.iter().all(Result::is_ok)); assert_eq!(mempool.bytes(), total_xts_bytes); @@ -984,8 +1282,9 @@ mod tx_mem_pool_tests { // overhead is 105, thus length: 105 + 2154 assert_eq!(length, 2 * LARGE_XT_SIZE + 1); - let result = - mempool.try_insert_with_replacement(xt, hi_prio, TransactionSource::External, false); + let result = mempool + .try_insert_with_replacement(xt, hi_prio, TransactionSource::External, false) + .await; // we did not update priorities (update_transaction_priority was not called): assert!(matches!( diff --git a/substrate/client/transaction-pool/src/fork_aware_txpool/tx_mem_pool/tx_mem_pool_map.rs b/substrate/client/transaction-pool/src/fork_aware_txpool/tx_mem_pool/tx_mem_pool_map.rs new file mode 100644 index 0000000000000..d72e4f114a3b7 --- /dev/null +++ b/substrate/client/transaction-pool/src/fork_aware_txpool/tx_mem_pool/tx_mem_pool_map.rs @@ -0,0 +1,764 @@ +// This file is part of Substrate. + +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +//! Provides structures for storing and managing transactions in a transaction memory pool. +//! +//! The module includes `SizeTrackedStore`, a map designed for concurrent access, and +//! `IndexedStorage`, which manages transaction entries by key and priority. Transactions are stored +//! efficiently with operations to insert items based on priority and manage space utilization. This +//! module provides core functionality for maintaining the `TxMemPool` state. + +use std::{ + collections::{BTreeMap, HashMap}, + sync::{ + atomic::{AtomicIsize, Ordering as AtomicOrdering}, + Arc, + }, +}; + +use tokio::sync::{RwLock, RwLockReadGuard, RwLockWriteGuard}; + +/// Something that can report its size. +pub(super) trait Size { + fn size(&self) -> usize; +} + +/// Trait for items with a priority and timestamp ordering. +/// +/// `PriorityAndTimestamp` defines methods to access the priority and timestamp, +/// facilitating sorting in structures like `SizeTrackedStore`. +pub(super) trait PriorityAndTimestamp { + type Priority: Ord; + type Timestamp: Ord; + + fn priority(&self) -> Self::Priority; + fn timestamp(&self) -> Self::Timestamp; +} + +/// A dual-key struct for ordering by priority and timestamp. +/// +/// `PriorityKey` allows sorting where the primary criteria is `Priority` +/// and ties are broken using `Timestamp`. +#[derive(Eq, PartialEq, Ord, PartialOrd, Debug)] +pub struct PriorityKey(U, V); + +/// Composite key for sorting collections by priority keys (embedded in `PriorityKey`) and item key +/// (typically hash). +#[derive(Eq, PartialEq, Ord, PartialOrd, Debug)] +struct SortKey(P, K); + +impl SortKey, K> +where + K: Ord + Copy, + A: Ord, + B: Ord, +{ + /// Creates a new `SortKey` for a given item and its key, based on the item's priority and + /// timestamp. + fn new>(key: &K, item: &V) -> Self { + Self(PriorityKey(item.priority(), item.timestamp()), *key) + } +} + +/// Internal storage for managing TxMemPool entries. +/// +/// `IndexedStorage` uses `HashMap` for fast access by key and `BTreeMap` for +/// efficient priority ordering. +#[derive(Debug)] +struct IndexedStorage +where + K: Ord, + S: Ord, +{ + /// HashMap storing transactions by unique key for quick access. + items_by_hashes: HashMap, + /// BTreeMap ordering transactions for prioritized access based on sort key. + items_by_priority: BTreeMap, V>, +} + +/// Core structure for storing and managing transactions in TxMemPool. +/// +/// `SizeTrackedStore` is a thread-safe map designed to track the size and priority +/// of transactions, optimized for use in a transaction memory pool. The map +/// preserves sorting order based on priority and timestamp. +/// +/// Size reported might be slightly off and only approximately true. +#[derive(Debug)] +pub struct SizeTrackedStore +where + K: Ord, + S: Ord, +{ + /// Internal storage maintaining transaction entries. + index: Arc>>, + /// Atomic counter tracking the total size, in bytes, of all transactions. + bytes: AtomicIsize, + /// Atomic counter maintaining the count of transactions. + length: AtomicIsize, +} + +impl Default for IndexedStorage +where + K: Ord, + S: Ord, +{ + fn default() -> Self { + Self { items_by_hashes: Default::default(), items_by_priority: Default::default() } + } +} + +impl IndexedStorage +where + K: Ord + std::hash::Hash, + S: Ord, +{ + /// Retrieves a reference to the value corresponding to the key, if present. + pub fn get(&self, key: &K) -> Option<&V> { + self.items_by_hashes.get(key) + } + + /// Checks if the map contains the specified key. + pub fn contains_key(&self, key: &K) -> bool { + self.items_by_hashes.contains_key(key) + } + + /// Returns an iterator over the values in the map. + pub fn values(&self) -> std::collections::hash_map::Values { + self.items_by_hashes.values() + } + + /// Returns the number of elements in the map. + pub fn len(&self) -> usize { + debug_assert_eq!(self.items_by_hashes.len(), self.items_by_priority.len()); + self.items_by_hashes.len() + } + + /// Removes and returns the first entry in the priority map, if it exists (testing only). + #[cfg(test)] + pub fn pop_first(&mut self) -> Option { + self.items_by_priority.pop_first().map(|(_, v)| v) + } + + pub fn with_items(&self, f: F) -> R + where + F: Fn(std::collections::hash_map::Iter) -> R, + { + f(self.items_by_hashes.iter()) + } +} + +impl IndexedStorage, V> +where + K: Ord + std::hash::Hash + Copy, + A: Ord, + B: Ord, + V: Clone + PriorityAndTimestamp, + V: std::cmp::PartialEq + std::fmt::Debug, +{ + /// Inserts a key-value pair into the map, ordering by priority. + pub fn insert(&mut self, key: K, val: V) -> Option { + let r = self.items_by_hashes.insert(key, val.clone()); + + if let Some(ref removed) = r { + let a = self.items_by_priority.remove(&SortKey::new(&key, removed)); + debug_assert_eq!(r, a); + } + let a = self.items_by_priority.insert(SortKey::new(&key, &val), val); + debug_assert!(a.is_none()); + r + } + + /// Removes a key-value pair from the map based on the key. + pub fn remove(&mut self, key: &K) -> Option { + let r = self.items_by_hashes.remove(key); + let _ = r.as_ref().map(|r| { + let k = SortKey::new(key, r); + let a = self.items_by_priority.remove(&k); + debug_assert_eq!(r.clone(), a.expect("item should be in both maps. qed.")); + }); + r + } + + /// Allows to mutate item for given key with a closure, if key exists. + /// + /// Intended to mutate priority and timestamp. Changing size is not possible. + pub fn update_item(&mut self, key: &K, f: F) -> Option<()> + where + F: FnOnce(&mut V), + { + let item = self.items_by_hashes.get_mut(key)?; + + let old_key = SortKey::new(key, item); + f(item); + let new_key = SortKey::new(key, item); + + if old_key != new_key { + self.items_by_priority.remove(&old_key); + self.items_by_priority.insert(new_key, item.clone()); + } + + Some(()) + } +} + +impl IndexedStorage, V> +where + K: Ord + std::hash::Hash + Copy + std::fmt::Debug, + A: Ord + std::fmt::Debug, + B: Ord + std::fmt::Debug, + V: Clone + PriorityAndTimestamp + Size, + V: std::cmp::PartialEq + std::fmt::Debug, +{ + /// Attempts to insert an item with replacement based on free space and priority. + /// Returns the total size in bytes of removed items, and their keys. + /// + /// Insertion always results with other item's removal, the len bound is kept elsewhere + /// + /// If nothing was inserted `(None,0)` is returned. + pub fn try_insert_with_replacement( + &mut self, + free_bytes: usize, + key: K, + item: V, + ) -> (Option>, usize) { + let mut total_size_removed = 0usize; + let mut to_be_removed = vec![]; + + if item.size() == 0 { + return (None, 0); + } + + if self.contains_key(&key) { + return (None, 0); + } + + for (SortKey(PriorityKey(worst_priority, worst_timestamp), worst_key), worst_item) in + &self.items_by_priority + { + if *worst_priority > item.priority() { + return (None, 0); + } + if *worst_priority == item.priority() && *worst_timestamp < item.timestamp() { + return (None, 0); + } + + total_size_removed += worst_item.size(); + to_be_removed.push(*worst_key); + + if free_bytes + total_size_removed >= item.size() { + break; + } + } + + if item.size() > free_bytes + total_size_removed { + return (None, 0); + } + + self.insert(key, item); + + for worst_key in &to_be_removed { + self.remove(worst_key); + } + + (Some(to_be_removed), total_size_removed) + } +} + +impl Default for SizeTrackedStore +where + K: Ord, + S: Ord, +{ + fn default() -> Self { + Self { + index: Arc::new(IndexedStorage::default().into()), + bytes: 0.into(), + length: 0.into(), + } + } +} +// +impl SizeTrackedStore +where + K: Ord, + S: Ord, +{ + /// Current tracked length of the content. + pub fn len(&self) -> usize { + std::cmp::max(self.length.load(AtomicOrdering::Relaxed), 0) as usize + } + + /// Current sum of content length. + pub fn bytes(&self) -> usize { + std::cmp::max(self.bytes.load(AtomicOrdering::Relaxed), 0) as usize + } + + /// Lock map for read. + pub async fn read(&self) -> SizeTrackedStoreReadAccess { + SizeTrackedStoreReadAccess { inner_guard: self.index.read().await } + } + + /// Lock map for write. + pub async fn write(&self) -> SizeTrackedStoreWriteAccess { + SizeTrackedStoreWriteAccess { + inner_guard: self.index.write().await, + bytes: &self.bytes, + length: &self.length, + } + } +} + +pub struct SizeTrackedStoreReadAccess<'a, K, S, V> +where + K: Ord, + S: Ord, +{ + inner_guard: RwLockReadGuard<'a, IndexedStorage>, +} + +impl SizeTrackedStoreReadAccess<'_, K, S, V> +where + K: Ord + std::hash::Hash, + S: Ord, +{ + /// Returns true if the map contains given key. + pub fn contains_key(&self, key: &K) -> bool { + self.inner_guard.contains_key(key) + } + + /// Returns the reference to the contained value by key, if exists. + pub fn get(&self, key: &K) -> Option<&V> { + self.inner_guard.get(key) + } + + /// Returns an iterator over all values. + pub fn values(&self) -> std::collections::hash_map::Values { + self.inner_guard.values() + } + + /// Returns the number of elements in the map. + pub fn len(&self) -> usize { + self.inner_guard.len() + } + + pub fn with_items(&self, f: F) -> R + where + F: Fn(std::collections::hash_map::Iter) -> R, + { + self.inner_guard.with_items(f) + } +} + +pub struct SizeTrackedStoreWriteAccess<'a, K, S, V> +where + K: Ord, + S: Ord, +{ + bytes: &'a AtomicIsize, + length: &'a AtomicIsize, + inner_guard: RwLockWriteGuard<'a, IndexedStorage>, +} + +impl SizeTrackedStoreWriteAccess<'_, K, PriorityKey, V> +where + K: Ord + std::hash::Hash + Copy + std::fmt::Debug, + A: Ord + std::fmt::Debug, + B: Ord + std::fmt::Debug, + V: Clone + PriorityAndTimestamp + Size, + V: std::cmp::PartialEq + std::fmt::Debug, +{ + /// Insert value and return previous (if any). + pub fn insert(&mut self, key: K, val: V) -> Option { + let new_bytes = val.size(); + self.bytes.fetch_add(new_bytes as isize, AtomicOrdering::Relaxed); + self.length.fetch_add(1, AtomicOrdering::Relaxed); + self.inner_guard.insert(key, val).inspect(|old_val| { + self.bytes.fetch_sub(old_val.size() as isize, AtomicOrdering::Relaxed); + self.length.fetch_sub(1, AtomicOrdering::Relaxed); + }) + } + + /// Remove value by key. + pub fn remove(&mut self, key: &K) -> Option { + let val = self.inner_guard.remove(key); + if let Some(size) = val.as_ref().map(Size::size) { + self.bytes.fetch_sub(size as isize, AtomicOrdering::Relaxed); + self.length.fetch_sub(1, AtomicOrdering::Relaxed); + } + val + } + + /// Refer to [`IndexedStorage::try_insert_with_replacement`] + pub fn try_insert_with_replacement( + &mut self, + max_total_bytes: usize, + key: K, + item: V, + ) -> Option> { + let item_size = item.size(); + let current_bytes = std::cmp::max(self.bytes.load(AtomicOrdering::Relaxed), 0) as usize; + let free_bytes = max_total_bytes - current_bytes; + let (removed_keys, removed_bytes) = + self.inner_guard.try_insert_with_replacement(free_bytes, key, item); + + if let Some(ref removed_keys) = removed_keys { + let delta = item_size as isize - removed_bytes as isize; + self.bytes.fetch_add(delta, AtomicOrdering::Relaxed); + self.length.fetch_sub(removed_keys.len() as isize, AtomicOrdering::Relaxed); + self.length.fetch_add(1, AtomicOrdering::Relaxed); + } + removed_keys + } + + /// Allows to mutate item for given key, if exists. + /// + /// Intended to mutate priority and timestamp. Changing size is not possible. + pub fn update_item(&mut self, hash: &K, f: F) -> Option<()> + where + F: FnOnce(&mut V), + { + self.inner_guard.update_item(hash, f) + } +} + +impl SizeTrackedStoreWriteAccess<'_, K, S, V> +where + K: Ord + std::hash::Hash, + S: Ord, +{ + /// Returns `true` if the inner map contains a value for the specified key. + pub fn contains_key(&self, key: &K) -> bool { + self.inner_guard.contains_key(key) + } + + /// Returns the number of elements in the map. + pub fn len(&mut self) -> usize { + self.inner_guard.len() + } + + #[cfg(test)] + pub fn pop_first(&mut self) -> Option { + self.inner_guard.pop_first() + } +} + +#[cfg(test)] +mod tests { + use rstest::rstest; + + use super::*; + + #[derive(Clone, Debug, PartialEq)] + struct TestItem { + size: usize, + prio: u32, + ts: u32, + } + + impl PriorityAndTimestamp for TestItem { + type Priority = u32; + type Timestamp = u32; + + fn priority(&self) -> Self::Priority { + self.prio + } + fn timestamp(&self) -> Self::Timestamp { + self.ts + } + } + + impl Size for TestItem { + fn size(&self) -> usize { + self.size + } + } + + impl TestItem { + fn new(prio: u32, ts: u32, size: usize) -> Self { + Self { prio, ts, size } + } + } + + #[tokio::test] + async fn basic() { + let map = SizeTrackedStore::default(); + + let i0 = TestItem::new(1, 0, 10); + let i1 = TestItem::new(2, 0, 11); + let i2 = TestItem::new(3, 0, 20); + + map.write().await.insert(0xa, i0); + map.write().await.insert(0xb, i1); + + assert_eq!(map.bytes(), 21); + assert_eq!(map.len(), 2); + + map.write().await.insert(0xc, i2); + + assert_eq!(map.bytes(), 41); + assert_eq!(map.len(), 3); + + map.write().await.remove(&0xa); + assert_eq!(map.bytes(), 31); + assert_eq!(map.len(), 2); + assert_eq!(map.read().await.len(), 2); + } + + #[tokio::test] + async fn insert_same_hash() { + let map = SizeTrackedStore::default(); + + let i0 = TestItem::new(1, 0, 10); + let i1 = TestItem::new(2, 0, 11); + let i2 = TestItem::new(3, 0, 20); + let i3 = TestItem::new(4, 0, 40); + let i4 = TestItem::new(5, 0, 50); + let i5 = TestItem::new(6, 0, 1); + + map.write().await.insert(0xa, i0); + map.write().await.insert(0xb, i1.clone()); + map.write().await.insert(0xc, i2); + assert_eq!(map.bytes(), 41); + assert_eq!(map.len(), 3); + assert_eq!(map.read().await.len(), 3); + + map.write().await.insert(0xc, i3.clone()); + assert_eq!(map.bytes(), 61); + assert_eq!(map.len(), 3); + assert_eq!(map.read().await.len(), 3); + + map.write().await.insert(0xa, i4); + assert_eq!(map.bytes(), 101); + assert_eq!(map.len(), 3); + assert_eq!(map.read().await.len(), 3); + + map.write().await.insert(0xa, i5.clone()); + assert_eq!(map.bytes(), 52); + assert_eq!(map.len(), 3); + assert_eq!(map.read().await.len(), 3); + + let items = map.read().await.values().cloned().collect::>(); + let expected = [i1, i3, i5]; + assert!(expected.iter().all(|e| items.contains(e)),); + assert_eq!(items.len(), expected.len()); + } + + #[tokio::test] + async fn remove_non_existent() { + let map = SizeTrackedStore::<_, _, TestItem>::default(); + map.write().await.remove(&0xa); + assert_eq!(map.bytes(), 0); + assert_eq!(map.len(), 0); + assert_eq!(map.read().await.len(), 0); + } + + #[rstest] + #[case(20, 30, 50, 50, 100, 3, 100, 2, 100)] + #[case(2, 46, 50, 3, 100, 3, 98, 3, 99)] + #[case(2, 46, 50, 2, 100, 3, 98, 3, 98)] + #[case(2, 47, 50, 4, 100, 3, 99, 2, 54)] + #[case(1, 47, 50, 99, 100, 3, 98, 1, 99)] + #[case(1, 1, 1, 2, 100, 3, 3, 3, 4)] //always remove + #[case(20, 30, 40, 150, 100, 3, 90, 3, 90)] + #[case(10, 20, 30, 80, 100, 3, 60, 1, 80)] + #[tokio::test] + #[allow(clippy::too_many_arguments)] + async fn try_insert_with_replacement_works_param2( + #[case] i0_bytes: usize, + #[case] i1_bytes: usize, + #[case] i2_bytes: usize, + #[case] i3_bytes: usize, + #[case] max_bytes: usize, + #[case] expected_len_before: usize, + #[case] expected_bytes_before: usize, + #[case] expected_len_after: usize, + #[case] expected_bytes_after: usize, + ) { + let map = SizeTrackedStore::default(); + + let i0 = TestItem::new(1, 0, i0_bytes); + let i1 = TestItem::new(2, 0, i1_bytes); + let i2 = TestItem::new(3, 0, i2_bytes); + + map.write().await.insert(0xa, i0); + map.write().await.insert(0xb, i1); + map.write().await.insert(0xc, i2.clone()); + + assert_eq!(map.bytes(), expected_bytes_before); + assert_eq!(map.len(), expected_len_before); + + let i3 = TestItem::new(4, 0, i3_bytes); + map.write().await.try_insert_with_replacement(max_bytes, 0xd, i3.clone()); + + assert_eq!(map.len(), expected_len_after); + assert_eq!(map.read().await.len(), expected_len_after); + assert_eq!(map.bytes(), expected_bytes_after); + } + + #[tokio::test] + async fn try_insert_with_replacement_items() { + let map = SizeTrackedStore::default(); + + let i0 = TestItem::new(1, 0, 20); + let i1 = TestItem::new(2, 0, 30); + let i2 = TestItem::new(3, 0, 50); + + map.write().await.insert(0xa, i0); + map.write().await.insert(0xb, i1); + map.write().await.insert(0xc, i2.clone()); + + assert_eq!(map.bytes(), 100); + assert_eq!(map.len(), 3); + + let i3 = TestItem::new(4, 0, 50); + let _ = map.write().await.try_insert_with_replacement(100, 0xd, i3.clone()); + + assert_eq!(map.bytes(), 100); + assert_eq!(map.len(), 2); + assert_eq!(map.read().await.len(), 2); + + let items = map.read().await.values().cloned().collect::>(); + let expected = [&i2, &i3]; + assert!(expected.iter().all(|e| items.contains(e)),); + assert_eq!(items.len(), expected.len()); + + assert_eq!(map.write().await.pop_first().unwrap(), i2); + assert_eq!(map.write().await.pop_first().unwrap(), i3); + } + + #[tokio::test] + async fn try_insert_with_replacement_works_known_key_reject() { + let map = SizeTrackedStore::default(); + + let i0 = TestItem::new(1, 0, 20); + let i1 = TestItem::new(2, 0, 30); + let i2 = TestItem::new(3, 0, 50); + + map.write().await.insert(0xa, i0.clone()); + map.write().await.insert(0xb, i1.clone()); + map.write().await.insert(0xc, i2.clone()); + + assert_eq!(map.bytes(), 100); + assert_eq!(map.len(), 3); + + let i3 = TestItem::new(4, 0, 50); + let r = map.write().await.try_insert_with_replacement(100, 0xb, i3); + + assert!(r.is_none()); + + assert_eq!(map.bytes(), 100); + assert_eq!(map.len(), 3); + assert_eq!(map.read().await.len(), 3); + + let items = map.read().await.values().cloned().collect::>(); + let expected = [&i0, &i1, &i2]; + assert!(expected.iter().all(|e| items.contains(e)),); + assert_eq!(items.len(), expected.len()); + assert_eq!(map.write().await.pop_first().unwrap(), i0); + assert_eq!(map.write().await.pop_first().unwrap(), i1); + assert_eq!(map.write().await.pop_first().unwrap(), i2); + } + + #[tokio::test] + async fn try_insert_with_replacement_zero_size_reject() { + let map = SizeTrackedStore::default(); + + let i0 = TestItem::new(1, 0, 20); + let i1 = TestItem::new(2, 0, 30); + let i2 = TestItem::new(3, 0, 50); + + map.write().await.insert(0xa, i0.clone()); + map.write().await.insert(0xb, i1.clone()); + map.write().await.insert(0xc, i2.clone()); + + assert_eq!(map.bytes(), 100); + assert_eq!(map.len(), 3); + + let i3 = TestItem::new(4, 0, 0); + let r = map.write().await.try_insert_with_replacement(100, 0xb, i3); + + assert!(r.is_none()); + + assert_eq!(map.bytes(), 100); + assert_eq!(map.len(), 3); + assert_eq!(map.read().await.len(), 3); + + let items = map.read().await.values().cloned().collect::>(); + let expected = [i0, i1, i2]; + assert!(expected.iter().all(|e| items.contains(e)),); + assert_eq!(items.len(), expected.len()); + } + + #[tokio::test] + async fn sorting_works() { + let map = SizeTrackedStore::default(); + + let i0 = TestItem::new(1, 0, 10); + let i1 = TestItem::new(1, 1, 10); + let i2 = TestItem::new(2, 0, 20); + let i3 = TestItem::new(3, 0, 30); + let i4 = TestItem::new(4, 0, 40); + + map.write().await.insert(0xc, i2.clone()); + map.write().await.insert(0xb, i1.clone()); + map.write().await.insert(0xa, i0.clone()); + map.write().await.insert(0xe, i4.clone()); + map.write().await.insert(0xd, i3.clone()); + + assert_eq!(map.bytes(), 110); + assert_eq!(map.len(), 5); + assert_eq!(map.write().await.pop_first().unwrap(), i0); + assert_eq!(map.write().await.pop_first().unwrap(), i1); + assert_eq!(map.write().await.pop_first().unwrap(), i2); + assert_eq!(map.write().await.pop_first().unwrap(), i3); + assert_eq!(map.write().await.pop_first().unwrap(), i4); + } + + #[tokio::test] + async fn update_item() { + let map = SizeTrackedStore::default(); + + let i0 = TestItem::new(1, 0, 20); + let i1 = TestItem::new(2, 0, 30); + let iu = TestItem::new(0, 0, 30); + let i2 = TestItem::new(3, 0, 50); + + map.write().await.insert(0xa, i0.clone()); + map.write().await.insert(0xb, i1.clone()); + map.write().await.insert(0xc, i2.clone()); + + assert_eq!(map.bytes(), 100); + assert_eq!(map.len(), 3); + assert_eq!(map.read().await.len(), 3); + + map.write().await.update_item(&0xb, |item| item.prio = iu.prio).unwrap(); + + assert_eq!(map.bytes(), 100); + assert_eq!(map.len(), 3); + assert_eq!(map.read().await.len(), 3); + + let items = map.read().await.values().cloned().collect::>(); + let expected = [&i0, &iu, &i2]; + assert!(expected.iter().all(|e| items.contains(e)),); + assert_eq!(items.len(), expected.len()); + + assert_eq!(map.write().await.pop_first().unwrap(), iu); + assert_eq!(map.write().await.pop_first().unwrap(), i0); + assert_eq!(map.write().await.pop_first().unwrap(), i2); + } +} diff --git a/substrate/client/transaction-pool/src/fork_aware_txpool/view.rs b/substrate/client/transaction-pool/src/fork_aware_txpool/view.rs index 5c025b22573a9..c3854f9a58d78 100644 --- a/substrate/client/transaction-pool/src/fork_aware_txpool/view.rs +++ b/substrate/client/transaction-pool/src/fork_aware_txpool/view.rs @@ -28,8 +28,8 @@ use crate::{ common::tracing_log_xt::log_xt_trace, graph::{ self, base_pool::TimedTransactionSource, BlockHash, ExtrinsicFor, ExtrinsicHash, - IsValidator, TransactionFor, ValidatedPoolSubmitOutcome, ValidatedTransaction, - ValidatedTransactionFor, + IsValidator, TransactionFor, ValidateTransactionPriority, ValidatedPoolSubmitOutcome, + ValidatedTransaction, ValidatedTransactionFor, }, LOG_TARGET, }; @@ -43,7 +43,7 @@ use sp_runtime::{ SaturatedConversion, }; use std::{sync::Arc, time::Instant}; -use tracing::{debug, trace}; +use tracing::{debug, instrument, trace, Level}; pub(super) struct RevalidationResult { revalidated: IndexMap, ValidatedTransactionFor>, @@ -311,21 +311,25 @@ where } /// Imports single unvalidated extrinsic into the view. + #[instrument(level = Level::TRACE, skip_all, target = "txpool", name = "view::submit_one")] pub(super) async fn submit_one( &self, source: TimedTransactionSource, xt: ExtrinsicFor, + validation_priority: ValidateTransactionPriority, ) -> Result, ChainApi::Error> { - self.submit_many(std::iter::once((source, xt))) + self.submit_many(std::iter::once((source, xt)), validation_priority) .await .pop() .expect("There is exactly one result, qed.") } /// Imports many unvalidated extrinsics into the view. + #[instrument(level = Level::TRACE, skip_all, target = "txpool", name = "view::submit_many")] pub(super) async fn submit_many( &self, xts: impl IntoIterator)>, + validation_priority: ValidateTransactionPriority, ) -> Vec, ChainApi::Error>> { if tracing::enabled!(target: LOG_TARGET, tracing::Level::TRACE) { let xts = xts.into_iter().collect::>(); @@ -335,9 +339,9 @@ where "view::submit_many at:{}", self.at.hash ); - self.pool.submit_at(&self.at, xts).await + self.pool.submit_at(&self.at, xts, validation_priority).await } else { - self.pool.submit_at(&self.at, xts).await + self.pool.submit_at(&self.at, xts, validation_priority).await } } @@ -413,7 +417,7 @@ where revalidation_result_tx, } = finish_revalidation_worker_channels; - trace!( + debug!( target: LOG_TARGET, at_hash = ?self.at.hash, "view::revalidate: at starting" @@ -438,7 +442,7 @@ where let mut should_break = false; tokio::select! { _ = finish_revalidation_request_rx.recv() => { - trace!( + debug!( target: LOG_TARGET, at_hash = ?self.at.hash, "view::revalidate: finish revalidation request received" @@ -447,7 +451,13 @@ where } _ = async { if let Some(tx) = batch_iter.next() { - let validation_result = (api.validate_transaction(self.at.hash, tx.source.clone().into(), tx.data.clone()).await, tx.hash, tx); + let validation_result = ( + api.validate_transaction(self.at.hash, + tx.source.clone().into(), tx.data.clone(), + ValidateTransactionPriority::Maintained).await, + tx.hash, + tx + ); validation_results.push(validation_result); } else { self.revalidation_worker_channels.lock().as_mut().map(|ch| ch.remove_sender()); @@ -518,7 +528,7 @@ where } } - trace!( + debug!( target: LOG_TARGET, at_hash = ?self.at.hash, "view::revalidate: sending revalidation result" @@ -550,7 +560,7 @@ where super::revalidation_worker::RevalidationQueue, >, ) { - trace!( + debug!( target: LOG_TARGET, at_hash = ?view.at.hash, "view::start_background_revalidation" diff --git a/substrate/client/transaction-pool/src/fork_aware_txpool/view_store.rs b/substrate/client/transaction-pool/src/fork_aware_txpool/view_store.rs index bcf1e8d5ceef9..91ef881a397c6 100644 --- a/substrate/client/transaction-pool/src/fork_aware_txpool/view_store.rs +++ b/substrate/client/transaction-pool/src/fork_aware_txpool/view_store.rs @@ -30,7 +30,7 @@ use crate::{ BaseSubmitOutcome, BlockHash, ExtrinsicFor, ExtrinsicHash, TransactionFor, ValidatedPoolSubmitOutcome, }, - ReadyIteratorFor, LOG_TARGET, + ReadyIteratorFor, ValidateTransactionPriority, LOG_TARGET, }; use itertools::Itertools; use parking_lot::RwLock; @@ -48,7 +48,7 @@ use std::{ sync::Arc, time::Instant, }; -use tracing::{trace, warn}; +use tracing::{debug, instrument, trace, warn, Level}; /// Helper struct to maintain the context for pending transaction submission, executed for /// newly inserted views. @@ -166,9 +166,9 @@ where /// /// Provides a side-channel allowing to send per-transaction state changes notification. pub(super) listener: Arc>, - /// Most recent block processed by tx-pool. Used in the API functions that were not changed to + /// Most recent view processed by tx-pool. Used in the API functions that were not changed to /// add `at` parameter. - pub(super) most_recent_view: RwLock>, + pub(super) most_recent_view: RwLock>>>, /// The controller of multi view dropped stream. pub(super) dropped_stream_controller: MultiViewDroppedWatcherController, /// The map used to synchronize replacement of transactions between maintain and dropped @@ -229,7 +229,7 @@ where async move { ( view.at.hash, - view.submit_many(xts) + view.submit_many(xts, ValidateTransactionPriority::Submitted) .await .into_iter() .map(|r| r.map(Into::into)) @@ -285,6 +285,7 @@ where /// /// The external stream of aggregated/processed events provided by the `MultiViewListener` /// instance is returned. + #[instrument(level = Level::TRACE, skip_all, target = "txpool", name = "view_store::sumbit_and_watch")] pub(super) async fn submit_and_watch( &self, _at: Block::Hash, @@ -303,7 +304,9 @@ where let view = view.clone(); let xt = xt.clone(); let source = source.clone(); - async move { view.submit_one(source, xt).await } + async move { + view.submit_one(source, xt, ValidateTransactionPriority::Submitted).await + } }) .collect::>() }; @@ -411,12 +414,8 @@ where /// The iterator for future transactions is returned if the most recently notified best block, /// for which maintain process was accomplished, exists. pub(super) fn ready(&self) -> ReadyIteratorFor { - let ready_iterator = self - .most_recent_view - .read() - .map(|at| self.get_view_at(at, true)) - .flatten() - .map(|(v, _)| v.pool.validated_pool().ready()); + let ready_iterator = + self.most_recent_view.read().as_ref().map(|v| v.pool.validated_pool().ready()); if let Some(ready_iterator) = ready_iterator { return Box::new(ready_iterator) @@ -434,8 +433,8 @@ where ) -> Vec, ExtrinsicFor>> { self.most_recent_view .read() - .map(|at| self.futures_at(at)) - .flatten() + .as_ref() + .and_then(|view| self.futures_at(view.at.hash)) .unwrap_or_default() } @@ -459,7 +458,7 @@ where finalized_hash: Block::Hash, tree_route: &[Block::Hash], ) -> Vec> { - trace!( + debug!( target: LOG_TARGET, ?finalized_hash, ?tree_route, @@ -493,6 +492,10 @@ where finalized_transactions.extend(extrinsics); } + debug!( + target: LOG_TARGET, + "finalize_route: done" + ); finalized_transactions } @@ -521,6 +524,7 @@ where /// The `most_recent_view` is updated with the reference to the newly inserted view. /// /// If there are any pending tx replacments, they are applied to the new view. + #[instrument(level = Level::TRACE, skip_all, target = "txpool", name = "view_store::insert_new_view")] pub(super) async fn insert_new_view( &self, view: Arc>, @@ -528,6 +532,8 @@ where ) { self.apply_pending_tx_replacements(view.clone()).await; + let start = Instant::now(); + //note: most_recent_view must be synced with changes in in/active_views. { let mut most_recent_view_lock = self.most_recent_view.write(); @@ -543,11 +549,12 @@ where }); }); active_views.insert(view.at.hash, view.clone()); - most_recent_view_lock.replace(view.at.hash); + most_recent_view_lock.replace(view.clone()); }; - trace!( + debug!( target: LOG_TARGET, inactive_views = ?self.inactive_views.read().keys(), + duration = ?start.elapsed(), "insert_new_view" ); } @@ -622,19 +629,14 @@ where retain }); - trace!( + debug!( target: LOG_TARGET, inactive_views = ?inactive_views.keys(), + ?dropped_views, "handle_finalized" ); } - trace!( - target: LOG_TARGET, - ?dropped_views, - "handle_finalized" - ); - self.listener.remove_stale_controllers(); self.dropped_stream_controller.remove_transactions(finalized_xts.clone()); @@ -663,11 +665,16 @@ where }) .collect::>() }; + debug!( + target: LOG_TARGET, + duration = ?start.elapsed(), + "finish_background_revalidations before" + ); futures::future::join_all(finish_revalidation_futures).await; - trace!( + debug!( target: LOG_TARGET, duration = ?start.elapsed(), - "finish_background_revalidations" + "finish_background_revalidations after" ); } @@ -777,11 +784,17 @@ where /// Applies pending transaction replacements to the specified view. /// /// After application, all already processed replacements are removed. + #[instrument(level = Level::TRACE, skip_all, target = "txpool", name = "view_store::apply_pending_tx_replacements")] async fn apply_pending_tx_replacements(&self, view: Arc>) { + let start = Instant::now(); let mut futures = vec![]; + let mut replace_count = 0; + let mut remove_count = 0; + for replacement in self.pending_txs_tasks.read().values() { match replacement.action { PreInsertAction::SubmitTx(ref submission) => { + replace_count += 1; let xt_hash = self.api.hash_and_length(&submission.xt).0; futures.push(self.replace_transaction_in_view( view.clone(), @@ -791,12 +804,22 @@ where )); }, PreInsertAction::RemoveSubtree(ref removal) => { + remove_count += 1; view.remove_subtree(&[removal.xt_hash], true, &*removal.listener_action); }, } } - let _results = futures::future::join_all(futures).await; - self.pending_txs_tasks.write().retain(|_, r| r.processed); + let _ = futures::future::join_all(futures).await; + self.pending_txs_tasks.write().retain(|_, r| !r.processed); + debug!( + target: LOG_TARGET, + at_hash = ?view.at.hash, + replace_count, + remove_count, + duration = ?start.elapsed(), + count = ?self.pending_txs_tasks.read().len(), + "apply_pending_tx_replacements" + ); } /// Submits `xt` to the given view. @@ -809,7 +832,9 @@ where xt: ExtrinsicFor, tx_hash: ExtrinsicHash, ) { - if let Err(error) = view.submit_one(source, xt).await { + if let Err(error) = + view.submit_one(source, xt, ValidateTransactionPriority::Maintained).await + { trace!( target: LOG_TARGET, ?tx_hash, diff --git a/substrate/client/transaction-pool/src/graph/mod.rs b/substrate/client/transaction-pool/src/graph/mod.rs index 3e6a63babc99c..c4882ab7bc61d 100644 --- a/substrate/client/transaction-pool/src/graph/mod.rs +++ b/substrate/client/transaction-pool/src/graph/mod.rs @@ -39,7 +39,7 @@ pub mod watcher; pub use self::pool::{ BlockHash, ChainApi, ExtrinsicFor, ExtrinsicHash, NumberFor, Options, Pool, RawExtrinsicFor, - TransactionFor, ValidatedTransactionFor, + TransactionFor, ValidateTransactionPriority, ValidatedTransactionFor, }; pub use validated_pool::{ BaseSubmitOutcome, EventDispatcher, IsValidator, ValidatedPoolSubmitOutcome, diff --git a/substrate/client/transaction-pool/src/graph/pool.rs b/substrate/client/transaction-pool/src/graph/pool.rs index 6aa695e980da0..d6cbf7ccdef64 100644 --- a/substrate/client/transaction-pool/src/graph/pool.rs +++ b/substrate/client/transaction-pool/src/graph/pool.rs @@ -33,7 +33,7 @@ use std::{ sync::Arc, time::{Duration, Instant}, }; -use tracing::{debug, trace}; +use tracing::{debug, instrument, trace, Level}; use super::{ base_pool as base, @@ -60,6 +60,19 @@ pub type TransactionFor = Arc, ExtrinsicFo pub type ValidatedTransactionFor = ValidatedTransaction, ExtrinsicFor, ::Error>; +/// The priority of request to validate the transaction. +#[derive(PartialEq, Copy, Clone)] +pub enum ValidateTransactionPriority { + /// Validate the newly submitted transactions + /// + /// Validation will be done with lower priority. + Submitted, + /// Validate the transaction during maintainance process, + /// + /// Validation will be performed with higher priority. + Maintained, +} + /// Concrete extrinsic validation and query logic. pub trait ChainApi: Send + Sync { /// Block type. @@ -80,6 +93,7 @@ pub trait ChainApi: Send + Sync { at: ::Hash, source: TransactionSource, uxt: ExtrinsicFor, + validation_priority: ValidateTransactionPriority, ) -> Self::ValidationFuture; /// Synchronously verify given extrinsic at given block. @@ -218,12 +232,15 @@ impl> Pool { } /// Imports a bunch of unverified extrinsics to the pool + #[instrument(level = Level::TRACE, skip_all, target="txpool", name = "pool::submit_at")] pub async fn submit_at( &self, at: &HashAndNumber, xts: impl IntoIterator)>, + validation_priority: ValidateTransactionPriority, ) -> Vec, B::Error>> { - let validated_transactions = self.verify(at, xts, CheckBannedBeforeVerify::Yes).await; + let validated_transactions = + self.verify(at, xts, CheckBannedBeforeVerify::Yes, validation_priority).await; self.validated_pool.submit(validated_transactions.into_values()) } @@ -234,8 +251,10 @@ impl> Pool { &self, at: &HashAndNumber, xts: impl IntoIterator)>, + validation_priority: ValidateTransactionPriority, ) -> Vec, B::Error>> { - let validated_transactions = self.verify(at, xts, CheckBannedBeforeVerify::No).await; + let validated_transactions = + self.verify(at, xts, CheckBannedBeforeVerify::No, validation_priority).await; self.validated_pool.submit(validated_transactions.into_values()) } @@ -246,7 +265,10 @@ impl> Pool { source: base::TimedTransactionSource, xt: ExtrinsicFor, ) -> Result, B::Error> { - let res = self.submit_at(at, std::iter::once((source, xt))).await.pop(); + let res = self + .submit_at(at, std::iter::once((source, xt)), ValidateTransactionPriority::Submitted) + .await + .pop(); res.expect("One extrinsic passed; one result returned; qed") } @@ -258,7 +280,14 @@ impl> Pool { xt: ExtrinsicFor, ) -> Result, B::Error> { let (_, tx) = self - .verify_one(at.hash, at.number, source, xt, CheckBannedBeforeVerify::Yes) + .verify_one( + at.hash, + at.number, + source, + xt, + CheckBannedBeforeVerify::Yes, + ValidateTransactionPriority::Submitted, + ) .await; self.validated_pool.submit_and_watch(tx) } @@ -357,6 +386,7 @@ impl> Pool { parent, TransactionSource::InBlock, Arc::from(extrinsic.clone()), + ValidateTransactionPriority::Maintained, ) .await; @@ -436,8 +466,14 @@ impl> Pool { let pruned_transactions = prune_status.pruned.into_iter().map(|tx| (tx.source.clone(), tx.data.clone())); - let reverified_transactions = - self.verify(at, pruned_transactions, CheckBannedBeforeVerify::Yes).await; + let reverified_transactions = self + .verify( + at, + pruned_transactions, + CheckBannedBeforeVerify::Yes, + ValidateTransactionPriority::Maintained, + ) + .await; let pruned_hashes = reverified_transactions.keys().map(Clone::clone).collect::>(); debug!( @@ -464,18 +500,19 @@ impl> Pool { } /// Returns future that validates a bunch of transactions at given block. + #[instrument(level = Level::TRACE, skip_all, target = "txpool",name = "pool::verify")] async fn verify( &self, at: &HashAndNumber, xts: impl IntoIterator)>, check: CheckBannedBeforeVerify, + validation_priority: ValidateTransactionPriority, ) -> IndexMap, ValidatedTransactionFor> { let HashAndNumber { number, hash } = *at; - let res = futures::future::join_all( - xts.into_iter() - .map(|(source, xt)| self.verify_one(hash, number, source, xt, check)), - ) + let res = futures::future::join_all(xts.into_iter().map(|(source, xt)| { + self.verify_one(hash, number, source, xt, check, validation_priority) + })) .await .into_iter() .collect::>(); @@ -484,6 +521,7 @@ impl> Pool { } /// Returns future that validates single transaction at given block. + #[instrument(level = Level::TRACE, skip_all, target = "txpool",name = "pool::verify_one")] pub(crate) async fn verify_one( &self, block_hash: ::Hash, @@ -491,6 +529,7 @@ impl> Pool { source: base::TimedTransactionSource, xt: ExtrinsicFor, check: CheckBannedBeforeVerify, + validation_priority: ValidateTransactionPriority, ) -> (ExtrinsicHash, ValidatedTransactionFor) { let (hash, bytes) = self.validated_pool.api().hash_and_length(&xt); @@ -502,7 +541,12 @@ impl> Pool { let validation_result = self .validated_pool .api() - .validate_transaction(block_hash, source.clone().into(), xt.clone()) + .validate_transaction( + block_hash, + source.clone().into(), + xt.clone(), + validation_priority, + ) .await; let status = match validation_result { @@ -623,10 +667,14 @@ mod tests { // when let txs = txs.into_iter().map(|x| (SOURCE, Arc::from(x))).collect::>(); - let hashes = block_on(pool.submit_at(&api.expect_hash_and_number(0), txs)) - .into_iter() - .map(|r| r.map(|o| o.hash())) - .collect::>(); + let hashes = block_on(pool.submit_at( + &api.expect_hash_and_number(0), + txs, + ValidateTransactionPriority::Submitted, + )) + .into_iter() + .map(|r| r.map(|o| o.hash())) + .collect::>(); debug!(hashes = ?hashes, "-->"); // then diff --git a/substrate/client/transaction-pool/src/graph/tracked_map.rs b/substrate/client/transaction-pool/src/graph/tracked_map.rs index ca1ee035cf37e..e9bdd1fdae05e 100644 --- a/substrate/client/transaction-pool/src/graph/tracked_map.rs +++ b/substrate/client/transaction-pool/src/graph/tracked_map.rs @@ -18,7 +18,7 @@ use parking_lot::{RwLock, RwLockReadGuard, RwLockWriteGuard}; use std::{ - collections::{hash_map::Iter, HashMap}, + collections::HashMap, sync::{ atomic::{AtomicIsize, Ordering as AtomicOrdering}, Arc, @@ -115,11 +115,6 @@ where pub fn values(&self) -> std::collections::hash_map::Values { self.inner_guard.values() } - - /// Returns the number of elements in the map. - pub fn len(&self) -> usize { - self.inner_guard.len() - } } pub struct TrackedMapWriteAccess<'a, K, V> { @@ -154,25 +149,10 @@ where val } - /// Returns `true` if the inner map contains a value for the specified key. - pub fn contains_key(&self, key: &K) -> bool { - self.inner_guard.contains_key(key) - } - /// Returns mutable reference to the contained value by key, if exists. pub fn get_mut(&mut self, key: &K) -> Option<&mut V> { self.inner_guard.get_mut(key) } - - /// Returns the number of elements in the map. - pub fn len(&mut self) -> usize { - self.inner_guard.len() - } - - /// Returns an iterator over all key-value pairs. - pub fn iter(&self) -> Iter<'_, K, V> { - self.inner_guard.iter() - } } #[cfg(test)] diff --git a/substrate/client/transaction-pool/src/graph/validated_pool.rs b/substrate/client/transaction-pool/src/graph/validated_pool.rs index caccc3370a0aa..e4e33111a1006 100644 --- a/substrate/client/transaction-pool/src/graph/validated_pool.rs +++ b/substrate/client/transaction-pool/src/graph/validated_pool.rs @@ -16,12 +16,12 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -use std::{ - collections::{HashMap, HashSet}, - sync::Arc, +use crate::{ + common::{ + sliding_stat::SyncDurationSlidingStats, tracing_log_xt::log_xt_trace, STAT_SLIDING_WINDOW, + }, + insert_and_log_throttled_sync, LOG_TARGET, }; - -use crate::{common::tracing_log_xt::log_xt_trace, LOG_TARGET}; use futures::channel::mpsc::{channel, Sender}; use indexmap::IndexMap; use parking_lot::{Mutex, RwLock}; @@ -31,8 +31,12 @@ use sp_runtime::{ traits::SaturatedConversion, transaction_validity::{TransactionTag as Tag, ValidTransaction}, }; -use std::time::Instant; -use tracing::{debug, trace, warn}; +use std::{ + collections::{HashMap, HashSet}, + sync::Arc, + time::{Duration, Instant}, +}; +use tracing::{trace, warn, Level}; use super::{ base_pool::{self as base, PruneStatus}, @@ -165,6 +169,7 @@ pub struct ValidatedPool> { pub(crate) pool: RwLock, ExtrinsicFor>>, import_notification_sinks: Mutex>>>, rotator: PoolRotator>, + enforce_limits_stats: SyncDurationSlidingStats, } impl> Clone for ValidatedPool { @@ -177,6 +182,7 @@ impl> Clone for ValidatedPool { pool: RwLock::from(self.pool.read().clone()), import_notification_sinks: Default::default(), rotator: self.rotator.clone(), + enforce_limits_stats: self.enforce_limits_stats.clone(), } } } @@ -248,6 +254,9 @@ impl> ValidatedPool { pool: RwLock::new(base_pool), import_notification_sinks: Default::default(), rotator, + enforce_limits_stats: SyncDurationSlidingStats::new(Duration::from_secs( + STAT_SLIDING_WINDOW, + )), } } @@ -292,7 +301,16 @@ impl> ValidatedPool { // only enforce limits if there is at least one imported transaction let removed = if results.iter().any(|res| res.is_ok()) { - self.enforce_limits() + let start = Instant::now(); + let removed = self.enforce_limits(); + insert_and_log_throttled_sync!( + Level::DEBUG, + target:"txpool", + prefix:"enforce_limits_stats", + self.enforce_limits_stats, + start.elapsed().into() + ); + removed } else { Default::default() }; @@ -379,7 +397,7 @@ impl> ValidatedPool { if ready_limit.is_exceeded(status.ready, status.ready_bytes) || future_limit.is_exceeded(status.future, status.future_bytes) { - debug!( + trace!( target: LOG_TARGET, ready_count = ready_limit.count, ready_kb = ready_limit.total_bytes / 1024, diff --git a/substrate/client/transaction-pool/src/lib.rs b/substrate/client/transaction-pool/src/lib.rs index 366d91a973d27..cd788b6948720 100644 --- a/substrate/client/transaction-pool/src/lib.rs +++ b/substrate/client/transaction-pool/src/lib.rs @@ -38,7 +38,7 @@ pub use common::notification_future; pub use fork_aware_txpool::{ForkAwareTxPool, ForkAwareTxPoolTask}; pub use graph::{ base_pool::{Limit as PoolLimit, TimedTransactionSource}, - ChainApi, Options, Pool, + ChainApi, Options, Pool, ValidateTransactionPriority, }; use single_state_txpool::prune_known_txs_for_block; pub use single_state_txpool::{BasicPool, RevalidationType}; @@ -58,3 +58,4 @@ type ReadyIteratorFor = /// It can be used by other components for logging functionality strictly related to txpool (e.g. /// importing transaction). pub const LOG_TARGET: &str = "txpool"; +const LOG_TARGET_STAT: &str = "txpoolstats"; diff --git a/substrate/client/transaction-pool/src/single_state_txpool/revalidation.rs b/substrate/client/transaction-pool/src/single_state_txpool/revalidation.rs index d0efc30156a6e..bf427c3d3a450 100644 --- a/substrate/client/transaction-pool/src/single_state_txpool/revalidation.rs +++ b/substrate/client/transaction-pool/src/single_state_txpool/revalidation.rs @@ -18,7 +18,9 @@ //! Pool periodic revalidation. -use crate::graph::{BlockHash, ChainApi, ExtrinsicHash, ValidatedTransaction}; +use crate::graph::{ + BlockHash, ChainApi, ExtrinsicHash, ValidateTransactionPriority, ValidatedTransaction, +}; use futures::prelude::*; use indexmap::IndexMap; use sc_utils::mpsc::{tracing_unbounded, TracingUnboundedReceiver, TracingUnboundedSender}; @@ -99,8 +101,13 @@ async fn batch_revalidate( let validation_results = futures::future::join_all(batch.into_iter().filter_map(|ext_hash| { pool.validated_pool().ready_by_hash(&ext_hash).map(|ext| { - api.validate_transaction(at, ext.source.clone().into(), ext.data.clone()) - .map(move |validation_result| (validation_result, ext_hash, ext)) + api.validate_transaction( + at, + ext.source.clone().into(), + ext.data.clone(), + ValidateTransactionPriority::Submitted, + ) + .map(move |validation_result| (validation_result, ext_hash, ext)) }) })) .await; @@ -458,14 +465,14 @@ mod tests { let unknown_block = H256::repeat_byte(0x13); let source = TimedTransactionSource::new_external(false); - let uxt_hashes = - block_on(pool.submit_at( - &han_of_block0, - vec![(source.clone(), uxt0.into()), (source, uxt1.into())], - )) - .into_iter() - .map(|r| r.expect("Should be valid").hash()) - .collect::>(); + let uxt_hashes = block_on(pool.submit_at( + &han_of_block0, + vec![(source.clone(), uxt0.into()), (source, uxt1.into())], + ValidateTransactionPriority::Submitted, + )) + .into_iter() + .map(|r| r.expect("Should be valid").hash()) + .collect::>(); assert_eq!(api.validation_requests().len(), 2); assert_eq!(pool.validated_pool().status().ready, 2); diff --git a/substrate/client/transaction-pool/src/single_state_txpool/single_state_txpool.rs b/substrate/client/transaction-pool/src/single_state_txpool/single_state_txpool.rs index b7a011a9c5b16..cefdaec05e558 100644 --- a/substrate/client/transaction-pool/src/single_state_txpool/single_state_txpool.rs +++ b/substrate/client/transaction-pool/src/single_state_txpool/single_state_txpool.rs @@ -33,7 +33,7 @@ use crate::{ self, base_pool::TimedTransactionSource, EventHandler, ExtrinsicHash, IsValidator, RawExtrinsicFor, }, - ReadyIteratorFor, LOG_TARGET, + ReadyIteratorFor, ValidateTransactionPriority, LOG_TARGET, }; use async_trait::async_trait; use futures::{channel::oneshot, future, prelude::*, Future, FutureExt}; @@ -286,7 +286,7 @@ where let number = self.api.resolve_block_number(at); let at = HashAndNumber { hash: at, number: number? }; Ok(pool - .submit_at(&at, xts) + .submit_at(&at, xts, ValidateTransactionPriority::Submitted) .await .into_iter() .map(|result| result.map(|outcome| outcome.hash())) @@ -742,7 +742,12 @@ where }); } - pool.resubmit_at(&hash_and_number, resubmit_transactions).await; + pool.resubmit_at( + &hash_and_number, + resubmit_transactions, + ValidateTransactionPriority::Submitted, + ) + .await; } let extra_pool = pool.clone(); diff --git a/substrate/client/transaction-pool/tests/fatp.rs b/substrate/client/transaction-pool/tests/fatp.rs index c1411b29dafb9..f0e12dfb6a749 100644 --- a/substrate/client/transaction-pool/tests/fatp.rs +++ b/substrate/client/transaction-pool/tests/fatp.rs @@ -1744,14 +1744,14 @@ fn fatp_transactions_purging_stale_on_finalization_works() { assert_eq!(api.validation_requests().len(), 3); assert_eq!(pool.status_all()[&header01.hash()].ready, 3); - assert_eq!(pool.mempool_len(), (1, 2)); + assert_eq!(block_on(pool.mempool_len()), (1, 2)); let header02 = api.push_block(2, vec![xt1.clone(), xt2.clone(), xt3.clone()], true); api.set_nonce(header02.hash(), Alice.into(), 203); block_on(pool.maintain(finalized_block_event(&pool, header01.hash(), header02.hash()))); assert_eq!(pool.status_all()[&header02.hash()].ready, 0); - assert_eq!(pool.mempool_len(), (0, 0)); + assert_eq!(block_on(pool.mempool_len()), (0, 0)); let xt1_events = futures::executor::block_on_stream(watcher1).collect::>(); let xt2_events = futures::executor::block_on_stream(watcher2).collect::>(); @@ -1904,7 +1904,7 @@ fn fatp_avoid_stuck_transaction() { let xt4i_watcher = block_on(pool.submit_and_watch(invalid_hash(), SOURCE, xt4i.clone())).unwrap(); - assert_eq!(pool.mempool_len(), (0, 1)); + assert_eq!(block_on(pool.mempool_len()), (0, 1)); let header01 = api.push_block(1, vec![xt0], true); api.set_nonce(header01.hash(), Alice.into(), 201); @@ -1941,7 +1941,7 @@ fn fatp_avoid_stuck_transaction() { let xt4i_events = futures::executor::block_on_stream(xt4i_watcher).collect::>(); debug!(target: LOG_TARGET, ?xt4i_events, "xt4i_events"); assert_eq!(xt4i_events, vec![TransactionStatus::Future, TransactionStatus::Dropped]); - assert_eq!(pool.mempool_len(), (0, 0)); + assert_eq!(block_on(pool.mempool_len()), (0, 0)); } #[test] @@ -1960,7 +1960,7 @@ fn fatp_future_is_pruned_by_conflicting_tags() { debug!(target: LOG_TARGET, xt2i = ?api.hash_and_length(&xt2i).0, "xt2i"); let _ = block_on(pool.submit_and_watch(invalid_hash(), SOURCE, xt2i.clone())).unwrap(); - assert_eq!(pool.mempool_len(), (0, 1)); + assert_eq!(block_on(pool.mempool_len()), (0, 1)); let header01 = api.push_block(1, vec![], true); let event = new_best_block_event(&pool, None, header01.hash()); @@ -2110,7 +2110,7 @@ fn fatp_dangling_ready_gets_revalidated() { // send xt2 - it will become ready on block 02a. let _ = block_on(pool.submit_and_watch(invalid_hash(), SOURCE, xt2.clone())).unwrap(); assert_pool_status!(header02a.hash(), &pool, 1, 0); - assert_eq!(pool.mempool_len(), (0, 1)); + assert_eq!(block_on(pool.mempool_len()), (0, 1)); //xt2 is still ready: view was just cloned (revalidation executed in background) let header02b = api.push_block_with_parent(header01.hash(), vec![], true); diff --git a/substrate/client/transaction-pool/tests/fatp_common/mod.rs b/substrate/client/transaction-pool/tests/fatp_common/mod.rs index 94fa1639d5649..f41c009a46712 100644 --- a/substrate/client/transaction-pool/tests/fatp_common/mod.rs +++ b/substrate/client/transaction-pool/tests/fatp_common/mod.rs @@ -146,7 +146,7 @@ impl TestPoolBuilder { .map(|blocks| blocks[0].0.header.hash()) .expect("there is block 0. qed"); - let (pool, txpool_task) = if self.use_default_limits { + let (pool, [txpool_task, blocking_task]) = if self.use_default_limits { ForkAwareTxPool::new_test( api.clone(), genesis_hash, @@ -167,6 +167,7 @@ impl TestPoolBuilder { let thread_pool = futures::executor::ThreadPool::new().unwrap(); thread_pool.spawn_ok(txpool_task); + thread_pool.spawn_ok(blocking_task); (pool, api, thread_pool) } diff --git a/substrate/client/transaction-pool/tests/fatp_invalid.rs b/substrate/client/transaction-pool/tests/fatp_invalid.rs index 27033bef09bba..332308fa66e11 100644 --- a/substrate/client/transaction-pool/tests/fatp_invalid.rs +++ b/substrate/client/transaction-pool/tests/fatp_invalid.rs @@ -125,7 +125,7 @@ fn fatp_transactions_purging_invalid_on_finalization_works() { assert_eq!(api.validation_requests().len(), 3); assert_eq!(pool.status_all()[&header01.hash()].ready, 3); - assert_eq!(pool.mempool_len(), (0, 3)); + assert_eq!(block_on(pool.mempool_len()), (0, 3)); let header02 = api.push_block(2, vec![], true); api.add_invalid(&xt1); @@ -142,7 +142,7 @@ fn fatp_transactions_purging_invalid_on_finalization_works() { prev_header = header; } - assert_eq!(pool.mempool_len(), (0, 0)); + assert_eq!(block_on(pool.mempool_len()), (0, 0)); assert_watcher_stream!(watcher1, [TransactionStatus::Ready, TransactionStatus::Invalid]); assert_watcher_stream!(watcher2, [TransactionStatus::Ready, TransactionStatus::Invalid]); @@ -372,7 +372,7 @@ fn fatp_watcher_invalid_single_revalidation2() { let xt0 = uxt(Alice, 200); let xt0_watcher = block_on(pool.submit_and_watch(invalid_hash(), SOURCE, xt0.clone())).unwrap(); - assert_eq!(pool.mempool_len(), (0, 1)); + assert_eq!(block_on(pool.mempool_len()), (0, 1)); api.add_invalid(&xt0); let header01 = api.push_block(1, vec![], true); @@ -382,7 +382,7 @@ fn fatp_watcher_invalid_single_revalidation2() { let xt0_events = futures::executor::block_on_stream(xt0_watcher).collect::>(); debug!(target: LOG_TARGET, ?xt0_events, "xt0_events"); assert_eq!(xt0_events, vec![TransactionStatus::Invalid]); - assert_eq!(pool.mempool_len(), (0, 0)); + assert_eq!(block_on(pool.mempool_len()), (0, 0)); } #[test] @@ -393,7 +393,7 @@ fn fatp_watcher_invalid_single_revalidation3() { let xt0 = uxt(Alice, 150); let xt0_watcher = block_on(pool.submit_and_watch(invalid_hash(), SOURCE, xt0.clone())).unwrap(); - assert_eq!(pool.mempool_len(), (0, 1)); + assert_eq!(block_on(pool.mempool_len()), (0, 1)); let header01 = api.push_block(1, vec![], true); let event = finalized_block_event(&pool, api.genesis_hash(), header01.hash()); @@ -411,7 +411,7 @@ fn fatp_watcher_invalid_single_revalidation3() { let xt0_events = futures::executor::block_on_stream(xt0_watcher).collect::>(); debug!(target: LOG_TARGET, ?xt0_events, "xt0_events"); assert_eq!(xt0_events, vec![TransactionStatus::Invalid]); - assert_eq!(pool.mempool_len(), (0, 0)); + assert_eq!(block_on(pool.mempool_len()), (0, 0)); } #[test] diff --git a/substrate/client/transaction-pool/tests/fatp_limits.rs b/substrate/client/transaction-pool/tests/fatp_limits.rs index 02d307c7e5d05..0a95c8b0cace5 100644 --- a/substrate/client/transaction-pool/tests/fatp_limits.rs +++ b/substrate/client/transaction-pool/tests/fatp_limits.rs @@ -97,20 +97,20 @@ fn fatp_limits_ready_count_works() { assert_ready_iterator!(header01.hash(), pool, [xt1, xt2]); //todo: can we do better? We don't have API to check if event was processed internally. let mut counter = 0; - while pool.mempool_len().0 == 3 { + while block_on(pool.mempool_len()).0 == 3 { sleep(std::time::Duration::from_millis(1)); counter = counter + 1; if counter > 20 { assert!(false, "timeout"); } } - assert_eq!(pool.mempool_len().0, 2); + assert_eq!(block_on(pool.mempool_len()).0, 2); //branch with alice transactions: let header02b = api.push_block(2, vec![xt1.clone(), xt2.clone()], true); let event = new_best_block_event(&pool, Some(header01.hash()), header02b.hash()); block_on(pool.maintain(event)); - assert_eq!(pool.mempool_len().0, 2); + assert_eq!(block_on(pool.mempool_len()).0, 2); assert_pool_status!(header02b.hash(), &pool, 0, 0); assert_ready_iterator!(header02b.hash(), pool, []); @@ -119,7 +119,7 @@ fn fatp_limits_ready_count_works() { api.set_nonce(header02a.hash(), Alice.into(), 201); let event = new_best_block_event(&pool, Some(header02b.hash()), header02a.hash()); block_on(pool.maintain(event)); - assert_eq!(pool.mempool_len().0, 2); + assert_eq!(block_on(pool.mempool_len()).0, 2); // assert_pool_status!(header02a.hash(), &pool, 1, 0); assert_ready_iterator!(header02a.hash(), pool, [xt2]); } @@ -152,7 +152,7 @@ fn fatp_limits_ready_count_works_for_submit_at() { assert!(matches!(results[0].as_ref().unwrap_err().0, TxPoolError::ImmediatelyDropped)); assert!(results[1].as_ref().is_ok()); assert!(results[2].as_ref().is_ok()); - assert_eq!(pool.mempool_len().0, 2); + assert_eq!(block_on(pool.mempool_len()).0, 2); //charlie was not included into view: assert_pool_status!(header01.hash(), &pool, 2, 0); assert_ready_iterator!(header01.hash(), pool, [xt1, xt2]); @@ -186,7 +186,7 @@ fn fatp_limits_ready_count_works_for_submit_and_watch() { assert!(matches!(result2.unwrap_err().0, TxPoolError::ImmediatelyDropped)); assert!(result0.is_ok()); assert!(result1.is_ok()); - assert_eq!(pool.mempool_len().1, 2); + assert_eq!(block_on(pool.mempool_len()).1, 2); //charlie was not included into view: assert_pool_status!(header01.hash(), &pool, 2, 0); assert_ready_iterator!(header01.hash(), pool, [xt0, xt1]); @@ -220,7 +220,7 @@ fn fatp_limits_future_count_works() { assert_pool_status!(header01.hash(), &pool, 0, 2); //todo: can we do better? We don't have API to check if event was processed internally. let mut counter = 0; - while pool.mempool_len().0 != 2 { + while block_on(pool.mempool_len()).0 != 2 { sleep(std::time::Duration::from_millis(1)); counter = counter + 1; if counter > 20 { @@ -234,7 +234,7 @@ fn fatp_limits_future_count_works() { block_on(pool.maintain(event)); assert_pool_status!(header02.hash(), &pool, 2, 0); - assert_eq!(pool.mempool_len().0, 2); + assert_eq!(block_on(pool.mempool_len()).0, 2); } #[test] @@ -428,7 +428,7 @@ fn fatp_limits_watcher_empty_and_full_view_immediately_drops() { assert_eq!(xt0_status, vec![TransactionStatus::Ready, TransactionStatus::Dropped]); assert_pool_status!(header01.hash(), &pool, 2, 0); - assert_eq!(pool.mempool_len().1, 2); + assert_eq!(block_on(pool.mempool_len()).1, 2); let header02e = api.push_block_with_parent( header01.hash(), @@ -456,7 +456,7 @@ fn fatp_limits_watcher_empty_and_full_view_immediately_drops() { assert_pool_status!(header02e.hash(), &pool, 2, 0); assert_ready_iterator!(header02e.hash(), pool, [xt3, xt4]); - assert_eq!(pool.mempool_len().1, 4); + assert_eq!(block_on(pool.mempool_len()).1, 4); let xt1_status = futures::executor::block_on_stream(xt1_watcher).take(2).collect::>(); assert_eq!( @@ -510,7 +510,7 @@ fn fatp_limits_watcher_empty_and_full_view_drops_with_event() { assert_eq!(xt0_status, vec![TransactionStatus::Ready, TransactionStatus::Dropped]); assert_pool_status!(header01.hash(), &pool, 2, 0); - assert_eq!(pool.mempool_len().1, 2); + assert_eq!(block_on(pool.mempool_len()).1, 2); let header02e = api.push_block_with_parent( header01.hash(), @@ -540,7 +540,7 @@ fn fatp_limits_watcher_empty_and_full_view_drops_with_event() { assert_eq!(xt3_status, vec![TransactionStatus::Ready, TransactionStatus::Dropped]); //xt5 got dropped - assert_eq!(pool.mempool_len().1, 4); + assert_eq!(block_on(pool.mempool_len()).1, 4); let xt1_status = futures::executor::block_on_stream(xt1_watcher).take(2).collect::>(); assert_eq!( @@ -631,7 +631,7 @@ fn fatp_limits_future_size_works() { //todo: can we do better? We don't have API to check if event was processed internally. let mut counter = 0; - while pool.mempool_len().0 == 4 { + while block_on(pool.mempool_len()).0 == 4 { sleep(std::time::Duration::from_millis(1)); counter = counter + 1; if counter > 20 { @@ -639,7 +639,7 @@ fn fatp_limits_future_size_works() { } } assert_pool_status!(header01.hash(), &pool, 0, 3); - assert_eq!(pool.mempool_len().0, 3); + assert_eq!(block_on(pool.mempool_len()).0, 3); } #[test] @@ -672,7 +672,7 @@ fn fatp_limits_watcher_ready_transactions_are_not_droped_when_view_is_dropped() block_on(pool.submit_and_watch(invalid_hash(), SOURCE, xt1.clone())).unwrap(); assert_pool_status!(header01.hash(), &pool, 2, 0); - assert_eq!(pool.mempool_len().1, 2); + assert_eq!(block_on(pool.mempool_len()).1, 2); let header02 = api.push_block_with_parent(header01.hash(), vec![], true); block_on(pool.maintain(new_best_block_event(&pool, Some(header01.hash()), header02.hash()))); @@ -683,7 +683,7 @@ fn fatp_limits_watcher_ready_transactions_are_not_droped_when_view_is_dropped() block_on(pool.submit_and_watch(invalid_hash(), SOURCE, xt3.clone())).unwrap(); assert_pool_status!(header02.hash(), &pool, 2, 0); - assert_eq!(pool.mempool_len().1, 4); + assert_eq!(block_on(pool.mempool_len()).1, 4); let header03 = api.push_block_with_parent(header02.hash(), vec![], true); block_on(pool.maintain(new_best_block_event(&pool, Some(header02.hash()), header03.hash()))); @@ -694,7 +694,7 @@ fn fatp_limits_watcher_ready_transactions_are_not_droped_when_view_is_dropped() block_on(pool.submit_and_watch(invalid_hash(), SOURCE, xt5.clone())).unwrap(); assert_pool_status!(header03.hash(), &pool, 2, 0); - assert_eq!(pool.mempool_len().1, 6); + assert_eq!(block_on(pool.mempool_len()).1, 6); let header04 = api.push_block_with_parent(header03.hash(), vec![xt4.clone(), xt5.clone()], true); @@ -719,12 +719,12 @@ fn fatp_limits_watcher_ready_transactions_are_not_droped_when_view_is_dropped() //view 01 was dropped assert!(pool.ready_at(header01.hash()).now_or_never().is_none()); - assert_eq!(pool.mempool_len().1, 6); + assert_eq!(block_on(pool.mempool_len()).1, 6); block_on(pool.maintain(finalized_block_event(&pool, header02.hash(), header03.hash()))); //no revalidation has happened yet, all txs are kept - assert_eq!(pool.mempool_len().1, 6); + assert_eq!(block_on(pool.mempool_len()).1, 6); //view 03 is still there assert!(!pool.status_all().contains_key(&header03.hash())); @@ -741,7 +741,7 @@ fn fatp_limits_watcher_ready_transactions_are_not_droped_when_view_is_dropped() } //now revalidation has happened, all txs are dropped - assert_eq!(pool.mempool_len().1, 0); + assert_eq!(block_on(pool.mempool_len()).1, 0); } #[test] @@ -772,7 +772,7 @@ fn fatp_limits_watcher_future_transactions_are_droped_when_view_is_dropped() { let xt1_watcher = block_on(pool.submit_and_watch(invalid_hash(), SOURCE, xt1.clone())).unwrap(); assert_pool_status!(header01.hash(), &pool, 0, 2); - assert_eq!(pool.mempool_len().1, 2); + assert_eq!(block_on(pool.mempool_len()).1, 2); assert_future_iterator!(header01.hash(), pool, [xt0, xt1]); let header02 = api.push_block_with_parent(header01.hash(), vec![], true); @@ -782,7 +782,7 @@ fn fatp_limits_watcher_future_transactions_are_droped_when_view_is_dropped() { let xt3_watcher = block_on(pool.submit_and_watch(invalid_hash(), SOURCE, xt3.clone())).unwrap(); assert_pool_status!(header02.hash(), &pool, 0, 2); - assert_eq!(pool.mempool_len().1, 4); + assert_eq!(block_on(pool.mempool_len()).1, 4); assert_future_iterator!(header02.hash(), pool, [xt2, xt3]); let header03 = api.push_block_with_parent(header02.hash(), vec![], true); @@ -792,7 +792,7 @@ fn fatp_limits_watcher_future_transactions_are_droped_when_view_is_dropped() { let xt5_watcher = block_on(pool.submit_and_watch(invalid_hash(), SOURCE, xt5.clone())).unwrap(); assert_pool_status!(header03.hash(), &pool, 0, 2); - assert_eq!(pool.mempool_len().1, 6); + assert_eq!(block_on(pool.mempool_len()).1, 6); assert_future_iterator!(header03.hash(), pool, [xt4, xt5]); let header04 = api.push_block_with_parent(header03.hash(), vec![], true); @@ -807,14 +807,14 @@ fn fatp_limits_watcher_future_transactions_are_droped_when_view_is_dropped() { assert_eq!(pool.inactive_views_count(), 0); //todo: can we do better? We don't have API to check if event was processed internally. let mut counter = 0; - while pool.mempool_len().1 != 2 { + while block_on(pool.mempool_len()).1 != 2 { sleep(std::time::Duration::from_millis(1)); counter = counter + 1; if counter > 20 { - assert!(false, "timeout {}", pool.mempool_len().1); + assert!(false, "timeout {}", block_on(pool.mempool_len()).1); } } - assert_eq!(pool.mempool_len().1, 2); + assert_eq!(block_on(pool.mempool_len()).1, 2); assert_pool_status!(header04.hash(), &pool, 0, 2); assert_eq!(pool.futures().len(), 2); diff --git a/substrate/client/transaction-pool/tests/fatp_prios.rs b/substrate/client/transaction-pool/tests/fatp_prios.rs index e4c8321a3d654..38029d6f5db17 100644 --- a/substrate/client/transaction-pool/tests/fatp_prios.rs +++ b/substrate/client/transaction-pool/tests/fatp_prios.rs @@ -53,7 +53,7 @@ fn fatp_prio_ready_higher_evicts_lower() { info!(target: LOG_TARGET, ?result0, "r0"); info!(target: LOG_TARGET, ?result1, "r1"); - info!(target: LOG_TARGET, len = ?pool.mempool_len(), "len"); + info!(target: LOG_TARGET, len = ?block_on(pool.mempool_len()), "len"); info!(target: LOG_TARGET, status = ?pool.status_all()[&header01.hash()], "len"); assert_ready_iterator!(header01.hash(), pool, [xt1]); assert_pool_status!(header01.hash(), &pool, 1, 0); @@ -90,7 +90,7 @@ fn fatp_prio_watcher_ready_higher_evicts_lower() { let xt1_status = futures::executor::block_on_stream(xt1_watcher).take(1).collect::>(); assert_eq!(xt1_status, vec![TransactionStatus::Ready]); - info!(target: LOG_TARGET, len = ?pool.mempool_len(), "len"); + info!(target: LOG_TARGET, len = ?block_on(pool.mempool_len()), "len"); info!(target: LOG_TARGET, pool_status = ?pool.status_all()[&header01.hash()], "len"); assert_ready_iterator!(header01.hash(), pool, [xt1]); assert_pool_status!(header01.hash(), &pool, 1, 0); @@ -133,7 +133,7 @@ fn fatp_prio_watcher_future_higher_evicts_lower() { let xt2_status = futures::executor::block_on_stream(xt2_watcher).take(1).collect::>(); assert_eq!(xt2_status, vec![TransactionStatus::Ready]); - assert_eq!(pool.mempool_len().1, 2); + assert_eq!(block_on(pool.mempool_len()).1, 2); assert_ready_iterator!(header01.hash(), pool, [xt2, xt1]); assert_pool_status!(header01.hash(), &pool, 2, 0); } @@ -288,7 +288,7 @@ fn fatp_prios_watcher_full_mempool_higher_prio_is_accepted() { let xt1_watcher = block_on(pool.submit_and_watch(invalid_hash(), SOURCE, xt1.clone())).unwrap(); assert_pool_status!(header01.hash(), &pool, 2, 0); - assert_eq!(pool.mempool_len().1, 2); + assert_eq!(block_on(pool.mempool_len()).1, 2); let header02 = api.push_block_with_parent(header01.hash(), vec![], true); block_on(pool.maintain(new_best_block_event(&pool, Some(header01.hash()), header02.hash()))); @@ -299,7 +299,7 @@ fn fatp_prios_watcher_full_mempool_higher_prio_is_accepted() { block_on(pool.submit_and_watch(invalid_hash(), SOURCE, xt3.clone())).unwrap(); assert_pool_status!(header02.hash(), &pool, 2, 0); - assert_eq!(pool.mempool_len().1, 4); + assert_eq!(block_on(pool.mempool_len()).1, 4); let header03 = api.push_block_with_parent(header02.hash(), vec![], true); block_on(pool.maintain(new_best_block_event(&pool, Some(header02.hash()), header03.hash()))); @@ -310,7 +310,7 @@ fn fatp_prios_watcher_full_mempool_higher_prio_is_accepted() { block_on(pool.submit_and_watch(invalid_hash(), SOURCE, xt5.clone())).unwrap(); assert_pool_status!(header03.hash(), &pool, 2, 0); - assert_eq!(pool.mempool_len().1, 4); + assert_eq!(block_on(pool.mempool_len()).1, 4); assert_watcher_stream!(xt0_watcher, [TransactionStatus::Ready, TransactionStatus::Dropped]); assert_watcher_stream!(xt1_watcher, [TransactionStatus::Ready, TransactionStatus::Dropped]); @@ -352,7 +352,7 @@ fn fatp_prios_watcher_full_mempool_higher_prio_is_accepted_with_subtree() { assert_ready_iterator!(header01.hash(), pool, [xt3, xt0, xt1, xt2]); assert_pool_status!(header01.hash(), &pool, 4, 0); - assert_eq!(pool.mempool_len().1, 4); + assert_eq!(block_on(pool.mempool_len()).1, 4); let xt4_watcher = block_on(pool.submit_and_watch(invalid_hash(), SOURCE, xt4.clone())).unwrap(); assert_pool_status!(header01.hash(), &pool, 2, 0); @@ -397,7 +397,7 @@ fn fatp_prios_watcher_full_mempool_higher_prio_is_accepted_with_subtree2() { assert_ready_iterator!(header01.hash(), pool, [xt3, xt0, xt1, xt2]); assert_pool_status!(header01.hash(), &pool, 4, 0); - assert_eq!(pool.mempool_len().1, 4); + assert_eq!(block_on(pool.mempool_len()).1, 4); let header02 = api.push_block_with_parent(header01.hash(), vec![], true); block_on(pool.maintain(new_best_block_event(&pool, Some(header01.hash()), header02.hash()))); @@ -444,13 +444,13 @@ fn fatp_prios_watcher_full_mempool_lower_prio_gets_rejected() { block_on(pool.submit_and_watch(invalid_hash(), SOURCE, xt1.clone())).unwrap(); assert_pool_status!(header01.hash(), &pool, 2, 0); - assert_eq!(pool.mempool_len().1, 2); + assert_eq!(block_on(pool.mempool_len()).1, 2); let header02 = api.push_block_with_parent(header01.hash(), vec![], true); block_on(pool.maintain(new_best_block_event(&pool, Some(header01.hash()), header02.hash()))); assert_pool_status!(header02.hash(), &pool, 2, 0); - assert_eq!(pool.mempool_len().1, 2); + assert_eq!(block_on(pool.mempool_len()).1, 2); assert_ready_iterator!(header01.hash(), pool, [xt0, xt1]); assert_ready_iterator!(header02.hash(), pool, [xt0, xt1]); @@ -535,7 +535,7 @@ fn fatp_prios_submit_local_full_mempool_higher_prio_is_accepted() { pool.submit_local(invalid_hash(), xt1.clone()).unwrap(); assert_pool_status!(header01.hash(), &pool, 2, 0); - assert_eq!(pool.mempool_len().0, 2); + assert_eq!(block_on(pool.mempool_len()).0, 2); let header02 = api.push_block_with_parent(header01.hash(), vec![], true); block_on(pool.maintain(new_best_block_event(&pool, Some(header01.hash()), header02.hash()))); @@ -544,7 +544,7 @@ fn fatp_prios_submit_local_full_mempool_higher_prio_is_accepted() { pool.submit_local(invalid_hash(), xt3.clone()).unwrap(); assert_pool_status!(header02.hash(), &pool, 2, 0); - assert_eq!(pool.mempool_len().0, 4); + assert_eq!(block_on(pool.mempool_len()).0, 4); let header03 = api.push_block_with_parent(header02.hash(), vec![], true); block_on(pool.maintain(new_best_block_event(&pool, Some(header02.hash()), header03.hash()))); @@ -553,7 +553,7 @@ fn fatp_prios_submit_local_full_mempool_higher_prio_is_accepted() { pool.submit_local(invalid_hash(), xt5.clone()).unwrap(); assert_pool_status!(header03.hash(), &pool, 2, 0); - assert_eq!(pool.mempool_len().0, 4); + assert_eq!(block_on(pool.mempool_len()).0, 4); assert_ready_iterator!(header01.hash(), pool, []); assert_ready_iterator!(header02.hash(), pool, [xt3, xt2]); diff --git a/substrate/test-utils/runtime/transaction-pool/src/lib.rs b/substrate/test-utils/runtime/transaction-pool/src/lib.rs index f88694fb1071e..01af801fae942 100644 --- a/substrate/test-utils/runtime/transaction-pool/src/lib.rs +++ b/substrate/test-utils/runtime/transaction-pool/src/lib.rs @@ -22,7 +22,7 @@ use codec::Encode; use futures::future::ready; use parking_lot::RwLock; -use sc_transaction_pool::ChainApi; +use sc_transaction_pool::{ChainApi, ValidateTransactionPriority}; use sp_blockchain::{CachedHeaderMetadata, HashAndNumber, TreeRoute}; use sp_runtime::{ generic::{self, BlockId}, @@ -354,6 +354,7 @@ impl ChainApi for TestApi { at: ::Hash, source: TransactionSource, uxt: Arc<::Extrinsic>, + _: ValidateTransactionPriority, ) -> Self::ValidationFuture { ready(self.validate_transaction_blocking(at, source, uxt)) } From 2d0b78ce5bfb2854d440a2189f9dc746c844c466 Mon Sep 17 00:00:00 2001 From: "paritytech-release-backport-bot[bot]" <191369287+paritytech-release-backport-bot[bot]@users.noreply.github.com> Date: Thu, 26 Jun 2025 10:36:13 +0200 Subject: [PATCH 013/128] [stable2506] Backport #8923 (#8971) Backport #8923 into `stable2506` from michalkucharczyk. See the [documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md) on how to use this bot. Co-authored-by: Michal Kucharczyk <1728078+michalkucharczyk@users.noreply.github.com> --- prdoc/pr_8923.prdoc | 11 +++++ .../fork_aware_txpool/fork_aware_txpool.rs | 23 ++++++++-- .../import_notification_sink.rs | 7 +++ .../src/fork_aware_txpool/tx_mem_pool.rs | 14 +++++- .../src/fork_aware_txpool/view_store.rs | 10 +++++ .../src/graph/validated_pool.rs | 8 +++- .../client/transaction-pool/tests/fatp.rs | 45 +++++++++++++++++++ .../runtime/transaction-pool/src/lib.rs | 24 +++++++++- 8 files changed, 134 insertions(+), 8 deletions(-) create mode 100644 prdoc/pr_8923.prdoc diff --git a/prdoc/pr_8923.prdoc b/prdoc/pr_8923.prdoc new file mode 100644 index 0000000000000..c2bb6982aa6fb --- /dev/null +++ b/prdoc/pr_8923.prdoc @@ -0,0 +1,11 @@ +title: '`fatxpool`: fix: remove invalid txs from the dropped stream controller' +doc: +- audience: Node Dev + description: |- + While testing mortal transaction I encountered exactly the same problem as in #8490. + This PR should fix the problem. + + fixes: #8490 +crates: +- name: sc-transaction-pool + bump: minor diff --git a/substrate/client/transaction-pool/src/fork_aware_txpool/fork_aware_txpool.rs b/substrate/client/transaction-pool/src/fork_aware_txpool/fork_aware_txpool.rs index cc655db91f0f9..04a6cd4365ad3 100644 --- a/substrate/client/transaction-pool/src/fork_aware_txpool/fork_aware_txpool.rs +++ b/substrate/client/transaction-pool/src/fork_aware_txpool/fork_aware_txpool.rs @@ -256,8 +256,12 @@ where let (dropped_stream_controller, dropped_stream) = MultiViewDroppedWatcherController::::new(); - let view_store = - Arc::new(ViewStore::new(pool_api.clone(), listener, dropped_stream_controller)); + let view_store = Arc::new(ViewStore::new( + pool_api.clone(), + listener, + dropped_stream_controller, + import_notification_sink.clone(), + )); let dropped_monitor_task = Self::dropped_monitor_task( dropped_stream, @@ -404,8 +408,12 @@ where let (dropped_stream_controller, dropped_stream) = MultiViewDroppedWatcherController::::new(); - let view_store = - Arc::new(ViewStore::new(pool_api.clone(), listener, dropped_stream_controller)); + let view_store = Arc::new(ViewStore::new( + pool_api.clone(), + listener, + dropped_stream_controller, + import_notification_sink.clone(), + )); let dropped_monitor_task = Self::dropped_monitor_task( dropped_stream, @@ -837,6 +845,13 @@ where Ok(final_results) } + + /// Number of notified items in import_notification_sink. + /// + /// Internal detail, exposed only for testing. + pub fn import_notification_sink_len(&self) -> usize { + self.import_notification_sink.notified_items_len() + } } /// Converts the input view-to-statuses map into the output vector of statuses. diff --git a/substrate/client/transaction-pool/src/fork_aware_txpool/import_notification_sink.rs b/substrate/client/transaction-pool/src/fork_aware_txpool/import_notification_sink.rs index 1ca287fa23715..a9a8eb811e4d3 100644 --- a/substrate/client/transaction-pool/src/fork_aware_txpool/import_notification_sink.rs +++ b/substrate/client/transaction-pool/src/fork_aware_txpool/import_notification_sink.rs @@ -245,6 +245,13 @@ where already_notified_items.remove(i); }); } + + /// Lenght of the `already_notified_items` set. + /// + /// Exposed for testing only. + pub fn notified_items_len(&self) -> usize { + self.already_notified_items.read().len() + } } #[cfg(test)] diff --git a/substrate/client/transaction-pool/src/fork_aware_txpool/tx_mem_pool.rs b/substrate/client/transaction-pool/src/fork_aware_txpool/tx_mem_pool.rs index e67566baa8b33..0c9273256b045 100644 --- a/substrate/client/transaction-pool/src/fork_aware_txpool/tx_mem_pool.rs +++ b/substrate/client/transaction-pool/src/fork_aware_txpool/tx_mem_pool.rs @@ -697,8 +697,18 @@ where let revalidated_invalid_hashes_len = revalidated_invalid_hashes.len(); let invalid_hashes_subtrees_len = invalid_hashes_subtrees.len(); - self.listener - .transactions_invalidated(&invalid_hashes_subtrees.into_iter().collect::>()); + let invalid_hashes_subtrees = invalid_hashes_subtrees.into_iter().collect::>(); + + //note: here the consistency is assumed: it is expected that transaction will be + // actually removed from the listener with Invalid event. This means assumption that no view + // is referencing tx as ready. + self.listener.transactions_invalidated(&invalid_hashes_subtrees); + view_store + .import_notification_sink + .clean_notified_items(&invalid_hashes_subtrees); + view_store + .dropped_stream_controller + .remove_transactions(invalid_hashes_subtrees); trace!( target: LOG_TARGET, diff --git a/substrate/client/transaction-pool/src/fork_aware_txpool/view_store.rs b/substrate/client/transaction-pool/src/fork_aware_txpool/view_store.rs index 91ef881a397c6..c392bd80d38d7 100644 --- a/substrate/client/transaction-pool/src/fork_aware_txpool/view_store.rs +++ b/substrate/client/transaction-pool/src/fork_aware_txpool/view_store.rs @@ -19,6 +19,7 @@ //! Transaction pool view store. Basically block hash to view map with some utility methods. use super::{ + import_notification_sink::MultiViewImportNotificationSink, multi_view_listener::{MultiViewListener, TxStatusStream}, view::{View, ViewPoolObserver}, }; @@ -171,6 +172,10 @@ where pub(super) most_recent_view: RwLock>>>, /// The controller of multi view dropped stream. pub(super) dropped_stream_controller: MultiViewDroppedWatcherController, + /// Util providing an aggregated stream of transactions that were imported to ready queue in + /// any view. Reference kept here for clean up purposes. + pub(super) import_notification_sink: + MultiViewImportNotificationSink>, /// The map used to synchronize replacement of transactions between maintain and dropped /// notifcication threads. It is meant to assure that replaced transaction is also removed from /// newly built views in maintain process. @@ -202,6 +207,10 @@ where api: Arc, listener: Arc>, dropped_stream_controller: MultiViewDroppedWatcherController, + import_notification_sink: MultiViewImportNotificationSink< + Block::Hash, + ExtrinsicHash, + >, ) -> Self { Self { api, @@ -210,6 +219,7 @@ where listener, most_recent_view: RwLock::from(None), dropped_stream_controller, + import_notification_sink, pending_txs_tasks: Default::default(), } } diff --git a/substrate/client/transaction-pool/src/graph/validated_pool.rs b/substrate/client/transaction-pool/src/graph/validated_pool.rs index e4e33111a1006..fdd2f280dc205 100644 --- a/substrate/client/transaction-pool/src/graph/validated_pool.rs +++ b/substrate/client/transaction-pool/src/graph/validated_pool.rs @@ -36,7 +36,7 @@ use std::{ sync::Arc, time::{Duration, Instant}, }; -use tracing::{trace, warn, Level}; +use tracing::{debug, trace, warn, Level}; use super::{ base_pool::{self as base, PruneStatus}, @@ -722,6 +722,12 @@ impl> ValidatedPool { } hashes }; + debug!( + target:LOG_TARGET, + to_remove_len=to_remove.len(), + futures_to_remove_len=futures_to_remove.len(), + "clear_stale" + ); // removing old transactions self.remove_invalid(&to_remove); self.remove_invalid(&futures_to_remove); diff --git a/substrate/client/transaction-pool/tests/fatp.rs b/substrate/client/transaction-pool/tests/fatp.rs index f0e12dfb6a749..49adc9ccc9639 100644 --- a/substrate/client/transaction-pool/tests/fatp.rs +++ b/substrate/client/transaction-pool/tests/fatp.rs @@ -484,6 +484,51 @@ fn fatp_linear_old_ready_becoming_stale() { } } +#[test] +fn fatp_proper_cleanup_after_mortal_tx_becoming_invalid() { + sp_tracing::try_init_simple(); + + let (pool, api, _) = pool(); + + let xts = vec![uxt(Alice, 200), uxt(Alice, 201), uxt(Alice, 202)]; + + api.set_valid_till(&xts[0], 66); + api.set_valid_till(&xts[1], 66); + api.set_valid_till(&xts[2], 66); + + let header01 = api.push_block(1, vec![], true); + let event = new_best_block_event(&pool, None, header01.hash()); + block_on(pool.maintain(event)); + + xts.into_iter().for_each(|xt| { + block_on(pool.submit_one(invalid_hash(), SOURCE, xt)).unwrap(); + }); + assert_eq!(pool.status_all()[&header01.hash()].ready, 3); + assert_eq!(pool.status_all()[&header01.hash()].future, 0); + + // Import enough blocks to make our transactions stale (longevity is 64) + let mut prev_header = header01; + for n in 2..67 { + let header = api.push_block_with_parent(prev_header.hash(), vec![], true); + let event = new_best_block_event(&pool, Some(prev_header.hash()), header.hash()); + block_on(pool.maintain(event)); + + if n == 66 { + assert_eq!(pool.status_all()[&header.hash()].ready, 0); + assert_eq!(pool.status_all()[&header.hash()].future, 0); + } else { + assert_eq!(pool.status_all()[&header.hash()].ready, 3); + assert_eq!(pool.status_all()[&header.hash()].future, 0); + } + prev_header = header; + } + + let header = api.push_block_with_parent(prev_header.hash(), vec![], true); + let event = finalized_block_event(&pool, prev_header.hash(), header.hash()); + block_on(pool.maintain(event)); + assert_eq!(pool.import_notification_sink_len(), 0); +} + #[test] fn fatp_fork_reorg() { sp_tracing::try_init_simple(); diff --git a/substrate/test-utils/runtime/transaction-pool/src/lib.rs b/substrate/test-utils/runtime/transaction-pool/src/lib.rs index 01af801fae942..d0518bd7fa1a3 100644 --- a/substrate/test-utils/runtime/transaction-pool/src/lib.rs +++ b/substrate/test-utils/runtime/transaction-pool/src/lib.rs @@ -85,6 +85,7 @@ pub struct ChainState { pub nonces: HashMap>, pub invalid_hashes: HashSet, pub priorities: HashMap, + pub valid_till_blocks: HashMap, } /// Test Api for transaction pool. @@ -269,6 +270,14 @@ impl TestApi { .insert(Self::hash_and_length_inner(xts).0, priority); } + /// Set a transaction mortality (block at which it will expire). + pub fn set_valid_till(&self, xts: &Extrinsic, valid_till: u64) { + self.chain + .write() + .valid_till_blocks + .insert(Self::hash_and_length_inner(xts).0, valid_till); + } + /// Query validation requests received. pub fn validation_requests(&self) -> Vec { self.validation_requests.read().clone() @@ -443,11 +452,24 @@ impl ChainApi for TestApi { } let priority = self.chain.read().priorities.get(&self.hash_and_length(&uxt).0).cloned(); + let longevity = self + .chain + .read() + .valid_till_blocks + .get(&self.hash_and_length(&uxt).0) + .cloned() + .map(|valid_till| valid_till.saturating_sub(block_number.unwrap())) + .unwrap_or(64); + + if longevity == 0 { + return Ok(Err(TransactionValidityError::Invalid(InvalidTransaction::BadProof))) + } + let mut validity = ValidTransaction { priority: priority.unwrap_or(1), requires, provides, - longevity: 64, + longevity, propagate: true, }; From 8403607868038002758fcee140eb19e4b79dfaf3 Mon Sep 17 00:00:00 2001 From: "paritytech-release-backport-bot[bot]" <191369287+paritytech-release-backport-bot[bot]@users.noreply.github.com> Date: Thu, 26 Jun 2025 10:19:15 +0000 Subject: [PATCH 014/128] [stable2506] Backport #8831 (#8843) Backport #8831 into `stable2506` from alexggh. See the [documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md) on how to use this bot. Signed-off-by: Alexandru Gheorghe Co-authored-by: Alexandru Gheorghe <49718502+alexggh@users.noreply.github.com> Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .../core/dispute-coordinator/src/scraping/mod.rs | 5 ++++- prdoc/pr_8831.prdoc | 12 ++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 prdoc/pr_8831.prdoc diff --git a/polkadot/node/core/dispute-coordinator/src/scraping/mod.rs b/polkadot/node/core/dispute-coordinator/src/scraping/mod.rs index 9aaad9d1c5284..48b24514e5662 100644 --- a/polkadot/node/core/dispute-coordinator/src/scraping/mod.rs +++ b/polkadot/node/core/dispute-coordinator/src/scraping/mod.rs @@ -50,7 +50,10 @@ mod candidates; /// `last_observed_blocks` LRU. This means, this value should the very least be as large as the /// number of expected forks for keeping chain scraping efficient. Making the LRU much larger than /// that has very limited use. -const LRU_OBSERVED_BLOCKS_CAPACITY: u32 = 20; +/// In cases of high load when finality lags, forks could appear anywhere from the last finalized +/// block to best, hence this number needs to be large enough to hold all the hashes from best to +/// finalized. +const LRU_OBSERVED_BLOCKS_CAPACITY: u32 = 2 * MAX_FINALITY_LAG; /// `ScrapedUpdates` /// diff --git a/prdoc/pr_8831.prdoc b/prdoc/pr_8831.prdoc new file mode 100644 index 0000000000000..d82ebc1690c28 --- /dev/null +++ b/prdoc/pr_8831.prdoc @@ -0,0 +1,12 @@ +title: 'dispute-coordinator: increase lru_observed_blocks_capacity' +doc: +- audience: Node Dev + description: |- + Under increase load with finality lagging behind there is a risk for blocks to arrive late or out of sequence in that case we will end up scrapping from the received block un till last finalized block and then process all the dispute in-between. + + This couple with other inefficiencies like https://github.com/paritytech/polkadot-sdk/issues/8823 will increase unnecessarily the load on dispute-coordinator. + + Decided to make this super large to err on the cautious side, the Hash size is only 32 bytes, so this will make the LRU grow up to 65k, which I don't think is a significant increase. +crates: +- name: polkadot-node-core-dispute-coordinator + bump: patch From d0f4111fae3879c386eca393c3482c494bd519c5 Mon Sep 17 00:00:00 2001 From: "paritytech-release-backport-bot[bot]" <191369287+paritytech-release-backport-bot[bot]@users.noreply.github.com> Date: Thu, 26 Jun 2025 11:52:40 +0000 Subject: [PATCH 015/128] [stable2506] Backport #8832 (#8847) Backport #8832 into `stable2506` from alexggh. See the [documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md) on how to use this bot. Signed-off-by: Alexandru Gheorghe Co-authored-by: Alexandru Gheorghe <49718502+alexggh@users.noreply.github.com> Co-authored-by: Andrei Sandu <54316454+sandreim@users.noreply.github.com> Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Egor_P --- polkadot/node/subsystem-util/src/runtime/mod.rs | 8 +++++++- prdoc/pr_8832.prdoc | 10 ++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 prdoc/pr_8832.prdoc diff --git a/polkadot/node/subsystem-util/src/runtime/mod.rs b/polkadot/node/subsystem-util/src/runtime/mod.rs index 1fbae0e09872d..317d25bef8e9a 100644 --- a/polkadot/node/subsystem-util/src/runtime/mod.rs +++ b/polkadot/node/subsystem-util/src/runtime/mod.rs @@ -16,6 +16,7 @@ //! Convenient interface to runtime information. +use polkadot_node_primitives::MAX_FINALITY_LAG; use schnellru::{ByLength, LruMap}; use codec::Encode; @@ -135,7 +136,12 @@ impl RuntimeInfo { /// Create with more elaborate configuration options. pub fn new_with_config(cfg: Config) -> Self { Self { - session_index_cache: LruMap::new(ByLength::new(cfg.session_cache_lru_size.max(10))), + // Usually messages are processed for blocks pointing to hashes from last finalized + // block to to best, so make this cache large enough to hold at least this amount of + // hashes, so that we get the benefit of caching even when finality lag is large. + session_index_cache: LruMap::new(ByLength::new( + cfg.session_cache_lru_size.max(2 * MAX_FINALITY_LAG), + )), session_info_cache: LruMap::new(ByLength::new(cfg.session_cache_lru_size)), disabled_validators_cache: LruMap::new(ByLength::new(100)), pinned_blocks: LruMap::new(ByLength::new(cfg.session_cache_lru_size)), diff --git a/prdoc/pr_8832.prdoc b/prdoc/pr_8832.prdoc new file mode 100644 index 0000000000000..7f8d6eb231dd8 --- /dev/null +++ b/prdoc/pr_8832.prdoc @@ -0,0 +1,10 @@ +title: increase session index cache +doc: +- audience: Node Dev + description: |- + A 10 session index cache is not enough when you run under intense pressure and finality is lagg since you will end requesting the session index for blocks older than that. So let's make this cache larger to achieve its purpose even under intense load when it actually matters more to be faster. + + The session_index_cache keeps a Hash and a u32, so that's about 36 bytes per entry, with this increase it can grow up to 65k which is not that big in my book. +crates: +- name: polkadot-node-subsystem-util + bump: patch From 51ac2a9e7f80404c09c12b81bbd4916e33e70c12 Mon Sep 17 00:00:00 2001 From: "paritytech-release-backport-bot[bot]" <191369287+paritytech-release-backport-bot[bot]@users.noreply.github.com> Date: Thu, 26 Jun 2025 13:06:55 +0000 Subject: [PATCH 016/128] [stable2506] Backport #8834 (#8890) Backport #8834 into `stable2506` from alexggh. See the [documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md) on how to use this bot. Signed-off-by: Alexandru Gheorghe Co-authored-by: Alexandru Gheorghe <49718502+alexggh@users.noreply.github.com> Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Javier Viola Co-authored-by: Javier Viola <363911+pepoviola@users.noreply.github.com> Co-authored-by: Egor_P --- Cargo.lock | 8 ++-- .../core/approval-voting-parallel/src/lib.rs | 2 +- polkadot/node/overseer/src/lib.rs | 28 ++++++++++-- .../node/service/src/relay_chain_selection.rs | 43 +++++++++++++++---- polkadot/node/service/src/tests.rs | 21 +++++++++ prdoc/pr_8834.prdoc | 15 +++++++ 6 files changed, 100 insertions(+), 17 deletions(-) create mode 100644 prdoc/pr_8834.prdoc diff --git a/Cargo.lock b/Cargo.lock index 9c2477b01573e..90b99c3f90fd3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -11158,9 +11158,9 @@ checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" [[package]] name = "orchestra" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41f6bbacc8c189a3f2e45e0fd0436e5d97f194db888e721bdbc3973e7dbed4c2" +checksum = "19051f0b0512402f5d52d6776999f55996f01887396278aeeccbbdfbc83eef2d" dependencies = [ "async-trait", "dyn-clonable", @@ -11175,9 +11175,9 @@ dependencies = [ [[package]] name = "orchestra-proc-macro" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7b1d40dd8f367db3c65bec8d3dd47d4a604ee8874480738f93191bddab4e0e0" +checksum = "43dfaf083aef571385fccfdc3a2f8ede8d0a1863160455d4f2b014d8f7d04a3f" dependencies = [ "expander", "indexmap 2.9.0", diff --git a/polkadot/node/core/approval-voting-parallel/src/lib.rs b/polkadot/node/core/approval-voting-parallel/src/lib.rs index fed4b6789647a..bbef41f8afccc 100644 --- a/polkadot/node/core/approval-voting-parallel/src/lib.rs +++ b/polkadot/node/core/approval-voting-parallel/src/lib.rs @@ -347,7 +347,7 @@ async fn run_main_loop( // The message the approval voting subsystem would've handled. ApprovalVotingParallelMessage::ApprovedAncestor(_, _,_) | ApprovalVotingParallelMessage::GetApprovalSignaturesForCandidate(_, _) => { - to_approval_voting_worker.send_message( + to_approval_voting_worker.send_message_with_priority::( msg.try_into().expect( "Message is one of ApprovedAncestor, GetApprovalSignaturesForCandidate and that can be safely converted to ApprovalVotingMessage; qed" diff --git a/polkadot/node/overseer/src/lib.rs b/polkadot/node/overseer/src/lib.rs index 92989e2b520e9..28a201f102c18 100644 --- a/polkadot/node/overseer/src/lib.rs +++ b/polkadot/node/overseer/src/lib.rs @@ -190,9 +190,20 @@ impl Handle { self.send_and_log_error(Event::BlockImported(block)).await } - /// Send some message to one of the `Subsystem`s. + /// Send some message with normal priority to one of the `Subsystem`s. pub async fn send_msg(&mut self, msg: impl Into, origin: &'static str) { - self.send_and_log_error(Event::MsgToSubsystem { msg: msg.into(), origin }).await + self.send_msg_with_priority(msg, origin, PriorityLevel::Normal).await + } + + /// Send some message with the specified priority to one of the `Subsystem`s. + pub async fn send_msg_with_priority( + &mut self, + msg: impl Into, + origin: &'static str, + priority: PriorityLevel, + ) { + self.send_and_log_error(Event::MsgToSubsystem { msg: msg.into(), origin, priority }) + .await } /// Send a message not providing an origin. @@ -296,6 +307,8 @@ pub enum Event { msg: AllMessages, /// The originating subsystem name. origin: &'static str, + /// The priority of the message. + priority: PriorityLevel, }, /// A request from the outer world. ExternalRequest(ExternalRequest), @@ -764,8 +777,15 @@ where select! { msg = self.events_rx.select_next_some() => { match msg { - Event::MsgToSubsystem { msg, origin } => { - self.route_message(msg.into(), origin).await?; + Event::MsgToSubsystem { msg, origin, priority } => { + match priority { + PriorityLevel::Normal => { + self.route_message(msg.into(), origin).await?; + }, + PriorityLevel::High => { + self.route_message_with_priority::(msg.into(), origin).await?; + }, + } self.metrics.on_message_relayed(); } Event::Stop => { diff --git a/polkadot/node/service/src/relay_chain_selection.rs b/polkadot/node/service/src/relay_chain_selection.rs index e48874f01ca6f..f016b8ba8b05b 100644 --- a/polkadot/node/service/src/relay_chain_selection.rs +++ b/polkadot/node/service/src/relay_chain_selection.rs @@ -43,7 +43,7 @@ use polkadot_node_subsystem::messages::{ ChainSelectionMessage, DisputeCoordinatorMessage, HighestApprovedAncestorBlock, }; use polkadot_node_subsystem_util::metrics::{self, prometheus}; -use polkadot_overseer::{AllMessages, Handle}; +use polkadot_overseer::{AllMessages, Handle, PriorityLevel}; use polkadot_primitives::{Block as PolkadotBlock, BlockNumber, Hash, Header as PolkadotHeader}; use sp_consensus::{Error as ConsensusError, SelectChain}; use std::sync::Arc; @@ -238,7 +238,7 @@ pub struct SelectRelayChainInner { impl SelectRelayChainInner where B: HeaderProviderProvider, - OH: OverseerHandleT, + OH: OverseerHandleT + OverseerHandleWithPriorityT, { /// Create a new [`SelectRelayChainInner`] wrapping the given chain backend /// and a handle to the overseer. @@ -286,7 +286,7 @@ where impl Clone for SelectRelayChainInner where B: HeaderProviderProvider + Send + Sync, - OH: OverseerHandleT, + OH: OverseerHandleT + OverseerHandleWithPriorityT, { fn clone(&self) -> Self { SelectRelayChainInner { @@ -325,6 +325,17 @@ pub trait OverseerHandleT: Clone + Send + Sync { async fn send_msg>(&mut self, msg: M, origin: &'static str); } +/// Trait for the overseer handle that allows sending messages with the specified priority level. +#[async_trait::async_trait] +pub trait OverseerHandleWithPriorityT: Clone + Send + Sync { + async fn send_msg_with_priority>( + &mut self, + msg: M, + origin: &'static str, + priority: PriorityLevel, + ); +} + #[async_trait::async_trait] impl OverseerHandleT for Handle { async fn send_msg>(&mut self, msg: M, origin: &'static str) { @@ -332,10 +343,22 @@ impl OverseerHandleT for Handle { } } +#[async_trait::async_trait] +impl OverseerHandleWithPriorityT for Handle { + async fn send_msg_with_priority>( + &mut self, + msg: M, + origin: &'static str, + priority: PriorityLevel, + ) { + Handle::send_msg_with_priority(self, msg, origin, priority).await + } +} + impl SelectRelayChainInner where B: HeaderProviderProvider, - OH: OverseerHandleT + 'static, + OH: OverseerHandleT + OverseerHandleWithPriorityT + 'static, { /// Get all leaves of the chain, i.e. block hashes that are suitable to /// build upon and have no suitable children. @@ -472,9 +495,10 @@ where .await; } else { overseer - .send_msg( + .send_msg_with_priority( ApprovalVotingMessage::ApprovedAncestor(subchain_head, target_number, tx), std::any::type_name::(), + PriorityLevel::High, ) .await; } @@ -503,16 +527,18 @@ where let lag_update_task = async move { if approval_voting_parallel_enabled { overseer_handle - .send_msg( + .send_msg_with_priority( ApprovalVotingParallelMessage::ApprovalCheckingLagUpdate(lag), std::any::type_name::(), + PriorityLevel::High, ) .await; } else { overseer_handle - .send_msg( + .send_msg_with_priority( ApprovalDistributionMessage::ApprovalCheckingLagUpdate(lag), std::any::type_name::(), + PriorityLevel::High, ) .await; } @@ -542,13 +568,14 @@ where // 3. Constrain according to disputes: let (tx, rx) = oneshot::channel(); overseer - .send_msg( + .send_msg_with_priority( DisputeCoordinatorMessage::DetermineUndisputedChain { base: (target_number, target_hash), block_descriptions: subchain_block_descriptions, tx, }, std::any::type_name::(), + PriorityLevel::High, ) .await; diff --git a/polkadot/node/service/src/tests.rs b/polkadot/node/service/src/tests.rs index 78bbfcd5444f0..1b8095436c6ec 100644 --- a/polkadot/node/service/src/tests.rs +++ b/polkadot/node/service/src/tests.rs @@ -20,6 +20,7 @@ use futures::channel::oneshot::Receiver; use polkadot_node_primitives::approval::v2::VrfSignature; use polkadot_node_subsystem::messages::{AllMessages, BlockDescription}; use polkadot_node_subsystem_util::TimeoutExt; +use polkadot_overseer::{HighPriority, PriorityLevel}; use polkadot_test_client::Sr25519Keyring; use sp_consensus_babe::{ digests::{CompatibleDigestItem, PreDigest, SecondaryVRFPreDigest}, @@ -55,6 +56,26 @@ impl OverseerHandleT for TestSubsystemSender { } } +#[async_trait::async_trait] +impl OverseerHandleWithPriorityT for TestSubsystemSender { + async fn send_msg_with_priority>( + &mut self, + msg: M, + _origin: &'static str, + priority: PriorityLevel, + ) { + match priority { + PriorityLevel::High => { + TestSubsystemSender::send_message_with_priority::(self, msg.into()) + .await; + }, + PriorityLevel::Normal => { + TestSubsystemSender::send_message(self, msg.into()).await; + }, + } + } +} + struct TestHarness { virtual_overseer: VirtualOverseer, case_vars: CaseVars, diff --git a/prdoc/pr_8834.prdoc b/prdoc/pr_8834.prdoc new file mode 100644 index 0000000000000..414d8e89280bb --- /dev/null +++ b/prdoc/pr_8834.prdoc @@ -0,0 +1,15 @@ +title: extend overseer to send priority messages +doc: +- audience: Node Dev + description: |- + Extend overseer to send priority messages, the new functionality is used for sending messages + on the grandpa call path when we call dispute-coordinator and approval-voting in + finality_target_with_longest_chain to make sure we don't block unnecessarily. + +crates: +- name: polkadot-node-core-approval-voting-parallel + bump: patch +- name: polkadot-overseer + bump: patch +- name: polkadot-service + bump: patch From e1b3e383add5795b809cbe999ceb6f38576e13e1 Mon Sep 17 00:00:00 2001 From: "paritytech-release-backport-bot[bot]" <191369287+paritytech-release-backport-bot[bot]@users.noreply.github.com> Date: Thu, 26 Jun 2025 13:51:23 +0000 Subject: [PATCH 017/128] [stable2506] Backport #8903 (#8916) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Backport #8903 into `stable2506` from bkchr. See the [documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md) on how to use this bot. Co-authored-by: Bastian Köcher Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Egor_P --- cumulus/pallets/parachain-system/src/lib.rs | 10 ---------- prdoc/pr_8903.prdoc | 8 ++++++++ 2 files changed, 8 insertions(+), 10 deletions(-) create mode 100644 prdoc/pr_8903.prdoc diff --git a/cumulus/pallets/parachain-system/src/lib.rs b/cumulus/pallets/parachain-system/src/lib.rs index db84f562a6f67..6c697a6c4ce72 100644 --- a/cumulus/pallets/parachain-system/src/lib.rs +++ b/cumulus/pallets/parachain-system/src/lib.rs @@ -585,16 +585,6 @@ pub mod pallet { // Always try to read `UpgradeGoAhead` in `on_finalize`. weight += T::DbWeight::get().reads(1); - // Post a digest that contains the information for selecting a core. - let selected_core = T::SelectCore::selected_core(); - frame_system::Pallet::::deposit_log( - cumulus_primitives_core::CumulusDigestItem::SelectCore { - selector: selected_core.0, - claim_queue_offset: selected_core.1, - } - .to_digest_item(), - ); - weight } } diff --git a/prdoc/pr_8903.prdoc b/prdoc/pr_8903.prdoc new file mode 100644 index 0000000000000..3f5d00b48db80 --- /dev/null +++ b/prdoc/pr_8903.prdoc @@ -0,0 +1,8 @@ +title: 'ParachainSystem: Do not emit the `SelectCore` digest' +doc: +- audience: Runtime Dev + description: |- + This will be moved into an inherent digest. +crates: +- name: cumulus-pallet-parachain-system + bump: patch From ad97b9d997cfc76fc9ad64c9fafeebdf6d4e7d0c Mon Sep 17 00:00:00 2001 From: "paritytech-release-backport-bot[bot]" <191369287+paritytech-release-backport-bot[bot]@users.noreply.github.com> Date: Thu, 26 Jun 2025 15:21:41 +0000 Subject: [PATCH 018/128] [stable2506] Backport #8925 (#8934) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Backport #8925 into `stable2506` from bkchr. See the [documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md) on how to use this bot. Co-authored-by: Bastian Köcher Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- prdoc/pr_8925.prdoc | 10 ++++++++++ substrate/frame/multisig/src/lib.rs | 16 ++++++++++++---- substrate/frame/multisig/src/tests.rs | 10 ++++++++++ 3 files changed, 32 insertions(+), 4 deletions(-) create mode 100644 prdoc/pr_8925.prdoc diff --git a/prdoc/pr_8925.prdoc b/prdoc/pr_8925.prdoc new file mode 100644 index 0000000000000..4113bc41b493c --- /dev/null +++ b/prdoc/pr_8925.prdoc @@ -0,0 +1,10 @@ +title: 'Multisig::as_multi_threshold_1: Send `MultisigExecuted` event' +doc: +- audience: Runtime User + description: |- + So the behavior is the same as `as_multi` when it comes to sending an event. + + Closes: https://github.com/paritytech/polkadot-sdk/issues/8924 +crates: +- name: pallet-multisig + bump: patch diff --git a/substrate/frame/multisig/src/lib.rs b/substrate/frame/multisig/src/lib.rs index b428d9210243d..d6694893974ce 100644 --- a/substrate/frame/multisig/src/lib.rs +++ b/substrate/frame/multisig/src/lib.rs @@ -318,12 +318,20 @@ pub mod pallet { ensure!(!other_signatories.is_empty(), Error::::TooFewSignatories); let other_signatories_len = other_signatories.len(); ensure!(other_signatories_len < max_sigs, Error::::TooManySignatories); - let signatories = Self::ensure_sorted_and_insert(other_signatories, who)?; + let signatories = Self::ensure_sorted_and_insert(other_signatories, who.clone())?; let id = Self::multi_account_id(&signatories, 1); - let call_len = call.using_encoded(|c| c.len()); - let result = call.dispatch(RawOrigin::Signed(id).into()); + let (call_len, call_hash) = call.using_encoded(|c| (c.len(), blake2_256(&c))); + let result = call.dispatch(RawOrigin::Signed(id.clone()).into()); + + Self::deposit_event(Event::MultisigExecuted { + approving: who, + timepoint: Self::timepoint(), + multisig: id, + call_hash, + result: result.map(|_| ()).map_err(|e| e.error), + }); result .map(|post_dispatch_info| { @@ -582,7 +590,7 @@ pub mod pallet { let remaining_unreserved = T::Currency::unreserve(&who, excess); if !remaining_unreserved.is_zero() { defensive!( - "Failed to unreserve for full amount for multisig. (Call Hash, Requested, Actual): ", + "Failed to unreserve for full amount for multisig. (Call Hash, Requested, Actual): ", (call_hash, excess, excess.saturating_sub(remaining_unreserved)) ); } diff --git a/substrate/frame/multisig/src/tests.rs b/substrate/frame/multisig/src/tests.rs index a5206342c762e..8366eb58fc1ca 100644 --- a/substrate/frame/multisig/src/tests.rs +++ b/substrate/frame/multisig/src/tests.rs @@ -595,6 +595,16 @@ fn multisig_1_of_3_works() { call_transfer(6, 15) )); + System::assert_last_event( + pallet_multisig::Event::MultisigExecuted { + approving: 1, + timepoint: now(), + multisig: multi, + call_hash: hash, + result: Ok(()), + } + .into(), + ); assert_eq!(Balances::free_balance(6), 15); }); } From 13bc3012555dfa01ab0fbac3f835b6d54f309ab4 Mon Sep 17 00:00:00 2001 From: "paritytech-release-backport-bot[bot]" <191369287+paritytech-release-backport-bot[bot]@users.noreply.github.com> Date: Fri, 27 Jun 2025 09:01:32 +0000 Subject: [PATCH 019/128] [stable2506] Backport #8861 (#8926) Backport #8861 into `stable2506` from ordian. See the [documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md) on how to use this bot. Co-authored-by: ordian --- polkadot/runtime/parachains/src/inclusion/mod.rs | 8 ++++++-- prdoc/pr_8861.prdoc | 10 ++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 prdoc/pr_8861.prdoc diff --git a/polkadot/runtime/parachains/src/inclusion/mod.rs b/polkadot/runtime/parachains/src/inclusion/mod.rs index 001394d1c9588..6bca327984d80 100644 --- a/polkadot/runtime/parachains/src/inclusion/mod.rs +++ b/polkadot/runtime/parachains/src/inclusion/mod.rs @@ -615,8 +615,12 @@ impl Pallet { } }); } - - (weight, freed_cores) + // For relay chain blocks, we're (ab)using the proof size + // to limit the raw transaction size of `ParaInherent` and + // there's no state proof (aka PoV) associated with it. + // Since we already accounted for bitfields size, we should + // not include `enact_candidate` PoV impact here. + (weight.set_proof_size(0), freed_cores) } /// Process candidates that have been backed. Provide a set of diff --git a/prdoc/pr_8861.prdoc b/prdoc/pr_8861.prdoc new file mode 100644 index 0000000000000..7abd9660fdd7c --- /dev/null +++ b/prdoc/pr_8861.prdoc @@ -0,0 +1,10 @@ +title: "paras_inherent: fix overweight warn" + +doc: + - audience: Runtime Dev + description: | + This fixes an incorrect warning in the relay chain runtime + +crates: +- name: polkadot-runtime-parachains + bump: patch From 07b3450750ea1dd2ab9b0add0d40c2485bac6fa5 Mon Sep 17 00:00:00 2001 From: "paritytech-release-backport-bot[bot]" <191369287+paritytech-release-backport-bot[bot]@users.noreply.github.com> Date: Fri, 27 Jun 2025 16:11:19 +0000 Subject: [PATCH 020/128] [stable2506] Backport #8076 (#9005) Backport #8076 into `stable2506` from gui1117. See the [documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md) on how to use this bot. --------- Co-authored-by: Guillaume Thiolliere Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Sebastian Kunert Co-authored-by: Iulian Barbu <14218860+iulianbarbu@users.noreply.github.com> Co-authored-by: Egor_P --- Cargo.lock | 9 ++ cumulus/client/service/src/lib.rs | 5 +- .../runtimes/people/people-westend/Cargo.toml | 2 + .../runtimes/people/people-westend/src/lib.rs | 37 ++++++ cumulus/polkadot-omni-node/lib/Cargo.toml | 5 + cumulus/polkadot-omni-node/lib/src/cli.rs | 8 ++ .../polkadot-omni-node/lib/src/common/mod.rs | 7 ++ .../polkadot-omni-node/lib/src/common/rpc.rs | 13 +- .../polkadot-omni-node/lib/src/common/spec.rs | 44 ++++++- .../lib/src/common/statement_store.rs | 96 ++++++++++++++ .../lib/src/common/types.rs | 6 +- .../lib/src/fake_runtime_api/utils.rs | 9 ++ .../lib/src/nodes/manual_seal.rs | 1 + cumulus/test/service/src/lib.rs | 3 + cumulus/zombienet/zombienet-sdk/Cargo.toml | 3 + cumulus/zombienet/zombienet-sdk/run.sh | 2 +- cumulus/zombienet/zombienet-sdk/tests/lib.rs | 3 + .../tests/statement_store/mod.rs | 118 ++++++++++++++++++ prdoc/pr_8076.prdoc | 24 ++++ templates/parachain/node/src/service.rs | 5 +- 20 files changed, 390 insertions(+), 10 deletions(-) create mode 100644 cumulus/polkadot-omni-node/lib/src/common/statement_store.rs create mode 100644 cumulus/zombienet/zombienet-sdk/tests/statement_store/mod.rs create mode 100644 prdoc/pr_8076.prdoc diff --git a/Cargo.lock b/Cargo.lock index 90b99c3f90fd3..e5cabf079514e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5151,6 +5151,9 @@ dependencies = [ "polkadot-primitives", "serde", "serde_json", + "sp-core 28.0.0", + "sp-keyring", + "sp-statement-store", "tokio", "zombienet-orchestrator", "zombienet-sdk", @@ -14603,6 +14606,7 @@ dependencies = [ "sp-offchain", "sp-runtime 31.0.1", "sp-session", + "sp-statement-store", "sp-storage 19.0.0", "sp-transaction-pool", "sp-version 29.0.0", @@ -15758,11 +15762,15 @@ dependencies = [ "sc-consensus", "sc-consensus-manual-seal", "sc-executor 0.32.0", + "sc-keystore", "sc-network", + "sc-network-statement", + "sc-network-sync", "sc-offchain", "sc-rpc", "sc-runtime-utilities", "sc-service", + "sc-statement-store", "sc-sysinfo", "sc-telemetry", "sc-tracing", @@ -15782,6 +15790,7 @@ dependencies = [ "sp-offchain", "sp-runtime 31.0.1", "sp-session", + "sp-statement-store", "sp-storage 19.0.0", "sp-timestamp", "sp-transaction-pool", diff --git a/cumulus/client/service/src/lib.rs b/cumulus/client/service/src/lib.rs index 4a719c66bbf00..badf22ed68440 100644 --- a/cumulus/client/service/src/lib.rs +++ b/cumulus/client/service/src/lib.rs @@ -461,6 +461,7 @@ pub struct BuildNetworkParams< pub spawn_handle: SpawnTaskHandle, pub import_queue: IQ, pub sybil_resistance_level: CollatorSybilResistance, + pub metrics: sc_network::NotificationMetrics, } /// Build the network service, the network status sinks and an RPC sender. @@ -475,6 +476,7 @@ pub async fn build_network<'a, Block, Client, RCInterface, IQ, Network>( relay_chain_interface, import_queue, sybil_resistance_level, + metrics, }: BuildNetworkParams<'a, Block, Client, Network, RCInterface, IQ>, ) -> sc_service::error::Result<( Arc, @@ -533,9 +535,6 @@ where Box::new(block_announce_validator) as Box<_> }, }; - let metrics = Network::register_notification_metrics( - parachain_config.prometheus_config.as_ref().map(|config| &config.registry), - ); sc_service::build_network(sc_service::BuildNetworkParams { config: parachain_config, diff --git a/cumulus/parachains/runtimes/people/people-westend/Cargo.toml b/cumulus/parachains/runtimes/people/people-westend/Cargo.toml index 5a7604b5297c1..9c19b12319f86 100644 --- a/cumulus/parachains/runtimes/people/people-westend/Cargo.toml +++ b/cumulus/parachains/runtimes/people/people-westend/Cargo.toml @@ -50,6 +50,7 @@ sp-keyring = { workspace = true } sp-offchain = { workspace = true } sp-runtime = { workspace = true } sp-session = { workspace = true } +sp-statement-store = { workspace = true } sp-storage = { workspace = true } sp-transaction-pool = { workspace = true } sp-version = { workspace = true } @@ -141,6 +142,7 @@ std = [ "sp-offchain/std", "sp-runtime/std", "sp-session/std", + "sp-statement-store/std", "sp-storage/std", "sp-transaction-pool/std", "sp-version/std", diff --git a/cumulus/parachains/runtimes/people/people-westend/src/lib.rs b/cumulus/parachains/runtimes/people/people-westend/src/lib.rs index 957b429b50cda..31651eb2521ee 100644 --- a/cumulus/parachains/runtimes/people/people-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/people/people-westend/src/lib.rs @@ -65,6 +65,10 @@ use sp_runtime::{ ApplyExtrinsicResult, }; pub use sp_runtime::{MultiAddress, Perbill, Permill, RuntimeDebug}; +use sp_statement_store::{ + runtime_api::{InvalidStatement, StatementSource, ValidStatement}, + SignatureVerificationResult, Statement, +}; #[cfg(feature = "std")] use sp_version::NativeVersion; use sp_version::RuntimeVersion; @@ -1128,6 +1132,39 @@ impl_runtime_apis! { genesis_config_presets::preset_names() } } + + impl sp_statement_store::runtime_api::ValidateStatement for Runtime { + fn validate_statement( + _source: StatementSource, + statement: Statement, + ) -> Result { + let account = match statement.verify_signature() { + SignatureVerificationResult::Valid(account) => account.into(), + SignatureVerificationResult::Invalid => { + log::debug!("Bad statement signature."); + return Err(InvalidStatement::BadProof) + }, + SignatureVerificationResult::NoSignature => { + log::debug!("Missing statement signature."); + return Err(InvalidStatement::NoProof) + }, + }; + + // For now just allow validators to store some statements. + // In the future we will allow people. + if pallet_session::Validators::::get().contains(&account) { + Ok(ValidStatement { + max_count: 2, + max_size: 1024, + }) + } else { + Ok(ValidStatement { + max_count: 0, + max_size: 0, + }) + } + } + } } cumulus_pallet_parachain_system::register_validate_block! { diff --git a/cumulus/polkadot-omni-node/lib/Cargo.toml b/cumulus/polkadot-omni-node/lib/Cargo.toml index d0e421318ae5b..fa97d36c68572 100644 --- a/cumulus/polkadot-omni-node/lib/Cargo.toml +++ b/cumulus/polkadot-omni-node/lib/Cargo.toml @@ -50,11 +50,15 @@ sc-client-db = { workspace = true, default-features = true } sc-consensus = { workspace = true, default-features = true } sc-consensus-manual-seal = { workspace = true, default-features = true } sc-executor = { workspace = true, default-features = true } +sc-keystore = { workspace = true, default-features = true } sc-network = { workspace = true, default-features = true } +sc-network-statement = { workspace = true, default-features = true } +sc-network-sync = { workspace = true, default-features = true } sc-offchain = { workspace = true, default-features = true } sc-rpc = { workspace = true, default-features = true } sc-runtime-utilities = { workspace = true, default-features = true } sc-service = { workspace = true, default-features = false } +sc-statement-store = { workspace = true, default-features = true } sc-sysinfo = { workspace = true, default-features = true } sc-telemetry = { workspace = true, default-features = true } sc-tracing = { workspace = true, default-features = true } @@ -71,6 +75,7 @@ sp-keystore = { workspace = true, default-features = true } sp-offchain = { workspace = true, default-features = true } sp-runtime = { workspace = true } sp-session = { workspace = true, default-features = true } +sp-statement-store = { workspace = true, default-features = true } sp-storage = { workspace = true, default-features = true } sp-timestamp = { workspace = true, default-features = true } sp-transaction-pool = { workspace = true, default-features = true } diff --git a/cumulus/polkadot-omni-node/lib/src/cli.rs b/cumulus/polkadot-omni-node/lib/src/cli.rs index b50b5a7c4a6b5..5f9f949ce7268 100644 --- a/cumulus/polkadot-omni-node/lib/src/cli.rs +++ b/cumulus/polkadot-omni-node/lib/src/cli.rs @@ -198,6 +198,13 @@ pub struct Cli { #[arg(raw = true)] pub relay_chain_args: Vec, + /// Enable the statement store. + /// + /// The statement store is a store for statements validated using the runtime API + /// `validate_statement`. It should be enabled for chains that provide this runtime API. + #[arg(long)] + pub enable_statement_store: bool, + #[arg(skip)] pub(crate) _phantom: PhantomData, } @@ -232,6 +239,7 @@ impl Cli { .unwrap_or(self.authoring), export_pov: self.export_pov_to_path.clone(), max_pov_percentage: self.run.experimental_max_pov_percentage, + enable_statement_store: self.enable_statement_store, } } } diff --git a/cumulus/polkadot-omni-node/lib/src/common/mod.rs b/cumulus/polkadot-omni-node/lib/src/common/mod.rs index 345402f176a77..3617081aa01e5 100644 --- a/cumulus/polkadot-omni-node/lib/src/common/mod.rs +++ b/cumulus/polkadot-omni-node/lib/src/common/mod.rs @@ -24,6 +24,7 @@ pub mod command; pub mod rpc; pub mod runtime; pub mod spec; +pub(crate) mod statement_store; pub mod types; use crate::cli::AuthoringPolicy; @@ -38,6 +39,7 @@ use sp_runtime::{ OpaqueExtrinsic, }; use sp_session::SessionKeys; +use sp_statement_store::runtime_api::ValidateStatement; use sp_transaction_pool::runtime_api::TaggedTransactionQueue; use std::{fmt::Debug, path::PathBuf, str::FromStr}; @@ -70,6 +72,7 @@ pub trait NodeRuntimeApi: + OffchainWorkerApi + CollectCollationInfo + GetCoreSelectorApi + + ValidateStatement + RelayParentOffsetApi + Sized { @@ -85,6 +88,7 @@ impl NodeRuntimeApi for T where + GetCoreSelectorApi + RelayParentOffsetApi + CollectCollationInfo + + ValidateStatement { } @@ -118,4 +122,7 @@ pub struct NodeExtraArgs { /// The maximum percentage of the maximum PoV size that the collator can use. /// It will be removed once is fixed. pub max_pov_percentage: Option, + + /// If true then the statement store will be enabled. + pub enable_statement_store: bool, } diff --git a/cumulus/polkadot-omni-node/lib/src/common/rpc.rs b/cumulus/polkadot-omni-node/lib/src/common/rpc.rs index d91d9fd1e9b39..c97af2c9d7ae6 100644 --- a/cumulus/polkadot-omni-node/lib/src/common/rpc.rs +++ b/cumulus/polkadot-omni-node/lib/src/common/rpc.rs @@ -23,7 +23,10 @@ use crate::common::{ ConstructNodeRuntimeApi, }; use pallet_transaction_payment_rpc::{TransactionPayment, TransactionPaymentApiServer}; -use sc_rpc::dev::{Dev, DevApiServer}; +use sc_rpc::{ + dev::{Dev, DevApiServer}, + statement::{StatementApiServer, StatementStore}, +}; use sp_runtime::traits::Block as BlockT; use std::{marker::PhantomData, sync::Arc}; use substrate_frame_rpc_system::{System, SystemApiServer}; @@ -32,11 +35,12 @@ use substrate_state_trie_migration_rpc::{StateMigration, StateMigrationApiServer /// A type representing all RPC extensions. pub type RpcExtension = jsonrpsee::RpcModule<()>; -pub(crate) trait BuildRpcExtensions { +pub(crate) trait BuildRpcExtensions { fn build_rpc_extensions( client: Arc, backend: Arc, pool: Arc, + statement_store: Option>, ) -> sc_service::error::Result; } @@ -47,6 +51,7 @@ impl ParachainClient, ParachainBackend, sc_transaction_pool::TransactionPoolHandle>, + sc_statement_store::Store, > for BuildParachainRpcExtensions where RuntimeApi: @@ -60,6 +65,7 @@ where pool: Arc< sc_transaction_pool::TransactionPoolHandle>, >, + statement_store: Option>, ) -> sc_service::error::Result { let build = || -> Result> { let mut module = RpcExtension::new(()); @@ -67,6 +73,9 @@ where module.merge(System::new(client.clone(), pool).into_rpc())?; module.merge(TransactionPayment::new(client.clone()).into_rpc())?; module.merge(StateMigration::new(client.clone(), backend).into_rpc())?; + if let Some(statement_store) = statement_store { + module.merge(StatementStore::new(statement_store).into_rpc())?; + } module.merge(Dev::new(client).into_rpc())?; Ok(module) diff --git a/cumulus/polkadot-omni-node/lib/src/common/spec.rs b/cumulus/polkadot-omni-node/lib/src/common/spec.rs index c39004db7c831..354342884f90f 100644 --- a/cumulus/polkadot-omni-node/lib/src/common/spec.rs +++ b/cumulus/polkadot-omni-node/lib/src/common/spec.rs @@ -17,6 +17,7 @@ use crate::common::{ command::NodeCommandRunner, rpc::BuildRpcExtensions, + statement_store::{build_statement_store, new_statement_handler_proto}, types::{ ParachainBackend, ParachainBlockImport, ParachainClient, ParachainHostFunctions, ParachainService, @@ -40,6 +41,7 @@ use sc_consensus::DefaultImportQueue; use sc_executor::{HeapAllocStrategy, DEFAULT_HEAP_ALLOC_STRATEGY}; use sc_network::{config::FullNetworkConfiguration, NetworkBackend, NetworkBlock}; use sc_service::{Configuration, ImportQueue, PartialComponents, TaskManager}; +use sc_statement_store::Store; use sc_sysinfo::HwBench; use sc_telemetry::{TelemetryHandle, TelemetryWorker}; use sc_tracing::tracing::Instrument; @@ -239,6 +241,7 @@ pub(crate) trait NodeSpec: BaseNodeSpec { ParachainClient, ParachainBackend, TransactionPoolHandle>, + Store, >; type StartConsensus: StartConsensus< @@ -292,11 +295,19 @@ pub(crate) trait NodeSpec: BaseNodeSpec { let prometheus_registry = parachain_config.prometheus_registry().cloned(); let transaction_pool = params.transaction_pool.clone(); let import_queue_service = params.import_queue.service(); - let net_config = FullNetworkConfiguration::<_, _, Net>::new( + let mut net_config = FullNetworkConfiguration::<_, _, Net>::new( ¶chain_config.network, prometheus_registry.clone(), ); + let metrics = Net::register_notification_metrics( + parachain_config.prometheus_config.as_ref().map(|config| &config.registry), + ); + + let statement_handler_proto = node_extra_args.enable_statement_store.then(|| { + new_statement_handler_proto(&*client, ¶chain_config, &metrics, &mut net_config) + }); + let (network, system_rpc_tx, tx_handler_controller, sync_service) = build_network(BuildNetworkParams { parachain_config: ¶chain_config, @@ -308,10 +319,37 @@ pub(crate) trait NodeSpec: BaseNodeSpec { relay_chain_interface: relay_chain_interface.clone(), import_queue: params.import_queue, sybil_resistance_level: Self::SYBIL_RESISTANCE, + metrics, }) .await?; + let statement_store = statement_handler_proto + .map(|statement_handler_proto| { + build_statement_store( + ¶chain_config, + &mut task_manager, + client.clone(), + network.clone(), + sync_service.clone(), + params.keystore_container.local_keystore(), + statement_handler_proto, + ) + }) + .transpose()?; + if parachain_config.offchain_worker.enabled { + let custom_extensions = { + let statement_store = statement_store.clone(); + move |_hash| { + if let Some(statement_store) = &statement_store { + vec![Box::new(statement_store.clone().as_statement_store_ext()) + as Box<_>] + } else { + vec![] + } + } + }; + let offchain_workers = sc_offchain::OffchainWorkers::new(sc_offchain::OffchainWorkerOptions { runtime_api_provider: client.clone(), @@ -323,7 +361,7 @@ pub(crate) trait NodeSpec: BaseNodeSpec { network_provider: Arc::new(network.clone()), is_validator: parachain_config.role.is_authority(), enable_http_requests: true, - custom_extensions: move |_| vec![], + custom_extensions, })?; task_manager.spawn_handle().spawn( "offchain-workers-runner", @@ -336,12 +374,14 @@ pub(crate) trait NodeSpec: BaseNodeSpec { let client = client.clone(); let transaction_pool = transaction_pool.clone(); let backend_for_rpc = backend.clone(); + let statement_store = statement_store.clone(); Box::new(move |_| { Self::BuildRpcExtensions::build_rpc_extensions( client.clone(), backend_for_rpc.clone(), transaction_pool.clone(), + statement_store.clone(), ) }) }; diff --git a/cumulus/polkadot-omni-node/lib/src/common/statement_store.rs b/cumulus/polkadot-omni-node/lib/src/common/statement_store.rs new file mode 100644 index 0000000000000..604103e6c1a37 --- /dev/null +++ b/cumulus/polkadot-omni-node/lib/src/common/statement_store.rs @@ -0,0 +1,96 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Cumulus. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +use crate::common::{types::ParachainClient, ConstructNodeRuntimeApi, NodeBlock}; +use parachains_common::Hash; +use sc_network::{ + config::FullNetworkConfiguration, service::traits::NetworkService, NetworkBackend, +}; +use sc_service::{Configuration, TaskManager}; +use sc_statement_store::Store; +use std::sync::Arc; + +/// Helper function to setup the statement store in `NodeSpec::start_node`. +/// +/// Functions are tailored for internal usage, types are unnecessary opinionated for usage in +/// `NodeSpec::start_node`. + +/// Build the statement handler prototype. Register the notification protocol in the network +/// configuration. +pub(crate) fn new_statement_handler_proto< + Block: NodeBlock, + RuntimeApi, + Net: NetworkBackend, +>( + client: &ParachainClient, + parachain_config: &Configuration, + metrics: &sc_network::NotificationMetrics, + net_config: &mut FullNetworkConfiguration, +) -> sc_network_statement::StatementHandlerPrototype { + let (statement_handler_proto, statement_config) = + sc_network_statement::StatementHandlerPrototype::new::<_, _, Net>( + client.chain_info().genesis_hash, + parachain_config.chain_spec.fork_id(), + metrics.clone(), + Arc::clone(&net_config.peer_store_handle()), + ); + net_config.add_notification_protocol(statement_config); + statement_handler_proto +} + +/// Build the statement store, spawn the tasks. +pub(crate) fn build_statement_store< + Block: NodeBlock, + RuntimeApi: ConstructNodeRuntimeApi>, +>( + parachain_config: &Configuration, + task_manager: &mut TaskManager, + client: Arc>, + network: Arc, + sync_service: Arc>, + local_keystore: Arc, + statement_handler_proto: sc_network_statement::StatementHandlerPrototype, +) -> sc_service::error::Result> { + let statement_store = sc_statement_store::Store::new_shared( + ¶chain_config.data_path, + Default::default(), + client, + local_keystore, + parachain_config.prometheus_registry(), + &task_manager.spawn_handle(), + ) + .map_err(|e| sc_service::Error::Application(Box::new(e) as Box<_>))?; + let statement_protocol_executor = { + let spawn_handle = task_manager.spawn_handle(); + Box::new(move |fut| { + spawn_handle.spawn("network-statement-validator", Some("networking"), fut); + }) + }; + let statement_handler = statement_handler_proto.build( + network, + sync_service, + statement_store.clone(), + parachain_config.prometheus_registry(), + statement_protocol_executor, + )?; + task_manager.spawn_handle().spawn( + "network-statement-handler", + Some("networking"), + statement_handler.run(), + ); + + Ok(statement_store) +} diff --git a/cumulus/polkadot-omni-node/lib/src/common/types.rs b/cumulus/polkadot-omni-node/lib/src/common/types.rs index 6915835137f72..bd43c697f2700 100644 --- a/cumulus/polkadot-omni-node/lib/src/common/types.rs +++ b/cumulus/polkadot-omni-node/lib/src/common/types.rs @@ -29,10 +29,14 @@ type Header = generic::Header; pub type Block = generic::Block, UncheckedExtrinsic>; #[cfg(not(feature = "runtime-benchmarks"))] -pub type ParachainHostFunctions = cumulus_client_service::ParachainHostFunctions; +pub type ParachainHostFunctions = ( + cumulus_client_service::ParachainHostFunctions, + sp_statement_store::runtime_api::HostFunctions, +); #[cfg(feature = "runtime-benchmarks")] pub type ParachainHostFunctions = ( cumulus_client_service::ParachainHostFunctions, + sp_statement_store::runtime_api::HostFunctions, frame_benchmarking::benchmarking::HostFunctions, ); diff --git a/cumulus/polkadot-omni-node/lib/src/fake_runtime_api/utils.rs b/cumulus/polkadot-omni-node/lib/src/fake_runtime_api/utils.rs index 395cf25a95371..b090dd4e7c4a1 100644 --- a/cumulus/polkadot-omni-node/lib/src/fake_runtime_api/utils.rs +++ b/cumulus/polkadot-omni-node/lib/src/fake_runtime_api/utils.rs @@ -233,6 +233,15 @@ macro_rules! impl_node_runtime_apis { unimplemented!() } } + + impl sp_statement_store::runtime_api::ValidateStatement<$block> for $runtime { + fn validate_statement( + _source: sp_statement_store::runtime_api::StatementSource, + _statement: sp_statement_store::Statement, + ) -> Result { + unimplemented!() + } + } } }; } diff --git a/cumulus/polkadot-omni-node/lib/src/nodes/manual_seal.rs b/cumulus/polkadot-omni-node/lib/src/nodes/manual_seal.rs index 7c5221632d898..b6e73cb27ebc8 100644 --- a/cumulus/polkadot-omni-node/lib/src/nodes/manual_seal.rs +++ b/cumulus/polkadot-omni-node/lib/src/nodes/manual_seal.rs @@ -259,6 +259,7 @@ impl ManualSealNode { client.clone(), backend_for_rpc.clone(), transaction_pool.clone(), + None, )?; module .merge(ManualSeal::new(manual_seal_sink.clone()).into_rpc()) diff --git a/cumulus/test/service/src/lib.rs b/cumulus/test/service/src/lib.rs index a3bc3e46b2dfb..e70a2d6ec38b5 100644 --- a/cumulus/test/service/src/lib.rs +++ b/cumulus/test/service/src/lib.rs @@ -384,6 +384,9 @@ where spawn_handle: task_manager.spawn_handle(), relay_chain_interface: relay_chain_interface.clone(), import_queue: params.import_queue, + metrics: Net::register_notification_metrics( + parachain_config.prometheus_config.as_ref().map(|config| &config.registry), + ), sybil_resistance_level: CollatorSybilResistance::Resistant, /* Either Aura that is * resistant or null that * is not producing any diff --git a/cumulus/zombienet/zombienet-sdk/Cargo.toml b/cumulus/zombienet/zombienet-sdk/Cargo.toml index 546bda1293b4c..49e5911660543 100644 --- a/cumulus/zombienet/zombienet-sdk/Cargo.toml +++ b/cumulus/zombienet/zombienet-sdk/Cargo.toml @@ -18,6 +18,9 @@ tokio = { workspace = true, features = ["rt-multi-thread"] } zombienet-sdk = { workspace = true } zombienet-orchestrator = { workspace = true } cumulus-zombienet-sdk-helpers = { workspace = true } +sp-statement-store = { workspace = true, default-features = true } +sp-keyring = { workspace = true, default-features = true } +sp-core = { workspace = true, default-features = true } [features] zombie-ci = [] diff --git a/cumulus/zombienet/zombienet-sdk/run.sh b/cumulus/zombienet/zombienet-sdk/run.sh index 377efdc5cb3f6..4f2955591dbf0 100755 --- a/cumulus/zombienet/zombienet-sdk/run.sh +++ b/cumulus/zombienet/zombienet-sdk/run.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -e -cargo build --release -p cumulus-test-service --bin test-parachain -p polkadot --bin polkadot-prepare-worker --bin polkadot-execute-worker --bin polkadot +cargo build --release -p cumulus-test-service --bin test-parachain -p polkadot --bin polkadot-prepare-worker --bin polkadot-execute-worker --bin polkadot -p polkadot-parachain-bin --bin polkadot-parachain RELEASE_DIR=$(dirname "$(cargo locate-project --workspace --message-format plain)")/target/release diff --git a/cumulus/zombienet/zombienet-sdk/tests/lib.rs b/cumulus/zombienet/zombienet-sdk/tests/lib.rs index 061db5fec20c9..256e4b3992f3a 100644 --- a/cumulus/zombienet/zombienet-sdk/tests/lib.rs +++ b/cumulus/zombienet/zombienet-sdk/tests/lib.rs @@ -9,3 +9,6 @@ mod sync_blocks; #[cfg(feature = "zombie-ci")] mod bootnodes; + +#[cfg(feature = "zombie-ci")] +mod statement_store; diff --git a/cumulus/zombienet/zombienet-sdk/tests/statement_store/mod.rs b/cumulus/zombienet/zombienet-sdk/tests/statement_store/mod.rs new file mode 100644 index 0000000000000..dc1c85441914f --- /dev/null +++ b/cumulus/zombienet/zombienet-sdk/tests/statement_store/mod.rs @@ -0,0 +1,118 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Test that people-westend enables the statement store in the node and that statements are +// propagated to peers. + +use anyhow::anyhow; +use sp_core::{Bytes, Encode}; +use zombienet_sdk::{ + subxt::{ + backend::rpc::RpcClient, rpc_params, utils::url_is_secure, OnlineClient, PolkadotConfig, + }, + NetworkConfigBuilder, +}; + +#[tokio::test(flavor = "multi_thread")] +async fn statement_store() -> Result<(), anyhow::Error> { + let _ = env_logger::try_init_from_env( + env_logger::Env::default().filter_or(env_logger::DEFAULT_FILTER_ENV, "info"), + ); + + let images = zombienet_sdk::environment::get_images_from_env(); + + let config = NetworkConfigBuilder::new() + .with_relaychain(|r| { + let r = r + .with_chain("westend-local") + .with_default_command("polkadot") + .with_default_image(images.polkadot.as_str()) + .with_default_args(vec!["-lparachain=debug".into()]) + // Have to set a `with_node` outside of the loop below, so that `r` has the right + // type. + .with_node(|node| node.with_name("validator-0")); + + (1..6).fold(r, |acc, i| acc.with_node(|node| node.with_name(&format!("validator-{i}")))) + }) + .with_parachain(|p| { + p.with_id(2400) + .with_default_command("polkadot-parachain") + .with_default_image(images.cumulus.as_str()) + .with_chain("people-westend-local") + .with_default_args(vec![ + "--force-authoring".into(), + "-lparachain=debug".into(), + "--enable-statement-store".into(), + ]) + .with_collator(|n| n.with_name("charlie")) + .with_collator(|n| n.with_name("dave")) + }) + .with_global_settings(|global_settings| match std::env::var("ZOMBIENET_SDK_BASE_DIR") { + Ok(val) => global_settings.with_base_dir(val), + _ => global_settings, + }) + .build() + .map_err(|e| { + let errs = e.into_iter().map(|e| e.to_string()).collect::>().join(" "); + anyhow!("config errs: {errs}") + })?; + + let spawn_fn = zombienet_sdk::environment::get_spawn_fn(); + let network = spawn_fn(config).await?; + + let charlie = network.get_node("charlie")?; + let dave = network.get_node("dave")?; + + let _charlie_client: OnlineClient = charlie.wait_client().await?; + let _dave_client: OnlineClient = charlie.wait_client().await?; + + let charlie_rpc = if url_is_secure(charlie.ws_uri())? { + RpcClient::from_url(&charlie.ws_uri()).await? + } else { + RpcClient::from_insecure_url(&charlie.ws_uri()).await? + }; + let dave_rpc = if url_is_secure(dave.ws_uri())? { + RpcClient::from_url(&dave.ws_uri()).await? + } else { + RpcClient::from_insecure_url(&dave.ws_uri()).await? + }; + + // Create the statement "1,2,3" signed by dave. + let mut statement = sp_statement_store::Statement::new(); + statement.set_plain_data(vec![1, 2, 3]); + let dave = sp_keyring::Sr25519Keyring::Dave; + statement.sign_sr25519_private(&dave.pair()); + let statement: Bytes = statement.encode().into(); + + // Submit the statement to charlie. + let _: () = charlie_rpc.request("statement_submit", rpc_params![statement.clone()]).await?; + + // Ensure that charlie stored the statement. + let charlie_dump: Vec = charlie_rpc.request("statement_dump", rpc_params![]).await?; + if charlie_dump != vec![statement.clone()] { + return Err(anyhow!("Charlie did not store the statement")); + } + + // Query dave until it receives the statement, stop if 20 seconds passed. + let query_start_time = std::time::SystemTime::now(); + let stop_after_secs = 20; + loop { + let dave_dump: Vec = dave_rpc.request("statement_dump", rpc_params![]).await?; + if !dave_dump.is_empty() { + if dave_dump != vec![statement.clone()] { + return Err(anyhow!("Dave statement store is not the expected one")); + } + break; + } + + let elapsed = + query_start_time.elapsed().map_err(|_| anyhow!("Failed to get elapsed time"))?; + if elapsed.as_secs() > stop_after_secs { + return Err(anyhow!("Dave did not receive the statement in time")); + } + + tokio::time::sleep(core::time::Duration::from_secs(1)).await; + } + + Ok(()) +} diff --git a/prdoc/pr_8076.prdoc b/prdoc/pr_8076.prdoc new file mode 100644 index 0000000000000..fadd47c81d811 --- /dev/null +++ b/prdoc/pr_8076.prdoc @@ -0,0 +1,24 @@ +title: 'Enable statement store with new CLI arg in polkadot-omni-node and polkadot-parachain' +doc: +- audience: Node Operator + description: |- + In `polkadot-omni-node-lib`, a new cli arg `--enable-statement-store` is introduced, if set to true then the statement store is enabled in the node. + + The statement store is an off-chain data-store for signed statements accessible via RPC and offchain worker. + It uses the runtime api to get the allowance associated to an account. + + This takes effect in `polkadot-omni-node` and `polkadot-parachain` and any node depending on `polkadot-omni-node-lib`. + + In `cumulus-client-service` the `BuildNetworkParams` now takes the metrics configuration explicitly, you can use the same configuration as before using the network backend used when calling `build_network`: + ```rust + let metrics = NetworkBackend::register_notification_metrics( + parachain_config.prometheus_config.as_ref().map(|config| &config.registry), + ); + ``` +crates: +- name: polkadot-omni-node-lib + bump: major +- name: cumulus-client-service + bump: major +- name: people-westend-runtime + bump: major diff --git a/templates/parachain/node/src/service.rs b/templates/parachain/node/src/service.rs index ef8ba1a2dde34..aad6d0a222666 100644 --- a/templates/parachain/node/src/service.rs +++ b/templates/parachain/node/src/service.rs @@ -37,7 +37,7 @@ use prometheus_endpoint::Registry; use sc_client_api::Backend; use sc_consensus::ImportQueue; use sc_executor::{HeapAllocStrategy, WasmExecutor, DEFAULT_HEAP_ALLOC_STRATEGY}; -use sc_network::NetworkBlock; +use sc_network::{NetworkBackend, NetworkBlock}; use sc_service::{Configuration, PartialComponents, TFullBackend, TFullClient, TaskManager}; use sc_telemetry::{Telemetry, TelemetryHandle, TelemetryWorker, TelemetryWorkerHandle}; use sc_transaction_pool_api::OffchainTransactionPoolFactory; @@ -289,6 +289,9 @@ pub async fn start_parachain_node( relay_chain_interface: relay_chain_interface.clone(), import_queue: params.import_queue, sybil_resistance_level: CollatorSybilResistance::Resistant, // because of Aura + metrics: sc_network::NetworkWorker::::register_notification_metrics( + parachain_config.prometheus_config.as_ref().map(|config| &config.registry), + ), }) .await?; From 98cc29420adef1608f7ea9ab66ec79a9bdf0ec11 Mon Sep 17 00:00:00 2001 From: "paritytech-release-backport-bot[bot]" <191369287+paritytech-release-backport-bot[bot]@users.noreply.github.com> Date: Mon, 30 Jun 2025 11:07:47 +0200 Subject: [PATCH 021/128] [stable2506] Backport #8948 (#8960) Backport #8948 into `stable2506` from alexggh. See the [documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md) on how to use this bot. Signed-off-by: Alexandru Gheorghe Co-authored-by: Alexandru Gheorghe <49718502+alexggh@users.noreply.github.com> Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Egor_P --- polkadot/node/overseer/src/lib.rs | 4 +- polkadot/node/overseer/src/tests.rs | 278 +++++++++++++++++++++++++++- polkadot/node/service/src/tests.rs | 2 + prdoc/pr_8948.prdoc | 16 ++ 4 files changed, 296 insertions(+), 4 deletions(-) create mode 100644 prdoc/pr_8948.prdoc diff --git a/polkadot/node/overseer/src/lib.rs b/polkadot/node/overseer/src/lib.rs index 28a201f102c18..b7cc98d47d713 100644 --- a/polkadot/node/overseer/src/lib.rs +++ b/polkadot/node/overseer/src/lib.rs @@ -622,7 +622,7 @@ pub struct Overseer { ApprovalVotingMessage, ApprovalDistributionMessage, ApprovalVotingParallelMessage, - ])] + ], can_receive_priority_messages)] approval_voting_parallel: ApprovalVotingParallel, #[subsystem(GossipSupportMessage, sends: [ NetworkBridgeTxMessage, @@ -643,7 +643,7 @@ pub struct Overseer { AvailabilityRecoveryMessage, ChainSelectionMessage, ApprovalVotingParallelMessage, - ])] + ], can_receive_priority_messages)] dispute_coordinator: DisputeCoordinator, #[subsystem(DisputeDistributionMessage, sends: [ diff --git a/polkadot/node/overseer/src/tests.rs b/polkadot/node/overseer/src/tests.rs index 0b9b783ef9b15..5a9c3b3ec1161 100644 --- a/polkadot/node/overseer/src/tests.rs +++ b/polkadot/node/overseer/src/tests.rs @@ -18,7 +18,9 @@ use async_trait::async_trait; use futures::{executor, pending, pin_mut, poll, select, stream, FutureExt}; use std::{collections::HashMap, sync::atomic, task::Poll}; -use polkadot_node_network_protocol::{PeerId, UnifiedReputationChange}; +use polkadot_node_network_protocol::{ + peer_set::ValidationVersion, ObservedRole, PeerId, UnifiedReputationChange, +}; use polkadot_node_primitives::{ BlockData, CollationGenerationConfig, CollationResult, DisputeMessage, InvalidDisputeVote, PoV, UncheckedDisputeMessage, ValidDisputeVote, @@ -853,10 +855,14 @@ fn test_network_bridge_event() -> NetworkBridgeEvent { NetworkBridgeEvent::PeerDisconnected(PeerId::random()) } -fn test_statement_distribution_msg() -> StatementDistributionMessage { +fn test_statement_distribution_with_priority_msg() -> StatementDistributionMessage { StatementDistributionMessage::NetworkBridgeUpdate(test_network_bridge_event()) } +fn test_statement_distribution_msg() -> StatementDistributionMessage { + StatementDistributionMessage::Backed(Default::default()) +} + fn test_availability_recovery_msg() -> AvailabilityRecoveryMessage { let (sender, _) = oneshot::channel(); AvailabilityRecoveryMessage::RecoverAvailableData( @@ -872,6 +878,15 @@ fn test_bitfield_distribution_msg() -> BitfieldDistributionMessage { BitfieldDistributionMessage::NetworkBridgeUpdate(test_network_bridge_event()) } +fn test_bitfield_distribution_with_priority_msg() -> BitfieldDistributionMessage { + BitfieldDistributionMessage::NetworkBridgeUpdate(NetworkBridgeEvent::PeerConnected( + PeerId::random(), + ObservedRole::Authority, + ValidationVersion::V3.into(), + None, + )) +} + fn test_provisioner_msg() -> ProvisionerMessage { let (sender, _) = oneshot::channel(); ProvisionerMessage::RequestInherentData(Default::default(), sender) @@ -912,11 +927,25 @@ fn test_approval_voting_msg() -> ApprovalVotingMessage { ApprovalVotingMessage::ApprovedAncestor(Default::default(), 0, sender) } +fn test_approval_voting_parallel_with_priority_msg() -> ApprovalVotingParallelMessage { + let (sender, _) = oneshot::channel(); + ApprovalVotingParallelMessage::ApprovedAncestor(Default::default(), 0, sender) +} + fn test_dispute_coordinator_msg() -> DisputeCoordinatorMessage { let (sender, _) = oneshot::channel(); DisputeCoordinatorMessage::RecentDisputes(sender) } +fn test_dispute_coordinator_msg_with_priority() -> DisputeCoordinatorMessage { + let (sender, _) = oneshot::channel(); + DisputeCoordinatorMessage::DetermineUndisputedChain { + base: Default::default(), + block_descriptions: Default::default(), + tx: sender, + } +} + fn test_dispute_distribution_msg() -> DisputeDistributionMessage { let dummy_dispute_message = UncheckedDisputeMessage { candidate_receipt: dummy_candidate_receipt_v2(dummy_hash()), @@ -1238,3 +1267,248 @@ fn context_holds_onto_message_until_enough_signals_received() { futures::executor::block_on(test_fut); } + +// A subsystem that simulates a slow subsystem, processing messages at a rate of one per second. +// We will use this to test the prioritization of messages in the subsystems generated by orchestra. +#[derive(Clone)] +struct SlowSubsystem { + num_normal_msgs_received: Arc, + num_prio_msgs_received: Arc, +} + +impl SlowSubsystem { + fn new( + msgs_received: Arc, + prio_msgs_received: Arc, + ) -> Self { + Self { num_normal_msgs_received: msgs_received, num_prio_msgs_received: prio_msgs_received } + } +} + +// Trait to determine if a message is a priority message or not, it is by the SlowSubsystem +// to determine if it should count the message as a priority message or not. +trait IsPrioMessage { + // Tells if the message is a priority message. + fn is_prio(&self) -> bool { + // By default, messages are not priority messages. + false + } +} + +// Implement the IsPrioMessage trait for all message types. +impl IsPrioMessage for CandidateValidationMessage {} +impl IsPrioMessage for CandidateBackingMessage {} +impl IsPrioMessage for ChainApiMessage {} +impl IsPrioMessage for CollationGenerationMessage {} +impl IsPrioMessage for CollatorProtocolMessage {} +impl IsPrioMessage for StatementDistributionMessage { + fn is_prio(&self) -> bool { + matches!(self, StatementDistributionMessage::NetworkBridgeUpdate(_)) + } +} +impl IsPrioMessage for ApprovalDistributionMessage {} +impl IsPrioMessage for ApprovalVotingMessage {} +impl IsPrioMessage for ApprovalVotingParallelMessage { + fn is_prio(&self) -> bool { + matches!(self, ApprovalVotingParallelMessage::ApprovedAncestor(_, _, _)) + } +} +impl IsPrioMessage for AvailabilityDistributionMessage {} +impl IsPrioMessage for AvailabilityRecoveryMessage {} +impl IsPrioMessage for AvailabilityStoreMessage {} +impl IsPrioMessage for BitfieldDistributionMessage { + fn is_prio(&self) -> bool { + matches!( + self, + BitfieldDistributionMessage::NetworkBridgeUpdate(NetworkBridgeEvent::PeerConnected( + _, + _, + _, + _ + ),) + ) + } +} +impl IsPrioMessage for ChainSelectionMessage {} +impl IsPrioMessage for DisputeCoordinatorMessage { + fn is_prio(&self) -> bool { + matches!(self, DisputeCoordinatorMessage::DetermineUndisputedChain { .. }) + } +} +impl IsPrioMessage for DisputeDistributionMessage {} +impl IsPrioMessage for GossipSupportMessage {} +impl IsPrioMessage for NetworkBridgeRxMessage {} +impl IsPrioMessage for NetworkBridgeTxMessage {} +impl IsPrioMessage for ProspectiveParachainsMessage {} +impl IsPrioMessage for ProvisionerMessage {} +impl IsPrioMessage for RuntimeApiMessage {} +impl IsPrioMessage for BitfieldSigningMessage {} +impl IsPrioMessage for PvfCheckerMessage {} + +impl Subsystem for SlowSubsystem +where + C: overseer::SubsystemContext, + M: Send + IsPrioMessage, +{ + fn start(self, mut ctx: C) -> SpawnedSubsystem { + SpawnedSubsystem { + name: "counter-subsystem", + future: Box::pin(async move { + loop { + // Simulate a slow processing subsystem to give time for both priority and + // normal messages to accumulate. + Delay::new(Duration::from_secs(1)).await; + match ctx.try_recv().await { + Ok(Some(FromOrchestra::Signal(OverseerSignal::Conclude))) => break, + Ok(Some(FromOrchestra::Signal(_))) => continue, + Ok(Some(FromOrchestra::Communication { msg })) => { + if msg.is_prio() { + self.num_prio_msgs_received.fetch_add(1, atomic::Ordering::SeqCst); + } else { + self.num_normal_msgs_received + .fetch_add(1, atomic::Ordering::SeqCst); + } + continue + }, + Err(_) => (), + _ => (), + } + pending!(); + } + + Ok(()) + }), + } + } +} + +#[test] +fn overseer_all_subsystems_can_receive_their_priority_messages() { + const NUM_NORMAL_MESSAGES: usize = 10; + const NUM_PRIORITY_MESSAGES: usize = 4; + overseer_check_subsystem_can_receive_their_priority_messages( + (0..NUM_NORMAL_MESSAGES) + .map(|_| AllMessages::DisputeCoordinator(test_dispute_coordinator_msg())) + .collect(), + (0..NUM_PRIORITY_MESSAGES) + .map(|_| AllMessages::DisputeCoordinator(test_dispute_coordinator_msg_with_priority())) + .collect(), + ); + + overseer_check_subsystem_can_receive_their_priority_messages( + (0..NUM_NORMAL_MESSAGES) + .map(|_| AllMessages::ApprovalVotingParallel(test_approval_distribution_msg().into())) + .collect(), + (0..NUM_PRIORITY_MESSAGES) + .map(|_| { + AllMessages::ApprovalVotingParallel( + test_approval_voting_parallel_with_priority_msg(), + ) + }) + .collect(), + ); + + overseer_check_subsystem_can_receive_their_priority_messages( + (0..NUM_NORMAL_MESSAGES) + .map(|_| AllMessages::StatementDistribution(test_statement_distribution_msg())) + .collect(), + (0..NUM_PRIORITY_MESSAGES) + .map(|_| { + AllMessages::StatementDistribution(test_statement_distribution_with_priority_msg()) + }) + .collect(), + ); + + overseer_check_subsystem_can_receive_their_priority_messages( + (0..NUM_NORMAL_MESSAGES) + .map(|_| AllMessages::BitfieldDistribution(test_bitfield_distribution_msg())) + .collect(), + (0..NUM_PRIORITY_MESSAGES) + .map(|_| { + AllMessages::BitfieldDistribution(test_bitfield_distribution_with_priority_msg()) + }) + .collect(), + ); +} + +// Test that when subsystem processes messages slow, the priority messages are processed before +// the normal messages. This is important to ensure that the subsytem can handle priority messages. +fn overseer_check_subsystem_can_receive_their_priority_messages( + normal_msgs: Vec, + prio_msgs: Vec, +) { + let num_normal_messages = normal_msgs.len(); + let num_prio_messages: usize = prio_msgs.len(); + let spawner = sp_core::testing::TaskExecutor::new(); + executor::block_on(async move { + let msgs_received = Arc::new(atomic::AtomicUsize::new(0)); + let prio_msgs_received = Arc::new(atomic::AtomicUsize::new(0)); + + let subsystem = SlowSubsystem::new(msgs_received.clone(), prio_msgs_received.clone()); + + let (overseer, handle) = + one_for_all_overseer_builder(spawner, MockSupportsParachains, subsystem, None) + .unwrap() + .build() + .unwrap(); + + let mut handle = Handle::new(handle); + let overseer_fut = overseer.run_inner().fuse(); + + pin_mut!(overseer_fut); + + // send a signal to each subsystem + let unpin_handle = dummy_unpin_handle(dummy_hash()); + handle + .block_imported(BlockInfo { + hash: Default::default(), + parent_hash: Default::default(), + number: Default::default(), + unpin_handle: unpin_handle.clone(), + }) + .await; + + // Send normal messages first, they are processed 1 per second by the SlowSubsystem, so they + // should accumulated in the queue. + for msg in normal_msgs { + handle.send_msg_anon(msg).await; + } + + // Send priority messages. + for msg in prio_msgs { + handle.send_msg_with_priority(msg, "test", PriorityLevel::High).await; + } + + loop { + match (&mut overseer_fut).timeout(Duration::from_millis(100)).await { + None => { + let normal_msgs: usize = msgs_received.load(atomic::Ordering::SeqCst); + let prio_msgs: usize = prio_msgs_received.load(atomic::Ordering::SeqCst); + + assert!( + prio_msgs == num_prio_messages || normal_msgs < num_normal_messages, + "we should not receive all normal messages before the prio message" + ); + + assert!( + normal_msgs <= num_normal_messages && prio_msgs <= num_prio_messages, + "too many messages received" + ); + + if normal_msgs < num_normal_messages || prio_msgs < num_prio_messages { + Delay::new(Duration::from_millis(100)).await; + } else { + break; + } + }, + Some(_) => panic!("exited too early"), + } + } + + // send a stop signal to each subsystems + handle.stop().await; + + let res = overseer_fut.await; + assert!(res.is_ok()); + }); +} diff --git a/polkadot/node/service/src/tests.rs b/polkadot/node/service/src/tests.rs index 1b8095436c6ec..cca4516a6d531 100644 --- a/polkadot/node/service/src/tests.rs +++ b/polkadot/node/service/src/tests.rs @@ -406,6 +406,8 @@ async fn test_skeleton( ) => { tx.send(undisputed_chain.unwrap_or((target_block_number, target_block_hash))).unwrap(); }); + // Check that ApprovedAncestor and DetermineUndisputedChain are sent with high priority. + assert_eq!(virtual_overseer.message_counter.with_high_priority(), 2); } /// Straight forward test case, where the test is not diff --git a/prdoc/pr_8948.prdoc b/prdoc/pr_8948.prdoc new file mode 100644 index 0000000000000..423167b64a1f3 --- /dev/null +++ b/prdoc/pr_8948.prdoc @@ -0,0 +1,16 @@ +title: make sure dispute_coordinator/approval-voting parallel can receive priority messages +doc: +- audience: Node Dev + description: |- + https://github.com/paritytech/polkadot-sdk/pull/8834, changed relay_chain_selection to send priority messages, but did not configured + the subsystems to tell they can receive priority messages, with `can_receive_priority_messages` flag. + + If `can_receive_priority_messages` is not specified orchestra falls back when sending a priority message to the normal queue, + so this resulted in the messages not being processed ahead of the others in the queue. + + Fix this configuration mistake and add a test to make sure priority messages are consumed ahead of normal ones by the subsystems. +crates: +- name: polkadot-overseer + bump: patch +- name: polkadot-service + bump: patch From 0ecdd7527d14bca69072b91e1fd1792fd0313e95 Mon Sep 17 00:00:00 2001 From: "paritytech-release-backport-bot[bot]" <191369287+paritytech-release-backport-bot[bot]@users.noreply.github.com> Date: Mon, 30 Jun 2025 10:22:23 +0000 Subject: [PATCH 022/128] [stable2506] Backport #8980 (#8984) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Backport #8980 into `stable2506` from ggwpez. See the [documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md) on how to use this bot. Signed-off-by: Oliver Tale-Yazdi Co-authored-by: Oliver Tale-Yazdi Co-authored-by: Alexander Theißen Co-authored-by: Egor_P --- prdoc/pr_8980.prdoc | 8 ++++++++ substrate/frame/revive/fixtures/build.rs | 1 + 2 files changed, 9 insertions(+) create mode 100644 prdoc/pr_8980.prdoc diff --git a/prdoc/pr_8980.prdoc b/prdoc/pr_8980.prdoc new file mode 100644 index 0000000000000..7e88958b9337e --- /dev/null +++ b/prdoc/pr_8980.prdoc @@ -0,0 +1,8 @@ +title: Fix revive-fixtures build script +doc: +- audience: Runtime Dev + description: |- + Fix compilation issue with pallet-revive-fixtures build.rs script. +crates: +- name: pallet-revive-fixtures + bump: patch diff --git a/substrate/frame/revive/fixtures/build.rs b/substrate/frame/revive/fixtures/build.rs index 97dca0a144f41..ce9215a165d21 100644 --- a/substrate/frame/revive/fixtures/build.rs +++ b/substrate/frame/revive/fixtures/build.rs @@ -294,6 +294,7 @@ pub fn main() -> Result<()> { println!("cargo::rerun-if-env-changed={OVERRIDE_RUSTUP_TOOLCHAIN_ENV_VAR}"); println!("cargo::rerun-if-env-changed={OVERRIDE_STRIP_ENV_VAR}"); println!("cargo::rerun-if-env-changed={OVERRIDE_OPTIMIZE_ENV_VAR}"); + println!("cargo::rerun-if-changed={}", out_dir.display()); // the fixtures have a dependency on the uapi crate println!("cargo::rerun-if-changed={}", fixtures_dir.display()); From b7b730446ad8c7f8b1067ba31f0b3b3286b9bd58 Mon Sep 17 00:00:00 2001 From: "paritytech-release-backport-bot[bot]" <191369287+paritytech-release-backport-bot[bot]@users.noreply.github.com> Date: Mon, 30 Jun 2025 11:53:19 +0000 Subject: [PATCH 023/128] [stable2506] Backport #8694 (#9031) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Backport #8694 into `stable2506` from tmpolaczyk. See the [documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md) on how to use this bot. Co-authored-by: tmpolaczyk <44604217+tmpolaczyk@users.noreply.github.com> Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Bastian Köcher --- prdoc/pr_8694.prdoc | 9 +++++++++ substrate/frame/migrations/src/benchmarking.rs | 6 +++++- 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 prdoc/pr_8694.prdoc diff --git a/prdoc/pr_8694.prdoc b/prdoc/pr_8694.prdoc new file mode 100644 index 0000000000000..3cce23c80c0e1 --- /dev/null +++ b/prdoc/pr_8694.prdoc @@ -0,0 +1,9 @@ +title: Fix pallet_migrations benchmark when FailedMigrationHandler emits events +doc: +- audience: Runtime Dev + description: When FailedMigrationHandler emits events, the `UpgradeFailed` event + is not the last one, so `assert_last_event` fails. Fixed by checking that the + `UpgradeFailed` event is emitted, even if it is not the last one. +crates: +- name: pallet-migrations + bump: patch diff --git a/substrate/frame/migrations/src/benchmarking.rs b/substrate/frame/migrations/src/benchmarking.rs index f06870fa9502c..1b4a61f160a1e 100644 --- a/substrate/frame/migrations/src/benchmarking.rs +++ b/substrate/frame/migrations/src/benchmarking.rs @@ -26,6 +26,10 @@ use sp_core::{twox_128, Get}; use sp_io::{storage, KillStorageResult}; use sp_runtime::traits::One; +fn assert_has_event(generic_event: ::RuntimeEvent) { + frame_system::Pallet::::assert_has_event(generic_event.into()); +} + fn assert_last_event(generic_event: ::RuntimeEvent) { frame_system::Pallet::::assert_last_event(generic_event.into()); } @@ -152,7 +156,7 @@ mod benches { Pallet::::exec_migration(c, false, &mut meter); } - assert_last_event::(Event::UpgradeFailed {}.into()); + assert_has_event::(Event::UpgradeFailed {}.into()); Ok(()) } From 58a5effbeac3927d46059d4c906c2f9134540d23 Mon Sep 17 00:00:00 2001 From: "paritytech-release-backport-bot[bot]" <191369287+paritytech-release-backport-bot[bot]@users.noreply.github.com> Date: Mon, 30 Jun 2025 14:30:45 +0000 Subject: [PATCH 024/128] [stable2506] Backport #8932 (#9011) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Backport #8932 into `stable2506` from bkchr. See the [documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md) on how to use this bot. Co-authored-by: Bastian Köcher Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Egor_P --- prdoc/pr_8932.prdoc | 11 +++++++++++ substrate/frame/balances/src/benchmarking.rs | 2 -- 2 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 prdoc/pr_8932.prdoc diff --git a/prdoc/pr_8932.prdoc b/prdoc/pr_8932.prdoc new file mode 100644 index 0000000000000..771a8d603cef4 --- /dev/null +++ b/prdoc/pr_8932.prdoc @@ -0,0 +1,11 @@ +title: 'pallet-balances: Do not create account in benchmarking' +doc: +- audience: Runtime Dev + description: |- + This particular benchmark is about benchmarking the account creation, so we should not create it before :) + + + Closes: https://github.com/paritytech/polkadot-sdk/issues/8927 +crates: +- name: pallet-balances + bump: patch diff --git a/substrate/frame/balances/src/benchmarking.rs b/substrate/frame/balances/src/benchmarking.rs index a761f8e2af828..d26660ac88e5c 100644 --- a/substrate/frame/balances/src/benchmarking.rs +++ b/substrate/frame/balances/src/benchmarking.rs @@ -127,10 +127,8 @@ mod benchmarks { let user: T::AccountId = account("user", 0, SEED); let user_lookup = T::Lookup::unlookup(user.clone()); - // Give the user some initial balance. let existential_deposit: T::Balance = minimum_balance::(); let balance_amount = existential_deposit.saturating_mul(ED_MULTIPLIER.into()); - let _ = as Currency<_>>::make_free_balance_be(&user, balance_amount); #[extrinsic_call] force_set_balance(RawOrigin::Root, user_lookup, balance_amount); From da2e66e38de35dfe37f008d9eccc29eef30ff1f1 Mon Sep 17 00:00:00 2001 From: "paritytech-release-backport-bot[bot]" <191369287+paritytech-release-backport-bot[bot]@users.noreply.github.com> Date: Wed, 2 Jul 2025 11:44:58 +0000 Subject: [PATCH 025/128] [stable2506] Backport #9059 (#9065) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Backport #9059 into `stable2506` from bkchr. See the [documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md) on how to use this bot. Co-authored-by: Bastian Köcher Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- cumulus/client/collator/src/service.rs | 16 +++++++++++++++- prdoc/pr_9059.prdoc | 8 ++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 prdoc/pr_9059.prdoc diff --git a/cumulus/client/collator/src/service.rs b/cumulus/client/collator/src/service.rs index 921f1890f783e..a31fe43120ed4 100644 --- a/cumulus/client/collator/src/service.rs +++ b/cumulus/client/collator/src/service.rs @@ -235,7 +235,7 @@ where }; // Create the parachain block data for the validators. - let (collation_info, api_version) = self + let (collation_info, _api_version) = self .fetch_collation_info(block_hash, block.header()) .map_err(|e| { tracing::error!( @@ -247,6 +247,20 @@ where .ok() .flatten()?; + // Workaround for: https://github.com/paritytech/polkadot-sdk/issues/64 + // + // We are always using the `api_version` of the parent block. The `api_version` can only + // change with a runtime upgrade and this is when we want to observe the old `api_version`. + // Because this old `api_version` is the one used to validate this block. Otherwise we + // already assume the `api_version` is higher than what the relay chain will use and this + // will lead to validation errors. + let api_version = self + .runtime_api + .runtime_api() + .api_version::>(parent_header.hash()) + .ok() + .flatten()?; + let block_data = ParachainBlockData::::new(vec![block], compact_proof); let pov = polkadot_node_primitives::maybe_compress_pov(PoV { diff --git a/prdoc/pr_9059.prdoc b/prdoc/pr_9059.prdoc new file mode 100644 index 0000000000000..3418b0b7fe9d7 --- /dev/null +++ b/prdoc/pr_9059.prdoc @@ -0,0 +1,8 @@ +title: Fetch parent block `api_version` +doc: +- audience: Node Dev + description: |- + This is required to ensure that we use the `api_version` of the runtime that will be used on the relay chain to validate the block. Otherwise the node may thinks the runtime was already upgraded and sends data to the relay chain that can not be decoded by the runtime and thus, the validation fails. +crates: +- name: cumulus-client-collator + bump: patch From 0fa4b0f74868b1183c1fe18c6658c34546d4103b Mon Sep 17 00:00:00 2001 From: "paritytech-release-backport-bot[bot]" <191369287+paritytech-release-backport-bot[bot]@users.noreply.github.com> Date: Wed, 2 Jul 2025 15:18:32 +0000 Subject: [PATCH 026/128] [stable2506] Backport #9050 (#9069) Backport #9050 into `stable2506` from ordian. See the [documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md) on how to use this bot. Co-authored-by: ordian <4211399+ordian@users.noreply.github.com> --- .../dispute-coordinator/src/initialized.rs | 78 ++++ .../core/dispute-coordinator/src/metrics.rs | 19 +- .../core/dispute-coordinator/src/tests.rs | 338 ++++++++++++++++++ prdoc/pr_9050.prdoc | 10 + 4 files changed, 443 insertions(+), 2 deletions(-) create mode 100644 prdoc/pr_9050.prdoc diff --git a/polkadot/node/core/dispute-coordinator/src/initialized.rs b/polkadot/node/core/dispute-coordinator/src/initialized.rs index 0f9245b510091..cb2679d0267f3 100644 --- a/polkadot/node/core/dispute-coordinator/src/initialized.rs +++ b/polkadot/node/core/dispute-coordinator/src/initialized.rs @@ -1421,6 +1421,13 @@ impl Initialized { self.metrics.on_concluded_invalid(); } + // After validators are disabled, revisit active disputes to unactivate those where all + // raising parties are now disabled + if import_result.is_freshly_concluded_for() || import_result.is_freshly_concluded_against() + { + self.revisit_active_disputes_after_disabling(overlay_db, session)?; + } + // Only write when votes have changed. if let Some(votes) = import_result.into_updated_votes() { overlay_db.write_candidate_votes(session, candidate_hash, votes.into()); @@ -1570,6 +1577,61 @@ impl Initialized { fn session_is_ancient(&self, session_idx: SessionIndex) -> bool { return session_idx < self.highest_session_seen.saturating_sub(DISPUTE_WINDOW.get() - 1) } + + /// Revisit active non-confirmed disputes after validators have been disabled. + /// Unactivates disputes where all raising parties (invalid voters) are now disabled. + fn revisit_active_disputes_after_disabling( + &mut self, + overlay_db: &mut OverlayedBackend<'_, impl Backend>, + session: SessionIndex, + ) -> FatalResult<()> { + let mut recent_disputes = overlay_db.load_recent_disputes()?.unwrap_or_default(); + let mut disputes_to_remove = Vec::new(); + + // Create session bounds for efficient iteration + let session_start = (session, CandidateHash(Hash::zero())); + let session_end = (session + 1, CandidateHash(Hash::zero())); + + for ((dispute_session, candidate_hash), status) in + recent_disputes.range(&session_start..&session_end) + { + debug_assert_eq!(session, *dispute_session); + // Only check unconfirmed + if status.is_confirmed_concluded() { + continue + } + let Some(votes) = overlay_db.load_candidate_votes(*dispute_session, candidate_hash)? + else { + continue + }; + // Check if all invalid voters (raising parties) are disabled + if !votes.invalid.is_empty() && + votes.invalid.iter().all(|(_, validator_index, _)| { + self.offchain_disabled_validators.is_disabled(session, *validator_index) + }) { + disputes_to_remove.push((*dispute_session, *candidate_hash)); + + gum::info!( + target: LOG_TARGET, + session = dispute_session, + ?candidate_hash, + invalid_voters = ?votes.invalid.iter().map(|(_, idx, _)| *idx).collect::>(), + "Unactivating dispute where all raising parties are now disabled" + ); + } + } + + // Remove them from RecentDisputes (setting status to inactive) + if !disputes_to_remove.is_empty() { + for key in disputes_to_remove { + recent_disputes.remove(&key); + self.metrics.on_unactivated_dispute(); + } + overlay_db.write_recent_disputes(recent_disputes); + } + + Ok(()) + } } /// Messages to be handled in this subsystem. @@ -1779,4 +1841,20 @@ impl OffchainDisabledValidators { .map(|(i, _)| *i) }) } + + /// Check if a validator is disabled for a given session. + pub fn is_disabled( + &self, + session_index: SessionIndex, + validator_index: ValidatorIndex, + ) -> bool { + self.per_session + .get(&session_index) + .map(|session_disputes| { + session_disputes.backers_for_invalid.peek(&validator_index).is_some() || + session_disputes.for_invalid.peek(&validator_index).is_some() || + session_disputes.against_valid.peek(&validator_index).is_some() + }) + .unwrap_or(false) + } } diff --git a/polkadot/node/core/dispute-coordinator/src/metrics.rs b/polkadot/node/core/dispute-coordinator/src/metrics.rs index c9454fb1d3cee..5f4739a88988e 100644 --- a/polkadot/node/core/dispute-coordinator/src/metrics.rs +++ b/polkadot/node/core/dispute-coordinator/src/metrics.rs @@ -32,6 +32,8 @@ struct MetricsInner { vote_cleanup_time: prometheus::Histogram, /// Number of refrained participations. refrained_participations: prometheus::Counter, + /// Number of unactivated disputes. + unactivated: prometheus::Counter, /// Distribution of participation durations. participation_durations: prometheus::Histogram, /// Measures the duration of the full participation pipeline: From when @@ -136,6 +138,12 @@ impl Metrics { metrics.participation_best_effort_queue_size.set(size); } } + + pub(crate) fn on_unactivated_dispute(&self) { + if let Some(metrics) = &self.0 { + metrics.unactivated.inc(); + } + } } impl metrics::Metrics for Metrics { @@ -222,15 +230,22 @@ impl metrics::Metrics for Metrics { registry, )?, participation_priority_queue_size: prometheus::register( - prometheus::Gauge::new("polkadot_parachain_dispute_participation_priority_queue_size", + prometheus::Gauge::new("polkadot_parachain_dispute_participation_priority_queue_size", "Number of disputes waiting for local participation in the priority queue.")?, registry, )?, participation_best_effort_queue_size: prometheus::register( - prometheus::Gauge::new("polkadot_parachain_dispute_participation_best_effort_queue_size", + prometheus::Gauge::new("polkadot_parachain_dispute_participation_best_effort_queue_size", "Number of disputes waiting for local participation in the best effort queue.")?, registry, )?, + unactivated: prometheus::register( + prometheus::Counter::with_opts(prometheus::Opts::new( + "polkadot_parachain_dispute_unactivated_total", + "Total number of disputes that were unactivated due to all raising parties being disabled.", + ))?, + registry, + )?, }; Ok(Metrics(Some(metrics))) } diff --git a/polkadot/node/core/dispute-coordinator/src/tests.rs b/polkadot/node/core/dispute-coordinator/src/tests.rs index 658ce7cd98c58..99c5c2a222de5 100644 --- a/polkadot/node/core/dispute-coordinator/src/tests.rs +++ b/polkadot/node/core/dispute-coordinator/src/tests.rs @@ -4390,3 +4390,341 @@ async fn handle_disabled_validators_queries( } ); } + +/// Test for the functionality that unactivates disputes when all raising parties are disabled. +/// +/// This test verifies the implementation where: +/// 1. Multiple disputes are raised by the same validator: candidate C is raised by 2 and 5 +/// candidate A and B are raised by 2 +/// 2. When one dispute (A) concludes against that validator, it gets disabled. +/// 3. All other active disputes in that session where this validator was the sole raising party +/// should be unactivated (B). +/// 4. Disputes can become active again if non-disabled validators vote against them or if the +/// dispute gets confirmed. +#[test] +fn disputes_unactivated_when_all_raising_parties_disabled() { + test_harness(|mut test_state, mut virtual_overseer| { + Box::pin(async move { + let session = 1; + + test_state.handle_resume_sync(&mut virtual_overseer, session).await; + + let candidate_receipt_c = make_valid_candidate_receipt(); + let candidate_hash_c = candidate_receipt_c.hash(); + + let block_hash = test_state + .activate_leaf_at_session( + &mut virtual_overseer, + session, + 1, + vec![make_candidate_included_event(candidate_receipt_c.clone())], + ) + .await; + + let candidate_receipt_a = make_another_valid_candidate_receipt(block_hash); + let candidate_hash_a = candidate_receipt_a.hash(); + + let mut candidate_receipt_b = make_another_valid_candidate_receipt(block_hash); + candidate_receipt_b.descriptor.set_pov_hash(Hash::from( + [0xFF; 32], // Altering this receipt so its hash will be changed + )); + let candidate_hash_b = candidate_receipt_b.hash(); + + // activate leaf - with both candidates included + test_state + .activate_leaf_at_session( + &mut virtual_overseer, + session, + 2, + vec![ + make_candidate_included_event(candidate_receipt_a.clone()), + make_candidate_included_event(candidate_receipt_b.clone()), + ], + ) + .await; + + // Import first dispute with validator 2 as the sole invalid voter + let (valid_vote, invalid_vote) = generate_opposing_votes_pair( + &test_state, + ValidatorIndex(1), + ValidatorIndex(2), + candidate_hash_a, + session, + VoteType::Explicit, + ) + .await; + + let (pending_confirmation, confirmation_rx) = oneshot::channel(); + let pending_confirmation = Some(pending_confirmation); + + virtual_overseer + .send(FromOrchestra::Communication { + msg: DisputeCoordinatorMessage::ImportStatements { + candidate_receipt: candidate_receipt_a.clone(), + session, + statements: vec![ + (valid_vote, ValidatorIndex(1)), + (invalid_vote, ValidatorIndex(2)), + ], + pending_confirmation, + }, + }) + .await; + + handle_disabled_validators_queries(&mut virtual_overseer, Vec::new()).await; + handle_approval_vote_request(&mut virtual_overseer, &candidate_hash_a, HashMap::new()) + .await; + + assert_eq!(confirmation_rx.await, Ok(ImportStatementsResult::ValidImport)); + + participation_with_distribution( + &mut virtual_overseer, + &candidate_hash_a, + candidate_receipt_a.commitments_hash, + ) + .await; + + // Import second dispute with same validator 2 as invalid voter + let (valid_vote, invalid_vote) = generate_opposing_votes_pair( + &test_state, + ValidatorIndex(3), + ValidatorIndex(2), + candidate_hash_b, + session, + VoteType::Explicit, + ) + .await; + + let (pending_confirmation, confirmation_rx) = oneshot::channel(); + let pending_confirmation = Some(pending_confirmation); + + virtual_overseer + .send(FromOrchestra::Communication { + msg: DisputeCoordinatorMessage::ImportStatements { + candidate_receipt: candidate_receipt_b.clone(), + session, + statements: vec![ + (valid_vote.clone(), ValidatorIndex(3)), + (invalid_vote, ValidatorIndex(2)), + ], + pending_confirmation, + }, + }) + .await; + + handle_approval_vote_request(&mut virtual_overseer, &candidate_hash_b, HashMap::new()) + .await; + + assert_eq!(confirmation_rx.await, Ok(ImportStatementsResult::ValidImport)); + + participation_with_distribution( + &mut virtual_overseer, + &candidate_hash_b, + candidate_receipt_b.commitments_hash, + ) + .await; + + // Import third dispute with multiple validators as invalid voters + + let (valid_vote_1, invalid_vote_1) = generate_opposing_votes_pair( + &test_state, + ValidatorIndex(3), + ValidatorIndex(2), + candidate_hash_c, + session, + VoteType::Explicit, + ) + .await; + let (valid_vote_2, invalid_vote_2) = generate_opposing_votes_pair( + &test_state, + ValidatorIndex(4), + ValidatorIndex(5), + candidate_hash_c, + session, + VoteType::Explicit, + ) + .await; + + let (pending_confirmation, confirmation_rx) = oneshot::channel(); + let pending_confirmation = Some(pending_confirmation); + + virtual_overseer + .send(FromOrchestra::Communication { + msg: DisputeCoordinatorMessage::ImportStatements { + candidate_receipt: candidate_receipt_c.clone(), + session, + statements: vec![ + (valid_vote_1, ValidatorIndex(3)), + (invalid_vote_1, ValidatorIndex(2)), + (valid_vote_2, ValidatorIndex(4)), + (invalid_vote_2, ValidatorIndex(5)), + ], + pending_confirmation, + }, + }) + .await; + + handle_disabled_validators_queries(&mut virtual_overseer, Vec::new()).await; + handle_approval_vote_request(&mut virtual_overseer, &candidate_hash_c, HashMap::new()) + .await; + assert_eq!(confirmation_rx.await, Ok(ImportStatementsResult::ValidImport)); + + participation_with_distribution( + &mut virtual_overseer, + &candidate_hash_c, + candidate_receipt_c.commitments_hash, + ) + .await; + + // Verify we have 3 active/recent disputes + { + let (tx, rx) = oneshot::channel(); + virtual_overseer + .send(FromOrchestra::Communication { + msg: DisputeCoordinatorMessage::RecentDisputes(tx), + }) + .await; + assert_eq!(rx.await.unwrap().len(), 3); + } + + // Import enough valid votes to conclude dispute A as valid (disabling validator 2) + let mut additional_votes = vec![]; + for i in 3..8 { + let vote = test_state.issue_explicit_statement_with_index( + ValidatorIndex(i), + candidate_hash_a, + session, + true, + ); + additional_votes.push((vote, ValidatorIndex(i))); + } + + let (pending_confirmation, confirmation_rx) = oneshot::channel(); + let pending_confirmation = Some(pending_confirmation); + + virtual_overseer + .send(FromOrchestra::Communication { + msg: DisputeCoordinatorMessage::ImportStatements { + candidate_receipt: candidate_receipt_a.clone(), + session, + statements: additional_votes, + pending_confirmation, + }, + }) + .await; + + handle_approval_vote_request(&mut virtual_overseer, &candidate_hash_a, HashMap::new()) + .await; + assert_eq!(confirmation_rx.await, Ok(ImportStatementsResult::ValidImport)); + + // Verify one dispute got deactivated + { + let (tx, rx) = oneshot::channel(); + virtual_overseer + .send(FromOrchestra::Communication { + msg: DisputeCoordinatorMessage::RecentDisputes(tx), + }) + .await; + assert_eq!(rx.await.unwrap().len(), 2); + } + // and we can finalize the chain with A and B + { + let (tx, rx) = oneshot::channel(); + + let base_hash = Hash::repeat_byte(0x0f); + let block_hash_a = Hash::repeat_byte(0x0a); + let block_hash_c = Hash::repeat_byte(0x0c); + + virtual_overseer + .send(FromOrchestra::Communication { + msg: DisputeCoordinatorMessage::DetermineUndisputedChain { + base: (10, base_hash), + block_descriptions: vec![ + BlockDescription { + block_hash: block_hash_a, + session, + candidates: vec![candidate_hash_a, candidate_hash_b], + }, + BlockDescription { + block_hash: block_hash_c, + session, + candidates: vec![candidate_hash_c], + }, + ], + tx, + }, + }) + .await; + + assert_eq!(rx.await.unwrap(), (11, block_hash_a)); + } + + // Now let's import a vote against B from non-disabled validator 5 + let invalid_vote_from_5 = test_state.issue_explicit_statement_with_index( + ValidatorIndex(5), + candidate_hash_b, + session, + false, + ); + + let (pending_confirmation, confirmation_rx) = oneshot::channel(); + let pending_confirmation = Some(pending_confirmation); + + virtual_overseer + .send(FromOrchestra::Communication { + msg: DisputeCoordinatorMessage::ImportStatements { + candidate_receipt: candidate_receipt_b.clone(), + session, + statements: vec![ + (valid_vote, ValidatorIndex(3)), + (invalid_vote_from_5, ValidatorIndex(5)), + ], + pending_confirmation, + }, + }) + .await; + + handle_approval_vote_request(&mut virtual_overseer, &candidate_hash_b, HashMap::new()) + .await; + assert_eq!(confirmation_rx.await, Ok(ImportStatementsResult::ValidImport)); + + // Verify dispute B is now active again + { + let (tx, rx) = oneshot::channel(); + virtual_overseer + .send(FromOrchestra::Communication { + msg: DisputeCoordinatorMessage::RecentDisputes(tx), + }) + .await; + assert_eq!(rx.await.unwrap().len(), 3); + } + // and we can't finalize the chain with A and B anymore + { + let (tx, rx) = oneshot::channel(); + + let base_hash = Hash::repeat_byte(0x0f); + let block_hash_a = Hash::repeat_byte(0x0a); + + virtual_overseer + .send(FromOrchestra::Communication { + msg: DisputeCoordinatorMessage::DetermineUndisputedChain { + base: (10, base_hash), + block_descriptions: vec![BlockDescription { + block_hash: block_hash_a, + session, + candidates: vec![candidate_hash_a, candidate_hash_b], + }], + tx, + }, + }) + .await; + + assert_eq!(rx.await.unwrap(), (10, base_hash)); + } + + virtual_overseer.send(FromOrchestra::Signal(OverseerSignal::Conclude)).await; + + test_state + }) + }); +} diff --git a/prdoc/pr_9050.prdoc b/prdoc/pr_9050.prdoc new file mode 100644 index 0000000000000..be7ad45cdbaba --- /dev/null +++ b/prdoc/pr_9050.prdoc @@ -0,0 +1,10 @@ +title: "dispute-coordinator: handle race with offchain disabling" + +doc: + - audience: Node Dev + description: | + Fixes a potential race with off-chain disabling when we learned about disablement after importing a dispute from that validator. + +crates: +- name: polkadot-node-core-dispute-coordinator + bump: patch From 03ed2daec7fd2afd6868742a6b37db440c17d8a2 Mon Sep 17 00:00:00 2001 From: Egor_P Date: Wed, 2 Jul 2025 19:33:41 +0200 Subject: [PATCH 027/128] [stable2506] Bump spec_version to 1_019_001 and reorder prdocs (#9077) --- .../assets/asset-hub-rococo/src/lib.rs | 2 +- .../assets/asset-hub-westend/src/lib.rs | 2 +- .../bridge-hubs/bridge-hub-rococo/src/lib.rs | 2 +- .../bridge-hubs/bridge-hub-westend/src/lib.rs | 2 +- .../collectives-westend/src/lib.rs | 2 +- .../coretime/coretime-rococo/src/lib.rs | 2 +- .../coretime/coretime-westend/src/lib.rs | 2 +- .../glutton/glutton-westend/src/lib.rs | 2 +- .../runtimes/people/people-rococo/src/lib.rs | 2 +- .../runtimes/people/people-westend/src/lib.rs | 2 +- polkadot/runtime/rococo/src/lib.rs | 2 +- polkadot/runtime/westend/src/lib.rs | 2 +- prdoc/pr_9077.prdoc | 31 +++++++++++++++++++ prdoc/{ => stable2506}/pr_8076.prdoc | 0 prdoc/{ => stable2506}/pr_8596.prdoc | 0 prdoc/{ => stable2506}/pr_8694.prdoc | 0 prdoc/{ => stable2506}/pr_8787.prdoc | 0 prdoc/{ => stable2506}/pr_8831.prdoc | 0 prdoc/{ => stable2506}/pr_8832.prdoc | 0 prdoc/{ => stable2506}/pr_8833.prdoc | 0 prdoc/{ => stable2506}/pr_8834.prdoc | 0 prdoc/{ => stable2506}/pr_8861.prdoc | 0 prdoc/{ => stable2506}/pr_8903.prdoc | 0 prdoc/{ => stable2506}/pr_8923.prdoc | 0 prdoc/{ => stable2506}/pr_8925.prdoc | 0 prdoc/{ => stable2506}/pr_8932.prdoc | 0 prdoc/{ => stable2506}/pr_8948.prdoc | 0 prdoc/{ => stable2506}/pr_8973.prdoc | 0 prdoc/{ => stable2506}/pr_8980.prdoc | 0 prdoc/{ => stable2506}/pr_9050.prdoc | 0 prdoc/{ => stable2506}/pr_9059.prdoc | 0 31 files changed, 43 insertions(+), 12 deletions(-) create mode 100644 prdoc/pr_9077.prdoc rename prdoc/{ => stable2506}/pr_8076.prdoc (100%) rename prdoc/{ => stable2506}/pr_8596.prdoc (100%) rename prdoc/{ => stable2506}/pr_8694.prdoc (100%) rename prdoc/{ => stable2506}/pr_8787.prdoc (100%) rename prdoc/{ => stable2506}/pr_8831.prdoc (100%) rename prdoc/{ => stable2506}/pr_8832.prdoc (100%) rename prdoc/{ => stable2506}/pr_8833.prdoc (100%) rename prdoc/{ => stable2506}/pr_8834.prdoc (100%) rename prdoc/{ => stable2506}/pr_8861.prdoc (100%) rename prdoc/{ => stable2506}/pr_8903.prdoc (100%) rename prdoc/{ => stable2506}/pr_8923.prdoc (100%) rename prdoc/{ => stable2506}/pr_8925.prdoc (100%) rename prdoc/{ => stable2506}/pr_8932.prdoc (100%) rename prdoc/{ => stable2506}/pr_8948.prdoc (100%) rename prdoc/{ => stable2506}/pr_8973.prdoc (100%) rename prdoc/{ => stable2506}/pr_8980.prdoc (100%) rename prdoc/{ => stable2506}/pr_9050.prdoc (100%) rename prdoc/{ => stable2506}/pr_9059.prdoc (100%) diff --git a/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs b/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs index b701a3264502d..8c91cae50f4e4 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs @@ -129,7 +129,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: alloc::borrow::Cow::Borrowed("statemine"), impl_name: alloc::borrow::Cow::Borrowed("statemine"), authoring_version: 1, - spec_version: 1_019_000, + spec_version: 1_019_001, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 16, diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs index 730d0cb24a49b..99d69b9c60bd0 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs @@ -133,7 +133,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: alloc::borrow::Cow::Borrowed("westmint"), impl_name: alloc::borrow::Cow::Borrowed("westmint"), authoring_version: 1, - spec_version: 1_019_000, + spec_version: 1_019_001, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 16, diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs index 9ae47d43c279f..85e95fe61fa93 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs @@ -253,7 +253,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: alloc::borrow::Cow::Borrowed("bridge-hub-rococo"), impl_name: alloc::borrow::Cow::Borrowed("bridge-hub-rococo"), authoring_version: 1, - spec_version: 1_019_000, + spec_version: 1_019_001, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 6, diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/lib.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/lib.rs index 258510279ef71..09f24d42647b4 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/lib.rs @@ -243,7 +243,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: alloc::borrow::Cow::Borrowed("bridge-hub-westend"), impl_name: alloc::borrow::Cow::Borrowed("bridge-hub-westend"), authoring_version: 1, - spec_version: 1_019_000, + spec_version: 1_019_001, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 6, diff --git a/cumulus/parachains/runtimes/collectives/collectives-westend/src/lib.rs b/cumulus/parachains/runtimes/collectives/collectives-westend/src/lib.rs index 4e4f736e636a5..3e82c78b6dc6b 100644 --- a/cumulus/parachains/runtimes/collectives/collectives-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/collectives/collectives-westend/src/lib.rs @@ -126,7 +126,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: alloc::borrow::Cow::Borrowed("collectives-westend"), impl_name: alloc::borrow::Cow::Borrowed("collectives-westend"), authoring_version: 1, - spec_version: 1_019_000, + spec_version: 1_019_001, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 6, diff --git a/cumulus/parachains/runtimes/coretime/coretime-rococo/src/lib.rs b/cumulus/parachains/runtimes/coretime/coretime-rococo/src/lib.rs index 6b12ba95861fc..553529b8f2b1a 100644 --- a/cumulus/parachains/runtimes/coretime/coretime-rococo/src/lib.rs +++ b/cumulus/parachains/runtimes/coretime/coretime-rococo/src/lib.rs @@ -159,7 +159,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: alloc::borrow::Cow::Borrowed("coretime-rococo"), impl_name: alloc::borrow::Cow::Borrowed("coretime-rococo"), authoring_version: 1, - spec_version: 1_019_000, + spec_version: 1_019_001, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 2, diff --git a/cumulus/parachains/runtimes/coretime/coretime-westend/src/lib.rs b/cumulus/parachains/runtimes/coretime/coretime-westend/src/lib.rs index 23a6d4b664e82..d4256fb47ae46 100644 --- a/cumulus/parachains/runtimes/coretime/coretime-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/coretime/coretime-westend/src/lib.rs @@ -159,7 +159,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: alloc::borrow::Cow::Borrowed("coretime-westend"), impl_name: alloc::borrow::Cow::Borrowed("coretime-westend"), authoring_version: 1, - spec_version: 1_019_000, + spec_version: 1_019_001, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 2, diff --git a/cumulus/parachains/runtimes/glutton/glutton-westend/src/lib.rs b/cumulus/parachains/runtimes/glutton/glutton-westend/src/lib.rs index a26d8c9612c1a..4d852c5946d3a 100644 --- a/cumulus/parachains/runtimes/glutton/glutton-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/glutton/glutton-westend/src/lib.rs @@ -103,7 +103,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: alloc::borrow::Cow::Borrowed("glutton-westend"), impl_name: alloc::borrow::Cow::Borrowed("glutton-westend"), authoring_version: 1, - spec_version: 1_019_000, + spec_version: 1_019_001, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 1, diff --git a/cumulus/parachains/runtimes/people/people-rococo/src/lib.rs b/cumulus/parachains/runtimes/people/people-rococo/src/lib.rs index 6d3567c2016b0..f99d81fa3efa8 100644 --- a/cumulus/parachains/runtimes/people/people-rococo/src/lib.rs +++ b/cumulus/parachains/runtimes/people/people-rococo/src/lib.rs @@ -146,7 +146,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: alloc::borrow::Cow::Borrowed("people-rococo"), impl_name: alloc::borrow::Cow::Borrowed("people-rococo"), authoring_version: 1, - spec_version: 1_019_000, + spec_version: 1_019_001, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 1, diff --git a/cumulus/parachains/runtimes/people/people-westend/src/lib.rs b/cumulus/parachains/runtimes/people/people-westend/src/lib.rs index 31651eb2521ee..3636add232239 100644 --- a/cumulus/parachains/runtimes/people/people-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/people/people-westend/src/lib.rs @@ -149,7 +149,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: alloc::borrow::Cow::Borrowed("people-westend"), impl_name: alloc::borrow::Cow::Borrowed("people-westend"), authoring_version: 1, - spec_version: 1_019_000, + spec_version: 1_019_001, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 2, diff --git a/polkadot/runtime/rococo/src/lib.rs b/polkadot/runtime/rococo/src/lib.rs index de13cae4c9c23..47386cabd5487 100644 --- a/polkadot/runtime/rococo/src/lib.rs +++ b/polkadot/runtime/rococo/src/lib.rs @@ -184,7 +184,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: alloc::borrow::Cow::Borrowed("rococo"), impl_name: alloc::borrow::Cow::Borrowed("parity-rococo-v2.0"), authoring_version: 0, - spec_version: 1_019_000, + spec_version: 1_019_001, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 26, diff --git a/polkadot/runtime/westend/src/lib.rs b/polkadot/runtime/westend/src/lib.rs index 3e50ba833e951..11b41a07e4de6 100644 --- a/polkadot/runtime/westend/src/lib.rs +++ b/polkadot/runtime/westend/src/lib.rs @@ -178,7 +178,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: alloc::borrow::Cow::Borrowed("westend"), impl_name: alloc::borrow::Cow::Borrowed("parity-westend"), authoring_version: 2, - spec_version: 1_019_000, + spec_version: 1_019_001, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 27, diff --git a/prdoc/pr_9077.prdoc b/prdoc/pr_9077.prdoc new file mode 100644 index 0000000000000..6c31f2dfe7633 --- /dev/null +++ b/prdoc/pr_9077.prdoc @@ -0,0 +1,31 @@ +title: '[stable2506] Bump spec_version to 1_019_001 and reorder prdocs' +doc: +- audience: + - Runtime User + - Runtime Dev + description: Bump spec_version to 1_019_001 and reorder prdocs +crates: +- name: asset-hub-rococo-runtime + bump: none +- name: asset-hub-westend-runtime + bump: none +- name: bridge-hub-rococo-runtime + bump: none +- name: bridge-hub-westend-runtime + bump: none +- name: collectives-westend-runtime + bump: none +- name: coretime-rococo-runtime + bump: none +- name: coretime-westend-runtime + bump: none +- name: glutton-westend-runtime + bump: none +- name: people-rococo-runtime + bump: none +- name: people-westend-runtime + bump: none +- name: rococo-runtime + bump: none +- name: westend-runtime + bump: none diff --git a/prdoc/pr_8076.prdoc b/prdoc/stable2506/pr_8076.prdoc similarity index 100% rename from prdoc/pr_8076.prdoc rename to prdoc/stable2506/pr_8076.prdoc diff --git a/prdoc/pr_8596.prdoc b/prdoc/stable2506/pr_8596.prdoc similarity index 100% rename from prdoc/pr_8596.prdoc rename to prdoc/stable2506/pr_8596.prdoc diff --git a/prdoc/pr_8694.prdoc b/prdoc/stable2506/pr_8694.prdoc similarity index 100% rename from prdoc/pr_8694.prdoc rename to prdoc/stable2506/pr_8694.prdoc diff --git a/prdoc/pr_8787.prdoc b/prdoc/stable2506/pr_8787.prdoc similarity index 100% rename from prdoc/pr_8787.prdoc rename to prdoc/stable2506/pr_8787.prdoc diff --git a/prdoc/pr_8831.prdoc b/prdoc/stable2506/pr_8831.prdoc similarity index 100% rename from prdoc/pr_8831.prdoc rename to prdoc/stable2506/pr_8831.prdoc diff --git a/prdoc/pr_8832.prdoc b/prdoc/stable2506/pr_8832.prdoc similarity index 100% rename from prdoc/pr_8832.prdoc rename to prdoc/stable2506/pr_8832.prdoc diff --git a/prdoc/pr_8833.prdoc b/prdoc/stable2506/pr_8833.prdoc similarity index 100% rename from prdoc/pr_8833.prdoc rename to prdoc/stable2506/pr_8833.prdoc diff --git a/prdoc/pr_8834.prdoc b/prdoc/stable2506/pr_8834.prdoc similarity index 100% rename from prdoc/pr_8834.prdoc rename to prdoc/stable2506/pr_8834.prdoc diff --git a/prdoc/pr_8861.prdoc b/prdoc/stable2506/pr_8861.prdoc similarity index 100% rename from prdoc/pr_8861.prdoc rename to prdoc/stable2506/pr_8861.prdoc diff --git a/prdoc/pr_8903.prdoc b/prdoc/stable2506/pr_8903.prdoc similarity index 100% rename from prdoc/pr_8903.prdoc rename to prdoc/stable2506/pr_8903.prdoc diff --git a/prdoc/pr_8923.prdoc b/prdoc/stable2506/pr_8923.prdoc similarity index 100% rename from prdoc/pr_8923.prdoc rename to prdoc/stable2506/pr_8923.prdoc diff --git a/prdoc/pr_8925.prdoc b/prdoc/stable2506/pr_8925.prdoc similarity index 100% rename from prdoc/pr_8925.prdoc rename to prdoc/stable2506/pr_8925.prdoc diff --git a/prdoc/pr_8932.prdoc b/prdoc/stable2506/pr_8932.prdoc similarity index 100% rename from prdoc/pr_8932.prdoc rename to prdoc/stable2506/pr_8932.prdoc diff --git a/prdoc/pr_8948.prdoc b/prdoc/stable2506/pr_8948.prdoc similarity index 100% rename from prdoc/pr_8948.prdoc rename to prdoc/stable2506/pr_8948.prdoc diff --git a/prdoc/pr_8973.prdoc b/prdoc/stable2506/pr_8973.prdoc similarity index 100% rename from prdoc/pr_8973.prdoc rename to prdoc/stable2506/pr_8973.prdoc diff --git a/prdoc/pr_8980.prdoc b/prdoc/stable2506/pr_8980.prdoc similarity index 100% rename from prdoc/pr_8980.prdoc rename to prdoc/stable2506/pr_8980.prdoc diff --git a/prdoc/pr_9050.prdoc b/prdoc/stable2506/pr_9050.prdoc similarity index 100% rename from prdoc/pr_9050.prdoc rename to prdoc/stable2506/pr_9050.prdoc diff --git a/prdoc/pr_9059.prdoc b/prdoc/stable2506/pr_9059.prdoc similarity index 100% rename from prdoc/pr_9059.prdoc rename to prdoc/stable2506/pr_9059.prdoc From fa7056a82adb79e65a4011505170871deedc03e2 Mon Sep 17 00:00:00 2001 From: Egor_P Date: Wed, 2 Jul 2025 20:17:58 +0200 Subject: [PATCH 028/128] [stable2506] Reorder prdoc (#9078) --- prdoc/{ => stable2506}/pr_9077.prdoc | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename prdoc/{ => stable2506}/pr_9077.prdoc (100%) diff --git a/prdoc/pr_9077.prdoc b/prdoc/stable2506/pr_9077.prdoc similarity index 100% rename from prdoc/pr_9077.prdoc rename to prdoc/stable2506/pr_9077.prdoc From 9ea81692ea84f14460dd1f19e4afa373ddc74c1c Mon Sep 17 00:00:00 2001 From: "paritytech-release-backport-bot[bot]" <191369287+paritytech-release-backport-bot[bot]@users.noreply.github.com> Date: Thu, 3 Jul 2025 10:10:13 +0000 Subject: [PATCH 029/128] [stable2506] Backport #9047 (#9083) Backport #9047 into `stable2506` from AndreiEres. See the [documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md) on how to use this bot. Co-authored-by: Andrei Eres Co-authored-by: Alexander Samusev <41779041+alvicsam@users.noreply.github.com> Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Oliver Tale-Yazdi --- prdoc/pr_9047.prdoc | 9 +++++++++ .../primitives/api/proc-macro/src/impl_runtime_apis.rs | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 prdoc/pr_9047.prdoc diff --git a/prdoc/pr_9047.prdoc b/prdoc/pr_9047.prdoc new file mode 100644 index 0000000000000..9b18fac5a7d98 --- /dev/null +++ b/prdoc/pr_9047.prdoc @@ -0,0 +1,9 @@ +title: Add extra information to the harmless error logs during validate_transaction +doc: +- audience: Node Operator + description: |- + Adds additional information to the harmless error logs "Bad input data provided" during `validate_transaction`. + +crates: +- name: sp-api-proc-macro + bump: patch diff --git a/substrate/primitives/api/proc-macro/src/impl_runtime_apis.rs b/substrate/primitives/api/proc-macro/src/impl_runtime_apis.rs index 5fe96e63e80db..f517eebf86679 100644 --- a/substrate/primitives/api/proc-macro/src/impl_runtime_apis.rs +++ b/substrate/primitives/api/proc-macro/src/impl_runtime_apis.rs @@ -82,7 +82,7 @@ fn generate_impl_call( quote!( if !#input.is_empty() { panic!( - "Bad input data provided to {}: expected no parameters, but input buffer is not empty.", + "Bad input data provided to {}: expected no parameters, but input buffer is not empty. Nothing bad happened: someone sent an invalid transaction to the node.", #fn_name_str ); } @@ -104,7 +104,7 @@ fn generate_impl_call( &mut #input, ) { Ok(res) => res, - Err(e) => panic!("Bad input data provided to {}: {}", #fn_name_str, e), + Err(e) => panic!("Bad input data provided to {}: {}. Nothing bad happened: someone sent an invalid transaction to the node.", #fn_name_str, e), }; ) }; From e57fe5281315cec96392806e788a34ba60acb147 Mon Sep 17 00:00:00 2001 From: "paritytech-release-backport-bot[bot]" <191369287+paritytech-release-backport-bot[bot]@users.noreply.github.com> Date: Thu, 3 Jul 2025 15:08:59 +0200 Subject: [PATCH 030/128] [stable2506] Backport #8837 (#9090) Backport #8837 into `stable2506` from tdimitrov. See the [documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md) on how to use this bot. Co-authored-by: Tsvetomir Dimitrov Co-authored-by: Javier Viola --- Cargo.lock | 1 + .../core/dispute-coordinator/src/import.rs | 29 ++----- .../dispute-coordinator/src/initialized.rs | 13 +++- .../node/core/dispute-coordinator/src/lib.rs | 9 ++- polkadot/node/subsystem-util/Cargo.toml | 1 + .../src/controlled_validator_indices.rs | 77 +++++++++++++++++++ polkadot/node/subsystem-util/src/lib.rs | 3 + prdoc/pr_8837.prdoc | 14 ++++ 8 files changed, 118 insertions(+), 29 deletions(-) create mode 100644 polkadot/node/subsystem-util/src/controlled_validator_indices.rs create mode 100644 prdoc/pr_8837.prdoc diff --git a/Cargo.lock b/Cargo.lock index e5cabf079514e..b068a4d3f1e5d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -15696,6 +15696,7 @@ dependencies = [ "polkadot-primitives-test-helpers", "prioritized-metered-channel", "rand 0.8.5", + "sc-keystore", "schnellru", "sp-application-crypto 30.0.0", "sp-core 28.0.0", diff --git a/polkadot/node/core/dispute-coordinator/src/import.rs b/polkadot/node/core/dispute-coordinator/src/import.rs index 4263dda54b9b2..51551ebdb07e3 100644 --- a/polkadot/node/core/dispute-coordinator/src/import.rs +++ b/polkadot/node/core/dispute-coordinator/src/import.rs @@ -32,13 +32,12 @@ use polkadot_node_primitives::{ disputes::ValidCandidateVotes, CandidateVotes, DisputeStatus, SignedDisputeStatement, Timestamp, }; use polkadot_node_subsystem::overseer; -use polkadot_node_subsystem_util::runtime::RuntimeInfo; +use polkadot_node_subsystem_util::{runtime::RuntimeInfo, ControlledValidatorIndices}; use polkadot_primitives::{ vstaging::CandidateReceiptV2 as CandidateReceipt, CandidateHash, DisputeStatement, ExecutorParams, Hash, IndexedVec, SessionIndex, SessionInfo, ValidDisputeStatementKind, - ValidatorId, ValidatorIndex, ValidatorPair, ValidatorSignature, + ValidatorId, ValidatorIndex, ValidatorSignature, }; -use sc_keystore::LocalKeystore; use crate::LOG_TARGET; @@ -63,12 +62,12 @@ impl<'a> CandidateEnvironment<'a> { /// /// Return: `None` in case session is outside of session window. pub async fn new( - keystore: &LocalKeystore, ctx: &mut Context, runtime_info: &'a mut RuntimeInfo, session_index: SessionIndex, relay_parent: Hash, disabled_offchain: impl IntoIterator, + controlled_indices: &mut ControlledValidatorIndices, ) -> Option> { let disabled_onchain = runtime_info .get_disabled_validators(ctx.sender(), relay_parent) @@ -105,7 +104,8 @@ impl<'a> CandidateEnvironment<'a> { d }; - let controlled_indices = find_controlled_validator_indices(keystore, &session.validators); + let controlled_indices = controlled_indices.get(session_index, &session.validators).clone(); + Some(Self { session_index, session, executor_params, controlled_indices, disabled_indices }) } @@ -632,22 +632,3 @@ impl ImportResult { } } } - -/// Find indices controlled by this validator. -/// -/// That is all `ValidatorIndex`es we have private keys for. Usually this will only be one. -fn find_controlled_validator_indices( - keystore: &LocalKeystore, - validators: &IndexedVec, -) -> HashSet { - let mut controlled = HashSet::new(); - for (index, validator) in validators.iter().enumerate() { - if keystore.key_pair::(validator).ok().flatten().is_none() { - continue - } - - controlled.insert(ValidatorIndex(index as _)); - } - - controlled -} diff --git a/polkadot/node/core/dispute-coordinator/src/initialized.rs b/polkadot/node/core/dispute-coordinator/src/initialized.rs index cb2679d0267f3..fddbebcbe3989 100644 --- a/polkadot/node/core/dispute-coordinator/src/initialized.rs +++ b/polkadot/node/core/dispute-coordinator/src/initialized.rs @@ -40,8 +40,9 @@ use polkadot_node_subsystem::{ }, overseer, ActivatedLeaf, ActiveLeavesUpdate, FromOrchestra, OverseerSignal, RuntimeApiError, }; -use polkadot_node_subsystem_util::runtime::{ - self, key_ownership_proof, submit_report_dispute_lost, RuntimeInfo, +use polkadot_node_subsystem_util::{ + runtime::{self, key_ownership_proof, submit_report_dispute_lost, RuntimeInfo}, + ControlledValidatorIndices, }; use polkadot_primitives::{ slashing, @@ -98,6 +99,8 @@ pub(crate) struct Initialized { /// We have the onchain state of disabled validators as well as the offchain /// state that is based on the lost disputes. offchain_disabled_validators: OffchainDisabledValidators, + /// The indices of the controlled validators, cached by session. + controlled_validator_indices: ControlledValidatorIndices, /// This is the highest `SessionIndex` seen via `ActiveLeavesUpdate`. It doesn't matter if it /// was cached successfully or not. It is used to detect ancient disputes. highest_session_seen: SessionIndex, @@ -133,6 +136,7 @@ impl Initialized { highest_session_seen: SessionIndex, gaps_in_cache: bool, offchain_disabled_validators: OffchainDisabledValidators, + controlled_validator_indices: ControlledValidatorIndices, ) -> Self { let DisputeCoordinatorSubsystem { config: _, @@ -149,6 +153,7 @@ impl Initialized { keystore, runtime_info, offchain_disabled_validators, + controlled_validator_indices, highest_session_seen, gaps_in_cache, spam_slots, @@ -975,12 +980,12 @@ impl Initialized { }; let env = match CandidateEnvironment::new( - &self.keystore, ctx, &mut self.runtime_info, session, relay_parent, self.offchain_disabled_validators.iter(session), + &mut self.controlled_validator_indices, ) .await { @@ -1457,12 +1462,12 @@ impl Initialized { // Load environment: let env = match CandidateEnvironment::new( - &self.keystore, ctx, &mut self.runtime_info, session, candidate_receipt.descriptor.relay_parent(), self.offchain_disabled_validators.iter(session), + &mut self.controlled_validator_indices, ) .await { diff --git a/polkadot/node/core/dispute-coordinator/src/lib.rs b/polkadot/node/core/dispute-coordinator/src/lib.rs index 8a8dc0f1b0b3e..94fa8c1d1e639 100644 --- a/polkadot/node/core/dispute-coordinator/src/lib.rs +++ b/polkadot/node/core/dispute-coordinator/src/lib.rs @@ -44,6 +44,7 @@ use polkadot_node_subsystem::{ use polkadot_node_subsystem_util::{ database::Database, runtime::{Config as RuntimeInfoConfig, RuntimeInfo}, + ControlledValidatorIndices, }; use polkadot_primitives::{ vstaging::ScrapedOnChainVotes, DisputeStatement, SessionIndex, SessionInfo, ValidatorIndex, @@ -236,6 +237,7 @@ impl DisputeCoordinatorSubsystem { highest_session_seen, gaps_in_cache, offchain_disabled_validators, + controlled_validator_indices, ) = match self .handle_startup(ctx, first_leaf.clone(), &mut runtime_info, &mut overlay_db, clock) .await @@ -263,6 +265,7 @@ impl DisputeCoordinatorSubsystem { highest_session_seen, gaps_in_cache, offchain_disabled_validators, + controlled_validator_indices, ), backend, ))) @@ -289,6 +292,7 @@ impl DisputeCoordinatorSubsystem { SessionIndex, bool, initialized::OffchainDisabledValidators, + ControlledValidatorIndices, )> { let now = clock.now(); @@ -357,16 +361,18 @@ impl DisputeCoordinatorSubsystem { let mut participation_requests = Vec::new(); let mut spam_disputes: UnconfirmedDisputes = UnconfirmedDisputes::new(); + let mut controlled_indices = + ControlledValidatorIndices::new(self.keystore.clone(), DISPUTE_WINDOW.get()); let leaf_hash = initial_head.hash; let (scraper, votes) = ChainScraper::new(ctx.sender(), initial_head).await?; for ((session, ref candidate_hash), _) in active_disputes { let env = match CandidateEnvironment::new( - &self.keystore, ctx, runtime_info, highest_session, leaf_hash, offchain_disabled_validators.iter(session), + &mut controlled_indices, ) .await { @@ -452,6 +458,7 @@ impl DisputeCoordinatorSubsystem { highest_session, gap_in_cache, offchain_disabled_validators, + controlled_indices, )) } } diff --git a/polkadot/node/subsystem-util/Cargo.toml b/polkadot/node/subsystem-util/Cargo.toml index e8cf11c2a83f6..ad118504c8d0b 100644 --- a/polkadot/node/subsystem-util/Cargo.toml +++ b/polkadot/node/subsystem-util/Cargo.toml @@ -32,6 +32,7 @@ polkadot-node-subsystem-types = { workspace = true, default-features = true } polkadot-overseer = { workspace = true, default-features = true } polkadot-primitives = { workspace = true, default-features = true } +sc-keystore = { workspace = true, default-features = true } sp-application-crypto = { workspace = true, default-features = true } sp-core = { workspace = true, default-features = true } sp-keystore = { workspace = true, default-features = true } diff --git a/polkadot/node/subsystem-util/src/controlled_validator_indices.rs b/polkadot/node/subsystem-util/src/controlled_validator_indices.rs new file mode 100644 index 0000000000000..6b94d4a548829 --- /dev/null +++ b/polkadot/node/subsystem-util/src/controlled_validator_indices.rs @@ -0,0 +1,77 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Polkadot. + +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . + +//! `ControlledValidatorIndices` implementation. + +use polkadot_primitives::{IndexedVec, SessionIndex, ValidatorId, ValidatorIndex, ValidatorPair}; +use sc_keystore::LocalKeystore; +use schnellru::{ByLength, LruMap}; +use sp_application_crypto::{AppCrypto, ByteArray}; +use sp_keystore::Keystore; +use std::{collections::HashSet, sync::Arc}; + +/// Keeps track of the validator indices controlled by the local validator in a given session. For +/// better performance, the values for each session are cached. +pub struct ControlledValidatorIndices { + /// The indices of the controlled validators, cached by session. + controlled_validator_indices: LruMap>, + keystore: Arc, +} + +impl ControlledValidatorIndices { + /// Create a new instance of `ControlledValidatorIndices`. + pub fn new(keystore: Arc, cache_size: u32) -> Self { + let controlled_validator_indices = LruMap::new(ByLength::new(cache_size)); + Self { controlled_validator_indices, keystore } + } + + /// Get the controlled validator indices for a given session. If the indices are not known they + /// will be fetched from `session_validators` and cached. + pub fn get( + &mut self, + session: SessionIndex, + session_validators: &IndexedVec, + ) -> &HashSet { + if self.controlled_validator_indices.get(&session).is_none() { + let indices = + Self::find_controlled_validator_indices(&self.keystore, session_validators); + self.controlled_validator_indices.insert(session, indices.clone()); + } + + self.controlled_validator_indices + .get(&session) + .expect("We just inserted the controlled indices; qed") + } + + /// Find indices controlled by this validator. + /// + /// That is all `ValidatorIndex`es we have private keys for. Usually this will only be one. + fn find_controlled_validator_indices( + keystore: &LocalKeystore, + validators: &IndexedVec, + ) -> HashSet { + let mut controlled = HashSet::new(); + for (index, validator) in validators.iter().enumerate() { + if !Keystore::has_keys(keystore, &[(validator.to_raw_vec(), ValidatorPair::ID)]) { + continue + } + + controlled.insert(ValidatorIndex(index as _)); + } + + controlled + } +} diff --git a/polkadot/node/subsystem-util/src/lib.rs b/polkadot/node/subsystem-util/src/lib.rs index 69f4a7c3523d9..6c89c9c0e54db 100644 --- a/polkadot/node/subsystem-util/src/lib.rs +++ b/polkadot/node/subsystem-util/src/lib.rs @@ -99,6 +99,9 @@ pub mod reputation; mod determine_new_blocks; +mod controlled_validator_indices; +pub use controlled_validator_indices::ControlledValidatorIndices; + #[cfg(test)] mod tests; diff --git a/prdoc/pr_8837.prdoc b/prdoc/pr_8837.prdoc new file mode 100644 index 0000000000000..9be69f542d4ae --- /dev/null +++ b/prdoc/pr_8837.prdoc @@ -0,0 +1,14 @@ +title: Cache locally controlled validator indices in dispute-coordinator +doc: + - audience: Node Dev + description: | + `dispute-coordinator` uses `keystore.key_pair()` to obtain the set of locally controlled + validator IDs. This operation happens on each import and is expensive because it involves key + generation from a seed phrase. This patch lazily determines the set of locally controlled + validator IDs and caches the result for each session. + +crates: +- name: polkadot-node-core-dispute-coordinator + bump: minor +- name: polkadot-node-subsystem-util + bump: minor \ No newline at end of file From 8ac625f5f66429ed31d8f2cd791a61228f047e74 Mon Sep 17 00:00:00 2001 From: "paritytech-release-backport-bot[bot]" <191369287+paritytech-release-backport-bot[bot]@users.noreply.github.com> Date: Fri, 4 Jul 2025 08:42:01 +0000 Subject: [PATCH 031/128] [stable2506] Backport #9092 (#9097) Backport #9092 into `stable2506` from EgorPopelyaev. See the [documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md) on how to use this bot. Co-authored-by: Egor_P --- .github/workflows/release-30_publish_release_draft.yml | 2 ++ .github/workflows/release-31_promote-rc-to-final.yml | 2 ++ .github/workflows/release-40_publish-deb-package.yml | 2 ++ .github/workflows/release-50_publish-docker.yml | 2 ++ 4 files changed, 8 insertions(+) diff --git a/.github/workflows/release-30_publish_release_draft.yml b/.github/workflows/release-30_publish_release_draft.yml index e45642ec58c89..c6efe8d53b9a1 100644 --- a/.github/workflows/release-30_publish_release_draft.yml +++ b/.github/workflows/release-30_publish_release_draft.yml @@ -19,6 +19,8 @@ on: jobs: check-synchronization: uses: paritytech-release/sync-workflows/.github/workflows/check-synchronization.yml@main + secrets: + fork_writer_app_key: ${{ secrets.UPSTREAM_CONTENT_SYNC_APP_KEY }} validate-inputs: needs: [ check-synchronization ] diff --git a/.github/workflows/release-31_promote-rc-to-final.yml b/.github/workflows/release-31_promote-rc-to-final.yml index 3535f6c9ee42d..d12374962fc99 100644 --- a/.github/workflows/release-31_promote-rc-to-final.yml +++ b/.github/workflows/release-31_promote-rc-to-final.yml @@ -23,6 +23,8 @@ jobs: check-synchronization: uses: paritytech-release/sync-workflows/.github/workflows/check-synchronization.yml@main + secrets: + fork_writer_app_key: ${{ secrets.UPSTREAM_CONTENT_SYNC_APP_KEY }} validate-inputs: needs: [ check-synchronization ] diff --git a/.github/workflows/release-40_publish-deb-package.yml b/.github/workflows/release-40_publish-deb-package.yml index 508e11b64ee02..c063f590afd67 100644 --- a/.github/workflows/release-40_publish-deb-package.yml +++ b/.github/workflows/release-40_publish-deb-package.yml @@ -18,6 +18,8 @@ on: jobs: check-synchronization: uses: paritytech-release/sync-workflows/.github/workflows/check-synchronization.yml@main + secrets: + fork_writer_app_key: ${{ secrets.UPSTREAM_CONTENT_SYNC_APP_KEY }} validate-inputs: needs: [check-synchronization] diff --git a/.github/workflows/release-50_publish-docker.yml b/.github/workflows/release-50_publish-docker.yml index 6e87a1479d71e..8855c5580815c 100644 --- a/.github/workflows/release-50_publish-docker.yml +++ b/.github/workflows/release-50_publish-docker.yml @@ -66,6 +66,8 @@ env: jobs: check-synchronization: uses: paritytech-release/sync-workflows/.github/workflows/check-synchronization.yml@main + secrets: + fork_writer_app_key: ${{ secrets.UPSTREAM_CONTENT_SYNC_APP_KEY }} validate-inputs: needs: [check-synchronization] From 90693fdd05cf1c35d12de06c5f1d6b5553f62016 Mon Sep 17 00:00:00 2001 From: "paritytech-release-backport-bot[bot]" <191369287+paritytech-release-backport-bot[bot]@users.noreply.github.com> Date: Fri, 4 Jul 2025 14:43:27 +0000 Subject: [PATCH 032/128] [stable2506] Backport #8839 (#9072) Backport #8839 into `stable2506` from Sajjon. See the [documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md) on how to use this bot. --------- Co-authored-by: Alexander Cyon Co-authored-by: Alexandru Vasile <60601340+lexnv@users.noreply.github.com> Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: alvicsam Co-authored-by: Egor_P Co-authored-by: Alexander Cyon --- Cargo.lock | 35 ++ Cargo.toml | 1 + .../relay-chain-minimal-node/src/lib.rs | 3 + polkadot/node/service/src/builder/mod.rs | 3 + prdoc/pr_8839.prdoc | 23 ++ substrate/bin/node/cli/src/service.rs | 3 + .../client/authority-discovery/Cargo.toml | 5 + .../client/authority-discovery/src/error.rs | 3 + .../client/authority-discovery/src/lib.rs | 25 +- .../client/authority-discovery/src/tests.rs | 79 ++++- .../client/authority-discovery/src/worker.rs | 75 ++++- .../src/worker/addr_cache.rs | 303 +++++++++++++++++- .../authority-discovery/src/worker/tests.rs | 149 +++++---- substrate/client/network/types/Cargo.toml | 2 + .../client/network/types/src/multiaddr.rs | 3 +- substrate/client/network/types/src/peer_id.rs | 5 +- 16 files changed, 638 insertions(+), 79 deletions(-) create mode 100644 prdoc/pr_8839.prdoc diff --git a/Cargo.lock b/Cargo.lock index b068a4d3f1e5d..364cd7cb03010 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -19187,6 +19187,7 @@ dependencies = [ "async-trait", "futures", "futures-timer", + "hex", "ip_network", "linked_hash_set", "log", @@ -19198,6 +19199,8 @@ dependencies = [ "sc-client-api", "sc-network", "sc-network-types", + "serde", + "serde_json", "sp-api 26.0.0", "sp-authority-discovery", "sp-blockchain", @@ -19207,7 +19210,9 @@ dependencies = [ "sp-tracing 16.0.0", "substrate-prometheus-endpoint", "substrate-test-runtime-client", + "tempfile", "thiserror 1.0.65", + "tokio", ] [[package]] @@ -20197,6 +20202,8 @@ dependencies = [ "multihash 0.19.1", "quickcheck", "rand 0.8.5", + "serde", + "serde_with", "thiserror 1.0.65", "zeroize", ] @@ -21335,6 +21342,34 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_with" +version = "3.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6b6f7f2fcb69f747921f79f3926bd1e203fce4fef62c268dd3abfb6d86029aa" +dependencies = [ + "base64 0.22.1", + "chrono", + "hex", + "serde", + "serde_derive", + "serde_json", + "serde_with_macros", + "time", +] + +[[package]] +name = "serde_with_macros" +version = "3.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d00caa5193a3c8362ac2b73be6b9e768aa5a4b2f721d8f4b339600c3cb51f8e" +dependencies = [ + "darling", + "proc-macro2 1.0.95", + "quote 1.0.40", + "syn 2.0.98", +] + [[package]] name = "serde_yaml" version = "0.9.34+deprecated" diff --git a/Cargo.toml b/Cargo.toml index 85dc656481aa1..0470295c59df0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1269,6 +1269,7 @@ serde = { version = "1.0.214", default-features = false } serde-big-array = { version = "0.3.2" } serde_derive = { version = "1.0.117" } serde_json = { version = "1.0.132", default-features = false } +serde_with = { version = "3.12.0", default-features = false, features = ["hex", "macros"] } serde_yaml = { version = "0.9" } sha1 = { version = "0.10.6" } sha2 = { version = "0.10.7", default-features = false } diff --git a/cumulus/client/relay-chain-minimal-node/src/lib.rs b/cumulus/client/relay-chain-minimal-node/src/lib.rs index b651e994872f9..f5d2c613f5a92 100644 --- a/cumulus/client/relay-chain-minimal-node/src/lib.rs +++ b/cumulus/client/relay-chain-minimal-node/src/lib.rs @@ -69,12 +69,14 @@ fn build_authority_discovery_service( _ => None, } }); + let net_config_path = config.network.net_config_path.clone(); let (worker, service) = sc_authority_discovery::new_worker_and_service_with_config( sc_authority_discovery::WorkerConfig { publish_non_global_ips: auth_disc_publish_non_global_ips, public_addresses: auth_disc_public_addresses, // Require that authority discovery records are signed. strict_record_validation: true, + persisted_cache_directory: net_config_path, ..Default::default() }, client, @@ -82,6 +84,7 @@ fn build_authority_discovery_service( Box::pin(dht_event_stream), authority_discovery_role, prometheus_registry, + task_manager.spawn_handle(), ); task_manager.spawn_handle().spawn( diff --git a/polkadot/node/service/src/builder/mod.rs b/polkadot/node/service/src/builder/mod.rs index 3c110aeb0561e..7bd15353d9b9d 100644 --- a/polkadot/node/service/src/builder/mod.rs +++ b/polkadot/node/service/src/builder/mod.rs @@ -485,6 +485,7 @@ where ); } + let network_config = config.network.clone(); let rpc_handlers = sc_service::spawn_tasks(sc_service::SpawnTasksParams { config, backend: backend.clone(), @@ -573,6 +574,7 @@ where public_addresses: auth_disc_public_addresses, // Require that authority discovery records are signed. strict_record_validation: true, + persisted_cache_directory: network_config.net_config_path, ..Default::default() }, client.clone(), @@ -580,6 +582,7 @@ where Box::pin(dht_event_stream), authority_discovery_role, prometheus_registry.clone(), + task_manager.spawn_handle(), ); task_manager.spawn_handle().spawn( diff --git a/prdoc/pr_8839.prdoc b/prdoc/pr_8839.prdoc new file mode 100644 index 0000000000000..55218f7bce5c3 --- /dev/null +++ b/prdoc/pr_8839.prdoc @@ -0,0 +1,23 @@ +title: "net/discovery: File persistence for AddrCache" +doc: + - audience: Node Dev + description: |- + Persisting the AddrCache periodically (every 10 minutes) and on worker + shutdown. Read AddrCache from file upon launch of worker. + + AddrCache is saved as authority_discovery_addr_cache.json in the + folder configured by net_config_path of NetworkConfiguration. + + This reduces the time it takes for a node to reconnect to peers after + restart. +crates: + - name: sc-authority-discovery + bump: major + - name: sc-network-types + bump: minor + - name: cumulus-relay-chain-minimal-node + bump: patch + - name: polkadot-service + bump: patch + - name: staging-node-cli + bump: patch diff --git a/substrate/bin/node/cli/src/service.rs b/substrate/bin/node/cli/src/service.rs index 72e6d387ba91a..a080de61cf19f 100644 --- a/substrate/bin/node/cli/src/service.rs +++ b/substrate/bin/node/cli/src/service.rs @@ -547,6 +547,7 @@ pub fn new_full_base::Hash>>( task_manager.spawn_handle().spawn("mixnet", None, mixnet); } + let net_config_path = config.network.net_config_path.clone(); let rpc_handlers = sc_service::spawn_tasks(sc_service::SpawnTasksParams { config, backend: backend.clone(), @@ -659,6 +660,7 @@ pub fn new_full_base::Hash>>( sc_authority_discovery::WorkerConfig { publish_non_global_ips: auth_disc_publish_non_global_ips, public_addresses: auth_disc_public_addresses, + persisted_cache_directory: net_config_path, ..Default::default() }, client.clone(), @@ -666,6 +668,7 @@ pub fn new_full_base::Hash>>( Box::pin(dht_event_stream), authority_discovery_role, prometheus_registry.clone(), + task_manager.spawn_handle(), ); task_manager.spawn_handle().spawn( diff --git a/substrate/client/authority-discovery/Cargo.toml b/substrate/client/authority-discovery/Cargo.toml index dd147f6e2a553..f1dd0855d435b 100644 --- a/substrate/client/authority-discovery/Cargo.toml +++ b/substrate/client/authority-discovery/Cargo.toml @@ -30,6 +30,8 @@ rand = { workspace = true, default-features = true } sc-client-api = { workspace = true, default-features = true } sc-network = { workspace = true, default-features = true } sc-network-types = { workspace = true, default-features = true } +serde.workspace = true +serde_json.workspace = true sp-api = { workspace = true, default-features = true } sp-authority-discovery = { workspace = true, default-features = true } sp-blockchain = { workspace = true, default-features = true } @@ -37,11 +39,14 @@ sp-core = { workspace = true, default-features = true } sp-keystore = { workspace = true, default-features = true } sp-runtime = { workspace = true, default-features = true } thiserror = { workspace = true } +tokio.workspace = true [dev-dependencies] +hex.workspace = true quickcheck = { workspace = true } sp-tracing = { workspace = true, default-features = true } substrate-test-runtime-client = { workspace = true } +tempfile.workspace = true [build-dependencies] prost-build = { workspace = true } diff --git a/substrate/client/authority-discovery/src/error.rs b/substrate/client/authority-discovery/src/error.rs index 3f395e47922e2..d524ca1e9e9f7 100644 --- a/substrate/client/authority-discovery/src/error.rs +++ b/substrate/client/authority-discovery/src/error.rs @@ -52,6 +52,9 @@ pub enum Error { #[error("Failed to encode or decode scale payload.")] EncodingDecodingScale(#[from] codec::Error), + #[error("Failed to encode or decode AddrCache.")] + EncodingDecodingAddrCache(String), + #[error("Failed to parse a libp2p multi address.")] ParsingMultiaddress(#[from] sc_network::multiaddr::ParseError), diff --git a/substrate/client/authority-discovery/src/lib.rs b/substrate/client/authority-discovery/src/lib.rs index e674c51571eff..7b654a16e3d5b 100644 --- a/substrate/client/authority-discovery/src/lib.rs +++ b/substrate/client/authority-discovery/src/lib.rs @@ -33,7 +33,7 @@ pub use crate::{ worker::{AuthorityDiscovery, NetworkProvider, Role, Worker}, }; -use std::{collections::HashSet, sync::Arc, time::Duration}; +use std::{collections::HashSet, path::PathBuf, sync::Arc, time::Duration}; use futures::{ channel::{mpsc, oneshot}, @@ -44,8 +44,8 @@ use sc_network::{event::DhtEvent, Multiaddr}; use sc_network_types::PeerId; use sp_authority_discovery::AuthorityId; use sp_blockchain::HeaderBackend; +use sp_core::traits::SpawnNamed; use sp_runtime::traits::Block as BlockT; - mod error; mod interval; mod service; @@ -88,6 +88,11 @@ pub struct WorkerConfig { /// /// Defaults to `false` to provide compatibility with old versions pub strict_record_validation: bool, + + /// The directory of where the persisted AddrCache file is located, + /// optional since NetworkConfiguration's `net_config_path` field + /// is optional. If None, we won't persist the AddrCache at all. + pub persisted_cache_directory: Option, } impl Default for WorkerConfig { @@ -110,6 +115,7 @@ impl Default for WorkerConfig { publish_non_global_ips: true, public_addresses: Vec::new(), strict_record_validation: false, + persisted_cache_directory: None, } } } @@ -123,6 +129,7 @@ pub fn new_worker_and_service( dht_event_rx: DhtEventStream, role: Role, prometheus_registry: Option, + spawner: impl SpawnNamed + 'static, ) -> (Worker, Service) where Block: BlockT + Unpin + 'static, @@ -136,6 +143,7 @@ where dht_event_rx, role, prometheus_registry, + spawner, ) } @@ -149,6 +157,7 @@ pub fn new_worker_and_service_with_config( dht_event_rx: DhtEventStream, role: Role, prometheus_registry: Option, + spawner: impl SpawnNamed + 'static, ) -> (Worker, Service) where Block: BlockT + Unpin + 'static, @@ -157,8 +166,16 @@ where { let (to_worker, from_service) = mpsc::channel(0); - let worker = - Worker::new(from_service, client, network, dht_event_rx, role, prometheus_registry, config); + let worker = Worker::new( + from_service, + client, + network, + dht_event_rx, + role, + prometheus_registry, + config, + spawner, + ); let service = Service::new(to_worker); (worker, service) diff --git a/substrate/client/authority-discovery/src/tests.rs b/substrate/client/authority-discovery/src/tests.rs index a73515ee00d26..ac4c55e5df14b 100644 --- a/substrate/client/authority-discovery/src/tests.rs +++ b/substrate/client/authority-discovery/src/tests.rs @@ -17,11 +17,12 @@ // along with this program. If not, see . use crate::{ - new_worker_and_service, + new_worker_and_service_with_config, worker::{ tests::{TestApi, TestNetwork}, - Role, + AddrCache, Role, }, + WorkerConfig, }; use futures::{channel::mpsc::channel, executor::LocalPool, task::LocalSpawn}; @@ -30,11 +31,19 @@ use std::{collections::HashSet, sync::Arc}; use sc_network::{multiaddr::Protocol, Multiaddr, PeerId}; use sp_authority_discovery::AuthorityId; -use sp_core::crypto::key_types; +use sp_core::{crypto::key_types, testing::TaskExecutor, traits::SpawnNamed}; use sp_keystore::{testing::MemoryKeystore, Keystore}; -#[test] -fn get_addresses_and_authority_id() { +pub(super) fn create_spawner() -> Box { + Box::new(TaskExecutor::new()) +} + +pub(super) fn test_config(path_buf: Option) -> WorkerConfig { + WorkerConfig { persisted_cache_directory: path_buf, ..Default::default() } +} + +#[tokio::test] +async fn get_addresses_and_authority_id() { let (_dht_event_tx, dht_event_rx) = channel(0); let network: Arc = Arc::new(Default::default()); @@ -57,12 +66,16 @@ fn get_addresses_and_authority_id() { let test_api = Arc::new(TestApi { authorities: vec![] }); - let (mut worker, mut service) = new_worker_and_service( + let tempdir = tempfile::tempdir().unwrap(); + let path = tempdir.path().to_path_buf(); + let (mut worker, mut service) = new_worker_and_service_with_config( + test_config(Some(path)), test_api, network.clone(), Box::pin(dht_event_rx), Role::PublishAndDiscover(key_store.into()), None, + create_spawner(), ); worker.inject_addresses(remote_authority_id.clone(), vec![remote_addr.clone()]); @@ -80,8 +93,8 @@ fn get_addresses_and_authority_id() { }); } -#[test] -fn cryptos_are_compatible() { +#[tokio::test] +async fn cryptos_are_compatible() { use sp_core::crypto::Pair; let libp2p_keypair = ed25519::Keypair::generate(); @@ -103,3 +116,53 @@ fn cryptos_are_compatible() { )); assert!(libp2p_public.verify(message, sp_core_signature.as_ref())); } + +#[tokio::test] +async fn when_addr_cache_is_persisted_with_authority_ids_then_when_worker_is_created_it_loads_the_persisted_cache( +) { + // ARRANGE + let (_dht_event_tx, dht_event_rx) = channel(0); + let mut pool = LocalPool::new(); + let key_store = MemoryKeystore::new(); + + let remote_authority_id: AuthorityId = pool.run_until(async { + key_store + .sr25519_generate_new(key_types::AUTHORITY_DISCOVERY, None) + .unwrap() + .into() + }); + let remote_peer_id = PeerId::random(); + let remote_addr = "/ip6/2001:db8:0:0:0:0:0:2/tcp/30333" + .parse::() + .unwrap() + .with(Protocol::P2p(remote_peer_id.into())); + + let tempdir = tempfile::tempdir().unwrap(); + let cache_path = tempdir.path().to_path_buf(); + + // persist the remote_authority_id and remote_addr in the cache + { + let mut addr_cache = AddrCache::default(); + addr_cache.insert(remote_authority_id.clone(), vec![remote_addr.clone()]); + let path_to_save = cache_path.join(crate::worker::ADDR_CACHE_FILE_NAME); + addr_cache.serialize_and_persist(&path_to_save); + } + + let (_, from_service) = futures::channel::mpsc::channel(0); + + // ACT + // Create a worker with the persisted cache + let worker = crate::worker::Worker::new( + from_service, + Arc::new(TestApi { authorities: vec![] }), + Arc::new(TestNetwork::default()), + Box::pin(dht_event_rx), + Role::PublishAndDiscover(key_store.into()), + None, + test_config(Some(cache_path)), + create_spawner(), + ); + + // ASSERT + assert!(worker.contains_authority(&remote_authority_id)); +} diff --git a/substrate/client/authority-discovery/src/worker.rs b/substrate/client/authority-discovery/src/worker.rs index 16cdf3cc632e7..4649896115698 100644 --- a/substrate/client/authority-discovery/src/worker.rs +++ b/substrate/client/authority-discovery/src/worker.rs @@ -16,6 +16,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +pub(crate) use crate::worker::addr_cache::AddrCache; use crate::{ error::{Error, Result}, interval::ExpIncInterval, @@ -25,19 +26,19 @@ use crate::{ use std::{ collections::{HashMap, HashSet}, marker::PhantomData, + path::PathBuf, sync::Arc, time::{Duration, Instant, SystemTime, UNIX_EPOCH}, }; use futures::{channel::mpsc, future, stream::Fuse, FutureExt, Stream, StreamExt}; -use addr_cache::AddrCache; use codec::{Decode, Encode}; use ip_network::IpNetwork; use linked_hash_set::LinkedHashSet; use sc_network_types::kad::{Key, PeerRecord, Record}; -use log::{debug, error, trace}; +use log::{debug, error, info, trace}; use prometheus_endpoint::{register, Counter, CounterVec, Gauge, Opts, U64}; use prost::Message; use rand::{seq::SliceRandom, thread_rng}; @@ -53,7 +54,10 @@ use sp_authority_discovery::{ AuthorityDiscoveryApi, AuthorityId, AuthorityPair, AuthoritySignature, }; use sp_blockchain::HeaderBackend; -use sp_core::crypto::{key_types, ByteArray, Pair}; +use sp_core::{ + crypto::{key_types, ByteArray, Pair}, + traits::SpawnNamed, +}; use sp_keystore::{Keystore, KeystorePtr}; use sp_runtime::traits::Block as BlockT; @@ -69,6 +73,8 @@ mod schema { pub mod tests; const LOG_TARGET: &str = "sub-authority-discovery"; +pub(crate) const ADDR_CACHE_FILE_NAME: &str = "authority_discovery_addr_cache.json"; +const ADDR_CACHE_PERSIST_INTERVAL: Duration = Duration::from_secs(60 * 10); // 10 minutes /// Maximum number of addresses cached per authority. Additional addresses are discarded. const MAX_ADDRESSES_PER_AUTHORITY: usize = 16; @@ -186,6 +192,14 @@ pub struct Worker { role: Role, phantom: PhantomData, + + /// A spawner of tasks + spawner: Box, + + /// The directory of where the persisted AddrCache file is located, + /// optional since NetworkConfiguration's `net_config_path` field + /// is optional. If None, we won't persist the AddrCache at all. + persisted_cache_file_path: Option, } #[derive(Debug, Clone)] @@ -245,6 +259,7 @@ where role: Role, prometheus_registry: Option, config: WorkerConfig, + spawner: impl SpawnNamed + 'static, ) -> Self { // When a node starts up publishing and querying might fail due to various reasons, for // example due to being not yet fully bootstrapped on the DHT. Thus one should retry rather @@ -261,7 +276,30 @@ where let publish_if_changed_interval = ExpIncInterval::new(config.keystore_refresh_interval, config.keystore_refresh_interval); - let addr_cache = AddrCache::new(); + let maybe_persisted_cache_file_path = + config.persisted_cache_directory.as_ref().map(|dir| { + let mut path = dir.clone(); + path.push(ADDR_CACHE_FILE_NAME); + path + }); + + // If we have a path to persisted cache file, then we will try to + // load the contents of persisted cache from file, if it exists, and is valid. + // Create a new one otherwise. + let addr_cache: AddrCache = if let Some(persisted_cache_file_path) = + maybe_persisted_cache_file_path.as_ref() + { + let loaded = + AddrCache::try_from(persisted_cache_file_path.as_path()).unwrap_or_else(|e| { + info!(target: LOG_TARGET, "Failed to load AddrCache from file, using empty instead: {}", e); + AddrCache::new() + }); + info!(target: LOG_TARGET, "Loaded persisted AddrCache with {} authority ids.", loaded.num_authority_ids()); + loaded + } else { + info!(target: LOG_TARGET, "No persisted cache file path provided, authority discovery will not persist the address cache to disk."); + AddrCache::new() + }; let metrics = match prometheus_registry { Some(registry) => match Metrics::register(®istry) { @@ -308,20 +346,43 @@ where warn_public_addresses: false, phantom: PhantomData, last_known_records: HashMap::new(), + spawner: Box::new(spawner), + persisted_cache_file_path: maybe_persisted_cache_file_path, } } + /// Persists `AddrCache` to disk if the `persisted_cache_file_path` is set. + pub fn persist_addr_cache_if_supported(&self) { + let Some(path) = self.persisted_cache_file_path.as_ref().cloned() else { + return; + }; + let cloned_cache = self.addr_cache.clone(); + self.spawner.spawn_blocking( + "persist-addr-cache", + Some("authority-discovery-worker"), + Box::pin(async move { + cloned_cache.serialize_and_persist(path); + }), + ) + } + /// Start the worker pub async fn run(mut self) { + let mut persist_interval = tokio::time::interval(ADDR_CACHE_PERSIST_INTERVAL); + loop { self.start_new_lookups(); futures::select! { + _ = persist_interval.tick().fuse() => { + self.persist_addr_cache_if_supported(); + }, // Process incoming events. event = self.dht_event_rx.next().fuse() => { if let Some(event) = event { self.handle_dht_event(event).await; } else { + self.persist_addr_cache_if_supported(); // This point is reached if the network has shut down, at which point there is not // much else to do than to shut down the authority discovery as well. return; @@ -1197,6 +1258,10 @@ impl Metrics { #[cfg(test)] impl Worker { pub(crate) fn inject_addresses(&mut self, authority: AuthorityId, addresses: Vec) { - self.addr_cache.insert(authority, addresses); + self.addr_cache.insert(authority, addresses) + } + + pub(crate) fn contains_authority(&self, authority: &AuthorityId) -> bool { + self.addr_cache.get_addresses_by_authority_id(authority).is_some() } } diff --git a/substrate/client/authority-discovery/src/worker/addr_cache.rs b/substrate/client/authority-discovery/src/worker/addr_cache.rs index 13bb990bf8b99..fe1819e64c1e3 100644 --- a/substrate/client/authority-discovery/src/worker/addr_cache.rs +++ b/substrate/client/authority-discovery/src/worker/addr_cache.rs @@ -16,14 +16,24 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +use crate::error::Error; +use log::{info, warn}; use sc_network::{multiaddr::Protocol, Multiaddr}; use sc_network_types::PeerId; +use serde::{Deserialize, Serialize}; use sp_authority_discovery::AuthorityId; -use std::collections::{hash_map::Entry, HashMap, HashSet}; +use sp_runtime::DeserializeOwned; +use std::{ + collections::{hash_map::Entry, HashMap, HashSet}, + fs::File, + io::{self, BufReader, Write}, + path::Path, +}; /// Cache for [`AuthorityId`] -> [`HashSet`] and [`PeerId`] -> [`HashSet`] /// mappings. -pub(super) struct AddrCache { +#[derive(Default, Clone, PartialEq, Debug)] +pub(crate) struct AddrCache { /// The addresses found in `authority_id_to_addresses` are guaranteed to always match /// the peerids found in `peer_id_to_authority_ids`. In other words, these two hashmaps /// are similar to a bi-directional map. @@ -35,14 +45,116 @@ pub(super) struct AddrCache { peer_id_to_authority_ids: HashMap>, } +impl Serialize for AddrCache { + fn serialize(&self, serializer: S) -> Result + where + S: serde::Serializer, + { + SerializeAddrCache::from(self.clone()).serialize(serializer) + } +} + +impl<'de> Deserialize<'de> for AddrCache { + fn deserialize(deserializer: D) -> Result + where + D: serde::Deserializer<'de>, + { + SerializeAddrCache::deserialize(deserializer).map(Into::into) + } +} + +/// A storage and serialization time optimized version of `AddrCache` +/// which contains the bare minimum info to reconstruct the AddrCache. We +/// rely on the fact that the `peer_id_to_authority_ids` can be reconstructed from +/// the `authority_id_to_addresses` field. +/// +/// Benchmarks show that this is about 2x faster to serialize and about 4x faster to deserialize +/// compared to the full `AddrCache`. +/// +/// Storage wise it is about half the size of the full `AddrCache`. +/// +/// This is used to persist the `AddrCache` to disk and load it back. +/// +/// AddrCache impl of Serialize and Deserialize "piggybacks" on this struct. +#[derive(Serialize, Deserialize)] +struct SerializeAddrCache { + authority_id_to_addresses: HashMap>, +} + +impl From for AddrCache { + fn from(value: SerializeAddrCache) -> Self { + let mut peer_id_to_authority_ids: HashMap> = HashMap::new(); + + for (authority_id, addresses) in &value.authority_id_to_addresses { + for peer_id in addresses_to_peer_ids(addresses) { + peer_id_to_authority_ids + .entry(peer_id) + .or_insert_with(HashSet::new) + .insert(authority_id.clone()); + } + } + + AddrCache { + authority_id_to_addresses: value.authority_id_to_addresses, + peer_id_to_authority_ids, + } + } +} +impl From for SerializeAddrCache { + fn from(value: AddrCache) -> Self { + Self { authority_id_to_addresses: value.authority_id_to_addresses } + } +} + +fn write_to_file(path: impl AsRef, contents: &str) -> io::Result<()> { + let path = path.as_ref(); + let mut file = File::create(path)?; + file.write_all(contents.as_bytes())?; + file.flush()?; + Ok(()) +} + +impl TryFrom<&Path> for AddrCache { + type Error = Error; + + fn try_from(path: &Path) -> Result { + // Try to load from the cache file if it exists and is valid. + load_from_file::(&path).map_err(|e| { + Error::EncodingDecodingAddrCache(format!( + "Failed to load AddrCache from file: {}, error: {:?}", + path.display(), + e + )) + }) + } +} impl AddrCache { pub fn new() -> Self { - AddrCache { - authority_id_to_addresses: HashMap::new(), - peer_id_to_authority_ids: HashMap::new(), + AddrCache::default() + } + + fn serialize(&self) -> Option { + serde_json::to_string_pretty(self).inspect_err(|e| { + warn!(target: super::LOG_TARGET, "Failed to serialize AddrCache to JSON: {} => skip persisting it.", e); + }).ok() + } + + fn persist(path: impl AsRef, serialized_cache: String) { + match write_to_file(path.as_ref(), &serialized_cache) { + Err(err) => { + warn!(target: super::LOG_TARGET, "Failed to persist AddrCache on disk at path: {}, error: {}", path.as_ref().display(), err); + }, + Ok(_) => { + info!(target: super::LOG_TARGET, "Successfully persisted AddrCache on disk"); + }, } } + pub fn serialize_and_persist(&self, path: impl AsRef) { + let Some(serialized) = self.serialize() else { return }; + Self::persist(path, serialized); + } + /// Inserts the given [`AuthorityId`] and [`Vec`] pair for future lookups by /// [`AuthorityId`] or [`PeerId`]. pub fn insert(&mut self, authority_id: AuthorityId, addresses: Vec) { @@ -56,7 +168,6 @@ impl AddrCache { authority_id, addresses, ); - return } else if peer_ids.len() > 1 { log::warn!( @@ -172,8 +283,21 @@ fn addresses_to_peer_ids(addresses: &HashSet) -> HashSet { addresses.iter().filter_map(peer_id_from_multiaddr).collect::>() } +fn load_from_file(path: impl AsRef) -> io::Result { + let file = File::open(path)?; + let reader = BufReader::new(file); + + serde_json::from_reader(reader).map_err(|e| io::Error::new(io::ErrorKind::InvalidData, e)) +} + #[cfg(test)] mod tests { + + use std::{ + thread::sleep, + time::{Duration, Instant}, + }; + use super::*; use quickcheck::{Arbitrary, Gen, QuickCheck, TestResult}; @@ -280,6 +404,12 @@ mod tests { .quickcheck(property as fn(_, _, _) -> TestResult) } + #[test] + fn test_from_to_serializable() { + let serializable = SerializeAddrCache::from(AddrCache::sample()); + let roundtripped = AddrCache::from(serializable); + assert_eq!(roundtripped, AddrCache::sample()) + } #[test] fn keeps_consistency_between_authority_id_and_peer_id() { fn property( @@ -381,4 +511,165 @@ mod tests { addr_cache.get_addresses_by_authority_id(&authority_id1).unwrap() ); } + + impl AddrCache { + pub fn sample() -> Self { + let mut addr_cache = AddrCache::new(); + + let peer_id = PeerId::from_multihash( + Multihash::wrap(Code::Sha2_256.into(), &[0xab; 32]).unwrap(), + ) + .unwrap(); + let addr = Multiaddr::empty().with(Protocol::P2p(peer_id.into())); + let authority_id0 = AuthorityPair::from_seed(&[0xaa; 32]).public(); + let authority_id1 = AuthorityPair::from_seed(&[0xbb; 32]).public(); + + addr_cache.insert(authority_id0.clone(), vec![addr.clone()]); + addr_cache.insert(authority_id1.clone(), vec![addr.clone()]); + addr_cache + } + } + + #[test] + fn serde_json() { + let sample = || AddrCache::sample(); + let serializable = AddrCache::from(sample()); + let json = serde_json::to_string(&serializable).expect("Serialization should not fail"); + let deserialized = serde_json::from_str::(&json).unwrap(); + let from_serializable = AddrCache::try_from(deserialized).unwrap(); + assert_eq!(sample(), from_serializable); + } + + #[test] + fn deserialize_from_json() { + let json = r#" + { + "authority_id_to_addresses": { + "5FjfMGrqw9ck5XZaPVTKm2RE5cbwoVUfXvSGZY7KCUEFtdr7": [ + "/p2p/QmZtnFaddFtzGNT8BxdHVbQrhSFdq1pWxud5z4fA4kxfDt" + ], + "5DiQDBQvjFkmUF3C8a7ape5rpRPoajmMj44Q9CTGPfVBaa6U": [ + "/p2p/QmZtnFaddFtzGNT8BxdHVbQrhSFdq1pWxud5z4fA4kxfDt" + ] + } + } + "#; + let deserialized = serde_json::from_str::(json).unwrap(); + assert_eq!(deserialized, AddrCache::sample()) + } + + fn serialize_and_write_to_file( + path: impl AsRef, + contents: &T, + ) -> io::Result<()> { + let serialized = serde_json::to_string_pretty(contents).unwrap(); + write_to_file(path, &serialized) + } + + #[test] + fn test_load_cache_from_disc() { + let dir = tempfile::tempdir().unwrap(); + let path = dir.path().join("cache.json"); + let sample = AddrCache::sample(); + assert_eq!(sample.num_authority_ids(), 2); + serialize_and_write_to_file(&path, &sample).unwrap(); + sleep(Duration::from_millis(10)); // Ensure file is written before loading + let cache = AddrCache::try_from(path.as_path()).unwrap(); + assert_eq!(cache.num_authority_ids(), 2); + } + + fn create_cache(authority_id_count: u64, multiaddr_per_authority_count: u64) -> AddrCache { + let mut addr_cache = AddrCache::new(); + + for i in 0..authority_id_count { + let seed = &mut [0xab as u8; 32]; + let i_bytes = i.to_le_bytes(); + seed[0..8].copy_from_slice(&i_bytes); + + let authority_id = AuthorityPair::from_seed(seed).public(); + let multi_addresses = (0..multiaddr_per_authority_count) + .map(|j| { + let mut digest = [0xab; 32]; + let j_bytes = j.to_le_bytes(); + digest[0..8].copy_from_slice(&j_bytes); + let peer_id = PeerId::from_multihash( + Multihash::wrap(Code::Sha2_256.into(), &digest).unwrap(), + ) + .unwrap(); + Multiaddr::empty().with(Protocol::P2p(peer_id.into())) + }) + .collect::>(); + + assert_eq!(multi_addresses.len(), multiaddr_per_authority_count as usize); + addr_cache.insert(authority_id.clone(), multi_addresses); + } + assert_eq!(addr_cache.authority_id_to_addresses.len(), authority_id_count as usize); + + addr_cache + } + + /// This test is ignored by default as it takes a long time to run. + #[test] + #[ignore] + fn addr_cache_measure_serde_performance() { + let addr_cache = create_cache(1000, 5); + + /// A replica of `AddrCache` that is serializable and deserializable + /// without any optimizations. + #[derive(Default, Clone, PartialEq, Debug, Serialize, Deserialize)] + pub(crate) struct NaiveSerdeAddrCache { + authority_id_to_addresses: HashMap>, + peer_id_to_authority_ids: HashMap>, + } + impl From for NaiveSerdeAddrCache { + fn from(value: AddrCache) -> Self { + Self { + authority_id_to_addresses: value.authority_id_to_addresses, + peer_id_to_authority_ids: value.peer_id_to_authority_ids, + } + } + } + + let naive = NaiveSerdeAddrCache::from(addr_cache.clone()); + let storage_optimized = addr_cache.clone(); + + fn measure_clone(data: &T) -> Duration { + let start = Instant::now(); + let _ = data.clone(); + start.elapsed() + } + fn measure_serialize(data: &T) -> (Duration, String) { + let start = Instant::now(); + let json = serde_json::to_string_pretty(data).unwrap(); + (start.elapsed(), json) + } + fn measure_deserialize(json: String) -> (Duration, T) { + let start = Instant::now(); + let value = serde_json::from_str(&json).unwrap(); + (start.elapsed(), value) + } + + let serialize_naive = measure_serialize(&naive); + let serialize_storage_optimized = measure_serialize(&storage_optimized); + println!("CLONE: Naive took: {} ms", measure_clone(&naive).as_millis()); + println!( + "CLONE: Storage optimized took: {} ms", + measure_clone(&storage_optimized).as_millis() + ); + println!("SERIALIZE: Naive took: {} ms", serialize_naive.0.as_millis()); + println!( + "SERIALIZE: Storage optimized took: {} ms", + serialize_storage_optimized.0.as_millis() + ); + let deserialize_naive = measure_deserialize::(serialize_naive.1); + let deserialize_storage_optimized = + measure_deserialize::(serialize_storage_optimized.1); + println!("DESERIALIZE: Naive took: {} ms", deserialize_naive.0.as_millis()); + println!( + "DESERIALIZE: Storage optimized took: {} ms", + deserialize_storage_optimized.0.as_millis() + ); + assert_eq!(deserialize_naive.1, naive); + assert_eq!(deserialize_storage_optimized.1, storage_optimized); + } } diff --git a/substrate/client/authority-discovery/src/worker/tests.rs b/substrate/client/authority-discovery/src/worker/tests.rs index ce3e6bfaa2bc3..00c75e2d2a912 100644 --- a/substrate/client/authority-discovery/src/worker/tests.rs +++ b/substrate/client/authority-discovery/src/worker/tests.rs @@ -23,6 +23,9 @@ use std::{ time::Instant, }; +use crate::tests::{create_spawner, test_config}; + +use super::*; use futures::{ channel::mpsc::{self, channel}, executor::{block_on, LocalPool}, @@ -46,8 +49,6 @@ use sp_keystore::{testing::MemoryKeystore, Keystore}; use sp_runtime::traits::{Block as BlockT, NumberFor, Zero}; use substrate_test_runtime_client::runtime::Block; -use super::*; - #[derive(Clone)] pub(crate) struct TestApi { pub(crate) authorities: Vec, @@ -309,8 +310,8 @@ fn build_dht_event( kv_pairs } -#[test] -fn new_registers_metrics() { +#[tokio::test] +async fn new_registers_metrics() { let (_dht_event_tx, dht_event_rx) = mpsc::channel(1000); let network: Arc = Arc::new(Default::default()); let key_store = MemoryKeystore::new(); @@ -318,6 +319,8 @@ fn new_registers_metrics() { let registry = prometheus_endpoint::Registry::new(); + let tempdir = tempfile::tempdir().unwrap(); + let path = tempdir.path().to_path_buf(); let (_to_worker, from_service) = mpsc::channel(0); Worker::new( from_service, @@ -326,14 +329,15 @@ fn new_registers_metrics() { Box::pin(dht_event_rx), Role::PublishAndDiscover(key_store.into()), Some(registry.clone()), - Default::default(), + test_config(Some(path)), + create_spawner(), ); assert!(registry.gather().len() > 0); } -#[test] -fn triggers_dht_get_query() { +#[tokio::test] +async fn triggers_dht_get_query() { sp_tracing::try_init_simple(); let (_dht_event_tx, dht_event_rx) = channel(1000); @@ -348,6 +352,8 @@ fn triggers_dht_get_query() { let key_store = MemoryKeystore::new(); let (_to_worker, from_service) = mpsc::channel(0); + let tempdir = tempfile::tempdir().unwrap(); + let path = tempdir.path().to_path_buf(); let mut worker = Worker::new( from_service, test_api, @@ -355,7 +361,8 @@ fn triggers_dht_get_query() { Box::pin(dht_event_rx), Role::PublishAndDiscover(key_store.into()), None, - Default::default(), + test_config(Some(path)), + create_spawner(), ); futures::executor::block_on(async { @@ -365,8 +372,8 @@ fn triggers_dht_get_query() { }) } -#[test] -fn publish_discover_cycle() { +#[tokio::test] +async fn publish_discover_cycle() { sp_tracing::try_init_simple(); let mut pool = LocalPool::new(); @@ -378,7 +385,6 @@ fn publish_discover_cycle() { let network: Arc = Arc::new(Default::default()); let key_store = MemoryKeystore::new(); - let _ = pool.spawner().spawn_local_obj( async move { let node_a_public = @@ -386,6 +392,9 @@ fn publish_discover_cycle() { let test_api = Arc::new(TestApi { authorities: vec![node_a_public.into()] }); let (_to_worker, from_service) = mpsc::channel(0); + let tempdir = tempfile::tempdir().unwrap(); + let temppath = tempdir.path(); + let path = temppath.to_path_buf(); let mut worker = Worker::new( from_service, test_api, @@ -393,7 +402,8 @@ fn publish_discover_cycle() { Box::pin(dht_event_rx), Role::PublishAndDiscover(key_store.into()), None, - Default::default(), + test_config(Some(path)), + create_spawner(), ); worker.publish_ext_addresses(false).await.unwrap(); @@ -420,6 +430,9 @@ fn publish_discover_cycle() { let key_store = MemoryKeystore::new(); let (_to_worker, from_service) = mpsc::channel(0); + let tempdir = tempfile::tempdir().unwrap(); + let temppath = tempdir.path(); + let path = temppath.to_path_buf(); let mut worker = Worker::new( from_service, test_api, @@ -427,7 +440,8 @@ fn publish_discover_cycle() { Box::pin(dht_event_rx), Role::PublishAndDiscover(key_store.into()), None, - Default::default(), + test_config(Some(path)), + create_spawner(), ); dht_event_tx.try_send(dht_event.clone()).unwrap(); @@ -447,12 +461,13 @@ fn publish_discover_cycle() { /// Don't terminate when sender side of service channel is dropped. Terminate when network event /// stream terminates. -#[test] -fn terminate_when_event_stream_terminates() { +#[tokio::test] +async fn terminate_when_event_stream_terminates() { let (dht_event_tx, dht_event_rx) = channel(1000); let network: Arc = Arc::new(Default::default()); let key_store = MemoryKeystore::new(); let test_api = Arc::new(TestApi { authorities: vec![] }); + let path = tempfile::tempdir().unwrap().path().to_path_buf(); let (to_worker, from_service) = mpsc::channel(0); let worker = Worker::new( @@ -462,7 +477,8 @@ fn terminate_when_event_stream_terminates() { Box::pin(dht_event_rx), Role::PublishAndDiscover(key_store.into()), None, - Default::default(), + test_config(Some(path)), + create_spawner(), ) .run(); futures::pin_mut!(worker); @@ -492,8 +508,8 @@ fn terminate_when_event_stream_terminates() { }); } -#[test] -fn dont_stop_polling_dht_event_stream_after_bogus_event() { +#[tokio::test] +async fn dont_stop_polling_dht_event_stream_after_bogus_event() { let remote_multiaddr = { let peer_id = PeerId::random(); let address: Multiaddr = "/ip6/2001:db8:0:0:0:0:0:1/tcp/30333".parse().unwrap(); @@ -518,6 +534,8 @@ fn dont_stop_polling_dht_event_stream_after_bogus_event() { let mut pool = LocalPool::new(); let (mut to_worker, from_service) = mpsc::channel(1); + let tempdir = tempfile::tempdir().unwrap(); + let path = tempdir.path().to_path_buf(); let mut worker = Worker::new( from_service, test_api, @@ -525,7 +543,8 @@ fn dont_stop_polling_dht_event_stream_after_bogus_event() { Box::pin(dht_event_rx), Role::PublishAndDiscover(Arc::new(key_store)), None, - Default::default(), + test_config(Some(path)), + create_spawner(), ); // Spawn the authority discovery to make sure it is polled independently. @@ -652,7 +671,17 @@ impl DhtValueFoundTester { Box::pin(dht_event_rx), Role::PublishAndDiscover(Arc::new(local_key_store)), None, - WorkerConfig { strict_record_validation, ..Default::default() }, + WorkerConfig { + strict_record_validation, + persisted_cache_directory: Some( + tempfile::tempdir() + .expect("Should be able to create tmp dir") + .path() + .to_path_buf(), + ), + ..Default::default() + }, + create_spawner(), )); (self.local_worker.as_mut().unwrap(), Some(local_network)) }; @@ -681,8 +710,8 @@ impl DhtValueFoundTester { } } -#[test] -fn limit_number_of_addresses_added_to_cache_per_authority() { +#[tokio::test] +async fn limit_number_of_addresses_added_to_cache_per_authority() { let mut tester = DhtValueFoundTester::new(); assert!(MAX_ADDRESSES_PER_AUTHORITY < 100); let addresses = (1..100).map(|i| tester.multiaddr_with_peer_id(i)).collect(); @@ -698,8 +727,8 @@ fn limit_number_of_addresses_added_to_cache_per_authority() { assert_eq!(MAX_ADDRESSES_PER_AUTHORITY, cached_remote_addresses.unwrap().len()); } -#[test] -fn strict_accept_address_with_peer_signature() { +#[tokio::test] +async fn strict_accept_address_with_peer_signature() { let mut tester = DhtValueFoundTester::new(); let addr = tester.multiaddr_with_peer_id(1); let kv_pairs = build_dht_event( @@ -719,8 +748,8 @@ fn strict_accept_address_with_peer_signature() { ); } -#[test] -fn strict_accept_address_without_creation_time() { +#[tokio::test] +async fn strict_accept_address_without_creation_time() { let mut tester = DhtValueFoundTester::new(); let addr = tester.multiaddr_with_peer_id(1); let kv_pairs = build_dht_event( @@ -740,8 +769,8 @@ fn strict_accept_address_without_creation_time() { ); } -#[test] -fn keep_last_received_if_no_creation_time() { +#[tokio::test] +async fn keep_last_received_if_no_creation_time() { let mut tester: DhtValueFoundTester = DhtValueFoundTester::new(); let addr = tester.multiaddr_with_peer_id(1); let kv_pairs = build_dht_event( @@ -787,8 +816,8 @@ fn keep_last_received_if_no_creation_time() { .unwrap_or_default()); } -#[test] -fn records_with_incorrectly_signed_creation_time_are_ignored() { +#[tokio::test] +async fn records_with_incorrectly_signed_creation_time_are_ignored() { let mut tester: DhtValueFoundTester = DhtValueFoundTester::new(); let addr = tester.multiaddr_with_peer_id(1); let kv_pairs = build_dht_event( @@ -841,8 +870,8 @@ fn records_with_incorrectly_signed_creation_time_are_ignored() { .unwrap_or_default()); } -#[test] -fn newer_records_overwrite_older_ones() { +#[tokio::test] +async fn newer_records_overwrite_older_ones() { let mut tester: DhtValueFoundTester = DhtValueFoundTester::new(); let old_record = tester.multiaddr_with_peer_id(1); let kv_pairs = build_dht_event( @@ -892,8 +921,8 @@ fn newer_records_overwrite_older_ones() { assert_eq!(result.1.len(), 1); } -#[test] -fn older_records_dont_affect_newer_ones() { +#[tokio::test] +async fn older_records_dont_affect_newer_ones() { let mut tester: DhtValueFoundTester = DhtValueFoundTester::new(); let old_record = tester.multiaddr_with_peer_id(1); let old_kv_pairs = build_dht_event( @@ -943,8 +972,8 @@ fn older_records_dont_affect_newer_ones() { assert_eq!(update_peers_info.1.len(), 1); } -#[test] -fn reject_address_with_rogue_peer_signature() { +#[tokio::test] +async fn reject_address_with_rogue_peer_signature() { let mut tester = DhtValueFoundTester::new(); let rogue_remote_node_key = Keypair::generate_ed25519(); let kv_pairs = build_dht_event( @@ -963,8 +992,8 @@ fn reject_address_with_rogue_peer_signature() { ); } -#[test] -fn reject_address_with_invalid_peer_signature() { +#[tokio::test] +async fn reject_address_with_invalid_peer_signature() { let mut tester = DhtValueFoundTester::new(); let mut kv_pairs = build_dht_event( vec![tester.multiaddr_with_peer_id(1)], @@ -986,8 +1015,8 @@ fn reject_address_with_invalid_peer_signature() { ); } -#[test] -fn reject_address_without_peer_signature() { +#[tokio::test] +async fn reject_address_without_peer_signature() { let mut tester = DhtValueFoundTester::new(); let kv_pairs = build_dht_event::( vec![tester.multiaddr_with_peer_id(1)], @@ -1002,8 +1031,8 @@ fn reject_address_without_peer_signature() { assert!(cached_remote_addresses.is_none(), "Expected worker to ignore unsigned record.",); } -#[test] -fn do_not_cache_addresses_without_peer_id() { +#[tokio::test] +async fn do_not_cache_addresses_without_peer_id() { let mut tester = DhtValueFoundTester::new(); let multiaddr_with_peer_id = tester.multiaddr_with_peer_id(1); let multiaddr_without_peer_id: Multiaddr = @@ -1025,8 +1054,8 @@ fn do_not_cache_addresses_without_peer_id() { ); } -#[test] -fn addresses_to_publish_adds_p2p() { +#[tokio::test] +async fn addresses_to_publish_adds_p2p() { let (_dht_event_tx, dht_event_rx) = channel(1000); let network: Arc = Arc::new(Default::default()); @@ -1036,6 +1065,8 @@ fn addresses_to_publish_adds_p2p() { )); let (_to_worker, from_service) = mpsc::channel(0); + let tempdir = tempfile::tempdir().unwrap(); + let path = tempdir.path().to_path_buf(); let mut worker = Worker::new( from_service, Arc::new(TestApi { authorities: vec![] }), @@ -1043,7 +1074,8 @@ fn addresses_to_publish_adds_p2p() { Box::pin(dht_event_rx), Role::PublishAndDiscover(MemoryKeystore::new().into()), Some(prometheus_endpoint::Registry::new()), - Default::default(), + test_config(Some(path)), + create_spawner(), ); assert!( @@ -1057,8 +1089,8 @@ fn addresses_to_publish_adds_p2p() { /// Ensure [`Worker::addresses_to_publish`] does not add an additional `p2p` protocol component in /// case one already exists. -#[test] -fn addresses_to_publish_respects_existing_p2p_protocol() { +#[tokio::test] +async fn addresses_to_publish_respects_existing_p2p_protocol() { let (_dht_event_tx, dht_event_rx) = channel(1000); let identity = Keypair::generate_ed25519(); let peer_id = identity.public().to_peer_id(); @@ -1074,6 +1106,8 @@ fn addresses_to_publish_respects_existing_p2p_protocol() { }); let (_to_worker, from_service) = mpsc::channel(0); + let tempdir = tempfile::tempdir().unwrap(); + let path = tempdir.path().to_path_buf(); let mut worker = Worker::new( from_service, Arc::new(TestApi { authorities: vec![] }), @@ -1081,7 +1115,8 @@ fn addresses_to_publish_respects_existing_p2p_protocol() { Box::pin(dht_event_rx), Role::PublishAndDiscover(MemoryKeystore::new().into()), Some(prometheus_endpoint::Registry::new()), - Default::default(), + test_config(Some(path)), + create_spawner(), ); assert_eq!( @@ -1091,8 +1126,8 @@ fn addresses_to_publish_respects_existing_p2p_protocol() { ); } -#[test] -fn lookup_throttling() { +#[tokio::test] +async fn lookup_throttling() { let remote_multiaddr = { let peer_id = PeerId::random(); let address: Multiaddr = "/ip6/2001:db8:0:0:0:0:0:1/tcp/30333".parse().unwrap(); @@ -1118,6 +1153,8 @@ fn lookup_throttling() { let mut network = TestNetwork::default(); let mut receiver = network.get_event_receiver().unwrap(); let network = Arc::new(network); + let tempdir = tempfile::tempdir().unwrap(); + let path = tempdir.path().to_path_buf(); let mut worker = Worker::new( from_service, Arc::new(TestApi { authorities: remote_public_keys.clone() }), @@ -1125,7 +1162,8 @@ fn lookup_throttling() { dht_event_rx.boxed(), Role::Discover, Some(default_registry().clone()), - Default::default(), + test_config(Some(path)), + create_spawner(), ); let mut pool = LocalPool::new(); @@ -1201,8 +1239,8 @@ fn lookup_throttling() { ); } -#[test] -fn test_handle_put_record_request() { +#[tokio::test] +async fn test_handle_put_record_request() { let local_node_network = TestNetwork::default(); let remote_node_network = TestNetwork::default(); let peer_id = remote_node_network.peer_id; @@ -1236,6 +1274,8 @@ fn test_handle_put_record_request() { let (_dht_event_tx, dht_event_rx) = channel(1); let (_to_worker, from_service) = mpsc::channel(0); let network = Arc::new(local_node_network); + let tempdir = tempfile::tempdir().unwrap(); + let path = tempdir.path().to_path_buf(); let mut worker = Worker::new( from_service, Arc::new(TestApi { authorities: remote_public_keys.clone() }), @@ -1243,7 +1283,8 @@ fn test_handle_put_record_request() { dht_event_rx.boxed(), Role::Discover, Some(default_registry().clone()), - Default::default(), + test_config(Some(path)), + create_spawner(), ); let mut pool = LocalPool::new(); diff --git a/substrate/client/network/types/Cargo.toml b/substrate/client/network/types/Cargo.toml index ab6ce5efcd49a..62ab57a5838a7 100644 --- a/substrate/client/network/types/Cargo.toml +++ b/substrate/client/network/types/Cargo.toml @@ -20,6 +20,8 @@ log = { workspace = true, default-features = true } multiaddr = { workspace = true } multihash = { workspace = true } rand = { workspace = true, default-features = true } +serde.workspace = true +serde_with.workspace = true thiserror = { workspace = true } zeroize = { workspace = true } diff --git a/substrate/client/network/types/src/multiaddr.rs b/substrate/client/network/types/src/multiaddr.rs index 925e24fe70d6d..d938202b8977b 100644 --- a/substrate/client/network/types/src/multiaddr.rs +++ b/substrate/client/network/types/src/multiaddr.rs @@ -21,6 +21,7 @@ use litep2p::types::multiaddr::{ Protocol as LiteP2pProtocol, }; use multiaddr::Multiaddr as LibP2pMultiaddr; +use serde_with::{DeserializeFromStr, SerializeDisplay}; use std::{ fmt::{self, Debug, Display}, net::{IpAddr, Ipv4Addr, Ipv6Addr}, @@ -36,7 +37,7 @@ pub use crate::build_multiaddr as multiaddr; /// [`Multiaddr`] type used in Substrate. Converted to libp2p's `Multiaddr` /// or litep2p's `Multiaddr` when passed to the corresponding network backend. -#[derive(PartialEq, Eq, PartialOrd, Ord, Clone, Hash)] +#[derive(PartialEq, Eq, PartialOrd, Ord, Clone, Hash, SerializeDisplay, DeserializeFromStr)] pub struct Multiaddr { multiaddr: LiteP2pMultiaddr, } diff --git a/substrate/client/network/types/src/peer_id.rs b/substrate/client/network/types/src/peer_id.rs index 076be0a66c7b7..124b955d48a65 100644 --- a/substrate/client/network/types/src/peer_id.rs +++ b/substrate/client/network/types/src/peer_id.rs @@ -21,6 +21,7 @@ use crate::{ multihash::{Code, Error, Multihash}, }; use rand::Rng; +use serde_with::{DeserializeFromStr, SerializeDisplay}; use std::{fmt, hash::Hash, str::FromStr}; @@ -32,7 +33,9 @@ const MAX_INLINE_KEY_LENGTH: usize = 42; /// /// The data is a CIDv0 compatible multihash of the protobuf encoded public key of the peer /// as specified in [specs/peer-ids](https://github.com/libp2p/specs/blob/master/peer-ids/peer-ids.md). -#[derive(Clone, Copy, Eq, Hash, Ord, PartialEq, PartialOrd)] +#[derive( + Clone, Copy, Eq, Hash, Ord, PartialEq, PartialOrd, SerializeDisplay, DeserializeFromStr, +)] pub struct PeerId { multihash: Multihash, } From d95e3c333484c83a1bd4e843cd9cf2040fac12f8 Mon Sep 17 00:00:00 2001 From: Egor_P Date: Fri, 4 Jul 2025 18:27:38 +0200 Subject: [PATCH 033/128] [stable2506] Reorder prdocs (#9104) --- prdoc/{ => stable2506}/pr_8837.prdoc | 0 prdoc/{ => stable2506}/pr_8839.prdoc | 0 prdoc/{ => stable2506}/pr_9047.prdoc | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename prdoc/{ => stable2506}/pr_8837.prdoc (100%) rename prdoc/{ => stable2506}/pr_8839.prdoc (100%) rename prdoc/{ => stable2506}/pr_9047.prdoc (100%) diff --git a/prdoc/pr_8837.prdoc b/prdoc/stable2506/pr_8837.prdoc similarity index 100% rename from prdoc/pr_8837.prdoc rename to prdoc/stable2506/pr_8837.prdoc diff --git a/prdoc/pr_8839.prdoc b/prdoc/stable2506/pr_8839.prdoc similarity index 100% rename from prdoc/pr_8839.prdoc rename to prdoc/stable2506/pr_8839.prdoc diff --git a/prdoc/pr_9047.prdoc b/prdoc/stable2506/pr_9047.prdoc similarity index 100% rename from prdoc/pr_9047.prdoc rename to prdoc/stable2506/pr_9047.prdoc From 97b232bfdc4c496c1894e5fae60e286d586ece82 Mon Sep 17 00:00:00 2001 From: "paritytech-release-backport-bot[bot]" <191369287+paritytech-release-backport-bot[bot]@users.noreply.github.com> Date: Mon, 7 Jul 2025 07:30:49 +0200 Subject: [PATCH 034/128] [stable2506] Backport #9102 (#9110) Backport #9102 into `stable2506` from iulianbarbu. See the [documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md) on how to use this bot. Signed-off-by: Iulian Barbu Co-authored-by: Iulian Barbu <14218860+iulianbarbu@users.noreply.github.com> Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- cumulus/polkadot-omni-node/lib/src/nodes/aura.rs | 2 +- prdoc/pr_9102.prdoc | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 prdoc/pr_9102.prdoc diff --git a/cumulus/polkadot-omni-node/lib/src/nodes/aura.rs b/cumulus/polkadot-omni-node/lib/src/nodes/aura.rs index 6ad2a880230b3..4ca63576170dd 100644 --- a/cumulus/polkadot-omni-node/lib/src/nodes/aura.rs +++ b/cumulus/polkadot-omni-node/lib/src/nodes/aura.rs @@ -128,7 +128,7 @@ where let spawner = task_manager.spawn_essential_handle(); let relay_chain_verifier = - Box::new(RelayChainVerifier::new(client.clone(), |_, _| async { Ok(()) })); + Box::new(RelayChainVerifier::new(client.clone(), inherent_data_providers)); let equivocation_aura_verifier = EquivocationVerifier::<::Pair, _, _, _>::new( diff --git a/prdoc/pr_9102.prdoc b/prdoc/pr_9102.prdoc new file mode 100644 index 0000000000000..67d1c25abb5c2 --- /dev/null +++ b/prdoc/pr_9102.prdoc @@ -0,0 +1,12 @@ +title: '`polkadot-omni-node`: pass timestamp inherent data for block import' +doc: +- audience: [ Runtime Dev, Node Dev ] + description: |- + This should allow aura runtimes to check timestamp inherent data when syncing/importing blocks + that include timestamp inherent data. + + Runtime developers can check timestamp inherent data while using `polkadot-omni-node-lib`/`polkadot-omni-node`/`polkadot-parachain` binaries. + This change is backwards compatible and doesn't require runtimes to check the timestamp inherent, but they are able to do it now if needed. +crates: +- name: polkadot-omni-node-lib + bump: minor From a66a9c74153a014cc561084933a9198878ffc241 Mon Sep 17 00:00:00 2001 From: "paritytech-release-backport-bot[bot]" <191369287+paritytech-release-backport-bot[bot]@users.noreply.github.com> Date: Wed, 9 Jul 2025 15:02:18 +0000 Subject: [PATCH 035/128] [stable2506] Backport #9139 (#9145) Backport #9139 into `stable2506` from bkontur. See the [documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md) on how to use this bot. Co-authored-by: Branislav Kontur Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- polkadot/xcm/pallet-xcm/src/lib.rs | 3 +++ prdoc/pr_9139.prdoc | 10 ++++++++++ 2 files changed, 13 insertions(+) create mode 100644 prdoc/pr_9139.prdoc diff --git a/polkadot/xcm/pallet-xcm/src/lib.rs b/polkadot/xcm/pallet-xcm/src/lib.rs index e654ee9448458..fe5234fece3e4 100644 --- a/polkadot/xcm/pallet-xcm/src/lib.rs +++ b/polkadot/xcm/pallet-xcm/src/lib.rs @@ -289,6 +289,7 @@ pub mod pallet { type Weigher: WeightBounds<::RuntimeCall>; /// This chain's Universal Location. + #[pallet::constant] type UniversalLocation: Get; /// The runtime `Origin` type. @@ -320,9 +321,11 @@ pub mod pallet { type SovereignAccountOf: ConvertLocation; /// The maximum number of local XCM locks that a single account may have. + #[pallet::constant] type MaxLockers: Get; /// The maximum number of consumers a single remote lock may have. + #[pallet::constant] type MaxRemoteLockConsumers: Get; /// The ID type for local consumers of remote locks. diff --git a/prdoc/pr_9139.prdoc b/prdoc/pr_9139.prdoc new file mode 100644 index 0000000000000..e63402be6b141 --- /dev/null +++ b/prdoc/pr_9139.prdoc @@ -0,0 +1,10 @@ +title: Expose more constants for pallet-xcm +doc: +- audience: + - Runtime Dev + - Runtime User + description: |- + Exposes more constants (UniversalLocation, MaxLockers, MaxRemoteLockConsumers), similar as `AdvertisedXcmVersion`. +crates: +- name: pallet-xcm + bump: patch From c3bfa7aedf93d76223fe861ecdb134d4fb6e346f Mon Sep 17 00:00:00 2001 From: "paritytech-release-backport-bot[bot]" <191369287+paritytech-release-backport-bot[bot]@users.noreply.github.com> Date: Thu, 10 Jul 2025 11:45:28 +0000 Subject: [PATCH 036/128] [stable2506] Backport #9094 (#9156) Backport #9094 into `stable2506` from alexggh. See the [documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md) on how to use this bot. Signed-off-by: Alexandru Gheorghe Co-authored-by: Alexandru Gheorghe <49718502+alexggh@users.noreply.github.com> Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .../node/network/bitfield-distribution/src/lib.rs | 8 +++++++- polkadot/node/network/protocol/src/grid_topology.rs | 5 +++++ prdoc/pr_9094.prdoc | 12 ++++++++++++ 3 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 prdoc/pr_9094.prdoc diff --git a/polkadot/node/network/bitfield-distribution/src/lib.rs b/polkadot/node/network/bitfield-distribution/src/lib.rs index fffe715afd4c5..487fb3598765b 100644 --- a/polkadot/node/network/bitfield-distribution/src/lib.rs +++ b/polkadot/node/network/bitfield-distribution/src/lib.rs @@ -789,9 +789,11 @@ async fn handle_peer_view_change( }; let added = peer_data.view.replace_difference(view).cloned().collect::>(); + let current_session_index = state.topologies.get_current_session_index(); let topology = state.topologies.get_current_topology().local_grid_neighbors(); let is_gossip_peer = topology.route_to_peer(RequiredRouting::GridXY, &origin); + let lucky = is_gossip_peer || util::gen_ratio_rng( util::MIN_GOSSIP_PEERS.saturating_sub(topology.len()), @@ -809,7 +811,11 @@ async fn handle_peer_view_change( let delta_set: Vec<(ValidatorId, BitfieldGossipMessage)> = added .into_iter() .filter_map(|new_relay_parent_interest| { - if let Some(job_data) = state.per_relay_parent.get(&new_relay_parent_interest) { + if let Some(job_data) = state + .per_relay_parent + .get(&new_relay_parent_interest) + .filter(|job_data| job_data.signing_context.session_index == current_session_index) + { // Send all jointly known messages for a validator (given the current relay parent) // to the peer `origin`... let one_per_validator = job_data.one_per_validator.clone(); diff --git a/polkadot/node/network/protocol/src/grid_topology.rs b/polkadot/node/network/protocol/src/grid_topology.rs index f4c1a07ba3c2a..41fef5bbabfb7 100644 --- a/polkadot/node/network/protocol/src/grid_topology.rs +++ b/polkadot/node/network/protocol/src/grid_topology.rs @@ -496,6 +496,11 @@ impl SessionBoundGridTopologyStorage { &self.current_topology.entry } + /// Returns the current session index. + pub fn get_current_session_index(&self) -> SessionIndex { + self.current_topology.session_index + } + /// Access the current grid topology mutably. Dangerous and intended /// to be used in tests. pub fn get_current_topology_mut(&mut self) -> &mut SessionGridTopologyEntry { diff --git a/prdoc/pr_9094.prdoc b/prdoc/pr_9094.prdoc new file mode 100644 index 0000000000000..754fc3eb33d7e --- /dev/null +++ b/prdoc/pr_9094.prdoc @@ -0,0 +1,12 @@ +title: 'bitfield_distribution: fix subsystem clogged at begining of a session' +doc: +- audience: Node Dev + description: |- + `handle_peer_view_change` gets called on NewGossipTopology with the existing view of the peer to cover for the case when the topology might arrive late, but in that case in the view will contain old blocks from previous session, so since the X/Y neighbour change because of the topology change you end up sending a lot of messages for blocks before the session changed. + + Fix it by checking the send message only for relay chains that are in the same session as the current topology. +crates: +- name: polkadot-availability-bitfield-distribution + bump: patch +- name: polkadot-node-network-protocol + bump: minor From de111c2fdd6b7f1c364613c36c227ecdc81711fa Mon Sep 17 00:00:00 2001 From: "paritytech-release-backport-bot[bot]" <191369287+paritytech-release-backport-bot[bot]@users.noreply.github.com> Date: Mon, 14 Jul 2025 08:10:56 +0000 Subject: [PATCH 037/128] [stable2506] Backport #9127 (#9181) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Backport #9127 into `stable2506` from alexggh. See the [documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md) on how to use this bot. Signed-off-by: Alexandru Gheorghe Co-authored-by: Alexandru Gheorghe <49718502+alexggh@users.noreply.github.com> Co-authored-by: Bastian Köcher Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- Cargo.lock | 15 +- Cargo.toml | 5 +- .../src/validate_block/implementation.rs | 30 ++- .../src/validate_block/trie_cache.rs | 12 +- .../src/validate_block/trie_recorder.rs | 10 +- prdoc/pr_9127.prdoc | 25 +++ substrate/frame/session/src/historical/mod.rs | 4 +- .../runtime/src/proving_trie/base16.rs | 4 +- .../primitives/state-machine/src/backend.rs | 4 +- .../state-machine/src/in_memory_backend.rs | 8 +- .../src/overlayed_changes/mod.rs | 2 +- .../state-machine/src/trie_backend_essence.rs | 6 +- substrate/primitives/trie/Cargo.toml | 3 + .../trie/src/hasher_random_state.rs | 171 ++++++++++++++++++ substrate/primitives/trie/src/lib.rs | 17 +- .../primitives/trie/src/storage_proof.rs | 2 +- 16 files changed, 283 insertions(+), 35 deletions(-) create mode 100644 prdoc/pr_9127.prdoc create mode 100644 substrate/primitives/trie/src/hasher_random_state.rs diff --git a/Cargo.lock b/Cargo.lock index 364cd7cb03010..681e9daf95a6d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -10156,10 +10156,11 @@ dependencies = [ [[package]] name = "memory-db" -version = "0.33.0" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6da20dba965bd218a14c3b335b90d3e07c09ede190c7c19b50deb23d418a322" +checksum = "7e300c54e3239a86f9c61cc63ab0f03862eb40b1c6e065dc6fd6ceaeff6da93d" dependencies = [ + "foldhash", "hash-db", "hashbrown 0.15.3", ] @@ -23928,8 +23929,10 @@ dependencies = [ "ahash 0.8.11", "array-bytes 6.2.2", "criterion", + "foldhash", "hash-db", - "memory-db 0.33.0", + "hashbrown 0.15.3", + "memory-db 0.34.0", "nohash-hasher", "parity-scale-codec", "parking_lot 0.12.3", @@ -26505,14 +26508,14 @@ dependencies = [ [[package]] name = "trie-bench" -version = "0.41.0" +version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0445f19cd0e58d9aef1eef590739fc10c4291611722c98f8995b70ce8529f198" +checksum = "972be214c558b1a5550d34c8c7e55a284f6439cefc51226d6ffbfc152de5cc58" dependencies = [ "criterion", "hash-db", "keccak-hasher", - "memory-db 0.33.0", + "memory-db 0.34.0", "parity-scale-codec", "trie-db 0.30.0", "trie-root", diff --git a/Cargo.toml b/Cargo.toml index 0470295c59df0..46b32616c91e2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -801,6 +801,7 @@ first-pallet = { package = "polkadot-sdk-docs-first-pallet", path = "docs/sdk/pa first-runtime = { package = "polkadot-sdk-docs-first-runtime", path = "docs/sdk/packages/guides/first-runtime", default-features = false } flate2 = { version = "1.0" } fnv = { version = "1.0.6" } +foldhash = { version = "0.1.5", default-features = false } fork-tree = { path = "substrate/utils/fork-tree", default-features = false } forwarded-header-value = { version = "0.1.1" } fraction = { version = "0.13.1" } @@ -895,7 +896,7 @@ log = { version = "0.4.22", default-features = false } macro_magic = { version = "0.5.1" } maplit = { version = "1.0.2" } memmap2 = { version = "0.9.3" } -memory-db = { version = "0.33.0", default-features = false } +memory-db = { version = "0.34.0", default-features = false } merkleized-metadata = { version = "0.5.0" } merlin = { version = "3.0", default-features = false } messages-relay = { path = "bridges/relays/messages" } @@ -1425,7 +1426,7 @@ tracing-futures = { version = "0.2.4" } tracing-log = { version = "0.2.0" } tracing-subscriber = { version = "0.3.18" } tracking-allocator = { path = "polkadot/node/tracking-allocator", default-features = false, package = "staging-tracking-allocator" } -trie-bench = { version = "0.41.0" } +trie-bench = { version = "0.42.0" } trie-db = { version = "0.30.0", default-features = false } trie-root = { version = "0.18.0", default-features = false } trie-standardmap = { version = "0.16.0" } diff --git a/cumulus/pallets/parachain-system/src/validate_block/implementation.rs b/cumulus/pallets/parachain-system/src/validate_block/implementation.rs index c2349b7dd59e1..c8231bf436ddf 100644 --- a/cumulus/pallets/parachain-system/src/validate_block/implementation.rs +++ b/cumulus/pallets/parachain-system/src/validate_block/implementation.rs @@ -36,10 +36,11 @@ use frame_support::{ }; use sp_core::storage::{ChildInfo, StateVersion}; use sp_externalities::{set_and_run_with_externalities, Externalities}; -use sp_io::KillStorageResult; +use sp_io::{hashing::blake2_128, KillStorageResult}; use sp_runtime::traits::{ Block as BlockT, ExtrinsicCall, ExtrinsicLike, HashingFor, Header as HeaderT, }; + use sp_state_machine::OverlayedChanges; use sp_trie::ProofSizeProvider; use trie_recorder::SizeOnlyRecorderProvider; @@ -142,6 +143,12 @@ where let block_data = codec::decode_from_bytes::>(block_data) .expect("Invalid parachain block data"); + // Initialize hashmaps randomness. + sp_trie::add_extra_randomness(build_seed_from_head_data( + &block_data, + relay_parent_storage_root, + )); + let mut parent_header = codec::decode_from_bytes::(parachain_head.clone()).expect("Invalid parent head"); @@ -393,6 +400,27 @@ fn validate_validation_data( ); } +/// Build a seed from the head data of the parachain block. +/// +/// Uses both the relay parent storage root and the hash of the blocks +/// in the block data, to make sure the seed changes every block and that +/// the user cannot find about it ahead of time. +fn build_seed_from_head_data( + block_data: &ParachainBlockData, + relay_parent_storage_root: crate::relay_chain::Hash, +) -> [u8; 16] { + let mut bytes_to_hash = Vec::with_capacity( + block_data.blocks().len() * size_of::() + size_of::(), + ); + + bytes_to_hash.extend_from_slice(relay_parent_storage_root.as_ref()); + block_data.blocks().iter().for_each(|block| { + bytes_to_hash.extend_from_slice(block.header().hash().as_ref()); + }); + + blake2_128(&bytes_to_hash) +} + /// Run the given closure with the externalities and recorder set. fn run_with_externalities_and_recorder R>( backend: &impl sp_state_machine::Backend>, diff --git a/cumulus/pallets/parachain-system/src/validate_block/trie_cache.rs b/cumulus/pallets/parachain-system/src/validate_block/trie_cache.rs index 0931a2f0c4935..f92bd399bf84d 100644 --- a/cumulus/pallets/parachain-system/src/validate_block/trie_cache.rs +++ b/cumulus/pallets/parachain-system/src/validate_block/trie_cache.rs @@ -20,15 +20,15 @@ use alloc::boxed::Box; use core::cell::{RefCell, RefMut}; use hashbrown::{hash_map::Entry, HashMap}; use sp_state_machine::TrieCacheProvider; -use sp_trie::NodeCodec; +use sp_trie::{NodeCodec, RandomState}; use trie_db::{node::NodeOwned, Hasher}; /// Special purpose trie cache implementation that is able to cache an unlimited number /// of values. To be used in `validate_block` to serve values and nodes that /// have already been loaded and decoded from the storage proof. pub struct TrieCache<'a, H: Hasher> { - node_cache: RefMut<'a, HashMap>>, - value_cache: Option, trie_db::CachedValue>>>, + node_cache: RefMut<'a, HashMap, RandomState>>, + value_cache: Option, trie_db::CachedValue, RandomState>>>, } impl<'a, H: Hasher> trie_db::TrieCache> for TrieCache<'a, H> { @@ -65,14 +65,16 @@ impl<'a, H: Hasher> trie_db::TrieCache> for TrieCache<'a, H> { /// Provider of [`TrieCache`] instances. pub struct CacheProvider { - node_cache: RefCell>>, + node_cache: RefCell, RandomState>>, /// Cache: `storage_root` => `storage_key` => `value`. /// /// One `block` can for example use multiple tries (child tries) and we need to distinguish the /// cached (`storage_key`, `value`) between them. For this we are using the `storage_root` to /// distinguish them (even if the storage root is the same for two child tries, it just means /// that both are exactly the same trie and there would happen no collision). - value_cache: RefCell, trie_db::CachedValue>>>, + value_cache: RefCell< + HashMap, trie_db::CachedValue, RandomState>, RandomState>, + >, } impl CacheProvider { diff --git a/cumulus/pallets/parachain-system/src/validate_block/trie_recorder.rs b/cumulus/pallets/parachain-system/src/validate_block/trie_recorder.rs index dc70aae10163c..4aad9e3dd6577 100644 --- a/cumulus/pallets/parachain-system/src/validate_block/trie_recorder.rs +++ b/cumulus/pallets/parachain-system/src/validate_block/trie_recorder.rs @@ -26,7 +26,7 @@ use alloc::rc::Rc; use core::cell::{RefCell, RefMut}; use hashbrown::{HashMap, HashSet}; -use sp_trie::{NodeCodec, ProofSizeProvider, StorageProof}; +use sp_trie::{NodeCodec, ProofSizeProvider, RandomState, StorageProof}; use trie_db::{Hasher, RecordedForKey, TrieAccess}; /// A trie recorder that only keeps track of the proof size. @@ -34,9 +34,9 @@ use trie_db::{Hasher, RecordedForKey, TrieAccess}; /// The internal size counting logic should align /// with ['sp_trie::recorder::Recorder']. pub struct SizeOnlyRecorder<'a, H: Hasher> { - seen_nodes: RefMut<'a, HashSet>, + seen_nodes: RefMut<'a, HashSet>, encoded_size: RefMut<'a, usize>, - recorded_keys: RefMut<'a, HashMap, RecordedForKey>>, + recorded_keys: RefMut<'a, HashMap, RecordedForKey, RandomState>>, } impl<'a, H: trie_db::Hasher> trie_db::TrieRecorder for SizeOnlyRecorder<'a, H> { @@ -90,9 +90,9 @@ impl<'a, H: trie_db::Hasher> trie_db::TrieRecorder for SizeOnlyRecorder< #[derive(Clone)] pub struct SizeOnlyRecorderProvider { - seen_nodes: Rc>>, + seen_nodes: Rc>>, encoded_size: Rc>, - recorded_keys: Rc, RecordedForKey>>>, + recorded_keys: Rc, RecordedForKey, RandomState>>>, } impl Default for SizeOnlyRecorderProvider { diff --git a/prdoc/pr_9127.prdoc b/prdoc/pr_9127.prdoc new file mode 100644 index 0000000000000..ff474007cadbc --- /dev/null +++ b/prdoc/pr_9127.prdoc @@ -0,0 +1,25 @@ +title: add block hashes to the randomness used by hashmaps and friends in validation + context +doc: +- audience: Node Dev + description: |- + https://github.com/paritytech/polkadot-sdk/pull/8606 https://github.com/paritytech/trie/pull/221 replaced the usage of BTreeMap with HashMaps in validation context. The keys are already derived with a cryptographic hash function from user data, so users should not be able to manipulate it. + + To be on safe side this PR also modifies the TrieCache, TrieRecorder and MemoryDB to use a hasher that on top of the default generated randomness also adds randomness generated from the hash of the relaychain and that of the parachain blocks, which is not something users can control or guess ahead of time. +crates: +- name: bridge-runtime-common + bump: minor +- name: pallet-bridge-messages + bump: minor +- name: bp-test-utils + bump: minor +- name: cumulus-pallet-parachain-system + bump: minor +- name: sp-state-machine + bump: minor +- name: sp-trie + bump: minor +- name: pallet-session + bump: minor +- name: sp-runtime + bump: minor diff --git a/substrate/frame/session/src/historical/mod.rs b/substrate/frame/session/src/historical/mod.rs index bb778908c952f..023c9e39e2ae4 100644 --- a/substrate/frame/session/src/historical/mod.rs +++ b/substrate/frame/session/src/historical/mod.rs @@ -41,7 +41,7 @@ use sp_session::{MembershipProof, ValidatorCount}; use sp_staking::SessionIndex; use sp_trie::{ trie_types::{TrieDBBuilder, TrieDBMutBuilderV0}, - LayoutV0, MemoryDB, Recorder, StorageProof, Trie, TrieMut, TrieRecorder, + LayoutV0, MemoryDB, RandomState, Recorder, StorageProof, Trie, TrieMut, TrieRecorder, }; use frame_support::{ @@ -264,7 +264,7 @@ impl ProvingTrie { where I: IntoIterator, { - let mut db = MemoryDB::default(); + let mut db = MemoryDB::with_hasher(RandomState::default()); let mut root = Default::default(); { diff --git a/substrate/primitives/runtime/src/proving_trie/base16.rs b/substrate/primitives/runtime/src/proving_trie/base16.rs index abdf6ed178bb8..410b1d1e92b9b 100644 --- a/substrate/primitives/runtime/src/proving_trie/base16.rs +++ b/substrate/primitives/runtime/src/proving_trie/base16.rs @@ -30,7 +30,7 @@ use alloc::vec::Vec; use codec::MaxEncodedLen; use sp_trie::{ trie_types::{TrieDBBuilder, TrieDBMutBuilderV1}, - LayoutV1, MemoryDB, Trie, TrieMut, + LayoutV1, MemoryDB, RandomState, Trie, TrieMut, }; /// A helper structure for building a basic base-16 merkle trie and creating compact proofs for that @@ -77,7 +77,7 @@ where where I: IntoIterator, { - let mut db = MemoryDB::default(); + let mut db = MemoryDB::with_hasher(RandomState::default()); let mut root = Default::default(); { diff --git a/substrate/primitives/state-machine/src/backend.rs b/substrate/primitives/state-machine/src/backend.rs index 90be55d58a4ed..b0934a1b07cdb 100644 --- a/substrate/primitives/state-machine/src/backend.rs +++ b/substrate/primitives/state-machine/src/backend.rs @@ -30,7 +30,7 @@ use hash_db::Hasher; use sp_core::storage::{ChildInfo, StateVersion, TrackedStorageKey}; #[cfg(feature = "std")] use sp_core::traits::RuntimeCode; -use sp_trie::{MerkleValue, PrefixedMemoryDB}; +use sp_trie::{MerkleValue, PrefixedMemoryDB, RandomState}; /// A struct containing arguments for iterating over the storage. #[derive(Default)] @@ -301,7 +301,7 @@ pub trait Backend: core::fmt::Debug { where H::Out: Ord + Encode, { - let mut txs = BackendTransaction::default(); + let mut txs = BackendTransaction::with_hasher(RandomState::default()); let mut child_roots: Vec<_> = Default::default(); // child first for (child_info, child_delta) in child_deltas { diff --git a/substrate/primitives/state-machine/src/in_memory_backend.rs b/substrate/primitives/state-machine/src/in_memory_backend.rs index e2af837faded6..4ebb9669cf02f 100644 --- a/substrate/primitives/state-machine/src/in_memory_backend.rs +++ b/substrate/primitives/state-machine/src/in_memory_backend.rs @@ -25,7 +25,7 @@ use alloc::{collections::BTreeMap, vec::Vec}; use codec::Codec; use hash_db::Hasher; use sp_core::storage::{ChildInfo, StateVersion, Storage}; -use sp_trie::{empty_trie_root, LayoutV1, PrefixedMemoryDB}; +use sp_trie::{empty_trie_root, LayoutV1, PrefixedMemoryDB, RandomState}; #[cfg(feature = "std")] use std::collections::HashMap as MapType; @@ -40,7 +40,11 @@ where H::Out: Codec + Ord, { // V1 is same as V0 for an empty trie. - TrieBackendBuilder::new(Default::default(), empty_trie_root::>()).build() + TrieBackendBuilder::new( + PrefixedMemoryDB::with_hasher(RandomState::default()), + empty_trie_root::>(), + ) + .build() } impl TrieBackend, H> diff --git a/substrate/primitives/state-machine/src/overlayed_changes/mod.rs b/substrate/primitives/state-machine/src/overlayed_changes/mod.rs index a5f370eb88e11..efc86a2eb3294 100644 --- a/substrate/primitives/state-machine/src/overlayed_changes/mod.rs +++ b/substrate/primitives/state-machine/src/overlayed_changes/mod.rs @@ -228,7 +228,7 @@ impl Default for StorageChanges { main_storage_changes: Default::default(), child_storage_changes: Default::default(), offchain_storage_changes: Default::default(), - transaction: Default::default(), + transaction: BackendTransaction::with_hasher(Default::default()), transaction_storage_root: Default::default(), #[cfg(feature = "std")] transaction_index_changes: Default::default(), diff --git a/substrate/primitives/state-machine/src/trie_backend_essence.rs b/substrate/primitives/state-machine/src/trie_backend_essence.rs index a1f0057987411..057c742649db1 100644 --- a/substrate/primitives/state-machine/src/trie_backend_essence.rs +++ b/substrate/primitives/state-machine/src/trie_backend_essence.rs @@ -37,7 +37,7 @@ use sp_trie::{ read_child_trie_first_descendant_value, read_child_trie_hash, read_child_trie_value, read_trie_first_descendant_value, read_trie_value, trie_types::{TrieDBBuilder, TrieError}, - DBValue, KeySpacedDB, MerkleValue, NodeCodec, PrefixedMemoryDB, Trie, TrieCache, + DBValue, KeySpacedDB, MerkleValue, NodeCodec, PrefixedMemoryDB, RandomState, Trie, TrieCache, TrieDBRawIterator, TrieRecorder, TrieRecorderProvider, }; #[cfg(feature = "std")] @@ -631,7 +631,7 @@ where delta: impl Iterator)>, state_version: StateVersion, ) -> (H::Out, PrefixedMemoryDB) { - let mut write_overlay = PrefixedMemoryDB::default(); + let mut write_overlay = PrefixedMemoryDB::with_hasher(RandomState::default()); let root = self.with_recorder_and_cache_for_storage_root(None, |recorder, cache| { let mut eph = Ephemeral::new(self.backend_storage(), &mut write_overlay); @@ -667,7 +667,7 @@ where let default_root = match child_info.child_type() { ChildType::ParentKeyId => empty_child_trie_root::>(), }; - let mut write_overlay = PrefixedMemoryDB::default(); + let mut write_overlay = PrefixedMemoryDB::with_hasher(RandomState::default()); let child_root = match self.child_root(child_info) { Ok(Some(hash)) => hash, Ok(None) => default_root, diff --git a/substrate/primitives/trie/Cargo.toml b/substrate/primitives/trie/Cargo.toml index 7b84781138c7d..1d34f0fce0329 100644 --- a/substrate/primitives/trie/Cargo.toml +++ b/substrate/primitives/trie/Cargo.toml @@ -23,7 +23,9 @@ harness = false [dependencies] ahash = { optional = true, workspace = true } codec = { workspace = true } +foldhash = { workspace = true } hash-db = { workspace = true } +hashbrown = { workspace = true } memory-db = { workspace = true } nohash-hasher = { optional = true, workspace = true } parking_lot = { optional = true, workspace = true, default-features = true } @@ -50,6 +52,7 @@ default = ["std"] std = [ "ahash", "codec/std", + "foldhash/std", "hash-db/std", "memory-db/std", "nohash-hasher", diff --git a/substrate/primitives/trie/src/hasher_random_state.rs b/substrate/primitives/trie/src/hasher_random_state.rs new file mode 100644 index 0000000000000..36ae337ec416c --- /dev/null +++ b/substrate/primitives/trie/src/hasher_random_state.rs @@ -0,0 +1,171 @@ +// This file is part of Substrate. + +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Utility module to use a custom random state for HashMap and friends +//! in a no_std environment. + +use core::{ + cell::UnsafeCell, + hash::Hasher as CoreHasher, + sync::atomic::{AtomicU8, Ordering}, +}; + +use core::hash::BuildHasher; +use foldhash::quality::RandomState as FoldHashBuilder; + +// Constants to represent the state of the global extra randomness. +// UNINITIALIZED: The extra randomness has not been set yet. +const UNINITIALIZED: u8 = 0; +// LOCKED: The extra randomness is being set. +const LOCKED: u8 = 1; +// INITIALIZED: The extra randomness has been set and is ready to use. +const INITIALIZED: u8 = 2; + +// SAFETY: we only mutate the UnsafeCells when state is in the thread-exclusive +// LOCKED state, and only read when state is in the INITIALIZED state. +unsafe impl Sync for GlobalExtraRandomnesss {} +struct GlobalExtraRandomnesss { + initialized: AtomicU8, + randomness: UnsafeCell<[u8; 16]>, +} + +// Extra randomness to be used besides the one provided by the `FoldHashBuilder`. +static EXTRA_RANDOMNESS: GlobalExtraRandomnesss = GlobalExtraRandomnesss { + initialized: AtomicU8::new(UNINITIALIZED), + randomness: UnsafeCell::new([0u8; 16]), +}; + +/// Adds extra randomness to be used by all new instances of RandomState. +pub fn add_extra_randomness(extra_randomness: [u8; 16]) { + match EXTRA_RANDOMNESS.initialized.compare_exchange( + UNINITIALIZED, + LOCKED, + Ordering::Acquire, + Ordering::Acquire, + ) { + Ok(_) => { + // SAFETY: We are the only ones writing exclusively to this memory. + unsafe { *EXTRA_RANDOMNESS.randomness.get() = extra_randomness }; + EXTRA_RANDOMNESS.initialized.store(INITIALIZED, Ordering::Release); + }, + Err(_) => { + panic!("Extra randomness has already been set, cannot set it again."); + }, + } +} + +// Returns the extra randomness if it has been set, otherwise returns None. +fn extra_randomness() -> Option<&'static [u8; 16]> { + // SAFETY: We are reading from a static memory location that is initialized + // only once, so it is safe to read from it. + if EXTRA_RANDOMNESS.initialized.load(Ordering::Acquire) == INITIALIZED { + Some(unsafe { &*EXTRA_RANDOMNESS.randomness.get() }) + } else { + None + } +} + +/// A wrapper around `FoldHashBuilder` that adds extra randomness to the hashers it creates. +#[derive(Copy, Clone, Debug)] +pub struct RandomState { + default: FoldHashBuilder, + extra_randomness: Option<&'static [u8; 16]>, +} + +impl Default for RandomState { + #[inline(always)] + fn default() -> Self { + RandomState { + // FoldHashBuilder already uses a random seed, so we use that as the base. + default: FoldHashBuilder::default(), + extra_randomness: extra_randomness(), + } + } +} + +impl BuildHasher for RandomState { + type Hasher = ::Hasher; + + #[inline(always)] + fn build_hasher(&self) -> Self::Hasher { + let mut hasher = self.default.build_hasher(); + if let Some(extra) = self.extra_randomness { + // If extra randomness is set, we write it into the hasher. + hasher.write(extra); + } + + hasher + } +} + +#[cfg(test)] +mod tests { + use core::hash::{BuildHasher, Hasher}; + + #[test] + fn hashbuilder_produces_same_result() { + let haser_builder = super::RandomState::default(); + let mut hasher_1 = haser_builder.build_hasher(); + let mut hasher_2 = haser_builder.build_hasher(); + + hasher_1.write_u32(8128); + hasher_2.write_u32(8128); + + assert_eq!(hasher_1.finish(), hasher_2.finish()); + } + + #[test] + fn adding_randomness_does_not_affect_already_instantiated_builders() { + let hasher_builder = super::RandomState::default(); + let mut hasher_1 = hasher_builder.build_hasher(); + + let randomness = [0xde; 16]; + super::add_extra_randomness(randomness); + let builder_after_randomness_added = super::RandomState::default(); + assert_eq!(builder_after_randomness_added.extra_randomness, Some(&randomness)); + + let mut hasher_2 = hasher_builder.build_hasher(); + + hasher_1.write_u32(8128); + hasher_2.write_u32(8128); + + assert_eq!(hasher_1.finish(), hasher_2.finish()); + } + + #[test] + fn sanity_check() { + let haser_builder = super::RandomState::default(); + let mut hasher_create_manually = + hashbrown::HashMap::::with_hasher(haser_builder); + let mut default_built = hashbrown::HashMap::::default(); + + for x in 0..100 { + default_built.insert(x, x * 2); + hasher_create_manually.insert(x, x * 2); + } + + for x in 0..100 { + assert_eq!(default_built.get(&x), Some(&(x * 2))); + assert_eq!(hasher_create_manually.get(&x), Some(&(x * 2))); + } + + for x in 100..200 { + assert_eq!(default_built.get(&x), None); + assert_eq!(hasher_create_manually.get(&x), None); + } + } +} diff --git a/substrate/primitives/trie/src/lib.rs b/substrate/primitives/trie/src/lib.rs index ef6b6a5743c2b..de828c2e10194 100644 --- a/substrate/primitives/trie/src/lib.rs +++ b/substrate/primitives/trie/src/lib.rs @@ -25,6 +25,8 @@ pub mod accessed_nodes_tracker; #[cfg(feature = "std")] pub mod cache; mod error; +#[cfg(any(not(feature = "std"), test))] +mod hasher_random_state; mod node_codec; mod node_header; #[cfg(feature = "std")] @@ -37,6 +39,12 @@ mod trie_stream; #[cfg(feature = "std")] pub mod proof_size_extension; +#[cfg(feature = "std")] +pub use std::hash::RandomState; + +#[cfg(not(feature = "std"))] +pub use hasher_random_state::{add_extra_randomness, RandomState}; + use alloc::{borrow::Borrow, boxed::Box, vec, vec::Vec}; use core::marker::PhantomData; /// Our `NodeCodec`-specific error. @@ -192,13 +200,16 @@ pub type HashDB<'a, H> = dyn hash_db::HashDB + 'a; /// Reexport from `hash_db`, with genericity set for `Hasher` trait. /// This uses a `KeyFunction` for prefixing keys internally (avoiding /// key conflict for non random keys). -pub type PrefixedMemoryDB = memory_db::MemoryDB, trie_db::DBValue>; +pub type PrefixedMemoryDB = + memory_db::MemoryDB, trie_db::DBValue, RS>; /// Reexport from `hash_db`, with genericity set for `Hasher` trait. /// This uses a noops `KeyFunction` (key addressing must be hashed or using /// an encoding scheme that avoid key conflict). -pub type MemoryDB = memory_db::MemoryDB, trie_db::DBValue>; +pub type MemoryDB = + memory_db::MemoryDB, trie_db::DBValue, RS>; /// Reexport from `hash_db`, with genericity set for `Hasher` trait. -pub type GenericMemoryDB = memory_db::MemoryDB; +pub type GenericMemoryDB = + memory_db::MemoryDB; /// Persistent trie database read-access interface for a given hasher. pub type TrieDB<'a, 'cache, L> = trie_db::TrieDB<'a, 'cache, L>; diff --git a/substrate/primitives/trie/src/storage_proof.rs b/substrate/primitives/trie/src/storage_proof.rs index 28ebb394d6381..8bb6eb1da9c50 100644 --- a/substrate/primitives/trie/src/storage_proof.rs +++ b/substrate/primitives/trie/src/storage_proof.rs @@ -163,7 +163,7 @@ impl From for crate::MemoryDB { impl From<&StorageProof> for crate::MemoryDB { fn from(proof: &StorageProof) -> Self { - let mut db = crate::MemoryDB::default(); + let mut db = crate::MemoryDB::with_hasher(crate::RandomState::default()); proof.iter_nodes().for_each(|n| { db.insert(crate::EMPTY_PREFIX, &n); }); From fcdb807bd002f07c8be357597714f503735f67ae Mon Sep 17 00:00:00 2001 From: "paritytech-release-backport-bot[bot]" <191369287+paritytech-release-backport-bot[bot]@users.noreply.github.com> Date: Mon, 14 Jul 2025 18:22:33 +0300 Subject: [PATCH 038/128] [stable2506] Backport #8860 relay chain logic (runtime + client) (#9193) Backport #8860 relay chain logic (runtime + client) into `stable2506` from serban300. This PR backports the relay chain client and runtime changes related to #8860. This way we could start relaxing the advancement rule on the relay chain, and in a future release we will introduce the new parachain runtime logic. --------- Co-authored-by: Serban Iorga Co-authored-by: Serban Iorga Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .../src/inclusion_emulator/mod.rs | 28 ++++-- polkadot/runtime/parachains/src/hrmp.rs | 19 +++- polkadot/runtime/parachains/src/hrmp/tests.rs | 89 +++++++++++++++++++ prdoc/pr_8860.prdoc | 10 +++ 4 files changed, 136 insertions(+), 10 deletions(-) create mode 100644 prdoc/pr_8860.prdoc diff --git a/polkadot/node/subsystem-util/src/inclusion_emulator/mod.rs b/polkadot/node/subsystem-util/src/inclusion_emulator/mod.rs index 8a620db4ab0c9..b6d4810a9a886 100644 --- a/polkadot/node/subsystem-util/src/inclusion_emulator/mod.rs +++ b/polkadot/node/subsystem-util/src/inclusion_emulator/mod.rs @@ -274,7 +274,7 @@ impl Constraints { ) -> Result<(), ModificationError> { if let Some(HrmpWatermarkUpdate::Trunk(hrmp_watermark)) = modifications.hrmp_watermark { // head updates are always valid. - if self.hrmp_inbound.valid_watermarks.iter().all(|w| w != &hrmp_watermark) { + if !self.hrmp_inbound.valid_watermarks.contains(&hrmp_watermark) { return Err(ModificationError::DisallowedHrmpWatermark(hrmp_watermark)) } } @@ -347,7 +347,7 @@ impl Constraints { match new.hrmp_inbound.valid_watermarks.binary_search(&hrmp_watermark.watermark()) { Ok(pos) => { // Exact match, so this is OK in all cases. - let _ = new.hrmp_inbound.valid_watermarks.drain(..pos + 1); + let _ = new.hrmp_inbound.valid_watermarks.drain(..pos); }, Err(pos) => match hrmp_watermark { HrmpWatermarkUpdate::Head(_) => { @@ -1038,30 +1038,44 @@ mod tests { } #[test] - fn constraints_disallowed_trunk_watermark() { + fn constraints_check_trunk_watermark() { let constraints = make_constraints(); let mut modifications = ConstraintModifications::identity(); - modifications.hrmp_watermark = Some(HrmpWatermarkUpdate::Trunk(7)); + // The current hrmp watermark is kept + modifications.hrmp_watermark = Some(HrmpWatermarkUpdate::Trunk(6)); + assert!(constraints.check_modifications(&modifications).is_ok()); + let new_constraints = constraints.apply_modifications(&modifications).unwrap(); + assert_eq!(new_constraints.hrmp_inbound.valid_watermarks, vec![6, 8]); + + modifications.hrmp_watermark = Some(HrmpWatermarkUpdate::Trunk(7)); assert_eq!( constraints.check_modifications(&modifications), Err(ModificationError::DisallowedHrmpWatermark(7)), ); - assert_eq!( constraints.apply_modifications(&modifications), Err(ModificationError::DisallowedHrmpWatermark(7)), ); + + modifications.hrmp_watermark = Some(HrmpWatermarkUpdate::Trunk(8)); + assert!(constraints.check_modifications(&modifications).is_ok()); + let new_constraints = constraints.apply_modifications(&modifications).unwrap(); + assert_eq!(new_constraints.hrmp_inbound.valid_watermarks, vec![8]); } #[test] - fn constraints_always_allow_head_watermark() { + fn constraints_check_head_watermark() { let constraints = make_constraints(); let mut modifications = ConstraintModifications::identity(); - modifications.hrmp_watermark = Some(HrmpWatermarkUpdate::Head(7)); + modifications.hrmp_watermark = Some(HrmpWatermarkUpdate::Head(5)); assert!(constraints.check_modifications(&modifications).is_ok()); + let new_constraints = constraints.apply_modifications(&modifications).unwrap(); + assert_eq!(new_constraints.hrmp_inbound.valid_watermarks, vec![6, 8]); + modifications.hrmp_watermark = Some(HrmpWatermarkUpdate::Head(7)); + assert!(constraints.check_modifications(&modifications).is_ok()); let new_constraints = constraints.apply_modifications(&modifications).unwrap(); assert_eq!(new_constraints.hrmp_inbound.valid_watermarks, vec![8]); } diff --git a/polkadot/runtime/parachains/src/hrmp.rs b/polkadot/runtime/parachains/src/hrmp.rs index 65345e4064f5c..efb4944de67ef 100644 --- a/polkadot/runtime/parachains/src/hrmp.rs +++ b/polkadot/runtime/parachains/src/hrmp.rs @@ -1189,12 +1189,16 @@ impl Pallet { } if let Some(last_watermark) = HrmpWatermarks::::get(&recipient) { - if new_hrmp_watermark <= last_watermark { + if new_hrmp_watermark < last_watermark { return Err(HrmpWatermarkAcceptanceErr::AdvancementRule { new_watermark: new_hrmp_watermark, last_watermark, }) } + + if new_hrmp_watermark == last_watermark { + return Ok(()) + } } // Second, check where the watermark CAN land. It's one of the following: @@ -1215,10 +1219,19 @@ impl Pallet { /// Returns HRMP watermarks of previously sent messages to a given para. pub(crate) fn valid_watermarks(recipient: ParaId) -> Vec> { - HrmpChannelDigests::::get(&recipient) + let mut valid_watermarks: Vec<_> = HrmpChannelDigests::::get(&recipient) .into_iter() .map(|(block_no, _)| block_no) - .collect() + .collect(); + + // The current watermark will remain valid until updated. + if let Some(last_watermark) = HrmpWatermarks::::get(&recipient) { + if valid_watermarks.first().map_or(false, |w| w > &last_watermark) { + valid_watermarks.insert(0, last_watermark); + } + } + + valid_watermarks } pub(crate) fn check_outbound_hrmp( diff --git a/polkadot/runtime/parachains/src/hrmp/tests.rs b/polkadot/runtime/parachains/src/hrmp/tests.rs index 52db932c7962b..9c72a64a5f4ce 100644 --- a/polkadot/runtime/parachains/src/hrmp/tests.rs +++ b/polkadot/runtime/parachains/src/hrmp/tests.rs @@ -892,6 +892,86 @@ fn cancel_pending_open_channel_request() { }); } +#[test] +fn watermark_can_remain_the_same() { + let para_a = 2032.into(); + let para_b = 2064.into(); + let para_c = 3000.into(); + + let mut genesis = GenesisConfigBuilder::default(); + genesis.hrmp_channel_max_message_size = 20; + genesis.hrmp_channel_max_total_size = 20; + new_test_ext(genesis.build()).execute_with(|| { + register_parachain(para_a); + register_parachain(para_b); + register_parachain(para_c); + + run_to_block(3, Some(vec![2, 3])); + Hrmp::init_open_channel(para_a, para_b, 2, 20).unwrap(); + Hrmp::accept_open_channel(para_b, para_a).unwrap(); + Hrmp::init_open_channel(para_c, para_b, 2, 20).unwrap(); + Hrmp::accept_open_channel(para_b, para_c).unwrap(); + + // Update watermark + assert!(Hrmp::check_hrmp_watermark(para_b, 3, 3).is_ok()); + let _ = Hrmp::prune_hrmp(para_b, 3); + + // On Block 6: + // A sends 1 message to B + run_to_block(6, Some(vec![6])); + assert!(channel_exists(para_a, para_b)); + let msgs: HorizontalMessages = + vec![OutboundHrmpMessage { recipient: para_b, data: b"HRMP message from A".to_vec() }] + .try_into() + .unwrap(); + let config = configuration::ActiveConfig::::get(); + assert!(Hrmp::check_outbound_hrmp(&config, para_a, &msgs).is_ok()); + let _ = Hrmp::queue_outbound_hrmp(para_a, msgs); + Hrmp::assert_storage_consistency_exhaustive(); + // C sends 1 message to B + assert!(channel_exists(para_c, para_b)); + let msgs: HorizontalMessages = + vec![OutboundHrmpMessage { recipient: para_b, data: b"HRMP message from C".to_vec() }] + .try_into() + .unwrap(); + let config = configuration::ActiveConfig::::get(); + assert!(Hrmp::check_outbound_hrmp(&config, para_c, &msgs).is_ok()); + let _ = Hrmp::queue_outbound_hrmp(para_c, msgs); + Hrmp::assert_storage_consistency_exhaustive(); + + // Check that a smaller HRMP watermark is not accepted + assert!(matches!( + Hrmp::check_hrmp_watermark(para_b, 6, 2), + Err(HrmpWatermarkAcceptanceErr::AdvancementRule { + new_watermark: 2, + last_watermark: 3 + }) + )); + + // Check that an HRMP watermark representing a relay chain block that doesn't contain + // any message is not accepted + assert!(matches!( + Hrmp::check_hrmp_watermark(para_b, 6, 5), + Err(HrmpWatermarkAcceptanceErr::LandsOnBlockWithNoMessages { new_watermark: 5 }) + )); + + // On block 7: + // B receives the messages, but can process only the one sent by A. + // B keeps the old watermark. + run_to_block(7, None); + assert!(Hrmp::check_hrmp_watermark(para_b, 7, 3).is_ok()); + let _ = Hrmp::prune_hrmp(para_b, 5); + Hrmp::assert_storage_consistency_exhaustive(); + + // On block 8: + // B can also process the message sent by C. B sets the watermark to 6. + run_to_block(8, None); + assert!(Hrmp::check_hrmp_watermark(para_b, 7, 6).is_ok()); + let _ = Hrmp::prune_hrmp(para_b, 6); + Hrmp::assert_storage_consistency_exhaustive(); + }); +} + #[test] fn watermark_maxed_out_at_relay_parent() { let para_a = 2032.into(); @@ -921,6 +1001,15 @@ fn watermark_maxed_out_at_relay_parent() { let _ = Hrmp::queue_outbound_hrmp(para_a, msgs); Hrmp::assert_storage_consistency_exhaustive(); + // Check that an HRMP watermark greater than the relay parent is not accepted + assert!(matches!( + Hrmp::check_hrmp_watermark(para_b, 6, 7), + Err(HrmpWatermarkAcceptanceErr::AheadRelayParent { + new_watermark: 7, + relay_chain_parent_number: 6, + }) + )); + // On block 8: // B receives the message sent by A. B sets the watermark to 7. run_to_block(8, None); diff --git a/prdoc/pr_8860.prdoc b/prdoc/pr_8860.prdoc new file mode 100644 index 0000000000000..6ffc74ec05cf4 --- /dev/null +++ b/prdoc/pr_8860.prdoc @@ -0,0 +1,10 @@ +title: '[stable2506] Backport #8860 relay chain logic (runtime + client) ' +doc: +- audience: Node Operator + description: |- + This PR relaxes the advancement rule for HRMP messages, making it possible to keep the old watermark. +crates: +- name: polkadot-node-subsystem-util + bump: patch +- name: polkadot-runtime-parachains + bump: patch From 00325dd7a8d513e731ef8c845b79bc79b18773ed Mon Sep 17 00:00:00 2001 From: "paritytech-release-backport-bot[bot]" <191369287+paritytech-release-backport-bot[bot]@users.noreply.github.com> Date: Tue, 15 Jul 2025 21:38:52 +0000 Subject: [PATCH 039/128] [stable2506] Backport #9137 (#9200) Backport #9137 into `stable2506` from franciscoaguirre. See the [documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md) on how to use this bot. --------- Co-authored-by: Francisco Aguirre --- Cargo.lock | 1 + .../emulated/common/src/macros.rs | 16 +- .../asset-hub-rococo/src/tests/teleport.rs | 46 ++- .../assets/asset-hub-westend/src/tests/mod.rs | 1 + .../asset-hub-westend/src/tests/teleport.rs | 46 ++- .../src/tests/transfer_assets_validation.rs | 264 ++++++++++++++++++ .../cookbook/relay_token_transactor/tests.rs | 4 +- polkadot/xcm/pallet-xcm/Cargo.toml | 1 + polkadot/xcm/pallet-xcm/src/lib.rs | 11 + .../src/transfer_assets_validation.rs | 163 +++++++++++ prdoc/pr_9137.prdoc | 32 +++ 11 files changed, 565 insertions(+), 20 deletions(-) create mode 100644 cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/src/tests/transfer_assets_validation.rs create mode 100644 polkadot/xcm/pallet-xcm/src/transfer_assets_validation.rs create mode 100644 prdoc/pr_9137.prdoc diff --git a/Cargo.lock b/Cargo.lock index 681e9daf95a6d..92a8b0bdbf255 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -13957,6 +13957,7 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", + "hex-literal", "pallet-assets", "pallet-balances", "parity-scale-codec", diff --git a/cumulus/parachains/integration-tests/emulated/common/src/macros.rs b/cumulus/parachains/integration-tests/emulated/common/src/macros.rs index bc162a9c0f860..1509be680975e 100644 --- a/cumulus/parachains/integration-tests/emulated/common/src/macros.rs +++ b/cumulus/parachains/integration-tests/emulated/common/src/macros.rs @@ -39,7 +39,7 @@ pub use xcm::{ }, }; -pub use xcm_executor::traits::DropAssets; +pub use xcm_executor::traits::{DropAssets, TransferType}; // Cumulus pub use asset_test_utils; @@ -851,16 +851,20 @@ macro_rules! test_dry_run_transfer_across_pk_bridge { // Give some initial funds. >::set_balance(&who, initial_balance); - let call = RuntimeCall::PolkadotXcm($crate::macros::pallet_xcm::Call::transfer_assets { - dest: Box::new($crate::macros::VersionedLocation::from($destination)), - beneficiary: Box::new($crate::macros::VersionedLocation::from($crate::macros::Junction::AccountId32 { + let beneficiary: $crate::macros::Location = $crate::macros::Junction::AccountId32 { id: who.clone().into(), network: None, - })), + }.into(); + + let call = RuntimeCall::PolkadotXcm($crate::macros::pallet_xcm::Call::transfer_assets_using_type_and_then { + dest: Box::new($crate::macros::VersionedLocation::from($destination)), assets: Box::new($crate::macros::VersionedAssets::from(vec![ ($crate::macros::Parent, transfer_amount).into(), ])), - fee_asset_item: 0, + assets_transfer_type: Box::new($crate::macros::TransferType::LocalReserve), + remote_fees_id: Box::new($crate::macros::VersionedAssetId::from($crate::macros::Parent)), + fees_transfer_type: Box::new($crate::macros::TransferType::LocalReserve), + custom_xcm_on_dest: Box::new($crate::macros::VersionedXcm::<()>::from($crate::macros::Xcm::<()>::builder_unsafe().deposit_asset(AllCounted(1), beneficiary).build())), weight_limit: $crate::macros::Unlimited, }); let origin = OriginCaller::system($crate::macros::RawOrigin::Signed(who)); diff --git a/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/src/tests/teleport.rs b/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/src/tests/teleport.rs index e9ceb1848fc20..892bba89136ac 100644 --- a/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/src/tests/teleport.rs +++ b/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/src/tests/teleport.rs @@ -180,23 +180,57 @@ fn system_para_limited_teleport_assets(t: SystemParaToRelayTest) -> DispatchResu } fn para_to_system_para_transfer_assets(t: ParaToSystemParaTest) -> DispatchResult { - ::PolkadotXcm::transfer_assets( + type Runtime = ::Runtime; + let remote_fee_id: AssetId = t + .args + .assets + .clone() + .into_inner() + .get(t.args.fee_asset_item as usize) + .ok_or(pallet_xcm::Error::::Empty)? + .clone() + .id; + + ::PolkadotXcm::transfer_assets_using_type_and_then( t.signed_origin, bx!(t.args.dest.into()), - bx!(t.args.beneficiary.into()), bx!(t.args.assets.into()), - t.args.fee_asset_item, + bx!(TransferType::Teleport), + bx!(remote_fee_id.into()), + bx!(TransferType::DestinationReserve), + bx!(VersionedXcm::from( + Xcm::<()>::builder_unsafe() + .deposit_asset(AllCounted(2), t.args.beneficiary) + .build() + )), t.args.weight_limit, ) } fn system_para_to_para_transfer_assets(t: SystemParaToParaTest) -> DispatchResult { - ::PolkadotXcm::transfer_assets( + type Runtime = ::Runtime; + let remote_fee_id: AssetId = t + .args + .assets + .clone() + .into_inner() + .get(t.args.fee_asset_item as usize) + .ok_or(pallet_xcm::Error::::Empty)? + .clone() + .id; + + ::PolkadotXcm::transfer_assets_using_type_and_then( t.signed_origin, bx!(t.args.dest.into()), - bx!(t.args.beneficiary.into()), bx!(t.args.assets.into()), - t.args.fee_asset_item, + bx!(TransferType::Teleport), + bx!(remote_fee_id.into()), + bx!(TransferType::LocalReserve), + bx!(VersionedXcm::from( + Xcm::<()>::builder_unsafe() + .deposit_asset(AllCounted(2), t.args.beneficiary) + .build() + )), t.args.weight_limit, ) } diff --git a/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/src/tests/mod.rs b/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/src/tests/mod.rs index f46dc66d24129..22bfebddefee2 100644 --- a/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/src/tests/mod.rs +++ b/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/src/tests/mod.rs @@ -26,6 +26,7 @@ mod set_xcm_versions; mod swap; mod teleport; mod transact; +mod transfer_assets_validation; mod treasury; mod xcm_fee_estimation; diff --git a/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/src/tests/teleport.rs b/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/src/tests/teleport.rs index 1d69a369a7616..5c4ea36d4cca0 100644 --- a/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/src/tests/teleport.rs +++ b/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/src/tests/teleport.rs @@ -169,23 +169,57 @@ fn system_para_limited_teleport_assets(t: SystemParaToRelayTest) -> DispatchResu } fn para_to_system_para_transfer_assets(t: ParaToSystemParaTest) -> DispatchResult { - ::PolkadotXcm::transfer_assets( + type Runtime = ::Runtime; + let remote_fee_id: AssetId = t + .args + .assets + .clone() + .into_inner() + .get(t.args.fee_asset_item as usize) + .ok_or(pallet_xcm::Error::::Empty)? + .clone() + .id; + + ::PolkadotXcm::transfer_assets_using_type_and_then( t.signed_origin, bx!(t.args.dest.into()), - bx!(t.args.beneficiary.into()), bx!(t.args.assets.into()), - t.args.fee_asset_item, + bx!(TransferType::Teleport), + bx!(remote_fee_id.into()), + bx!(TransferType::DestinationReserve), + bx!(VersionedXcm::from( + Xcm::<()>::builder_unsafe() + .deposit_asset(AllCounted(2), t.args.beneficiary) + .build() + )), t.args.weight_limit, ) } fn system_para_to_para_transfer_assets(t: SystemParaToParaTest) -> DispatchResult { - ::PolkadotXcm::transfer_assets( + type Runtime = ::Runtime; + let remote_fee_id: AssetId = t + .args + .assets + .clone() + .into_inner() + .get(t.args.fee_asset_item as usize) + .ok_or(pallet_xcm::Error::::Empty)? + .clone() + .id; + + ::PolkadotXcm::transfer_assets_using_type_and_then( t.signed_origin, bx!(t.args.dest.into()), - bx!(t.args.beneficiary.into()), bx!(t.args.assets.into()), - t.args.fee_asset_item, + bx!(TransferType::Teleport), + bx!(remote_fee_id.into()), + bx!(TransferType::LocalReserve), + bx!(VersionedXcm::from( + Xcm::<()>::builder_unsafe() + .deposit_asset(AllCounted(2), t.args.beneficiary) + .build() + )), t.args.weight_limit, ) } diff --git a/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/src/tests/transfer_assets_validation.rs b/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/src/tests/transfer_assets_validation.rs new file mode 100644 index 0000000000000..6db851daaeff8 --- /dev/null +++ b/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/src/tests/transfer_assets_validation.rs @@ -0,0 +1,264 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Tests for the validation of `pallet_xcm::Pallet::::transfer_assets`. +//! See the `pallet_xcm::transfer_assets_validation` module for more information. + +use crate::imports::*; +use frame_support::{assert_err, assert_ok}; +use sp_runtime::DispatchError; + +// ================================================================================== +// ============================== PenpalA <-> Westend =============================== +// ================================================================================== + +/// Test that `transfer_assets` fails when doing reserve transfer of WND from PenpalA to Westend. +/// This fails because PenpalA's IsReserve config considers Westend as the reserve for WND, +/// so transfer_assets automatically chooses reserve transfer, which we block. +#[test] +fn transfer_assets_wnd_reserve_transfer_para_to_relay_fails() { + let destination = PenpalA::parent_location(); + let beneficiary: Location = + AccountId32Junction { network: None, id: WestendReceiver::get().into() }.into(); + let amount_to_send: Balance = WESTEND_ED * 1000; + let assets: Assets = (Parent, amount_to_send).into(); + + // Mint WND on PenpalA for testing. + PenpalA::mint_foreign_asset( + ::RuntimeOrigin::signed(PenpalAssetOwner::get()), + RelayLocation::get(), + PenpalASender::get(), + amount_to_send * 2, + ); + + // Fund PenpalA's sovereign account on Westend with the reserve WND. + let penpal_location_as_seen_by_relay = Westend::child_location_of(PenpalA::para_id()); + let sov_penpal_on_relay = Westend::sovereign_account_id_of(penpal_location_as_seen_by_relay); + Westend::fund_accounts(vec![(sov_penpal_on_relay.into(), amount_to_send * 2)]); + + PenpalA::execute_with(|| { + let result = ::PolkadotXcm::transfer_assets( + ::RuntimeOrigin::signed(PenpalASender::get()), + bx!(destination.into()), + bx!(beneficiary.into()), + bx!(assets.into()), + 0, + WeightLimit::Unlimited, + ); + + // This should fail because WND reserve transfer is blocked. + assert_err!( + result, + DispatchError::Module(sp_runtime::ModuleError { + index: 31, + error: [21, 0, 0, 0], // InvalidAssetUnknownReserve. + message: Some("InvalidAssetUnknownReserve") + }) + ); + }); +} + +/// Test that `transfer_assets` fails when doing reserve transfer of WND from Westend to PenpalA +/// This fails because Westend's configuration would make this a reserve transfer, which we block. +#[test] +fn transfer_assets_wnd_reserve_transfer_relay_to_para_fails() { + let destination = Westend::child_location_of(PenpalA::para_id()); + let beneficiary: Location = + AccountId32Junction { network: None, id: PenpalAReceiver::get().into() }.into(); + let amount_to_send: Balance = WESTEND_ED * 1000; + let assets: Assets = (Here, amount_to_send).into(); + + Westend::execute_with(|| { + let result = ::XcmPallet::transfer_assets( + ::RuntimeOrigin::signed(WestendSender::get()), + bx!(destination.into()), + bx!(beneficiary.into()), + bx!(assets.into()), + 0, + WeightLimit::Unlimited, + ); + + // This should fail because WND reserve transfer is blocked. + assert_err!( + result, + DispatchError::Module(sp_runtime::ModuleError { + index: 99, + error: [21, 0, 0, 0], // InvalidAssetUnknownReserve. + message: Some("InvalidAssetUnknownReserve") + }) + ); + }); +} + +// ================================================================================== +// ============================== PenpalA <-> PenpalB =============================== +// ================================================================================== + +/// Test that `transfer_assets` fails when doing reserve transfer of WND from PenpalA to PenpalB +#[test] +fn transfer_assets_wnd_reserve_transfer_para_to_para_fails() { + let destination = PenpalA::sibling_location_of(PenpalB::para_id()); + let beneficiary: Location = + AccountId32Junction { network: None, id: PenpalBReceiver::get().into() }.into(); + let amount_to_send: Balance = WESTEND_ED * 1000; + let assets: Assets = (Parent, amount_to_send).into(); + + // Mint WND on PenpalA for testing + PenpalA::mint_foreign_asset( + ::RuntimeOrigin::signed(PenpalAssetOwner::get()), + RelayLocation::get(), + PenpalASender::get(), + amount_to_send * 2, + ); + + PenpalA::execute_with(|| { + let result = ::PolkadotXcm::transfer_assets( + ::RuntimeOrigin::signed(PenpalASender::get()), + bx!(destination.into()), + bx!(beneficiary.into()), + bx!(assets.into()), + 0, + WeightLimit::Unlimited, + ); + + // This should fail because WND reserve transfer is blocked + assert_err!( + result, + DispatchError::Module(sp_runtime::ModuleError { + index: 31, + error: [21, 0, 0, 0], // InvalidAssetUnknownReserve + message: Some("InvalidAssetUnknownReserve") + }) + ); + }); +} + +// ================================================================================== +// ============================== Mixed Assets and Fees ============================= +// ================================================================================== + +/// Test that `transfer_assets` fails when WND is used as fee asset in reserve transfer +#[test] +fn transfer_assets_wnd_as_fee_in_reserve_transfer_fails() { + let destination = PenpalA::sibling_location_of(PenpalB::para_id()); + let beneficiary: Location = + AccountId32Junction { network: None, id: PenpalBReceiver::get().into() }.into(); + let asset_amount: Balance = 1_000_000_000_000; // A million USDT. + let fee_amount: Balance = WESTEND_ED * 100; + + // Create a foreign asset location (representing another asset). + let foreign_asset_location = Location::new( + 1, + [ + Parachain(AssetHubWestend::para_id().into()), + PalletInstance(ASSETS_PALLET_ID), + GeneralIndex(USDT_ID.into()), // USDT. + ], + ); + + // Mint both assets on PenpalA for testing. + PenpalA::mint_foreign_asset( + ::RuntimeOrigin::signed(PenpalAssetOwner::get()), + foreign_asset_location.clone(), + PenpalASender::get(), + asset_amount * 2, + ); + PenpalA::mint_foreign_asset( + ::RuntimeOrigin::signed(PenpalAssetOwner::get()), + RelayLocation::get(), + PenpalASender::get(), + fee_amount * 2, + ); + + // Transfer foreign asset, pay fees with WND. + let assets: Assets = vec![ + (foreign_asset_location, asset_amount).into(), + (Parent, fee_amount).into(), // WND as fee. + ] + .into(); + let fee_asset_item = 1; // WND is the fee asset. + + PenpalA::execute_with(|| { + let result = ::PolkadotXcm::transfer_assets( + ::RuntimeOrigin::signed(PenpalASender::get()), + bx!(destination.into()), + bx!(beneficiary.into()), + bx!(assets.into()), + fee_asset_item, + WeightLimit::Unlimited, + ); + + // This should fail because WND fee would be reserve transferred. + assert_err!( + result, + DispatchError::Module(sp_runtime::ModuleError { + index: 31, + error: [21, 0, 0, 0], // InvalidAssetUnknownReserve. + message: Some("InvalidAssetUnknownReserve") + }) + ); + }); +} + +/// Test that `transfer_assets` works when neither asset nor fee is WND. +#[test] +fn transfer_assets_non_native_assets_work() { + let destination = PenpalA::sibling_location_of(PenpalB::para_id()); + let beneficiary: Location = + AccountId32Junction { network: None, id: PenpalBReceiver::get().into() }.into(); + let amount: Balance = 1_000_000_000_000; // A million USDT. + + // Create foreign asset locations (both non-native). + let asset_location = Location::new( + 1, + [ + Parachain(AssetHubWestend::para_id().into()), + PalletInstance(ASSETS_PALLET_ID), + GeneralIndex(USDT_ID.into()), // USDT. + ], + ); + + // Mint both USDT and WND on PenpalA, one for sending, the other for paying delivery fees. + PenpalA::mint_foreign_asset( + ::RuntimeOrigin::signed(PenpalAssetOwner::get()), + RelayLocation::get(), + PenpalASender::get(), + amount * 2, + ); + PenpalA::mint_foreign_asset( + ::RuntimeOrigin::signed(PenpalAssetOwner::get()), + asset_location.clone(), + PenpalASender::get(), + amount * 2, + ); + + // Transfer non-native assets. + let assets: Assets = (asset_location, amount).into(); + let fee_asset_item = 0; + + PenpalA::execute_with(|| { + let result = ::PolkadotXcm::transfer_assets( + ::RuntimeOrigin::signed(PenpalASender::get()), + bx!(destination.into()), + bx!(beneficiary.into()), + bx!(assets.into()), + fee_asset_item, + WeightLimit::Unlimited, + ); + + // This should succeed because neither asset is WND. + assert_ok!(result); + }); +} diff --git a/polkadot/xcm/docs/src/cookbook/relay_token_transactor/tests.rs b/polkadot/xcm/docs/src/cookbook/relay_token_transactor/tests.rs index 46c73b37545f4..93a112689c42a 100644 --- a/polkadot/xcm/docs/src/cookbook/relay_token_transactor/tests.rs +++ b/polkadot/xcm/docs/src/cookbook/relay_token_transactor/tests.rs @@ -64,7 +64,7 @@ fn reserve_asset_transfers_work() { // If we don't specify anything, it will be a `u64`, which the conversion // will turn into a non-fungible token instead of a fungible one. let assets: Assets = (Here, 50u128 * CENTS as u128).into(); - assert_ok!(relay_chain::XcmPallet::transfer_assets( + assert_ok!(relay_chain::XcmPallet::limited_reserve_transfer_assets( relay_chain::RuntimeOrigin::signed(ALICE), Box::new(VersionedLocation::from(destination.clone())), Box::new(VersionedLocation::from(beneficiary)), @@ -100,7 +100,7 @@ fn reserve_asset_transfers_work() { // This chain doesn't have a token of its own, so we always refer to this token, // and we do so by the Location of the Relay Chain. let assets: Assets = (Parent, 25u128 * CENTS as u128).into(); - assert_ok!(parachain::XcmPallet::transfer_assets( + assert_ok!(parachain::XcmPallet::limited_reserve_transfer_assets( parachain::RuntimeOrigin::signed(BOB), Box::new(VersionedLocation::from(destination)), Box::new(VersionedLocation::from(beneficiary)), diff --git a/polkadot/xcm/pallet-xcm/Cargo.toml b/polkadot/xcm/pallet-xcm/Cargo.toml index 7f57a75096aac..feadac8afeaf5 100644 --- a/polkadot/xcm/pallet-xcm/Cargo.toml +++ b/polkadot/xcm/pallet-xcm/Cargo.toml @@ -31,6 +31,7 @@ xcm-runtime-apis = { workspace = true } # marked optional, used in benchmarking frame-benchmarking = { optional = true, workspace = true } +hex-literal = { workspace = true, default-features = false } pallet-balances = { optional = true, workspace = true } [dev-dependencies] diff --git a/polkadot/xcm/pallet-xcm/src/lib.rs b/polkadot/xcm/pallet-xcm/src/lib.rs index fe5234fece3e4..d4b32dd12d012 100644 --- a/polkadot/xcm/pallet-xcm/src/lib.rs +++ b/polkadot/xcm/pallet-xcm/src/lib.rs @@ -24,6 +24,7 @@ pub mod benchmarking; mod mock; #[cfg(test)] mod tests; +mod transfer_assets_validation; pub mod migration; #[cfg(any(test, feature = "test-utils"))] @@ -1482,6 +1483,16 @@ pub mod pallet { let (fees_transfer_type, assets_transfer_type) = Self::find_fee_and_assets_transfer_types(&assets, fee_asset_item, &dest)?; + // We check for network native asset reserve transfers in preparation for the Asset Hub + // Migration. This check will be removed after the migration and the determined + // reserve location adjusted accordingly. For more information, see https://github.com/paritytech/polkadot-sdk/issues/9054. + Self::ensure_network_asset_reserve_transfer_allowed( + &assets, + fee_asset_item, + &assets_transfer_type, + &fees_transfer_type, + )?; + Self::do_transfer_assets( origin, dest, diff --git a/polkadot/xcm/pallet-xcm/src/transfer_assets_validation.rs b/polkadot/xcm/pallet-xcm/src/transfer_assets_validation.rs new file mode 100644 index 0000000000000..75aa91508a539 --- /dev/null +++ b/polkadot/xcm/pallet-xcm/src/transfer_assets_validation.rs @@ -0,0 +1,163 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Polkadot. + +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . + +//! Validation of the `transfer_assets` call. +//! This validation is a temporary patch in preparation for the Asset Hub Migration (AHM). +//! This module will be removed after the migration and the determined +//! reserve location will be adjusted accordingly to be Asset Hub. +//! For more information, see . + +use crate::{Config, Error, Pallet}; +use alloc::vec::Vec; +use hex_literal::hex; +use sp_core::Get; +use xcm::prelude::*; +use xcm_executor::traits::TransferType; + +/// The genesis hash of the Paseo Relay Chain. Used to identify it. +const PASEO_GENESIS_HASH: [u8; 32] = + hex!["77afd6190f1554ad45fd0d31aee62aacc33c6db0ea801129acb813f913e0764f"]; + +impl Pallet { + /// Check if network native asset reserve transfers should be blocked during Asset Hub + /// Migration. + /// + /// During the Asset Hub Migration (AHM), the native network asset's reserve will move + /// from the Relay Chain to Asset Hub. The `transfer_assets` function automatically determines + /// reserves based on asset ID location, which would incorrectly assume Relay Chain as the + /// reserve. + /// + /// This function blocks native network asset reserve transfers to prevent issues during + /// the migration. + /// Users should use `limited_reserve_transfer_assets`, `transfer_assets_using_type_and_then` or + /// `execute` instead, which allows explicit reserve specification. + pub(crate) fn ensure_network_asset_reserve_transfer_allowed( + assets: &Vec, + fee_asset_index: usize, + assets_transfer_type: &TransferType, + fees_transfer_type: &TransferType, + ) -> Result<(), Error> { + // Extract fee asset and check both assets and fees separately. + let mut remaining_assets = assets.clone(); + if fee_asset_index >= remaining_assets.len() { + return Err(Error::::Empty); + } + let fee_asset = remaining_assets.remove(fee_asset_index); + + // Check remaining assets with their transfer type. + Self::ensure_one_transfer_type_allowed(&remaining_assets, &assets_transfer_type)?; + + // Check fee asset with its transfer type. + Self::ensure_one_transfer_type_allowed(&[fee_asset], &fees_transfer_type)?; + + Ok(()) + } + + /// Checks that the transfer of `assets` is allowed. + /// + /// Returns an error if `transfer_type` is a reserve transfer and the network's native asset is + /// being transferred. Allows the transfer otherwise. + fn ensure_one_transfer_type_allowed( + assets: &[Asset], + transfer_type: &TransferType, + ) -> Result<(), Error> { + // Check if any reserve transfer (LocalReserve, DestinationReserve, or RemoteReserve) + // is being attempted. + let is_reserve_transfer = matches!( + transfer_type, + TransferType::LocalReserve | + TransferType::DestinationReserve | + TransferType::RemoteReserve(_) + ); + + if !is_reserve_transfer { + // If not a reserve transfer (e.g., teleport), allow it. + return Ok(()); + } + + // Check if any asset is a network native asset. + for asset in assets { + if Self::is_network_native_asset(&asset.id) { + tracing::debug!( + target: "xcm::pallet_xcm::transfer_assets", + asset_id = ?asset.id, ?transfer_type, + "Network native asset reserve transfer blocked during Asset Hub Migration. Use `limited_reserve_transfer_assets` instead." + ); + // It's error-prone to try to determine the reserve in this circumstances. + return Err(Error::::InvalidAssetUnknownReserve); + } + } + + Ok(()) + } + + /// Check if the given asset ID represents a network native asset based on our + /// UniversalLocation. + /// + /// Returns true if the asset is a native network asset (DOT, KSM, WND, PAS) that should be + /// blocked during Asset Hub Migration. + fn is_network_native_asset(asset_id: &AssetId) -> bool { + let universal_location = T::UniversalLocation::get(); + let asset_location = &asset_id.0; + + match universal_location.len() { + // Case 1: We are on the Relay Chain itself. + // UniversalLocation: GlobalConsensus(Network). + // Network asset ID: Here. + 1 => { + if let Some(Junction::GlobalConsensus(network)) = universal_location.first() { + let is_target_network = match network { + NetworkId::Polkadot | NetworkId::Kusama => true, + NetworkId::ByGenesis(genesis_hash) => { + // Check if this is Westend by genesis hash + *genesis_hash == xcm::v5::WESTEND_GENESIS_HASH || + *genesis_hash == PASEO_GENESIS_HASH || + *genesis_hash == xcm::v5::ROCOCO_GENESIS_HASH // Used in tests. + }, + _ => false, + }; + is_target_network && asset_location.is_here() + } else { + false + } + }, + // Case 2: We are on a parachain within one of the specified networks. + // UniversalLocation: GlobalConsensus(Network)/Parachain(id). + // Network asset ID: Parent. + 2 => { + if let (Some(Junction::GlobalConsensus(network)), Some(Junction::Parachain(_))) = + (universal_location.first(), universal_location.last()) + { + let is_target_network = match network { + NetworkId::Polkadot | NetworkId::Kusama => true, + NetworkId::ByGenesis(genesis_hash) => { + // Check if this is Westend by genesis hash + *genesis_hash == xcm::v5::WESTEND_GENESIS_HASH || + *genesis_hash == PASEO_GENESIS_HASH || + *genesis_hash == xcm::v5::ROCOCO_GENESIS_HASH // Used in tests. + }, + _ => false, + }; + is_target_network && *asset_location == Location::parent() + } else { + false + } + }, + // Case 3: We are not on a relay or parachain. We return false. + _ => false, + } + } +} diff --git a/prdoc/pr_9137.prdoc b/prdoc/pr_9137.prdoc new file mode 100644 index 0000000000000..c9d80bdb771c9 --- /dev/null +++ b/prdoc/pr_9137.prdoc @@ -0,0 +1,32 @@ +# Schema: Polkadot SDK PRDoc Schema (prdoc) v1.0.0 +# See doc at https://raw.githubusercontent.com/paritytech/polkadot-sdk/master/prdoc/schema_user.json + +title: Pallet XCM - transfer_assets pre-ahm patch + +doc: + - audience: Runtime User + description: | + Pallet XCM's `transfer_assets` extrinsic now returns an error when it determines that a + reserve transfer of DOT|KSM|WND|PAS has to be done. + This is a safeguard in preparation for the Asset Hub Migration (AHM), where the reserve + of DOT|KSM|WND|PAS will change from the Relay Chain to Asset Hub. + After the migration, another patch will remove this error case and use the correct reserve. + `limited_reserve_transfer_assets`, `transfer_assets_using_type_and_then` or `execute` should + be used instead, since they provide the ability to specify the reserve you want to use. + - audience: Runtime Dev + description: | + Pallet XCM's `transfer_assets` extrinsic now returns an error when it determines that a + reserve transfer of DOT|KSM|WND|PAS has to be done. + This is a safeguard in preparation for the Asset Hub Migration (AHM), where the reserve + of DOT|KSM|WND|PAS will change from the Relay Chain to Asset Hub. + After the migration, another patch will remove this error case and use the correct reserve. + The pallet uses the `UniversalLocation` configuration to figure out the correct asset + being transferred. It's very important to have that configuration correct. + +crates: + - name: pallet-xcm + bump: minor + - name: emulated-integration-tests-common + bump: minor + - name: xcm-docs + bump: patch From 158076b2af45e13c7e73eef3bcc09e40d9292ef1 Mon Sep 17 00:00:00 2001 From: "paritytech-release-backport-bot[bot]" <191369287+paritytech-release-backport-bot[bot]@users.noreply.github.com> Date: Wed, 16 Jul 2025 08:57:47 +0000 Subject: [PATCH 040/128] [stable2506] Backport #9202 (#9210) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Backport #9202 into `stable2506` from bkchr. See the [documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md) on how to use this bot. Co-authored-by: Bastian Köcher Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Branislav Kontur Co-authored-by: Adrian Catangiu --- polkadot/runtime/parachains/src/paras/mod.rs | 14 +++++--------- prdoc/pr_9202.prdoc | 8 ++++++++ 2 files changed, 13 insertions(+), 9 deletions(-) create mode 100644 prdoc/pr_9202.prdoc diff --git a/polkadot/runtime/parachains/src/paras/mod.rs b/polkadot/runtime/parachains/src/paras/mod.rs index 3caf5c8ab01ab..a7b8ee669e229 100644 --- a/polkadot/runtime/parachains/src/paras/mod.rs +++ b/polkadot/runtime/parachains/src/paras/mod.rs @@ -118,7 +118,6 @@ use bitvec::{order::Lsb0 as BitOrderLsb0, vec::BitVec}; use codec::{Decode, Encode}; use core::{cmp, mem}; use frame_support::{ - dispatch::PostDispatchInfo, pallet_prelude::*, traits::{EnsureOriginWithArg, EstimateNextSessionRotation}, DefaultNoBound, @@ -705,7 +704,10 @@ pub mod pallet { /// cooldown multiplied with this multiplier determines the cost. type CooldownRemovalMultiplier: Get>; - /// The origin that can authorize `force_set_current_code_hash`. + /// The origin that can authorize [`Pallet::authorize_force_set_current_code_hash`]. + /// + /// In the end this allows [`Pallet::apply_authorized_force_set_current_code`] to force set + /// the current code without paying any fee. So, the origin should be chosen with care. type AuthorizeCurrentCodeOrigin: EnsureOriginWithArg; } @@ -1332,13 +1334,7 @@ pub mod pallet { // apply/dispatch Self::do_force_set_current_code_update(para, new_code); - // if ok, then allows "for free" - Ok(PostDispatchInfo { - // consume the rest of the block to prevent further transactions - actual_weight: Some(T::BlockWeights::get().max_block), - // no fee for valid upgrade - pays_fee: Pays::No, - }) + Ok(Pays::No.into()) } } diff --git a/prdoc/pr_9202.prdoc b/prdoc/pr_9202.prdoc new file mode 100644 index 0000000000000..ed365ac81f24a --- /dev/null +++ b/prdoc/pr_9202.prdoc @@ -0,0 +1,8 @@ +title: '`apply_authorized_force_set_current_code` does not need to consume the whole block' +doc: +- audience: Runtime User + description: |- + There is no need that this dispatchable consumes the full block as this is just writing the given value to storage. On a chain this is done, because the runtime changes and thus, a lot of stuff potentially changes. In the case of upgrading the parachain code on the relay chain, the relay chain runtime itself does not change. +crates: +- name: polkadot-runtime-parachains + bump: patch From 861c780ff590d5d25642053fc07264c9bf65622d Mon Sep 17 00:00:00 2001 From: "paritytech-release-backport-bot[bot]" <191369287+paritytech-release-backport-bot[bot]@users.noreply.github.com> Date: Thu, 17 Jul 2025 14:45:36 +0200 Subject: [PATCH 041/128] [stable2506] Backport #8891 (#9232) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Backport #8891 into `stable2506` from bkchr. See the [documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md) on how to use this bot. Co-authored-by: Bastian Köcher Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- prdoc/pr_8891.prdoc | 11 ++++ .../primitives/io/src/global_alloc_wasm.rs | 57 ++++++++++++++++++- 2 files changed, 65 insertions(+), 3 deletions(-) create mode 100644 prdoc/pr_8891.prdoc diff --git a/prdoc/pr_8891.prdoc b/prdoc/pr_8891.prdoc new file mode 100644 index 0000000000000..8aa8ed54bb1e7 --- /dev/null +++ b/prdoc/pr_8891.prdoc @@ -0,0 +1,11 @@ +title: 'RuntimeAllocator: Align returned pointers' +doc: +- audience: Runtime Dev + description: |- + Rust recently switched the default alignment of u128 to 16bytes: https://blog.rust-lang.org/2024/03/30/i128-layout-update/ This broke the assumption of our host allocator that the biggest alignment is 8 bytes. + + To fix the alignment issue, the runtime allocator now takes care of aligned the returned pointer. We are abusing the fact that we know how the host allocator is working and storing some extra data in its header. This is not a perfect solution as we don't align the host side pointers, but the host side is mainly allocating `u8` arrays that should be fine with the `8byte` alignment. Any node side change would be a consensus breaking change. + +crates: +- name: sp-io + bump: patch diff --git a/substrate/primitives/io/src/global_alloc_wasm.rs b/substrate/primitives/io/src/global_alloc_wasm.rs index cf19a6e21a2d2..b456e5ce333cc 100644 --- a/substrate/primitives/io/src/global_alloc_wasm.rs +++ b/substrate/primitives/io/src/global_alloc_wasm.rs @@ -15,9 +15,34 @@ // See the License for the specific language governing permissions and // limitations under the License. -use core::alloc::{GlobalAlloc, Layout}; +use core::{ + alloc::{GlobalAlloc, Layout}, + ptr, +}; + +/// The type used to store the offset between the real pointer and the returned pointer. +type Offset = u16; + +/// The length of [`Offset`]. +const OFFSET_LENGTH: usize = core::mem::size_of::(); /// Allocator used by Substrate from within the runtime. +/// +/// The allocator needs to align the returned pointer to given layout. We assume that on the host +/// side the freeing-bump allocator is used with a fixed alignment of `8` and a `HEADER_SIZE` of +/// `8`. The freeing-bump allocator is storing the header in the 8 bytes before the actual pointer +/// returned by `alloc`. The problem is that the runtime not only sees pointers allocated by this +/// `RuntimeAllocator`, but also pointers allocated by the host. The header is stored as a +/// little-endian `u64`. The allocation header consists of 8 bytes. The first four bytes (as written +/// in memory) are used to store the order of the allocation (or the link to the next slot, if +/// unallocated). Then the least significant bit of the next byte determines whether a given slot is +/// occupied or free, and the last three bytes are unused. +/// +/// The `RuntimeAllocator` aligns the pointer to the required alignment before returning it to the +/// user code. As we are assuming the freeing-bump allocator that already aligns by `8` by default, +/// we only need to take care of alignments above `8`. The offset is stored in two bytes before the +/// pointer that we return to the user. Depending on the alignment, we may write into the header, +/// but given the assumptions above this should be no problem. struct RuntimeAllocator; #[global_allocator] @@ -25,10 +50,36 @@ static ALLOCATOR: RuntimeAllocator = RuntimeAllocator; unsafe impl GlobalAlloc for RuntimeAllocator { unsafe fn alloc(&self, layout: Layout) -> *mut u8 { - crate::allocator::malloc(layout.size() as u32) + let align = layout.align(); + let size = layout.size(); + + // Allocate for the required size, plus a potential alignment. + // + // As the host side already aligns the pointer by `8`, we only need to account for any + // excess. + let ptr = crate::allocator::malloc((size + align.saturating_sub(8)) as u32); + + // Calculate the required alignment. + let ptr_offset = ptr.align_offset(align); + + // Should never happen, but just to be sure. + if ptr_offset > u16::MAX as usize || ptr.is_null() { + return ptr::null_mut() + } + + // Align the pointer. + let ptr = ptr.add(ptr_offset); + + unsafe { + (ptr.sub(OFFSET_LENGTH) as *mut Offset).write_unaligned(ptr_offset as Offset); + } + + ptr } unsafe fn dealloc(&self, ptr: *mut u8, _: Layout) { - crate::allocator::free(ptr) + let offset = unsafe { (ptr.sub(OFFSET_LENGTH) as *const Offset).read_unaligned() }; + + crate::allocator::free(ptr.sub(offset as usize)) } } From 21afdb7659a9d0debb66701aa4a65e5b26111327 Mon Sep 17 00:00:00 2001 From: "paritytech-release-backport-bot[bot]" <191369287+paritytech-release-backport-bot[bot]@users.noreply.github.com> Date: Mon, 21 Jul 2025 14:58:19 +0200 Subject: [PATCH 042/128] [stable2506] Backport #9264 (#9276) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Backport #9264 into `stable2506` from alexggh. See the [documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md) on how to use this bot. Signed-off-by: Alexandru Gheorghe Co-authored-by: Alexandru Gheorghe <49718502+alexggh@users.noreply.github.com> Co-authored-by: Bastian Köcher Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .../node/network/gossip-support/src/lib.rs | 18 +++++++++------- prdoc/pr_9264.prdoc | 21 +++++++++++++++++++ 2 files changed, 32 insertions(+), 7 deletions(-) create mode 100644 prdoc/pr_9264.prdoc diff --git a/polkadot/node/network/gossip-support/src/lib.rs b/polkadot/node/network/gossip-support/src/lib.rs index 48ca61f4cd22a..5ab3a435822c3 100644 --- a/polkadot/node/network/gossip-support/src/lib.rs +++ b/polkadot/node/network/gossip-support/src/lib.rs @@ -90,13 +90,15 @@ const TRY_RERESOLVE_AUTHORITIES: Duration = Duration::from_secs(2); const LOW_CONNECTIVITY_WARN_DELAY: Duration = Duration::from_secs(600); /// If connectivity is lower than this in percent, issue warning in logs. -const LOW_CONNECTIVITY_WARN_THRESHOLD: usize = 90; +const LOW_CONNECTIVITY_WARN_THRESHOLD: usize = 85; /// The Gossip Support subsystem. pub struct GossipSupport { keystore: KeystorePtr, last_session_index: Option, + /// Whether we are currently an authority or not. + is_authority_now: bool, /// The minimum known session we build the topology for. min_known_session: SessionIndex, // Some(timestamp) if we failed to resolve @@ -163,6 +165,7 @@ where min_known_session: u32::MAX, authority_discovery, finalized_needed_session: None, + is_authority_now: false, metrics, } } @@ -282,6 +285,9 @@ where "New session detected", ); self.last_session_index = Some(session_index); + self.is_authority_now = + ensure_i_am_an_authority(&self.keystore, &session_info.discovery_keys) + .is_ok(); } // Connect to authorities from the past/present/future. @@ -705,13 +711,11 @@ where .resolved_authorities .iter() .filter(|(a, _)| !self.connected_authorities.contains_key(a)); - // TODO: Make that warning once connectivity issues are fixed (no point in warning, if - // we already know it is broken. - // https://github.com/paritytech/polkadot/issues/3921 - if connected_ratio <= LOW_CONNECTIVITY_WARN_THRESHOLD { - gum::debug!( + if connected_ratio <= LOW_CONNECTIVITY_WARN_THRESHOLD && self.is_authority_now { + gum::error!( target: LOG_TARGET, - "Connectivity seems low, we are only connected to {}% of available validators (see debug logs for details)", connected_ratio + session_index = self.last_session_index.as_ref().map(|s| *s).unwrap_or_default(), + "Connectivity seems low, we are only connected to {connected_ratio}% of available validators (see debug logs for details), if this persists more than a session action needs to be taken" ); } let pretty = PrettyAuthorities(unconnected_authorities); diff --git a/prdoc/pr_9264.prdoc b/prdoc/pr_9264.prdoc new file mode 100644 index 0000000000000..7e28fd6dbf9da --- /dev/null +++ b/prdoc/pr_9264.prdoc @@ -0,0 +1,21 @@ +title: 'gossip-support: make low connectivity message an error' +doc: +- audience: Node Dev + description: |- + All is not well when a validator is not properly connected, e.g: of things that might happen: + - Finality might be slightly delay because validator will be no-show because they can't retrieve PoVs to validate approval work: https://github.com/paritytech/polkadot-sdk/issues/8915. + - When they author blocks they won't back things because gossiping of backing statements happen using the grid topology:, e.g blocks authored by validators with a low number of peers: + https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc-polkadot.helixstreet.io#/explorer/query/26931262 + https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc-polkadot.helixstreet.io#/explorer/query/26931260 + https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fpolkadot.api.onfinality.io%2Fpublic-ws#/explorer/query/26931334 + https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fpolkadot-public-rpc.blockops.network%2Fws#/explorer/query/26931314 + https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fpolkadot-public-rpc.blockops.network%2Fws#/explorer/query/26931292 + https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fpolkadot-public-rpc.blockops.network%2Fws#/explorer/query/26931447 + + + The problem is seen in `polkadot_parachain_peer_count` metrics, but it seems people are not monitoring that well enough, so let's make it more visible nodes with low connectivity are not working in good conditions. + + I also reduced the threshold to 85%, so that we don't trigger this error to eagerly. +crates: +- name: polkadot-gossip-support + bump: patch From 6fd693e6d9cfa46cd2acbcb41cd5b0451a62d67c Mon Sep 17 00:00:00 2001 From: Egor_P Date: Thu, 24 Jul 2025 08:33:01 +0200 Subject: [PATCH 043/128] [stable2506] Post crates release updates (#9218) This PR's merges back to the branch stable2506 crates versions, spec_version, node version bumps and prdocs reordering --------- Co-authored-by: Francisco Aguirre Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/workflows/check-semver.yml | 14 +- .github/workflows/release-srtool.yml | 1 + Cargo.lock | 4808 +++++++++-------- Plan.toml | 4208 +++++++++++++++ bridges/bin/runtime-common/Cargo.toml | 56 +- bridges/chains/chain-cumulus/Cargo.toml | 25 +- .../chains/chain-polkadot-bulletin/Cargo.toml | 24 +- bridges/modules/beefy/Cargo.toml | 28 +- bridges/modules/grandpa/Cargo.toml | 28 +- bridges/modules/messages/Cargo.toml | 34 +- bridges/modules/parachains/Cargo.toml | 34 +- bridges/modules/relayers/Cargo.toml | 50 +- .../modules/xcm-bridge-hub-router/Cargo.toml | 30 +- bridges/modules/xcm-bridge-hub/Cargo.toml | 46 +- bridges/primitives/beefy/Cargo.toml | 20 +- bridges/primitives/header-chain/Cargo.toml | 14 +- bridges/primitives/messages/Cargo.toml | 20 +- bridges/primitives/parachains/Cargo.toml | 20 +- bridges/primitives/polkadot-core/Cargo.toml | 20 +- bridges/primitives/relayers/Cargo.toml | 24 +- bridges/primitives/runtime/Cargo.toml | 18 +- bridges/primitives/test-utils/Cargo.toml | 20 +- .../xcm-bridge-hub-router/Cargo.toml | 12 +- bridges/primitives/xcm-bridge-hub/Cargo.toml | 22 +- bridges/relays/client-substrate/Cargo.toml | 67 +- bridges/relays/equivocation/Cargo.toml | 7 +- bridges/relays/finality/Cargo.toml | 5 +- bridges/relays/lib-substrate-relay/Cargo.toml | 69 +- bridges/relays/messages/Cargo.toml | 15 +- bridges/relays/parachains/Cargo.toml | 11 +- bridges/relays/utils/Cargo.toml | 16 +- .../pallets/ethereum-client/Cargo.toml | 34 +- .../ethereum-client/fixtures/Cargo.toml | 10 +- .../pallets/inbound-queue-v2/Cargo.toml | 42 +- .../inbound-queue-v2/fixtures/Cargo.toml | 12 +- .../pallets/inbound-queue/Cargo.toml | 37 +- .../pallets/inbound-queue/fixtures/Cargo.toml | 12 +- .../pallets/outbound-queue-v2/Cargo.toml | 44 +- .../outbound-queue-v2/runtime-api/Cargo.toml | 10 +- .../pallets/outbound-queue/Cargo.toml | 30 +- .../outbound-queue/runtime-api/Cargo.toml | 14 +- .../pallets/system-frontend/Cargo.toml | 26 +- .../snowbridge/pallets/system-v2/Cargo.toml | 31 +- .../pallets/system-v2/runtime-api/Cargo.toml | 10 +- bridges/snowbridge/pallets/system/Cargo.toml | 33 +- .../pallets/system/runtime-api/Cargo.toml | 10 +- .../snowbridge/primitives/beacon/Cargo.toml | 15 +- bridges/snowbridge/primitives/core/Cargo.toml | 29 +- .../snowbridge/primitives/ethereum/Cargo.toml | 9 +- .../primitives/inbound-queue/Cargo.toml | 29 +- .../primitives/merkle-tree/Cargo.toml | 10 +- .../primitives/outbound-queue/Cargo.toml | 31 +- .../primitives/verification/Cargo.toml | 10 +- .../runtime/runtime-common/Cargo.toml | 22 +- .../snowbridge/runtime/test-common/Cargo.toml | 57 +- bridges/snowbridge/test-utils/Cargo.toml | 35 +- cumulus/bin/pov-validator/Cargo.toml | 16 +- cumulus/client/bootnodes/Cargo.toml | 32 +- cumulus/client/cli/Cargo.toml | 25 +- cumulus/client/collator/Cargo.toml | 52 +- cumulus/client/consensus/aura/Cargo.toml | 115 +- cumulus/client/consensus/common/Cargo.toml | 68 +- cumulus/client/consensus/proposer/Cargo.toml | 21 +- .../client/consensus/relay-chain/Cargo.toml | 42 +- cumulus/client/network/Cargo.toml | 64 +- cumulus/client/parachain-inherent/Cargo.toml | 39 +- cumulus/client/pov-recovery/Cargo.toml | 59 +- .../Cargo.toml | 60 +- .../client/relay-chain-interface/Cargo.toml | 27 +- .../relay-chain-minimal-node/Cargo.toml | 80 +- .../relay-chain-rpc-interface/Cargo.toml | 49 +- cumulus/client/relay-chain-streams/Cargo.toml | 23 +- cumulus/client/service/Cargo.toml | 98 +- cumulus/pallets/aura-ext/Cargo.toml | 34 +- cumulus/pallets/collator-selection/Cargo.toml | 32 +- cumulus/pallets/dmp-queue/Cargo.toml | 25 +- cumulus/pallets/parachain-system/Cargo.toml | 65 +- .../pallets/session-benchmarking/Cargo.toml | 10 +- cumulus/pallets/solo-to-para/Cargo.toml | 20 +- cumulus/pallets/weight-reclaim/Cargo.toml | 18 +- cumulus/pallets/xcm/Cargo.toml | 17 +- cumulus/pallets/xcmp-queue/Cargo.toml | 44 +- cumulus/parachains/common/Cargo.toml | 46 +- .../assets/asset-hub-rococo/Cargo.toml | 34 +- .../assets/asset-hub-westend/Cargo.toml | 34 +- .../bridges/bridge-hub-rococo/Cargo.toml | 29 +- .../bridges/bridge-hub-westend/Cargo.toml | 29 +- .../collectives-westend/Cargo.toml | 18 +- .../coretime/coretime-rococo/Cargo.toml | 17 +- .../coretime/coretime-westend/Cargo.toml | 17 +- .../people/people-rococo/Cargo.toml | 16 +- .../people/people-westend/Cargo.toml | 16 +- .../parachains/testing/penpal/Cargo.toml | 24 +- .../emulated/chains/relays/rococo/Cargo.toml | 31 +- .../emulated/chains/relays/westend/Cargo.toml | 33 +- .../emulated/common/Cargo.toml | 105 +- .../networks/rococo-system/Cargo.toml | 17 +- .../networks/rococo-westend-system/Cargo.toml | 20 +- .../networks/westend-system/Cargo.toml | 19 +- .../tests/assets/asset-hub-rococo/Cargo.toml | 53 +- .../tests/assets/asset-hub-westend/Cargo.toml | 53 +- .../bridges/bridge-hub-rococo/Cargo.toml | 61 +- .../bridges/bridge-hub-westend/Cargo.toml | 78 +- .../collectives-westend/Cargo.toml | 42 +- .../tests/coretime/coretime-rococo/Cargo.toml | 33 +- .../coretime/coretime-westend/Cargo.toml | 35 +- .../tests/governance/westend/Cargo.toml | 40 +- .../tests/people/people-rococo/Cargo.toml | 25 +- .../tests/people/people-westend/Cargo.toml | 34 +- .../pallets/collective-content/Cargo.toml | 16 +- .../pallets/parachain-info/Cargo.toml | 13 +- cumulus/parachains/pallets/ping/Cargo.toml | 17 +- .../assets/asset-hub-rococo/Cargo.toml | 152 +- .../bridge-primitives/Cargo.toml | 24 +- .../assets/asset-hub-rococo/src/lib.rs | 2 +- .../assets/asset-hub-westend/Cargo.toml | 170 +- .../bridge-primitives/Cargo.toml | 24 +- .../assets/asset-hub-westend/src/lib.rs | 2 +- .../runtimes/assets/common/Cargo.toml | 40 +- .../runtimes/assets/test-utils/Cargo.toml | 54 +- .../bridge-hubs/bridge-hub-rococo/Cargo.toml | 197 +- .../bridge-primitives/Cargo.toml | 22 +- .../bridge-hubs/bridge-hub-rococo/src/lib.rs | 2 +- .../bridge-hubs/bridge-hub-westend/Cargo.toml | 207 +- .../bridge-primitives/Cargo.toml | 22 +- .../bridge-hubs/bridge-hub-westend/src/lib.rs | 2 +- .../runtimes/bridge-hubs/common/Cargo.toml | 22 +- .../bridge-hubs/test-utils/Cargo.toml | 75 +- .../collectives-westend/Cargo.toml | 145 +- .../collectives-westend/src/lib.rs | 2 +- .../parachains/runtimes/constants/Cargo.toml | 20 +- .../coretime/coretime-rococo/Cargo.toml | 120 +- .../coretime/coretime-rococo/src/lib.rs | 2 +- .../coretime/coretime-westend/Cargo.toml | 121 +- .../coretime/coretime-westend/src/lib.rs | 2 +- .../glutton/glutton-westend/Cargo.toml | 79 +- .../glutton/glutton-westend/src/lib.rs | 2 +- .../runtimes/people/people-rococo/Cargo.toml | 118 +- .../runtimes/people/people-rococo/src/lib.rs | 2 +- .../runtimes/people/people-westend/Cargo.toml | 120 +- .../runtimes/people/people-westend/src/lib.rs | 2 +- .../parachains/runtimes/test-utils/Cargo.toml | 55 +- .../runtimes/testing/penpal/Cargo.toml | 112 +- .../testing/rococo-parachain/Cargo.toml | 92 +- .../testing/yet-another-parachain/Cargo.toml | 92 +- cumulus/polkadot-omni-node/Cargo.toml | 9 +- cumulus/polkadot-omni-node/lib/Cargo.toml | 201 +- cumulus/polkadot-parachain/Cargo.toml | 77 +- cumulus/primitives/aura/Cargo.toml | 7 +- cumulus/primitives/core/Cargo.toml | 20 +- .../primitives/parachain-inherent/Cargo.toml | 16 +- .../proof-size-hostfunction/Cargo.toml | 14 +- .../storage-weight-reclaim/Cargo.toml | 23 +- cumulus/primitives/timestamp/Cargo.toml | 11 +- cumulus/primitives/utility/Cargo.toml | 24 +- cumulus/test/client/Cargo.toml | 93 +- cumulus/test/relay-sproof-builder/Cargo.toml | 18 +- cumulus/test/runtime/Cargo.toml | 68 +- cumulus/test/service/Cargo.toml | 171 +- cumulus/xcm/xcm-emulator/Cargo.toml | 74 +- .../zombienet-sdk-helpers/Cargo.toml | 6 +- cumulus/zombienet/zombienet-sdk/Cargo.toml | 14 +- docs/sdk/Cargo.toml | 245 +- .../packages/guides/first-pallet/Cargo.toml | 2 +- .../packages/guides/first-runtime/Cargo.toml | 26 +- .../chain_spec_runtime/Cargo.toml | 18 +- polkadot/Cargo.toml | 30 +- polkadot/cli/Cargo.toml | 34 +- polkadot/core-primitives/Cargo.toml | 6 +- polkadot/erasure-coding/Cargo.toml | 14 +- polkadot/erasure-coding/fuzzer/Cargo.toml | 9 +- polkadot/node/collation-generation/Cargo.toml | 27 +- .../core/approval-voting-parallel/Cargo.toml | 49 +- polkadot/node/core/approval-voting/Cargo.toml | 41 +- polkadot/node/core/av-store/Cargo.toml | 30 +- polkadot/node/core/backing/Cargo.toml | 41 +- .../node/core/bitfield-signing/Cargo.toml | 17 +- .../node/core/candidate-validation/Cargo.toml | 42 +- polkadot/node/core/chain-api/Cargo.toml | 28 +- polkadot/node/core/chain-selection/Cargo.toml | 19 +- .../node/core/dispute-coordinator/Cargo.toml | 34 +- .../node/core/parachains-inherent/Cargo.toml | 20 +- .../core/prospective-parachains/Cargo.toml | 21 +- polkadot/node/core/provisioner/Cargo.toml | 23 +- polkadot/node/core/pvf-checker/Cargo.toml | 29 +- polkadot/node/core/pvf/Cargo.toml | 34 +- polkadot/node/core/pvf/common/Cargo.toml | 38 +- .../node/core/pvf/execute-worker/Cargo.toml | 22 +- .../node/core/pvf/prepare-worker/Cargo.toml | 21 +- polkadot/node/core/runtime-api/Cargo.toml | 30 +- polkadot/node/gum/Cargo.toml | 5 +- polkadot/node/malus/Cargo.toml | 43 +- polkadot/node/metrics/Cargo.toml | 22 +- .../network/approval-distribution/Cargo.toml | 33 +- .../availability-distribution/Cargo.toml | 37 +- .../network/availability-recovery/Cargo.toml | 34 +- .../network/bitfield-distribution/Cargo.toml | 29 +- polkadot/node/network/bridge/Cargo.toml | 32 +- .../node/network/collator-protocol/Cargo.toml | 40 +- .../network/dispute-distribution/Cargo.toml | 35 +- .../node/network/gossip-support/Cargo.toml | 41 +- polkadot/node/network/protocol/Cargo.toml | 23 +- .../network/statement-distribution/Cargo.toml | 39 +- polkadot/node/overseer/Cargo.toml | 28 +- polkadot/node/primitives/Cargo.toml | 23 +- polkadot/node/service/Cargo.toml | 222 +- polkadot/node/subsystem-bench/Cargo.toml | 90 +- .../node/subsystem-test-helpers/Cargo.toml | 37 +- polkadot/node/subsystem-types/Cargo.toml | 44 +- polkadot/node/subsystem-util/Cargo.toml | 42 +- polkadot/node/subsystem/Cargo.toml | 8 +- polkadot/node/test/client/Cargo.toml | 54 +- polkadot/node/test/service/Cargo.toml | 99 +- .../node/zombienet-backchannel/Cargo.toml | 3 +- polkadot/parachain/Cargo.toml | 6 +- .../test-parachains/adder/Cargo.toml | 9 +- .../test-parachains/adder/collator/Cargo.toml | 33 +- .../parachain/test-parachains/halt/Cargo.toml | 5 +- .../test-parachains/undying/Cargo.toml | 10 +- .../undying/collator/Cargo.toml | 39 +- polkadot/primitives/Cargo.toml | 20 +- polkadot/primitives/test-helpers/Cargo.toml | 10 +- polkadot/rpc/Cargo.toml | 77 +- polkadot/runtime/common/Cargo.toml | 74 +- .../common/slot_range_helper/Cargo.toml | 4 +- polkadot/runtime/metrics/Cargo.toml | 6 +- polkadot/runtime/parachains/Cargo.toml | 72 +- polkadot/runtime/rococo/Cargo.toml | 179 +- .../rococo/bridge-primitives/Cargo.toml | 17 +- polkadot/runtime/rococo/constants/Cargo.toml | 20 +- polkadot/runtime/rococo/src/lib.rs | 2 +- polkadot/runtime/test-runtime/Cargo.toml | 95 +- .../runtime/test-runtime/constants/Cargo.toml | 7 +- polkadot/runtime/westend/Cargo.toml | 194 +- .../westend/bridge-primitives/Cargo.toml | 17 +- polkadot/runtime/westend/constants/Cargo.toml | 20 +- polkadot/runtime/westend/src/lib.rs | 2 +- polkadot/statement-table/Cargo.toml | 8 +- polkadot/utils/generate-bags/Cargo.toml | 9 +- .../remote-ext-tests/bags-list/Cargo.toml | 17 +- polkadot/xcm/Cargo.toml | 11 +- polkadot/xcm/docs/Cargo.toml | 33 +- polkadot/xcm/pallet-xcm-benchmarks/Cargo.toml | 24 +- polkadot/xcm/pallet-xcm/Cargo.toml | 48 +- polkadot/xcm/procedural/Cargo.toml | 6 +- polkadot/xcm/xcm-builder/Cargo.toml | 44 +- polkadot/xcm/xcm-executor/Cargo.toml | 16 +- .../xcm-executor/integration-tests/Cargo.toml | 42 +- polkadot/xcm/xcm-runtime-apis/Cargo.toml | 31 +- polkadot/xcm/xcm-simulator/Cargo.toml | 37 +- polkadot/xcm/xcm-simulator/example/Cargo.toml | 54 +- polkadot/xcm/xcm-simulator/fuzzer/Cargo.toml | 53 +- polkadot/zombienet-sdk-tests/Cargo.toml | 8 +- .../pr_8461.prdoc | 0 .../pr_8473.prdoc | 0 .../pr_8630.prdoc | 0 .../pr_8650.prdoc | 0 .../pr_8669.prdoc | 0 prdoc/stable2503-7/pr_6827.prdoc | 17 + prdoc/stable2503-7/pr_8345.prdoc | 26 + prdoc/stable2503-7/pr_8725.prdoc | 15 + prdoc/stable2503-7/pr_8787.prdoc | 13 + prdoc/stable2503-7/pr_8831.prdoc | 12 + prdoc/stable2503-7/pr_8832.prdoc | 10 + prdoc/stable2503-7/pr_8834.prdoc | 15 + prdoc/stable2503-7/pr_8837.prdoc | 14 + prdoc/stable2503-7/pr_8932.prdoc | 11 + prdoc/stable2503-7/pr_8948.prdoc | 16 + prdoc/stable2503-7/pr_8973.prdoc | 9 + prdoc/stable2503-7/pr_8980.prdoc | 8 + prdoc/stable2503-7/pr_9050.prdoc | 10 + prdoc/{ => stable2503-7}/pr_9102.prdoc | 0 prdoc/stable2506/pr_8839.prdoc | 2 +- prdoc/{ => stable2506}/pr_8860.prdoc | 0 prdoc/{ => stable2506}/pr_8891.prdoc | 0 prdoc/{ => stable2506}/pr_9094.prdoc | 0 prdoc/stable2506/pr_9102.prdoc | 12 + prdoc/{ => stable2506}/pr_9127.prdoc | 0 prdoc/{ => stable2506}/pr_9137.prdoc | 0 prdoc/{ => stable2506}/pr_9139.prdoc | 0 prdoc/{ => stable2506}/pr_9202.prdoc | 0 prdoc/{ => stable2506}/pr_9264.prdoc | 0 .../delete-versions-if-path-is-present.sh | 0 substrate/bin/node/bench/Cargo.toml | 44 +- substrate/bin/node/cli/Cargo.toml | 110 +- substrate/bin/node/inspect/Cargo.toml | 24 +- substrate/bin/node/primitives/Cargo.toml | 4 +- substrate/bin/node/rpc/Cargo.toml | 83 +- substrate/bin/node/runtime/Cargo.toml | 15 +- substrate/bin/node/testing/Cargo.toml | 67 +- .../bin/utils/chain-spec-builder/Cargo.toml | 5 +- substrate/bin/utils/subkey/Cargo.toml | 5 +- substrate/client/allocator/Cargo.toml | 8 +- substrate/client/api/Cargo.toml | 42 +- .../client/authority-discovery/Cargo.toml | 34 +- substrate/client/basic-authorship/Cargo.toml | 39 +- substrate/client/block-builder/Cargo.toml | 25 +- substrate/client/chain-spec/Cargo.toml | 46 +- substrate/client/chain-spec/derive/Cargo.toml | 2 +- substrate/client/cli/Cargo.toml | 55 +- substrate/client/consensus/aura/Cargo.toml | 63 +- substrate/client/consensus/babe/Cargo.toml | 70 +- .../client/consensus/babe/rpc/Cargo.toml | 41 +- substrate/client/consensus/beefy/Cargo.toml | 59 +- .../client/consensus/beefy/rpc/Cargo.toml | 22 +- substrate/client/consensus/common/Cargo.toml | 29 +- substrate/client/consensus/epochs/Cargo.toml | 17 +- substrate/client/consensus/grandpa/Cargo.toml | 80 +- .../client/consensus/grandpa/rpc/Cargo.toml | 30 +- .../client/consensus/manual-seal/Cargo.toml | 61 +- substrate/client/consensus/pow/Cargo.toml | 35 +- substrate/client/consensus/slots/Cargo.toml | 35 +- substrate/client/db/Cargo.toml | 34 +- substrate/client/executor/Cargo.toml | 55 +- substrate/client/executor/common/Cargo.toml | 11 +- substrate/client/executor/polkavm/Cargo.toml | 9 +- .../client/executor/runtime-test/Cargo.toml | 6 +- substrate/client/executor/wasmtime/Cargo.toml | 13 +- substrate/client/informant/Cargo.toml | 17 +- substrate/client/keystore/Cargo.toml | 11 +- .../client/merkle-mountain-range/Cargo.toml | 33 +- .../merkle-mountain-range/rpc/Cargo.toml | 17 +- substrate/client/mixnet/Cargo.toml | 32 +- substrate/client/network-gossip/Cargo.toml | 20 +- substrate/client/network/Cargo.toml | 37 +- substrate/client/network/common/Cargo.toml | 5 +- substrate/client/network/light/Cargo.toml | 20 +- substrate/client/network/statement/Cargo.toml | 26 +- substrate/client/network/sync/Cargo.toml | 48 +- substrate/client/network/test/Cargo.toml | 48 +- .../client/network/transactions/Cargo.toml | 26 +- substrate/client/network/types/Cargo.toml | 2 +- substrate/client/offchain/Cargo.toml | 45 +- substrate/client/proposer-metrics/Cargo.toml | 5 +- substrate/client/rpc-api/Cargo.toml | 23 +- substrate/client/rpc-servers/Cargo.toml | 7 +- substrate/client/rpc-spec-v2/Cargo.toml | 52 +- substrate/client/rpc/Cargo.toml | 66 +- substrate/client/runtime-utilities/Cargo.toml | 29 +- substrate/client/service/Cargo.toml | 112 +- substrate/client/service/test/Cargo.toml | 57 +- substrate/client/state-db/Cargo.toml | 5 +- substrate/client/statement-store/Cargo.toml | 28 +- substrate/client/storage-monitor/Cargo.toml | 5 +- substrate/client/sync-state-rpc/Cargo.toml | 23 +- substrate/client/sysinfo/Cargo.toml | 16 +- substrate/client/telemetry/Cargo.toml | 5 +- substrate/client/tracing/Cargo.toml | 26 +- .../client/tracing/proc-macro/Cargo.toml | 2 +- substrate/client/transaction-pool/Cargo.toml | 39 +- .../client/transaction-pool/api/Cargo.toml | 9 +- substrate/client/utils/Cargo.toml | 4 +- substrate/deprecated/hashing/Cargo.toml | 5 +- .../deprecated/hashing/proc-macro/Cargo.toml | 5 +- substrate/frame/Cargo.toml | 35 +- substrate/frame/alliance/Cargo.toml | 28 +- substrate/frame/asset-conversion/Cargo.toml | 22 +- .../frame/asset-conversion/ops/Cargo.toml | 22 +- substrate/frame/asset-rate/Cargo.toml | 16 +- substrate/frame/asset-rewards/Cargo.toml | 22 +- substrate/frame/assets-freezer/Cargo.toml | 6 +- substrate/frame/assets-holder/Cargo.toml | 16 +- substrate/frame/assets/Cargo.toml | 25 +- substrate/frame/atomic-swap/Cargo.toml | 5 +- substrate/frame/aura/Cargo.toml | 19 +- .../frame/authority-discovery/Cargo.toml | 18 +- substrate/frame/authorship/Cargo.toml | 14 +- substrate/frame/babe/Cargo.toml | 34 +- substrate/frame/bags-list/Cargo.toml | 30 +- substrate/frame/bags-list/fuzzer/Cargo.toml | 2 +- .../frame/bags-list/remote-tests/Cargo.toml | 28 +- substrate/frame/balances/Cargo.toml | 18 +- substrate/frame/beefy-mmr/Cargo.toml | 29 +- substrate/frame/beefy/Cargo.toml | 41 +- substrate/frame/benchmarking/Cargo.toml | 31 +- substrate/frame/benchmarking/pov/Cargo.toml | 12 +- substrate/frame/bounties/Cargo.toml | 17 +- substrate/frame/broker/Cargo.toml | 19 +- substrate/frame/child-bounties/Cargo.toml | 19 +- substrate/frame/collective/Cargo.toml | 12 +- substrate/frame/contracts/Cargo.toml | 48 +- substrate/frame/contracts/fixtures/Cargo.toml | 6 +- .../frame/contracts/mock-network/Cargo.toml | 61 +- .../frame/contracts/proc-macro/Cargo.toml | 2 +- substrate/frame/contracts/uapi/Cargo.toml | 2 +- substrate/frame/conviction-voting/Cargo.toml | 16 +- substrate/frame/core-fellowship/Cargo.toml | 14 +- substrate/frame/delegated-staking/Cargo.toml | 33 +- substrate/frame/democracy/Cargo.toml | 21 +- substrate/frame/dummy-dim/Cargo.toml | 18 +- .../election-provider-multi-block/Cargo.toml | 40 +- .../election-provider-multi-phase/Cargo.toml | 38 +- .../test-staking-e2e/Cargo.toml | 34 +- .../election-provider-support/Cargo.toml | 24 +- .../benchmarking/Cargo.toml | 10 +- .../solution-type/Cargo.toml | 8 +- .../solution-type/fuzzer/Cargo.toml | 18 +- substrate/frame/elections-phragmen/Cargo.toml | 24 +- substrate/frame/examples/Cargo.toml | 24 +- .../authorization-tx-extension/Cargo.toml | 18 +- substrate/frame/examples/basic/Cargo.toml | 14 +- .../frame/examples/default-config/Cargo.toml | 9 +- substrate/frame/examples/dev-mode/Cargo.toml | 14 +- .../frame/examples/frame-crate/Cargo.toml | 5 +- .../frame/examples/kitchensink/Cargo.toml | 20 +- .../multi-block-migrations/Cargo.toml | 8 +- .../frame/examples/offchain-worker/Cargo.toml | 10 +- .../single-block-migrations/Cargo.toml | 16 +- substrate/frame/examples/split/Cargo.toml | 13 +- substrate/frame/examples/tasks/Cargo.toml | 15 +- .../frame/examples/view-functions/Cargo.toml | 22 +- substrate/frame/executive/Cargo.toml | 30 +- substrate/frame/fast-unstake/Cargo.toml | 35 +- substrate/frame/glutton/Cargo.toml | 14 +- substrate/frame/grandpa/Cargo.toml | 37 +- substrate/frame/identity/Cargo.toml | 19 +- substrate/frame/im-online/Cargo.toml | 13 +- substrate/frame/indices/Cargo.toml | 15 +- .../Cargo.toml | 2 +- substrate/frame/lottery/Cargo.toml | 18 +- substrate/frame/membership/Cargo.toml | 8 +- .../frame/merkle-mountain-range/Cargo.toml | 6 +- substrate/frame/message-queue/Cargo.toml | 27 +- substrate/frame/meta-tx/Cargo.toml | 27 +- .../frame/metadata-hash-extension/Cargo.toml | 14 +- substrate/frame/migrations/Cargo.toml | 21 +- substrate/frame/mixnet/Cargo.toml | 6 +- substrate/frame/multisig/Cargo.toml | 4 +- .../frame/nft-fractionalization/Cargo.toml | 9 +- substrate/frame/nfts/Cargo.toml | 18 +- substrate/frame/nfts/runtime-api/Cargo.toml | 4 +- substrate/frame/nis/Cargo.toml | 6 +- substrate/frame/node-authorization/Cargo.toml | 2 +- substrate/frame/nomination-pools/Cargo.toml | 24 +- .../nomination-pools/benchmarking/Cargo.toml | 41 +- .../frame/nomination-pools/fuzzer/Cargo.toml | 18 +- .../nomination-pools/runtime-api/Cargo.toml | 6 +- .../test-delegate-stake/Cargo.toml | 30 +- substrate/frame/offences/Cargo.toml | 16 +- .../frame/offences/benchmarking/Cargo.toml | 41 +- substrate/frame/origin-restriction/Cargo.toml | 16 +- substrate/frame/paged-list/Cargo.toml | 2 +- substrate/frame/parameters/Cargo.toml | 19 +- substrate/frame/people/Cargo.toml | 14 +- substrate/frame/preimage/Cargo.toml | 15 +- substrate/frame/proxy/Cargo.toml | 6 +- substrate/frame/ranked-collective/Cargo.toml | 14 +- substrate/frame/recovery/Cargo.toml | 5 +- substrate/frame/referenda/Cargo.toml | 24 +- substrate/frame/remark/Cargo.toml | 12 +- substrate/frame/revive/Cargo.toml | 40 +- substrate/frame/revive/fixtures/Cargo.toml | 8 +- substrate/frame/revive/proc-macro/Cargo.toml | 2 +- substrate/frame/revive/rpc/Cargo.toml | 39 +- .../revive/src/precompiles/builtin/modexp.rs | 8 +- substrate/frame/revive/uapi/Cargo.toml | 4 +- substrate/frame/root-offences/Cargo.toml | 32 +- substrate/frame/root-testing/Cargo.toml | 10 +- substrate/frame/safe-mode/Cargo.toml | 8 +- substrate/frame/salary/Cargo.toml | 2 +- substrate/frame/sassafras/Cargo.toml | 14 +- substrate/frame/scheduler/Cargo.toml | 18 +- substrate/frame/scored-pool/Cargo.toml | 13 +- substrate/frame/session/Cargo.toml | 14 +- .../frame/session/benchmarking/Cargo.toml | 29 +- substrate/frame/society/Cargo.toml | 21 +- substrate/frame/staking-async/Cargo.toml | 34 +- .../frame/staking-async/ah-client/Cargo.toml | 21 +- .../frame/staking-async/ahm-test/Cargo.toml | 45 +- .../frame/staking-async/rc-client/Cargo.toml | 10 +- .../frame/staking-async/reward-fn/Cargo.toml | 4 +- .../staking-async/runtime-api/Cargo.toml | 6 +- .../runtimes/parachain/Cargo.toml | 203 +- .../staking-async/runtimes/rc/Cargo.toml | 198 +- .../runtimes/rc/constants/Cargo.toml | 20 +- substrate/frame/staking/Cargo.toml | 43 +- .../frame/staking/reward-curve/Cargo.toml | 4 +- substrate/frame/staking/reward-fn/Cargo.toml | 4 +- .../frame/staking/runtime-api/Cargo.toml | 6 +- .../frame/state-trie-migration/Cargo.toml | 18 +- substrate/frame/statement/Cargo.toml | 19 +- substrate/frame/sudo/Cargo.toml | 10 +- substrate/frame/support/Cargo.toml | 40 +- substrate/frame/support/procedural/Cargo.toml | 26 +- .../frame/support/procedural/tools/Cargo.toml | 5 +- .../procedural/tools/derive/Cargo.toml | 2 +- substrate/frame/support/test/Cargo.toml | 23 +- .../support/test/compile_pass/Cargo.toml | 12 +- .../frame/support/test/pallet/Cargo.toml | 8 +- substrate/frame/system/Cargo.toml | 8 +- .../frame/system/benchmarking/Cargo.toml | 18 +- .../frame/system/rpc/runtime-api/Cargo.toml | 4 +- substrate/frame/timestamp/Cargo.toml | 16 +- substrate/frame/tips/Cargo.toml | 18 +- .../frame/transaction-payment/Cargo.toml | 12 +- .../asset-conversion-tx-payment/Cargo.toml | 18 +- .../asset-tx-payment/Cargo.toml | 20 +- .../frame/transaction-payment/rpc/Cargo.toml | 23 +- .../rpc/runtime-api/Cargo.toml | 10 +- .../skip-feeless-payment/Cargo.toml | 10 +- .../frame/transaction-storage/Cargo.toml | 16 +- substrate/frame/treasury/Cargo.toml | 16 +- substrate/frame/try-runtime/Cargo.toml | 8 +- substrate/frame/tx-pause/Cargo.toml | 8 +- substrate/frame/uniques/Cargo.toml | 12 +- substrate/frame/utility/Cargo.toml | 20 +- substrate/frame/verify-signature/Cargo.toml | 10 +- substrate/frame/vesting/Cargo.toml | 12 +- substrate/frame/whitelist/Cargo.toml | 6 +- substrate/primitives/api/Cargo.toml | 13 +- .../primitives/api/proc-macro/Cargo.toml | 2 +- substrate/primitives/api/test/Cargo.toml | 28 +- .../primitives/application-crypto/Cargo.toml | 6 +- .../application-crypto/test/Cargo.toml | 15 +- substrate/primitives/arithmetic/Cargo.toml | 5 +- .../primitives/arithmetic/fuzzer/Cargo.toml | 3 +- .../primitives/authority-discovery/Cargo.toml | 8 +- substrate/primitives/block-builder/Cargo.toml | 8 +- substrate/primitives/blockchain/Cargo.toml | 20 +- .../primitives/consensus/aura/Cargo.toml | 14 +- .../primitives/consensus/babe/Cargo.toml | 14 +- .../primitives/consensus/beefy/Cargo.toml | 20 +- .../primitives/consensus/common/Cargo.toml | 11 +- .../primitives/consensus/grandpa/Cargo.toml | 10 +- substrate/primitives/consensus/pow/Cargo.toml | 8 +- .../primitives/consensus/sassafras/Cargo.toml | 8 +- .../primitives/consensus/slots/Cargo.toml | 4 +- substrate/primitives/core/Cargo.toml | 17 +- substrate/primitives/core/fuzz/Cargo.toml | 6 +- .../primitives/crypto/ec-utils/Cargo.toml | 2 +- .../primitives/crypto/hashing/Cargo.toml | 2 +- .../crypto/hashing/proc-macro/Cargo.toml | 2 +- .../primitives/ethereum-standards/Cargo.toml | 2 +- substrate/primitives/externalities/Cargo.toml | 4 +- .../primitives/genesis-builder/Cargo.toml | 6 +- substrate/primitives/inherents/Cargo.toml | 2 +- substrate/primitives/io/Cargo.toml | 21 +- substrate/primitives/keyring/Cargo.toml | 6 +- substrate/primitives/keystore/Cargo.toml | 6 +- .../merkle-mountain-range/Cargo.toml | 10 +- substrate/primitives/metadata-ir/Cargo.toml | 2 +- substrate/primitives/mixnet/Cargo.toml | 6 +- .../primitives/npos-elections/Cargo.toml | 8 +- .../npos-elections/fuzzer/Cargo.toml | 8 +- substrate/primitives/offchain/Cargo.toml | 8 +- substrate/primitives/panic-handler/Cargo.toml | 2 +- substrate/primitives/rpc/Cargo.toml | 5 +- .../primitives/runtime-interface/Cargo.toml | 22 +- .../runtime-interface/proc-macro/Cargo.toml | 2 +- .../test-wasm-deprecated/Cargo.toml | 6 +- .../runtime-interface/test-wasm/Cargo.toml | 6 +- .../runtime-interface/test/Cargo.toml | 22 +- substrate/primitives/runtime/Cargo.toml | 27 +- substrate/primitives/session/Cargo.toml | 8 +- substrate/primitives/staking/Cargo.toml | 7 +- substrate/primitives/state-machine/Cargo.toml | 11 +- .../primitives/state-machine/fuzz/Cargo.toml | 2 +- .../primitives/statement-store/Cargo.toml | 16 +- substrate/primitives/storage/Cargo.toml | 4 +- .../primitives/test-primitives/Cargo.toml | 6 +- substrate/primitives/timestamp/Cargo.toml | 6 +- substrate/primitives/tracing/Cargo.toml | 2 +- .../primitives/transaction-pool/Cargo.toml | 6 +- .../transaction-storage-proof/Cargo.toml | 6 +- substrate/primitives/trie/Cargo.toml | 9 +- substrate/primitives/version/Cargo.toml | 11 +- .../primitives/version/proc-macro/Cargo.toml | 4 +- .../primitives/wasm-interface/Cargo.toml | 2 +- substrate/primitives/weights/Cargo.toml | 6 +- substrate/test-utils/Cargo.toml | 2 +- substrate/test-utils/cli/Cargo.toml | 17 +- substrate/test-utils/client/Cargo.toml | 30 +- substrate/test-utils/runtime/Cargo.toml | 62 +- .../test-utils/runtime/client/Cargo.toml | 28 +- .../runtime/transaction-pool/Cargo.toml | 14 +- substrate/utils/binary-merkle-tree/Cargo.toml | 8 +- substrate/utils/fork-tree/Cargo.toml | 2 +- .../utils/frame/benchmarking-cli/Cargo.toml | 116 +- .../utils/frame/generate-bags/Cargo.toml | 18 +- .../generate-bags/node-runtime/Cargo.toml | 5 +- substrate/utils/frame/omni-bencher/Cargo.toml | 20 +- .../frame/remote-externalities/Cargo.toml | 22 +- substrate/utils/frame/rpc/client/Cargo.toml | 10 +- .../rpc/state-trie-migration-rpc/Cargo.toml | 23 +- substrate/utils/frame/rpc/support/Cargo.toml | 17 +- substrate/utils/frame/rpc/system/Cargo.toml | 30 +- .../storage-access-test-runtime/Cargo.toml | 10 +- substrate/utils/prometheus/Cargo.toml | 2 +- substrate/utils/substrate-bip39/Cargo.toml | 2 +- substrate/utils/wasm-builder/Cargo.toml | 5 +- templates/minimal/node/Cargo.toml | 5 +- templates/minimal/pallets/template/Cargo.toml | 4 +- templates/minimal/runtime/Cargo.toml | 15 +- templates/parachain/Cargo.toml | 2 +- templates/parachain/node/Cargo.toml | 13 +- .../parachain/pallets/template/Cargo.toml | 8 +- templates/parachain/runtime/Cargo.toml | 44 +- templates/solochain/node/Cargo.toml | 107 +- .../solochain/pallets/template/Cargo.toml | 19 +- templates/solochain/runtime/Cargo.toml | 64 +- templates/zombienet/Cargo.toml | 2 +- umbrella/Cargo.toml | 2 +- 602 files changed, 15348 insertions(+), 10171 deletions(-) create mode 100644 Plan.toml rename prdoc/{stable2506 => stable2503-6}/pr_8461.prdoc (100%) rename prdoc/{stable2506 => stable2503-6}/pr_8473.prdoc (100%) rename prdoc/{stable2506 => stable2503-6}/pr_8630.prdoc (100%) rename prdoc/{stable2506 => stable2503-6}/pr_8650.prdoc (100%) rename prdoc/{stable2506 => stable2503-6}/pr_8669.prdoc (100%) create mode 100644 prdoc/stable2503-7/pr_6827.prdoc create mode 100644 prdoc/stable2503-7/pr_8345.prdoc create mode 100644 prdoc/stable2503-7/pr_8725.prdoc create mode 100644 prdoc/stable2503-7/pr_8787.prdoc create mode 100644 prdoc/stable2503-7/pr_8831.prdoc create mode 100644 prdoc/stable2503-7/pr_8832.prdoc create mode 100644 prdoc/stable2503-7/pr_8834.prdoc create mode 100644 prdoc/stable2503-7/pr_8837.prdoc create mode 100644 prdoc/stable2503-7/pr_8932.prdoc create mode 100644 prdoc/stable2503-7/pr_8948.prdoc create mode 100644 prdoc/stable2503-7/pr_8973.prdoc create mode 100644 prdoc/stable2503-7/pr_8980.prdoc create mode 100644 prdoc/stable2503-7/pr_9050.prdoc rename prdoc/{ => stable2503-7}/pr_9102.prdoc (100%) rename prdoc/{ => stable2506}/pr_8860.prdoc (100%) rename prdoc/{ => stable2506}/pr_8891.prdoc (100%) rename prdoc/{ => stable2506}/pr_9094.prdoc (100%) create mode 100644 prdoc/stable2506/pr_9102.prdoc rename prdoc/{ => stable2506}/pr_9127.prdoc (100%) rename prdoc/{ => stable2506}/pr_9137.prdoc (100%) rename prdoc/{ => stable2506}/pr_9139.prdoc (100%) rename prdoc/{ => stable2506}/pr_9202.prdoc (100%) rename prdoc/{ => stable2506}/pr_9264.prdoc (100%) mode change 100644 => 100755 scripts/release/delete-versions-if-path-is-present.sh diff --git a/.github/workflows/check-semver.yml b/.github/workflows/check-semver.yml index a52fc30535c34..d20d364925763 100644 --- a/.github/workflows/check-semver.yml +++ b/.github/workflows/check-semver.yml @@ -66,29 +66,29 @@ jobs: echo "PRDOC_EXTRA_ARGS=--max-bump minor" >> $GITHUB_ENV - name: Echo Skip - if: ${{ contains(github.event.pull_request.labels.*.name, 'R0-silent') }} - run: echo "Skipping this PR because it is labeled as R0-silent." + if: ${{ contains(github.event.pull_request.labels.*.name, 'R0-no-crate-publish-required') }} + run: echo "Skipping this PR because it is labeled as R0-no-crate-publish-required." - name: Rust Cache - if: ${{ !contains(github.event.pull_request.labels.*.name, 'R0-silent') }} + if: ${{ !contains(github.event.pull_request.labels.*.name, 'R0-no-crate-publish-required') }} uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2.7.8 with: cache-on-failure: true - name: Rust compilation prerequisites - if: ${{ !contains(github.event.pull_request.labels.*.name, 'R0-silent') }} + if: ${{ !contains(github.event.pull_request.labels.*.name, 'R0-no-crate-publish-required') }} run: | rustup default $TOOLCHAIN rustup target add wasm32-unknown-unknown --toolchain $TOOLCHAIN rustup component add rust-src --toolchain $TOOLCHAIN - name: Install parity-publish - if: ${{ !contains(github.event.pull_request.labels.*.name, 'R0-silent') }} + if: ${{ !contains(github.event.pull_request.labels.*.name, 'R0-no-crate-publish-required') }} # Set the target dir to cache the build. run: CARGO_TARGET_DIR=./target/ cargo install parity-publish@0.10.4 --locked -q - name: Get original PR number - if: ${{ !contains(github.event.pull_request.labels.*.name, 'R0-silent') }} + if: ${{ !contains(github.event.pull_request.labels.*.name, 'R0-no-crate-publish-required') }} shell: bash env: PR_TITLE: ${{ github.event.pull_request.title }} @@ -108,7 +108,7 @@ jobs: echo "PR_NUMBER=$original_pr_number" >> $GITHUB_ENV - name: Check semver - if: ${{ !contains(github.event.pull_request.labels.*.name, 'R0-silent') }} + if: ${{ !contains(github.event.pull_request.labels.*.name, 'R0-no-crate-publish-required') }} env: PRDOC_EXTRA_ARGS: ${{ env.PRDOC_EXTRA_ARGS }} PR: ${{ env.PR_NUMBER }} diff --git a/.github/workflows/release-srtool.yml b/.github/workflows/release-srtool.yml index fac6f300ae71c..65f2b77601768 100644 --- a/.github/workflows/release-srtool.yml +++ b/.github/workflows/release-srtool.yml @@ -78,6 +78,7 @@ jobs: chain: ${{ matrix.chain }} runtime_dir: ${{ matrix.runtime_dir }} profile: ${{ inputs.profile }} + tag: "1.84.1" - name: Summary run: | diff --git a/Cargo.lock b/Cargo.lock index 92a8b0bdbf255..ff0cba72ccbc9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -199,7 +199,7 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cc0fac0fc16baf1f63f78b47c3d24718f3619b0714076f6a02957d808d52cbef" dependencies = [ - "arrayvec 0.7.4", + "arrayvec 0.7.6", "bytes", "smol_str", ] @@ -623,7 +623,7 @@ dependencies = [ "ark-ff-macros 0.5.0", "ark-serialize 0.5.0", "ark-std 0.5.0", - "arrayvec 0.7.4", + "arrayvec 0.7.6", "digest 0.10.7", "educe", "itertools 0.13.0", @@ -800,7 +800,7 @@ checksum = "3f4d068aaf107ebcd7dfb52bc748f8030e0fc930ac8e360146ca54c1203088f7" dependencies = [ "ark-serialize-derive 0.5.0", "ark-std 0.5.0", - "arrayvec 0.7.4", + "arrayvec 0.7.6", "digest 0.10.7", "num-bigint", "rayon", @@ -932,9 +932,9 @@ checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" [[package]] name = "arrayvec" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "asn1-rs" @@ -1026,7 +1026,7 @@ checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" [[package]] name = "asset-hub-rococo-emulated-chain" -version = "0.0.0" +version = "0.1.0" dependencies = [ "asset-hub-rococo-runtime", "bp-bridge-hub-rococo", @@ -1035,7 +1035,7 @@ dependencies = [ "frame-support", "parachains-common", "rococo-emulated-chain", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-keyring", "staging-xcm", "staging-xcm-builder", @@ -1064,8 +1064,8 @@ dependencies = [ "polkadot-runtime-common", "rococo-runtime-constants", "rococo-system-emulated-network", - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-runtime 42.0.0", "staging-xcm", "staging-xcm-executor", "xcm-runtime-apis", @@ -1073,7 +1073,7 @@ dependencies = [ [[package]] name = "asset-hub-rococo-runtime" -version = "0.11.0" +version = "0.26.0" dependencies = [ "asset-test-utils", "assets-common", @@ -1133,20 +1133,20 @@ dependencies = [ "rococo-runtime-constants", "scale-info", "serde_json", - "sp-api 26.0.0", + "sp-api 37.0.0", "sp-block-builder", "sp-consensus-aura", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-genesis-builder", "sp-inherents", "sp-keyring", "sp-offchain", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", "sp-session", - "sp-storage 19.0.0", + "sp-storage 22.0.0", "sp-transaction-pool", - "sp-version 29.0.0", - "sp-weights 27.0.0", + "sp-version 40.0.0", + "sp-weights 32.0.0", "staging-parachain-info", "staging-xcm", "staging-xcm-builder", @@ -1158,7 +1158,7 @@ dependencies = [ [[package]] name = "asset-hub-westend-emulated-chain" -version = "0.0.0" +version = "0.1.0" dependencies = [ "asset-hub-westend-runtime", "bp-bridge-hub-westend", @@ -1166,7 +1166,7 @@ dependencies = [ "emulated-integration-tests-common", "frame-support", "parachains-common", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-keyring", "staging-xcm", "staging-xcm-builder", @@ -1194,9 +1194,9 @@ dependencies = [ "parachains-common", "parity-scale-codec", "polkadot-runtime-common", - "sp-core 28.0.0", - "sp-runtime 31.0.1", - "sp-tracing 16.0.0", + "sp-core 37.0.0", + "sp-runtime 42.0.0", + "sp-tracing 17.1.0", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -1206,7 +1206,7 @@ dependencies = [ [[package]] name = "asset-hub-westend-runtime" -version = "0.15.0" +version = "0.32.0" dependencies = [ "alloy-core", "asset-test-utils", @@ -1274,21 +1274,21 @@ dependencies = [ "snowbridge-outbound-queue-primitives", "snowbridge-pallet-system-frontend", "snowbridge-runtime-common", - "sp-api 26.0.0", + "sp-api 37.0.0", "sp-block-builder", "sp-consensus-aura", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-genesis-builder", "sp-inherents", - "sp-io 30.0.0", + "sp-io 41.0.1", "sp-keyring", "sp-offchain", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", "sp-session", "sp-std 14.0.0", - "sp-storage 19.0.0", + "sp-storage 22.0.0", "sp-transaction-pool", - "sp-version 29.0.0", + "sp-version 40.0.0", "staging-parachain-info", "staging-xcm", "staging-xcm-builder", @@ -1301,7 +1301,7 @@ dependencies = [ [[package]] name = "asset-test-utils" -version = "7.0.0" +version = "24.0.0" dependencies = [ "cumulus-pallet-parachain-system", "cumulus-pallet-xcmp-queue", @@ -1319,8 +1319,8 @@ dependencies = [ "parachains-common", "parachains-runtimes-test-utils", "parity-scale-codec", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-io 41.0.1", + "sp-runtime 42.0.0", "staging-parachain-info", "staging-xcm", "staging-xcm-builder", @@ -1330,7 +1330,7 @@ dependencies = [ [[package]] name = "assets-common" -version = "0.7.0" +version = "0.22.0" dependencies = [ "cumulus-primitives-core", "ethereum-standards", @@ -1345,9 +1345,9 @@ dependencies = [ "parachains-common", "parity-scale-codec", "scale-info", - "sp-api 26.0.0", - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-api 37.0.0", + "sp-core 37.0.0", + "sp-runtime 42.0.0", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -1800,14 +1800,14 @@ checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" [[package]] name = "binary-merkle-tree" -version = "13.0.0" +version = "16.0.0" dependencies = [ "array-bytes 6.2.2", "hash-db", "log", "parity-scale-codec", - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-runtime 42.0.0", ] [[package]] @@ -1991,7 +1991,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23285ad32269793932e830392f2fe2f83e26488fd3ec778883a93c8323735780" dependencies = [ "arrayref", - "arrayvec 0.7.4", + "arrayvec 0.7.6", "constant_time_eq 0.3.0", ] @@ -2013,7 +2013,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6637f448b9e61dfadbdcbae9a885fadee1f3eaffb1f8d3c1965d3ade8bdfd44f" dependencies = [ "arrayref", - "arrayvec 0.7.4", + "arrayvec 0.7.6", "constant_time_eq 0.2.6", ] @@ -2024,7 +2024,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d82033247fd8e890df8f740e407ad4d038debb9eb1f40533fffb32e7d17dc6f7" dependencies = [ "arrayref", - "arrayvec 0.7.4", + "arrayvec 0.7.6", "cc", "cfg-if", "constant_time_eq 0.3.0", @@ -2106,7 +2106,7 @@ dependencies = [ [[package]] name = "bp-asset-hub-rococo" -version = "0.4.0" +version = "0.18.0" dependencies = [ "bp-bridge-hub-cumulus", "bp-messages", @@ -2115,15 +2115,15 @@ dependencies = [ "frame-support", "parity-scale-codec", "scale-info", - "sp-api 26.0.0", - "sp-core 28.0.0", + "sp-api 37.0.0", + "sp-core 37.0.0", "staging-xcm", "testnet-parachains-constants", ] [[package]] name = "bp-asset-hub-westend" -version = "0.3.0" +version = "0.17.0" dependencies = [ "bp-bridge-hub-cumulus", "bp-messages", @@ -2132,8 +2132,8 @@ dependencies = [ "frame-support", "parity-scale-codec", "scale-info", - "sp-api 26.0.0", - "sp-core 28.0.0", + "sp-api 37.0.0", + "sp-core 37.0.0", "staging-xcm", "testnet-parachains-constants", ] @@ -2151,13 +2151,13 @@ dependencies = [ "scale-info", "serde", "sp-consensus-beefy", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", "sp-std 14.0.0", ] [[package]] name = "bp-bridge-hub-cumulus" -version = "0.7.0" +version = "0.22.0" dependencies = [ "bp-messages", "bp-polkadot-core", @@ -2166,13 +2166,13 @@ dependencies = [ "frame-system", "parachains-common", "polkadot-primitives", - "sp-api 26.0.0", + "sp-api 37.0.0", "sp-std 14.0.0", ] [[package]] name = "bp-bridge-hub-rococo" -version = "0.7.0" +version = "0.22.0" dependencies = [ "bp-bridge-hub-cumulus", "bp-messages", @@ -2180,14 +2180,14 @@ dependencies = [ "bp-xcm-bridge-hub", "frame-support", "parity-scale-codec", - "sp-api 26.0.0", - "sp-runtime 31.0.1", + "sp-api 37.0.0", + "sp-runtime 42.0.0", "sp-std 14.0.0", ] [[package]] name = "bp-bridge-hub-westend" -version = "0.3.0" +version = "0.18.0" dependencies = [ "bp-bridge-hub-cumulus", "bp-messages", @@ -2195,14 +2195,14 @@ dependencies = [ "bp-xcm-bridge-hub", "frame-support", "parity-scale-codec", - "sp-api 26.0.0", - "sp-runtime 31.0.1", + "sp-api 37.0.0", + "sp-runtime 42.0.0", "sp-std 14.0.0", ] [[package]] name = "bp-header-chain" -version = "0.7.0" +version = "0.21.0" dependencies = [ "bp-runtime", "bp-test-utils", @@ -2214,14 +2214,14 @@ dependencies = [ "scale-info", "serde", "sp-consensus-grandpa", - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-runtime 42.0.0", "sp-std 14.0.0", ] [[package]] name = "bp-messages" -version = "0.7.0" +version = "0.21.0" dependencies = [ "bp-header-chain", "bp-runtime", @@ -2231,14 +2231,14 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core 28.0.0", - "sp-io 30.0.0", + "sp-core 37.0.0", + "sp-io 41.0.1", "sp-std 14.0.0", ] [[package]] name = "bp-parachains" -version = "0.7.0" +version = "0.21.0" dependencies = [ "bp-header-chain", "bp-polkadot-core", @@ -2247,14 +2247,14 @@ dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-runtime 42.0.0", "sp-std 14.0.0", ] [[package]] name = "bp-polkadot-bulletin" -version = "0.4.0" +version = "0.18.0" dependencies = [ "bp-header-chain", "bp-messages", @@ -2264,14 +2264,14 @@ dependencies = [ "frame-system", "parity-scale-codec", "scale-info", - "sp-api 26.0.0", - "sp-runtime 31.0.1", + "sp-api 37.0.0", + "sp-runtime 42.0.0", "sp-std 14.0.0", ] [[package]] name = "bp-polkadot-core" -version = "0.7.0" +version = "0.21.0" dependencies = [ "bp-messages", "bp-runtime", @@ -2281,14 +2281,14 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-runtime 42.0.0", "sp-std 14.0.0", ] [[package]] name = "bp-relayers" -version = "0.7.0" +version = "0.21.0" dependencies = [ "bp-header-chain", "bp-messages", @@ -2300,25 +2300,25 @@ dependencies = [ "pallet-utility", "parity-scale-codec", "scale-info", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", "sp-std 14.0.0", ] [[package]] name = "bp-rococo" -version = "0.6.0" +version = "0.20.0" dependencies = [ "bp-header-chain", "bp-polkadot-core", "bp-runtime", "frame-support", - "sp-api 26.0.0", + "sp-api 37.0.0", "sp-std 14.0.0", ] [[package]] name = "bp-runtime" -version = "0.7.0" +version = "0.21.0" dependencies = [ "frame-support", "frame-system", @@ -2330,18 +2330,18 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-state-machine 0.35.0", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", + "sp-state-machine 0.46.0", "sp-std 14.0.0", - "sp-trie 29.0.0", + "sp-trie 40.0.0", "trie-db 0.30.0", ] [[package]] name = "bp-test-utils" -version = "0.7.0" +version = "0.21.0" dependencies = [ "bp-header-chain", "bp-parachains", @@ -2350,29 +2350,29 @@ dependencies = [ "ed25519-dalek", "finality-grandpa", "parity-scale-codec", - "sp-application-crypto 30.0.0", + "sp-application-crypto 41.0.0", "sp-consensus-grandpa", - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-runtime 42.0.0", "sp-std 14.0.0", - "sp-trie 29.0.0", + "sp-trie 40.0.0", ] [[package]] name = "bp-westend" -version = "0.3.0" +version = "0.17.0" dependencies = [ "bp-header-chain", "bp-polkadot-core", "bp-runtime", "frame-support", - "sp-api 26.0.0", + "sp-api 37.0.0", "sp-std 14.0.0", ] [[package]] name = "bp-xcm-bridge-hub" -version = "0.2.0" +version = "0.7.0" dependencies = [ "bp-messages", "bp-runtime", @@ -2380,26 +2380,26 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core 28.0.0", - "sp-io 30.0.0", + "sp-core 37.0.0", + "sp-io 41.0.1", "sp-std 14.0.0", "staging-xcm", ] [[package]] name = "bp-xcm-bridge-hub-router" -version = "0.6.0" +version = "0.18.0" dependencies = [ "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-runtime 42.0.0", "staging-xcm", ] [[package]] name = "bridge-hub-common" -version = "0.1.0" +version = "0.14.0" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -2407,8 +2407,8 @@ dependencies = [ "parity-scale-codec", "scale-info", "snowbridge-core", - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-runtime 42.0.0", "sp-std 14.0.0", "staging-xcm", "staging-xcm-builder", @@ -2417,7 +2417,7 @@ dependencies = [ [[package]] name = "bridge-hub-rococo-emulated-chain" -version = "0.0.0" +version = "0.1.0" dependencies = [ "bp-messages", "bridge-hub-common", @@ -2425,7 +2425,7 @@ dependencies = [ "emulated-integration-tests-common", "frame-support", "parachains-common", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-keyring", "staging-xcm", "testnet-parachains-constants", @@ -2457,8 +2457,8 @@ dependencies = [ "snowbridge-pallet-inbound-queue-fixtures", "snowbridge-pallet-outbound-queue", "snowbridge-pallet-system", - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-runtime 42.0.0", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -2467,7 +2467,7 @@ dependencies = [ [[package]] name = "bridge-hub-rococo-runtime" -version = "0.5.0" +version = "0.20.0" dependencies = [ "bp-asset-hub-rococo", "bp-asset-hub-westend", @@ -2545,21 +2545,21 @@ dependencies = [ "snowbridge-runtime-common", "snowbridge-runtime-test-common", "snowbridge-system-runtime-api", - "sp-api 26.0.0", + "sp-api 37.0.0", "sp-block-builder", "sp-consensus-aura", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-genesis-builder", "sp-inherents", - "sp-io 30.0.0", + "sp-io 41.0.1", "sp-keyring", "sp-offchain", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", "sp-session", "sp-std 14.0.0", - "sp-storage 19.0.0", + "sp-storage 22.0.0", "sp-transaction-pool", - "sp-version 29.0.0", + "sp-version 40.0.0", "staging-parachain-info", "staging-xcm", "staging-xcm-builder", @@ -2571,7 +2571,7 @@ dependencies = [ [[package]] name = "bridge-hub-test-utils" -version = "0.7.0" +version = "0.23.0" dependencies = [ "asset-test-utils", "bp-header-chain", @@ -2599,12 +2599,12 @@ dependencies = [ "parachains-common", "parachains-runtimes-test-utils", "parity-scale-codec", - "sp-core 28.0.0", - "sp-io 30.0.0", + "sp-core 37.0.0", + "sp-io 41.0.1", "sp-keyring", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", "sp-std 14.0.0", - "sp-tracing 16.0.0", + "sp-tracing 17.1.0", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -2612,7 +2612,7 @@ dependencies = [ [[package]] name = "bridge-hub-westend-emulated-chain" -version = "0.0.0" +version = "0.1.0" dependencies = [ "bp-messages", "bridge-hub-common", @@ -2620,7 +2620,7 @@ dependencies = [ "emulated-integration-tests-common", "frame-support", "parachains-common", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-keyring", "staging-xcm", "testnet-parachains-constants", @@ -2660,9 +2660,9 @@ dependencies = [ "snowbridge-pallet-outbound-queue-v2", "snowbridge-pallet-system", "snowbridge-pallet-system-v2", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -2671,7 +2671,7 @@ dependencies = [ [[package]] name = "bridge-hub-westend-runtime" -version = "0.3.0" +version = "0.17.0" dependencies = [ "bp-asset-hub-rococo", "bp-asset-hub-westend", @@ -2751,21 +2751,21 @@ dependencies = [ "snowbridge-runtime-test-common", "snowbridge-system-runtime-api", "snowbridge-system-v2-runtime-api", - "sp-api 26.0.0", + "sp-api 37.0.0", "sp-block-builder", "sp-consensus-aura", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-genesis-builder", "sp-inherents", - "sp-io 30.0.0", + "sp-io 41.0.1", "sp-keyring", "sp-offchain", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", "sp-session", "sp-std 14.0.0", - "sp-storage 19.0.0", + "sp-storage 22.0.0", "sp-transaction-pool", - "sp-version 29.0.0", + "sp-version 40.0.0", "staging-parachain-info", "staging-xcm", "staging-xcm-builder", @@ -2779,7 +2779,7 @@ dependencies = [ [[package]] name = "bridge-runtime-common" -version = "0.7.0" +version = "0.22.0" dependencies = [ "bp-header-chain", "bp-messages", @@ -2800,12 +2800,12 @@ dependencies = [ "pallet-utility", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", "sp-std 14.0.0", - "sp-trie 29.0.0", - "sp-weights 27.0.0", + "sp-trie 40.0.0", + "sp-weights 32.0.0", "staging-xcm", "static_assertions", "tuplex", @@ -3053,7 +3053,7 @@ dependencies = [ [[package]] name = "chain-spec-guide-runtime" -version = "0.0.0" +version = "0.1.0" dependencies = [ "cmd_lib", "docify", @@ -3064,11 +3064,11 @@ dependencies = [ "scale-info", "serde", "serde_json", - "sp-application-crypto 30.0.0", - "sp-core 28.0.0", + "sp-application-crypto 41.0.0", + "sp-core 37.0.0", "sp-genesis-builder", "sp-keyring", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", "substrate-wasm-builder", ] @@ -3281,14 +3281,14 @@ dependencies = [ [[package]] name = "collectives-westend-emulated-chain" -version = "0.0.0" +version = "0.1.0" dependencies = [ "collectives-westend-runtime", "cumulus-primitives-core", "emulated-integration-tests-common", "frame-support", "parachains-common", - "sp-core 28.0.0", + "sp-core 37.0.0", "testnet-parachains-constants", ] @@ -3309,7 +3309,7 @@ dependencies = [ "pallet-xcm", "parity-scale-codec", "polkadot-runtime-common", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", "staging-xcm", "staging-xcm-executor", "westend-runtime-constants", @@ -3318,7 +3318,7 @@ dependencies = [ [[package]] name = "collectives-westend-runtime" -version = "3.0.0" +version = "20.0.0" dependencies = [ "cumulus-pallet-aura-ext", "cumulus-pallet-parachain-system", @@ -3371,22 +3371,22 @@ dependencies = [ "polkadot-runtime-common", "scale-info", "serde_json", - "sp-api 26.0.0", - "sp-arithmetic 23.0.0", + "sp-api 37.0.0", + "sp-arithmetic 27.0.0", "sp-block-builder", "sp-consensus-aura", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-genesis-builder", "sp-inherents", - "sp-io 30.0.0", + "sp-io 41.0.1", "sp-keyring", "sp-offchain", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", "sp-session", "sp-std 14.0.0", - "sp-storage 19.0.0", + "sp-storage 22.0.0", "sp-transaction-pool", - "sp-version 29.0.0", + "sp-version 40.0.0", "staging-parachain-info", "staging-xcm", "staging-xcm-builder", @@ -3666,13 +3666,13 @@ dependencies = [ "emulated-integration-tests-common", "frame-support", "parachains-common", - "sp-core 28.0.0", + "sp-core 37.0.0", "testnet-parachains-constants", ] [[package]] name = "coretime-rococo-integration-tests" -version = "0.0.0" +version = "0.1.0" dependencies = [ "cumulus-pallet-parachain-system", "emulated-integration-tests-common", @@ -3682,14 +3682,14 @@ dependencies = [ "polkadot-runtime-parachains", "rococo-runtime-constants", "rococo-system-emulated-network", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", "staging-xcm", "staging-xcm-executor", ] [[package]] name = "coretime-rococo-runtime" -version = "0.1.0" +version = "0.16.0" dependencies = [ "cumulus-pallet-aura-ext", "cumulus-pallet-parachain-system", @@ -3734,19 +3734,19 @@ dependencies = [ "scale-info", "serde", "serde_json", - "sp-api 26.0.0", + "sp-api 37.0.0", "sp-block-builder", "sp-consensus-aura", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-genesis-builder", "sp-inherents", "sp-keyring", "sp-offchain", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", "sp-session", - "sp-storage 19.0.0", + "sp-storage 22.0.0", "sp-transaction-pool", - "sp-version 29.0.0", + "sp-version 40.0.0", "staging-parachain-info", "staging-xcm", "staging-xcm-builder", @@ -3765,13 +3765,13 @@ dependencies = [ "emulated-integration-tests-common", "frame-support", "parachains-common", - "sp-core 28.0.0", + "sp-core 37.0.0", "testnet-parachains-constants", ] [[package]] name = "coretime-westend-integration-tests" -version = "0.0.0" +version = "0.1.0" dependencies = [ "cumulus-pallet-parachain-system", "emulated-integration-tests-common", @@ -3780,7 +3780,7 @@ dependencies = [ "pallet-message-queue", "pallet-xcm", "polkadot-runtime-parachains", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", "staging-xcm", "staging-xcm-executor", "westend-runtime-constants", @@ -3789,7 +3789,7 @@ dependencies = [ [[package]] name = "coretime-westend-runtime" -version = "0.1.0" +version = "0.16.0" dependencies = [ "cumulus-pallet-aura-ext", "cumulus-pallet-parachain-system", @@ -3833,19 +3833,19 @@ dependencies = [ "scale-info", "serde", "serde_json", - "sp-api 26.0.0", + "sp-api 37.0.0", "sp-block-builder", "sp-consensus-aura", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-genesis-builder", "sp-inherents", "sp-keyring", "sp-offchain", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", "sp-session", - "sp-storage 19.0.0", + "sp-storage 22.0.0", "sp-transaction-pool", - "sp-version 29.0.0", + "sp-version 40.0.0", "staging-parachain-info", "staging-xcm", "staging-xcm-builder", @@ -4192,7 +4192,7 @@ dependencies = [ [[package]] name = "cumulus-client-bootnodes" -version = "0.1.0" +version = "0.2.0" dependencies = [ "array-bytes 6.2.2", "async-channel 1.9.0", @@ -4211,13 +4211,13 @@ dependencies = [ "sc-network", "sc-service", "sp-consensus-babe", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", "tokio", ] [[package]] name = "cumulus-client-cli" -version = "0.7.0" +version = "0.24.0" dependencies = [ "clap", "parity-scale-codec", @@ -4226,14 +4226,14 @@ dependencies = [ "sc-client-api", "sc-service", "sp-blockchain", - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-runtime 42.0.0", "url", ] [[package]] name = "cumulus-client-collator" -version = "0.7.0" +version = "0.24.0" dependencies = [ "async-trait", "cumulus-client-consensus-common", @@ -4251,19 +4251,19 @@ dependencies = [ "polkadot-overseer", "polkadot-primitives", "sc-client-api", - "sp-api 26.0.0", + "sp-api 37.0.0", "sp-consensus", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-maybe-compressed-blob 11.0.0", - "sp-runtime 31.0.1", - "sp-state-machine 0.35.0", - "sp-tracing 16.0.0", + "sp-runtime 42.0.0", + "sp-state-machine 0.46.0", + "sp-tracing 17.1.0", "tracing", ] [[package]] name = "cumulus-client-consensus-aura" -version = "0.7.0" +version = "0.24.0" dependencies = [ "async-trait", "cumulus-client-collator", @@ -4292,22 +4292,22 @@ dependencies = [ "sc-telemetry", "sc-utils", "schnellru", - "sp-api 26.0.0", - "sp-application-crypto 30.0.0", + "sp-api 37.0.0", + "sp-application-crypto 41.0.0", "sp-block-builder", "sp-blockchain", "sp-consensus", "sp-consensus-aura", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-inherents", "sp-keyring", - "sp-keystore 0.34.0", - "sp-runtime 31.0.1", - "sp-state-machine 0.35.0", + "sp-keystore 0.43.0", + "sp-runtime 42.0.0", + "sp-state-machine 0.46.0", "sp-timestamp", - "sp-tracing 16.0.0", - "sp-trie 29.0.0", - "sp-version 29.0.0", + "sp-tracing 17.1.0", + "sp-trie 40.0.0", + "sp-version 40.0.0", "substrate-prometheus-endpoint", "tokio", "tracing", @@ -4315,7 +4315,7 @@ dependencies = [ [[package]] name = "cumulus-client-consensus-common" -version = "0.7.0" +version = "0.24.0" dependencies = [ "async-trait", "cumulus-client-pov-recovery", @@ -4338,33 +4338,33 @@ dependencies = [ "sp-blockchain", "sp-consensus", "sp-consensus-slots", - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-runtime 42.0.0", "sp-timestamp", - "sp-tracing 16.0.0", - "sp-trie 29.0.0", - "sp-version 29.0.0", + "sp-tracing 17.1.0", + "sp-trie 40.0.0", + "sp-version 40.0.0", "substrate-prometheus-endpoint", "tracing", ] [[package]] name = "cumulus-client-consensus-proposer" -version = "0.7.0" +version = "0.20.0" dependencies = [ "anyhow", "async-trait", "cumulus-primitives-parachain-inherent", "sp-consensus", "sp-inherents", - "sp-runtime 31.0.1", - "sp-state-machine 0.35.0", + "sp-runtime 42.0.0", + "sp-state-machine 0.46.0", "thiserror 1.0.65", ] [[package]] name = "cumulus-client-consensus-relay-chain" -version = "0.7.0" +version = "0.24.0" dependencies = [ "async-trait", "cumulus-client-consensus-common", @@ -4373,20 +4373,20 @@ dependencies = [ "futures", "parking_lot 0.12.3", "sc-consensus", - "sp-api 26.0.0", + "sp-api 37.0.0", "sp-block-builder", "sp-blockchain", "sp-consensus", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-inherents", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", "substrate-prometheus-endpoint", "tracing", ] [[package]] name = "cumulus-client-network" -version = "0.7.0" +version = "0.24.0" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -4405,22 +4405,22 @@ dependencies = [ "rstest", "sc-client-api", "sc-network", - "sp-api 26.0.0", + "sp-api 37.0.0", "sp-blockchain", "sp-consensus", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-keyring", - "sp-keystore 0.34.0", - "sp-runtime 31.0.1", - "sp-state-machine 0.35.0", - "sp-version 29.0.0", + "sp-keystore 0.43.0", + "sp-runtime 42.0.0", + "sp-state-machine 0.46.0", + "sp-version 40.0.0", "tokio", "tracing", ] [[package]] name = "cumulus-client-parachain-inherent" -version = "0.1.0" +version = "0.18.0" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -4432,15 +4432,15 @@ dependencies = [ "sc-consensus-babe", "sp-crypto-hashing 0.1.0", "sp-inherents", - "sp-runtime 31.0.1", - "sp-state-machine 0.35.0", - "sp-storage 19.0.0", + "sp-runtime 42.0.0", + "sp-state-machine 0.46.0", + "sp-storage 22.0.0", "tracing", ] [[package]] name = "cumulus-client-pov-recovery" -version = "0.7.0" +version = "0.24.0" dependencies = [ "assert_matches", "async-trait", @@ -4461,20 +4461,20 @@ dependencies = [ "sc-consensus", "sc-network", "sc-utils", - "sp-api 26.0.0", + "sp-api 37.0.0", "sp-blockchain", "sp-consensus", "sp-maybe-compressed-blob 11.0.0", - "sp-runtime 31.0.1", - "sp-tracing 16.0.0", - "sp-version 29.0.0", + "sp-runtime 42.0.0", + "sp-tracing 17.1.0", + "sp-version 40.0.0", "tokio", "tracing", ] [[package]] name = "cumulus-client-service" -version = "0.7.0" +version = "0.25.0" dependencies = [ "async-channel 1.9.0", "cumulus-client-cli", @@ -4502,18 +4502,18 @@ dependencies = [ "sc-telemetry", "sc-transaction-pool", "sc-utils", - "sp-api 26.0.0", + "sp-api 37.0.0", "sp-blockchain", "sp-consensus", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", "sp-transaction-pool", ] [[package]] name = "cumulus-pallet-aura-ext" -version = "0.7.0" +version = "0.21.0" dependencies = [ "cumulus-pallet-parachain-system", "cumulus-primitives-core", @@ -4525,17 +4525,17 @@ dependencies = [ "parity-scale-codec", "rstest", "scale-info", - "sp-application-crypto 30.0.0", + "sp-application-crypto 41.0.0", "sp-consensus-aura", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-version 29.0.0", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", + "sp-version 40.0.0", ] [[package]] name = "cumulus-pallet-dmp-queue" -version = "0.7.0" +version = "0.21.0" dependencies = [ "cumulus-primitives-core", "frame-benchmarking", @@ -4544,16 +4544,16 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-tracing 16.0.0", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", + "sp-tracing 17.1.0", "staging-xcm", ] [[package]] name = "cumulus-pallet-parachain-system" -version = "0.7.0" +version = "0.21.0" dependencies = [ "assert_matches", "bytes", @@ -4581,18 +4581,18 @@ dependencies = [ "scale-info", "sp-consensus-babe", "sp-consensus-slots", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-crypto-hashing 0.1.0", - "sp-externalities 0.25.0", + "sp-externalities 0.30.0", "sp-inherents", - "sp-io 30.0.0", + "sp-io 41.0.1", "sp-keyring", - "sp-runtime 31.0.1", - "sp-state-machine 0.35.0", + "sp-runtime 42.0.0", + "sp-state-machine 0.46.0", "sp-std 14.0.0", - "sp-tracing 16.0.0", - "sp-trie 29.0.0", - "sp-version 29.0.0", + "sp-tracing 17.1.0", + "sp-trie 40.0.0", + "sp-version 40.0.0", "staging-xcm", "staging-xcm-builder", "trie-db 0.30.0", @@ -4611,19 +4611,19 @@ dependencies = [ [[package]] name = "cumulus-pallet-session-benchmarking" -version = "9.0.0" +version = "22.0.0" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "pallet-session", "parity-scale-codec", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", ] [[package]] name = "cumulus-pallet-solo-to-para" -version = "0.7.0" +version = "0.21.0" dependencies = [ "cumulus-pallet-parachain-system", "frame-support", @@ -4632,12 +4632,12 @@ dependencies = [ "parity-scale-codec", "polkadot-primitives", "scale-info", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", ] [[package]] name = "cumulus-pallet-weight-reclaim" -version = "1.0.0" +version = "0.3.0" dependencies = [ "cumulus-primitives-proof-size-hostfunction", "cumulus-primitives-storage-weight-reclaim", @@ -4649,28 +4649,28 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-trie 29.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", + "sp-trie 40.0.0", ] [[package]] name = "cumulus-pallet-xcm" -version = "0.7.0" +version = "0.20.0" dependencies = [ "cumulus-primitives-core", "frame-support", "frame-system", "parity-scale-codec", "scale-info", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-io 41.0.1", + "sp-runtime 42.0.0", "staging-xcm", ] [[package]] name = "cumulus-pallet-xcmp-queue" -version = "0.7.1" +version = "0.21.0" dependencies = [ "approx", "bounded-collections 0.2.3", @@ -4687,9 +4687,9 @@ dependencies = [ "polkadot-runtime-common", "polkadot-runtime-parachains", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -4697,7 +4697,7 @@ dependencies = [ [[package]] name = "cumulus-ping" -version = "0.7.0" +version = "0.21.0" dependencies = [ "cumulus-pallet-xcm", "cumulus-primitives-core", @@ -4705,13 +4705,13 @@ dependencies = [ "frame-system", "parity-scale-codec", "scale-info", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", "staging-xcm", ] [[package]] name = "cumulus-pov-validator" -version = "0.1.0" +version = "0.6.0" dependencies = [ "anyhow", "clap", @@ -4719,9 +4719,9 @@ dependencies = [ "polkadot-node-primitives", "polkadot-parachain-primitives", "polkadot-primitives", - "sc-executor 0.32.0", - "sp-core 28.0.0", - "sp-io 30.0.0", + "sc-executor 0.43.0", + "sp-core 37.0.0", + "sp-io 41.0.1", "sp-maybe-compressed-blob 11.0.0", "tracing", "tracing-subscriber", @@ -4729,57 +4729,57 @@ dependencies = [ [[package]] name = "cumulus-primitives-aura" -version = "0.7.0" +version = "0.18.0" dependencies = [ - "sp-api 26.0.0", + "sp-api 37.0.0", "sp-consensus-aura", ] [[package]] name = "cumulus-primitives-core" -version = "0.7.0" +version = "0.19.0" dependencies = [ "parity-scale-codec", "polkadot-core-primitives", "polkadot-parachain-primitives", "polkadot-primitives", "scale-info", - "sp-api 26.0.0", - "sp-runtime 31.0.1", - "sp-trie 29.0.0", + "sp-api 37.0.0", + "sp-runtime 42.0.0", + "sp-trie 40.0.0", "staging-xcm", "tracing", ] [[package]] name = "cumulus-primitives-parachain-inherent" -version = "0.7.0" +version = "0.19.0" dependencies = [ "async-trait", "cumulus-primitives-core", "cumulus-test-relay-sproof-builder", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-inherents", - "sp-trie 29.0.0", + "sp-trie 40.0.0", ] [[package]] name = "cumulus-primitives-proof-size-hostfunction" -version = "0.2.0" +version = "0.13.0" dependencies = [ - "sp-core 28.0.0", - "sp-externalities 0.25.0", - "sp-io 30.0.0", - "sp-runtime-interface 24.0.0", - "sp-state-machine 0.35.0", - "sp-trie 29.0.0", + "sp-core 37.0.0", + "sp-externalities 0.30.0", + "sp-io 41.0.1", + "sp-runtime-interface 30.0.0", + "sp-state-machine 0.46.0", + "sp-trie 40.0.0", ] [[package]] name = "cumulus-primitives-storage-weight-reclaim" -version = "1.0.0" +version = "12.0.0" dependencies = [ "cumulus-primitives-core", "cumulus-primitives-proof-size-hostfunction", @@ -4791,14 +4791,14 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-trie 29.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", + "sp-trie 40.0.0", ] [[package]] name = "cumulus-primitives-timestamp" -version = "0.7.0" +version = "0.20.0" dependencies = [ "cumulus-primitives-core", "sp-inherents", @@ -4807,7 +4807,7 @@ dependencies = [ [[package]] name = "cumulus-primitives-utility" -version = "0.7.0" +version = "0.21.0" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -4815,7 +4815,7 @@ dependencies = [ "pallet-asset-conversion", "parity-scale-codec", "polkadot-runtime-common", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -4823,7 +4823,7 @@ dependencies = [ [[package]] name = "cumulus-relay-chain-inprocess-interface" -version = "0.7.0" +version = "0.25.0" dependencies = [ "async-channel 1.9.0", "async-trait", @@ -4843,17 +4843,17 @@ dependencies = [ "sc-sysinfo", "sc-telemetry", "sc-tracing", - "sp-api 26.0.0", + "sp-api 37.0.0", "sp-consensus", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-keyring", - "sp-runtime 31.0.1", - "sp-state-machine 0.35.0", + "sp-runtime 42.0.0", + "sp-state-machine 0.46.0", ] [[package]] name = "cumulus-relay-chain-interface" -version = "0.7.0" +version = "0.24.0" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -4863,16 +4863,16 @@ dependencies = [ "polkadot-overseer", "sc-client-api", "sc-network", - "sp-api 26.0.0", + "sp-api 37.0.0", "sp-blockchain", - "sp-state-machine 0.35.0", - "sp-version 29.0.0", + "sp-state-machine 0.46.0", + "sp-version 40.0.0", "thiserror 1.0.65", ] [[package]] name = "cumulus-relay-chain-minimal-node" -version = "0.7.0" +version = "0.25.0" dependencies = [ "array-bytes 6.2.2", "async-channel 1.9.0", @@ -4896,18 +4896,18 @@ dependencies = [ "sc-service", "sc-tracing", "sc-utils", - "sp-api 26.0.0", + "sp-api 37.0.0", "sp-blockchain", "sp-consensus", "sp-consensus-babe", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", "substrate-prometheus-endpoint", "tracing", ] [[package]] name = "cumulus-relay-chain-rpc-interface" -version = "0.7.0" +version = "0.24.0" dependencies = [ "async-trait", "cumulus-primitives-core", @@ -4933,11 +4933,11 @@ dependencies = [ "smoldot-light 0.9.0", "sp-authority-discovery", "sp-consensus-babe", - "sp-core 28.0.0", - "sp-runtime 31.0.1", - "sp-state-machine 0.35.0", - "sp-storage 19.0.0", - "sp-version 29.0.0", + "sp-core 37.0.0", + "sp-runtime 42.0.0", + "sp-state-machine 0.46.0", + "sp-storage 22.0.0", + "sp-version 40.0.0", "substrate-prometheus-endpoint", "thiserror 1.0.65", "tokio", @@ -4948,13 +4948,13 @@ dependencies = [ [[package]] name = "cumulus-relay-chain-streams" -version = "0.7.0" +version = "0.2.0" dependencies = [ "cumulus-relay-chain-interface", "futures", "polkadot-node-subsystem", "polkadot-primitives", - "sp-api 26.0.0", + "sp-api 37.0.0", "sp-consensus", "tracing", ] @@ -4979,33 +4979,33 @@ dependencies = [ "sc-block-builder", "sc-consensus", "sc-consensus-aura", - "sc-executor 0.32.0", - "sc-executor-common 0.29.0", + "sc-executor 0.43.0", + "sc-executor-common 0.39.0", "sc-service", - "sp-api 26.0.0", - "sp-application-crypto 30.0.0", + "sp-api 37.0.0", + "sp-application-crypto 41.0.0", "sp-blockchain", "sp-consensus-aura", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-inherents", - "sp-io 30.0.0", + "sp-io 41.0.1", "sp-keyring", - "sp-keystore 0.34.0", - "sp-runtime 31.0.1", + "sp-keystore 0.43.0", + "sp-runtime 42.0.0", "sp-timestamp", "substrate-test-client", ] [[package]] name = "cumulus-test-relay-sproof-builder" -version = "0.7.0" +version = "0.20.0" dependencies = [ "cumulus-primitives-core", "parity-scale-codec", "polkadot-primitives", - "sp-runtime 31.0.1", - "sp-state-machine 0.35.0", - "sp-trie 29.0.0", + "sp-runtime 42.0.0", + "sp-state-machine 0.46.0", + "sp-trie 40.0.0", ] [[package]] @@ -5033,19 +5033,19 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde_json", - "sp-api 26.0.0", + "sp-api 37.0.0", "sp-block-builder", "sp-consensus-aura", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-genesis-builder", "sp-inherents", - "sp-io 30.0.0", + "sp-io 41.0.1", "sp-keyring", "sp-offchain", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", "sp-session", "sp-transaction-pool", - "sp-version 29.0.0", + "sp-version 40.0.0", "staging-parachain-info", "substrate-wasm-builder", ] @@ -5096,9 +5096,9 @@ dependencies = [ "sc-client-api", "sc-consensus", "sc-consensus-aura", - "sc-executor 0.32.0", - "sc-executor-common 0.29.0", - "sc-executor-wasmtime 0.29.0", + "sc-executor 0.43.0", + "sc-executor-common 0.39.0", + "sc-executor-wasmtime 0.39.0", "sc-network", "sc-service", "sc-telemetry", @@ -5107,19 +5107,19 @@ dependencies = [ "sc-transaction-pool-api", "serde", "serde_json", - "sp-api 26.0.0", - "sp-arithmetic 23.0.0", + "sp-api 37.0.0", + "sp-arithmetic 27.0.0", "sp-blockchain", "sp-consensus", "sp-consensus-aura", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-genesis-builder", - "sp-io 30.0.0", + "sp-io 41.0.1", "sp-keyring", - "sp-runtime 31.0.1", - "sp-state-machine 0.35.0", + "sp-runtime 42.0.0", + "sp-state-machine 0.46.0", "sp-timestamp", - "sp-tracing 16.0.0", + "sp-tracing 17.1.0", "substrate-test-client", "tokio", "tracing", @@ -5151,7 +5151,7 @@ dependencies = [ "polkadot-primitives", "serde", "serde_json", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-keyring", "sp-statement-store", "tokio", @@ -5866,7 +5866,7 @@ dependencies = [ [[package]] name = "emulated-integration-tests-common" -version = "3.0.0" +version = "22.1.0" dependencies = [ "asset-test-utils", "bp-messages", @@ -5895,9 +5895,9 @@ dependencies = [ "sp-authority-discovery", "sp-consensus-babe", "sp-consensus-beefy", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-keyring", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", "staging-xcm", "staging-xcm-executor", "xcm-emulator", @@ -6122,7 +6122,7 @@ dependencies = [ [[package]] name = "ethereum-standards" -version = "0.1.0" +version = "0.1.1" dependencies = [ "alloy-core", ] @@ -6227,6 +6227,17 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2acce4a10f12dc2fb14a218589d4f1f62ef011b2d0cc4b3cb1bba8e94da14649" +[[package]] +name = "fancy-regex" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e24cb5a94bcae1e5408b0effca5cd7172ea3c5755049c5f3af4cd283a165298" +dependencies = [ + "bit-set", + "regex-automata 0.4.8", + "regex-syntax 0.8.5", +] + [[package]] name = "fastrand" version = "1.9.0" @@ -6248,7 +6259,7 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "139834ddba373bbdd213dffe02c8d110508dcf1726c2be27e8d1f7d7e1856418" dependencies = [ - "arrayvec 0.7.4", + "arrayvec 0.7.6", "auto_impl", "bytes", ] @@ -6259,7 +6270,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ce8dba4714ef14b8274c371879b175aa55b16b30f269663f19d576f380018dc4" dependencies = [ - "arrayvec 0.7.4", + "arrayvec 0.7.6", "auto_impl", "bytes", ] @@ -6490,7 +6501,7 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "fork-tree" -version = "12.0.0" +version = "13.0.1" dependencies = [ "parity-scale-codec", ] @@ -6532,7 +6543,7 @@ checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" [[package]] name = "frame-benchmarking" -version = "28.0.0" +version = "41.0.0" dependencies = [ "array-bytes 6.2.2", "frame-support", @@ -6546,22 +6557,22 @@ dependencies = [ "sc-client-db", "scale-info", "serde", - "sp-api 26.0.0", - "sp-application-crypto 30.0.0", - "sp-core 28.0.0", - "sp-externalities 0.25.0", - "sp-io 30.0.0", - "sp-keystore 0.34.0", - "sp-runtime 31.0.1", - "sp-runtime-interface 24.0.0", - "sp-state-machine 0.35.0", - "sp-storage 19.0.0", + "sp-api 37.0.0", + "sp-application-crypto 41.0.0", + "sp-core 37.0.0", + "sp-externalities 0.30.0", + "sp-io 41.0.1", + "sp-keystore 0.43.0", + "sp-runtime 42.0.0", + "sp-runtime-interface 30.0.0", + "sp-state-machine 0.46.0", + "sp-storage 22.0.0", "static_assertions", ] [[package]] name = "frame-benchmarking-cli" -version = "32.0.0" +version = "49.0.0" dependencies = [ "Inflector", "array-bytes 6.2.2", @@ -6590,32 +6601,32 @@ dependencies = [ "sc-cli", "sc-client-api", "sc-client-db", - "sc-executor 0.32.0", - "sc-executor-common 0.29.0", - "sc-executor-wasmtime 0.29.0", + "sc-executor 0.43.0", + "sc-executor-common 0.39.0", + "sc-executor-wasmtime 0.39.0", "sc-runtime-utilities", "sc-service", "sc-sysinfo", "serde", "serde_json", - "sp-api 26.0.0", + "sp-api 37.0.0", "sp-block-builder", "sp-blockchain", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-database", - "sp-externalities 0.25.0", + "sp-externalities 0.30.0", "sp-genesis-builder", "sp-inherents", - "sp-io 30.0.0", - "sp-keystore 0.34.0", - "sp-runtime 31.0.1", - "sp-state-machine 0.35.0", - "sp-storage 19.0.0", + "sp-io 41.0.1", + "sp-keystore 0.43.0", + "sp-runtime 42.0.0", + "sp-state-machine 0.46.0", + "sp-storage 22.0.0", "sp-timestamp", "sp-transaction-pool", - "sp-trie 29.0.0", - "sp-version 29.0.0", - "sp-wasm-interface 20.0.0", + "sp-trie 40.0.0", + "sp-version 40.0.0", + "sp-wasm-interface 22.0.0", "substrate-test-runtime", "subxt 0.41.0", "subxt-signer 0.41.0", @@ -6626,15 +6637,15 @@ dependencies = [ [[package]] name = "frame-benchmarking-pallet-pov" -version = "18.0.0" +version = "31.0.0" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "parity-scale-codec", "scale-info", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-io 41.0.1", + "sp-runtime 42.0.0", ] [[package]] @@ -6667,7 +6678,7 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" -version = "13.0.0" +version = "16.1.1" dependencies = [ "frame-election-provider-support", "frame-support", @@ -6676,14 +6687,14 @@ dependencies = [ "proc-macro2 1.0.95", "quote 1.0.40", "scale-info", - "sp-arithmetic 23.0.0", + "sp-arithmetic 27.0.0", "syn 2.0.98", "trybuild", ] [[package]] name = "frame-election-provider-support" -version = "28.0.0" +version = "41.0.0" dependencies = [ "frame-election-provider-solution-type", "frame-support", @@ -6691,30 +6702,30 @@ dependencies = [ "parity-scale-codec", "rand 0.8.5", "scale-info", - "sp-arithmetic 23.0.0", - "sp-core 28.0.0", - "sp-io 30.0.0", + "sp-arithmetic 27.0.0", + "sp-core 37.0.0", + "sp-io 41.0.1", "sp-npos-elections", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", "sp-std 14.0.0", ] [[package]] name = "frame-election-solution-type-fuzzer" -version = "2.0.0-alpha.5" +version = "2.0.0" dependencies = [ "frame-election-provider-solution-type", "frame-election-provider-support", "frame-support", "honggfuzz", "parity-scale-codec", - "sp-arithmetic 23.0.0", - "sp-runtime 31.0.1", + "sp-arithmetic 27.0.0", + "sp-runtime 42.0.0", ] [[package]] name = "frame-executive" -version = "28.0.0" +version = "41.0.0" dependencies = [ "aquamarine", "array-bytes 6.2.2", @@ -6726,12 +6737,12 @@ dependencies = [ "pallet-transaction-payment", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-inherents", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-tracing 16.0.0", - "sp-version 29.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", + "sp-tracing 17.1.0", + "sp-version 40.0.0", "substrate-test-runtime-client", ] @@ -6785,7 +6796,7 @@ dependencies = [ [[package]] name = "frame-metadata-hash-extension" -version = "0.1.0" +version = "0.9.0" dependencies = [ "array-bytes 6.2.2", "const-hex", @@ -6797,9 +6808,9 @@ dependencies = [ "merkleized-metadata", "parity-scale-codec", "scale-info", - "sp-api 26.0.0", - "sp-runtime 31.0.1", - "sp-tracing 16.0.0", + "sp-api 37.0.0", + "sp-runtime 42.0.0", + "sp-tracing 17.1.0", "sp-transaction-pool", "substrate-test-runtime-client", "substrate-wasm-builder", @@ -6807,7 +6818,7 @@ dependencies = [ [[package]] name = "frame-omni-bencher" -version = "0.1.0" +version = "0.13.0" dependencies = [ "assert_cmd", "clap", @@ -6817,7 +6828,7 @@ dependencies = [ "sc-chain-spec", "sc-cli", "sp-genesis-builder", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", "sp-statement-store", "tempfile", "tracing-subscriber", @@ -6825,7 +6836,7 @@ dependencies = [ [[package]] name = "frame-remote-externalities" -version = "0.35.0" +version = "0.52.0" dependencies = [ "futures", "indicatif", @@ -6833,12 +6844,12 @@ dependencies = [ "log", "parity-scale-codec", "serde", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-crypto-hashing 0.1.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-state-machine 0.35.0", - "sp-tracing 16.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", + "sp-state-machine 0.46.0", + "sp-tracing 17.1.0", "spinners", "substrate-rpc-client", "tokio", @@ -6847,20 +6858,20 @@ dependencies = [ [[package]] name = "frame-storage-access-test-runtime" -version = "0.1.0" +version = "0.2.0" dependencies = [ "cumulus-pallet-parachain-system", "parity-scale-codec", - "sp-core 28.0.0", - "sp-runtime 31.0.1", - "sp-state-machine 0.35.0", - "sp-trie 29.0.0", + "sp-core 37.0.0", + "sp-runtime 42.0.0", + "sp-state-machine 0.46.0", + "sp-trie 40.0.0", "substrate-wasm-builder", ] [[package]] name = "frame-support" -version = "28.0.0" +version = "41.0.0" dependencies = [ "Inflector", "aquamarine", @@ -6882,30 +6893,30 @@ dependencies = [ "scale-info", "serde", "serde_json", - "sp-api 26.0.0", - "sp-arithmetic 23.0.0", - "sp-core 28.0.0", + "sp-api 37.0.0", + "sp-arithmetic 27.0.0", + "sp-core 37.0.0", "sp-crypto-hashing 0.1.0", "sp-crypto-hashing-proc-macro 0.1.0", "sp-debug-derive 14.0.0", "sp-genesis-builder", "sp-inherents", - "sp-io 30.0.0", - "sp-metadata-ir 0.6.0", - "sp-runtime 31.0.1", + "sp-io 41.0.1", + "sp-metadata-ir 0.11.0", + "sp-runtime 42.0.0", "sp-staking", - "sp-state-machine 0.35.0", + "sp-state-machine 0.46.0", "sp-std 14.0.0", "sp-timestamp", - "sp-tracing 16.0.0", - "sp-trie 29.0.0", - "sp-weights 27.0.0", + "sp-tracing 17.1.0", + "sp-trie 40.0.0", + "sp-weights 32.0.0", "tt-call", ] [[package]] name = "frame-support-procedural" -version = "23.0.0" +version = "34.0.0" dependencies = [ "Inflector", "cfg-expr", @@ -6926,15 +6937,15 @@ dependencies = [ "regex", "scale-info", "sp-crypto-hashing 0.1.0", - "sp-io 30.0.0", - "sp-metadata-ir 0.6.0", - "sp-runtime 31.0.1", + "sp-io 41.0.1", + "sp-metadata-ir 0.11.0", + "sp-runtime 42.0.0", "syn 2.0.98", ] [[package]] name = "frame-support-procedural-tools" -version = "10.0.0" +version = "13.0.1" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate 3.1.0", @@ -6945,7 +6956,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" -version = "11.0.0" +version = "12.0.0" dependencies = [ "proc-macro2 1.0.95", "quote 1.0.40", @@ -6967,41 +6978,41 @@ dependencies = [ "rustversion", "scale-info", "serde", - "sp-api 26.0.0", - "sp-arithmetic 23.0.0", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-metadata-ir 0.6.0", - "sp-runtime 31.0.1", - "sp-state-machine 0.35.0", - "sp-version 29.0.0", + "sp-api 37.0.0", + "sp-arithmetic 27.0.0", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-metadata-ir 0.11.0", + "sp-runtime 42.0.0", + "sp-state-machine 0.46.0", + "sp-version 40.0.0", "static_assertions", "trybuild", ] [[package]] name = "frame-support-test-compile-pass" -version = "4.0.0-dev" +version = "4.0.0" dependencies = [ "frame-support", "frame-system", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-runtime 31.0.1", - "sp-version 29.0.0", + "sp-core 37.0.0", + "sp-runtime 42.0.0", + "sp-version 40.0.0", ] [[package]] name = "frame-support-test-pallet" -version = "4.0.0-dev" +version = "4.0.0" dependencies = [ "frame-support", "frame-system", "parity-scale-codec", "scale-info", "serde", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", ] [[package]] @@ -7015,7 +7026,7 @@ dependencies = [ [[package]] name = "frame-system" -version = "28.0.0" +version = "41.0.0" dependencies = [ "cfg-if", "criterion", @@ -7025,48 +7036,48 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core 28.0.0", - "sp-externalities 0.25.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-version 29.0.0", - "sp-weights 27.0.0", + "sp-core 37.0.0", + "sp-externalities 0.30.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", + "sp-version 40.0.0", + "sp-weights 32.0.0", "substrate-test-runtime-client", ] [[package]] name = "frame-system-benchmarking" -version = "28.0.0" +version = "41.0.0" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-externalities 0.25.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-version 29.0.0", + "sp-core 37.0.0", + "sp-externalities 0.30.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", + "sp-version 40.0.0", ] [[package]] name = "frame-system-rpc-runtime-api" -version = "26.0.0" +version = "37.0.0" dependencies = [ "docify", "parity-scale-codec", - "sp-api 26.0.0", + "sp-api 37.0.0", ] [[package]] name = "frame-try-runtime" -version = "0.34.0" +version = "0.47.0" dependencies = [ "frame-support", "parity-scale-codec", - "sp-api 26.0.0", - "sp-runtime 31.0.1", + "sp-api 37.0.0", + "sp-runtime 42.0.0", ] [[package]] @@ -7278,7 +7289,7 @@ dependencies = [ [[package]] name = "generate-bags" -version = "28.0.0" +version = "41.0.0" dependencies = [ "chrono", "frame-election-provider-support", @@ -7475,7 +7486,7 @@ dependencies = [ [[package]] name = "glutton-westend-runtime" -version = "3.0.0" +version = "18.0.0" dependencies = [ "cumulus-pallet-aura-ext", "cumulus-pallet-parachain-system", @@ -7498,19 +7509,19 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde_json", - "sp-api 26.0.0", + "sp-api 37.0.0", "sp-block-builder", "sp-consensus-aura", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-genesis-builder", "sp-inherents", "sp-keyring", "sp-offchain", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", "sp-session", - "sp-storage 19.0.0", + "sp-storage 22.0.0", "sp-transaction-pool", - "sp-version 29.0.0", + "sp-version 40.0.0", "staging-parachain-info", "staging-xcm", "staging-xcm-builder", @@ -7521,7 +7532,7 @@ dependencies = [ [[package]] name = "governance-westend-integration-tests" -version = "0.0.0" +version = "0.1.0" dependencies = [ "collectives-westend-runtime", "emulated-integration-tests-common", @@ -7531,8 +7542,8 @@ dependencies = [ "pallet-whitelist", "pallet-xcm", "parity-scale-codec", - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-runtime 42.0.0", "staging-xcm", "westend-runtime", "westend-system-emulated-network", @@ -7738,7 +7749,7 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5313b072ce3c597065a808dbf612c4c8e8590bdbf8b579508bf7a762c5eae6cd" dependencies = [ - "arrayvec 0.7.4", + "arrayvec 0.7.6", ] [[package]] @@ -8017,7 +8028,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2 0.5.9", + "socket2 0.4.9", "tokio", "tower-service", "tracing", @@ -8981,7 +8992,7 @@ checksum = "c33070833c9ee02266356de0c43f723152bd38bd96ddf52c82b3af10c9138b28" [[package]] name = "kitchensink-runtime" -version = "3.0.0-dev" +version = "3.0.0" dependencies = [ "array-bytes 6.2.2", "log", @@ -8989,7 +9000,7 @@ dependencies = [ "pallet-example-mbm", "pallet-example-tasks", "parity-scale-codec", - "polkadot-sdk 0.1.0", + "polkadot-sdk 2506.0.0", "primitive-types 0.13.1", "scale-info", "serde_json", @@ -9399,7 +9410,7 @@ version = "0.46.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ced237d0bd84bbebb7c2cad4c073160dacb4fe40534963c32ed6d4c6bb7702a3" dependencies = [ - "arrayvec 0.7.4", + "arrayvec 0.7.6", "asynchronous-codec 0.7.0", "bytes", "either", @@ -10205,8 +10216,8 @@ dependencies = [ "num-traits", "parking_lot 0.12.3", "relay-utils", - "sp-arithmetic 23.0.0", - "sp-core 28.0.0", + "sp-arithmetic 27.0.0", + "sp-core 37.0.0", ] [[package]] @@ -10223,7 +10234,7 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "minimal-template-node" -version = "0.0.0" +version = "0.1.0" dependencies = [ "clap", "docify", @@ -10231,16 +10242,16 @@ dependencies = [ "futures-timer", "jsonrpsee", "minimal-template-runtime", - "polkadot-sdk 0.1.0", + "polkadot-sdk 2506.0.0", ] [[package]] name = "minimal-template-runtime" -version = "0.0.0" +version = "0.1.0" dependencies = [ "pallet-minimal-template", "parity-scale-codec", - "polkadot-sdk 0.1.0", + "polkadot-sdk 2506.0.0", "scale-info", "serde_json", ] @@ -10273,7 +10284,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "daa3eb39495d8e2e2947a1d862852c90cc6a4a8845f8b41c8829cb9fcc047f4a" dependencies = [ "arrayref", - "arrayvec 0.7.4", + "arrayvec 0.7.6", "bitflags 1.3.2", "blake2 0.10.6", "c2-chacha", @@ -10293,7 +10304,7 @@ dependencies = [ [[package]] name = "mmr-gadget" -version = "29.0.0" +version = "46.0.0" dependencies = [ "futures", "log", @@ -10302,31 +10313,31 @@ dependencies = [ "sc-block-builder", "sc-client-api", "sc-offchain", - "sp-api 26.0.0", + "sp-api 37.0.0", "sp-blockchain", "sp-consensus", "sp-consensus-beefy", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-mmr-primitives", - "sp-runtime 31.0.1", - "sp-tracing 16.0.0", + "sp-runtime 42.0.0", + "sp-tracing 17.1.0", "substrate-test-runtime-client", "tokio", ] [[package]] name = "mmr-rpc" -version = "28.0.0" +version = "41.0.0" dependencies = [ "jsonrpsee", "parity-scale-codec", "serde", "serde_json", - "sp-api 26.0.0", + "sp-api 37.0.0", "sp-blockchain", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-mmr-primitives", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", ] [[package]] @@ -10701,7 +10712,7 @@ checksum = "43794a0ace135be66a25d3ae77d41b91615fb68ae937f904090203e81f755b65" [[package]] name = "node-bench" -version = "0.9.0-dev" +version = "0.9.0" dependencies = [ "array-bytes 6.2.2", "async-trait", @@ -10725,13 +10736,13 @@ dependencies = [ "serde", "serde_json", "sp-consensus", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-inherents", - "sp-runtime 31.0.1", - "sp-state-machine 0.35.0", + "sp-runtime 42.0.0", + "sp-state-machine 0.46.0", "sp-timestamp", - "sp-tracing 16.0.0", - "sp-trie 29.0.0", + "sp-tracing 17.1.0", + "sp-trie 40.0.0", "tempfile", ] @@ -10739,13 +10750,13 @@ dependencies = [ name = "node-primitives" version = "2.0.0" dependencies = [ - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-runtime 42.0.0", ] [[package]] name = "node-rpc" -version = "3.0.0-dev" +version = "3.0.0" dependencies = [ "jsonrpsee", "mmr-rpc", @@ -10763,15 +10774,15 @@ dependencies = [ "sc-rpc", "sc-sync-state-rpc", "sc-transaction-pool-api", - "sp-api 26.0.0", - "sp-application-crypto 30.0.0", + "sp-api 37.0.0", + "sp-application-crypto 41.0.0", "sp-block-builder", "sp-blockchain", "sp-consensus", "sp-consensus-babe", "sp-consensus-beefy", - "sp-keystore 0.34.0", - "sp-runtime 31.0.1", + "sp-keystore 0.43.0", + "sp-runtime 42.0.0", "sp-statement-store", "substrate-frame-rpc-system", "substrate-state-trie-migration-rpc", @@ -10802,7 +10813,7 @@ dependencies = [ [[package]] name = "node-testing" -version = "3.0.0-dev" +version = "3.0.0" dependencies = [ "frame-metadata-hash-extension", "frame-system", @@ -10819,17 +10830,17 @@ dependencies = [ "sc-client-api", "sc-client-db", "sc-consensus", - "sc-executor 0.32.0", + "sc-executor 0.43.0", "sc-service", - "sp-api 26.0.0", + "sp-api 37.0.0", "sp-block-builder", "sp-blockchain", "sp-consensus", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-crypto-hashing 0.1.0", "sp-inherents", "sp-keyring", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", "sp-timestamp", "staging-node-cli", "substrate-test-client", @@ -10963,7 +10974,7 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a652d9771a63711fd3c3deb670acfbe5c30a4072e664d7a3bf5a9e1056ac72c3" dependencies = [ - "arrayvec 0.7.4", + "arrayvec 0.7.6", "itoa", ] @@ -11244,15 +11255,15 @@ dependencies = [ "parity-scale-codec", "polkadot-sdk-frame", "scale-info", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-session", "sp-staking", - "sp-tracing 16.0.0", + "sp-tracing 17.1.0", ] [[package]] name = "pallet-alliance" -version = "27.0.0" +version = "40.0.0" dependencies = [ "array-bytes 6.2.2", "frame-benchmarking", @@ -11264,15 +11275,15 @@ dependencies = [ "pallet-identity", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-crypto-hashing 0.1.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-io 41.0.1", + "sp-runtime 42.0.0", ] [[package]] name = "pallet-asset-conversion" -version = "10.0.0" +version = "23.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -11283,16 +11294,16 @@ dependencies = [ "parity-scale-codec", "primitive-types 0.13.1", "scale-info", - "sp-api 26.0.0", - "sp-arithmetic 23.0.0", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-api 37.0.0", + "sp-arithmetic 27.0.0", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", ] [[package]] name = "pallet-asset-conversion-ops" -version = "0.1.0" +version = "0.9.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -11304,15 +11315,15 @@ dependencies = [ "parity-scale-codec", "primitive-types 0.13.1", "scale-info", - "sp-arithmetic 23.0.0", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-arithmetic 27.0.0", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", ] [[package]] name = "pallet-asset-conversion-tx-payment" -version = "10.0.0" +version = "23.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -11323,13 +11334,13 @@ dependencies = [ "pallet-transaction-payment", "parity-scale-codec", "scale-info", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-io 41.0.1", + "sp-runtime 42.0.0", ] [[package]] name = "pallet-asset-rate" -version = "7.0.0" +version = "20.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -11337,14 +11348,14 @@ dependencies = [ "pallet-balances", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", ] [[package]] name = "pallet-asset-rewards" -version = "0.1.0" +version = "0.3.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -11355,17 +11366,17 @@ dependencies = [ "parity-scale-codec", "primitive-types 0.13.1", "scale-info", - "sp-api 26.0.0", - "sp-arithmetic 23.0.0", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-api 37.0.0", + "sp-arithmetic 27.0.0", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", "sp-std 14.0.0", ] [[package]] name = "pallet-asset-tx-payment" -version = "28.0.0" +version = "41.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -11377,13 +11388,13 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-io 41.0.1", + "sp-runtime 42.0.0", ] [[package]] name = "pallet-assets" -version = "29.1.0" +version = "43.0.0" dependencies = [ "ethereum-standards", "frame-benchmarking", @@ -11395,14 +11406,14 @@ dependencies = [ "pallet-revive", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", ] [[package]] name = "pallet-assets-freezer" -version = "0.1.0" +version = "0.8.0" dependencies = [ "log", "pallet-assets", @@ -11414,7 +11425,7 @@ dependencies = [ [[package]] name = "pallet-assets-holder" -version = "0.1.0" +version = "0.3.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -11424,14 +11435,14 @@ dependencies = [ "pallet-balances", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", ] [[package]] name = "pallet-atomic-swap" -version = "28.0.0" +version = "41.0.0" dependencies = [ "pallet-balances", "parity-scale-codec", @@ -11441,7 +11452,7 @@ dependencies = [ [[package]] name = "pallet-aura" -version = "27.0.0" +version = "40.0.0" dependencies = [ "frame-support", "frame-system", @@ -11449,46 +11460,46 @@ dependencies = [ "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-application-crypto 30.0.0", + "sp-application-crypto 41.0.0", "sp-consensus-aura", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", ] [[package]] name = "pallet-authority-discovery" -version = "28.0.0" +version = "41.0.0" dependencies = [ "frame-support", "frame-system", "pallet-session", "parity-scale-codec", "scale-info", - "sp-application-crypto 30.0.0", + "sp-application-crypto 41.0.0", "sp-authority-discovery", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", ] [[package]] name = "pallet-authorship" -version = "28.0.0" +version = "41.0.0" dependencies = [ "frame-support", "frame-system", "impl-trait-for-tuples", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", ] [[package]] name = "pallet-babe" -version = "28.0.0" +version = "41.0.0" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -11504,19 +11515,19 @@ dependencies = [ "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-application-crypto 30.0.0", + "sp-application-crypto 41.0.0", "sp-consensus-babe", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", "sp-session", "sp-staking", - "sp-tracing 16.0.0", + "sp-tracing 17.1.0", ] [[package]] name = "pallet-bags-list" -version = "27.0.0" +version = "40.0.0" dependencies = [ "aquamarine", "docify", @@ -11528,15 +11539,15 @@ dependencies = [ "pallet-balances", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-tracing 16.0.0", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", + "sp-tracing 17.1.0", ] [[package]] name = "pallet-bags-list-fuzzer" -version = "4.0.0-dev" +version = "4.0.0" dependencies = [ "frame-election-provider-support", "honggfuzz", @@ -11545,7 +11556,7 @@ dependencies = [ [[package]] name = "pallet-bags-list-remote-tests" -version = "4.0.0-dev" +version = "4.0.0" dependencies = [ "frame-election-provider-support", "frame-remote-externalities", @@ -11554,13 +11565,13 @@ dependencies = [ "log", "pallet-bags-list", "pallet-staking", - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-runtime 42.0.0", ] [[package]] name = "pallet-balances" -version = "28.0.0" +version = "42.0.0" dependencies = [ "docify", "frame-benchmarking", @@ -11571,14 +11582,14 @@ dependencies = [ "parity-scale-codec", "paste", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", ] [[package]] name = "pallet-beefy" -version = "28.0.0" +version = "42.0.0" dependencies = [ "frame-election-provider-support", "frame-support", @@ -11595,18 +11606,18 @@ dependencies = [ "scale-info", "serde", "sp-consensus-beefy", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", "sp-session", "sp-staking", - "sp-state-machine 0.35.0", - "sp-tracing 16.0.0", + "sp-state-machine 0.46.0", + "sp-tracing 17.1.0", ] [[package]] name = "pallet-beefy-mmr" -version = "28.0.0" +version = "42.0.0" dependencies = [ "array-bytes 6.2.2", "binary-merkle-tree", @@ -11620,18 +11631,18 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-api 26.0.0", + "sp-api 37.0.0", "sp-consensus-beefy", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", "sp-staking", - "sp-state-machine 0.35.0", + "sp-state-machine 0.46.0", ] [[package]] name = "pallet-bounties" -version = "27.0.0" +version = "40.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -11641,9 +11652,9 @@ dependencies = [ "pallet-treasury", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", ] [[package]] @@ -11664,15 +11675,15 @@ dependencies = [ "scale-info", "serde", "sp-consensus-beefy", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", "sp-std 14.0.0", ] [[package]] name = "pallet-bridge-grandpa" -version = "0.7.0" +version = "0.21.0" dependencies = [ "bp-header-chain", "bp-runtime", @@ -11684,15 +11695,15 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-consensus-grandpa", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", "sp-std 14.0.0", ] [[package]] name = "pallet-bridge-messages" -version = "0.7.0" +version = "0.21.0" dependencies = [ "bp-header-chain", "bp-messages", @@ -11706,16 +11717,16 @@ dependencies = [ "pallet-bridge-grandpa", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", "sp-std 14.0.0", - "sp-trie 29.0.0", + "sp-trie 40.0.0", ] [[package]] name = "pallet-bridge-parachains" -version = "0.7.0" +version = "0.21.0" dependencies = [ "bp-header-chain", "bp-parachains", @@ -11729,15 +11740,15 @@ dependencies = [ "pallet-bridge-grandpa", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", "sp-std 14.0.0", ] [[package]] name = "pallet-bridge-relayers" -version = "0.7.0" +version = "0.21.0" dependencies = [ "bp-header-chain", "bp-messages", @@ -11758,15 +11769,15 @@ dependencies = [ "pallet-utility", "parity-scale-codec", "scale-info", - "sp-arithmetic 23.0.0", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-arithmetic 27.0.0", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", ] [[package]] name = "pallet-broker" -version = "0.6.0" +version = "0.20.0" dependencies = [ "bitvec", "frame-benchmarking", @@ -11776,17 +11787,17 @@ dependencies = [ "parity-scale-codec", "pretty_assertions", "scale-info", - "sp-api 26.0.0", - "sp-arithmetic 23.0.0", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-tracing 16.0.0", + "sp-api 37.0.0", + "sp-arithmetic 27.0.0", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", + "sp-tracing 17.1.0", ] [[package]] name = "pallet-child-bounties" -version = "27.0.0" +version = "40.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -11797,14 +11808,14 @@ dependencies = [ "pallet-treasury", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", ] [[package]] name = "pallet-collator-selection" -version = "9.0.0" +version = "22.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -11819,15 +11830,15 @@ dependencies = [ "rand 0.8.5", "scale-info", "sp-consensus-aura", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-io 41.0.1", + "sp-runtime 42.0.0", "sp-staking", - "sp-tracing 16.0.0", + "sp-tracing 17.1.0", ] [[package]] name = "pallet-collective" -version = "28.0.0" +version = "41.0.0" dependencies = [ "docify", "frame-benchmarking", @@ -11837,28 +11848,28 @@ dependencies = [ "pallet-balances", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", ] [[package]] name = "pallet-collective-content" -version = "0.6.0" +version = "0.19.0" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", ] [[package]] name = "pallet-contracts" -version = "27.0.0" +version = "41.0.0" dependencies = [ "array-bytes 6.2.2", "assert_matches", @@ -11884,12 +11895,12 @@ dependencies = [ "scale-info", "serde", "smallvec", - "sp-api 26.0.0", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-keystore 0.34.0", - "sp-runtime 31.0.1", - "sp-tracing 16.0.0", + "sp-api 37.0.0", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-keystore 0.43.0", + "sp-runtime 42.0.0", + "sp-tracing 17.1.0", "staging-xcm", "staging-xcm-builder", "wasm-instrument", @@ -11904,7 +11915,7 @@ dependencies = [ "anyhow", "frame-system", "parity-wasm", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", "tempfile", "toml 0.8.19", "twox-hash", @@ -11912,7 +11923,7 @@ dependencies = [ [[package]] name = "pallet-contracts-mock-network" -version = "3.0.0" +version = "18.0.0" dependencies = [ "frame-support", "frame-system", @@ -11929,12 +11940,12 @@ dependencies = [ "polkadot-primitives", "polkadot-runtime-parachains", "scale-info", - "sp-api 26.0.0", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-keystore 0.34.0", - "sp-runtime 31.0.1", - "sp-tracing 16.0.0", + "sp-api 37.0.0", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-keystore 0.43.0", + "sp-runtime 42.0.0", + "sp-tracing 17.1.0", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -11943,7 +11954,7 @@ dependencies = [ [[package]] name = "pallet-contracts-proc-macro" -version = "18.0.0" +version = "23.0.3" dependencies = [ "proc-macro2 1.0.95", "quote 1.0.40", @@ -11952,7 +11963,7 @@ dependencies = [ [[package]] name = "pallet-contracts-uapi" -version = "5.0.0" +version = "14.0.0" dependencies = [ "bitflags 1.3.2", "parity-scale-codec", @@ -11962,7 +11973,7 @@ dependencies = [ [[package]] name = "pallet-conviction-voting" -version = "28.0.0" +version = "41.0.0" dependencies = [ "assert_matches", "frame-benchmarking", @@ -11972,14 +11983,14 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", ] [[package]] name = "pallet-core-fellowship" -version = "12.0.0" +version = "25.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -11988,10 +11999,10 @@ dependencies = [ "pallet-ranked-collective", "parity-scale-codec", "scale-info", - "sp-arithmetic 23.0.0", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-arithmetic 27.0.0", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", ] [[package]] @@ -12003,13 +12014,13 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-io 41.0.1", + "sp-runtime 42.0.0", ] [[package]] name = "pallet-delegated-staking" -version = "1.0.0" +version = "8.0.0" dependencies = [ "frame-election-provider-support", "frame-support", @@ -12022,16 +12033,16 @@ dependencies = [ "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", "sp-staking", - "sp-tracing 16.0.0", + "sp-tracing 17.1.0", ] [[package]] name = "pallet-democracy" -version = "28.0.0" +version = "41.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -12043,14 +12054,14 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", ] [[package]] name = "pallet-dev-mode" -version = "10.0.0" +version = "23.0.0" dependencies = [ "frame-support", "frame-system", @@ -12058,14 +12069,14 @@ dependencies = [ "pallet-balances", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", ] [[package]] name = "pallet-dummy-dim" -version = "1.0.0" +version = "0.2.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -12074,11 +12085,11 @@ dependencies = [ "pallet-people", "parity-scale-codec", "scale-info", - "sp-api 26.0.0", - "sp-arithmetic 23.0.0", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-api 37.0.0", + "sp-arithmetic 27.0.0", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", "verifiable", ] @@ -12101,17 +12112,17 @@ dependencies = [ "parity-scale-codec", "parking_lot 0.12.3", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", + "sp-core 37.0.0", + "sp-io 41.0.1", "sp-npos-elections", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", "sp-staking", - "sp-tracing 16.0.0", + "sp-tracing 17.1.0", ] [[package]] name = "pallet-election-provider-multi-block" -version = "0.9.0" +version = "0.2.0" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -12123,18 +12134,18 @@ dependencies = [ "parking_lot 0.12.3", "rand 0.8.5", "scale-info", - "sp-arithmetic 23.0.0", - "sp-core 28.0.0", - "sp-io 30.0.0", + "sp-arithmetic 27.0.0", + "sp-core 37.0.0", + "sp-io 41.0.1", "sp-npos-elections", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", "sp-std 14.0.0", - "sp-tracing 16.0.0", + "sp-tracing 17.1.0", ] [[package]] name = "pallet-election-provider-multi-phase" -version = "27.0.0" +version = "40.0.0" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -12148,31 +12159,31 @@ dependencies = [ "parking_lot 0.12.3", "rand 0.8.5", "scale-info", - "sp-arithmetic 23.0.0", - "sp-core 28.0.0", - "sp-io 30.0.0", + "sp-arithmetic 27.0.0", + "sp-core 37.0.0", + "sp-io 41.0.1", "sp-npos-elections", - "sp-runtime 31.0.1", - "sp-tracing 16.0.0", + "sp-runtime 42.0.0", + "sp-tracing 17.1.0", "strum 0.26.3", "tokio", ] [[package]] name = "pallet-election-provider-support-benchmarking" -version = "27.0.0" +version = "40.0.0" dependencies = [ "frame-benchmarking", "frame-election-provider-support", "frame-system", "parity-scale-codec", "sp-npos-elections", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", ] [[package]] name = "pallet-elections-phragmen" -version = "29.0.0" +version = "42.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -12181,12 +12192,12 @@ dependencies = [ "pallet-balances", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", + "sp-core 37.0.0", + "sp-io 41.0.1", "sp-npos-elections", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", "sp-staking", - "sp-tracing 16.0.0", + "sp-tracing 17.1.0", "substrate-test-utils", ] @@ -12202,15 +12213,15 @@ dependencies = [ "pallet-verify-signature", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", + "sp-core 37.0.0", + "sp-io 41.0.1", "sp-keyring", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", ] [[package]] name = "pallet-example-basic" -version = "27.0.0" +version = "34.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -12219,14 +12230,14 @@ dependencies = [ "pallet-balances", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", ] [[package]] name = "pallet-example-frame-crate" -version = "0.0.1" +version = "0.1.0" dependencies = [ "parity-scale-codec", "polkadot-sdk-frame", @@ -12235,7 +12246,7 @@ dependencies = [ [[package]] name = "pallet-example-kitchensink" -version = "4.0.0-dev" +version = "4.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -12244,9 +12255,9 @@ dependencies = [ "pallet-balances", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", ] [[package]] @@ -12260,7 +12271,7 @@ dependencies = [ "pallet-migrations", "parity-scale-codec", "scale-info", - "sp-io 30.0.0", + "sp-io 41.0.1", ] [[package]] @@ -12273,15 +12284,15 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-keystore 0.34.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-keystore 0.43.0", + "sp-runtime 42.0.0", ] [[package]] name = "pallet-example-single-block-migrations" -version = "0.0.1" +version = "0.1.0" dependencies = [ "docify", "frame-support", @@ -12290,10 +12301,10 @@ dependencies = [ "pallet-balances", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-version 29.0.0", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", + "sp-version 40.0.0", ] [[package]] @@ -12306,8 +12317,8 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", + "sp-core 37.0.0", + "sp-io 41.0.1", ] [[package]] @@ -12320,14 +12331,14 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", ] [[package]] name = "pallet-example-view-functions" -version = "1.0.0" +version = "0.3.0" dependencies = [ "frame-metadata 23.0.0", "frame-support", @@ -12336,15 +12347,15 @@ dependencies = [ "parity-scale-codec", "pretty_assertions", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-metadata-ir 0.6.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-metadata-ir 0.11.0", + "sp-runtime 42.0.0", ] [[package]] name = "pallet-examples" -version = "4.0.0-dev" +version = "4.0.0" dependencies = [ "pallet-default-config-example", "pallet-dev-mode", @@ -12361,7 +12372,7 @@ dependencies = [ [[package]] name = "pallet-fast-unstake" -version = "27.0.0" +version = "40.0.0" dependencies = [ "docify", "frame-benchmarking", @@ -12375,16 +12386,16 @@ dependencies = [ "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", "sp-staking", - "sp-tracing 16.0.0", + "sp-tracing 17.1.0", ] [[package]] name = "pallet-glutton" -version = "14.0.0" +version = "27.0.0" dependencies = [ "blake2 0.10.6", "frame-benchmarking", @@ -12393,15 +12404,15 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-inherents", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-io 41.0.1", + "sp-runtime 42.0.0", ] [[package]] name = "pallet-grandpa" -version = "28.0.0" +version = "41.0.0" dependencies = [ "finality-grandpa", "frame-benchmarking", @@ -12418,20 +12429,20 @@ dependencies = [ "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-application-crypto 30.0.0", + "sp-application-crypto 41.0.0", "sp-consensus-grandpa", - "sp-core 28.0.0", - "sp-io 30.0.0", + "sp-core 37.0.0", + "sp-io 41.0.1", "sp-keyring", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", "sp-session", "sp-staking", - "sp-tracing 16.0.0", + "sp-tracing 17.1.0", ] [[package]] name = "pallet-identity" -version = "29.0.0" +version = "41.0.0" dependencies = [ "enumflags2", "frame-benchmarking", @@ -12441,15 +12452,15 @@ dependencies = [ "pallet-balances", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-keystore 0.34.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-keystore 0.43.0", + "sp-runtime 42.0.0", ] [[package]] name = "pallet-im-online" -version = "27.0.0" +version = "40.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -12459,16 +12470,16 @@ dependencies = [ "pallet-session", "parity-scale-codec", "scale-info", - "sp-application-crypto 30.0.0", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-application-crypto 41.0.0", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", "sp-staking", ] [[package]] name = "pallet-indices" -version = "28.0.0" +version = "41.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -12476,14 +12487,14 @@ dependencies = [ "pallet-balances", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", ] [[package]] name = "pallet-insecure-randomness-collective-flip" -version = "16.0.0" +version = "29.0.0" dependencies = [ "parity-scale-codec", "polkadot-sdk-frame", @@ -12493,7 +12504,7 @@ dependencies = [ [[package]] name = "pallet-lottery" -version = "28.0.0" +version = "41.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -12502,14 +12513,14 @@ dependencies = [ "pallet-balances", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", ] [[package]] name = "pallet-membership" -version = "28.0.0" +version = "41.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -12517,14 +12528,14 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", ] [[package]] name = "pallet-message-queue" -version = "31.0.0" +version = "44.0.0" dependencies = [ "environmental", "frame-benchmarking", @@ -12536,18 +12547,18 @@ dependencies = [ "rand_distr", "scale-info", "serde", - "sp-arithmetic 23.0.0", - "sp-core 28.0.0", + "sp-arithmetic 27.0.0", + "sp-core 37.0.0", "sp-crypto-hashing 0.1.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-tracing 16.0.0", - "sp-weights 27.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", + "sp-tracing 17.1.0", + "sp-weights 32.0.0", ] [[package]] name = "pallet-meta-tx" -version = "0.1.0" +version = "0.3.0" dependencies = [ "docify", "frame-benchmarking", @@ -12559,17 +12570,17 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core 28.0.0", - "sp-io 30.0.0", + "sp-core 37.0.0", + "sp-io 41.0.1", "sp-keyring", - "sp-keystore 0.34.0", - "sp-runtime 31.0.1", + "sp-keystore 0.43.0", + "sp-runtime 42.0.0", "sp-std 14.0.0", ] [[package]] name = "pallet-migrations" -version = "1.0.0" +version = "11.0.0" dependencies = [ "docify", "frame-benchmarking", @@ -12582,37 +12593,37 @@ dependencies = [ "polkadot-sdk-frame", "pretty_assertions", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-tracing 16.0.0", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", + "sp-tracing 17.1.0", ] [[package]] name = "pallet-minimal-template" -version = "0.0.0" +version = "0.1.0" dependencies = [ "parity-scale-codec", - "polkadot-sdk 0.1.0", + "polkadot-sdk 2506.0.0", "scale-info", ] [[package]] name = "pallet-mixnet" -version = "0.4.0" +version = "0.17.0" dependencies = [ "log", "parity-scale-codec", "polkadot-sdk-frame", "scale-info", "serde", - "sp-application-crypto 30.0.0", + "sp-application-crypto 41.0.0", "sp-mixnet", ] [[package]] name = "pallet-mmr" -version = "27.0.0" +version = "41.0.0" dependencies = [ "itertools 0.11.0", "log", @@ -12620,12 +12631,12 @@ dependencies = [ "polkadot-sdk-frame", "scale-info", "sp-mmr-primitives", - "sp-tracing 16.0.0", + "sp-tracing 17.1.0", ] [[package]] name = "pallet-multisig" -version = "28.0.0" +version = "41.0.0" dependencies = [ "log", "pallet-balances", @@ -12636,7 +12647,7 @@ dependencies = [ [[package]] name = "pallet-nft-fractionalization" -version = "10.0.0" +version = "24.0.0" dependencies = [ "log", "pallet-assets", @@ -12649,7 +12660,7 @@ dependencies = [ [[package]] name = "pallet-nfts" -version = "22.0.0" +version = "35.0.0" dependencies = [ "enumflags2", "frame-benchmarking", @@ -12659,34 +12670,34 @@ dependencies = [ "pallet-balances", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-keystore 0.34.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-keystore 0.43.0", + "sp-runtime 42.0.0", ] [[package]] name = "pallet-nfts-runtime-api" -version = "14.0.0" +version = "27.0.0" dependencies = [ "parity-scale-codec", - "sp-api 26.0.0", + "sp-api 37.0.0", ] [[package]] name = "pallet-nis" -version = "28.0.0" +version = "41.0.0" dependencies = [ "pallet-balances", "parity-scale-codec", "polkadot-sdk-frame", "scale-info", - "sp-io 30.0.0", + "sp-io 41.0.1", ] [[package]] name = "pallet-node-authorization" -version = "28.0.0" +version = "41.0.0" dependencies = [ "log", "parity-scale-codec", @@ -12696,7 +12707,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools" -version = "25.0.0" +version = "39.0.0" dependencies = [ "frame-support", "frame-system", @@ -12704,16 +12715,16 @@ dependencies = [ "pallet-balances", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", "sp-staking", - "sp-tracing 16.0.0", + "sp-tracing 17.1.0", ] [[package]] name = "pallet-nomination-pools-benchmarking" -version = "26.0.0" +version = "39.0.0" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -12728,10 +12739,10 @@ dependencies = [ "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-runtime-interface 24.0.0", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", + "sp-runtime-interface 30.0.0", "sp-staking", ] @@ -12745,18 +12756,18 @@ dependencies = [ "log", "pallet-nomination-pools", "rand 0.8.5", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-tracing 16.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", + "sp-tracing 17.1.0", ] [[package]] name = "pallet-nomination-pools-runtime-api" -version = "23.0.0" +version = "37.0.0" dependencies = [ "pallet-nomination-pools", "parity-scale-codec", - "sp-api 26.0.0", + "sp-api 37.0.0", ] [[package]] @@ -12776,16 +12787,16 @@ dependencies = [ "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", "sp-staking", - "sp-tracing 16.0.0", + "sp-tracing 17.1.0", ] [[package]] name = "pallet-offences" -version = "27.0.0" +version = "40.0.0" dependencies = [ "frame-support", "frame-system", @@ -12793,15 +12804,15 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", "sp-staking", ] [[package]] name = "pallet-offences-benchmarking" -version = "28.0.0" +version = "41.0.0" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -12819,16 +12830,16 @@ dependencies = [ "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", "sp-staking", - "sp-tracing 16.0.0", + "sp-tracing 17.1.0", ] [[package]] name = "pallet-origin-restriction" -version = "1.0.0" +version = "0.2.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -12837,21 +12848,21 @@ dependencies = [ "pallet-transaction-payment", "parity-scale-codec", "scale-info", - "sp-arithmetic 23.0.0", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-arithmetic 27.0.0", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", ] [[package]] name = "pallet-paged-list" -version = "0.6.0" +version = "0.19.0" dependencies = [ "docify", "parity-scale-codec", "polkadot-sdk-frame", "scale-info", - "sp-metadata-ir 0.6.0", + "sp-metadata-ir 0.11.0", ] [[package]] @@ -12866,7 +12877,7 @@ dependencies = [ [[package]] name = "pallet-parachain-template" -version = "0.0.0" +version = "0.1.0" dependencies = [ "parity-scale-codec", "polkadot-sdk-frame", @@ -12875,7 +12886,7 @@ dependencies = [ [[package]] name = "pallet-parameters" -version = "0.1.0" +version = "0.12.0" dependencies = [ "docify", "frame-benchmarking", @@ -12887,14 +12898,14 @@ dependencies = [ "paste", "scale-info", "serde", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", ] [[package]] name = "pallet-people" -version = "1.0.0" +version = "0.2.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -12902,16 +12913,16 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-arithmetic 23.0.0", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-arithmetic 27.0.0", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", "verifiable", ] [[package]] name = "pallet-preimage" -version = "28.0.0" +version = "41.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -12920,14 +12931,14 @@ dependencies = [ "pallet-balances", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", ] [[package]] name = "pallet-proxy" -version = "28.0.0" +version = "41.0.0" dependencies = [ "pallet-balances", "pallet-utility", @@ -12938,7 +12949,7 @@ dependencies = [ [[package]] name = "pallet-ranked-collective" -version = "28.0.0" +version = "41.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -12947,15 +12958,15 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-arithmetic 23.0.0", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-arithmetic 27.0.0", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", ] [[package]] name = "pallet-recovery" -version = "28.0.0" +version = "41.0.0" dependencies = [ "pallet-balances", "parity-scale-codec", @@ -12965,7 +12976,7 @@ dependencies = [ [[package]] name = "pallet-referenda" -version = "28.0.0" +version = "41.0.0" dependencies = [ "assert_matches", "frame-benchmarking", @@ -12978,15 +12989,15 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-arithmetic 23.0.0", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-arithmetic 27.0.0", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", ] [[package]] name = "pallet-remark" -version = "28.0.0" +version = "41.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -12994,14 +13005,14 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", ] [[package]] name = "pallet-revive" -version = "0.1.0" +version = "0.7.0" dependencies = [ "alloy-core", "array-bytes 6.2.2", @@ -13041,23 +13052,23 @@ dependencies = [ "secp256k1 0.28.2", "serde", "serde_json", - "sp-api 26.0.0", - "sp-arithmetic 23.0.0", + "sp-api 37.0.0", + "sp-arithmetic 27.0.0", "sp-consensus-aura", "sp-consensus-babe", "sp-consensus-slots", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-keystore 0.34.0", - "sp-runtime 31.0.1", - "sp-tracing 16.0.0", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-keystore 0.43.0", + "sp-runtime 42.0.0", + "sp-tracing 17.1.0", "substrate-bn", "subxt-signer 0.41.0", ] [[package]] name = "pallet-revive-eth-rpc" -version = "0.1.0" +version = "0.7.0" dependencies = [ "anyhow", "clap", @@ -13077,12 +13088,12 @@ dependencies = [ "sc-rpc-api", "sc-service", "serde_json", - "sp-arithmetic 23.0.0", - "sp-core 28.0.0", + "sp-arithmetic 27.0.0", + "sp-core 37.0.0", "sp-crypto-hashing 0.1.0", "sp-rpc", - "sp-runtime 31.0.1", - "sp-weights 27.0.0", + "sp-runtime 42.0.0", + "sp-weights 32.0.0", "sqlx", "static_init", "substrate-cli-test-utils", @@ -13095,20 +13106,20 @@ dependencies = [ [[package]] name = "pallet-revive-fixtures" -version = "0.1.0" +version = "0.4.0" dependencies = [ "anyhow", "cargo_metadata", "pallet-revive-uapi", "polkavm-linker 0.21.0", - "sp-core 28.0.0", - "sp-io 30.0.0", + "sp-core 37.0.0", + "sp-io 41.0.1", "toml 0.8.19", ] [[package]] name = "pallet-revive-proc-macro" -version = "0.1.0" +version = "0.3.0" dependencies = [ "proc-macro2 1.0.95", "quote 1.0.40", @@ -13117,7 +13128,7 @@ dependencies = [ [[package]] name = "pallet-revive-uapi" -version = "0.1.0" +version = "0.5.0" dependencies = [ "bitflags 1.3.2", "pallet-revive-proc-macro", @@ -13128,7 +13139,7 @@ dependencies = [ [[package]] name = "pallet-root-offences" -version = "25.0.0" +version = "38.0.0" dependencies = [ "frame-election-provider-support", "frame-support", @@ -13140,27 +13151,27 @@ dependencies = [ "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", "sp-staking", ] [[package]] name = "pallet-root-testing" -version = "4.0.0" +version = "17.0.0" dependencies = [ "frame-support", "frame-system", "parity-scale-codec", "scale-info", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-io 41.0.1", + "sp-runtime 42.0.0", ] [[package]] name = "pallet-safe-mode" -version = "9.0.0" +version = "22.0.0" dependencies = [ "docify", "pallet-balances", @@ -13173,7 +13184,7 @@ dependencies = [ [[package]] name = "pallet-salary" -version = "13.0.0" +version = "26.0.0" dependencies = [ "log", "pallet-ranked-collective", @@ -13184,7 +13195,7 @@ dependencies = [ [[package]] name = "pallet-sassafras" -version = "0.3.5-dev" +version = "0.3.5" dependencies = [ "array-bytes 6.2.2", "frame-benchmarking", @@ -13194,15 +13205,15 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-consensus-sassafras", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-crypto-hashing 0.1.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-io 41.0.1", + "sp-runtime 42.0.0", ] [[package]] name = "pallet-scheduler" -version = "29.0.0" +version = "42.0.0" dependencies = [ "docify", "frame-benchmarking", @@ -13212,29 +13223,29 @@ dependencies = [ "pallet-preimage", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-weights 27.0.0", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", + "sp-weights 32.0.0", "substrate-test-utils", ] [[package]] name = "pallet-scored-pool" -version = "28.0.0" +version = "41.0.0" dependencies = [ "frame-support", "frame-system", "pallet-balances", "parity-scale-codec", "scale-info", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-io 41.0.1", + "sp-runtime 42.0.0", ] [[package]] name = "pallet-session" -version = "28.0.0" +version = "41.0.0" dependencies = [ "frame-support", "frame-system", @@ -13243,18 +13254,18 @@ dependencies = [ "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", "sp-session", "sp-staking", - "sp-state-machine 0.35.0", - "sp-trie 29.0.0", + "sp-state-machine 0.46.0", + "sp-trie 40.0.0", ] [[package]] name = "pallet-session-benchmarking" -version = "28.0.0" +version = "41.0.0" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -13268,26 +13279,26 @@ dependencies = [ "parity-scale-codec", "rand 0.8.5", "scale-info", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-io 41.0.1", + "sp-runtime 42.0.0", "sp-session", "sp-staking", ] [[package]] name = "pallet-skip-feeless-payment" -version = "3.0.0" +version = "16.0.0" dependencies = [ "frame-support", "frame-system", "parity-scale-codec", "scale-info", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", ] [[package]] name = "pallet-society" -version = "28.0.0" +version = "41.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -13298,15 +13309,15 @@ dependencies = [ "parity-scale-codec", "rand_chacha 0.3.1", "scale-info", - "sp-arithmetic 23.0.0", + "sp-arithmetic 27.0.0", "sp-crypto-hashing 0.1.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-io 41.0.1", + "sp-runtime 42.0.0", ] [[package]] name = "pallet-staking" -version = "28.0.0" +version = "41.0.0" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -13323,19 +13334,19 @@ dependencies = [ "rand_chacha 0.3.1", "scale-info", "serde", - "sp-application-crypto 30.0.0", - "sp-core 28.0.0", - "sp-io 30.0.0", + "sp-application-crypto 41.0.0", + "sp-core 37.0.0", + "sp-io 41.0.1", "sp-npos-elections", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", "sp-staking", - "sp-tracing 16.0.0", + "sp-tracing 17.1.0", "substrate-test-utils", ] [[package]] name = "pallet-staking-async" -version = "0.1.0" +version = "0.2.0" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -13350,19 +13361,19 @@ dependencies = [ "rand_chacha 0.3.1", "scale-info", "serde", - "sp-application-crypto 30.0.0", - "sp-core 28.0.0", - "sp-io 30.0.0", + "sp-application-crypto 41.0.0", + "sp-core 37.0.0", + "sp-io 41.0.1", "sp-npos-elections", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", "sp-staking", - "sp-tracing 16.0.0", + "sp-tracing 17.1.0", "substrate-test-utils", ] [[package]] name = "pallet-staking-async-ah-client" -version = "0.1.0" +version = "0.2.0" dependencies = [ "frame-support", "frame-system", @@ -13373,14 +13384,14 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-runtime 42.0.0", "sp-staking", ] [[package]] name = "pallet-staking-async-parachain-runtime" -version = "0.15.0" +version = "0.2.0" dependencies = [ "asset-test-utils", "assets-common", @@ -13461,23 +13472,23 @@ dependencies = [ "primitive-types 0.13.1", "scale-info", "serde_json", - "sp-api 26.0.0", - "sp-arithmetic 23.0.0", + "sp-api 37.0.0", + "sp-arithmetic 27.0.0", "sp-block-builder", "sp-consensus-aura", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-genesis-builder", "sp-inherents", "sp-keyring", "sp-npos-elections", "sp-offchain", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", "sp-session", "sp-staking", "sp-std 14.0.0", - "sp-storage 19.0.0", + "sp-storage 22.0.0", "sp-transaction-pool", - "sp-version 29.0.0", + "sp-version 40.0.0", "staging-parachain-info", "staging-xcm", "staging-xcm-builder", @@ -13490,7 +13501,7 @@ dependencies = [ [[package]] name = "pallet-staking-async-rc-client" -version = "0.1.0" +version = "0.2.0" dependencies = [ "frame-support", "frame-system", @@ -13498,15 +13509,15 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-runtime 42.0.0", "sp-staking", "staging-xcm", ] [[package]] name = "pallet-staking-async-rc-runtime" -version = "7.0.0" +version = "0.2.0" dependencies = [ "approx", "binary-merkle-tree", @@ -13585,29 +13596,29 @@ dependencies = [ "serde_derive", "serde_json", "smallvec", - "sp-api 26.0.0", - "sp-application-crypto 30.0.0", - "sp-arithmetic 23.0.0", + "sp-api 37.0.0", + "sp-application-crypto 41.0.0", + "sp-arithmetic 27.0.0", "sp-authority-discovery", "sp-block-builder", "sp-consensus-babe", "sp-consensus-beefy", "sp-consensus-grandpa", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-genesis-builder", "sp-inherents", - "sp-io 30.0.0", + "sp-io 41.0.1", "sp-keyring", "sp-mmr-primitives", "sp-npos-elections", "sp-offchain", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", "sp-session", "sp-staking", - "sp-storage 19.0.0", - "sp-tracing 16.0.0", + "sp-storage 22.0.0", + "sp-tracing 17.1.0", "sp-transaction-pool", - "sp-version 29.0.0", + "sp-version 40.0.0", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -13619,67 +13630,67 @@ dependencies = [ [[package]] name = "pallet-staking-async-rc-runtime-constants" -version = "7.0.0" +version = "0.2.0" dependencies = [ "frame-support", "polkadot-primitives", "polkadot-runtime-common", "smallvec", - "sp-core 28.0.0", - "sp-runtime 31.0.1", - "sp-weights 27.0.0", + "sp-core 37.0.0", + "sp-runtime 42.0.0", + "sp-weights 32.0.0", "staging-xcm", "staging-xcm-builder", ] [[package]] name = "pallet-staking-async-reward-fn" -version = "19.0.0" +version = "0.2.0" dependencies = [ "log", - "sp-arithmetic 23.0.0", + "sp-arithmetic 27.0.0", ] [[package]] name = "pallet-staking-async-runtime-api" -version = "14.0.0" +version = "0.2.0" dependencies = [ "parity-scale-codec", - "sp-api 26.0.0", + "sp-api 37.0.0", "sp-staking", ] [[package]] name = "pallet-staking-reward-curve" -version = "11.0.0" +version = "12.0.0" dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2 1.0.95", "quote 1.0.40", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", "syn 2.0.98", ] [[package]] name = "pallet-staking-reward-fn" -version = "19.0.0" +version = "23.0.0" dependencies = [ "log", - "sp-arithmetic 23.0.0", + "sp-arithmetic 27.0.0", ] [[package]] name = "pallet-staking-runtime-api" -version = "14.0.0" +version = "27.0.0" dependencies = [ "parity-scale-codec", - "sp-api 26.0.0", + "sp-api 37.0.0", "sp-staking", ] [[package]] name = "pallet-state-trie-migration" -version = "29.0.0" +version = "46.0.0" dependencies = [ "frame-benchmarking", "frame-remote-externalities", @@ -13690,10 +13701,10 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-tracing 16.0.0", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", + "sp-tracing 17.1.0", "substrate-state-trie-migration-rpc", "thousands", "tokio", @@ -13702,7 +13713,7 @@ dependencies = [ [[package]] name = "pallet-statement" -version = "10.0.0" +version = "23.0.0" dependencies = [ "frame-support", "frame-system", @@ -13710,16 +13721,16 @@ dependencies = [ "pallet-balances", "parity-scale-codec", "scale-info", - "sp-api 26.0.0", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-api 37.0.0", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", "sp-statement-store", ] [[package]] name = "pallet-sudo" -version = "28.0.0" +version = "41.0.0" dependencies = [ "docify", "frame-benchmarking", @@ -13727,27 +13738,27 @@ dependencies = [ "frame-system", "parity-scale-codec", "scale-info", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-io 41.0.1", + "sp-runtime 42.0.0", ] [[package]] name = "pallet-template" -version = "0.0.0" +version = "0.1.0" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", ] [[package]] name = "pallet-timestamp" -version = "27.0.0" +version = "40.0.0" dependencies = [ "docify", "frame-benchmarking", @@ -13757,15 +13768,15 @@ dependencies = [ "parity-scale-codec", "scale-info", "sp-inherents", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-storage 19.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", + "sp-storage 22.0.0", "sp-timestamp", ] [[package]] name = "pallet-tips" -version = "27.0.0" +version = "40.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -13776,15 +13787,15 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-storage 19.0.0", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", + "sp-storage 22.0.0", ] [[package]] name = "pallet-transaction-payment" -version = "28.0.0" +version = "41.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -13794,39 +13805,39 @@ dependencies = [ "scale-info", "serde", "serde_json", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-io 41.0.1", + "sp-runtime 42.0.0", ] [[package]] name = "pallet-transaction-payment-rpc" -version = "30.0.0" +version = "44.0.0" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", "parity-scale-codec", - "sp-api 26.0.0", + "sp-api 37.0.0", "sp-blockchain", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-rpc", - "sp-runtime 31.0.1", - "sp-weights 27.0.0", + "sp-runtime 42.0.0", + "sp-weights 32.0.0", ] [[package]] name = "pallet-transaction-payment-rpc-runtime-api" -version = "28.0.0" +version = "41.0.0" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", - "sp-api 26.0.0", - "sp-runtime 31.0.1", - "sp-weights 27.0.0", + "sp-api 37.0.0", + "sp-runtime 42.0.0", + "sp-weights 32.0.0", ] [[package]] name = "pallet-transaction-storage" -version = "27.0.0" +version = "40.0.0" dependencies = [ "array-bytes 6.2.2", "frame-benchmarking", @@ -13838,14 +13849,14 @@ dependencies = [ "scale-info", "serde", "sp-inherents", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-io 41.0.1", + "sp-runtime 42.0.0", "sp-transaction-storage-proof", ] [[package]] name = "pallet-treasury" -version = "27.0.0" +version = "40.0.0" dependencies = [ "docify", "frame-benchmarking", @@ -13858,14 +13869,14 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", ] [[package]] name = "pallet-tx-pause" -version = "9.0.0" +version = "22.0.0" dependencies = [ "docify", "pallet-balances", @@ -13878,7 +13889,7 @@ dependencies = [ [[package]] name = "pallet-uniques" -version = "28.0.0" +version = "41.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -13887,13 +13898,13 @@ dependencies = [ "pallet-balances", "parity-scale-codec", "scale-info", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-io 41.0.1", + "sp-runtime 42.0.0", ] [[package]] name = "pallet-utility" -version = "28.0.0" +version = "41.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -13904,28 +13915,28 @@ dependencies = [ "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", ] [[package]] name = "pallet-verify-signature" -version = "1.0.0" +version = "0.4.0" dependencies = [ "frame-benchmarking", "frame-support", "frame-system", "parity-scale-codec", "scale-info", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-weights 27.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", + "sp-weights 32.0.0", ] [[package]] name = "pallet-vesting" -version = "28.0.0" +version = "41.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -13934,13 +13945,13 @@ dependencies = [ "pallet-balances", "parity-scale-codec", "scale-info", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-io 41.0.1", + "sp-runtime 42.0.0", ] [[package]] name = "pallet-whitelist" -version = "27.0.0" +version = "40.0.0" dependencies = [ "pallet-balances", "pallet-preimage", @@ -13951,7 +13962,7 @@ dependencies = [ [[package]] name = "pallet-xcm" -version = "7.0.0" +version = "20.1.0" dependencies = [ "bounded-collections 0.2.3", "frame-benchmarking", @@ -13960,15 +13971,17 @@ dependencies = [ "hex-literal", "pallet-assets", "pallet-balances", + "pallet-revive", + "pallet-timestamp", "parity-scale-codec", "polkadot-parachain-primitives", "polkadot-runtime-parachains", "scale-info", "serde", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-tracing 16.0.0", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", + "sp-tracing 17.1.0", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -13979,7 +13992,7 @@ dependencies = [ [[package]] name = "pallet-xcm-benchmarks" -version = "7.0.0" +version = "21.0.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -13987,9 +14000,9 @@ dependencies = [ "pallet-balances", "parity-scale-codec", "scale-info", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-tracing 16.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", + "sp-tracing 17.1.0", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -13997,7 +14010,7 @@ dependencies = [ [[package]] name = "pallet-xcm-bridge-hub" -version = "0.2.0" +version = "0.17.0" dependencies = [ "bp-header-chain", "bp-messages", @@ -14013,9 +14026,9 @@ dependencies = [ "parity-scale-codec", "polkadot-parachain-primitives", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", "sp-std 14.0.0", "staging-xcm", "staging-xcm-builder", @@ -14024,7 +14037,7 @@ dependencies = [ [[package]] name = "pallet-xcm-bridge-hub-router" -version = "0.5.0" +version = "0.19.0" dependencies = [ "bp-xcm-bridge-hub-router", "frame-benchmarking", @@ -14034,9 +14047,9 @@ dependencies = [ "parity-scale-codec", "polkadot-runtime-parachains", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", "sp-std 14.0.0", "staging-xcm", "staging-xcm-builder", @@ -14044,14 +14057,14 @@ dependencies = [ [[package]] name = "parachain-template" -version = "0.0.0" +version = "0.1.0" dependencies = [ "docify", ] [[package]] name = "parachain-template-node" -version = "0.0.0" +version = "0.1.0" dependencies = [ "clap", "color-print", @@ -14060,14 +14073,14 @@ dependencies = [ "jsonrpsee", "log", "parachain-template-runtime", - "polkadot-sdk 0.1.0", + "polkadot-sdk 2506.0.0", "serde", "substrate-prometheus-endpoint", ] [[package]] name = "parachain-template-runtime" -version = "0.0.0" +version = "0.1.0" dependencies = [ "cumulus-pallet-parachain-system", "docify", @@ -14075,7 +14088,7 @@ dependencies = [ "log", "pallet-parachain-template", "parity-scale-codec", - "polkadot-sdk 0.1.0", + "polkadot-sdk 2506.0.0", "scale-info", "serde_json", "smallvec", @@ -14084,7 +14097,7 @@ dependencies = [ [[package]] name = "parachains-common" -version = "7.0.0" +version = "22.0.0" dependencies = [ "cumulus-primitives-core", "cumulus-primitives-utility", @@ -14102,9 +14115,9 @@ dependencies = [ "polkadot-primitives", "scale-info", "sp-consensus-aura", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", "staging-parachain-info", "staging-xcm", "staging-xcm-executor", @@ -14121,12 +14134,12 @@ dependencies = [ "log", "relay-substrate-client", "relay-utils", - "sp-core 28.0.0", + "sp-core 37.0.0", ] [[package]] name = "parachains-runtimes-test-utils" -version = "7.0.0" +version = "23.0.0" dependencies = [ "cumulus-pallet-parachain-system", "cumulus-pallet-xcmp-queue", @@ -14144,10 +14157,10 @@ dependencies = [ "parity-scale-codec", "polkadot-parachain-primitives", "sp-consensus-aura", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-tracing 16.0.0", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", + "sp-tracing 17.1.0", "staging-parachain-info", "staging-xcm", "staging-xcm-executor", @@ -14162,7 +14175,7 @@ checksum = "4e69bf016dc406eff7d53a7d3f7cf1c2e72c82b9088aac1118591e36dd2cd3e9" dependencies = [ "bitcoin_hashes 0.13.0", "rand 0.8.5", - "rand_core 0.6.4", + "rand_core 0.5.1", "serde", "unicode-normalization", ] @@ -14199,7 +14212,7 @@ version = "3.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "799781ae679d79a948e13d4824a40970bfa500058d245760dd857301059810fa" dependencies = [ - "arrayvec 0.7.4", + "arrayvec 0.7.6", "bitvec", "byte-slice-cast", "bytes", @@ -14343,21 +14356,21 @@ dependencies = [ [[package]] name = "penpal-emulated-chain" -version = "0.0.0" +version = "0.1.0" dependencies = [ "cumulus-primitives-core", "emulated-integration-tests-common", "frame-support", "parachains-common", "penpal-runtime", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-keyring", "staging-xcm", ] [[package]] name = "penpal-runtime" -version = "0.14.0" +version = "0.30.0" dependencies = [ "assets-common", "cumulus-pallet-aura-ext", @@ -14400,19 +14413,19 @@ dependencies = [ "scale-info", "serde_json", "smallvec", - "sp-api 26.0.0", + "sp-api 37.0.0", "sp-block-builder", "sp-consensus-aura", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-genesis-builder", "sp-inherents", "sp-keyring", "sp-offchain", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", "sp-session", - "sp-storage 19.0.0", + "sp-storage 22.0.0", "sp-transaction-pool", - "sp-version 29.0.0", + "sp-version 40.0.0", "staging-parachain-info", "staging-xcm", "staging-xcm-builder", @@ -14431,7 +14444,7 @@ dependencies = [ "frame-support", "parachains-common", "people-rococo-runtime", - "sp-core 28.0.0", + "sp-core 37.0.0", "testnet-parachains-constants", ] @@ -14445,14 +14458,14 @@ dependencies = [ "pallet-balances", "parachains-common", "rococo-system-emulated-network", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", "staging-xcm", "staging-xcm-executor", ] [[package]] name = "people-rococo-runtime" -version = "0.1.0" +version = "0.16.0" dependencies = [ "cumulus-pallet-aura-ext", "cumulus-pallet-parachain-system", @@ -14497,19 +14510,19 @@ dependencies = [ "scale-info", "serde", "serde_json", - "sp-api 26.0.0", + "sp-api 37.0.0", "sp-block-builder", "sp-consensus-aura", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-genesis-builder", "sp-inherents", "sp-keyring", "sp-offchain", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", "sp-session", - "sp-storage 19.0.0", + "sp-storage 22.0.0", "sp-transaction-pool", - "sp-version 29.0.0", + "sp-version 40.0.0", "staging-parachain-info", "staging-xcm", "staging-xcm-builder", @@ -14528,7 +14541,7 @@ dependencies = [ "frame-support", "parachains-common", "people-westend-runtime", - "sp-core 28.0.0", + "sp-core 37.0.0", "testnet-parachains-constants", ] @@ -14545,7 +14558,7 @@ dependencies = [ "pallet-xcm", "parachains-common", "parity-scale-codec", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", "staging-xcm", "staging-xcm-executor", "westend-runtime", @@ -14554,7 +14567,7 @@ dependencies = [ [[package]] name = "people-westend-runtime" -version = "0.1.0" +version = "0.16.0" dependencies = [ "cumulus-pallet-aura-ext", "cumulus-pallet-parachain-system", @@ -14598,20 +14611,20 @@ dependencies = [ "scale-info", "serde", "serde_json", - "sp-api 26.0.0", + "sp-api 37.0.0", "sp-block-builder", "sp-consensus-aura", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-genesis-builder", "sp-inherents", "sp-keyring", "sp-offchain", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", "sp-session", "sp-statement-store", - "sp-storage 19.0.0", + "sp-storage 22.0.0", "sp-transaction-pool", - "sp-version 29.0.0", + "sp-version 40.0.0", "staging-parachain-info", "staging-xcm", "staging-xcm-builder", @@ -14771,7 +14784,7 @@ dependencies = [ [[package]] name = "polkadot" -version = "6.0.0" +version = "24.0.0" dependencies = [ "assert_cmd", "color-eyre", @@ -14792,7 +14805,7 @@ dependencies = [ [[package]] name = "polkadot-approval-distribution" -version = "7.0.0" +version = "24.0.0" dependencies = [ "assert_matches", "futures", @@ -14811,16 +14824,16 @@ dependencies = [ "rand_core 0.6.4", "sc-keystore", "schnorrkel 0.11.4", - "sp-application-crypto 30.0.0", + "sp-application-crypto 41.0.0", "sp-authority-discovery", - "sp-core 28.0.0", - "sp-tracing 16.0.0", + "sp-core 37.0.0", + "sp-tracing 17.1.0", "tracing-gum", ] [[package]] name = "polkadot-availability-bitfield-distribution" -version = "7.0.0" +version = "24.0.0" dependencies = [ "assert_matches", "bitvec", @@ -14834,18 +14847,18 @@ dependencies = [ "polkadot-primitives", "rand 0.8.5", "rand_chacha 0.3.1", - "sp-application-crypto 30.0.0", + "sp-application-crypto 41.0.0", "sp-authority-discovery", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-keyring", - "sp-keystore 0.34.0", - "sp-tracing 16.0.0", + "sp-keystore 0.43.0", + "sp-tracing 17.1.0", "tracing-gum", ] [[package]] name = "polkadot-availability-distribution" -version = "7.0.0" +version = "24.0.0" dependencies = [ "assert_matches", "fatality", @@ -14865,17 +14878,17 @@ dependencies = [ "rstest", "sc-network", "schnellru", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-keyring", - "sp-keystore 0.34.0", - "sp-tracing 16.0.0", + "sp-keystore 0.43.0", + "sp-tracing 17.1.0", "thiserror 1.0.65", "tracing-gum", ] [[package]] name = "polkadot-availability-recovery" -version = "7.0.0" +version = "24.0.0" dependencies = [ "assert_matches", "async-trait", @@ -14896,9 +14909,9 @@ dependencies = [ "rstest", "sc-network", "schnellru", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-keyring", - "sp-tracing 16.0.0", + "sp-tracing 17.1.0", "thiserror 1.0.65", "tokio", "tracing-gum", @@ -14916,7 +14929,7 @@ dependencies = [ [[package]] name = "polkadot-cli" -version = "7.0.0" +version = "25.0.0" dependencies = [ "clap", "frame-benchmarking-cli", @@ -14932,16 +14945,16 @@ dependencies = [ "sc-storage-monitor", "sc-sysinfo", "sc-tracing", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-keyring", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", "substrate-build-script-utils", "thiserror 1.0.65", ] [[package]] name = "polkadot-collator-protocol" -version = "7.0.0" +version = "24.0.0" dependencies = [ "assert_matches", "async-trait", @@ -14961,11 +14974,11 @@ dependencies = [ "sc-keystore", "sc-network", "schnellru", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-keyring", - "sp-keystore 0.34.0", - "sp-runtime 31.0.1", - "sp-tracing 16.0.0", + "sp-keystore 0.43.0", + "sp-runtime 42.0.0", + "sp-tracing 17.1.0", "thiserror 1.0.65", "tokio", "tokio-util", @@ -14974,17 +14987,17 @@ dependencies = [ [[package]] name = "polkadot-core-primitives" -version = "7.0.0" +version = "18.0.0" dependencies = [ "parity-scale-codec", "scale-info", - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-runtime 42.0.0", ] [[package]] name = "polkadot-dispute-distribution" -version = "7.0.0" +version = "24.0.0" dependencies = [ "assert_matches", "async-channel 1.9.0", @@ -15003,17 +15016,17 @@ dependencies = [ "polkadot-primitives-test-helpers", "sc-keystore", "sc-network", - "sp-application-crypto 30.0.0", + "sp-application-crypto 41.0.0", "sp-keyring", - "sp-keystore 0.34.0", - "sp-tracing 16.0.0", + "sp-keystore 0.43.0", + "sp-tracing 17.1.0", "thiserror 1.0.65", "tracing-gum", ] [[package]] name = "polkadot-erasure-coding" -version = "7.0.0" +version = "20.0.0" dependencies = [ "criterion", "parity-scale-codec", @@ -15021,14 +15034,14 @@ dependencies = [ "polkadot-primitives", "quickcheck", "reed-solomon-novelpoly", - "sp-core 28.0.0", - "sp-trie 29.0.0", + "sp-core 37.0.0", + "sp-trie 40.0.0", "thiserror 1.0.65", ] [[package]] name = "polkadot-gossip-support" -version = "7.0.0" +version = "24.0.1" dependencies = [ "assert_matches", "async-trait", @@ -15044,20 +15057,20 @@ dependencies = [ "rand 0.8.5", "rand_chacha 0.3.1", "sc-network", - "sp-application-crypto 30.0.0", + "sp-application-crypto 41.0.0", "sp-authority-discovery", "sp-consensus-babe", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-crypto-hashing 0.1.0", "sp-keyring", - "sp-keystore 0.34.0", - "sp-tracing 16.0.0", + "sp-keystore 0.43.0", + "sp-tracing 17.1.0", "tracing-gum", ] [[package]] name = "polkadot-network-bridge" -version = "7.0.0" +version = "24.0.0" dependencies = [ "always-assert", "assert_matches", @@ -15078,7 +15091,7 @@ dependencies = [ "polkadot-primitives-test-helpers", "sc-network", "sp-consensus", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-keyring", "thiserror 1.0.65", "tracing-gum", @@ -15086,7 +15099,7 @@ dependencies = [ [[package]] name = "polkadot-node-collation-generation" -version = "7.0.0" +version = "24.0.0" dependencies = [ "assert_matches", "futures", @@ -15100,7 +15113,7 @@ dependencies = [ "polkadot-primitives-test-helpers", "rstest", "schnellru", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-keyring", "thiserror 1.0.65", "tracing-gum", @@ -15108,7 +15121,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-approval-voting" -version = "7.0.0" +version = "24.0.0" dependencies = [ "assert_matches", "async-trait", @@ -15135,22 +15148,22 @@ dependencies = [ "sc-keystore", "schnellru", "schnorrkel 0.11.4", - "sp-application-crypto 30.0.0", + "sp-application-crypto 41.0.0", "sp-consensus", "sp-consensus-babe", "sp-consensus-slots", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-keyring", - "sp-keystore 0.34.0", - "sp-runtime 31.0.1", - "sp-tracing 16.0.0", + "sp-keystore 0.43.0", + "sp-runtime 42.0.0", + "sp-tracing 17.1.0", "thiserror 1.0.65", "tracing-gum", ] [[package]] name = "polkadot-node-core-approval-voting-parallel" -version = "7.0.0" +version = "0.7.0" dependencies = [ "assert_matches", "async-trait", @@ -15173,15 +15186,15 @@ dependencies = [ "schnorrkel 0.11.4", "sp-consensus", "sp-consensus-babe", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-keyring", - "sp-tracing 16.0.0", + "sp-tracing 17.1.0", "tracing-gum", ] [[package]] name = "polkadot-node-core-av-store" -version = "7.0.0" +version = "24.0.0" dependencies = [ "assert_matches", "bitvec", @@ -15198,16 +15211,16 @@ dependencies = [ "polkadot-primitives", "polkadot-primitives-test-helpers", "sp-consensus", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-keyring", - "sp-tracing 16.0.0", + "sp-tracing 17.1.0", "thiserror 1.0.65", "tracing-gum", ] [[package]] name = "polkadot-node-core-backing" -version = "7.0.0" +version = "24.0.0" dependencies = [ "assert_matches", "bitvec", @@ -15224,18 +15237,18 @@ dependencies = [ "polkadot-statement-table", "sc-keystore", "schnellru", - "sp-application-crypto 30.0.0", - "sp-core 28.0.0", + "sp-application-crypto 41.0.0", + "sp-core 37.0.0", "sp-keyring", - "sp-keystore 0.34.0", - "sp-tracing 16.0.0", + "sp-keystore 0.43.0", + "sp-tracing 17.1.0", "thiserror 1.0.65", "tracing-gum", ] [[package]] name = "polkadot-node-core-bitfield-signing" -version = "7.0.0" +version = "24.0.0" dependencies = [ "futures", "polkadot-node-subsystem", @@ -15243,7 +15256,7 @@ dependencies = [ "polkadot-node-subsystem-util", "polkadot-primitives", "polkadot-primitives-test-helpers", - "sp-keystore 0.34.0", + "sp-keystore 0.43.0", "thiserror 1.0.65", "tracing-gum", "wasm-timer", @@ -15251,7 +15264,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-candidate-validation" -version = "7.0.0" +version = "24.0.0" dependencies = [ "assert_matches", "async-trait", @@ -15269,17 +15282,17 @@ dependencies = [ "polkadot-primitives", "polkadot-primitives-test-helpers", "rstest", - "sp-application-crypto 30.0.0", - "sp-core 28.0.0", + "sp-application-crypto 41.0.0", + "sp-core 37.0.0", "sp-keyring", - "sp-keystore 0.34.0", + "sp-keystore 0.43.0", "sp-maybe-compressed-blob 11.0.0", "tracing-gum", ] [[package]] name = "polkadot-node-core-chain-api" -version = "7.0.0" +version = "24.0.0" dependencies = [ "futures", "maplit", @@ -15293,13 +15306,13 @@ dependencies = [ "sc-client-api", "sc-consensus-babe", "sp-blockchain", - "sp-core 28.0.0", + "sp-core 37.0.0", "tracing-gum", ] [[package]] name = "polkadot-node-core-chain-selection" -version = "7.0.0" +version = "24.0.0" dependencies = [ "assert_matches", "futures", @@ -15312,14 +15325,14 @@ dependencies = [ "polkadot-node-subsystem-test-helpers", "polkadot-node-subsystem-util", "polkadot-primitives", - "sp-core 28.0.0", + "sp-core 37.0.0", "thiserror 1.0.65", "tracing-gum", ] [[package]] name = "polkadot-node-core-dispute-coordinator" -version = "7.0.0" +version = "24.0.0" dependencies = [ "assert_matches", "fatality", @@ -15335,18 +15348,18 @@ dependencies = [ "polkadot-primitives-test-helpers", "sc-keystore", "schnellru", - "sp-application-crypto 30.0.0", - "sp-core 28.0.0", + "sp-application-crypto 41.0.0", + "sp-core 37.0.0", "sp-keyring", - "sp-keystore 0.34.0", - "sp-tracing 16.0.0", + "sp-keystore 0.43.0", + "sp-tracing 17.1.0", "thiserror 1.0.65", "tracing-gum", ] [[package]] name = "polkadot-node-core-parachains-inherent" -version = "7.0.0" +version = "24.0.0" dependencies = [ "async-trait", "futures", @@ -15362,7 +15375,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-prospective-parachains" -version = "6.0.0" +version = "23.0.0" dependencies = [ "assert_matches", "fatality", @@ -15374,15 +15387,15 @@ dependencies = [ "polkadot-primitives-test-helpers", "rand 0.8.5", "rstest", - "sp-core 28.0.0", - "sp-tracing 16.0.0", + "sp-core 37.0.0", + "sp-tracing 17.1.0", "thiserror 1.0.65", "tracing-gum", ] [[package]] name = "polkadot-node-core-provisioner" -version = "7.0.0" +version = "24.0.0" dependencies = [ "bitvec", "fatality", @@ -15394,15 +15407,15 @@ dependencies = [ "polkadot-node-subsystem-util", "polkadot-primitives", "polkadot-primitives-test-helpers", - "sp-application-crypto 30.0.0", - "sp-keystore 0.34.0", + "sp-application-crypto 41.0.0", + "sp-keystore 0.43.0", "thiserror 1.0.65", "tracing-gum", ] [[package]] name = "polkadot-node-core-pvf" -version = "7.0.0" +version = "24.0.0" dependencies = [ "always-assert", "array-bytes 6.2.2", @@ -15431,7 +15444,7 @@ dependencies = [ "sc-sysinfo", "sc-tracing", "slotmap", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-maybe-compressed-blob 11.0.0", "strum 0.26.3", "tempfile", @@ -15444,7 +15457,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf-checker" -version = "7.0.0" +version = "24.0.0" dependencies = [ "futures", "futures-timer", @@ -15454,17 +15467,17 @@ dependencies = [ "polkadot-primitives", "polkadot-primitives-test-helpers", "sc-keystore", - "sp-application-crypto 30.0.0", - "sp-core 28.0.0", + "sp-application-crypto 41.0.0", + "sp-core 37.0.0", "sp-keyring", - "sp-keystore 0.34.0", - "sp-runtime 31.0.1", + "sp-keystore 0.43.0", + "sp-runtime 42.0.0", "tracing-gum", ] [[package]] name = "polkadot-node-core-pvf-common" -version = "7.0.0" +version = "20.0.0" dependencies = [ "assert_matches", "cpu-time", @@ -15475,15 +15488,15 @@ dependencies = [ "parity-scale-codec", "polkadot-parachain-primitives", "polkadot-primitives", - "sc-executor 0.32.0", - "sc-executor-common 0.29.0", - "sc-executor-wasmtime 0.29.0", + "sc-executor 0.43.0", + "sc-executor-common 0.39.0", + "sc-executor-wasmtime 0.39.0", "seccompiler", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-crypto-hashing 0.1.0", - "sp-externalities 0.25.0", - "sp-io 30.0.0", - "sp-tracing 16.0.0", + "sp-externalities 0.30.0", + "sp-io 41.0.1", + "sp-tracing 17.1.0", "tempfile", "thiserror 1.0.65", "tracing-gum", @@ -15491,7 +15504,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf-execute-worker" -version = "7.0.0" +version = "20.0.0" dependencies = [ "cfg-if", "cpu-time", @@ -15508,7 +15521,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-pvf-prepare-worker" -version = "7.0.0" +version = "20.0.0" dependencies = [ "cfg-if", "criterion", @@ -15527,7 +15540,7 @@ dependencies = [ [[package]] name = "polkadot-node-core-runtime-api" -version = "7.0.0" +version = "24.0.0" dependencies = [ "async-trait", "futures", @@ -15539,16 +15552,16 @@ dependencies = [ "polkadot-primitives", "polkadot-primitives-test-helpers", "schnellru", - "sp-api 26.0.0", + "sp-api 37.0.0", "sp-consensus-babe", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-keyring", "tracing-gum", ] [[package]] name = "polkadot-node-metrics" -version = "7.0.0" +version = "24.0.0" dependencies = [ "bs58", "futures", @@ -15571,7 +15584,7 @@ dependencies = [ [[package]] name = "polkadot-node-network-protocol" -version = "7.0.0" +version = "24.0.0" dependencies = [ "async-channel 1.9.0", "async-trait", @@ -15588,7 +15601,7 @@ dependencies = [ "sc-authority-discovery", "sc-network", "sc-network-types", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", "strum 0.26.3", "thiserror 1.0.65", "tracing-gum", @@ -15596,7 +15609,7 @@ dependencies = [ [[package]] name = "polkadot-node-primitives" -version = "7.0.0" +version = "20.0.0" dependencies = [ "bitvec", "bounded-vec", @@ -15608,10 +15621,10 @@ dependencies = [ "sc-keystore", "schnorrkel 0.11.4", "serde", - "sp-application-crypto 30.0.0", + "sp-application-crypto 41.0.0", "sp-consensus-babe", "sp-consensus-slots", - "sp-keystore 0.34.0", + "sp-keystore 0.43.0", "sp-maybe-compressed-blob 11.0.0", "thiserror 1.0.65", "zstd 0.12.4", @@ -15619,7 +15632,7 @@ dependencies = [ [[package]] name = "polkadot-node-subsystem" -version = "7.0.0" +version = "24.0.0" dependencies = [ "polkadot-node-subsystem-types", "polkadot-overseer", @@ -15640,15 +15653,15 @@ dependencies = [ "sc-client-api", "sc-keystore", "sc-utils", - "sp-application-crypto 30.0.0", - "sp-core 28.0.0", + "sp-application-crypto 41.0.0", + "sp-core 37.0.0", "sp-keyring", - "sp-keystore 0.34.0", + "sp-keystore 0.43.0", ] [[package]] name = "polkadot-node-subsystem-types" -version = "7.0.0" +version = "24.0.0" dependencies = [ "async-trait", "derive_more 0.99.17", @@ -15664,18 +15677,18 @@ dependencies = [ "sc-network-types", "sc-transaction-pool-api", "smallvec", - "sp-api 26.0.0", + "sp-api 37.0.0", "sp-authority-discovery", "sp-blockchain", "sp-consensus-babe", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", "substrate-prometheus-endpoint", "thiserror 1.0.65", ] [[package]] name = "polkadot-node-subsystem-util" -version = "7.0.0" +version = "24.0.1" dependencies = [ "assert_matches", "fatality", @@ -15700,9 +15713,9 @@ dependencies = [ "rand 0.8.5", "sc-keystore", "schnellru", - "sp-application-crypto 30.0.0", - "sp-core 28.0.0", - "sp-keystore 0.34.0", + "sp-application-crypto 41.0.0", + "sp-core 37.0.0", + "sp-keystore 0.43.0", "tempfile", "thiserror 1.0.65", "tracing-gum", @@ -15710,7 +15723,7 @@ dependencies = [ [[package]] name = "polkadot-omni-node" -version = "0.1.0" +version = "0.7.0" dependencies = [ "assert_cmd", "color-eyre", @@ -15720,7 +15733,7 @@ dependencies = [ [[package]] name = "polkadot-omni-node-lib" -version = "0.1.0" +version = "0.7.0" dependencies = [ "assert_cmd", "async-trait", @@ -15764,7 +15777,7 @@ dependencies = [ "sc-client-db", "sc-consensus", "sc-consensus-manual-seal", - "sc-executor 0.32.0", + "sc-executor 0.43.0", "sc-keystore", "sc-network", "sc-network-statement", @@ -15782,23 +15795,23 @@ dependencies = [ "scale-info", "serde", "serde_json", - "sp-api 26.0.0", + "sp-api 37.0.0", "sp-block-builder", "sp-consensus", "sp-consensus-aura", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-genesis-builder", "sp-inherents", - "sp-keystore 0.34.0", + "sp-keystore 0.43.0", "sp-offchain", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", "sp-session", "sp-statement-store", - "sp-storage 19.0.0", + "sp-storage 22.0.0", "sp-timestamp", "sp-transaction-pool", - "sp-version 29.0.0", - "sp-weights 27.0.0", + "sp-version 40.0.0", + "sp-weights 32.0.0", "staging-chain-spec-builder", "substrate-frame-rpc-system", "substrate-prometheus-endpoint", @@ -15810,7 +15823,7 @@ dependencies = [ [[package]] name = "polkadot-overseer" -version = "7.0.0" +version = "24.0.0" dependencies = [ "assert_matches", "async-trait", @@ -15827,14 +15840,14 @@ dependencies = [ "polkadot-primitives-test-helpers", "prioritized-metered-channel", "sc-client-api", - "sp-core 28.0.0", + "sp-core 37.0.0", "tikv-jemalloc-ctl", "tracing-gum", ] [[package]] name = "polkadot-parachain-bin" -version = "4.0.0" +version = "6.0.0" dependencies = [ "assert_cmd", "asset-hub-rococo-runtime", @@ -15861,7 +15874,7 @@ dependencies = [ "sc-service", "serde", "serde_json", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-genesis-builder", "sp-keyring", "staging-xcm", @@ -15871,7 +15884,7 @@ dependencies = [ [[package]] name = "polkadot-parachain-primitives" -version = "6.0.0" +version = "17.0.0" dependencies = [ "bounded-collections 0.2.3", "derive_more 0.99.17", @@ -15879,14 +15892,14 @@ dependencies = [ "polkadot-core-primitives", "scale-info", "serde", - "sp-core 28.0.0", - "sp-runtime 31.0.1", - "sp-weights 27.0.0", + "sp-core 37.0.0", + "sp-runtime 42.0.0", + "sp-weights 32.0.0", ] [[package]] name = "polkadot-primitives" -version = "7.0.0" +version = "19.0.0" dependencies = [ "bitvec", "bounded-collections 0.2.3", @@ -15897,16 +15910,16 @@ dependencies = [ "polkadot-parachain-primitives", "scale-info", "serde", - "sp-api 26.0.0", - "sp-application-crypto 30.0.0", - "sp-arithmetic 23.0.0", + "sp-api 37.0.0", + "sp-application-crypto 41.0.0", + "sp-arithmetic 27.0.0", "sp-authority-discovery", "sp-consensus-slots", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-inherents", - "sp-io 30.0.0", - "sp-keystore 0.34.0", - "sp-runtime 31.0.1", + "sp-io 41.0.1", + "sp-keystore 0.43.0", + "sp-runtime 42.0.0", "sp-staking", "sp-std 14.0.0", "thiserror 1.0.65", @@ -15914,19 +15927,19 @@ dependencies = [ [[package]] name = "polkadot-primitives-test-helpers" -version = "1.0.0" +version = "0.1.0" dependencies = [ "polkadot-primitives", "rand 0.8.5", - "sp-application-crypto 30.0.0", - "sp-core 28.0.0", + "sp-application-crypto 41.0.0", + "sp-core 37.0.0", "sp-keyring", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", ] [[package]] name = "polkadot-rpc" -version = "7.0.0" +version = "25.0.0" dependencies = [ "jsonrpsee", "mmr-rpc", @@ -15943,22 +15956,22 @@ dependencies = [ "sc-rpc", "sc-sync-state-rpc", "sc-transaction-pool-api", - "sp-api 26.0.0", - "sp-application-crypto 30.0.0", + "sp-api 37.0.0", + "sp-application-crypto 41.0.0", "sp-block-builder", "sp-blockchain", "sp-consensus", "sp-consensus-babe", "sp-consensus-beefy", - "sp-keystore 0.34.0", - "sp-runtime 31.0.1", + "sp-keystore 0.43.0", + "sp-runtime 42.0.0", "substrate-frame-rpc-system", "substrate-state-trie-migration-rpc", ] [[package]] name = "polkadot-runtime-common" -version = "7.0.0" +version = "20.0.0" dependencies = [ "bitvec", "frame-benchmarking", @@ -15994,14 +16007,14 @@ dependencies = [ "serde", "serde_json", "slot-range-helper", - "sp-api 26.0.0", - "sp-core 28.0.0", + "sp-api 37.0.0", + "sp-core 37.0.0", "sp-inherents", - "sp-io 30.0.0", + "sp-io 41.0.1", "sp-keyring", - "sp-keystore 0.34.0", + "sp-keystore 0.43.0", "sp-npos-elections", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", "sp-session", "sp-staking", "staging-xcm", @@ -16012,18 +16025,18 @@ dependencies = [ [[package]] name = "polkadot-runtime-metrics" -version = "7.0.0" +version = "21.0.0" dependencies = [ "bs58", "frame-benchmarking", "parity-scale-codec", "polkadot-primitives", - "sp-tracing 16.0.0", + "sp-tracing 17.1.0", ] [[package]] name = "polkadot-runtime-parachains" -version = "7.0.0" +version = "20.0.1" dependencies = [ "assert_matches", "bitflags 1.3.2", @@ -16059,20 +16072,20 @@ dependencies = [ "scale-info", "serde", "serde_json", - "sp-api 26.0.0", - "sp-application-crypto 30.0.0", - "sp-arithmetic 23.0.0", - "sp-core 28.0.0", + "sp-api 37.0.0", + "sp-application-crypto 41.0.0", + "sp-arithmetic 27.0.0", + "sp-core 37.0.0", "sp-crypto-hashing 0.1.0", "sp-inherents", - "sp-io 30.0.0", + "sp-io 41.0.1", "sp-keyring", - "sp-keystore 0.34.0", - "sp-runtime 31.0.1", + "sp-keystore 0.43.0", + "sp-runtime 42.0.0", "sp-session", "sp-staking", "sp-std 14.0.0", - "sp-tracing 16.0.0", + "sp-tracing 17.1.0", "staging-xcm", "staging-xcm-executor", "static_assertions", @@ -16081,7 +16094,16 @@ dependencies = [ [[package]] name = "polkadot-sdk" -version = "0.1.0" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb819108697967452fa6d8d96ab4c0d48cbaa423b3156499dcb24f1cf95d6775" +dependencies = [ + "sp-crypto-hashing 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "polkadot-sdk" +version = "2506.0.0" dependencies = [ "asset-test-utils", "assets-common", @@ -16325,7 +16347,7 @@ dependencies = [ "polkadot-service", "polkadot-statement-distribution", "polkadot-statement-table", - "sc-allocator 23.0.0", + "sc-allocator 32.0.0", "sc-authority-discovery", "sc-basic-authorship", "sc-block-builder", @@ -16346,10 +16368,10 @@ dependencies = [ "sc-consensus-manual-seal", "sc-consensus-pow", "sc-consensus-slots", - "sc-executor 0.32.0", - "sc-executor-common 0.29.0", - "sc-executor-polkavm 0.29.0", - "sc-executor-wasmtime 0.29.0", + "sc-executor 0.43.0", + "sc-executor-common 0.39.0", + "sc-executor-polkavm 0.36.0", + "sc-executor-wasmtime 0.39.0", "sc-informant", "sc-keystore", "sc-mixnet", @@ -16381,10 +16403,10 @@ dependencies = [ "sc-transaction-pool-api", "sc-utils", "slot-range-helper", - "sp-api 26.0.0", - "sp-api-proc-macro 15.0.0", - "sp-application-crypto 30.0.0", - "sp-arithmetic 23.0.0", + "sp-api 37.0.0", + "sp-api-proc-macro 23.0.0", + "sp-application-crypto 41.0.0", + "sp-arithmetic 27.0.0", "sp-authority-discovery", "sp-block-builder", "sp-blockchain", @@ -16395,7 +16417,7 @@ dependencies = [ "sp-consensus-grandpa", "sp-consensus-pow", "sp-consensus-slots", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-core-hashing", "sp-core-hashing-proc-macro", "sp-crypto-ec-utils", @@ -16403,38 +16425,38 @@ dependencies = [ "sp-crypto-hashing-proc-macro 0.1.0", "sp-database", "sp-debug-derive 14.0.0", - "sp-externalities 0.25.0", + "sp-externalities 0.30.0", "sp-genesis-builder", "sp-inherents", - "sp-io 30.0.0", + "sp-io 41.0.1", "sp-keyring", - "sp-keystore 0.34.0", + "sp-keystore 0.43.0", "sp-maybe-compressed-blob 11.0.0", - "sp-metadata-ir 0.6.0", + "sp-metadata-ir 0.11.0", "sp-mixnet", "sp-mmr-primitives", "sp-npos-elections", "sp-offchain", - "sp-panic-handler 13.0.0", + "sp-panic-handler 13.0.2", "sp-rpc", - "sp-runtime 31.0.1", - "sp-runtime-interface 24.0.0", - "sp-runtime-interface-proc-macro 17.0.0", + "sp-runtime 42.0.0", + "sp-runtime-interface 30.0.0", + "sp-runtime-interface-proc-macro 19.0.0", "sp-session", "sp-staking", - "sp-state-machine 0.35.0", + "sp-state-machine 0.46.0", "sp-statement-store", "sp-std 14.0.0", - "sp-storage 19.0.0", + "sp-storage 22.0.0", "sp-timestamp", - "sp-tracing 16.0.0", + "sp-tracing 17.1.0", "sp-transaction-pool", "sp-transaction-storage-proof", - "sp-trie 29.0.0", - "sp-version 29.0.0", - "sp-version-proc-macro 13.0.0", - "sp-wasm-interface 20.0.0", - "sp-weights 27.0.0", + "sp-trie 40.0.0", + "sp-version 40.0.0", + "sp-version-proc-macro 15.0.0", + "sp-wasm-interface 22.0.0", + "sp-weights 32.0.0", "staging-chain-spec-builder", "staging-node-inspect", "staging-parachain-info", @@ -16443,7 +16465,7 @@ dependencies = [ "staging-xcm-builder", "staging-xcm-executor", "subkey", - "substrate-bip39 0.4.7", + "substrate-bip39 0.6.0", "substrate-build-script-utils", "substrate-frame-rpc-support", "substrate-frame-rpc-system", @@ -16460,18 +16482,9 @@ dependencies = [ "xcm-simulator", ] -[[package]] -name = "polkadot-sdk" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb819108697967452fa6d8d96ab4c0d48cbaa423b3156499dcb24f1cf95d6775" -dependencies = [ - "sp-crypto-hashing 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "polkadot-sdk-docs" -version = "0.0.1" +version = "0.1.0" dependencies = [ "assert_cmd", "chain-spec-guide-runtime", @@ -16515,7 +16528,7 @@ dependencies = [ "pallet-xcm", "parity-scale-codec", "polkadot-omni-node-lib", - "polkadot-sdk 0.1.0", + "polkadot-sdk 2506.0.0", "polkadot-sdk-docs-first-runtime", "polkadot-sdk-frame", "rand 0.8.5", @@ -16528,7 +16541,7 @@ dependencies = [ "sc-consensus-grandpa", "sc-consensus-manual-seal", "sc-consensus-pow", - "sc-executor 0.32.0", + "sc-executor 0.43.0", "sc-network", "sc-rpc", "sc-rpc-api", @@ -16537,20 +16550,20 @@ dependencies = [ "serde_json", "simple-mermaid", "solochain-template-runtime", - "sp-api 26.0.0", - "sp-arithmetic 23.0.0", - "sp-core 28.0.0", + "sp-api 37.0.0", + "sp-arithmetic 27.0.0", + "sp-core 37.0.0", "sp-genesis-builder", - "sp-io 30.0.0", + "sp-io 41.0.1", "sp-keyring", "sp-offchain", - "sp-runtime 31.0.1", - "sp-runtime-interface 24.0.0", + "sp-runtime 42.0.0", + "sp-runtime-interface 30.0.0", "sp-std 14.0.0", - "sp-storage 19.0.0", - "sp-tracing 16.0.0", - "sp-version 29.0.0", - "sp-weights 27.0.0", + "sp-storage 22.0.0", + "sp-tracing 17.1.0", + "sp-version 40.0.0", + "sp-weights 32.0.0", "staging-chain-spec-builder", "staging-node-cli", "staging-parachain-info", @@ -16565,7 +16578,7 @@ dependencies = [ [[package]] name = "polkadot-sdk-docs-first-pallet" -version = "0.0.0" +version = "0.1.0" dependencies = [ "docify", "parity-scale-codec", @@ -16575,7 +16588,7 @@ dependencies = [ [[package]] name = "polkadot-sdk-docs-first-runtime" -version = "0.0.0" +version = "0.1.0" dependencies = [ "docify", "pallet-balances", @@ -16594,7 +16607,7 @@ dependencies = [ [[package]] name = "polkadot-sdk-frame" -version = "0.1.0" +version = "0.10.0" dependencies = [ "docify", "frame-benchmarking", @@ -16608,27 +16621,27 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-api 26.0.0", - "sp-arithmetic 23.0.0", + "sp-api 37.0.0", + "sp-arithmetic 27.0.0", "sp-block-builder", "sp-consensus-aura", "sp-consensus-grandpa", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-genesis-builder", "sp-inherents", - "sp-io 30.0.0", + "sp-io 41.0.1", "sp-keyring", "sp-offchain", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", "sp-session", - "sp-storage 19.0.0", + "sp-storage 22.0.0", "sp-transaction-pool", - "sp-version 29.0.0", + "sp-version 40.0.0", ] [[package]] name = "polkadot-service" -version = "7.0.1" +version = "25.0.0" dependencies = [ "assert_matches", "async-trait", @@ -16697,7 +16710,7 @@ dependencies = [ "sc-consensus-beefy", "sc-consensus-grandpa", "sc-consensus-slots", - "sc-executor 0.32.0", + "sc-executor 0.43.0", "sc-keystore", "sc-network", "sc-network-sync", @@ -16710,7 +16723,7 @@ dependencies = [ "sc-transaction-pool-api", "serde", "serde_json", - "sp-api 26.0.0", + "sp-api 37.0.0", "sp-authority-discovery", "sp-block-builder", "sp-blockchain", @@ -16718,20 +16731,20 @@ dependencies = [ "sp-consensus-babe", "sp-consensus-beefy", "sp-consensus-grandpa", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-genesis-builder", "sp-inherents", - "sp-io 30.0.0", + "sp-io 41.0.1", "sp-keyring", "sp-mmr-primitives", "sp-offchain", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", "sp-session", "sp-timestamp", - "sp-tracing 16.0.0", + "sp-tracing 17.1.0", "sp-transaction-pool", - "sp-version 29.0.0", - "sp-weights 27.0.0", + "sp-version 40.0.0", + "sp-weights 32.0.0", "staging-xcm", "substrate-prometheus-endpoint", "tempfile", @@ -16744,7 +16757,7 @@ dependencies = [ [[package]] name = "polkadot-statement-distribution" -version = "7.0.0" +version = "24.0.0" dependencies = [ "assert_matches", "async-channel 1.9.0", @@ -16765,19 +16778,19 @@ dependencies = [ "rstest", "sc-keystore", "sc-network", - "sp-application-crypto 30.0.0", + "sp-application-crypto 41.0.0", "sp-authority-discovery", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-keyring", - "sp-keystore 0.34.0", - "sp-tracing 16.0.0", + "sp-keystore 0.43.0", + "sp-tracing 17.1.0", "thiserror 1.0.65", "tracing-gum", ] [[package]] name = "polkadot-statement-table" -version = "7.0.0" +version = "20.0.0" dependencies = [ "parity-scale-codec", "polkadot-primitives", @@ -16833,15 +16846,15 @@ dependencies = [ "serde_json", "serde_yaml", "sha1", - "sp-application-crypto 30.0.0", + "sp-application-crypto 41.0.0", "sp-consensus", "sp-consensus-babe", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-keyring", - "sp-keystore 0.34.0", - "sp-runtime 31.0.1", + "sp-keystore 0.43.0", + "sp-runtime 42.0.0", "sp-timestamp", - "sp-tracing 16.0.0", + "sp-tracing 17.1.0", "strum 0.26.3", "substrate-prometheus-endpoint", "tikv-jemallocator", @@ -16862,15 +16875,15 @@ dependencies = [ "sc-block-builder", "sc-consensus", "sc-service", - "sp-api 26.0.0", + "sp-api 37.0.0", "sp-blockchain", "sp-consensus", "sp-consensus-babe", "sp-inherents", - "sp-io 30.0.0", + "sp-io 41.0.1", "sp-keyring", - "sp-runtime 31.0.1", - "sp-state-machine 0.35.0", + "sp-runtime 42.0.0", + "sp-state-machine 0.46.0", "sp-timestamp", "substrate-test-client", ] @@ -16897,7 +16910,7 @@ dependencies = [ "polkadot-node-subsystem-util", "polkadot-primitives", "rand 0.8.5", - "sp-core 28.0.0", + "sp-core 37.0.0", "substrate-build-script-utils", "tracing-gum", ] @@ -16934,22 +16947,22 @@ dependencies = [ "polkadot-runtime-parachains", "scale-info", "serde", - "sp-api 26.0.0", + "sp-api 37.0.0", "sp-authority-discovery", "sp-block-builder", "sp-consensus-babe", "sp-consensus-beefy", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-genesis-builder", "sp-inherents", - "sp-io 30.0.0", + "sp-io 41.0.1", "sp-mmr-primitives", "sp-offchain", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", "sp-session", "sp-staking", "sp-transaction-pool", - "sp-version 29.0.0", + "sp-version 40.0.0", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -16985,15 +16998,15 @@ dependencies = [ "sc-service", "sc-tracing", "serde_json", - "sp-arithmetic 23.0.0", + "sp-arithmetic 27.0.0", "sp-authority-discovery", "sp-blockchain", "sp-consensus", "sp-consensus-babe", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-keyring", - "sp-runtime 31.0.1", - "sp-state-machine 0.35.0", + "sp-runtime 42.0.0", + "sp-state-machine 0.46.0", "substrate-test-client", "test-runtime-constants", "tokio", @@ -17001,7 +17014,7 @@ dependencies = [ [[package]] name = "polkadot-voter-bags" -version = "7.0.0" +version = "24.0.0" dependencies = [ "clap", "generate-bags", @@ -17693,7 +17706,7 @@ checksum = "f8650aabb6c35b860610e9cff5dc1af886c9e25073b7b1712a68972af4281302" dependencies = [ "bytes", "heck 0.5.0", - "itertools 0.13.0", + "itertools 0.12.1", "log", "multimap", "once_cell", @@ -17739,7 +17752,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a56d757972c98b346a9b766e3f02746cde6dd1cd1d1d563472929fdd74bec4d" dependencies = [ "anyhow", - "itertools 0.13.0", + "itertools 0.12.1", "proc-macro2 1.0.95", "quote 1.0.40", "syn 2.0.98", @@ -18285,12 +18298,12 @@ dependencies = [ "scale-info", "serde_json", "sp-consensus-grandpa", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-rpc", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", "sp-std 14.0.0", - "sp-trie 29.0.0", - "sp-version 29.0.0", + "sp-trie 40.0.0", + "sp-version 40.0.0", "staging-xcm", "thiserror 1.0.65", "tokio", @@ -18312,8 +18325,8 @@ dependencies = [ "num-traits", "parking_lot 0.12.3", "serde_json", - "sp-runtime 31.0.1", - "sp-tracing 16.0.0", + "sp-runtime 42.0.0", + "sp-tracing 17.1.0", "substrate-prometheus-endpoint", "sysinfo", "thiserror 1.0.65", @@ -18329,8 +18342,8 @@ dependencies = [ "frame-system", "log", "pallet-bags-list-remote-tests", - "sp-core 28.0.0", - "sp-tracing 16.0.0", + "sp-core 37.0.0", + "sp-tracing 17.1.0", "tokio", "westend-runtime", "westend-runtime-constants", @@ -18482,7 +18495,7 @@ dependencies = [ [[package]] name = "rococo-emulated-chain" -version = "0.0.0" +version = "0.1.0" dependencies = [ "emulated-integration-tests-common", "parachains-common", @@ -18493,13 +18506,13 @@ dependencies = [ "sp-authority-discovery", "sp-consensus-babe", "sp-consensus-beefy", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-keyring", ] [[package]] name = "rococo-parachain-runtime" -version = "0.6.0" +version = "0.21.0" dependencies = [ "cumulus-pallet-aura-ext", "cumulus-pallet-parachain-system", @@ -18530,18 +18543,18 @@ dependencies = [ "polkadot-runtime-common", "scale-info", "serde_json", - "sp-api 26.0.0", + "sp-api 37.0.0", "sp-block-builder", "sp-consensus-aura", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-genesis-builder", "sp-inherents", "sp-keyring", "sp-offchain", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", "sp-session", "sp-transaction-pool", - "sp-version 29.0.0", + "sp-version 40.0.0", "staging-parachain-info", "staging-xcm", "staging-xcm-builder", @@ -18551,7 +18564,7 @@ dependencies = [ [[package]] name = "rococo-runtime" -version = "7.0.0" +version = "24.0.0" dependencies = [ "binary-merkle-tree", "bitvec", @@ -18620,27 +18633,27 @@ dependencies = [ "serde", "serde_derive", "serde_json", - "sp-api 26.0.0", - "sp-arithmetic 23.0.0", + "sp-api 37.0.0", + "sp-arithmetic 27.0.0", "sp-authority-discovery", "sp-block-builder", "sp-consensus-babe", "sp-consensus-beefy", "sp-consensus-grandpa", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-genesis-builder", "sp-inherents", - "sp-io 30.0.0", + "sp-io 41.0.1", "sp-keyring", "sp-mmr-primitives", "sp-offchain", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", "sp-session", "sp-staking", - "sp-storage 19.0.0", - "sp-tracing 16.0.0", + "sp-storage 22.0.0", + "sp-tracing 17.1.0", "sp-transaction-pool", - "sp-version 29.0.0", + "sp-version 40.0.0", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -18651,22 +18664,22 @@ dependencies = [ [[package]] name = "rococo-runtime-constants" -version = "7.0.0" +version = "21.0.0" dependencies = [ "frame-support", "polkadot-primitives", "polkadot-runtime-common", "smallvec", - "sp-core 28.0.0", - "sp-runtime 31.0.1", - "sp-weights 27.0.0", + "sp-core 37.0.0", + "sp-runtime 42.0.0", + "sp-weights 32.0.0", "staging-xcm", "staging-xcm-builder", ] [[package]] name = "rococo-system-emulated-network" -version = "0.0.0" +version = "0.1.0" dependencies = [ "asset-hub-rococo-emulated-chain", "bridge-hub-rococo-emulated-chain", @@ -18679,7 +18692,7 @@ dependencies = [ [[package]] name = "rococo-westend-system-emulated-network" -version = "0.0.0" +version = "0.1.0" dependencies = [ "asset-hub-rococo-emulated-chain", "asset-hub-westend-emulated-chain", @@ -19162,29 +19175,29 @@ dependencies = [ [[package]] name = "sc-allocator" -version = "23.0.0" +version = "28.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3f01218e73ea57916be5f08987995ac802d6f4ede4ea5ce0242e468c590e4e2" dependencies = [ "log", - "sp-core 28.0.0", - "sp-wasm-interface 20.0.0", + "sp-core 33.0.1", + "sp-wasm-interface 21.0.1", "thiserror 1.0.65", ] [[package]] name = "sc-allocator" -version = "28.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3f01218e73ea57916be5f08987995ac802d6f4ede4ea5ce0242e468c590e4e2" +version = "32.0.0" dependencies = [ "log", - "sp-core 33.0.1", - "sp-wasm-interface 21.0.1", + "sp-core 37.0.0", + "sp-wasm-interface 22.0.0", "thiserror 1.0.65", ] [[package]] name = "sc-authority-discovery" -version = "0.34.0" +version = "0.51.0" dependencies = [ "async-trait", "futures", @@ -19203,13 +19216,13 @@ dependencies = [ "sc-network-types", "serde", "serde_json", - "sp-api 26.0.0", + "sp-api 37.0.0", "sp-authority-discovery", "sp-blockchain", - "sp-core 28.0.0", - "sp-keystore 0.34.0", - "sp-runtime 31.0.1", - "sp-tracing 16.0.0", + "sp-core 37.0.0", + "sp-keystore 0.43.0", + "sp-runtime 42.0.0", + "sp-tracing 17.1.0", "substrate-prometheus-endpoint", "substrate-test-runtime-client", "tempfile", @@ -19219,7 +19232,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" -version = "0.34.0" +version = "0.50.0" dependencies = [ "futures", "log", @@ -19231,35 +19244,35 @@ dependencies = [ "sc-telemetry", "sc-transaction-pool", "sc-transaction-pool-api", - "sp-api 26.0.0", + "sp-api 37.0.0", "sp-blockchain", "sp-consensus", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-inherents", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", "substrate-prometheus-endpoint", "substrate-test-runtime-client", ] [[package]] name = "sc-block-builder" -version = "0.33.0" +version = "0.45.0" dependencies = [ "parity-scale-codec", - "sp-api 26.0.0", + "sp-api 37.0.0", "sp-block-builder", "sp-blockchain", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-inherents", - "sp-runtime 31.0.1", - "sp-state-machine 0.35.0", - "sp-trie 29.0.0", + "sp-runtime 42.0.0", + "sp-state-machine 0.46.0", + "sp-trie 40.0.0", "substrate-test-runtime-client", ] [[package]] name = "sc-chain-spec" -version = "28.0.0" +version = "44.0.0" dependencies = [ "array-bytes 6.2.2", "clap", @@ -19270,28 +19283,28 @@ dependencies = [ "regex", "sc-chain-spec-derive", "sc-client-api", - "sc-executor 0.32.0", + "sc-executor 0.43.0", "sc-network", "sc-telemetry", "serde", "serde_json", - "sp-application-crypto 30.0.0", + "sp-application-crypto 41.0.0", "sp-blockchain", "sp-consensus-babe", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-crypto-hashing 0.1.0", "sp-genesis-builder", - "sp-io 30.0.0", + "sp-io 41.0.1", "sp-keyring", - "sp-runtime 31.0.1", - "sp-state-machine 0.35.0", - "sp-tracing 16.0.0", + "sp-runtime 42.0.0", + "sp-state-machine 0.46.0", + "sp-tracing 17.1.0", "substrate-test-runtime", ] [[package]] name = "sc-chain-spec-derive" -version = "11.0.0" +version = "12.0.0" dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2 1.0.95", @@ -19301,7 +19314,7 @@ dependencies = [ [[package]] name = "sc-cli" -version = "0.36.0" +version = "0.53.0" dependencies = [ "array-bytes 6.2.2", "chrono", @@ -19331,13 +19344,13 @@ dependencies = [ "serde", "serde_json", "sp-blockchain", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-keyring", - "sp-keystore 0.34.0", - "sp-panic-handler 13.0.0", - "sp-runtime 31.0.1", - "sp-tracing 16.0.0", - "sp-version 29.0.0", + "sp-keystore 0.43.0", + "sp-panic-handler 13.0.2", + "sp-runtime 42.0.0", + "sp-tracing 17.1.0", + "sp-version 40.0.0", "tempfile", "thiserror 1.0.65", "tokio", @@ -19345,33 +19358,33 @@ dependencies = [ [[package]] name = "sc-client-api" -version = "28.0.0" +version = "40.0.0" dependencies = [ "fnv", "futures", "log", "parity-scale-codec", "parking_lot 0.12.3", - "sc-executor 0.32.0", + "sc-executor 0.43.0", "sc-transaction-pool-api", "sc-utils", - "sp-api 26.0.0", + "sp-api 37.0.0", "sp-blockchain", "sp-consensus", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-database", - "sp-externalities 0.25.0", - "sp-runtime 31.0.1", - "sp-state-machine 0.35.0", - "sp-storage 19.0.0", - "sp-trie 29.0.0", + "sp-externalities 0.30.0", + "sp-runtime 42.0.0", + "sp-state-machine 0.46.0", + "sp-storage 22.0.0", + "sp-trie 40.0.0", "substrate-prometheus-endpoint", "substrate-test-runtime", ] [[package]] name = "sc-client-db" -version = "0.35.0" +version = "0.47.0" dependencies = [ "array-bytes 6.2.2", "criterion", @@ -19389,14 +19402,14 @@ dependencies = [ "sc-client-api", "sc-state-db", "schnellru", - "sp-arithmetic 23.0.0", + "sp-arithmetic 27.0.0", "sp-blockchain", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-database", - "sp-runtime 31.0.1", - "sp-state-machine 0.35.0", - "sp-tracing 16.0.0", - "sp-trie 29.0.0", + "sp-runtime 42.0.0", + "sp-state-machine 0.46.0", + "sp-tracing 17.1.0", + "sp-trie 40.0.0", "substrate-prometheus-endpoint", "substrate-test-runtime-client", "sysinfo", @@ -19405,7 +19418,7 @@ dependencies = [ [[package]] name = "sc-consensus" -version = "0.33.0" +version = "0.50.0" dependencies = [ "async-trait", "futures", @@ -19418,9 +19431,9 @@ dependencies = [ "serde", "sp-blockchain", "sp-consensus", - "sp-core 28.0.0", - "sp-runtime 31.0.1", - "sp-state-machine 0.35.0", + "sp-core 37.0.0", + "sp-runtime 42.0.0", + "sp-state-machine 0.46.0", "sp-test-primitives", "substrate-prometheus-endpoint", "thiserror 1.0.65", @@ -19428,7 +19441,7 @@ dependencies = [ [[package]] name = "sc-consensus-aura" -version = "0.34.0" +version = "0.51.0" dependencies = [ "async-trait", "futures", @@ -19443,20 +19456,20 @@ dependencies = [ "sc-network", "sc-network-test", "sc-telemetry", - "sp-api 26.0.0", - "sp-application-crypto 30.0.0", + "sp-api 37.0.0", + "sp-application-crypto 41.0.0", "sp-block-builder", "sp-blockchain", "sp-consensus", "sp-consensus-aura", "sp-consensus-slots", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-inherents", "sp-keyring", - "sp-keystore 0.34.0", - "sp-runtime 31.0.1", + "sp-keystore 0.43.0", + "sp-runtime 42.0.0", "sp-timestamp", - "sp-tracing 16.0.0", + "sp-tracing 17.1.0", "substrate-prometheus-endpoint", "substrate-test-runtime-client", "tempfile", @@ -19466,7 +19479,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" -version = "0.34.0" +version = "0.51.0" dependencies = [ "async-trait", "fork-tree", @@ -19485,21 +19498,21 @@ dependencies = [ "sc-network-test", "sc-telemetry", "sc-transaction-pool-api", - "sp-api 26.0.0", - "sp-application-crypto 30.0.0", + "sp-api 37.0.0", + "sp-application-crypto 41.0.0", "sp-block-builder", "sp-blockchain", "sp-consensus", "sp-consensus-babe", "sp-consensus-slots", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-crypto-hashing 0.1.0", "sp-inherents", "sp-keyring", - "sp-keystore 0.34.0", - "sp-runtime 31.0.1", + "sp-keystore 0.43.0", + "sp-runtime 42.0.0", "sp-timestamp", - "sp-tracing 16.0.0", + "sp-tracing 17.1.0", "substrate-prometheus-endpoint", "substrate-test-runtime-client", "thiserror 1.0.65", @@ -19508,7 +19521,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" -version = "0.34.0" +version = "0.51.0" dependencies = [ "futures", "jsonrpsee", @@ -19518,15 +19531,15 @@ dependencies = [ "sc-rpc-api", "sc-transaction-pool-api", "serde", - "sp-api 26.0.0", - "sp-application-crypto 30.0.0", + "sp-api 37.0.0", + "sp-application-crypto 41.0.0", "sp-blockchain", "sp-consensus", "sp-consensus-babe", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-keyring", - "sp-keystore 0.34.0", - "sp-runtime 31.0.1", + "sp-keystore 0.43.0", + "sp-runtime 42.0.0", "substrate-test-runtime-client", "thiserror 1.0.65", "tokio", @@ -19534,7 +19547,7 @@ dependencies = [ [[package]] name = "sc-consensus-beefy" -version = "13.0.0" +version = "30.0.0" dependencies = [ "array-bytes 6.2.2", "async-channel 1.9.0", @@ -19553,17 +19566,17 @@ dependencies = [ "sc-network-types", "sc-utils", "serde", - "sp-api 26.0.0", - "sp-application-crypto 30.0.0", - "sp-arithmetic 23.0.0", + "sp-api 37.0.0", + "sp-application-crypto 41.0.0", + "sp-arithmetic 27.0.0", "sp-blockchain", "sp-consensus", "sp-consensus-beefy", - "sp-core 28.0.0", - "sp-keystore 0.34.0", + "sp-core 37.0.0", + "sp-keystore 0.43.0", "sp-mmr-primitives", - "sp-runtime 31.0.1", - "sp-tracing 16.0.0", + "sp-runtime 42.0.0", + "sp-tracing 17.1.0", "substrate-prometheus-endpoint", "substrate-test-runtime-client", "thiserror 1.0.65", @@ -19573,7 +19586,7 @@ dependencies = [ [[package]] name = "sc-consensus-beefy-rpc" -version = "13.0.0" +version = "30.0.0" dependencies = [ "futures", "jsonrpsee", @@ -19583,10 +19596,10 @@ dependencies = [ "sc-consensus-beefy", "sc-rpc", "serde", - "sp-application-crypto 30.0.0", + "sp-application-crypto 41.0.0", "sp-consensus-beefy", - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-runtime 42.0.0", "substrate-test-runtime-client", "thiserror 1.0.65", "tokio", @@ -19594,19 +19607,19 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" -version = "0.33.0" +version = "0.50.0" dependencies = [ "fork-tree", "parity-scale-codec", "sc-client-api", "sc-consensus", "sp-blockchain", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", ] [[package]] name = "sc-consensus-grandpa" -version = "0.19.0" +version = "0.36.0" dependencies = [ "ahash 0.8.11", "array-bytes 6.2.2", @@ -19635,18 +19648,18 @@ dependencies = [ "sc-transaction-pool-api", "sc-utils", "serde_json", - "sp-api 26.0.0", - "sp-application-crypto 30.0.0", - "sp-arithmetic 23.0.0", + "sp-api 37.0.0", + "sp-application-crypto 41.0.0", + "sp-arithmetic 27.0.0", "sp-blockchain", "sp-consensus", "sp-consensus-grandpa", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-crypto-hashing 0.1.0", "sp-keyring", - "sp-keystore 0.34.0", - "sp-runtime 31.0.1", - "sp-tracing 16.0.0", + "sp-keystore 0.43.0", + "sp-runtime 42.0.0", + "sp-tracing 17.1.0", "substrate-prometheus-endpoint", "substrate-test-runtime-client", "thiserror 1.0.65", @@ -19655,7 +19668,7 @@ dependencies = [ [[package]] name = "sc-consensus-grandpa-rpc" -version = "0.19.0" +version = "0.36.0" dependencies = [ "finality-grandpa", "futures", @@ -19669,9 +19682,9 @@ dependencies = [ "serde", "sp-blockchain", "sp-consensus-grandpa", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-keyring", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", "substrate-test-runtime-client", "thiserror 1.0.65", "tokio", @@ -19679,7 +19692,7 @@ dependencies = [ [[package]] name = "sc-consensus-manual-seal" -version = "0.35.0" +version = "0.52.0" dependencies = [ "assert_matches", "async-trait", @@ -19697,16 +19710,16 @@ dependencies = [ "sc-transaction-pool", "sc-transaction-pool-api", "serde", - "sp-api 26.0.0", + "sp-api 37.0.0", "sp-blockchain", "sp-consensus", "sp-consensus-aura", "sp-consensus-babe", "sp-consensus-slots", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-inherents", - "sp-keystore 0.34.0", - "sp-runtime 31.0.1", + "sp-keystore 0.43.0", + "sp-runtime 42.0.0", "sp-timestamp", "substrate-prometheus-endpoint", "substrate-test-runtime-client", @@ -19717,7 +19730,7 @@ dependencies = [ [[package]] name = "sc-consensus-pow" -version = "0.33.0" +version = "0.50.0" dependencies = [ "async-trait", "futures", @@ -19727,21 +19740,21 @@ dependencies = [ "parking_lot 0.12.3", "sc-client-api", "sc-consensus", - "sp-api 26.0.0", + "sp-api 37.0.0", "sp-block-builder", "sp-blockchain", "sp-consensus", "sp-consensus-pow", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-inherents", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", "substrate-prometheus-endpoint", "thiserror 1.0.65", ] [[package]] name = "sc-consensus-slots" -version = "0.33.0" +version = "0.50.0" dependencies = [ "async-trait", "futures", @@ -19751,55 +19764,17 @@ dependencies = [ "sc-client-api", "sc-consensus", "sc-telemetry", - "sp-arithmetic 23.0.0", + "sp-arithmetic 27.0.0", "sp-blockchain", "sp-consensus", "sp-consensus-slots", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-inherents", - "sp-runtime 31.0.1", - "sp-state-machine 0.35.0", + "sp-runtime 42.0.0", + "sp-state-machine 0.46.0", "substrate-test-runtime-client", ] -[[package]] -name = "sc-executor" -version = "0.32.0" -dependencies = [ - "array-bytes 6.2.2", - "assert_matches", - "criterion", - "num_cpus", - "parity-scale-codec", - "parking_lot 0.12.3", - "paste", - "sc-executor-common 0.29.0", - "sc-executor-polkavm 0.29.0", - "sc-executor-wasmtime 0.29.0", - "sc-runtime-test", - "sc-tracing", - "schnellru", - "sp-api 26.0.0", - "sp-core 28.0.0", - "sp-crypto-hashing 0.1.0", - "sp-externalities 0.25.0", - "sp-io 30.0.0", - "sp-maybe-compressed-blob 11.0.0", - "sp-panic-handler 13.0.0", - "sp-runtime 31.0.1", - "sp-runtime-interface 24.0.0", - "sp-state-machine 0.35.0", - "sp-tracing 16.0.0", - "sp-trie 29.0.0", - "sp-version 29.0.0", - "sp-wasm-interface 20.0.0", - "substrate-test-runtime", - "tempfile", - "tracing", - "tracing-subscriber", - "wat", -] - [[package]] name = "sc-executor" version = "0.38.0" @@ -19816,7 +19791,7 @@ dependencies = [ "sp-core 33.0.1", "sp-externalities 0.28.0", "sp-io 36.0.0", - "sp-panic-handler 13.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-panic-handler 13.0.0", "sp-runtime-interface 27.0.0", "sp-trie 35.0.0", "sp-version 35.0.0", @@ -19825,15 +19800,41 @@ dependencies = [ ] [[package]] -name = "sc-executor-common" -version = "0.29.0" +name = "sc-executor" +version = "0.43.0" dependencies = [ - "polkavm 0.24.0", - "sc-allocator 23.0.0", + "array-bytes 6.2.2", + "assert_matches", + "criterion", + "num_cpus", + "parity-scale-codec", + "parking_lot 0.12.3", + "paste", + "sc-executor-common 0.39.0", + "sc-executor-polkavm 0.36.0", + "sc-executor-wasmtime 0.39.0", + "sc-runtime-test", + "sc-tracing", + "schnellru", + "sp-api 37.0.0", + "sp-core 37.0.0", + "sp-crypto-hashing 0.1.0", + "sp-externalities 0.30.0", + "sp-io 41.0.1", "sp-maybe-compressed-blob 11.0.0", - "sp-wasm-interface 20.0.0", - "thiserror 1.0.65", - "wasm-instrument", + "sp-panic-handler 13.0.2", + "sp-runtime 42.0.0", + "sp-runtime-interface 30.0.0", + "sp-state-machine 0.46.0", + "sp-tracing 17.1.0", + "sp-trie 40.0.0", + "sp-version 40.0.0", + "sp-wasm-interface 22.0.0", + "substrate-test-runtime", + "tempfile", + "tracing", + "tracing-subscriber", + "wat", ] [[package]] @@ -19851,13 +19852,15 @@ dependencies = [ ] [[package]] -name = "sc-executor-polkavm" -version = "0.29.0" +name = "sc-executor-common" +version = "0.39.0" dependencies = [ - "log", "polkavm 0.24.0", - "sc-executor-common 0.29.0", - "sp-wasm-interface 20.0.0", + "sc-allocator 32.0.0", + "sp-maybe-compressed-blob 11.0.0", + "sp-wasm-interface 22.0.0", + "thiserror 1.0.65", + "wasm-instrument", ] [[package]] @@ -19873,25 +19876,13 @@ dependencies = [ ] [[package]] -name = "sc-executor-wasmtime" -version = "0.29.0" +name = "sc-executor-polkavm" +version = "0.36.0" dependencies = [ - "anyhow", - "cargo_metadata", "log", - "parity-scale-codec", - "parking_lot 0.12.3", - "paste", - "rustix 0.36.15", - "sc-allocator 23.0.0", - "sc-executor-common 0.29.0", - "sc-runtime-test", - "sp-io 30.0.0", - "sp-runtime-interface 24.0.0", - "sp-wasm-interface 20.0.0", - "tempfile", - "wasmtime", - "wat", + "polkavm 0.24.0", + "sc-executor-common 0.39.0", + "sp-wasm-interface 22.0.0", ] [[package]] @@ -19913,9 +19904,31 @@ dependencies = [ "wasmtime", ] +[[package]] +name = "sc-executor-wasmtime" +version = "0.39.0" +dependencies = [ + "anyhow", + "cargo_metadata", + "log", + "parity-scale-codec", + "parking_lot 0.12.3", + "paste", + "rustix 0.36.15", + "sc-allocator 32.0.0", + "sc-executor-common 0.39.0", + "sc-runtime-test", + "sp-io 41.0.1", + "sp-runtime-interface 30.0.0", + "sp-wasm-interface 22.0.0", + "tempfile", + "wasmtime", + "wat", +] + [[package]] name = "sc-informant" -version = "0.33.0" +version = "0.50.0" dependencies = [ "console", "futures", @@ -19925,29 +19938,29 @@ dependencies = [ "sc-network", "sc-network-sync", "sp-blockchain", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", ] [[package]] name = "sc-keystore" -version = "25.0.0" +version = "36.0.0" dependencies = [ "array-bytes 6.2.2", "parking_lot 0.12.3", "serde_json", - "sp-application-crypto 30.0.0", - "sp-core 28.0.0", - "sp-keystore 0.34.0", + "sp-application-crypto 41.0.0", + "sp-core 37.0.0", + "sp-keystore 0.43.0", "tempfile", "thiserror 1.0.65", ] [[package]] name = "sc-mixnet" -version = "0.4.0" +version = "0.21.0" dependencies = [ "array-bytes 6.2.2", - "arrayvec 0.7.4", + "arrayvec 0.7.6", "blake2 0.10.6", "bytes", "futures", @@ -19960,18 +19973,18 @@ dependencies = [ "sc-network", "sc-network-types", "sc-transaction-pool-api", - "sp-api 26.0.0", + "sp-api 37.0.0", "sp-consensus", - "sp-core 28.0.0", - "sp-keystore 0.34.0", + "sp-core 37.0.0", + "sp-keystore 0.43.0", "sp-mixnet", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", "thiserror 1.0.65", ] [[package]] name = "sc-network" -version = "0.34.0" +version = "0.51.0" dependencies = [ "array-bytes 6.2.2", "assert_matches", @@ -20008,13 +20021,13 @@ dependencies = [ "serde", "serde_json", "smallvec", - "sp-arithmetic 23.0.0", + "sp-arithmetic 27.0.0", "sp-blockchain", "sp-consensus", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-crypto-hashing 0.1.0", - "sp-runtime 31.0.1", - "sp-tracing 16.0.0", + "sp-runtime 42.0.0", + "sp-tracing 17.1.0", "substrate-prometheus-endpoint", "substrate-test-runtime", "substrate-test-runtime-client", @@ -20031,16 +20044,16 @@ dependencies = [ [[package]] name = "sc-network-common" -version = "0.33.0" +version = "0.49.0" dependencies = [ "bitflags 1.3.2", "parity-scale-codec", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", ] [[package]] name = "sc-network-gossip" -version = "0.34.0" +version = "0.51.0" dependencies = [ "ahash 0.8.11", "async-trait", @@ -20054,7 +20067,7 @@ dependencies = [ "sc-network-sync", "sc-network-types", "schnellru", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", "substrate-prometheus-endpoint", "substrate-test-runtime-client", "tokio", @@ -20063,7 +20076,7 @@ dependencies = [ [[package]] name = "sc-network-light" -version = "0.33.0" +version = "0.50.0" dependencies = [ "array-bytes 6.2.2", "async-channel 1.9.0", @@ -20076,14 +20089,14 @@ dependencies = [ "sc-network", "sc-network-types", "sp-blockchain", - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-runtime 42.0.0", "thiserror 1.0.65", ] [[package]] name = "sc-network-statement" -version = "0.16.0" +version = "0.33.0" dependencies = [ "array-bytes 6.2.2", "async-channel 1.9.0", @@ -20095,14 +20108,14 @@ dependencies = [ "sc-network-sync", "sc-network-types", "sp-consensus", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", "sp-statement-store", "substrate-prometheus-endpoint", ] [[package]] name = "sc-network-sync" -version = "0.33.0" +version = "0.50.0" dependencies = [ "array-bytes 6.2.2", "async-channel 1.9.0", @@ -20124,14 +20137,14 @@ dependencies = [ "sc-utils", "schnellru", "smallvec", - "sp-arithmetic 23.0.0", + "sp-arithmetic 27.0.0", "sp-blockchain", "sp-consensus", "sp-consensus-grandpa", - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-runtime 42.0.0", "sp-test-primitives", - "sp-tracing 16.0.0", + "sp-tracing 17.1.0", "substrate-prometheus-endpoint", "substrate-test-runtime-client", "thiserror 1.0.65", @@ -20163,9 +20176,9 @@ dependencies = [ "sc-utils", "sp-blockchain", "sp-consensus", - "sp-core 28.0.0", - "sp-runtime 31.0.1", - "sp-tracing 16.0.0", + "sp-core 37.0.0", + "sp-runtime 42.0.0", + "sp-tracing 17.1.0", "substrate-test-runtime", "substrate-test-runtime-client", "tokio", @@ -20173,7 +20186,7 @@ dependencies = [ [[package]] name = "sc-network-transactions" -version = "0.33.0" +version = "0.50.0" dependencies = [ "array-bytes 6.2.2", "futures", @@ -20185,13 +20198,13 @@ dependencies = [ "sc-network-types", "sc-utils", "sp-consensus", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", "substrate-prometheus-endpoint", ] [[package]] name = "sc-network-types" -version = "0.10.0" +version = "0.17.0" dependencies = [ "bs58", "bytes", @@ -20212,7 +20225,7 @@ dependencies = [ [[package]] name = "sc-offchain" -version = "29.0.0" +version = "46.0.0" dependencies = [ "async-trait", "bytes", @@ -20237,14 +20250,14 @@ dependencies = [ "sc-transaction-pool", "sc-transaction-pool-api", "sc-utils", - "sp-api 26.0.0", + "sp-api 37.0.0", "sp-consensus", - "sp-core 28.0.0", - "sp-externalities 0.25.0", - "sp-keystore 0.34.0", + "sp-core 37.0.0", + "sp-externalities 0.30.0", + "sp-keystore 0.43.0", "sp-offchain", - "sp-runtime 31.0.1", - "sp-tracing 16.0.0", + "sp-runtime 42.0.0", + "sp-tracing 17.1.0", "substrate-test-runtime-client", "threadpool", "tokio", @@ -20253,7 +20266,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" -version = "0.17.0" +version = "0.20.0" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -20261,7 +20274,7 @@ dependencies = [ [[package]] name = "sc-rpc" -version = "29.0.0" +version = "46.0.0" dependencies = [ "assert_matches", "futures", @@ -20281,25 +20294,25 @@ dependencies = [ "sc-transaction-pool-api", "sc-utils", "serde_json", - "sp-api 26.0.0", + "sp-api 37.0.0", "sp-blockchain", "sp-consensus", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-crypto-hashing 0.1.0", - "sp-keystore 0.34.0", + "sp-keystore 0.43.0", "sp-offchain", "sp-rpc", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", "sp-session", "sp-statement-store", - "sp-version 29.0.0", + "sp-version 40.0.0", "substrate-test-runtime-client", "tokio", ] [[package]] name = "sc-rpc-api" -version = "0.33.0" +version = "0.50.0" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -20309,16 +20322,16 @@ dependencies = [ "scale-info", "serde", "serde_json", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-rpc", - "sp-runtime 31.0.1", - "sp-version 29.0.0", + "sp-runtime 42.0.0", + "sp-version 40.0.0", "thiserror 1.0.65", ] [[package]] name = "sc-rpc-server" -version = "11.0.0" +version = "23.0.0" dependencies = [ "dyn-clone", "forwarded-header-value", @@ -20341,7 +20354,7 @@ dependencies = [ [[package]] name = "sc-rpc-spec-v2" -version = "0.34.0" +version = "0.51.0" dependencies = [ "array-bytes 6.2.2", "assert_matches", @@ -20367,15 +20380,15 @@ dependencies = [ "schnellru", "serde", "serde_json", - "sp-api 26.0.0", + "sp-api 37.0.0", "sp-blockchain", "sp-consensus", - "sp-core 28.0.0", - "sp-externalities 0.25.0", + "sp-core 37.0.0", + "sp-externalities 0.30.0", "sp-maybe-compressed-blob 11.0.0", "sp-rpc", - "sp-runtime 31.0.1", - "sp-version 29.0.0", + "sp-runtime 42.0.0", + "sp-version 40.0.0", "substrate-prometheus-endpoint", "substrate-test-runtime", "substrate-test-runtime-client", @@ -20389,35 +20402,35 @@ dependencies = [ name = "sc-runtime-test" version = "2.0.0" dependencies = [ - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-runtime-interface 24.0.0", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", + "sp-runtime-interface 30.0.0", "substrate-wasm-builder", ] [[package]] name = "sc-runtime-utilities" -version = "0.1.0" +version = "0.3.0" dependencies = [ "cumulus-primitives-proof-size-hostfunction", "cumulus-test-runtime", "parity-scale-codec", - "sc-executor 0.32.0", - "sc-executor-common 0.29.0", - "sp-core 28.0.0", + "sc-executor 0.43.0", + "sc-executor-common 0.39.0", + "sp-core 37.0.0", "sp-crypto-hashing 0.1.0", - "sp-io 30.0.0", - "sp-state-machine 0.35.0", - "sp-version 29.0.0", - "sp-wasm-interface 20.0.0", + "sp-io 41.0.1", + "sp-state-machine 0.46.0", + "sp-version 40.0.0", + "sp-wasm-interface 22.0.0", "subxt 0.41.0", "thiserror 1.0.65", ] [[package]] name = "sc-service" -version = "0.35.0" +version = "0.52.0" dependencies = [ "async-trait", "directories", @@ -20434,7 +20447,7 @@ dependencies = [ "sc-client-api", "sc-client-db", "sc-consensus", - "sc-executor 0.32.0", + "sc-executor 0.43.0", "sc-informant", "sc-keystore", "sc-network", @@ -20455,20 +20468,20 @@ dependencies = [ "schnellru", "serde", "serde_json", - "sp-api 26.0.0", + "sp-api 37.0.0", "sp-blockchain", "sp-consensus", - "sp-core 28.0.0", - "sp-externalities 0.25.0", - "sp-keystore 0.34.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-externalities 0.30.0", + "sp-keystore 0.43.0", + "sp-runtime 42.0.0", "sp-session", - "sp-state-machine 0.35.0", - "sp-storage 19.0.0", + "sp-state-machine 0.46.0", + "sp-storage 22.0.0", "sp-transaction-pool", "sp-transaction-storage-proof", - "sp-trie 29.0.0", - "sp-version 29.0.0", + "sp-trie 40.0.0", + "sp-version 40.0.0", "static_init", "substrate-prometheus-endpoint", "substrate-test-runtime", @@ -20495,20 +20508,20 @@ dependencies = [ "sc-client-api", "sc-client-db", "sc-consensus", - "sc-executor 0.32.0", + "sc-executor 0.43.0", "sc-network", "sc-network-sync", "sc-service", "sc-transaction-pool-api", - "sp-api 26.0.0", + "sp-api 37.0.0", "sp-blockchain", "sp-consensus", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-state-machine 0.35.0", - "sp-storage 19.0.0", - "sp-tracing 16.0.0", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", + "sp-state-machine 0.46.0", + "sp-storage 22.0.0", + "sp-tracing 17.1.0", "substrate-test-runtime", "substrate-test-runtime-client", "tempfile", @@ -20517,29 +20530,29 @@ dependencies = [ [[package]] name = "sc-state-db" -version = "0.30.0" +version = "0.39.0" dependencies = [ "log", "parity-scale-codec", "parking_lot 0.12.3", - "sp-core 28.0.0", + "sp-core 37.0.0", ] [[package]] name = "sc-statement-store" -version = "10.0.0" +version = "22.0.0" dependencies = [ "log", "parity-db", "parking_lot 0.12.3", "sc-client-api", "sc-keystore", - "sp-api 26.0.0", + "sp-api 37.0.0", "sp-blockchain", - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-runtime 42.0.0", "sp-statement-store", - "sp-tracing 16.0.0", + "sp-tracing 17.1.0", "substrate-prometheus-endpoint", "tempfile", "tokio", @@ -20547,19 +20560,19 @@ dependencies = [ [[package]] name = "sc-storage-monitor" -version = "0.16.0" +version = "0.25.0" dependencies = [ "clap", "fs4", "log", - "sp-core 28.0.0", + "sp-core 37.0.0", "thiserror 1.0.65", "tokio", ] [[package]] name = "sc-sync-state-rpc" -version = "0.34.0" +version = "0.51.0" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -20571,13 +20584,13 @@ dependencies = [ "serde", "serde_json", "sp-blockchain", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", "thiserror 1.0.65", ] [[package]] name = "sc-sysinfo" -version = "27.0.0" +version = "43.0.0" dependencies = [ "derive_more 0.99.17", "futures", @@ -20589,15 +20602,15 @@ dependencies = [ "sc-telemetry", "serde", "serde_json", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-crypto-hashing 0.1.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-io 41.0.1", + "sp-runtime 42.0.0", ] [[package]] name = "sc-telemetry" -version = "15.0.0" +version = "29.0.0" dependencies = [ "chrono", "futures", @@ -20615,7 +20628,7 @@ dependencies = [ [[package]] name = "sc-tracing" -version = "28.0.0" +version = "40.0.0" dependencies = [ "chrono", "console", @@ -20630,12 +20643,12 @@ dependencies = [ "sc-client-api", "sc-tracing-proc-macro", "serde", - "sp-api 26.0.0", + "sp-api 37.0.0", "sp-blockchain", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-rpc", - "sp-runtime 31.0.1", - "sp-tracing 16.0.0", + "sp-runtime 42.0.0", + "sp-tracing 17.1.0", "thiserror 1.0.65", "tracing", "tracing-log", @@ -20644,7 +20657,7 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" -version = "11.0.0" +version = "11.1.0" dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2 1.0.95", @@ -20654,7 +20667,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool" -version = "28.0.0" +version = "40.0.0" dependencies = [ "anyhow", "assert_matches", @@ -20673,13 +20686,13 @@ dependencies = [ "sc-transaction-pool-api", "sc-utils", "serde", - "sp-api 26.0.0", + "sp-api 37.0.0", "sp-blockchain", "sp-consensus", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-crypto-hashing 0.1.0", - "sp-runtime 31.0.1", - "sp-tracing 16.0.0", + "sp-runtime 42.0.0", + "sp-tracing 17.1.0", "sp-transaction-pool", "substrate-prometheus-endpoint", "substrate-test-runtime", @@ -20696,7 +20709,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" -version = "28.0.0" +version = "40.0.0" dependencies = [ "async-trait", "futures", @@ -20706,14 +20719,14 @@ dependencies = [ "serde", "serde_json", "sp-blockchain", - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-runtime 42.0.0", "thiserror 1.0.65", ] [[package]] name = "sc-utils" -version = "14.0.0" +version = "19.0.0" dependencies = [ "async-channel 1.9.0", "futures", @@ -20721,7 +20734,7 @@ dependencies = [ "log", "parking_lot 0.12.3", "prometheus", - "sp-arithmetic 23.0.0", + "sp-arithmetic 27.0.0", "tokio-test", ] @@ -21011,7 +21024,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "844b7645371e6ecdf61ff246ba1958c29e802881a749ae3fb1993675d210d28d" dependencies = [ "arrayref", - "arrayvec 0.7.4", + "arrayvec 0.7.6", "curve25519-dalek-ng", "merlin", "rand_core 0.6.4", @@ -21029,7 +21042,7 @@ checksum = "8de18f6d8ba0aad7045f5feae07ec29899c1112584a38509a84ad7b04451eaa0" dependencies = [ "aead", "arrayref", - "arrayvec 0.7.4", + "arrayvec 0.7.6", "curve25519-dalek 4.1.3", "getrandom_or_panic", "merlin", @@ -21576,12 +21589,12 @@ checksum = "826167069c09b99d56f31e9ae5c99049e932a98c9dc2dac47645b08dbbf76ba7" [[package]] name = "slot-range-helper" -version = "7.0.0" +version = "18.0.0" dependencies = [ "enumn", "parity-scale-codec", "paste", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", ] [[package]] @@ -21662,7 +21675,7 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0bb30cf57b7b5f6109ce17c3164445e2d6f270af2cb48f6e4d31c2967c9a9f5" dependencies = [ - "arrayvec 0.7.4", + "arrayvec 0.7.6", "async-lock 2.8.0", "atomic-take", "base64 0.21.7", @@ -21716,7 +21729,7 @@ version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "966e72d77a3b2171bb7461d0cb91f43670c63558c62d7cf42809cae6c8b6b818" dependencies = [ - "arrayvec 0.7.4", + "arrayvec 0.7.6", "async-lock 3.4.0", "atomic-take", "base64 0.22.1", @@ -21871,7 +21884,7 @@ dependencies = [ [[package]] name = "snowbridge-beacon-primitives" -version = "0.2.0" +version = "0.14.0" dependencies = [ "byte-slice-cast", "frame-support", @@ -21883,9 +21896,9 @@ dependencies = [ "serde", "snowbridge-ethereum", "snowbridge-milagro-bls", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", "sp-std 14.0.0", "ssz_rs", "ssz_rs_derive", @@ -21893,7 +21906,7 @@ dependencies = [ [[package]] name = "snowbridge-core" -version = "0.2.0" +version = "0.14.0" dependencies = [ "bp-relayers", "frame-support", @@ -21904,10 +21917,10 @@ dependencies = [ "polkadot-parachain-primitives", "scale-info", "serde", - "sp-arithmetic 23.0.0", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-arithmetic 27.0.0", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", "sp-std 14.0.0", "staging-xcm", "staging-xcm-builder", @@ -21916,7 +21929,7 @@ dependencies = [ [[package]] name = "snowbridge-ethereum" -version = "0.3.0" +version = "0.13.0" dependencies = [ "ethabi-decode", "ethbloom", @@ -21928,14 +21941,14 @@ dependencies = [ "scale-info", "serde", "serde-big-array", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-io 41.0.1", + "sp-runtime 42.0.0", "sp-std 14.0.0", ] [[package]] name = "snowbridge-inbound-queue-primitives" -version = "0.9.0" +version = "0.3.0" dependencies = [ "alloy-core", "frame-support", @@ -21948,9 +21961,9 @@ dependencies = [ "snowbridge-core", "snowbridge-test-utils", "snowbridge-verification-primitives", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", "sp-std 14.0.0", "staging-xcm", "staging-xcm-builder", @@ -21959,17 +21972,17 @@ dependencies = [ [[package]] name = "snowbridge-merkle-tree" -version = "0.2.0" +version = "0.3.0" dependencies = [ "array-bytes 6.2.2", "hex", "hex-literal", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-crypto-hashing 0.1.0", - "sp-runtime 31.0.1", - "sp-tracing 16.0.0", + "sp-runtime 42.0.0", + "sp-tracing 17.1.0", ] [[package]] @@ -21989,7 +22002,7 @@ dependencies = [ [[package]] name = "snowbridge-outbound-queue-primitives" -version = "0.2.0" +version = "0.3.0" dependencies = [ "alloy-core", "ethabi-decode", @@ -22002,10 +22015,10 @@ dependencies = [ "scale-info", "snowbridge-core", "snowbridge-verification-primitives", - "sp-arithmetic 23.0.0", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-arithmetic 27.0.0", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", "sp-std 14.0.0", "staging-xcm", "staging-xcm-builder", @@ -22014,32 +22027,32 @@ dependencies = [ [[package]] name = "snowbridge-outbound-queue-runtime-api" -version = "0.2.0" +version = "0.14.0" dependencies = [ "frame-support", "parity-scale-codec", "snowbridge-core", "snowbridge-merkle-tree", "snowbridge-outbound-queue-primitives", - "sp-api 26.0.0", + "sp-api 37.0.0", "sp-std 14.0.0", ] [[package]] name = "snowbridge-outbound-queue-v2-runtime-api" -version = "0.2.0" +version = "0.3.0" dependencies = [ "frame-support", "parity-scale-codec", "scale-info", "snowbridge-merkle-tree", - "sp-api 26.0.0", + "sp-api 37.0.0", "sp-std 14.0.0", ] [[package]] name = "snowbridge-pallet-ethereum-client" -version = "0.2.0" +version = "0.14.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -22056,27 +22069,27 @@ dependencies = [ "snowbridge-ethereum", "snowbridge-pallet-ethereum-client-fixtures", "snowbridge-verification-primitives", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", "sp-std 14.0.0", "static_assertions", ] [[package]] name = "snowbridge-pallet-ethereum-client-fixtures" -version = "0.9.0" +version = "0.22.0" dependencies = [ "hex-literal", "snowbridge-beacon-primitives", "snowbridge-verification-primitives", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-std 14.0.0", ] [[package]] name = "snowbridge-pallet-inbound-queue" -version = "0.2.0" +version = "0.14.0" dependencies = [ "alloy-core", "frame-benchmarking", @@ -22093,10 +22106,10 @@ dependencies = [ "snowbridge-inbound-queue-primitives", "snowbridge-pallet-ethereum-client", "snowbridge-pallet-inbound-queue-fixtures", - "sp-core 28.0.0", - "sp-io 30.0.0", + "sp-core 37.0.0", + "sp-io 41.0.1", "sp-keyring", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", "sp-std 14.0.0", "staging-xcm", "staging-xcm-executor", @@ -22104,19 +22117,19 @@ dependencies = [ [[package]] name = "snowbridge-pallet-inbound-queue-fixtures" -version = "0.10.0" +version = "0.22.0" dependencies = [ "hex-literal", "snowbridge-beacon-primitives", "snowbridge-core", "snowbridge-inbound-queue-primitives", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-std 14.0.0", ] [[package]] name = "snowbridge-pallet-inbound-queue-v2" -version = "0.2.0" +version = "0.3.0" dependencies = [ "alloy-core", "bp-relayers", @@ -22134,10 +22147,10 @@ dependencies = [ "snowbridge-inbound-queue-primitives", "snowbridge-pallet-inbound-queue-v2-fixtures", "snowbridge-test-utils", - "sp-core 28.0.0", - "sp-io 30.0.0", + "sp-core 37.0.0", + "sp-io 41.0.1", "sp-keyring", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", "sp-std 14.0.0", "staging-xcm", "staging-xcm-builder", @@ -22147,19 +22160,19 @@ dependencies = [ [[package]] name = "snowbridge-pallet-inbound-queue-v2-fixtures" -version = "0.10.0" +version = "0.3.0" dependencies = [ "hex-literal", "snowbridge-beacon-primitives", "snowbridge-core", "snowbridge-inbound-queue-primitives", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-std 14.0.0", ] [[package]] name = "snowbridge-pallet-outbound-queue" -version = "0.2.0" +version = "0.14.0" dependencies = [ "bridge-hub-common", "ethabi-decode", @@ -22173,16 +22186,16 @@ dependencies = [ "snowbridge-core", "snowbridge-merkle-tree", "snowbridge-outbound-queue-primitives", - "sp-arithmetic 23.0.0", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-arithmetic 27.0.0", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", "sp-std 14.0.0", ] [[package]] name = "snowbridge-pallet-outbound-queue-v2" -version = "0.2.0" +version = "0.3.0" dependencies = [ "alloy-core", "bp-relayers", @@ -22202,10 +22215,10 @@ dependencies = [ "snowbridge-outbound-queue-primitives", "snowbridge-test-utils", "snowbridge-verification-primitives", - "sp-arithmetic 23.0.0", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-arithmetic 27.0.0", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", "sp-std 14.0.0", "staging-xcm", "staging-xcm-builder", @@ -22214,7 +22227,7 @@ dependencies = [ [[package]] name = "snowbridge-pallet-system" -version = "0.2.0" +version = "0.14.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -22230,9 +22243,9 @@ dependencies = [ "snowbridge-core", "snowbridge-outbound-queue-primitives", "snowbridge-pallet-outbound-queue", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", "sp-std 14.0.0", "staging-xcm", "staging-xcm-executor", @@ -22240,7 +22253,7 @@ dependencies = [ [[package]] name = "snowbridge-pallet-system-frontend" -version = "0.2.0" +version = "0.3.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -22252,10 +22265,10 @@ dependencies = [ "scale-info", "snowbridge-core", "snowbridge-test-utils", - "sp-core 28.0.0", - "sp-io 30.0.0", + "sp-core 37.0.0", + "sp-io 41.0.1", "sp-keyring", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", "sp-std 14.0.0", "staging-xcm", "staging-xcm-executor", @@ -22264,7 +22277,7 @@ dependencies = [ [[package]] name = "snowbridge-pallet-system-v2" -version = "0.2.0" +version = "0.3.0" dependencies = [ "frame-benchmarking", "frame-support", @@ -22278,10 +22291,10 @@ dependencies = [ "snowbridge-outbound-queue-primitives", "snowbridge-pallet-system", "snowbridge-test-utils", - "sp-core 28.0.0", - "sp-io 30.0.0", + "sp-core 37.0.0", + "sp-io 41.0.1", "sp-keyring", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", "sp-std 14.0.0", "staging-xcm", "staging-xcm-executor", @@ -22290,7 +22303,7 @@ dependencies = [ [[package]] name = "snowbridge-runtime-common" -version = "0.2.0" +version = "0.14.0" dependencies = [ "frame-support", "frame-system", @@ -22299,7 +22312,7 @@ dependencies = [ "parity-scale-codec", "snowbridge-core", "snowbridge-outbound-queue-primitives", - "sp-arithmetic 23.0.0", + "sp-arithmetic 27.0.0", "sp-std 14.0.0", "staging-xcm", "staging-xcm-builder", @@ -22308,7 +22321,7 @@ dependencies = [ [[package]] name = "snowbridge-runtime-test-common" -version = "0.2.0" +version = "0.16.0" dependencies = [ "cumulus-pallet-parachain-system", "frame-support", @@ -22327,10 +22340,10 @@ dependencies = [ "snowbridge-pallet-ethereum-client-fixtures", "snowbridge-pallet-outbound-queue", "snowbridge-pallet-system", - "sp-core 28.0.0", - "sp-io 30.0.0", + "sp-core 37.0.0", + "sp-io 41.0.1", "sp-keyring", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", "staging-parachain-info", "staging-xcm", "staging-xcm-executor", @@ -22338,29 +22351,29 @@ dependencies = [ [[package]] name = "snowbridge-system-runtime-api" -version = "0.2.0" +version = "0.14.0" dependencies = [ "parity-scale-codec", "snowbridge-core", - "sp-api 26.0.0", + "sp-api 37.0.0", "sp-std 14.0.0", "staging-xcm", ] [[package]] name = "snowbridge-system-v2-runtime-api" -version = "0.2.0" +version = "0.3.0" dependencies = [ "parity-scale-codec", "snowbridge-core", - "sp-api 26.0.0", + "sp-api 37.0.0", "sp-std 14.0.0", "staging-xcm", ] [[package]] name = "snowbridge-test-utils" -version = "0.1.0" +version = "0.3.0" dependencies = [ "bp-relayers", "frame-benchmarking", @@ -22373,7 +22386,7 @@ dependencies = [ "scale-info", "snowbridge-core", "snowbridge-outbound-queue-primitives", - "sp-core 28.0.0", + "sp-core 37.0.0", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -22381,13 +22394,13 @@ dependencies = [ [[package]] name = "snowbridge-verification-primitives" -version = "0.2.0" +version = "0.3.0" dependencies = [ "frame-support", "parity-scale-codec", "scale-info", "snowbridge-beacon-primitives", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-std 14.0.0", ] @@ -22444,7 +22457,7 @@ dependencies = [ [[package]] name = "solochain-template-node" -version = "0.0.0" +version = "0.1.0" dependencies = [ "clap", "frame-benchmarking-cli", @@ -22460,7 +22473,7 @@ dependencies = [ "sc-consensus", "sc-consensus-aura", "sc-consensus-grandpa", - "sc-executor 0.32.0", + "sc-executor 0.43.0", "sc-network", "sc-offchain", "sc-service", @@ -22468,16 +22481,16 @@ dependencies = [ "sc-transaction-pool", "sc-transaction-pool-api", "solochain-template-runtime", - "sp-api 26.0.0", + "sp-api 37.0.0", "sp-block-builder", "sp-blockchain", "sp-consensus-aura", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-genesis-builder", "sp-inherents", - "sp-io 30.0.0", + "sp-io 41.0.1", "sp-keyring", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", "sp-timestamp", "substrate-build-script-utils", "substrate-frame-rpc-system", @@ -22485,7 +22498,7 @@ dependencies = [ [[package]] name = "solochain-template-runtime" -version = "0.0.0" +version = "0.1.0" dependencies = [ "frame-benchmarking", "frame-executive", @@ -22506,50 +22519,28 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde_json", - "sp-api 26.0.0", + "sp-api 37.0.0", "sp-block-builder", "sp-consensus-aura", "sp-consensus-grandpa", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-genesis-builder", "sp-inherents", "sp-keyring", "sp-offchain", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", "sp-session", - "sp-storage 19.0.0", + "sp-storage 22.0.0", "sp-transaction-pool", - "sp-version 29.0.0", + "sp-version 40.0.0", "substrate-wasm-builder", ] [[package]] name = "sp-api" -version = "26.0.0" -dependencies = [ - "docify", - "hash-db", - "log", - "parity-scale-codec", - "scale-info", - "sp-api-proc-macro 15.0.0", - "sp-core 28.0.0", - "sp-externalities 0.25.0", - "sp-metadata-ir 0.6.0", - "sp-runtime 31.0.1", - "sp-runtime-interface 24.0.0", - "sp-state-machine 0.35.0", - "sp-test-primitives", - "sp-trie 29.0.0", - "sp-version 29.0.0", - "thiserror 1.0.65", -] - -[[package]] -name = "sp-api" -version = "32.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f84f09c4b928e814e07dede0ece91f1f6eae1bff946a0e5e4a76bed19a095f1" +version = "32.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f84f09c4b928e814e07dede0ece91f1f6eae1bff946a0e5e4a76bed19a095f1" dependencies = [ "hash-db", "log", @@ -22568,12 +22559,35 @@ dependencies = [ "thiserror 1.0.65", ] +[[package]] +name = "sp-api" +version = "37.0.0" +dependencies = [ + "docify", + "hash-db", + "log", + "parity-scale-codec", + "scale-info", + "sp-api-proc-macro 23.0.0", + "sp-core 37.0.0", + "sp-externalities 0.30.0", + "sp-metadata-ir 0.11.0", + "sp-runtime 42.0.0", + "sp-runtime-interface 30.0.0", + "sp-state-machine 0.46.0", + "sp-test-primitives", + "sp-trie 40.0.0", + "sp-version 40.0.0", + "thiserror 1.0.65", +] + [[package]] name = "sp-api-proc-macro" -version = "15.0.0" +version = "19.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "213a4bec1b18bd0750e7b81d11d8276c24f68b53cde83950b00b178ecc9ab24a" dependencies = [ "Inflector", - "assert_matches", "blake2 0.10.6", "expander", "proc-macro-crate 3.1.0", @@ -22584,11 +22598,10 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" -version = "19.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "213a4bec1b18bd0750e7b81d11d8276c24f68b53cde83950b00b178ecc9ab24a" +version = "23.0.0" dependencies = [ "Inflector", + "assert_matches", "blake2 0.10.6", "expander", "proc-macro-crate 3.1.0", @@ -22608,30 +22621,19 @@ dependencies = [ "rustversion", "sc-block-builder", "scale-info", - "sp-api 26.0.0", + "sp-api 37.0.0", "sp-consensus", - "sp-core 28.0.0", - "sp-metadata-ir 0.6.0", - "sp-runtime 31.0.1", - "sp-state-machine 0.35.0", - "sp-tracing 16.0.0", - "sp-version 29.0.0", + "sp-core 37.0.0", + "sp-metadata-ir 0.11.0", + "sp-runtime 42.0.0", + "sp-state-machine 0.46.0", + "sp-tracing 17.1.0", + "sp-version 40.0.0", "static_assertions", "substrate-test-runtime-client", "trybuild", ] -[[package]] -name = "sp-application-crypto" -version = "30.0.0" -dependencies = [ - "parity-scale-codec", - "scale-info", - "serde", - "sp-core 28.0.0", - "sp-io 30.0.0", -] - [[package]] name = "sp-application-crypto" version = "35.0.0" @@ -22660,48 +22662,59 @@ dependencies = [ "sp-std 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "sp-application-crypto" +version = "41.0.0" +dependencies = [ + "parity-scale-codec", + "scale-info", + "serde", + "sp-core 37.0.0", + "sp-io 41.0.1", +] + [[package]] name = "sp-application-crypto-test" version = "2.0.0" dependencies = [ - "sp-api 26.0.0", - "sp-application-crypto 30.0.0", - "sp-core 28.0.0", - "sp-keystore 0.34.0", - "sp-tracing 16.0.0", + "sp-api 37.0.0", + "sp-application-crypto 41.0.0", + "sp-core 37.0.0", + "sp-keystore 0.43.0", + "sp-tracing 17.1.0", "substrate-test-runtime-client", ] [[package]] name = "sp-arithmetic" -version = "23.0.0" +version = "26.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46d0d0a4c591c421d3231ddd5e27d828618c24456d51445d21a1f79fcee97c23" dependencies = [ - "criterion", "docify", "integer-sqrt", "num-traits", "parity-scale-codec", - "primitive-types 0.13.1", - "rand 0.8.5", "scale-info", "serde", - "sp-crypto-hashing 0.1.0", + "sp-std 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "static_assertions", ] [[package]] name = "sp-arithmetic" -version = "26.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46d0d0a4c591c421d3231ddd5e27d828618c24456d51445d21a1f79fcee97c23" +version = "27.0.0" dependencies = [ + "criterion", "docify", "integer-sqrt", "num-traits", "parity-scale-codec", + "primitive-types 0.13.1", + "rand 0.8.5", "scale-info", "serde", - "sp-std 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-crypto-hashing 0.1.0", "static_assertions", ] @@ -22713,156 +22726,156 @@ dependencies = [ "fraction", "honggfuzz", "num-bigint", - "sp-arithmetic 23.0.0", + "sp-arithmetic 27.0.0", ] [[package]] name = "sp-authority-discovery" -version = "26.0.0" +version = "37.0.0" dependencies = [ "parity-scale-codec", "scale-info", - "sp-api 26.0.0", - "sp-application-crypto 30.0.0", - "sp-runtime 31.0.1", + "sp-api 37.0.0", + "sp-application-crypto 41.0.0", + "sp-runtime 42.0.0", ] [[package]] name = "sp-block-builder" -version = "26.0.0" +version = "37.0.0" dependencies = [ - "sp-api 26.0.0", + "sp-api 37.0.0", "sp-inherents", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", ] [[package]] name = "sp-blockchain" -version = "28.0.0" +version = "40.0.0" dependencies = [ "futures", "parity-scale-codec", "parking_lot 0.12.3", "schnellru", - "sp-api 26.0.0", + "sp-api 37.0.0", "sp-consensus", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-database", - "sp-runtime 31.0.1", - "sp-state-machine 0.35.0", + "sp-runtime 42.0.0", + "sp-state-machine 0.46.0", "thiserror 1.0.65", "tracing", ] [[package]] name = "sp-consensus" -version = "0.32.0" +version = "0.43.0" dependencies = [ "async-trait", "futures", "log", "sp-inherents", - "sp-runtime 31.0.1", - "sp-state-machine 0.35.0", + "sp-runtime 42.0.0", + "sp-state-machine 0.46.0", "thiserror 1.0.65", ] [[package]] name = "sp-consensus-aura" -version = "0.32.0" +version = "0.43.0" dependencies = [ "async-trait", "parity-scale-codec", "scale-info", - "sp-api 26.0.0", - "sp-application-crypto 30.0.0", + "sp-api 37.0.0", + "sp-application-crypto 41.0.0", "sp-consensus-slots", "sp-inherents", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", "sp-timestamp", ] [[package]] name = "sp-consensus-babe" -version = "0.32.0" +version = "0.43.0" dependencies = [ "async-trait", "parity-scale-codec", "scale-info", "serde", - "sp-api 26.0.0", - "sp-application-crypto 30.0.0", + "sp-api 37.0.0", + "sp-application-crypto 41.0.0", "sp-consensus-slots", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-inherents", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", "sp-timestamp", ] [[package]] name = "sp-consensus-beefy" -version = "13.0.0" +version = "25.0.0" dependencies = [ "array-bytes 6.2.2", "parity-scale-codec", "scale-info", "serde", - "sp-api 26.0.0", - "sp-application-crypto 30.0.0", - "sp-core 28.0.0", + "sp-api 37.0.0", + "sp-application-crypto 41.0.0", + "sp-core 37.0.0", "sp-crypto-hashing 0.1.0", - "sp-io 30.0.0", - "sp-keystore 0.34.0", + "sp-io 41.0.1", + "sp-keystore 0.43.0", "sp-mmr-primitives", - "sp-runtime 31.0.1", - "sp-weights 27.0.0", + "sp-runtime 42.0.0", + "sp-weights 32.0.0", "strum 0.26.3", "w3f-bls", ] [[package]] name = "sp-consensus-grandpa" -version = "13.0.0" +version = "24.0.0" dependencies = [ "finality-grandpa", "log", "parity-scale-codec", "scale-info", "serde", - "sp-api 26.0.0", - "sp-application-crypto 30.0.0", - "sp-core 28.0.0", - "sp-keystore 0.34.0", - "sp-runtime 31.0.1", + "sp-api 37.0.0", + "sp-application-crypto 41.0.0", + "sp-core 37.0.0", + "sp-keystore 0.43.0", + "sp-runtime 42.0.0", ] [[package]] name = "sp-consensus-pow" -version = "0.32.0" +version = "0.43.0" dependencies = [ "parity-scale-codec", - "sp-api 26.0.0", - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-api 37.0.0", + "sp-core 37.0.0", + "sp-runtime 42.0.0", ] [[package]] name = "sp-consensus-sassafras" -version = "0.3.4-dev" +version = "0.3.4" dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-api 26.0.0", - "sp-application-crypto 30.0.0", + "sp-api 37.0.0", + "sp-application-crypto 41.0.0", "sp-consensus-slots", - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-runtime 42.0.0", ] [[package]] name = "sp-consensus-slots" -version = "0.32.0" +version = "0.43.0" dependencies = [ "parity-scale-codec", "scale-info", @@ -22872,23 +22885,22 @@ dependencies = [ [[package]] name = "sp-core" -version = "28.0.0" +version = "32.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb2dac7e47c7ddbb61efe196d5cce99f6ea88926c961fa39909bfeae46fc5a7b" dependencies = [ - "ark-vrf", "array-bytes 6.2.2", "bitflags 1.3.2", "blake2 0.10.6", "bounded-collections 0.2.3", "bs58", - "criterion", "dyn-clonable", - "dyn-clone", - "ed25519-zebra 4.0.3", + "ed25519-zebra 3.1.0", "futures", "hash-db", "hash256-std-hasher", - "impl-serde 0.5.0", - "itertools 0.11.0", + "impl-serde 0.4.0", + "itertools 0.10.5", "k256", "libsecp256k1", "log", @@ -22897,24 +22909,21 @@ dependencies = [ "parity-scale-codec", "parking_lot 0.12.3", "paste", - "primitive-types 0.13.1", + "primitive-types 0.12.2", "rand 0.8.5", - "regex", "scale-info", "schnorrkel 0.11.4", "secp256k1 0.28.2", "secrecy 0.8.0", "serde", - "serde_json", - "sha2 0.10.8", - "sp-crypto-hashing 0.1.0", - "sp-debug-derive 14.0.0", - "sp-externalities 0.25.0", - "sp-runtime-interface 24.0.0", - "sp-std 14.0.0", - "sp-storage 19.0.0", + "sp-crypto-hashing 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-debug-derive 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-externalities 0.28.0", + "sp-runtime-interface 27.0.0", + "sp-std 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-storage 21.0.0", "ss58-registry", - "substrate-bip39 0.4.7", + "substrate-bip39 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "thiserror 1.0.65", "tracing", "w3f-bls", @@ -22923,9 +22932,9 @@ dependencies = [ [[package]] name = "sp-core" -version = "32.0.0" +version = "33.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb2dac7e47c7ddbb61efe196d5cce99f6ea88926c961fa39909bfeae46fc5a7b" +checksum = "3368e32f6fda6e20b8af51f94308d033ab70a021e87f6abbd3fed5aca942b745" dependencies = [ "array-bytes 6.2.2", "bitflags 1.3.2", @@ -22933,12 +22942,12 @@ dependencies = [ "bounded-collections 0.2.3", "bs58", "dyn-clonable", - "ed25519-zebra 3.1.0", + "ed25519-zebra 4.0.3", "futures", "hash-db", "hash256-std-hasher", "impl-serde 0.4.0", - "itertools 0.10.5", + "itertools 0.11.0", "k256", "libsecp256k1", "log", @@ -22961,7 +22970,7 @@ dependencies = [ "sp-std 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "sp-storage 21.0.0", "ss58-registry", - "substrate-bip39 0.6.0", + "substrate-bip39 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "thiserror 1.0.65", "tracing", "w3f-bls", @@ -22970,9 +22979,9 @@ dependencies = [ [[package]] name = "sp-core" -version = "33.0.1" +version = "35.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3368e32f6fda6e20b8af51f94308d033ab70a021e87f6abbd3fed5aca942b745" +checksum = "4532774405a712a366a98080cbb4daa28c38ddff0ec595902ad6ee6a78a809f8" dependencies = [ "array-bytes 6.2.2", "bitflags 1.3.2", @@ -22984,7 +22993,7 @@ dependencies = [ "futures", "hash-db", "hash256-std-hasher", - "impl-serde 0.4.0", + "impl-serde 0.5.0", "itertools 0.11.0", "k256", "libsecp256k1", @@ -22994,7 +23003,7 @@ dependencies = [ "parity-scale-codec", "parking_lot 0.12.3", "paste", - "primitive-types 0.12.2", + "primitive-types 0.13.1", "rand 0.8.5", "scale-info", "schnorrkel 0.11.4", @@ -23003,12 +23012,12 @@ dependencies = [ "serde", "sp-crypto-hashing 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "sp-debug-derive 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-externalities 0.28.0", - "sp-runtime-interface 27.0.0", + "sp-externalities 0.30.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-runtime-interface 29.0.0", "sp-std 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-storage 21.0.0", + "sp-storage 22.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "ss58-registry", - "substrate-bip39 0.6.0", + "substrate-bip39 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "thiserror 1.0.65", "tracing", "w3f-bls", @@ -23017,16 +23026,17 @@ dependencies = [ [[package]] name = "sp-core" -version = "35.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4532774405a712a366a98080cbb4daa28c38ddff0ec595902ad6ee6a78a809f8" +version = "37.0.0" dependencies = [ + "ark-vrf", "array-bytes 6.2.2", "bitflags 1.3.2", "blake2 0.10.6", "bounded-collections 0.2.3", "bs58", + "criterion", "dyn-clonable", + "dyn-clone", "ed25519-zebra 4.0.3", "futures", "hash-db", @@ -23043,16 +23053,19 @@ dependencies = [ "paste", "primitive-types 0.13.1", "rand 0.8.5", + "regex", "scale-info", "schnorrkel 0.11.4", "secp256k1 0.28.2", "secrecy 0.8.0", "serde", - "sp-crypto-hashing 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-debug-derive 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json", + "sha2 0.10.8", + "sp-crypto-hashing 0.1.0", + "sp-debug-derive 14.0.0", "sp-externalities 0.30.0", - "sp-runtime-interface 29.0.0", - "sp-std 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-runtime-interface 30.0.0", + "sp-std 14.0.0", "sp-storage 22.0.0", "ss58-registry", "substrate-bip39 0.6.0", @@ -23064,30 +23077,30 @@ dependencies = [ [[package]] name = "sp-core-fuzz" -version = "0.0.0" +version = "0.1.0" dependencies = [ "libfuzzer-sys", "regex", - "sp-core 28.0.0", + "sp-core 37.0.0", ] [[package]] name = "sp-core-hashing" -version = "15.0.0" +version = "16.0.0" dependencies = [ "sp-crypto-hashing 0.1.0", ] [[package]] name = "sp-core-hashing-proc-macro" -version = "15.0.0" +version = "16.0.0" dependencies = [ "sp-crypto-hashing-proc-macro 0.1.0", ] [[package]] name = "sp-crypto-ec-utils" -version = "0.10.0" +version = "0.16.0" dependencies = [ "ark-bls12-377", "ark-bls12-377-ext", @@ -23101,7 +23114,7 @@ dependencies = [ "ark-ed-on-bls12-381-bandersnatch 0.4.0", "ark-ed-on-bls12-381-bandersnatch-ext", "ark-scale 0.0.12", - "sp-runtime-interface 24.0.0", + "sp-runtime-interface 30.0.0", ] [[package]] @@ -23182,22 +23195,22 @@ dependencies = [ [[package]] name = "sp-externalities" -version = "0.25.0" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33abaec4be69b1613796bbf430decbbcaaf978756379e2016e683a4d6379cd02" dependencies = [ "environmental", "parity-scale-codec", - "sp-storage 19.0.0", + "sp-storage 21.0.0", ] [[package]] name = "sp-externalities" -version = "0.28.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33abaec4be69b1613796bbf430decbbcaaf978756379e2016e683a4d6379cd02" +version = "0.30.0" dependencies = [ "environmental", "parity-scale-codec", - "sp-storage 21.0.0", + "sp-storage 22.0.0", ] [[package]] @@ -23208,58 +23221,33 @@ checksum = "30cbf059dce180a8bf8b6c8b08b6290fa3d1c7f069a60f1df038ab5dd5fc0ba6" dependencies = [ "environmental", "parity-scale-codec", - "sp-storage 22.0.0", + "sp-storage 22.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "sp-genesis-builder" -version = "0.8.0" +version = "0.18.0" dependencies = [ "parity-scale-codec", "scale-info", "serde_json", - "sp-api 26.0.0", - "sp-runtime 31.0.1", + "sp-api 37.0.0", + "sp-runtime 42.0.0", ] [[package]] name = "sp-inherents" -version = "26.0.0" +version = "37.0.0" dependencies = [ "async-trait", "futures", "impl-trait-for-tuples", "parity-scale-codec", "scale-info", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", "thiserror 1.0.65", ] -[[package]] -name = "sp-io" -version = "30.0.0" -dependencies = [ - "bytes", - "docify", - "ed25519-dalek", - "libsecp256k1", - "log", - "parity-scale-codec", - "polkavm-derive 0.24.0", - "rustversion", - "secp256k1 0.28.2", - "sp-core 28.0.0", - "sp-crypto-hashing 0.1.0", - "sp-externalities 0.25.0", - "sp-keystore 0.34.0", - "sp-runtime-interface 24.0.0", - "sp-state-machine 0.35.0", - "sp-tracing 16.0.0", - "sp-trie 29.0.0", - "tracing", - "tracing-core", -] - [[package]] name = "sp-io" version = "35.0.0" @@ -23315,22 +23303,37 @@ dependencies = [ ] [[package]] -name = "sp-keyring" -version = "31.0.0" +name = "sp-io" +version = "41.0.1" dependencies = [ - "sp-core 28.0.0", - "sp-runtime 31.0.1", - "strum 0.26.3", + "bytes", + "docify", + "ed25519-dalek", + "libsecp256k1", + "log", + "parity-scale-codec", + "polkavm-derive 0.24.0", + "rustversion", + "secp256k1 0.28.2", + "sp-core 37.0.0", + "sp-crypto-hashing 0.1.0", + "sp-externalities 0.30.0", + "sp-keystore 0.43.0", + "sp-runtime-interface 30.0.0", + "sp-state-machine 0.46.0", + "sp-tracing 17.1.0", + "sp-trie 40.0.0", + "tracing", + "tracing-core", ] [[package]] -name = "sp-keystore" -version = "0.34.0" +name = "sp-keyring" +version = "42.0.0" dependencies = [ - "parity-scale-codec", - "parking_lot 0.12.3", - "sp-core 28.0.0", - "sp-externalities 0.25.0", + "sp-core 37.0.0", + "sp-runtime 42.0.0", + "strum 0.26.3", ] [[package]] @@ -23357,6 +23360,16 @@ dependencies = [ "sp-externalities 0.28.0", ] +[[package]] +name = "sp-keystore" +version = "0.43.0" +dependencies = [ + "parity-scale-codec", + "parking_lot 0.12.3", + "sp-core 37.0.0", + "sp-externalities 0.30.0", +] + [[package]] name = "sp-maybe-compressed-blob" version = "11.0.0" @@ -23377,37 +23390,37 @@ dependencies = [ [[package]] name = "sp-metadata-ir" -version = "0.6.0" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a616fa51350b35326682a472ee8e6ba742fdacb18babac38ecd46b3e05ead869" dependencies = [ - "frame-metadata 23.0.0", + "frame-metadata 16.0.0", "parity-scale-codec", "scale-info", ] [[package]] name = "sp-metadata-ir" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a616fa51350b35326682a472ee8e6ba742fdacb18babac38ecd46b3e05ead869" +version = "0.11.0" dependencies = [ - "frame-metadata 16.0.0", + "frame-metadata 23.0.0", "parity-scale-codec", "scale-info", ] [[package]] name = "sp-mixnet" -version = "0.4.0" +version = "0.15.0" dependencies = [ "parity-scale-codec", "scale-info", - "sp-api 26.0.0", - "sp-application-crypto 30.0.0", + "sp-api 37.0.0", + "sp-application-crypto 41.0.0", ] [[package]] name = "sp-mmr-primitives" -version = "26.0.0" +version = "37.0.0" dependencies = [ "array-bytes 6.2.2", "log", @@ -23415,107 +23428,73 @@ dependencies = [ "polkadot-ckb-merkle-mountain-range", "scale-info", "serde", - "sp-api 26.0.0", - "sp-core 28.0.0", + "sp-api 37.0.0", + "sp-core 37.0.0", "sp-debug-derive 14.0.0", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", "thiserror 1.0.65", ] [[package]] name = "sp-npos-elections" -version = "26.0.0" +version = "37.0.0" dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-arithmetic 23.0.0", - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-arithmetic 27.0.0", + "sp-core 37.0.0", + "sp-runtime 42.0.0", "substrate-test-utils", ] [[package]] name = "sp-npos-elections-fuzzer" -version = "2.0.0-alpha.5" +version = "2.0.0" dependencies = [ "clap", "honggfuzz", "rand 0.8.5", "sp-npos-elections", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", ] [[package]] name = "sp-offchain" -version = "26.0.0" +version = "37.0.0" dependencies = [ - "sp-api 26.0.0", - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-api 37.0.0", + "sp-core 37.0.0", + "sp-runtime 42.0.0", ] [[package]] name = "sp-panic-handler" version = "13.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8f5a17a0a11de029a8b811cb6e8b32ce7e02183cc04a3e965c383246798c416" dependencies = [ "backtrace", + "lazy_static", "regex", ] [[package]] name = "sp-panic-handler" -version = "13.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8f5a17a0a11de029a8b811cb6e8b32ce7e02183cc04a3e965c383246798c416" +version = "13.0.2" dependencies = [ "backtrace", - "lazy_static", "regex", ] [[package]] name = "sp-rpc" -version = "26.0.0" +version = "35.0.0" dependencies = [ "rustc-hash 1.1.0", "serde", "serde_json", - "sp-core 28.0.0", -] - -[[package]] -name = "sp-runtime" -version = "31.0.1" -dependencies = [ - "binary-merkle-tree", - "docify", - "either", - "hash256-std-hasher", - "impl-trait-for-tuples", - "log", - "num-traits", - "parity-scale-codec", - "paste", - "rand 0.8.5", - "scale-info", - "serde", - "serde_json", - "simple-mermaid", - "sp-api 26.0.0", - "sp-application-crypto 30.0.0", - "sp-arithmetic 23.0.0", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-state-machine 0.35.0", - "sp-std 14.0.0", - "sp-tracing 16.0.0", - "sp-trie 29.0.0", - "sp-weights 27.0.0", - "substrate-test-runtime-client", - "tracing", - "tuplex", - "zstd 0.12.4", + "sp-core 37.0.0", ] [[package]] @@ -23570,26 +23549,37 @@ dependencies = [ ] [[package]] -name = "sp-runtime-interface" -version = "24.0.0" +name = "sp-runtime" +version = "42.0.0" dependencies = [ - "bytes", + "binary-merkle-tree", + "docify", + "either", + "hash256-std-hasher", "impl-trait-for-tuples", + "log", + "num-traits", "parity-scale-codec", - "polkavm-derive 0.24.0", - "primitive-types 0.13.1", - "rustversion", - "sp-externalities 0.25.0", - "sp-io 30.0.0", - "sp-runtime-interface-proc-macro 17.0.0", - "sp-runtime-interface-test-wasm", - "sp-state-machine 0.35.0", + "paste", + "rand 0.8.5", + "scale-info", + "serde", + "serde_json", + "simple-mermaid", + "sp-api 37.0.0", + "sp-application-crypto 41.0.0", + "sp-arithmetic 27.0.0", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-state-machine 0.46.0", "sp-std 14.0.0", - "sp-storage 19.0.0", - "sp-tracing 16.0.0", - "sp-wasm-interface 20.0.0", - "static_assertions", - "trybuild", + "sp-tracing 17.1.0", + "sp-trie 40.0.0", + "sp-weights 32.0.0", + "substrate-test-runtime-client", + "tracing", + "tuplex", + "zstd 0.12.4", ] [[package]] @@ -23606,7 +23596,27 @@ dependencies = [ "sp-externalities 0.28.0", "sp-runtime-interface-proc-macro 18.0.0", "sp-std 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-storage 21.0.0", + "sp-storage 21.0.0", + "sp-tracing 17.0.1", + "sp-wasm-interface 21.0.1", + "static_assertions", +] + +[[package]] +name = "sp-runtime-interface" +version = "29.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51e83d940449837a8b2a01b4d877dd22d896fd14d3d3ade875787982da994a33" +dependencies = [ + "bytes", + "impl-trait-for-tuples", + "parity-scale-codec", + "polkavm-derive 0.9.1", + "primitive-types 0.13.1", + "sp-externalities 0.30.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-runtime-interface-proc-macro 18.0.0", + "sp-std 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-storage 22.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "sp-tracing 17.0.1", "sp-wasm-interface 21.0.1", "static_assertions", @@ -23614,27 +23624,32 @@ dependencies = [ [[package]] name = "sp-runtime-interface" -version = "29.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51e83d940449837a8b2a01b4d877dd22d896fd14d3d3ade875787982da994a33" +version = "30.0.0" dependencies = [ "bytes", "impl-trait-for-tuples", "parity-scale-codec", - "polkavm-derive 0.9.1", + "polkavm-derive 0.24.0", "primitive-types 0.13.1", + "rustversion", "sp-externalities 0.30.0", - "sp-runtime-interface-proc-macro 18.0.0", - "sp-std 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-io 41.0.1", + "sp-runtime-interface-proc-macro 19.0.0", + "sp-runtime-interface-test-wasm", + "sp-state-machine 0.46.0", + "sp-std 14.0.0", "sp-storage 22.0.0", - "sp-tracing 17.0.1", - "sp-wasm-interface 21.0.1", + "sp-tracing 17.1.0", + "sp-wasm-interface 22.0.0", "static_assertions", + "trybuild", ] [[package]] name = "sp-runtime-interface-proc-macro" -version = "17.0.0" +version = "18.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0195f32c628fee3ce1dfbbf2e7e52a30ea85f3589da9fe62a8b816d70fc06294" dependencies = [ "Inflector", "expander", @@ -23646,9 +23661,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" -version = "18.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0195f32c628fee3ce1dfbbf2e7e52a30ea85f3589da9fe62a8b816d70fc06294" +version = "19.0.0" dependencies = [ "Inflector", "expander", @@ -23662,14 +23675,14 @@ dependencies = [ name = "sp-runtime-interface-test" version = "2.0.0" dependencies = [ - "sc-executor 0.32.0", - "sc-executor-common 0.29.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-runtime-interface 24.0.0", + "sc-executor 0.43.0", + "sc-executor-common 0.39.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", + "sp-runtime-interface 30.0.0", "sp-runtime-interface-test-wasm", "sp-runtime-interface-test-wasm-deprecated", - "sp-state-machine 0.35.0", + "sp-state-machine 0.46.0", "tracing", "tracing-core", ] @@ -23679,9 +23692,9 @@ name = "sp-runtime-interface-test-wasm" version = "2.0.0" dependencies = [ "bytes", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime-interface 24.0.0", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime-interface 30.0.0", "substrate-wasm-builder", ] @@ -23689,66 +23702,63 @@ dependencies = [ name = "sp-runtime-interface-test-wasm-deprecated" version = "2.0.0" dependencies = [ - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime-interface 24.0.0", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime-interface 30.0.0", "substrate-wasm-builder", ] [[package]] name = "sp-session" -version = "27.0.0" +version = "39.0.0" dependencies = [ "parity-scale-codec", "scale-info", - "sp-api 26.0.0", - "sp-core 28.0.0", - "sp-keystore 0.34.0", - "sp-runtime 31.0.1", + "sp-api 37.0.0", + "sp-core 37.0.0", + "sp-keystore 0.43.0", + "sp-runtime 42.0.0", "sp-staking", ] [[package]] name = "sp-staking" -version = "26.0.0" +version = "39.0.0" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", "scale-info", "serde", - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-runtime 42.0.0", ] [[package]] name = "sp-state-machine" -version = "0.35.0" +version = "0.40.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18084cb996c27d5d99a88750e0a8eb4af6870a40df97872a5923e6d293d95fb9" dependencies = [ - "arbitrary", - "array-bytes 6.2.2", - "assert_matches", "hash-db", "log", "parity-scale-codec", "parking_lot 0.12.3", - "pretty_assertions", "rand 0.8.5", "smallvec", - "sp-core 28.0.0", - "sp-externalities 0.25.0", + "sp-core 32.0.0", + "sp-externalities 0.28.0", "sp-panic-handler 13.0.0", - "sp-runtime 31.0.1", - "sp-trie 29.0.0", + "sp-trie 34.0.0", "thiserror 1.0.65", "tracing", - "trie-db 0.30.0", + "trie-db 0.29.1", ] [[package]] name = "sp-state-machine" -version = "0.40.0" +version = "0.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18084cb996c27d5d99a88750e0a8eb4af6870a40df97872a5923e6d293d95fb9" +checksum = "6f6ac196ea92c4d0613c071e1a050765dbfa30107a990224a4aba02c7dbcd063" dependencies = [ "hash-db", "log", @@ -23756,10 +23766,10 @@ dependencies = [ "parking_lot 0.12.3", "rand 0.8.5", "smallvec", - "sp-core 32.0.0", + "sp-core 33.0.1", "sp-externalities 0.28.0", - "sp-panic-handler 13.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-trie 34.0.0", + "sp-panic-handler 13.0.0", + "sp-trie 35.0.0", "thiserror 1.0.65", "tracing", "trie-db 0.29.1", @@ -23767,28 +23777,31 @@ dependencies = [ [[package]] name = "sp-state-machine" -version = "0.41.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f6ac196ea92c4d0613c071e1a050765dbfa30107a990224a4aba02c7dbcd063" +version = "0.46.0" dependencies = [ + "arbitrary", + "array-bytes 6.2.2", + "assert_matches", "hash-db", "log", "parity-scale-codec", "parking_lot 0.12.3", + "pretty_assertions", "rand 0.8.5", "smallvec", - "sp-core 33.0.1", - "sp-externalities 0.28.0", - "sp-panic-handler 13.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sp-trie 35.0.0", + "sp-core 37.0.0", + "sp-externalities 0.30.0", + "sp-panic-handler 13.0.2", + "sp-runtime 42.0.0", + "sp-trie 40.0.0", "thiserror 1.0.65", "tracing", - "trie-db 0.29.1", + "trie-db 0.30.0", ] [[package]] name = "sp-statement-store" -version = "10.0.0" +version = "21.0.0" dependencies = [ "aes-gcm", "curve25519-dalek 4.1.3", @@ -23798,13 +23811,13 @@ dependencies = [ "rand 0.8.5", "scale-info", "sha2 0.10.8", - "sp-api 26.0.0", - "sp-application-crypto 30.0.0", - "sp-core 28.0.0", + "sp-api 37.0.0", + "sp-application-crypto 41.0.0", + "sp-core 37.0.0", "sp-crypto-hashing 0.1.0", - "sp-externalities 0.25.0", - "sp-runtime 31.0.1", - "sp-runtime-interface 24.0.0", + "sp-externalities 0.30.0", + "sp-runtime 42.0.0", + "sp-runtime-interface 30.0.0", "thiserror 1.0.65", "x25519-dalek", ] @@ -23821,26 +23834,26 @@ checksum = "12f8ee986414b0a9ad741776762f4083cd3a5128449b982a3919c4df36874834" [[package]] name = "sp-storage" -version = "19.0.0" +version = "21.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99c82989b3a4979a7e1ad848aad9f5d0b4388f1f454cc131766526601ab9e8f8" dependencies = [ - "impl-serde 0.5.0", + "impl-serde 0.4.0", "parity-scale-codec", "ref-cast", "serde", - "sp-debug-derive 14.0.0", + "sp-debug-derive 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "sp-storage" -version = "21.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99c82989b3a4979a7e1ad848aad9f5d0b4388f1f454cc131766526601ab9e8f8" +version = "22.0.0" dependencies = [ - "impl-serde 0.4.0", + "impl-serde 0.5.0", "parity-scale-codec", "ref-cast", "serde", - "sp-debug-derive 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-debug-derive 14.0.0", ] [[package]] @@ -23863,28 +23876,29 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-application-crypto 30.0.0", - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-application-crypto 41.0.0", + "sp-core 37.0.0", + "sp-runtime 42.0.0", ] [[package]] name = "sp-timestamp" -version = "26.0.0" +version = "37.0.0" dependencies = [ "async-trait", "parity-scale-codec", "sp-inherents", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", "thiserror 1.0.65", ] [[package]] name = "sp-tracing" -version = "16.0.0" +version = "17.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf641a1d17268c8fcfdb8e0fa51a79c2d4222f4cfda5f3944dbdbc384dced8d5" dependencies = [ "parity-scale-codec", - "regex", "tracing", "tracing-core", "tracing-subscriber", @@ -23892,11 +23906,10 @@ dependencies = [ [[package]] name = "sp-tracing" -version = "17.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf641a1d17268c8fcfdb8e0fa51a79c2d4222f4cfda5f3944dbdbc384dced8d5" +version = "17.1.0" dependencies = [ "parity-scale-codec", + "regex", "tracing", "tracing-core", "tracing-subscriber", @@ -23904,52 +23917,23 @@ dependencies = [ [[package]] name = "sp-transaction-pool" -version = "26.0.0" +version = "37.0.0" dependencies = [ - "sp-api 26.0.0", - "sp-runtime 31.0.1", + "sp-api 37.0.0", + "sp-runtime 42.0.0", ] [[package]] name = "sp-transaction-storage-proof" -version = "26.0.0" +version = "37.0.0" dependencies = [ "async-trait", "parity-scale-codec", "scale-info", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-inherents", - "sp-runtime 31.0.1", - "sp-trie 29.0.0", -] - -[[package]] -name = "sp-trie" -version = "29.0.0" -dependencies = [ - "ahash 0.8.11", - "array-bytes 6.2.2", - "criterion", - "foldhash", - "hash-db", - "hashbrown 0.15.3", - "memory-db 0.34.0", - "nohash-hasher", - "parity-scale-codec", - "parking_lot 0.12.3", - "rand 0.8.5", - "scale-info", - "schnellru", - "sp-core 28.0.0", - "sp-externalities 0.25.0", - "sp-runtime 31.0.1", - "substrate-prometheus-endpoint", - "thiserror 1.0.65", - "tracing", - "trie-bench", - "trie-db 0.30.0", - "trie-root", - "trie-standardmap", + "sp-runtime 42.0.0", + "sp-trie 40.0.0", ] [[package]] @@ -24001,19 +23985,32 @@ dependencies = [ ] [[package]] -name = "sp-version" -version = "29.0.0" +name = "sp-trie" +version = "40.0.0" dependencies = [ - "impl-serde 0.5.0", + "ahash 0.8.11", + "array-bytes 6.2.2", + "criterion", + "foldhash", + "hash-db", + "hashbrown 0.15.3", + "memory-db 0.34.0", + "nohash-hasher", "parity-scale-codec", - "parity-wasm", + "parking_lot 0.12.3", + "rand 0.8.5", "scale-info", - "serde", - "sp-crypto-hashing-proc-macro 0.1.0", - "sp-runtime 31.0.1", - "sp-std 14.0.0", - "sp-version-proc-macro 13.0.0", + "schnellru", + "sp-core 37.0.0", + "sp-externalities 0.30.0", + "sp-runtime 42.0.0", + "substrate-prometheus-endpoint", "thiserror 1.0.65", + "tracing", + "trie-bench", + "trie-db 0.30.0", + "trie-root", + "trie-standardmap", ] [[package]] @@ -24034,33 +24031,51 @@ dependencies = [ "thiserror 1.0.65", ] +[[package]] +name = "sp-version" +version = "40.0.0" +dependencies = [ + "impl-serde 0.5.0", + "parity-scale-codec", + "parity-wasm", + "scale-info", + "serde", + "sp-crypto-hashing-proc-macro 0.1.0", + "sp-runtime 42.0.0", + "sp-std 14.0.0", + "sp-version-proc-macro 15.0.0", + "thiserror 1.0.65", +] + [[package]] name = "sp-version-proc-macro" -version = "13.0.0" +version = "14.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5aee8f6730641a65fcf0c8f9b1e448af4b3bb083d08058b47528188bccc7b7a7" dependencies = [ "parity-scale-codec", - "proc-macro-warning", "proc-macro2 1.0.95", "quote 1.0.40", - "sp-version 29.0.0", "syn 2.0.98", ] [[package]] name = "sp-version-proc-macro" -version = "14.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aee8f6730641a65fcf0c8f9b1e448af4b3bb083d08058b47528188bccc7b7a7" +version = "15.0.0" dependencies = [ "parity-scale-codec", + "proc-macro-warning", "proc-macro2 1.0.95", "quote 1.0.40", + "sp-version 40.0.0", "syn 2.0.98", ] [[package]] name = "sp-wasm-interface" -version = "20.0.0" +version = "21.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b066baa6d57951600b14ffe1243f54c47f9c23dd89c262e17ca00ae8dca58be9" dependencies = [ "anyhow", "impl-trait-for-tuples", @@ -24071,9 +24086,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" -version = "21.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b066baa6d57951600b14ffe1243f54c47f9c23dd89c262e17ca00ae8dca58be9" +version = "22.0.0" dependencies = [ "anyhow", "impl-trait-for-tuples", @@ -24084,31 +24097,31 @@ dependencies = [ [[package]] name = "sp-weights" -version = "27.0.0" +version = "31.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93cdaf72a1dad537bbb130ba4d47307ebe5170405280ed1aa31fa712718a400e" dependencies = [ "bounded-collections 0.2.3", "parity-scale-codec", "scale-info", - "schemars", "serde", "smallvec", - "sp-arithmetic 23.0.0", - "sp-debug-derive 14.0.0", + "sp-arithmetic 26.0.0", + "sp-debug-derive 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "sp-weights" -version = "31.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93cdaf72a1dad537bbb130ba4d47307ebe5170405280ed1aa31fa712718a400e" +version = "32.0.0" dependencies = [ "bounded-collections 0.2.3", "parity-scale-codec", "scale-info", + "schemars", "serde", "smallvec", - "sp-arithmetic 26.0.0", - "sp-debug-derive 14.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "sp-arithmetic 27.0.0", + "sp-debug-derive 14.0.0", ] [[package]] @@ -24397,7 +24410,7 @@ checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" [[package]] name = "staging-chain-spec-builder" -version = "1.6.1" +version = "12.0.0" dependencies = [ "clap", "cmd_lib", @@ -24406,13 +24419,13 @@ dependencies = [ "sc-chain-spec", "serde", "serde_json", - "sp-tracing 16.0.0", + "sp-tracing 17.1.0", "substrate-test-runtime", ] [[package]] name = "staging-node-cli" -version = "3.0.0-dev" +version = "3.0.0" dependencies = [ "array-bytes 6.2.2", "assert_cmd", @@ -24428,7 +24441,7 @@ dependencies = [ "node-rpc", "node-testing", "parity-scale-codec", - "polkadot-sdk 0.1.0", + "polkadot-sdk 2506.0.0", "pretty_assertions", "rand 0.8.5", "regex", @@ -24449,7 +24462,7 @@ dependencies = [ [[package]] name = "staging-node-inspect" -version = "0.12.0" +version = "0.29.0" dependencies = [ "clap", "parity-scale-codec", @@ -24457,23 +24470,23 @@ dependencies = [ "sc-client-api", "sc-service", "sp-blockchain", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", "sp-statement-store", "thiserror 1.0.65", ] [[package]] name = "staging-parachain-info" -version = "0.7.0" +version = "0.21.0" dependencies = [ "cumulus-primitives-core", "frame-support", "frame-system", "parity-scale-codec", "scale-info", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", ] [[package]] @@ -24482,7 +24495,7 @@ version = "2.0.0" [[package]] name = "staging-xcm" -version = "7.0.1" +version = "17.0.0" dependencies = [ "array-bytes 6.2.2", "bounded-collections 0.2.3", @@ -24496,15 +24509,15 @@ dependencies = [ "scale-info", "schemars", "serde", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-weights 27.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", + "sp-weights 32.0.0", "xcm-procedural", ] [[package]] name = "staging-xcm-builder" -version = "7.0.0" +version = "21.0.0" dependencies = [ "environmental", "frame-support", @@ -24523,12 +24536,12 @@ dependencies = [ "polkadot-test-runtime", "primitive-types 0.13.1", "scale-info", - "sp-arithmetic 23.0.0", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-tracing 16.0.0", - "sp-weights 27.0.0", + "sp-arithmetic 27.0.0", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", + "sp-tracing 17.1.0", + "sp-weights 32.0.0", "staging-xcm", "staging-xcm-executor", "tracing", @@ -24537,7 +24550,7 @@ dependencies = [ [[package]] name = "staging-xcm-executor" -version = "7.0.0" +version = "20.0.0" dependencies = [ "environmental", "frame-benchmarking", @@ -24545,11 +24558,11 @@ dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", "scale-info", - "sp-arithmetic 23.0.0", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-weights 27.0.0", + "sp-arithmetic 27.0.0", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", + "sp-weights 32.0.0", "staging-xcm", "tracing", ] @@ -24662,7 +24675,7 @@ dependencies = [ [[package]] name = "subkey" -version = "9.0.0" +version = "26.0.0" dependencies = [ "clap", "sc-cli", @@ -24681,7 +24694,7 @@ dependencies = [ [[package]] name = "substrate-bip39" -version = "0.4.7" +version = "0.6.0" dependencies = [ "hmac 0.12.1", "parity-bip39", @@ -24758,7 +24771,7 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-support" -version = "29.0.0" +version = "46.0.0" dependencies = [ "frame-support", "frame-system", @@ -24767,15 +24780,15 @@ dependencies = [ "sc-rpc-api", "scale-info", "serde", - "sp-core 28.0.0", - "sp-runtime 31.0.1", - "sp-storage 19.0.0", + "sp-core 37.0.0", + "sp-runtime 42.0.0", + "sp-storage 22.0.0", "tokio", ] [[package]] name = "substrate-frame-rpc-system" -version = "28.0.0" +version = "45.0.0" dependencies = [ "assert_matches", "docify", @@ -24787,19 +24800,19 @@ dependencies = [ "sc-rpc-api", "sc-transaction-pool", "sc-transaction-pool-api", - "sp-api 26.0.0", + "sp-api 37.0.0", "sp-block-builder", "sp-blockchain", - "sp-core 28.0.0", - "sp-runtime 31.0.1", - "sp-tracing 16.0.0", + "sp-core 37.0.0", + "sp-runtime 42.0.0", + "sp-tracing 17.1.0", "substrate-test-runtime-client", "tokio", ] [[package]] name = "substrate-prometheus-endpoint" -version = "0.17.0" +version = "0.17.2" dependencies = [ "http-body-util", "hyper 1.6.0", @@ -24845,24 +24858,24 @@ dependencies = [ "relay-utils", "scale-info", "sp-consensus-grandpa", - "sp-core 28.0.0", - "sp-runtime 31.0.1", - "sp-trie 29.0.0", + "sp-core 37.0.0", + "sp-runtime 42.0.0", + "sp-trie 40.0.0", "strum 0.26.3", "thiserror 1.0.65", ] [[package]] name = "substrate-rpc-client" -version = "0.33.0" +version = "0.50.0" dependencies = [ "async-trait", "jsonrpsee", "log", "sc-rpc-api", "serde", - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-runtime 42.0.0", "tokio", ] @@ -24884,17 +24897,17 @@ dependencies = [ [[package]] name = "substrate-state-trie-migration-rpc" -version = "27.0.0" +version = "44.0.0" dependencies = [ "jsonrpsee", "parity-scale-codec", "sc-client-api", "sc-rpc-api", "serde", - "sp-core 28.0.0", - "sp-runtime 31.0.1", - "sp-state-machine 0.35.0", - "sp-trie 29.0.0", + "sp-core 37.0.0", + "sp-runtime 42.0.0", + "sp-state-machine 0.46.0", + "sp-trie 40.0.0", "trie-db 0.30.0", ] @@ -24909,16 +24922,16 @@ dependencies = [ "sc-client-api", "sc-client-db", "sc-consensus", - "sc-executor 0.32.0", + "sc-executor 0.43.0", "sc-service", "serde", "serde_json", "sp-blockchain", "sp-consensus", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-keyring", - "sp-keystore 0.34.0", - "sp-runtime 31.0.1", + "sp-keystore 0.43.0", + "sp-runtime 42.0.0", "tokio", ] @@ -24942,35 +24955,35 @@ dependencies = [ "pretty_assertions", "sc-block-builder", "sc-chain-spec", - "sc-executor 0.32.0", - "sc-executor-common 0.29.0", + "sc-executor 0.43.0", + "sc-executor-common 0.39.0", "sc-service", "scale-info", "serde", "serde_json", - "sp-api 26.0.0", - "sp-application-crypto 30.0.0", + "sp-api 37.0.0", + "sp-application-crypto 41.0.0", "sp-block-builder", "sp-consensus", "sp-consensus-aura", "sp-consensus-babe", "sp-consensus-grandpa", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-crypto-hashing 0.1.0", "sp-debug-derive 14.0.0", - "sp-externalities 0.25.0", + "sp-externalities 0.30.0", "sp-genesis-builder", "sp-inherents", - "sp-io 30.0.0", + "sp-io 41.0.1", "sp-keyring", "sp-offchain", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", "sp-session", - "sp-state-machine 0.35.0", - "sp-tracing 16.0.0", + "sp-state-machine 0.46.0", + "sp-tracing 17.1.0", "sp-transaction-pool", - "sp-trie 29.0.0", - "sp-version 29.0.0", + "sp-trie 40.0.0", + "sp-version 40.0.0", "substrate-test-runtime-client", "substrate-wasm-builder", "tracing", @@ -24985,11 +24998,11 @@ dependencies = [ "sc-block-builder", "sc-client-api", "sc-consensus", - "sp-api 26.0.0", + "sp-api 37.0.0", "sp-blockchain", "sp-consensus", - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-runtime 42.0.0", "substrate-test-client", "substrate-test-runtime", ] @@ -25005,14 +25018,14 @@ dependencies = [ "sc-transaction-pool", "sc-transaction-pool-api", "sp-blockchain", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", "substrate-test-runtime-client", "thiserror 1.0.65", ] [[package]] name = "substrate-test-utils" -version = "4.0.0-dev" +version = "3.0.0" [[package]] name = "substrate-txtesttool" @@ -25050,7 +25063,7 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" -version = "17.0.0" +version = "27.0.0" dependencies = [ "array-bytes 6.2.2", "build-helper", @@ -25063,13 +25076,13 @@ dependencies = [ "parity-scale-codec", "parity-wasm", "polkavm-linker 0.24.0", - "sc-executor 0.32.0", + "sc-executor 0.43.0", "shlex", - "sp-core 28.0.0", - "sp-io 30.0.0", + "sp-core 37.0.0", + "sp-io 41.0.1", "sp-maybe-compressed-blob 11.0.0", - "sp-tracing 16.0.0", - "sp-version 29.0.0", + "sp-tracing 17.1.0", + "sp-version 40.0.0", "strum 0.26.3", "tempfile", "toml 0.8.19", @@ -25146,7 +25159,7 @@ dependencies = [ "serde", "serde_json", "subxt-core 0.38.0", - "subxt-lightclient 0.38.0", + "subxt-lightclient 0.38.1", "subxt-macro 0.38.0", "subxt-metadata 0.38.0", "thiserror 1.0.65", @@ -25290,9 +25303,9 @@ dependencies = [ [[package]] name = "subxt-lightclient" -version = "0.38.0" +version = "0.38.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "534d4b725183a9fa09ce0e0f135674473297fdd97dee4d683f41117f365ae997" +checksum = "89ebc9131da4d0ba1f7814495b8cc79698798ccd52cacd7bcefe451e415bd945" dependencies = [ "futures", "futures-util", @@ -25411,9 +25424,9 @@ dependencies = [ [[package]] name = "subxt-signer" -version = "0.38.0" +version = "0.38.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e7a336d6a1f86f126100a4a717be58352de4c8214300c4f7807f974494efdb9" +checksum = "d680352d04665b1e4eb6f9d2a54b800c4d8e1b20478e69be1b7d975b08d9fc34" dependencies = [ "base64 0.22.1", "bip39", @@ -25763,7 +25776,7 @@ dependencies = [ [[package]] name = "template-zombienet-tests" -version = "0.0.0" +version = "0.1.0" dependencies = [ "anyhow", "env_logger 0.11.3", @@ -25829,12 +25842,12 @@ dependencies = [ [[package]] name = "test-parachain-adder" -version = "1.0.0" +version = "0.1.0" dependencies = [ "dlmalloc", "parity-scale-codec", "polkadot-parachain-primitives", - "sp-io 30.0.0", + "sp-io 41.0.1", "substrate-wasm-builder", "tiny-keccak", ] @@ -25858,7 +25871,7 @@ dependencies = [ "polkadot-test-service", "sc-cli", "sc-service", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-keyring", "test-parachain-adder", "tokio", @@ -25866,7 +25879,7 @@ dependencies = [ [[package]] name = "test-parachain-halt" -version = "1.0.0" +version = "0.1.0" dependencies = [ "rustversion", "substrate-wasm-builder", @@ -25881,7 +25894,7 @@ dependencies = [ "parity-scale-codec", "polkadot-parachain-primitives", "polkadot-primitives", - "sp-io 30.0.0", + "sp-io 41.0.1", "substrate-wasm-builder", "tiny-keccak", ] @@ -25907,7 +25920,7 @@ dependencies = [ "sc-cli", "sc-client-api", "sc-service", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-keyring", "test-parachain-undying", "tokio", @@ -25920,19 +25933,19 @@ dependencies = [ "frame-support", "polkadot-primitives", "smallvec", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", ] [[package]] name = "testnet-parachains-constants" -version = "1.0.0" +version = "14.0.0" dependencies = [ "cumulus-primitives-core", "frame-support", "polkadot-core-primitives", "rococo-runtime-constants", "smallvec", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", "staging-xcm", "westend-runtime-constants", ] @@ -26455,7 +26468,7 @@ dependencies = [ [[package]] name = "tracing-gum" -version = "7.0.0" +version = "20.0.0" dependencies = [ "coarsetime", "polkadot-primitives", @@ -27309,7 +27322,7 @@ version = "0.32.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "50386c99b9c32bd2ed71a55b6dd4040af2580530fae8bdb9a6576571a80d0cca" dependencies = [ - "arrayvec 0.7.4", + "arrayvec 0.7.6", "multi-stash", "num-derive", "num-traits", @@ -27633,7 +27646,7 @@ dependencies = [ [[package]] name = "westend-emulated-chain" -version = "0.0.0" +version = "0.1.0" dependencies = [ "emulated-integration-tests-common", "pallet-staking", @@ -27643,15 +27656,15 @@ dependencies = [ "sp-authority-discovery", "sp-consensus-babe", "sp-consensus-beefy", - "sp-core 28.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-runtime 42.0.0", "westend-runtime", "westend-runtime-constants", ] [[package]] name = "westend-runtime" -version = "7.0.0" +version = "24.0.0" dependencies = [ "approx", "binary-merkle-tree", @@ -27727,29 +27740,29 @@ dependencies = [ "serde", "serde_derive", "serde_json", - "sp-api 26.0.0", - "sp-application-crypto 30.0.0", - "sp-arithmetic 23.0.0", + "sp-api 37.0.0", + "sp-application-crypto 41.0.0", + "sp-arithmetic 27.0.0", "sp-authority-discovery", "sp-block-builder", "sp-consensus-babe", "sp-consensus-beefy", "sp-consensus-grandpa", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-genesis-builder", "sp-inherents", - "sp-io 30.0.0", + "sp-io 41.0.1", "sp-keyring", "sp-mmr-primitives", "sp-npos-elections", "sp-offchain", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", "sp-session", "sp-staking", - "sp-storage 19.0.0", - "sp-tracing 16.0.0", + "sp-storage 22.0.0", + "sp-tracing 17.1.0", "sp-transaction-pool", - "sp-version 29.0.0", + "sp-version 40.0.0", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -27761,22 +27774,22 @@ dependencies = [ [[package]] name = "westend-runtime-constants" -version = "7.0.0" +version = "21.0.0" dependencies = [ "frame-support", "polkadot-primitives", "polkadot-runtime-common", "smallvec", - "sp-core 28.0.0", - "sp-runtime 31.0.1", - "sp-weights 27.0.0", + "sp-core 37.0.0", + "sp-runtime 42.0.0", + "sp-weights 32.0.0", "staging-xcm", "staging-xcm-builder", ] [[package]] name = "westend-system-emulated-network" -version = "0.0.0" +version = "0.1.0" dependencies = [ "asset-hub-westend-emulated-chain", "bridge-hub-westend-emulated-chain", @@ -28322,8 +28335,8 @@ dependencies = [ "polkadot-sdk-frame", "scale-info", "simple-mermaid", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-io 41.0.1", + "sp-runtime 42.0.0", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -28333,7 +28346,7 @@ dependencies = [ [[package]] name = "xcm-emulator" -version = "0.5.0" +version = "0.20.0" dependencies = [ "array-bytes 6.2.2", "cumulus-pallet-parachain-system", @@ -28353,12 +28366,12 @@ dependencies = [ "polkadot-parachain-primitives", "polkadot-primitives", "polkadot-runtime-parachains", - "sp-arithmetic 23.0.0", - "sp-core 28.0.0", + "sp-arithmetic 27.0.0", + "sp-core 37.0.0", "sp-crypto-hashing 0.1.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-tracing 16.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", + "sp-tracing 17.1.0", "staging-xcm", "staging-xcm-executor", "xcm-simulator", @@ -28381,16 +28394,16 @@ dependencies = [ "polkadot-test-service", "sp-consensus", "sp-keyring", - "sp-runtime 31.0.1", - "sp-state-machine 0.35.0", - "sp-tracing 16.0.0", + "sp-runtime 42.0.0", + "sp-state-machine 0.46.0", + "sp-tracing 17.1.0", "staging-xcm", "staging-xcm-executor", ] [[package]] name = "xcm-procedural" -version = "7.0.0" +version = "11.0.2" dependencies = [ "Inflector", "frame-support", @@ -28403,7 +28416,7 @@ dependencies = [ [[package]] name = "xcm-runtime-apis" -version = "0.1.1" +version = "0.8.0" dependencies = [ "frame-support", "frame-system", @@ -28414,10 +28427,10 @@ dependencies = [ "pallet-xcm", "parity-scale-codec", "scale-info", - "sp-api 26.0.0", - "sp-io 30.0.0", - "sp-tracing 16.0.0", - "sp-weights 27.0.0", + "sp-api 37.0.0", + "sp-io 41.0.1", + "sp-tracing 17.1.0", + "sp-weights 32.0.0", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -28426,7 +28439,7 @@ dependencies = [ [[package]] name = "xcm-simulator" -version = "7.0.0" +version = "21.0.0" dependencies = [ "frame-support", "frame-system", @@ -28437,8 +28450,8 @@ dependencies = [ "polkadot-primitives", "polkadot-runtime-parachains", "scale-info", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-io 41.0.1", + "sp-runtime 42.0.0", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -28446,7 +28459,7 @@ dependencies = [ [[package]] name = "xcm-simulator-example" -version = "7.0.0" +version = "21.0.0" dependencies = [ "frame-support", "frame-system", @@ -28459,10 +28472,10 @@ dependencies = [ "polkadot-parachain-primitives", "polkadot-runtime-parachains", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", - "sp-tracing 16.0.0", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", + "sp-tracing 17.1.0", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -28487,9 +28500,9 @@ dependencies = [ "polkadot-parachain-primitives", "polkadot-runtime-parachains", "scale-info", - "sp-core 28.0.0", - "sp-io 30.0.0", - "sp-runtime 31.0.1", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor", @@ -28571,7 +28584,7 @@ dependencies = [ [[package]] name = "yet-another-parachain-runtime" -version = "0.6.0" +version = "0.2.0" dependencies = [ "cumulus-pallet-aura-ext", "cumulus-pallet-parachain-system", @@ -28604,19 +28617,19 @@ dependencies = [ "polkadot-runtime-common", "scale-info", "serde_json", - "sp-api 26.0.0", + "sp-api 37.0.0", "sp-block-builder", "sp-consensus-aura", - "sp-core 28.0.0", + "sp-core 37.0.0", "sp-genesis-builder", "sp-inherents", - "sp-io 30.0.0", + "sp-io 41.0.1", "sp-keyring", "sp-offchain", - "sp-runtime 31.0.1", + "sp-runtime 42.0.0", "sp-session", "sp-transaction-pool", - "sp-version 29.0.0", + "sp-version 40.0.0", "staging-parachain-info", "staging-xcm", "staging-xcm-builder", @@ -28768,9 +28781,9 @@ dependencies = [ [[package]] name = "zombienet-configuration" -version = "0.3.0" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9aabc9bb61ba954616b2d480a1a42eae0fdc6322c701f7b61a3836796eeed178" +checksum = "015ea881eb02f51d5c4251596b66fcdae3b36b0bba4881996d881e9865bc9e52" dependencies = [ "anyhow", "lazy_static", @@ -28789,12 +28802,13 @@ dependencies = [ [[package]] name = "zombienet-orchestrator" -version = "0.3.0" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "006806f36101abc07822b55513e3009f00f7a48a3e708de909aad4749a6cfe70" +checksum = "0d7e28aafee53c025762afbc77ebb31b34ef81066bd967ed569508fc42057934" dependencies = [ "anyhow", "async-trait", + "fancy-regex", "futures", "glob-match", "hex", @@ -28809,7 +28823,7 @@ dependencies = [ "sha2 0.10.8", "sp-core 35.0.0", "subxt 0.38.1", - "subxt-signer 0.38.0", + "subxt-signer 0.38.1", "thiserror 1.0.65", "tokio", "tracing", @@ -28822,9 +28836,9 @@ dependencies = [ [[package]] name = "zombienet-prom-metrics-parser" -version = "0.3.0" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48f1646c6c0968033d3808bfa91674f6a31f149491020bdbff3ad7e1d9ad0237" +checksum = "478eed2d916ddb7602d303265947575988c11884ad083d4880289273ac9a2391" dependencies = [ "pest", "pest_derive", @@ -28833,9 +28847,9 @@ dependencies = [ [[package]] name = "zombienet-provider" -version = "0.3.0" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3feea6d1ac0e3e4f2724e386c3034ee10af2afc7168dde9f091337ad2218ace5" +checksum = "331d0e79e9b34334a8a45f3cb7e338192f929ff2c1aa031b9fe8f6d10083eb4b" dependencies = [ "anyhow", "async-trait", @@ -28864,15 +28878,15 @@ dependencies = [ [[package]] name = "zombienet-sdk" -version = "0.3.0" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fc3ec1a08203cf2b96c5ecc84ae8c850ec0c744f4e682abd79b2846f981e5c2" +checksum = "91beaacd1c1e824d34b1ff8322834f0762cb5e38e3272611f43d8c1225e6b80c" dependencies = [ "async-trait", "futures", "lazy_static", "subxt 0.38.1", - "subxt-signer 0.38.0", + "subxt-signer 0.38.1", "tokio", "zombienet-configuration", "zombienet-orchestrator", @@ -28882,9 +28896,9 @@ dependencies = [ [[package]] name = "zombienet-support" -version = "0.3.0" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e057e2debab330e5a1a7d37bec91c260fd1486666a926074919c222c364ed67" +checksum = "c447184e45b1f85a46b5b25e1d864b7125ed820e80de1aea066eb420e36a95df" dependencies = [ "anyhow", "async-trait", diff --git a/Plan.toml b/Plan.toml new file mode 100644 index 0000000000000..463eddb6ef934 --- /dev/null +++ b/Plan.toml @@ -0,0 +1,4208 @@ +# generated by parity-publish v0.10.4 +# command: parity-publish plan --prdoc prdoc + +[options] + +[[crate]] +# substrate/utils/binary-merkle-tree +name = "binary-merkle-tree" +from = "16.0.0" +to = "16.0.0" + +[[crate]] +# cumulus/pallets/parachain-system/proc-macro +name = "cumulus-pallet-parachain-system-proc-macro" +from = "0.6.0" +to = "0.6.0" + +[[crate]] +# substrate/primitives/ethereum-standards +name = "ethereum-standards" +from = "0.1.0" +to = "0.1.1" +bump = "minor" +reason = "changed" + +[[crate]] +# substrate/utils/fork-tree +name = "fork-tree" +from = "13.0.1" +to = "13.0.1" + +[[crate]] +# substrate/frame/election-provider-support/solution-type +name = "frame-election-provider-solution-type" +from = "16.1.1" +to = "16.1.1" + +[[crate]] +# substrate/frame/support/procedural/tools/derive +name = "frame-support-procedural-tools-derive" +from = "12.0.0" +to = "12.0.0" + +[[crate]] +# substrate/scripts/ci/node-template-release +name = "node-template-release" +from = "3.0.0" +to = "3.0.0" + +[[crate]] +# substrate/frame/staking-async/ahm-test +name = "pallet-ahm-test" +from = "1.0.0" +to = "1.0.0" + +[[crate]] +# substrate/frame/contracts/proc-macro +name = "pallet-contracts-proc-macro" +from = "23.0.3" +to = "23.0.3" + +[[crate]] +# substrate/frame/contracts/uapi +name = "pallet-contracts-uapi" +from = "14.0.0" +to = "14.0.0" + +[[crate]] +# substrate/frame/election-provider-multi-phase/test-staking-e2e +name = "pallet-election-provider-e2e-test" +from = "1.0.0" +to = "1.0.0" + +[[crate]] +# substrate/frame/nomination-pools/test-delegate-stake +name = "pallet-nomination-pools-test-delegate-stake" +from = "1.0.0" +to = "1.0.0" + +[[crate]] +# substrate/frame/revive/proc-macro +name = "pallet-revive-proc-macro" +from = "0.3.0" +to = "0.3.0" + +[[crate]] +# substrate/frame/staking/reward-curve +name = "pallet-staking-reward-curve" +from = "12.0.0" +to = "12.0.0" + +[[crate]] +# templates/parachain +name = "parachain-template" +from = "0.1.0" +to = "0.1.0" + +[[crate]] +# substrate/client/chain-spec/derive +name = "sc-chain-spec-derive" +from = "12.0.0" +to = "12.0.0" + +[[crate]] +# substrate/client/network/types +name = "sc-network-types" +from = "0.16.0" +to = "0.17.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/client/tracing/proc-macro +name = "sc-tracing-proc-macro" +from = "11.1.0" +to = "11.1.0" + +[[crate]] +# substrate/primitives/api/proc-macro +name = "sp-api-proc-macro" +from = "22.0.1" +to = "23.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/primitives/arithmetic +name = "sp-arithmetic" +from = "26.1.0" +to = "27.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/primitives/crypto/hashing +name = "sp-crypto-hashing" +from = "0.1.0" +to = "0.1.0" + +[[crate]] +# substrate/primitives/database +name = "sp-database" +from = "10.0.0" +to = "10.0.0" + +[[crate]] +# substrate/primitives/debug-derive +name = "sp-debug-derive" +from = "14.0.0" +to = "14.0.0" + +[[crate]] +# substrate/primitives/maybe-compressed-blob +name = "sp-maybe-compressed-blob" +from = "11.0.0" +to = "11.0.0" + +[[crate]] +# substrate/primitives/metadata-ir +name = "sp-metadata-ir" +from = "0.10.0" +to = "0.11.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/primitives/panic-handler +name = "sp-panic-handler" +from = "13.0.2" +to = "13.0.2" + +[[crate]] +# substrate/primitives/runtime-interface/proc-macro +name = "sp-runtime-interface-proc-macro" +from = "18.0.0" +to = "19.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/primitives/std +name = "sp-std" +from = "14.0.0" +to = "14.0.0" + +[[crate]] +# substrate/primitives/tracing +name = "sp-tracing" +from = "17.1.0" +to = "17.1.0" + +[[crate]] +# substrate/primitives/version/proc-macro +name = "sp-version-proc-macro" +from = "15.0.0" +to = "15.0.0" + +[[crate]] +# substrate/primitives/wasm-interface +name = "sp-wasm-interface" +from = "21.0.1" +to = "22.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# polkadot/node/tracking-allocator +name = "staging-tracking-allocator" +from = "2.0.0" +to = "2.0.0" + +[[crate]] +# substrate/utils/substrate-bip39 +name = "substrate-bip39" +from = "0.6.0" +to = "0.6.0" + +[[crate]] +# substrate/utils/build-script-utils +name = "substrate-build-script-utils" +from = "11.0.0" +to = "11.0.0" + +[[crate]] +# substrate/utils/prometheus +name = "substrate-prometheus-endpoint" +from = "0.17.2" +to = "0.17.2" + +[[crate]] +# substrate/test-utils +name = "substrate-test-utils" +from = "3.0.0" +to = "3.0.0" + +[[crate]] +# templates/zombienet +name = "template-zombienet-tests" +from = "0.1.0" +to = "0.1.0" + +[[crate]] +# polkadot/node/gum/proc-macro +name = "tracing-gum-proc-macro" +from = "5.0.0" +to = "5.0.0" + +[[crate]] +# polkadot/xcm/procedural +name = "xcm-procedural" +from = "11.0.2" +to = "11.0.2" + +[[crate]] +# substrate/frame/support/procedural/tools +name = "frame-support-procedural-tools" +from = "13.0.1" +to = "13.0.1" + +[[crate]] +# substrate/frame/revive/uapi +name = "pallet-revive-uapi" +from = "0.4.0" +to = "0.5.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/staking-async/reward-fn +name = "pallet-staking-async-reward-fn" +from = "0.1.0" +to = "0.2.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/staking/reward-fn +name = "pallet-staking-reward-fn" +from = "22.0.1" +to = "23.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/client/proposer-metrics +name = "sc-proposer-metrics" +from = "0.20.0" +to = "0.20.0" + +[[crate]] +# substrate/client/utils +name = "sc-utils" +from = "18.0.1" +to = "19.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/primitives/arithmetic/fuzzer +name = "sp-arithmetic-fuzzer" +from = "2.0.0" +to = "2.0.0" + +[[crate]] +# substrate/deprecated/hashing +name = "sp-core-hashing" +from = "16.0.0" +to = "16.0.0" + +[[crate]] +# substrate/primitives/crypto/hashing/proc-macro +name = "sp-crypto-hashing-proc-macro" +from = "0.1.0" +to = "0.1.0" + +[[crate]] +# substrate/primitives/storage +name = "sp-storage" +from = "22.0.0" +to = "22.0.0" + +[[crate]] +# substrate/primitives/weights +name = "sp-weights" +from = "31.1.0" +to = "32.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/support/procedural +name = "frame-support-procedural" +from = "33.0.1" +to = "34.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/client/telemetry +name = "sc-telemetry" +from = "28.1.0" +to = "29.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/deprecated/hashing/proc-macro +name = "sp-core-hashing-proc-macro" +from = "16.0.0" +to = "16.0.0" + +[[crate]] +# substrate/primitives/externalities +name = "sp-externalities" +from = "0.30.0" +to = "0.30.0" + +[[crate]] +# substrate/primitives/runtime-interface +name = "sp-runtime-interface" +from = "29.0.1" +to = "30.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/primitives/core +name = "sp-core" +from = "36.1.0" +to = "37.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/primitives/crypto/ec-utils +name = "sp-crypto-ec-utils" +from = "0.15.1" +to = "0.16.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/client/allocator +name = "sc-allocator" +from = "31.0.0" +to = "32.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/client/state-db +name = "sc-state-db" +from = "0.38.0" +to = "0.39.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/client/storage-monitor +name = "sc-storage-monitor" +from = "0.24.0" +to = "0.25.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/primitives/core/fuzz +name = "sp-core-fuzz" +from = "0.1.0" +to = "0.1.0" + +[[crate]] +# substrate/primitives/keystore +name = "sp-keystore" +from = "0.42.0" +to = "0.43.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/primitives/rpc +name = "sp-rpc" +from = "34.0.0" +to = "35.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/primitives/trie +name = "sp-trie" +from = "39.1.0" +to = "40.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# cumulus/primitives/proof-size-hostfunction +name = "cumulus-primitives-proof-size-hostfunction" +from = "0.12.0" +to = "0.13.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/client/executor/common +name = "sc-executor-common" +from = "0.38.0" +to = "0.39.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/primitives/state-machine +name = "sp-state-machine" +from = "0.45.0" +to = "0.46.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/client/executor/polkavm +name = "sc-executor-polkavm" +from = "0.35.0" +to = "0.36.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/client/executor/wasmtime +name = "sc-executor-wasmtime" +from = "0.38.0" +to = "0.39.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/primitives/io +name = "sp-io" +from = "41.0.0" +to = "41.0.1" +bump = "patch" +reason = "changed" + +[[crate]] +# substrate/frame/revive/fixtures +name = "pallet-revive-fixtures" +from = "0.3.2" +to = "0.4.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/client/sysinfo +name = "sc-sysinfo" +from = "42.0.0" +to = "43.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/primitives/application-crypto +name = "sp-application-crypto" +from = "40.1.0" +to = "41.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/client/keystore +name = "sc-keystore" +from = "35.0.0" +to = "36.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/primitives/runtime +name = "sp-runtime" +from = "41.1.0" +to = "42.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/bin/node/primitives +name = "node-primitives" +from = "2.0.0" +to = "2.0.0" + +[[crate]] +# polkadot/core-primitives +name = "polkadot-core-primitives" +from = "17.1.0" +to = "18.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/client/network/common +name = "sc-network-common" +from = "0.48.0" +to = "0.49.0" +bump = "major" +reason = "changed" + +[[crate]] +# polkadot/runtime/common/slot_range_helper +name = "slot-range-helper" +from = "17.0.0" +to = "18.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# bridges/snowbridge/primitives/ethereum +name = "snowbridge-ethereum" +from = "0.12.0" +to = "0.13.0" +bump = "major" +reason = "changed" + +[[crate]] +# bridges/snowbridge/primitives/merkle-tree +name = "snowbridge-merkle-tree" +from = "0.2.0" +to = "0.3.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/primitives/inherents +name = "sp-inherents" +from = "36.0.0" +to = "37.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/primitives/keyring +name = "sp-keyring" +from = "41.0.0" +to = "42.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/primitives/npos-elections +name = "sp-npos-elections" +from = "36.2.0" +to = "37.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/primitives/staking +name = "sp-staking" +from = "38.0.0" +to = "39.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/primitives/test-primitives +name = "sp-test-primitives" +from = "2.0.0" +to = "2.0.0" + +[[crate]] +# substrate/primitives/version +name = "sp-version" +from = "39.0.0" +to = "40.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# polkadot/parachain +name = "polkadot-parachain-primitives" +from = "16.1.0" +to = "17.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/primitives/api +name = "sp-api" +from = "36.0.1" +to = "37.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/primitives/consensus/common +name = "sp-consensus" +from = "0.42.0" +to = "0.43.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/primitives/npos-elections/fuzzer +name = "sp-npos-elections-fuzzer" +from = "2.0.0" +to = "2.0.0" + +[[crate]] +# substrate/primitives/timestamp +name = "sp-timestamp" +from = "36.0.0" +to = "37.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/primitives/transaction-storage-proof +name = "sp-transaction-storage-proof" +from = "36.1.0" +to = "37.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/system/rpc/runtime-api +name = "frame-system-rpc-runtime-api" +from = "36.0.0" +to = "37.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/nfts/runtime-api +name = "pallet-nfts-runtime-api" +from = "26.0.0" +to = "27.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/staking-async/runtime-api +name = "pallet-staking-async-runtime-api" +from = "0.1.0" +to = "0.2.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/staking/runtime-api +name = "pallet-staking-runtime-api" +from = "26.0.0" +to = "27.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/client/executor +name = "sc-executor" +from = "0.42.0" +to = "0.43.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/primitives/authority-discovery +name = "sp-authority-discovery" +from = "36.0.0" +to = "37.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/primitives/block-builder +name = "sp-block-builder" +from = "36.0.0" +to = "37.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/primitives/blockchain +name = "sp-blockchain" +from = "39.0.0" +to = "40.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/primitives/consensus/grandpa +name = "sp-consensus-grandpa" +from = "23.1.0" +to = "24.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/primitives/consensus/pow +name = "sp-consensus-pow" +from = "0.42.0" +to = "0.43.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/primitives/consensus/slots +name = "sp-consensus-slots" +from = "0.42.1" +to = "0.43.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/primitives/genesis-builder +name = "sp-genesis-builder" +from = "0.17.0" +to = "0.18.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/primitives/mixnet +name = "sp-mixnet" +from = "0.14.0" +to = "0.15.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/primitives/merkle-mountain-range +name = "sp-mmr-primitives" +from = "36.1.0" +to = "37.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/primitives/offchain +name = "sp-offchain" +from = "36.0.0" +to = "37.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/primitives/session +name = "sp-session" +from = "38.1.0" +to = "39.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/primitives/statement-store +name = "sp-statement-store" +from = "20.1.0" +to = "21.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/primitives/transaction-pool +name = "sp-transaction-pool" +from = "36.0.0" +to = "37.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/support +name = "frame-support" +from = "40.1.0" +to = "41.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/client/merkle-mountain-range/rpc +name = "mmr-rpc" +from = "40.0.0" +to = "41.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# polkadot/primitives +name = "polkadot-primitives" +from = "18.2.0" +to = "19.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/client/block-builder +name = "sc-block-builder" +from = "0.44.0" +to = "0.45.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/client/runtime-utilities +name = "sc-runtime-utilities" +from = "0.2.0" +to = "0.3.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/client/transaction-pool/api +name = "sc-transaction-pool-api" +from = "39.0.0" +to = "40.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/primitives/consensus/aura +name = "sp-consensus-aura" +from = "0.42.0" +to = "0.43.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/primitives/consensus/babe +name = "sp-consensus-babe" +from = "0.42.1" +to = "0.43.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/primitives/consensus/beefy +name = "sp-consensus-beefy" +from = "24.1.0" +to = "25.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/primitives/consensus/sassafras +name = "sp-consensus-sassafras" +from = "0.3.4" +to = "0.3.4" + +[[crate]] +# substrate/utils/wasm-builder +name = "substrate-wasm-builder" +from = "26.0.1" +to = "27.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# cumulus/primitives/aura +name = "cumulus-primitives-aura" +from = "0.17.0" +to = "0.18.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/system +name = "frame-system" +from = "40.2.0" +to = "41.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/try-runtime +name = "frame-try-runtime" +from = "0.46.0" +to = "0.47.0" +bump = "major" +reason = "changed" + +[[crate]] +# polkadot/node/primitives +name = "polkadot-node-primitives" +from = "19.0.0" +to = "20.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# polkadot/primitives/test-helpers +name = "polkadot-primitives-test-helpers" +from = "0.1.0" +to = "0.1.0" + +[[crate]] +# substrate/client/basic-authorship +name = "sc-basic-authorship" +from = "0.49.0" +to = "0.50.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/client/api +name = "sc-client-api" +from = "39.0.0" +to = "40.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/client/executor/runtime-test +name = "sc-runtime-test" +from = "2.0.0" +to = "2.0.0" + +[[crate]] +# bridges/snowbridge/primitives/beacon +name = "snowbridge-beacon-primitives" +from = "0.13.1" +to = "0.14.0" +bump = "major" +reason = "changed" + +[[crate]] +# bridges/snowbridge/pallets/outbound-queue-v2/runtime-api +name = "snowbridge-outbound-queue-v2-runtime-api" +from = "0.2.0" +to = "0.3.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/primitives/runtime-interface/test-wasm +name = "sp-runtime-interface-test-wasm" +from = "2.0.0" +to = "2.0.0" + +[[crate]] +# substrate/primitives/runtime-interface/test-wasm-deprecated +name = "sp-runtime-interface-test-wasm-deprecated" +from = "2.0.0" +to = "2.0.0" + +[[crate]] +# polkadot/xcm +name = "staging-xcm" +from = "16.2.0" +to = "17.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# polkadot/parachain/test-parachains/adder +name = "test-parachain-adder" +from = "0.1.0" +to = "0.1.0" + +[[crate]] +# polkadot/parachain/test-parachains/halt +name = "test-parachain-halt" +from = "0.1.0" +to = "0.1.0" + +[[crate]] +# polkadot/parachain/test-parachains/undying +name = "test-parachain-undying" +from = "1.0.0" +to = "1.0.0" + +[[crate]] +# polkadot/runtime/test-runtime/constants +name = "test-runtime-constants" +from = "1.0.0" +to = "1.0.0" + +[[crate]] +# polkadot/node/gum +name = "tracing-gum" +from = "19.0.0" +to = "20.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# bridges/primitives/runtime +name = "bp-runtime" +from = "0.20.1" +to = "0.21.0" +bump = "major" +reason = "changed" + +[[crate]] +# bridges/primitives/xcm-bridge-hub-router +name = "bp-xcm-bridge-hub-router" +from = "0.17.0" +to = "0.18.0" +bump = "major" +reason = "changed" + +[[crate]] +# cumulus/bin/pov-validator +name = "cumulus-pov-validator" +from = "0.5.0" +to = "0.6.0" +bump = "major" +reason = "changed" + +[[crate]] +# cumulus/primitives/core +name = "cumulus-primitives-core" +from = "0.18.1" +to = "0.19.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/benchmarking +name = "frame-benchmarking" +from = "40.2.0" +to = "41.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/election-provider-support +name = "frame-election-provider-support" +from = "40.1.1" +to = "41.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/executive +name = "frame-executive" +from = "40.0.1" +to = "41.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/metadata-hash-extension +name = "frame-metadata-hash-extension" +from = "0.8.0" +to = "0.9.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/support/test/compile_pass +name = "frame-support-test-compile-pass" +from = "4.0.0" +to = "4.0.0" + +[[crate]] +# substrate/frame/support/test/pallet +name = "frame-support-test-pallet" +from = "4.0.0" +to = "4.0.0" + +[[crate]] +# substrate/frame/authorship +name = "pallet-authorship" +from = "40.0.0" +to = "41.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/contracts/fixtures +name = "pallet-contracts-fixtures" +from = "1.0.0" +to = "1.0.0" + +[[crate]] +# substrate/frame/examples/default-config +name = "pallet-default-config-example" +from = "10.0.0" +to = "10.0.0" + +[[crate]] +# substrate/frame/delegated-staking +name = "pallet-delegated-staking" +from = "7.0.0" +to = "8.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/examples/offchain-worker +name = "pallet-example-offchain-worker" +from = "28.0.0" +to = "28.0.0" + +[[crate]] +# substrate/frame/examples/view-functions +name = "pallet-example-view-functions" +from = "0.2.0" +to = "0.3.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/offences +name = "pallet-offences" +from = "39.0.0" +to = "40.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/root-testing +name = "pallet-root-testing" +from = "16.0.0" +to = "17.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/scored-pool +name = "pallet-scored-pool" +from = "40.0.0" +to = "41.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/transaction-payment/skip-feeless-payment +name = "pallet-skip-feeless-payment" +from = "15.0.0" +to = "16.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/staking-async/rc-client +name = "pallet-staking-async-rc-client" +from = "0.1.0" +to = "0.2.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/statement +name = "pallet-statement" +from = "22.0.0" +to = "23.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# polkadot/erasure-coding +name = "polkadot-erasure-coding" +from = "19.0.0" +to = "20.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# polkadot/node/core/pvf/common +name = "polkadot-node-core-pvf-common" +from = "19.0.0" +to = "20.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# polkadot/statement-table +name = "polkadot-statement-table" +from = "19.0.0" +to = "20.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/client/db +name = "sc-client-db" +from = "0.46.0" +to = "0.47.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/client/consensus/common +name = "sc-consensus" +from = "0.49.0" +to = "0.50.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/client/network +name = "sc-network" +from = "0.50.0" +to = "0.51.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/client/statement-store +name = "sc-statement-store" +from = "21.0.0" +to = "22.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/client/tracing +name = "sc-tracing" +from = "39.0.0" +to = "40.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/client/transaction-pool +name = "sc-transaction-pool" +from = "39.0.0" +to = "40.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# bridges/snowbridge/primitives/verification +name = "snowbridge-verification-primitives" +from = "0.2.0" +to = "0.3.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/primitives/runtime-interface/test +name = "sp-runtime-interface-test" +from = "2.0.0" +to = "2.0.0" + +[[crate]] +# polkadot/node/zombienet-backchannel +name = "zombienet-backchannel" +from = "1.0.0" +to = "1.0.0" + +[[crate]] +# bridges/primitives/header-chain +name = "bp-header-chain" +from = "0.20.1" +to = "0.21.0" +bump = "major" +reason = "changed" + +[[crate]] +# cumulus/pallets/dmp-queue +name = "cumulus-pallet-dmp-queue" +from = "0.20.0" +to = "0.21.0" +bump = "major" +reason = "changed" + +[[crate]] +# cumulus/pallets/xcm +name = "cumulus-pallet-xcm" +from = "0.19.1" +to = "0.20.0" +bump = "major" +reason = "changed" + +[[crate]] +# cumulus/primitives/parachain-inherent +name = "cumulus-primitives-parachain-inherent" +from = "0.18.1" +to = "0.19.0" +bump = "major" +reason = "changed" + +[[crate]] +# cumulus/primitives/storage-weight-reclaim +name = "cumulus-primitives-storage-weight-reclaim" +from = "11.0.0" +to = "12.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# cumulus/primitives/timestamp +name = "cumulus-primitives-timestamp" +from = "0.19.0" +to = "0.20.0" +bump = "major" +reason = "changed" + +[[crate]] +# cumulus/test/relay-sproof-builder +name = "cumulus-test-relay-sproof-builder" +from = "0.19.0" +to = "0.20.0" +bump = "major" +reason = "changed" + +[[crate]] +# cumulus/zombienet/zombienet-sdk-helpers +name = "cumulus-zombienet-sdk-helpers" +from = "0.1.0" +to = "0.1.0" + +[[crate]] +# polkadot/erasure-coding/fuzzer +name = "erasure_coding_fuzzer" +from = "1.0.0" +to = "1.0.0" + +[[crate]] +# substrate/frame/benchmarking/pov +name = "frame-benchmarking-pallet-pov" +from = "30.0.1" +to = "31.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/election-provider-support/solution-type/fuzzer +name = "frame-election-solution-type-fuzzer" +from = "2.0.0" +to = "2.0.0" + +[[crate]] +# substrate/frame/support/test +name = "frame-support-test" +from = "3.0.0" +to = "3.0.0" + +[[crate]] +# substrate/frame/system/benchmarking +name = "frame-system-benchmarking" +from = "40.0.1" +to = "41.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/asset-conversion +name = "pallet-asset-conversion" +from = "22.0.0" +to = "23.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/asset-rate +name = "pallet-asset-rate" +from = "19.0.0" +to = "20.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/asset-rewards +name = "pallet-asset-rewards" +from = "0.2.0" +to = "0.3.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/balances +name = "pallet-balances" +from = "41.1.1" +to = "42.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/broker +name = "pallet-broker" +from = "0.19.2" +to = "0.20.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/collective +name = "pallet-collective" +from = "40.1.0" +to = "41.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# cumulus/parachains/pallets/collective-content +name = "pallet-collective-content" +from = "0.18.0" +to = "0.19.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/conviction-voting +name = "pallet-conviction-voting" +from = "40.1.0" +to = "41.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/democracy +name = "pallet-democracy" +from = "40.1.0" +to = "41.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/dummy-dim +name = "pallet-dummy-dim" +from = "0.1.0" +to = "0.2.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/election-provider-multi-block +name = "pallet-election-provider-multi-block" +from = "0.1.0" +to = "0.2.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/election-provider-support/benchmarking +name = "pallet-election-provider-support-benchmarking" +from = "39.0.0" +to = "40.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/elections-phragmen +name = "pallet-elections-phragmen" +from = "41.1.0" +to = "42.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/examples/authorization-tx-extension +name = "pallet-example-authorization-tx-extension" +from = "1.0.0" +to = "1.0.0" + +[[crate]] +# substrate/frame/examples/split +name = "pallet-example-split" +from = "10.0.0" +to = "10.0.0" + +[[crate]] +# substrate/frame/examples/tasks +name = "pallet-example-tasks" +from = "1.0.0" +to = "1.0.0" + +[[crate]] +# substrate/frame/fast-unstake +name = "pallet-fast-unstake" +from = "39.0.0" +to = "40.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/glutton +name = "pallet-glutton" +from = "26.0.0" +to = "27.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/identity +name = "pallet-identity" +from = "40.1.0" +to = "41.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/im-online +name = "pallet-im-online" +from = "39.1.0" +to = "40.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/indices +name = "pallet-indices" +from = "40.0.0" +to = "41.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/lottery +name = "pallet-lottery" +from = "40.0.0" +to = "41.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/membership +name = "pallet-membership" +from = "40.0.0" +to = "41.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/message-queue +name = "pallet-message-queue" +from = "43.1.0" +to = "44.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/meta-tx +name = "pallet-meta-tx" +from = "0.2.0" +to = "0.3.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/nfts +name = "pallet-nfts" +from = "34.1.0" +to = "35.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/parameters +name = "pallet-parameters" +from = "0.11.0" +to = "0.12.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/people +name = "pallet-people" +from = "0.1.0" +to = "0.2.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/preimage +name = "pallet-preimage" +from = "40.0.0" +to = "41.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/ranked-collective +name = "pallet-ranked-collective" +from = "40.1.0" +to = "41.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/referenda +name = "pallet-referenda" +from = "40.1.0" +to = "41.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/remark +name = "pallet-remark" +from = "40.0.0" +to = "41.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/sassafras +name = "pallet-sassafras" +from = "0.3.5" +to = "0.3.5" + +[[crate]] +# substrate/frame/scheduler +name = "pallet-scheduler" +from = "41.2.0" +to = "42.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/society +name = "pallet-society" +from = "40.1.0" +to = "41.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/staking-async +name = "pallet-staking-async" +from = "0.1.0" +to = "0.2.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/sudo +name = "pallet-sudo" +from = "40.0.0" +to = "41.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# templates/solochain/pallets/template +name = "pallet-template" +from = "0.1.0" +to = "0.1.0" + +[[crate]] +# substrate/frame/timestamp +name = "pallet-timestamp" +from = "39.0.0" +to = "40.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/transaction-payment +name = "pallet-transaction-payment" +from = "40.0.0" +to = "41.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/uniques +name = "pallet-uniques" +from = "40.1.0" +to = "41.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/utility +name = "pallet-utility" +from = "40.0.0" +to = "41.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/verify-signature +name = "pallet-verify-signature" +from = "0.3.0" +to = "0.4.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/vesting +name = "pallet-vesting" +from = "40.1.0" +to = "41.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# polkadot/node/core/pvf/execute-worker +name = "polkadot-node-core-pvf-execute-worker" +from = "19.0.0" +to = "20.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# polkadot/node/core/pvf/prepare-worker +name = "polkadot-node-core-pvf-prepare-worker" +from = "19.0.0" +to = "20.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# polkadot/runtime/metrics +name = "polkadot-runtime-metrics" +from = "20.0.0" +to = "21.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# bridges/relays/utils +name = "relay-utils" +from = "0.1.0" +to = "0.1.0" + +[[crate]] +# substrate/client/authority-discovery +name = "sc-authority-discovery" +from = "0.50.0" +to = "0.51.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/client/chain-spec +name = "sc-chain-spec" +from = "43.0.0" +to = "44.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/client/consensus/epochs +name = "sc-consensus-epochs" +from = "0.49.0" +to = "0.50.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/client/consensus/pow +name = "sc-consensus-pow" +from = "0.49.0" +to = "0.50.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/client/consensus/slots +name = "sc-consensus-slots" +from = "0.49.0" +to = "0.50.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/client/mixnet +name = "sc-mixnet" +from = "0.20.0" +to = "0.21.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/client/network/light +name = "sc-network-light" +from = "0.49.0" +to = "0.50.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/client/network/sync +name = "sc-network-sync" +from = "0.49.0" +to = "0.50.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/client/offchain +name = "sc-offchain" +from = "45.0.0" +to = "46.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# bridges/snowbridge/pallets/ethereum-client/fixtures +name = "snowbridge-pallet-ethereum-client-fixtures" +from = "0.21.1" +to = "0.22.0" +bump = "major" +reason = "changed" + +[[crate]] +# cumulus/parachains/pallets/parachain-info +name = "staging-parachain-info" +from = "0.20.0" +to = "0.21.0" +bump = "major" +reason = "changed" + +[[crate]] +# polkadot/xcm/xcm-executor +name = "staging-xcm-executor" +from = "19.1.2" +to = "20.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# bridges/primitives/messages +name = "bp-messages" +from = "0.20.1" +to = "0.21.0" +bump = "major" +reason = "changed" + +[[crate]] +# cumulus/client/consensus/proposer +name = "cumulus-client-consensus-proposer" +from = "0.19.0" +to = "0.20.0" +bump = "major" +reason = "changed" + +[[crate]] +# cumulus/pallets/weight-reclaim +name = "cumulus-pallet-weight-reclaim" +from = "0.2.0" +to = "0.3.0" +bump = "major" +reason = "changed" + +[[crate]] +# cumulus/parachains/pallets/ping +name = "cumulus-ping" +from = "0.20.0" +to = "0.21.0" +bump = "major" +reason = "changed" + +[[crate]] +# cumulus/zombienet/zombienet-sdk +name = "cumulus-zombienet-sdk-tests" +from = "0.1.0" +to = "0.1.0" + +[[crate]] +# bridges/relays/finality +name = "finality-relay" +from = "0.1.0" +to = "0.1.0" + +[[crate]] +# substrate/client/merkle-mountain-range +name = "mmr-gadget" +from = "45.0.0" +to = "46.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/alliance +name = "pallet-alliance" +from = "39.1.0" +to = "40.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/asset-conversion/ops +name = "pallet-asset-conversion-ops" +from = "0.8.0" +to = "0.9.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/transaction-payment/asset-conversion-tx-payment +name = "pallet-asset-conversion-tx-payment" +from = "22.0.0" +to = "23.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/transaction-payment/asset-tx-payment +name = "pallet-asset-tx-payment" +from = "40.0.0" +to = "41.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/aura +name = "pallet-aura" +from = "39.0.0" +to = "40.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/bags-list +name = "pallet-bags-list" +from = "39.1.0" +to = "40.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/core-fellowship +name = "pallet-core-fellowship" +from = "24.1.0" +to = "25.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/examples/dev-mode +name = "pallet-dev-mode" +from = "22.0.0" +to = "23.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/examples/basic +name = "pallet-example-basic" +from = "34.0.0" +to = "34.0.0" + +[[crate]] +# substrate/frame/examples/kitchensink +name = "pallet-example-kitchensink" +from = "4.0.0" +to = "4.0.0" + +[[crate]] +# substrate/frame/examples/single-block-migrations +name = "pallet-example-single-block-migrations" +from = "0.1.0" +to = "0.1.0" + +[[crate]] +# substrate/frame/nomination-pools +name = "pallet-nomination-pools" +from = "38.1.0" +to = "39.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/origin-restriction +name = "pallet-origin-restriction" +from = "0.1.0" +to = "0.2.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/revive +name = "pallet-revive" +from = "0.6.1" +to = "0.7.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/session +name = "pallet-session" +from = "40.0.1" +to = "41.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/transaction-payment/rpc/runtime-api +name = "pallet-transaction-payment-rpc-runtime-api" +from = "40.0.0" +to = "41.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/transaction-storage +name = "pallet-transaction-storage" +from = "39.0.0" +to = "40.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/treasury +name = "pallet-treasury" +from = "39.0.0" +to = "40.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# polkadot/node/network/protocol +name = "polkadot-node-network-protocol" +from = "23.0.0" +to = "24.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame +name = "polkadot-sdk-frame" +from = "0.9.1" +to = "0.10.0" +bump = "major" +reason = "changed" + +[[crate]] +# polkadot/zombienet-sdk-tests +name = "polkadot-zombienet-sdk-tests" +from = "0.1.0" +to = "0.1.0" + +[[crate]] +# substrate/client/consensus/aura +name = "sc-consensus-aura" +from = "0.50.0" +to = "0.51.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/client/consensus/babe +name = "sc-consensus-babe" +from = "0.50.0" +to = "0.51.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/client/informant +name = "sc-informant" +from = "0.49.0" +to = "0.50.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/client/network-gossip +name = "sc-network-gossip" +from = "0.50.0" +to = "0.51.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/client/network/statement +name = "sc-network-statement" +from = "0.32.0" +to = "0.33.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/client/network/transactions +name = "sc-network-transactions" +from = "0.49.0" +to = "0.50.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/client/rpc-api +name = "sc-rpc-api" +from = "0.49.0" +to = "0.50.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/bin/utils/chain-spec-builder +name = "staging-chain-spec-builder" +from = "11.0.0" +to = "12.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# polkadot/xcm/xcm-builder +name = "staging-xcm-builder" +from = "20.1.1" +to = "21.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# polkadot/xcm/xcm-runtime-apis +name = "xcm-runtime-apis" +from = "0.7.1" +to = "0.8.0" +bump = "major" +reason = "changed" + +[[crate]] +# bridges/primitives/polkadot-core +name = "bp-polkadot-core" +from = "0.20.1" +to = "0.21.0" +bump = "major" +reason = "changed" + +[[crate]] +# bridges/primitives/xcm-bridge-hub +name = "bp-xcm-bridge-hub" +from = "0.6.1" +to = "0.7.0" +bump = "major" +reason = "changed" + +[[crate]] +# docs/sdk/src/reference_docs/chain_spec_runtime +name = "chain-spec-guide-runtime" +from = "0.1.0" +to = "0.1.0" + +[[crate]] +# cumulus/pallets/session-benchmarking +name = "cumulus-pallet-session-benchmarking" +from = "21.0.0" +to = "22.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# bridges/relays/equivocation +name = "equivocation-detector" +from = "0.1.0" +to = "0.1.0" + +[[crate]] +# substrate/frame/support/test/stg_frame_crate +name = "frame-support-test-stg-frame-crate" +from = "0.1.0" +to = "0.1.0" + +[[crate]] +# bridges/relays/messages +name = "messages-relay" +from = "0.1.0" +to = "0.1.0" + +[[crate]] +# substrate/frame/assets +name = "pallet-assets" +from = "42.0.0" +to = "43.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/atomic-swap +name = "pallet-atomic-swap" +from = "40.1.0" +to = "41.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/authority-discovery +name = "pallet-authority-discovery" +from = "40.0.0" +to = "41.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/babe +name = "pallet-babe" +from = "40.0.0" +to = "41.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/bags-list/fuzzer +name = "pallet-bags-list-fuzzer" +from = "4.0.0" +to = "4.0.0" + +[[crate]] +# substrate/frame/beefy +name = "pallet-beefy" +from = "41.1.1" +to = "42.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/bounties +name = "pallet-bounties" +from = "39.0.0" +to = "40.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# bridges/modules/messages +name = "pallet-bridge-messages" +from = "0.20.1" +to = "0.21.0" +bump = "major" +reason = "changed" + +[[crate]] +# cumulus/pallets/collator-selection +name = "pallet-collator-selection" +from = "21.0.0" +to = "22.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/contracts +name = "pallet-contracts" +from = "40.1.0" +to = "41.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/examples/frame-crate +name = "pallet-example-frame-crate" +from = "0.1.0" +to = "0.1.0" + +[[crate]] +# substrate/frame/grandpa +name = "pallet-grandpa" +from = "40.0.0" +to = "41.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/insecure-randomness-collective-flip +name = "pallet-insecure-randomness-collective-flip" +from = "28.0.0" +to = "29.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/migrations +name = "pallet-migrations" +from = "10.1.1" +to = "11.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/mixnet +name = "pallet-mixnet" +from = "0.16.1" +to = "0.17.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/merkle-mountain-range +name = "pallet-mmr" +from = "40.0.0" +to = "41.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/multisig +name = "pallet-multisig" +from = "40.1.0" +to = "41.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/nis +name = "pallet-nis" +from = "40.0.0" +to = "41.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/node-authorization +name = "pallet-node-authorization" +from = "40.0.0" +to = "41.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/nomination-pools/fuzzer +name = "pallet-nomination-pools-fuzzer" +from = "2.0.0" +to = "2.0.0" + +[[crate]] +# substrate/frame/nomination-pools/runtime-api +name = "pallet-nomination-pools-runtime-api" +from = "36.0.0" +to = "37.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/paged-list +name = "pallet-paged-list" +from = "0.18.0" +to = "0.19.0" +bump = "major" +reason = "changed" + +[[crate]] +# templates/parachain/pallets/template +name = "pallet-parachain-template" +from = "0.1.0" +to = "0.1.0" + +[[crate]] +# substrate/frame/proxy +name = "pallet-proxy" +from = "40.1.0" +to = "41.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/recovery +name = "pallet-recovery" +from = "40.0.0" +to = "41.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/salary +name = "pallet-salary" +from = "25.0.0" +to = "26.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/staking +name = "pallet-staking" +from = "40.1.1" +to = "41.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/staking-async/ah-client +name = "pallet-staking-async-ah-client" +from = "0.1.0" +to = "0.2.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/tips +name = "pallet-tips" +from = "39.0.0" +to = "40.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/transaction-payment/rpc +name = "pallet-transaction-payment-rpc" +from = "43.0.0" +to = "44.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/tx-pause +name = "pallet-tx-pause" +from = "21.1.0" +to = "22.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/whitelist +name = "pallet-whitelist" +from = "39.0.0" +to = "40.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# polkadot/xcm/pallet-xcm +name = "pallet-xcm" +from = "20.0.0" +to = "20.1.0" +bump = "minor" +reason = "changed" + +[[crate]] +# polkadot/xcm/pallet-xcm-benchmarks +name = "pallet-xcm-benchmarks" +from = "20.0.0" +to = "21.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# polkadot/node/subsystem-types +name = "polkadot-node-subsystem-types" +from = "23.0.0" +to = "24.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# docs/sdk/packages/guides/first-pallet +name = "polkadot-sdk-docs-first-pallet" +from = "0.1.0" +to = "0.1.0" + +[[crate]] +# substrate/client/consensus/babe/rpc +name = "sc-consensus-babe-rpc" +from = "0.50.0" +to = "0.51.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/client/consensus/beefy +name = "sc-consensus-beefy" +from = "29.0.0" +to = "30.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/client/consensus/grandpa +name = "sc-consensus-grandpa" +from = "0.35.0" +to = "0.36.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/client/consensus/manual-seal +name = "sc-consensus-manual-seal" +from = "0.51.0" +to = "0.52.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/client/rpc +name = "sc-rpc" +from = "45.0.0" +to = "46.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/client/rpc-servers +name = "sc-rpc-server" +from = "22.0.0" +to = "23.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/utils/frame/rpc/support +name = "substrate-frame-rpc-support" +from = "45.0.0" +to = "46.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/utils/frame/rpc/system +name = "substrate-frame-rpc-system" +from = "44.0.0" +to = "45.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/utils/frame/rpc/client +name = "substrate-rpc-client" +from = "0.49.0" +to = "0.50.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/utils/frame/rpc/state-trie-migration-rpc +name = "substrate-state-trie-migration-rpc" +from = "43.0.0" +to = "44.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# bridges/primitives/parachains +name = "bp-parachains" +from = "0.20.0" +to = "0.21.0" +bump = "major" +reason = "changed" + +[[crate]] +# bridges/chains/chain-polkadot-bulletin +name = "bp-polkadot-bulletin" +from = "0.17.0" +to = "0.18.0" +bump = "major" +reason = "changed" + +[[crate]] +# polkadot/runtime/rococo/bridge-primitives +name = "bp-rococo" +from = "0.19.0" +to = "0.20.0" +bump = "major" +reason = "changed" + +[[crate]] +# polkadot/runtime/westend/bridge-primitives +name = "bp-westend" +from = "0.16.0" +to = "0.17.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/utils/frame/remote-externalities +name = "frame-remote-externalities" +from = "0.51.0" +to = "0.52.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/utils/frame/generate-bags +name = "generate-bags" +from = "40.0.0" +to = "41.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/assets-freezer +name = "pallet-assets-freezer" +from = "0.7.0" +to = "0.8.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/assets-holder +name = "pallet-assets-holder" +from = "0.2.1" +to = "0.3.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/beefy-mmr +name = "pallet-beefy-mmr" +from = "41.0.0" +to = "42.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/child-bounties +name = "pallet-child-bounties" +from = "39.0.0" +to = "40.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/examples/multi-block-migrations +name = "pallet-example-mbm" +from = "0.1.0" +to = "0.1.0" + +[[crate]] +# substrate/frame/examples +name = "pallet-examples" +from = "4.0.0" +to = "4.0.0" + +[[crate]] +# substrate/frame/nft-fractionalization +name = "pallet-nft-fractionalization" +from = "23.0.0" +to = "24.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/nomination-pools/benchmarking +name = "pallet-nomination-pools-benchmarking" +from = "38.0.0" +to = "39.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/offences/benchmarking +name = "pallet-offences-benchmarking" +from = "40.0.0" +to = "41.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/paged-list/fuzzer +name = "pallet-paged-list-fuzzer" +from = "0.1.0" +to = "0.1.0" + +[[crate]] +# substrate/frame/root-offences +name = "pallet-root-offences" +from = "37.0.0" +to = "38.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/safe-mode +name = "pallet-safe-mode" +from = "21.1.0" +to = "22.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/session/benchmarking +name = "pallet-session-benchmarking" +from = "40.0.0" +to = "41.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# bridges/modules/xcm-bridge-hub +name = "pallet-xcm-bridge-hub" +from = "0.16.3" +to = "0.17.0" +bump = "major" +reason = "changed" + +[[crate]] +# polkadot/runtime/parachains +name = "polkadot-runtime-parachains" +from = "20.0.0" +to = "20.0.1" +bump = "patch" +reason = "changed" + +[[crate]] +# docs/sdk/packages/guides/first-runtime +name = "polkadot-sdk-docs-first-runtime" +from = "0.1.0" +to = "0.1.0" + +[[crate]] +# bridges/relays/client-substrate +name = "relay-substrate-client" +from = "0.1.0" +to = "0.1.0" + +[[crate]] +# substrate/client/consensus/beefy/rpc +name = "sc-consensus-beefy-rpc" +from = "29.0.0" +to = "30.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/client/consensus/grandpa/rpc +name = "sc-consensus-grandpa-rpc" +from = "0.35.0" +to = "0.36.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/client/rpc-spec-v2 +name = "sc-rpc-spec-v2" +from = "0.50.0" +to = "0.51.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/client/sync-state-rpc +name = "sc-sync-state-rpc" +from = "0.50.0" +to = "0.51.0" +bump = "major" +reason = "changed" + +[[crate]] +# templates/solochain/runtime +name = "solochain-template-runtime" +from = "0.1.0" +to = "0.1.0" + +[[crate]] +# bridges/primitives/beefy +name = "bp-beefy" +from = "0.1.0" +to = "0.1.0" + +[[crate]] +# bridges/primitives/relayers +name = "bp-relayers" +from = "0.20.1" +to = "0.21.0" +bump = "major" +reason = "changed" + +[[crate]] +# bridges/primitives/test-utils +name = "bp-test-utils" +from = "0.20.0" +to = "0.21.0" +bump = "major" +reason = "changed" + +[[crate]] +# cumulus/pallets/parachain-system +name = "cumulus-pallet-parachain-system" +from = "0.20.0" +to = "0.21.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/bin/node/rpc +name = "node-rpc" +from = "3.0.0" +to = "3.0.0" + +[[crate]] +# substrate/frame/bags-list/remote-tests +name = "pallet-bags-list-remote-tests" +from = "4.0.0" +to = "4.0.0" + +[[crate]] +# substrate/frame/election-provider-multi-phase +name = "pallet-election-provider-multi-phase" +from = "39.2.0" +to = "40.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/state-trie-migration +name = "pallet-state-trie-migration" +from = "45.0.0" +to = "46.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# bridges/modules/xcm-bridge-hub-router +name = "pallet-xcm-bridge-hub-router" +from = "0.18.0" +to = "0.19.0" +bump = "major" +reason = "changed" + +[[crate]] +# bridges/relays/parachains +name = "parachains-relay" +from = "0.1.0" +to = "0.1.0" + +[[crate]] +# polkadot/rpc +name = "polkadot-rpc" +from = "24.0.0" +to = "25.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/client/service +name = "sc-service" +from = "0.51.0" +to = "0.52.0" +bump = "major" +reason = "changed" + +[[crate]] +# polkadot/xcm/xcm-simulator +name = "xcm-simulator" +from = "20.1.0" +to = "21.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# cumulus/pallets/aura-ext +name = "cumulus-pallet-aura-ext" +from = "0.20.0" +to = "0.21.0" +bump = "major" +reason = "changed" + +[[crate]] +# cumulus/pallets/solo-to-para +name = "cumulus-pallet-solo-to-para" +from = "0.20.0" +to = "0.21.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/utils/frame/storage-access-test-runtime +name = "frame-storage-access-test-runtime" +from = "0.1.0" +to = "0.2.0" +bump = "major" +reason = "changed" + +[[crate]] +# bridges/modules/beefy +name = "pallet-bridge-beefy" +from = "0.1.0" +to = "0.1.0" + +[[crate]] +# bridges/modules/grandpa +name = "pallet-bridge-grandpa" +from = "0.20.0" +to = "0.21.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/contracts/mock-network +name = "pallet-contracts-mock-network" +from = "17.0.0" +to = "18.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# polkadot/runtime/common +name = "polkadot-runtime-common" +from = "19.1.1" +to = "20.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/client/cli +name = "sc-cli" +from = "0.52.0" +to = "0.53.0" +bump = "major" +reason = "changed" + +[[crate]] +# bridges/snowbridge/primitives/core +name = "snowbridge-core" +from = "0.13.2" +to = "0.14.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/test-utils/client +name = "substrate-test-client" +from = "2.0.1" +to = "2.0.1" + +[[crate]] +# substrate/test-utils/runtime +name = "substrate-test-runtime" +from = "2.0.0" +to = "2.0.0" + +[[crate]] +# polkadot/xcm/docs +name = "xcm-docs" +from = "0.1.0" +to = "0.1.0" + +[[crate]] +# polkadot/xcm/xcm-simulator/example +name = "xcm-simulator-example" +from = "20.0.1" +to = "21.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# polkadot/xcm/xcm-simulator/fuzzer +name = "xcm-simulator-fuzzer" +from = "1.0.0" +to = "1.0.0" + +[[crate]] +# cumulus/parachains/runtimes/bridge-hubs/common +name = "bridge-hub-common" +from = "0.13.1" +to = "0.14.0" +bump = "major" +reason = "changed" + +[[crate]] +# cumulus/client/cli +name = "cumulus-client-cli" +from = "0.23.0" +to = "0.24.0" +bump = "major" +reason = "changed" + +[[crate]] +# cumulus/pallets/xcmp-queue +name = "cumulus-pallet-xcmp-queue" +from = "0.20.0" +to = "0.21.0" +bump = "major" +reason = "changed" + +[[crate]] +# cumulus/primitives/utility +name = "cumulus-primitives-utility" +from = "0.20.0" +to = "0.21.0" +bump = "major" +reason = "changed" + +[[crate]] +# cumulus/test/runtime +name = "cumulus-test-runtime" +from = "0.1.0" +to = "0.1.0" + +[[crate]] +# bridges/modules/parachains +name = "pallet-bridge-parachains" +from = "0.20.0" +to = "0.21.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/revive/rpc +name = "pallet-revive-eth-rpc" +from = "0.6.0" +to = "0.7.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/staking-async/runtimes/rc/constants +name = "pallet-staking-async-rc-runtime-constants" +from = "0.1.0" +to = "0.2.0" +bump = "major" +reason = "changed" + +[[crate]] +# polkadot/node/metrics +name = "polkadot-node-metrics" +from = "23.0.0" +to = "24.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# polkadot/runtime/test-runtime +name = "polkadot-test-runtime" +from = "1.0.0" +to = "1.0.0" + +[[crate]] +# polkadot/runtime/rococo/constants +name = "rococo-runtime-constants" +from = "20.0.0" +to = "21.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# bridges/snowbridge/primitives/inbound-queue +name = "snowbridge-inbound-queue-primitives" +from = "0.2.2" +to = "0.3.0" +bump = "major" +reason = "changed" + +[[crate]] +# bridges/snowbridge/primitives/outbound-queue +name = "snowbridge-outbound-queue-primitives" +from = "0.2.2" +to = "0.3.0" +bump = "major" +reason = "changed" + +[[crate]] +# bridges/snowbridge/pallets/ethereum-client +name = "snowbridge-pallet-ethereum-client" +from = "0.13.0" +to = "0.14.0" +bump = "major" +reason = "changed" + +[[crate]] +# bridges/snowbridge/pallets/system-frontend +name = "snowbridge-pallet-system-frontend" +from = "0.2.2" +to = "0.3.0" +bump = "major" +reason = "changed" + +[[crate]] +# bridges/snowbridge/pallets/system/runtime-api +name = "snowbridge-system-runtime-api" +from = "0.13.0" +to = "0.14.0" +bump = "major" +reason = "changed" + +[[crate]] +# bridges/snowbridge/pallets/system-v2/runtime-api +name = "snowbridge-system-v2-runtime-api" +from = "0.2.0" +to = "0.3.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/bin/node/inspect +name = "staging-node-inspect" +from = "0.28.0" +to = "0.29.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/bin/utils/subkey +name = "subkey" +from = "25.0.0" +to = "26.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/test-utils/runtime/client +name = "substrate-test-runtime-client" +from = "2.0.0" +to = "2.0.0" + +[[crate]] +# polkadot/runtime/westend/constants +name = "westend-runtime-constants" +from = "20.0.0" +to = "21.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# bridges/modules/relayers +name = "pallet-bridge-relayers" +from = "0.20.0" +to = "0.21.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/staking-async/runtimes/rc +name = "pallet-staking-async-rc-runtime" +from = "0.1.0" +to = "0.2.0" +bump = "major" +reason = "changed" + +[[crate]] +# cumulus/parachains/common +name = "parachains-common" +from = "21.0.0" +to = "22.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# polkadot/node/overseer +name = "polkadot-overseer" +from = "23.0.0" +to = "24.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# polkadot/runtime/rococo +name = "rococo-runtime" +from = "23.0.0" +to = "24.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/client/network/test +name = "sc-network-test" +from = "0.8.0" +to = "0.8.0" + +[[crate]] +# substrate/client/service/test +name = "sc-service-test" +from = "2.0.0" +to = "2.0.0" + +[[crate]] +# bridges/snowbridge/pallets/outbound-queue/runtime-api +name = "snowbridge-outbound-queue-runtime-api" +from = "0.13.0" +to = "0.14.0" +bump = "major" +reason = "changed" + +[[crate]] +# bridges/snowbridge/pallets/inbound-queue/fixtures +name = "snowbridge-pallet-inbound-queue-fixtures" +from = "0.21.0" +to = "0.22.0" +bump = "major" +reason = "changed" + +[[crate]] +# bridges/snowbridge/pallets/inbound-queue-v2/fixtures +name = "snowbridge-pallet-inbound-queue-v2-fixtures" +from = "0.2.0" +to = "0.3.0" +bump = "major" +reason = "changed" + +[[crate]] +# bridges/snowbridge/pallets/outbound-queue +name = "snowbridge-pallet-outbound-queue" +from = "0.13.0" +to = "0.14.0" +bump = "major" +reason = "changed" + +[[crate]] +# bridges/snowbridge/pallets/outbound-queue-v2 +name = "snowbridge-pallet-outbound-queue-v2" +from = "0.2.2" +to = "0.3.0" +bump = "major" +reason = "changed" + +[[crate]] +# bridges/snowbridge/pallets/system +name = "snowbridge-pallet-system" +from = "0.13.3" +to = "0.14.0" +bump = "major" +reason = "changed" + +[[crate]] +# bridges/snowbridge/runtime/runtime-common +name = "snowbridge-runtime-common" +from = "0.13.0" +to = "0.14.0" +bump = "major" +reason = "changed" + +[[crate]] +# bridges/snowbridge/test-utils +name = "snowbridge-test-utils" +from = "0.2.1" +to = "0.3.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/primitives/api/test +name = "sp-api-test" +from = "2.0.1" +to = "2.0.1" + +[[crate]] +# substrate/primitives/application-crypto/test +name = "sp-application-crypto-test" +from = "2.0.0" +to = "2.0.0" + +[[crate]] +# bridges/relays/lib-substrate-relay +name = "substrate-relay-helper" +from = "0.1.0" +to = "0.1.0" + +[[crate]] +# substrate/test-utils/runtime/transaction-pool +name = "substrate-test-runtime-transaction-pool" +from = "2.0.0" +to = "2.0.0" + +[[crate]] +# cumulus/parachains/runtimes/constants +name = "testnet-parachains-constants" +from = "13.0.0" +to = "14.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# polkadot/runtime/westend +name = "westend-runtime" +from = "23.0.0" +to = "24.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# cumulus/parachains/runtimes/assets/common +name = "assets-common" +from = "0.21.0" +to = "0.22.0" +bump = "major" +reason = "changed" + +[[crate]] +# bridges/chains/chain-cumulus +name = "bp-bridge-hub-cumulus" +from = "0.21.0" +to = "0.22.0" +bump = "major" +reason = "changed" + +[[crate]] +# bridges/bin/runtime-common +name = "bridge-runtime-common" +from = "0.21.0" +to = "0.22.0" +bump = "major" +reason = "changed" + +[[crate]] +# cumulus/parachains/runtimes/collectives/collectives-westend +name = "collectives-westend-runtime" +from = "19.0.0" +to = "20.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# cumulus/parachains/runtimes/coretime/coretime-rococo +name = "coretime-rococo-runtime" +from = "0.15.2" +to = "0.16.0" +bump = "major" +reason = "changed" + +[[crate]] +# cumulus/parachains/runtimes/coretime/coretime-westend +name = "coretime-westend-runtime" +from = "0.15.2" +to = "0.16.0" +bump = "major" +reason = "changed" + +[[crate]] +# cumulus/client/relay-chain-interface +name = "cumulus-relay-chain-interface" +from = "0.23.0" +to = "0.24.0" +bump = "major" +reason = "changed" + +[[crate]] +# cumulus/parachains/runtimes/glutton/glutton-westend +name = "glutton-westend-runtime" +from = "17.0.0" +to = "18.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# cumulus/parachains/runtimes/test-utils +name = "parachains-runtimes-test-utils" +from = "22.0.0" +to = "23.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# cumulus/parachains/runtimes/people/people-rococo +name = "people-rococo-runtime" +from = "0.15.1" +to = "0.16.0" +bump = "major" +reason = "changed" + +[[crate]] +# cumulus/parachains/runtimes/people/people-westend +name = "people-westend-runtime" +from = "0.15.1" +to = "0.16.0" +bump = "major" +reason = "changed" + +[[crate]] +# polkadot/node/subsystem +name = "polkadot-node-subsystem" +from = "23.0.0" +to = "24.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# polkadot/utils/generate-bags +name = "polkadot-voter-bags" +from = "23.0.0" +to = "24.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# polkadot/utils/remote-ext-tests/bags-list +name = "remote-ext-tests-bags-list" +from = "1.0.0" +to = "1.0.0" + +[[crate]] +# cumulus/parachains/runtimes/testing/rococo-parachain +name = "rococo-parachain-runtime" +from = "0.20.0" +to = "0.21.0" +bump = "major" +reason = "changed" + +[[crate]] +# bridges/snowbridge/pallets/inbound-queue +name = "snowbridge-pallet-inbound-queue" +from = "0.13.2" +to = "0.14.0" +bump = "major" +reason = "changed" + +[[crate]] +# bridges/snowbridge/pallets/inbound-queue-v2 +name = "snowbridge-pallet-inbound-queue-v2" +from = "0.2.2" +to = "0.3.0" +bump = "major" +reason = "changed" + +[[crate]] +# bridges/snowbridge/pallets/system-v2 +name = "snowbridge-pallet-system-v2" +from = "0.2.3" +to = "0.3.0" +bump = "major" +reason = "changed" + +[[crate]] +# cumulus/xcm/xcm-emulator +name = "xcm-emulator" +from = "0.19.3" +to = "0.20.0" +bump = "major" +reason = "changed" + +[[crate]] +# cumulus/parachains/runtimes/testing/yet-another-parachain +name = "yet-another-parachain-runtime" +from = "0.1.0" +to = "0.2.0" +bump = "major" +reason = "changed" + +[[crate]] +# cumulus/parachains/runtimes/assets/test-utils +name = "asset-test-utils" +from = "23.0.0" +to = "24.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# cumulus/parachains/runtimes/assets/asset-hub-rococo/bridge-primitives +name = "bp-asset-hub-rococo" +from = "0.17.0" +to = "0.18.0" +bump = "major" +reason = "changed" + +[[crate]] +# cumulus/parachains/runtimes/assets/asset-hub-westend/bridge-primitives +name = "bp-asset-hub-westend" +from = "0.16.0" +to = "0.17.0" +bump = "major" +reason = "changed" + +[[crate]] +# cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/bridge-primitives +name = "bp-bridge-hub-rococo" +from = "0.21.0" +to = "0.22.0" +bump = "major" +reason = "changed" + +[[crate]] +# cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/bridge-primitives +name = "bp-bridge-hub-westend" +from = "0.17.0" +to = "0.18.0" +bump = "major" +reason = "changed" + +[[crate]] +# cumulus/client/network +name = "cumulus-client-network" +from = "0.23.0" +to = "0.24.0" +bump = "major" +reason = "changed" + +[[crate]] +# cumulus/client/parachain-inherent +name = "cumulus-client-parachain-inherent" +from = "0.17.0" +to = "0.18.0" +bump = "major" +reason = "changed" + +[[crate]] +# cumulus/client/relay-chain-rpc-interface +name = "cumulus-relay-chain-rpc-interface" +from = "0.23.0" +to = "0.24.0" +bump = "major" +reason = "changed" + +[[crate]] +# cumulus/client/relay-chain-streams +name = "cumulus-relay-chain-streams" +from = "0.1.0" +to = "0.2.0" +bump = "major" +reason = "changed" + +[[crate]] +# cumulus/parachains/runtimes/testing/penpal +name = "penpal-runtime" +from = "0.29.0" +to = "0.30.0" +bump = "major" +reason = "changed" + +[[crate]] +# polkadot/node/network/bridge +name = "polkadot-network-bridge" +from = "23.0.0" +to = "24.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# polkadot/node/core/chain-api +name = "polkadot-node-core-chain-api" +from = "23.0.0" +to = "24.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# polkadot/node/core/parachains-inherent +name = "polkadot-node-core-parachains-inherent" +from = "23.0.0" +to = "24.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# polkadot/node/core/pvf +name = "polkadot-node-core-pvf" +from = "23.0.0" +to = "24.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# polkadot/node/core/runtime-api +name = "polkadot-node-core-runtime-api" +from = "23.0.0" +to = "24.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# polkadot/node/subsystem-util +name = "polkadot-node-subsystem-util" +from = "24.0.0" +to = "24.0.1" +bump = "patch" +reason = "changed" + +[[crate]] +# bridges/snowbridge/runtime/test-common +name = "snowbridge-runtime-test-common" +from = "0.15.0" +to = "0.16.0" +bump = "major" +reason = "changed" + +[[crate]] +# cumulus/parachains/runtimes/assets/asset-hub-rococo +name = "asset-hub-rococo-runtime" +from = "0.25.2" +to = "0.26.0" +bump = "major" +reason = "changed" + +[[crate]] +# cumulus/parachains/runtimes/assets/asset-hub-westend +name = "asset-hub-westend-runtime" +from = "0.31.0" +to = "0.32.0" +bump = "major" +reason = "changed" + +[[crate]] +# cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo +name = "bridge-hub-rococo-runtime" +from = "0.19.1" +to = "0.20.0" +bump = "major" +reason = "changed" + +[[crate]] +# cumulus/parachains/runtimes/bridge-hubs/test-utils +name = "bridge-hub-test-utils" +from = "0.22.0" +to = "0.23.0" +bump = "major" +reason = "changed" + +[[crate]] +# cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend +name = "bridge-hub-westend-runtime" +from = "0.16.2" +to = "0.17.0" +bump = "major" +reason = "changed" + +[[crate]] +# cumulus/client/bootnodes +name = "cumulus-client-bootnodes" +from = "0.1.0" +to = "0.2.0" +bump = "major" +reason = "changed" + +[[crate]] +# cumulus/client/pov-recovery +name = "cumulus-client-pov-recovery" +from = "0.23.0" +to = "0.24.0" +bump = "major" +reason = "changed" + +[[crate]] +# cumulus/parachains/integration-tests/emulated/common +name = "emulated-integration-tests-common" +from = "22.0.0" +to = "22.1.0" +bump = "minor" +reason = "changed" + +[[crate]] +# substrate/utils/frame/benchmarking-cli +name = "frame-benchmarking-cli" +from = "48.0.0" +to = "49.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/frame/staking-async/runtimes/parachain +name = "pallet-staking-async-parachain-runtime" +from = "0.1.0" +to = "0.2.0" +bump = "major" +reason = "changed" + +[[crate]] +# polkadot/node/network/approval-distribution +name = "polkadot-approval-distribution" +from = "23.0.0" +to = "24.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# polkadot/node/network/bitfield-distribution +name = "polkadot-availability-bitfield-distribution" +from = "23.0.0" +to = "24.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# polkadot/node/network/availability-distribution +name = "polkadot-availability-distribution" +from = "23.0.0" +to = "24.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# polkadot/node/network/availability-recovery +name = "polkadot-availability-recovery" +from = "23.0.0" +to = "24.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# polkadot/node/network/collator-protocol +name = "polkadot-collator-protocol" +from = "23.0.0" +to = "24.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# polkadot/node/network/dispute-distribution +name = "polkadot-dispute-distribution" +from = "23.0.0" +to = "24.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# polkadot/node/network/gossip-support +name = "polkadot-gossip-support" +from = "24.0.0" +to = "24.0.1" +bump = "patch" +reason = "changed" + +[[crate]] +# polkadot/node/collation-generation +name = "polkadot-node-collation-generation" +from = "23.0.0" +to = "24.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# polkadot/node/core/approval-voting +name = "polkadot-node-core-approval-voting" +from = "23.0.0" +to = "24.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# polkadot/node/core/av-store +name = "polkadot-node-core-av-store" +from = "23.0.0" +to = "24.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# polkadot/node/core/backing +name = "polkadot-node-core-backing" +from = "23.0.0" +to = "24.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# polkadot/node/core/bitfield-signing +name = "polkadot-node-core-bitfield-signing" +from = "23.0.0" +to = "24.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# polkadot/node/core/candidate-validation +name = "polkadot-node-core-candidate-validation" +from = "23.0.0" +to = "24.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# polkadot/node/core/chain-selection +name = "polkadot-node-core-chain-selection" +from = "23.0.0" +to = "24.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# polkadot/node/core/dispute-coordinator +name = "polkadot-node-core-dispute-coordinator" +from = "23.0.0" +to = "24.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# polkadot/node/core/prospective-parachains +name = "polkadot-node-core-prospective-parachains" +from = "22.0.0" +to = "23.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# polkadot/node/core/provisioner +name = "polkadot-node-core-provisioner" +from = "23.0.0" +to = "24.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# polkadot/node/core/pvf-checker +name = "polkadot-node-core-pvf-checker" +from = "23.0.0" +to = "24.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# polkadot/node/subsystem-test-helpers +name = "polkadot-node-subsystem-test-helpers" +from = "1.0.0" +to = "1.0.0" + +[[crate]] +# polkadot/node/network/statement-distribution +name = "polkadot-statement-distribution" +from = "23.0.0" +to = "24.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# cumulus/parachains/integration-tests/emulated/chains/parachains/bridges/bridge-hub-rococo +name = "bridge-hub-rococo-emulated-chain" +from = "0.1.0" +to = "0.1.0" + +[[crate]] +# cumulus/parachains/integration-tests/emulated/chains/parachains/bridges/bridge-hub-westend +name = "bridge-hub-westend-emulated-chain" +from = "0.1.0" +to = "0.1.0" + +[[crate]] +# cumulus/parachains/integration-tests/emulated/chains/parachains/collectives/collectives-westend +name = "collectives-westend-emulated-chain" +from = "0.1.0" +to = "0.1.0" + +[[crate]] +# cumulus/parachains/integration-tests/emulated/chains/parachains/coretime/coretime-rococo +name = "coretime-rococo-emulated-chain" +from = "0.1.0" +to = "0.1.0" + +[[crate]] +# cumulus/parachains/integration-tests/emulated/chains/parachains/coretime/coretime-westend +name = "coretime-westend-emulated-chain" +from = "0.1.0" +to = "0.1.0" + +[[crate]] +# cumulus/client/consensus/common +name = "cumulus-client-consensus-common" +from = "0.23.0" +to = "0.24.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/utils/frame/omni-bencher +name = "frame-omni-bencher" +from = "0.12.0" +to = "0.13.0" +bump = "major" +reason = "changed" + +[[crate]] +# cumulus/parachains/integration-tests/emulated/chains/parachains/testing/penpal +name = "penpal-emulated-chain" +from = "0.1.0" +to = "0.1.0" + +[[crate]] +# cumulus/parachains/integration-tests/emulated/chains/parachains/people/people-rococo +name = "people-rococo-emulated-chain" +from = "0.1.0" +to = "0.1.0" + +[[crate]] +# cumulus/parachains/integration-tests/emulated/chains/parachains/people/people-westend +name = "people-westend-emulated-chain" +from = "0.1.0" +to = "0.1.0" + +[[crate]] +# polkadot/node/core/approval-voting-parallel +name = "polkadot-node-core-approval-voting-parallel" +from = "0.6.0" +to = "0.7.0" +bump = "major" +reason = "changed" + +[[crate]] +# cumulus/parachains/integration-tests/emulated/chains/relays/rococo +name = "rococo-emulated-chain" +from = "0.1.0" +to = "0.1.0" + +[[crate]] +# templates/solochain/node +name = "solochain-template-node" +from = "0.1.0" +to = "0.1.0" + +[[crate]] +# cumulus/parachains/integration-tests/emulated/chains/relays/westend +name = "westend-emulated-chain" +from = "0.1.0" +to = "0.1.0" + +[[crate]] +# cumulus/parachains/integration-tests/emulated/chains/parachains/assets/asset-hub-rococo +name = "asset-hub-rococo-emulated-chain" +from = "0.1.0" +to = "0.1.0" + +[[crate]] +# cumulus/parachains/integration-tests/emulated/chains/parachains/assets/asset-hub-westend +name = "asset-hub-westend-emulated-chain" +from = "0.1.0" +to = "0.1.0" + +[[crate]] +# cumulus/client/collator +name = "cumulus-client-collator" +from = "0.23.0" +to = "0.24.0" +bump = "major" +reason = "changed" + +[[crate]] +# cumulus/client/consensus/relay-chain +name = "cumulus-client-consensus-relay-chain" +from = "0.23.0" +to = "0.24.0" +bump = "major" +reason = "changed" + +[[crate]] +# polkadot/node/service +name = "polkadot-service" +from = "24.0.0" +to = "25.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# polkadot/node/subsystem-bench +name = "polkadot-subsystem-bench" +from = "1.0.0" +to = "1.0.0" + +[[crate]] +# cumulus/client/consensus/aura +name = "cumulus-client-consensus-aura" +from = "0.23.0" +to = "0.24.0" +bump = "major" +reason = "changed" + +[[crate]] +# cumulus/client/relay-chain-minimal-node +name = "cumulus-relay-chain-minimal-node" +from = "0.24.0" +to = "0.25.0" +bump = "major" +reason = "changed" + +[[crate]] +# polkadot/cli +name = "polkadot-cli" +from = "24.0.0" +to = "25.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# polkadot/node/test/service +name = "polkadot-test-service" +from = "1.0.0" +to = "1.0.0" + +[[crate]] +# cumulus/parachains/integration-tests/emulated/networks/rococo-system +name = "rococo-system-emulated-network" +from = "0.1.0" +to = "0.1.0" + +[[crate]] +# cumulus/parachains/integration-tests/emulated/networks/rococo-westend-system +name = "rococo-westend-system-emulated-network" +from = "0.1.0" +to = "0.1.0" + +[[crate]] +# cumulus/parachains/integration-tests/emulated/networks/westend-system +name = "westend-system-emulated-network" +from = "0.1.0" +to = "0.1.0" + +[[crate]] +# cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo +name = "asset-hub-rococo-integration-tests" +from = "1.0.0" +to = "1.0.0" + +[[crate]] +# cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend +name = "asset-hub-westend-integration-tests" +from = "1.0.0" +to = "1.0.0" + +[[crate]] +# cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-rococo +name = "bridge-hub-rococo-integration-tests" +from = "1.0.0" +to = "1.0.0" + +[[crate]] +# cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-westend +name = "bridge-hub-westend-integration-tests" +from = "1.0.0" +to = "1.0.0" + +[[crate]] +# cumulus/parachains/integration-tests/emulated/tests/collectives/collectives-westend +name = "collectives-westend-integration-tests" +from = "1.0.0" +to = "1.0.0" + +[[crate]] +# cumulus/parachains/integration-tests/emulated/tests/coretime/coretime-rococo +name = "coretime-rococo-integration-tests" +from = "0.1.0" +to = "0.1.0" + +[[crate]] +# cumulus/parachains/integration-tests/emulated/tests/coretime/coretime-westend +name = "coretime-westend-integration-tests" +from = "0.1.0" +to = "0.1.0" + +[[crate]] +# cumulus/client/relay-chain-inprocess-interface +name = "cumulus-relay-chain-inprocess-interface" +from = "0.24.0" +to = "0.25.0" +bump = "major" +reason = "changed" + +[[crate]] +# cumulus/parachains/integration-tests/emulated/tests/governance/westend +name = "governance-westend-integration-tests" +from = "0.1.0" +to = "0.1.0" + +[[crate]] +# cumulus/parachains/integration-tests/emulated/tests/people/people-rococo +name = "people-rococo-integration-tests" +from = "0.1.0" +to = "0.1.0" + +[[crate]] +# cumulus/parachains/integration-tests/emulated/tests/people/people-westend +name = "people-westend-integration-tests" +from = "0.1.0" +to = "0.1.0" + +[[crate]] +# polkadot +name = "polkadot" +from = "23.0.0" +to = "24.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# polkadot/node/test/client +name = "polkadot-test-client" +from = "1.0.0" +to = "1.0.0" + +[[crate]] +# polkadot/node/malus +name = "polkadot-test-malus" +from = "1.0.0" +to = "1.0.0" + +[[crate]] +# polkadot/parachain/test-parachains/adder/collator +name = "test-parachain-adder-collator" +from = "1.0.0" +to = "1.0.0" + +[[crate]] +# polkadot/parachain/test-parachains/undying/collator +name = "test-parachain-undying-collator" +from = "1.0.0" +to = "1.0.0" + +[[crate]] +# cumulus/client/service +name = "cumulus-client-service" +from = "0.24.0" +to = "0.25.0" +bump = "major" +reason = "changed" + +[[crate]] +# polkadot/xcm/xcm-executor/integration-tests +name = "xcm-executor-integration-tests" +from = "1.0.0" +to = "1.0.0" + +[[crate]] +# cumulus/test/service +name = "cumulus-test-service" +from = "0.1.0" +to = "0.1.0" + +[[crate]] +# cumulus/polkadot-omni-node/lib +name = "polkadot-omni-node-lib" +from = "0.6.0" +to = "0.7.0" +bump = "major" +reason = "changed" + +[[crate]] +# cumulus/test/client +name = "cumulus-test-client" +from = "0.1.0" +to = "0.1.0" + +[[crate]] +# cumulus/polkadot-omni-node +name = "polkadot-omni-node" +from = "0.6.0" +to = "0.7.0" +bump = "major" +reason = "changed" + +[[crate]] +# cumulus/polkadot-parachain +name = "polkadot-parachain-bin" +from = "5.0.0" +to = "6.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# umbrella +name = "polkadot-sdk" +from = "2503.1.1" +to = "2506.0.0" +bump = "major" +reason = "changed" + +[[crate]] +# substrate/bin/node/runtime +name = "kitchensink-runtime" +from = "3.0.0" +to = "3.0.0" + +[[crate]] +# templates/minimal/pallets/template +name = "pallet-minimal-template" +from = "0.1.0" +to = "0.1.0" + +[[crate]] +# templates/parachain/runtime +name = "parachain-template-runtime" +from = "0.1.0" +to = "0.1.0" + +[[crate]] +# templates/minimal/runtime +name = "minimal-template-runtime" +from = "0.1.0" +to = "0.1.0" + +[[crate]] +# substrate/utils/frame/generate-bags/node-runtime +name = "node-runtime-generate-bags" +from = "3.0.0" +to = "3.0.0" + +[[crate]] +# templates/parachain/node +name = "parachain-template-node" +from = "0.1.0" +to = "0.1.0" + +[[crate]] +# substrate/bin/node/cli +name = "staging-node-cli" +from = "3.0.0" +to = "3.0.0" + +[[crate]] +# templates/minimal/node +name = "minimal-template-node" +from = "0.1.0" +to = "0.1.0" + +[[crate]] +# substrate/bin/node/testing +name = "node-testing" +from = "3.0.0" +to = "3.0.0" + +[[crate]] +# docs/sdk +name = "polkadot-sdk-docs" +from = "0.1.0" +to = "0.1.0" + +[[crate]] +# substrate/test-utils/cli +name = "substrate-cli-test-utils" +from = "0.1.0" +to = "0.1.0" + +[[crate]] +# substrate/bin/node/bench +name = "node-bench" +from = "0.9.0" +to = "0.9.0" diff --git a/bridges/bin/runtime-common/Cargo.toml b/bridges/bin/runtime-common/Cargo.toml index d59be4f6dda86..6b426ccc72298 100644 --- a/bridges/bin/runtime-common/Cargo.toml +++ b/bridges/bin/runtime-common/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bridge-runtime-common" -version = "0.7.0" +version = "0.22.0" description = "Common types and functions that may be used by substrate-based runtimes of all bridged chains" authors.workspace = true edition.workspace = true @@ -11,43 +11,37 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0" workspace = true [dependencies] +bp-header-chain.workspace = true +bp-messages.workspace = true +bp-parachains.workspace = true +bp-polkadot-core.workspace = true +bp-relayers.workspace = true +bp-runtime.workspace = true codec = { features = ["derive"], workspace = true } +frame-support.workspace = true +frame-system.workspace = true log = { workspace = true } +pallet-bridge-grandpa.workspace = true +pallet-bridge-messages.workspace = true +pallet-bridge-parachains.workspace = true +pallet-bridge-relayers.workspace = true +pallet-transaction-payment.workspace = true +pallet-utility.workspace = true scale-info = { features = ["derive"], workspace = true } +sp-io.workspace = true +sp-runtime.workspace = true +sp-std.workspace = true +sp-trie = { optional = true, workspace = true } +sp-weights.workspace = true static_assertions = { optional = true, workspace = true, default-features = true } tuplex = { workspace = true } - -# Bridge dependencies -bp-header-chain = { workspace = true } -bp-messages = { workspace = true } -bp-parachains = { workspace = true } -bp-polkadot-core = { workspace = true } -bp-relayers = { workspace = true } -bp-runtime = { workspace = true } -pallet-bridge-grandpa = { workspace = true } -pallet-bridge-messages = { workspace = true } -pallet-bridge-parachains = { workspace = true } -pallet-bridge-relayers = { workspace = true } - -# Substrate dependencies -frame-support = { workspace = true } -frame-system = { workspace = true } -pallet-transaction-payment = { workspace = true } -pallet-utility = { workspace = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } -sp-std = { workspace = true } -sp-trie = { optional = true, workspace = true } -sp-weights = { workspace = true } - -# Polkadot dependencies -xcm = { workspace = true } +xcm.workspace = true [dev-dependencies] -bp-test-utils = { workspace = true } -pallet-balances = { workspace = true, default-features = true } -pallet-bridge-messages = { features = ["std", "test-helpers"], workspace = true } -sp-core = { workspace = true, default-features = true } +bp-test-utils = { workspace = true, default-features = false } +pallet-balances = { default-features = true, workspace = true } +pallet-bridge-messages = { features = ["std", "test-helpers"], workspace = true, default-features = false } +sp-core = { default-features = true, workspace = true } [features] default = ["std"] diff --git a/bridges/chains/chain-cumulus/Cargo.toml b/bridges/chains/chain-cumulus/Cargo.toml index 51d4e236840a4..6be8c9ebec34c 100644 --- a/bridges/chains/chain-cumulus/Cargo.toml +++ b/bridges/chains/chain-cumulus/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "bp-bridge-hub-cumulus" description = "Primitives for BridgeHub parachain runtimes." -version = "0.7.0" +version = "0.22.0" authors.workspace = true edition.workspace = true license = "GPL-3.0-or-later WITH Classpath-exception-2.0" @@ -14,20 +14,15 @@ exclude-from-umbrella = true workspace = true [dependencies] -# Bridge Dependencies -bp-messages = { workspace = true } -bp-polkadot-core = { workspace = true } -bp-runtime = { workspace = true } - -# Substrate Based Dependencies -frame-support = { workspace = true } -frame-system = { workspace = true } -parachains-common = { workspace = true } -sp-api = { workspace = true } -sp-std = { workspace = true } - -# Polkadot Dependencies -polkadot-primitives = { workspace = true } +bp-messages.workspace = true +bp-polkadot-core.workspace = true +bp-runtime.workspace = true +frame-support.workspace = true +frame-system.workspace = true +parachains-common.workspace = true +polkadot-primitives.workspace = true +sp-api.workspace = true +sp-std.workspace = true [features] default = ["std"] diff --git a/bridges/chains/chain-polkadot-bulletin/Cargo.toml b/bridges/chains/chain-polkadot-bulletin/Cargo.toml index c39273014f8de..3dab01b45b3bd 100644 --- a/bridges/chains/chain-polkadot-bulletin/Cargo.toml +++ b/bridges/chains/chain-polkadot-bulletin/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "bp-polkadot-bulletin" description = "Primitives of Polkadot Bulletin chain runtime." -version = "0.4.0" +version = "0.18.0" authors.workspace = true edition.workspace = true license = "GPL-3.0-or-later WITH Classpath-exception-2.0" @@ -14,21 +14,17 @@ exclude-from-umbrella = true workspace = true [dependencies] +bp-header-chain.workspace = true +bp-messages.workspace = true +bp-polkadot-core.workspace = true +bp-runtime.workspace = true codec = { features = ["derive"], workspace = true } +frame-support.workspace = true +frame-system.workspace = true scale-info = { features = ["derive"], workspace = true } - -# Bridge Dependencies -bp-header-chain = { workspace = true } -bp-messages = { workspace = true } -bp-polkadot-core = { workspace = true } -bp-runtime = { workspace = true } - -# Substrate Based Dependencies -frame-support = { workspace = true } -frame-system = { workspace = true } -sp-api = { workspace = true } -sp-runtime = { workspace = true } -sp-std = { workspace = true } +sp-api.workspace = true +sp-runtime.workspace = true +sp-std.workspace = true [features] default = ["std"] diff --git a/bridges/modules/beefy/Cargo.toml b/bridges/modules/beefy/Cargo.toml index 76a723b5a7be8..efb2862f1965b 100644 --- a/bridges/modules/beefy/Cargo.toml +++ b/bridges/modules/beefy/Cargo.toml @@ -12,30 +12,26 @@ publish = false workspace = true [dependencies] +bp-beefy.workspace = true +bp-runtime.workspace = true codec = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true log = { workspace = true } scale-info = { features = ["derive"], workspace = true } serde = { optional = true, workspace = true } - -# Bridge Dependencies -bp-beefy = { workspace = true } -bp-runtime = { workspace = true } - -# Substrate Dependencies -frame-support = { workspace = true } -frame-system = { workspace = true } -sp-core = { workspace = true } -sp-runtime = { workspace = true } -sp-std = { workspace = true } +sp-core.workspace = true +sp-runtime.workspace = true +sp-std.workspace = true [dev-dependencies] -bp-test-utils = { workspace = true, default-features = true } +bp-test-utils = { default-features = true, workspace = true } mmr-lib = { workspace = true, default-features = true } -pallet-beefy-mmr = { workspace = true, default-features = true } -pallet-mmr = { workspace = true, default-features = true } +pallet-beefy-mmr = { default-features = true, workspace = true } +pallet-mmr = { default-features = true, workspace = true } rand = { workspace = true, default-features = true } -sp-consensus-beefy = { workspace = true, default-features = true } -sp-io = { workspace = true, default-features = true } +sp-consensus-beefy = { default-features = true, workspace = true } +sp-io = { default-features = true, workspace = true } [features] default = ["std"] diff --git a/bridges/modules/grandpa/Cargo.toml b/bridges/modules/grandpa/Cargo.toml index 22a8439ed46d1..2e0a1b60037da 100644 --- a/bridges/modules/grandpa/Cargo.toml +++ b/bridges/modules/grandpa/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-bridge-grandpa" -version = "0.7.0" +version = "0.21.0" description = "Module implementing GRANDPA on-chain light client used for bridging consensus of substrate-based chains." authors.workspace = true edition.workspace = true @@ -13,29 +13,23 @@ workspace = true # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] +bp-header-chain.workspace = true +bp-runtime.workspace = true +bp-test-utils = { optional = true, workspace = true } codec = { workspace = true } +frame-benchmarking = { optional = true, workspace = true } +frame-support.workspace = true +frame-system.workspace = true log = { workspace = true } scale-info = { features = ["derive"], workspace = true } - -# Bridge Dependencies -bp-header-chain = { workspace = true } -bp-runtime = { workspace = true } - -# Substrate Dependencies -frame-support = { workspace = true } -frame-system = { workspace = true } sp-consensus-grandpa = { features = ["serde"], workspace = true } sp-runtime = { features = ["serde"], workspace = true } -sp-std = { workspace = true } - -# Optional Benchmarking Dependencies -bp-test-utils = { optional = true, workspace = true } -frame-benchmarking = { optional = true, workspace = true } +sp-std.workspace = true [dev-dependencies] -bp-runtime = { features = ["test-helpers"], workspace = true } -sp-core = { workspace = true, default-features = true } -sp-io = { workspace = true, default-features = true } +bp-runtime = { features = ["test-helpers"], workspace = true, default-features = false } +sp-core = { default-features = true, workspace = true } +sp-io = { default-features = true, workspace = true } [features] default = ["std"] diff --git a/bridges/modules/messages/Cargo.toml b/bridges/modules/messages/Cargo.toml index 6248c9e65e167..6853bbd215a82 100644 --- a/bridges/modules/messages/Cargo.toml +++ b/bridges/modules/messages/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "pallet-bridge-messages" description = "Module that allows bridged chains to exchange messages using lane concept." -version = "0.7.0" +version = "0.21.0" authors.workspace = true edition.workspace = true license = "GPL-3.0-or-later WITH Classpath-exception-2.0" @@ -11,30 +11,26 @@ repository.workspace = true workspace = true [dependencies] +bp-header-chain.workspace = true +bp-messages.workspace = true +bp-runtime.workspace = true codec = { workspace = true } +frame-benchmarking = { optional = true, workspace = true } +frame-support.workspace = true +frame-system.workspace = true log = { workspace = true } scale-info = { features = ["derive"], workspace = true } - -# Bridge dependencies -bp-header-chain = { workspace = true } -bp-messages = { workspace = true } -bp-runtime = { workspace = true } - -# Substrate Dependencies -frame-benchmarking = { optional = true, workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } -sp-runtime = { workspace = true } -sp-std = { workspace = true } +sp-runtime.workspace = true +sp-std.workspace = true sp-trie = { optional = true, workspace = true } [dev-dependencies] -bp-runtime = { features = ["test-helpers"], workspace = true } -bp-test-utils = { workspace = true } -pallet-balances = { workspace = true } -pallet-bridge-grandpa = { workspace = true } -sp-core = { workspace = true } -sp-io = { workspace = true } +bp-runtime = { features = ["test-helpers"], workspace = true, default-features = false } +bp-test-utils = { workspace = true, default-features = false } +pallet-balances = { workspace = true, default-features = false } +pallet-bridge-grandpa = { workspace = true, default-features = false } +sp-core = { workspace = true, default-features = false } +sp-io = { workspace = true, default-features = false } [features] default = ["std"] diff --git a/bridges/modules/parachains/Cargo.toml b/bridges/modules/parachains/Cargo.toml index a187cd3d2ed3e..f9f212ff48f7c 100644 --- a/bridges/modules/parachains/Cargo.toml +++ b/bridges/modules/parachains/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-bridge-parachains" -version = "0.7.0" +version = "0.21.0" description = "Module that allows bridged relay chains to exchange information on their parachains' heads." authors.workspace = true edition.workspace = true @@ -11,29 +11,25 @@ repository.workspace = true workspace = true [dependencies] +bp-header-chain.workspace = true +bp-parachains.workspace = true +bp-polkadot-core.workspace = true +bp-runtime.workspace = true codec = { workspace = true } +frame-benchmarking = { optional = true, workspace = true } +frame-support.workspace = true +frame-system.workspace = true log = { workspace = true } +pallet-bridge-grandpa.workspace = true scale-info = { features = ["derive"], workspace = true } - -# Bridge Dependencies -bp-header-chain = { workspace = true } -bp-parachains = { workspace = true } -bp-polkadot-core = { workspace = true } -bp-runtime = { workspace = true } -pallet-bridge-grandpa = { workspace = true } - -# Substrate Dependencies -frame-benchmarking = { optional = true, workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } -sp-runtime = { workspace = true } -sp-std = { workspace = true } +sp-runtime.workspace = true +sp-std.workspace = true [dev-dependencies] -bp-header-chain = { workspace = true, default-features = true } -bp-test-utils = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-io = { workspace = true, default-features = true } +bp-header-chain = { default-features = true, workspace = true } +bp-test-utils = { default-features = true, workspace = true } +sp-core = { default-features = true, workspace = true } +sp-io = { default-features = true, workspace = true } [features] default = ["std"] diff --git a/bridges/modules/relayers/Cargo.toml b/bridges/modules/relayers/Cargo.toml index d0b19f612d2a6..fc27c1916207c 100644 --- a/bridges/modules/relayers/Cargo.toml +++ b/bridges/modules/relayers/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "pallet-bridge-relayers" description = "Module used to store relayer rewards and coordinate relayers set." -version = "0.7.0" +version = "0.21.0" authors.workspace = true edition.workspace = true license = "GPL-3.0-or-later WITH Classpath-exception-2.0" @@ -11,37 +11,33 @@ repository.workspace = true workspace = true [dependencies] +bp-header-chain.workspace = true +bp-messages.workspace = true +bp-relayers.workspace = true +bp-runtime.workspace = true codec = { workspace = true } +frame-benchmarking = { optional = true, workspace = true } +frame-support.workspace = true +frame-system.workspace = true log = { workspace = true } +pallet-bridge-grandpa.workspace = true +pallet-bridge-messages.workspace = true +pallet-bridge-parachains.workspace = true +pallet-transaction-payment.workspace = true scale-info = { features = ["derive"], workspace = true } - -# Bridge dependencies -bp-header-chain = { workspace = true } -bp-messages = { workspace = true } -bp-relayers = { workspace = true } -bp-runtime = { workspace = true } -pallet-bridge-grandpa = { workspace = true } -pallet-bridge-messages = { workspace = true } -pallet-bridge-parachains = { workspace = true } - -# Substrate Dependencies -frame-benchmarking = { optional = true, workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } -pallet-transaction-payment = { workspace = true } -sp-arithmetic = { workspace = true } -sp-runtime = { workspace = true } +sp-arithmetic.workspace = true +sp-runtime.workspace = true [dev-dependencies] -bp-parachains = { workspace = true } -bp-polkadot-core = { workspace = true } -bp-runtime = { workspace = true } -bp-test-utils = { workspace = true } -pallet-balances = { workspace = true, default-features = true } -pallet-utility = { workspace = true } -sp-core = { workspace = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } +bp-parachains = { workspace = true, default-features = false } +bp-polkadot-core = { workspace = true, default-features = false } +bp-runtime = { workspace = true, default-features = false } +bp-test-utils = { workspace = true, default-features = false } +pallet-balances = { default-features = true, workspace = true } +pallet-utility = { workspace = true, default-features = false } +sp-core = { workspace = true, default-features = false } +sp-io = { workspace = true, default-features = false } +sp-runtime = { workspace = true, default-features = false } [features] default = ["std"] diff --git a/bridges/modules/xcm-bridge-hub-router/Cargo.toml b/bridges/modules/xcm-bridge-hub-router/Cargo.toml index c2f1a2fc2dcee..2592ef0b8fbef 100644 --- a/bridges/modules/xcm-bridge-hub-router/Cargo.toml +++ b/bridges/modules/xcm-bridge-hub-router/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "pallet-xcm-bridge-hub-router" description = "Bridge hub interface for sibling/parent chains with dynamic fees support." -version = "0.5.0" +version = "0.19.0" authors.workspace = true edition.workspace = true license = "GPL-3.0-or-later WITH Classpath-exception-2.0" @@ -11,28 +11,22 @@ repository.workspace = true workspace = true [dependencies] +bp-xcm-bridge-hub-router.workspace = true codec = { workspace = true } +frame-benchmarking = { optional = true, workspace = true } +frame-support.workspace = true +frame-system.workspace = true log = { workspace = true } +polkadot-runtime-parachains.workspace = true scale-info = { features = ["bit-vec", "derive", "serde"], workspace = true } - -# Bridge dependencies -bp-xcm-bridge-hub-router = { workspace = true } - -# Substrate Dependencies -frame-benchmarking = { optional = true, workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } -sp-core = { workspace = true } -sp-runtime = { workspace = true } -sp-std = { workspace = true } - -# Polkadot Dependencies -polkadot-runtime-parachains = { workspace = true } -xcm = { workspace = true } -xcm-builder = { workspace = true } +sp-core.workspace = true +sp-runtime.workspace = true +sp-std.workspace = true +xcm-builder.workspace = true +xcm.workspace = true [dev-dependencies] -sp-io = { workspace = true, default-features = true } +sp-io = { default-features = true, workspace = true } [features] default = ["std"] diff --git a/bridges/modules/xcm-bridge-hub/Cargo.toml b/bridges/modules/xcm-bridge-hub/Cargo.toml index b5e3658744436..0bceb0972284e 100644 --- a/bridges/modules/xcm-bridge-hub/Cargo.toml +++ b/bridges/modules/xcm-bridge-hub/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "pallet-xcm-bridge-hub" description = "Module that adds dynamic bridges/lanes support to XCM infrastructure at the bridge hub." -version = "0.2.0" +version = "0.17.0" authors.workspace = true edition.workspace = true license = "GPL-3.0-or-later WITH Classpath-exception-2.0" @@ -11,36 +11,30 @@ repository.workspace = true workspace = true [dependencies] +bp-messages.workspace = true +bp-runtime.workspace = true +bp-xcm-bridge-hub.workspace = true codec = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true log = { workspace = true } +pallet-bridge-messages.workspace = true scale-info = { features = ["derive"], workspace = true } - -# Bridge Dependencies -bp-messages = { workspace = true } -bp-runtime = { workspace = true } -bp-xcm-bridge-hub = { workspace = true } -pallet-bridge-messages = { workspace = true } - -# Substrate Dependencies -frame-support = { workspace = true } -frame-system = { workspace = true } -sp-core = { workspace = true } -sp-runtime = { workspace = true } -sp-std = { workspace = true } - -# Polkadot Dependencies -xcm = { workspace = true } -xcm-builder = { workspace = true } -xcm-executor = { workspace = true } +sp-core.workspace = true +sp-runtime.workspace = true +sp-std.workspace = true +xcm-builder.workspace = true +xcm-executor.workspace = true +xcm.workspace = true [dev-dependencies] -bp-header-chain = { workspace = true } -bp-runtime = { workspace = true } -bp-xcm-bridge-hub-router = { workspace = true } -pallet-balances = { workspace = true } -pallet-xcm-bridge-hub-router = { workspace = true } -polkadot-parachain-primitives = { workspace = true } -sp-io = { workspace = true } +bp-header-chain = { workspace = true, default-features = false } +bp-runtime = { workspace = true, default-features = false } +bp-xcm-bridge-hub-router = { workspace = true, default-features = false } +pallet-balances = { workspace = true, default-features = false } +pallet-xcm-bridge-hub-router = { workspace = true, default-features = false } +polkadot-parachain-primitives = { workspace = true, default-features = false } +sp-io = { workspace = true, default-features = false } [features] default = ["std"] diff --git a/bridges/primitives/beefy/Cargo.toml b/bridges/primitives/beefy/Cargo.toml index be1ded492941b..082f107856066 100644 --- a/bridges/primitives/beefy/Cargo.toml +++ b/bridges/primitives/beefy/Cargo.toml @@ -12,21 +12,17 @@ publish = false workspace = true [dependencies] +binary-merkle-tree.workspace = true +bp-runtime.workspace = true codec = { features = ["bit-vec", "derive"], workspace = true } +frame-support.workspace = true +pallet-beefy-mmr.workspace = true +pallet-mmr.workspace = true scale-info = { features = ["bit-vec", "derive"], workspace = true } serde = { features = ["alloc", "derive"], workspace = true } - -# Bridge Dependencies -bp-runtime = { workspace = true } - -# Substrate Dependencies -binary-merkle-tree = { workspace = true } -frame-support = { workspace = true } -pallet-beefy-mmr = { workspace = true } -pallet-mmr = { workspace = true } -sp-consensus-beefy = { workspace = true } -sp-runtime = { workspace = true } -sp-std = { workspace = true } +sp-consensus-beefy.workspace = true +sp-runtime.workspace = true +sp-std.workspace = true [features] default = ["std"] diff --git a/bridges/primitives/header-chain/Cargo.toml b/bridges/primitives/header-chain/Cargo.toml index 8e04f122783de..ec3b480be4b56 100644 --- a/bridges/primitives/header-chain/Cargo.toml +++ b/bridges/primitives/header-chain/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "bp-header-chain" description = "A common interface for describing what a bridge pallet should be able to do." -version = "0.7.0" +version = "0.21.0" authors.workspace = true edition.workspace = true license = "GPL-3.0-or-later WITH Classpath-exception-2.0" @@ -11,23 +11,19 @@ repository.workspace = true workspace = true [dependencies] +bp-runtime.workspace = true codec = { workspace = true } finality-grandpa = { workspace = true } +frame-support.workspace = true scale-info = { features = ["derive"], workspace = true } serde = { features = ["alloc", "derive"], workspace = true } - -# Bridge dependencies -bp-runtime = { workspace = true } - -# Substrate Dependencies -frame-support = { workspace = true } sp-consensus-grandpa = { features = ["serde"], workspace = true } sp-core = { features = ["serde"], workspace = true } sp-runtime = { features = ["serde"], workspace = true } -sp-std = { workspace = true } +sp-std.workspace = true [dev-dependencies] -bp-test-utils = { workspace = true, default-features = true } +bp-test-utils = { default-features = true, workspace = true } hex = { workspace = true, default-features = true } hex-literal = { workspace = true, default-features = true } diff --git a/bridges/primitives/messages/Cargo.toml b/bridges/primitives/messages/Cargo.toml index dd1bd083371f6..9eb439558b6a4 100644 --- a/bridges/primitives/messages/Cargo.toml +++ b/bridges/primitives/messages/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "bp-messages" description = "Primitives of messages module." -version = "0.7.0" +version = "0.21.0" authors.workspace = true edition.workspace = true license = "GPL-3.0-or-later WITH Classpath-exception-2.0" @@ -11,22 +11,18 @@ repository.workspace = true workspace = true [dependencies] +bp-header-chain.workspace = true +bp-runtime.workspace = true codec = { features = ["bit-vec", "derive"], workspace = true } +frame-support.workspace = true scale-info = { features = ["bit-vec", "derive"], workspace = true } serde = { features = ["alloc", "derive"], workspace = true } - -# Bridge dependencies -bp-header-chain = { workspace = true } -bp-runtime = { workspace = true } - -# Substrate Dependencies -frame-support = { workspace = true } -sp-core = { workspace = true } -sp-io = { workspace = true } -sp-std = { workspace = true } +sp-core.workspace = true +sp-io.workspace = true +sp-std.workspace = true [dev-dependencies] -bp-runtime = { workspace = true } +bp-runtime = { workspace = true, default-features = false } hex = { workspace = true, default-features = true } hex-literal = { workspace = true, default-features = true } diff --git a/bridges/primitives/parachains/Cargo.toml b/bridges/primitives/parachains/Cargo.toml index f6a138d566538..e34ae2b32b36d 100644 --- a/bridges/primitives/parachains/Cargo.toml +++ b/bridges/primitives/parachains/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "bp-parachains" description = "Primitives of parachains module." -version = "0.7.0" +version = "0.21.0" authors.workspace = true edition.workspace = true license = "GPL-3.0-or-later WITH Classpath-exception-2.0" @@ -11,20 +11,16 @@ repository.workspace = true workspace = true [dependencies] +bp-header-chain.workspace = true +bp-polkadot-core.workspace = true +bp-runtime.workspace = true codec = { features = ["derive"], workspace = true } +frame-support.workspace = true impl-trait-for-tuples = { workspace = true } scale-info = { features = ["derive"], workspace = true } - -# Bridge dependencies -bp-header-chain = { workspace = true } -bp-polkadot-core = { workspace = true } -bp-runtime = { workspace = true } - -# Substrate dependencies -frame-support = { workspace = true } -sp-core = { workspace = true } -sp-runtime = { workspace = true } -sp-std = { workspace = true } +sp-core.workspace = true +sp-runtime.workspace = true +sp-std.workspace = true [features] default = ["std"] diff --git a/bridges/primitives/polkadot-core/Cargo.toml b/bridges/primitives/polkadot-core/Cargo.toml index 3a278d30e99c5..d90b7fb84e82c 100644 --- a/bridges/primitives/polkadot-core/Cargo.toml +++ b/bridges/primitives/polkadot-core/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "bp-polkadot-core" description = "Primitives of Polkadot-like runtime." -version = "0.7.0" +version = "0.21.0" authors.workspace = true edition.workspace = true license = "GPL-3.0-or-later WITH Classpath-exception-2.0" @@ -11,20 +11,16 @@ repository.workspace = true workspace = true [dependencies] +bp-messages.workspace = true +bp-runtime.workspace = true codec = { features = ["derive"], workspace = true } +frame-support.workspace = true +frame-system.workspace = true scale-info = { features = ["derive"], workspace = true } serde = { optional = true, features = ["derive"], workspace = true, default-features = true } - -# Bridge Dependencies -bp-messages = { workspace = true } -bp-runtime = { workspace = true } - -# Substrate Based Dependencies -frame-support = { workspace = true } -frame-system = { workspace = true } -sp-core = { workspace = true } -sp-runtime = { workspace = true } -sp-std = { workspace = true } +sp-core.workspace = true +sp-runtime.workspace = true +sp-std.workspace = true [dev-dependencies] hex = { workspace = true, default-features = true } diff --git a/bridges/primitives/relayers/Cargo.toml b/bridges/primitives/relayers/Cargo.toml index b3158d1a91606..c36e415b5464c 100644 --- a/bridges/primitives/relayers/Cargo.toml +++ b/bridges/primitives/relayers/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "bp-relayers" description = "Primitives of relayers module." -version = "0.7.0" +version = "0.21.0" authors.workspace = true edition.workspace = true license = "GPL-3.0-or-later WITH Classpath-exception-2.0" @@ -11,21 +11,17 @@ repository.workspace = true workspace = true [dependencies] +bp-header-chain.workspace = true +bp-messages.workspace = true +bp-parachains.workspace = true +bp-runtime.workspace = true codec = { features = ["bit-vec", "derive"], workspace = true } +frame-support.workspace = true +frame-system.workspace = true +pallet-utility.workspace = true scale-info = { features = ["bit-vec", "derive"], workspace = true } - -# Bridge Dependencies -bp-header-chain = { workspace = true } -bp-messages = { workspace = true } -bp-parachains = { workspace = true } -bp-runtime = { workspace = true } - -# Substrate Dependencies -frame-support = { workspace = true } -frame-system = { workspace = true } -pallet-utility = { workspace = true } -sp-runtime = { workspace = true } -sp-std = { workspace = true } +sp-runtime.workspace = true +sp-std.workspace = true [dev-dependencies] hex-literal = { workspace = true, default-features = true } diff --git a/bridges/primitives/runtime/Cargo.toml b/bridges/primitives/runtime/Cargo.toml index 7528f2e5d6caa..cee0e0565fed9 100644 --- a/bridges/primitives/runtime/Cargo.toml +++ b/bridges/primitives/runtime/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "bp-runtime" description = "Primitives that may be used at (bridges) runtime level." -version = "0.7.0" +version = "0.21.0" authors.workspace = true edition.workspace = true license = "GPL-3.0-or-later WITH Classpath-exception-2.0" @@ -12,22 +12,20 @@ workspace = true [dependencies] codec = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true hash-db = { workspace = true } impl-trait-for-tuples = { workspace = true } log = { workspace = true } num-traits = { workspace = true } scale-info = { features = ["derive"], workspace = true } serde = { features = ["alloc", "derive"], workspace = true } - -# Substrate Dependencies -frame-support = { workspace = true } -frame-system = { workspace = true } -sp-core = { workspace = true } -sp-io = { workspace = true } +sp-core.workspace = true +sp-io.workspace = true sp-runtime = { features = ["serde"], workspace = true } -sp-state-machine = { workspace = true } -sp-std = { workspace = true } -sp-trie = { workspace = true } +sp-state-machine.workspace = true +sp-std.workspace = true +sp-trie.workspace = true trie-db = { workspace = true } [dev-dependencies] diff --git a/bridges/primitives/test-utils/Cargo.toml b/bridges/primitives/test-utils/Cargo.toml index 5e6e389339353..6868d8d4342d6 100644 --- a/bridges/primitives/test-utils/Cargo.toml +++ b/bridges/primitives/test-utils/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bp-test-utils" -version = "0.7.0" +version = "0.21.0" description = "Utilities for testing substrate-based runtime bridge code" authors.workspace = true edition.workspace = true @@ -11,19 +11,19 @@ repository.workspace = true workspace = true [dependencies] -bp-header-chain = { workspace = true } -bp-parachains = { workspace = true } -bp-polkadot-core = { workspace = true } +bp-header-chain.workspace = true +bp-parachains.workspace = true +bp-polkadot-core.workspace = true bp-runtime = { features = ["test-helpers"], workspace = true } codec = { workspace = true } ed25519-dalek = { workspace = true } finality-grandpa = { workspace = true } -sp-application-crypto = { workspace = true } -sp-consensus-grandpa = { workspace = true } -sp-core = { workspace = true } -sp-runtime = { workspace = true } -sp-std = { workspace = true } -sp-trie = { workspace = true } +sp-application-crypto.workspace = true +sp-consensus-grandpa.workspace = true +sp-core.workspace = true +sp-runtime.workspace = true +sp-std.workspace = true +sp-trie.workspace = true [features] default = ["std"] diff --git a/bridges/primitives/xcm-bridge-hub-router/Cargo.toml b/bridges/primitives/xcm-bridge-hub-router/Cargo.toml index b8a21ec35024d..0e153e852d3a8 100644 --- a/bridges/primitives/xcm-bridge-hub-router/Cargo.toml +++ b/bridges/primitives/xcm-bridge-hub-router/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "bp-xcm-bridge-hub-router" description = "Primitives of the xcm-bridge-hub fee pallet." -version = "0.6.0" +version = "0.18.0" authors.workspace = true edition.workspace = true license = "GPL-3.0-or-later WITH Classpath-exception-2.0" @@ -13,13 +13,9 @@ workspace = true [dependencies] codec = { features = ["bit-vec", "derive"], workspace = true } scale-info = { features = ["bit-vec", "derive"], workspace = true } - -# Substrate Dependencies -sp-core = { workspace = true } -sp-runtime = { workspace = true } - -# Polkadot Dependencies -xcm = { workspace = true } +sp-core.workspace = true +sp-runtime.workspace = true +xcm.workspace = true [features] default = ["std"] diff --git a/bridges/primitives/xcm-bridge-hub/Cargo.toml b/bridges/primitives/xcm-bridge-hub/Cargo.toml index 800e2a3da3a3d..6a31addb1aae1 100644 --- a/bridges/primitives/xcm-bridge-hub/Cargo.toml +++ b/bridges/primitives/xcm-bridge-hub/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "bp-xcm-bridge-hub" description = "Primitives of the xcm-bridge-hub pallet." -version = "0.2.0" +version = "0.7.0" authors.workspace = true edition.workspace = true license = "GPL-3.0-or-later WITH Classpath-exception-2.0" @@ -11,22 +11,16 @@ repository.workspace = true workspace = true [dependencies] +bp-messages.workspace = true +bp-runtime.workspace = true codec = { features = ["derive"], workspace = true } +frame-support.workspace = true scale-info = { features = ["derive"], workspace = true } serde = { features = ["alloc", "derive"], workspace = true } - -# Bridge Dependencies -bp-messages = { workspace = true } -bp-runtime = { workspace = true } - -# Substrate Dependencies -frame-support = { workspace = true } -sp-core = { workspace = true } -sp-io = { workspace = true } -sp-std = { workspace = true } - -# Polkadot Dependencies -xcm = { workspace = true } +sp-core.workspace = true +sp-io.workspace = true +sp-std.workspace = true +xcm.workspace = true [features] default = ["std"] diff --git a/bridges/relays/client-substrate/Cargo.toml b/bridges/relays/client-substrate/Cargo.toml index 975ed5abb567c..5e24c1168029a 100644 --- a/bridges/relays/client-substrate/Cargo.toml +++ b/bridges/relays/client-substrate/Cargo.toml @@ -13,44 +13,57 @@ workspace = true [dependencies] async-std = { features = ["attributes"], workspace = true } async-trait = { workspace = true } +bp-header-chain.default-features = true +bp-header-chain.workspace = true +bp-messages.default-features = true +bp-messages.workspace = true +bp-polkadot-core.default-features = true +bp-polkadot-core.workspace = true +bp-runtime.default-features = true +bp-runtime.workspace = true codec = { workspace = true, default-features = true } +finality-relay.workspace = true +frame-support.default-features = true +frame-support.workspace = true futures = { workspace = true } jsonrpsee = { features = ["macros", "ws-client"], workspace = true } log = { workspace = true } num-traits = { workspace = true, default-features = true } +pallet-transaction-payment-rpc-runtime-api.default-features = true +pallet-transaction-payment-rpc-runtime-api.workspace = true +pallet-transaction-payment.default-features = true +pallet-transaction-payment.workspace = true +pallet-utility.default-features = true +pallet-utility.workspace = true quick_cache = { workspace = true } rand = { workspace = true, default-features = true } +relay-utils.workspace = true +sc-chain-spec.default-features = true +sc-chain-spec.workspace = true +sc-rpc-api.default-features = true +sc-rpc-api.workspace = true +sc-transaction-pool-api.default-features = true +sc-transaction-pool-api.workspace = true scale-info = { features = ["derive"], workspace = true, default-features = true } serde_json = { workspace = true } +sp-consensus-grandpa.default-features = true +sp-consensus-grandpa.workspace = true +sp-core.default-features = true +sp-core.workspace = true +sp-rpc.default-features = true +sp-rpc.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true +sp-std.default-features = true +sp-std.workspace = true +sp-trie.default-features = true +sp-trie.workspace = true +sp-version.default-features = true +sp-version.workspace = true thiserror = { workspace = true } tokio = { features = ["rt-multi-thread"], workspace = true, default-features = true } - -# Bridge dependencies -bp-header-chain = { workspace = true, default-features = true } -bp-messages = { workspace = true, default-features = true } -bp-polkadot-core = { workspace = true, default-features = true } -bp-runtime = { workspace = true, default-features = true } -finality-relay = { workspace = true } -relay-utils = { workspace = true } - -# Substrate Dependencies -frame-support = { workspace = true, default-features = true } -pallet-transaction-payment = { workspace = true, default-features = true } -pallet-transaction-payment-rpc-runtime-api = { workspace = true, default-features = true } -pallet-utility = { workspace = true, default-features = true } -sc-chain-spec = { workspace = true, default-features = true } -sc-rpc-api = { workspace = true, default-features = true } -sc-transaction-pool-api = { workspace = true, default-features = true } -sp-consensus-grandpa = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-rpc = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } -sp-std = { workspace = true, default-features = true } -sp-trie = { workspace = true, default-features = true } -sp-version = { workspace = true, default-features = true } - -# Polkadot Dependencies -xcm = { workspace = true, default-features = true } +xcm.default-features = true +xcm.workspace = true [features] default = [] diff --git a/bridges/relays/equivocation/Cargo.toml b/bridges/relays/equivocation/Cargo.toml index 91d12ba17d861..9c8c6fb90f821 100644 --- a/bridges/relays/equivocation/Cargo.toml +++ b/bridges/relays/equivocation/Cargo.toml @@ -14,9 +14,10 @@ workspace = true [dependencies] async-std = { features = ["attributes"], workspace = true } async-trait = { workspace = true } -bp-header-chain = { workspace = true, default-features = true } -finality-relay = { workspace = true } +bp-header-chain.default-features = true +bp-header-chain.workspace = true +finality-relay.workspace = true futures = { workspace = true } log = { workspace = true } num-traits = { workspace = true, default-features = true } -relay-utils = { workspace = true } +relay-utils.workspace = true diff --git a/bridges/relays/finality/Cargo.toml b/bridges/relays/finality/Cargo.toml index 06c4a5dcc43e0..a19afe3d220b8 100644 --- a/bridges/relays/finality/Cargo.toml +++ b/bridges/relays/finality/Cargo.toml @@ -15,11 +15,12 @@ workspace = true async-std = { workspace = true } async-trait = { workspace = true } backoff = { workspace = true } -bp-header-chain = { workspace = true, default-features = true } +bp-header-chain.default-features = true +bp-header-chain.workspace = true futures = { workspace = true } log = { workspace = true } num-traits = { workspace = true, default-features = true } -relay-utils = { workspace = true } +relay-utils.workspace = true [dev-dependencies] parking_lot = { workspace = true, default-features = true } diff --git a/bridges/relays/lib-substrate-relay/Cargo.toml b/bridges/relays/lib-substrate-relay/Cargo.toml index 74d7b4de44905..cc03c14400df1 100644 --- a/bridges/relays/lib-substrate-relay/Cargo.toml +++ b/bridges/relays/lib-substrate-relay/Cargo.toml @@ -14,46 +14,55 @@ workspace = true anyhow = { workspace = true } async-std = { workspace = true } async-trait = { workspace = true } +bp-header-chain.default-features = true +bp-header-chain.workspace = true +bp-messages.default-features = true +bp-messages.workspace = true +bp-parachains.default-features = true +bp-parachains.workspace = true +bp-polkadot-core.default-features = true +bp-polkadot-core.workspace = true +bp-relayers.default-features = true +bp-relayers.workspace = true +bp-runtime.default-features = true +bp-runtime.workspace = true clap = { workspace = true, features = ["derive"] } codec = { workspace = true, default-features = true } +equivocation-detector.workspace = true +finality-relay.workspace = true +frame-support.default-features = true +frame-support.workspace = true +frame-system.default-features = true +frame-system.workspace = true futures = { workspace = true } hex = { workspace = true, default-features = true } log = { workspace = true } +messages-relay.workspace = true num-traits = { workspace = true, default-features = true } +pallet-balances.default-features = true +pallet-balances.workspace = true +pallet-bridge-grandpa.default-features = true +pallet-bridge-grandpa.workspace = true +pallet-bridge-messages.default-features = true +pallet-bridge-messages.workspace = true +pallet-bridge-parachains.default-features = true +pallet-bridge-parachains.workspace = true +pallet-grandpa.default-features = true +pallet-grandpa.workspace = true +parachains-relay.workspace = true rbtag = { workspace = true } +relay-substrate-client.workspace = true +relay-utils.workspace = true +sp-consensus-grandpa.default-features = true +sp-consensus-grandpa.workspace = true +sp-core.default-features = true +sp-core.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true +sp-trie.workspace = true strum = { features = ["derive"], workspace = true, default-features = true } thiserror = { workspace = true } -# Bridge dependencies -bp-header-chain = { workspace = true, default-features = true } -bp-parachains = { workspace = true, default-features = true } -bp-polkadot-core = { workspace = true, default-features = true } -bp-relayers = { workspace = true, default-features = true } - -equivocation-detector = { workspace = true } -finality-relay = { workspace = true } -messages-relay = { workspace = true } -parachains-relay = { workspace = true } -relay-substrate-client = { workspace = true } -relay-utils = { workspace = true } - -pallet-bridge-grandpa = { workspace = true, default-features = true } -pallet-bridge-messages = { workspace = true, default-features = true } -pallet-bridge-parachains = { workspace = true, default-features = true } - -bp-messages = { workspace = true, default-features = true } -bp-runtime = { workspace = true, default-features = true } - -# Substrate Dependencies -frame-support = { workspace = true, default-features = true } -frame-system = { workspace = true, default-features = true } -pallet-balances = { workspace = true, default-features = true } -pallet-grandpa = { workspace = true, default-features = true } -sp-consensus-grandpa = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } -sp-trie = { workspace = true } - [dev-dependencies] relay-substrate-client = { features = ["test-helpers"], workspace = true } scale-info = { features = ["derive"], workspace = true } diff --git a/bridges/relays/messages/Cargo.toml b/bridges/relays/messages/Cargo.toml index 94a020822f405..41bdd062e4253 100644 --- a/bridges/relays/messages/Cargo.toml +++ b/bridges/relays/messages/Cargo.toml @@ -13,18 +13,17 @@ workspace = true [dependencies] async-std = { features = ["attributes"], workspace = true } async-trait = { workspace = true } +bp-messages.default-features = true +bp-messages.workspace = true +finality-relay.workspace = true futures = { workspace = true } hex = { workspace = true, default-features = true } log = { workspace = true } num-traits = { workspace = true, default-features = true } parking_lot = { workspace = true, default-features = true } - -# Bridge Dependencies -bp-messages = { workspace = true, default-features = true } -finality-relay = { workspace = true } -relay-utils = { workspace = true } - -sp-arithmetic = { workspace = true, default-features = true } +relay-utils.workspace = true +sp-arithmetic.default-features = true +sp-arithmetic.workspace = true [dev-dependencies] -sp-core = { workspace = true } +sp-core = { workspace = true, default-features = false } diff --git a/bridges/relays/parachains/Cargo.toml b/bridges/relays/parachains/Cargo.toml index 62c588738cac9..07841cfb90b97 100644 --- a/bridges/relays/parachains/Cargo.toml +++ b/bridges/relays/parachains/Cargo.toml @@ -13,14 +13,13 @@ workspace = true [dependencies] async-std = { workspace = true } async-trait = { workspace = true } +bp-polkadot-core.default-features = true +bp-polkadot-core.workspace = true futures = { workspace = true } log = { workspace = true } -relay-utils = { workspace = true } - -# Bridge dependencies -bp-polkadot-core = { workspace = true, default-features = true } -relay-substrate-client = { workspace = true } +relay-substrate-client.workspace = true +relay-utils.workspace = true [dev-dependencies] relay-substrate-client = { features = ["test-helpers"], workspace = true } -sp-core = { workspace = true, default-features = true } +sp-core = { default-features = true, workspace = true } diff --git a/bridges/relays/utils/Cargo.toml b/bridges/relays/utils/Cargo.toml index b30910b4c1214..58cf57b28adff 100644 --- a/bridges/relays/utils/Cargo.toml +++ b/bridges/relays/utils/Cargo.toml @@ -15,22 +15,22 @@ anyhow = { workspace = true, default-features = true } async-std = { workspace = true } async-trait = { workspace = true } backoff = { workspace = true } +bp-runtime.default-features = true +bp-runtime.workspace = true futures = { workspace = true } isahc = { workspace = true } jsonpath_lib = { workspace = true } log = { workspace = true } num-traits = { workspace = true, default-features = true } parking_lot = { workspace = true, default-features = true } +prometheus-endpoint.default-features = true +prometheus-endpoint.workspace = true serde_json = { workspace = true, default-features = true } -sp-tracing = { workspace = true, default-features = true } +sp-runtime.default-features = true +sp-runtime.workspace = true +sp-tracing.default-features = true +sp-tracing.workspace = true sysinfo = { workspace = true } thiserror = { workspace = true } time = { features = ["formatting", "local-offset", "std"], workspace = true } tokio = { features = ["rt"], workspace = true, default-features = true } - -# Bridge dependencies -bp-runtime = { workspace = true, default-features = true } - -# Substrate dependencies -prometheus-endpoint = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } diff --git a/bridges/snowbridge/pallets/ethereum-client/Cargo.toml b/bridges/snowbridge/pallets/ethereum-client/Cargo.toml index cae796835f268..4558e4bcfa93a 100644 --- a/bridges/snowbridge/pallets/ethereum-client/Cargo.toml +++ b/bridges/snowbridge/pallets/ethereum-client/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "snowbridge-pallet-ethereum-client" description = "Snowbridge Ethereum Client Pallet" -version = "0.2.0" +version = "0.14.0" authors = ["Snowfork "] edition.workspace = true repository.workspace = true @@ -19,35 +19,33 @@ exclude-from-umbrella = true [dependencies] codec = { features = ["derive"], workspace = true } +frame-benchmarking = { optional = true, workspace = true } +frame-support.workspace = true +frame-system.workspace = true hex-literal = { optional = true, workspace = true, default-features = true } log = { workspace = true } +pallet-timestamp = { optional = true, workspace = true } scale-info = { features = ["derive"], workspace = true } serde = { optional = true, workspace = true, default-features = true } serde_json = { optional = true, workspace = true, default-features = true } - -frame-benchmarking = { optional = true, workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } -sp-core = { workspace = true } -sp-io = { optional = true, workspace = true } -sp-runtime = { workspace = true } -sp-std = { workspace = true } - -pallet-timestamp = { optional = true, workspace = true } -snowbridge-beacon-primitives = { workspace = true } -snowbridge-core = { workspace = true } -snowbridge-ethereum = { workspace = true } +snowbridge-beacon-primitives.workspace = true +snowbridge-core.workspace = true +snowbridge-ethereum.workspace = true snowbridge-pallet-ethereum-client-fixtures = { optional = true, workspace = true } -snowbridge-verification-primitives = { workspace = true } +snowbridge-verification-primitives.workspace = true +sp-core.workspace = true +sp-io = { optional = true, workspace = true } +sp-runtime.workspace = true +sp-std.workspace = true static_assertions = { workspace = true } [dev-dependencies] hex-literal = { workspace = true, default-features = true } -pallet-timestamp = { workspace = true, default-features = true } +pallet-timestamp = { default-features = true, workspace = true } serde = { workspace = true, default-features = true } serde_json = { workspace = true, default-features = true } -snowbridge-pallet-ethereum-client-fixtures = { workspace = true, default-features = true } -sp-io = { workspace = true, default-features = true } +snowbridge-pallet-ethereum-client-fixtures = { default-features = true, workspace = true } +sp-io = { default-features = true, workspace = true } [features] default = ["std"] diff --git a/bridges/snowbridge/pallets/ethereum-client/fixtures/Cargo.toml b/bridges/snowbridge/pallets/ethereum-client/fixtures/Cargo.toml index 75be05249f3f1..abb1294f266aa 100644 --- a/bridges/snowbridge/pallets/ethereum-client/fixtures/Cargo.toml +++ b/bridges/snowbridge/pallets/ethereum-client/fixtures/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "snowbridge-pallet-ethereum-client-fixtures" description = "Snowbridge Ethereum Client Test Fixtures" -version = "0.9.0" +version = "0.22.0" authors = ["Snowfork "] edition.workspace = true repository.workspace = true @@ -19,10 +19,10 @@ exclude-from-umbrella = true [dependencies] hex-literal = { workspace = true, default-features = true } -snowbridge-beacon-primitives = { workspace = true } -snowbridge-verification-primitives = { workspace = true } -sp-core = { workspace = true } -sp-std = { workspace = true } +snowbridge-beacon-primitives.workspace = true +snowbridge-verification-primitives.workspace = true +sp-core.workspace = true +sp-std.workspace = true [features] default = ["std"] diff --git a/bridges/snowbridge/pallets/inbound-queue-v2/Cargo.toml b/bridges/snowbridge/pallets/inbound-queue-v2/Cargo.toml index b8f398689c753..359524ee98319 100644 --- a/bridges/snowbridge/pallets/inbound-queue-v2/Cargo.toml +++ b/bridges/snowbridge/pallets/inbound-queue-v2/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "snowbridge-pallet-inbound-queue-v2" description = "Snowbridge Inbound Queue Pallet V2" -version = "0.2.0" +version = "0.3.0" authors = ["Snowfork "] edition.workspace = true repository.workspace = true @@ -19,37 +19,33 @@ exclude-from-umbrella = true [dependencies] alloy-core = { workspace = true, features = ["sol-types"] } +bp-relayers.workspace = true codec = { features = ["derive"], workspace = true } +frame-benchmarking = { optional = true, workspace = true } +frame-support.workspace = true +frame-system.workspace = true log = { workspace = true } +pallet-balances.workspace = true scale-info = { features = ["derive"], workspace = true } serde = { optional = true, workspace = true, default-features = true } -tracing = { workspace = true } - -frame-benchmarking = { optional = true, workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } -pallet-balances = { workspace = true } -sp-core = { workspace = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } -sp-std = { workspace = true } - -xcm = { workspace = true } -xcm-builder = { workspace = true } -xcm-executor = { workspace = true } - -snowbridge-beacon-primitives = { workspace = true } -snowbridge-core = { workspace = true } -snowbridge-inbound-queue-primitives = { workspace = true } +snowbridge-beacon-primitives.workspace = true +snowbridge-core.workspace = true +snowbridge-inbound-queue-primitives.workspace = true snowbridge-pallet-inbound-queue-v2-fixtures = { optional = true, workspace = true } - -bp-relayers = { workspace = true } +sp-core.workspace = true +sp-io.workspace = true +sp-runtime.workspace = true +sp-std.workspace = true +tracing = { workspace = true } +xcm-builder.workspace = true +xcm-executor.workspace = true +xcm.workspace = true [dev-dependencies] -frame-benchmarking = { workspace = true, default-features = true } +frame-benchmarking = { default-features = true, workspace = true } hex-literal = { workspace = true, default-features = true } snowbridge-test-utils = { workspace = true } -sp-keyring = { workspace = true, default-features = true } +sp-keyring = { default-features = true, workspace = true } [features] default = ["std"] diff --git a/bridges/snowbridge/pallets/inbound-queue-v2/fixtures/Cargo.toml b/bridges/snowbridge/pallets/inbound-queue-v2/fixtures/Cargo.toml index 0ad7af6ead5b7..208e6745bbd2e 100644 --- a/bridges/snowbridge/pallets/inbound-queue-v2/fixtures/Cargo.toml +++ b/bridges/snowbridge/pallets/inbound-queue-v2/fixtures/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "snowbridge-pallet-inbound-queue-v2-fixtures" description = "Snowbridge Inbound Queue Test Fixtures V2" -version = "0.10.0" +version = "0.3.0" authors = ["Snowfork "] edition.workspace = true repository.workspace = true @@ -19,11 +19,11 @@ exclude-from-umbrella = true [dependencies] hex-literal = { workspace = true, default-features = true } -snowbridge-beacon-primitives = { workspace = true } -snowbridge-core = { workspace = true } -snowbridge-inbound-queue-primitives = { workspace = true } -sp-core = { workspace = true } -sp-std = { workspace = true } +snowbridge-beacon-primitives.workspace = true +snowbridge-core.workspace = true +snowbridge-inbound-queue-primitives.workspace = true +sp-core.workspace = true +sp-std.workspace = true [features] default = ["std"] diff --git a/bridges/snowbridge/pallets/inbound-queue/Cargo.toml b/bridges/snowbridge/pallets/inbound-queue/Cargo.toml index 518027d0b1c38..e01a42cdcbe89 100644 --- a/bridges/snowbridge/pallets/inbound-queue/Cargo.toml +++ b/bridges/snowbridge/pallets/inbound-queue/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "snowbridge-pallet-inbound-queue" description = "Snowbridge Inbound Queue Pallet" -version = "0.2.0" +version = "0.14.0" authors = ["Snowfork "] edition.workspace = true repository.workspace = true @@ -20,32 +20,29 @@ exclude-from-umbrella = true [dependencies] alloy-core = { workspace = true, features = ["sol-types"] } codec = { features = ["derive"], workspace = true } +frame-benchmarking = { optional = true, workspace = true } +frame-support.workspace = true +frame-system.workspace = true log = { workspace = true } +pallet-balances.workspace = true scale-info = { features = ["derive"], workspace = true } serde = { optional = true, workspace = true, default-features = true } - -frame-benchmarking = { optional = true, workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } -pallet-balances = { workspace = true } -sp-core = { workspace = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } -sp-std = { workspace = true } - -xcm = { workspace = true } -xcm-executor = { workspace = true } - -snowbridge-beacon-primitives = { workspace = true } -snowbridge-core = { workspace = true } -snowbridge-inbound-queue-primitives = { workspace = true } +snowbridge-beacon-primitives.workspace = true +snowbridge-core.workspace = true +snowbridge-inbound-queue-primitives.workspace = true snowbridge-pallet-inbound-queue-fixtures = { optional = true, workspace = true } +sp-core.workspace = true +sp-io.workspace = true +sp-runtime.workspace = true +sp-std.workspace = true +xcm-executor.workspace = true +xcm.workspace = true [dev-dependencies] -frame-benchmarking = { workspace = true, default-features = true } +frame-benchmarking = { default-features = true, workspace = true } hex-literal = { workspace = true, default-features = true } -snowbridge-pallet-ethereum-client = { workspace = true, default-features = true } -sp-keyring = { workspace = true, default-features = true } +snowbridge-pallet-ethereum-client = { default-features = true, workspace = true } +sp-keyring = { default-features = true, workspace = true } [features] default = ["std"] diff --git a/bridges/snowbridge/pallets/inbound-queue/fixtures/Cargo.toml b/bridges/snowbridge/pallets/inbound-queue/fixtures/Cargo.toml index 72d53a96aba82..cfd67ccfb4967 100644 --- a/bridges/snowbridge/pallets/inbound-queue/fixtures/Cargo.toml +++ b/bridges/snowbridge/pallets/inbound-queue/fixtures/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "snowbridge-pallet-inbound-queue-fixtures" description = "Snowbridge Inbound Queue Test Fixtures" -version = "0.10.0" +version = "0.22.0" authors = ["Snowfork "] edition.workspace = true repository.workspace = true @@ -19,11 +19,11 @@ exclude-from-umbrella = true [dependencies] hex-literal = { workspace = true, default-features = true } -snowbridge-beacon-primitives = { workspace = true } -snowbridge-core = { workspace = true } -snowbridge-inbound-queue-primitives = { workspace = true } -sp-core = { workspace = true } -sp-std = { workspace = true } +snowbridge-beacon-primitives.workspace = true +snowbridge-core.workspace = true +snowbridge-inbound-queue-primitives.workspace = true +sp-core.workspace = true +sp-std.workspace = true [features] default = ["std"] diff --git a/bridges/snowbridge/pallets/outbound-queue-v2/Cargo.toml b/bridges/snowbridge/pallets/outbound-queue-v2/Cargo.toml index 6c80638c41724..95a7a8fab7908 100644 --- a/bridges/snowbridge/pallets/outbound-queue-v2/Cargo.toml +++ b/bridges/snowbridge/pallets/outbound-queue-v2/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "snowbridge-pallet-outbound-queue-v2" description = "Snowbridge Outbound Queue Pallet V2" -version = "0.2.0" +version = "0.3.0" authors = ["Snowfork "] edition.workspace = true repository.workspace = true @@ -19,36 +19,32 @@ exclude-from-umbrella = true [dependencies] alloy-core = { workspace = true, features = ["sol-types"] } +bp-relayers.workspace = true +bridge-hub-common.workspace = true codec = { features = ["derive"], workspace = true } ethabi = { workspace = true } +frame-benchmarking = { optional = true, workspace = true } +frame-support.workspace = true +frame-system.workspace = true hex-literal = { workspace = true, default-features = true } scale-info = { features = ["derive"], workspace = true } serde = { features = ["alloc", "derive"], workspace = true } - -frame-benchmarking = { optional = true, workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } -sp-arithmetic = { workspace = true } -sp-core = { workspace = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } -sp-std = { workspace = true } - -bp-relayers = { workspace = true } -bridge-hub-common = { workspace = true } - -snowbridge-beacon-primitives = { workspace = true } -snowbridge-core = { workspace = true } -snowbridge-merkle-tree = { workspace = true } -snowbridge-outbound-queue-primitives = { workspace = true } -snowbridge-verification-primitives = { workspace = true } - -xcm = { workspace = true } -xcm-builder = { workspace = true } -xcm-executor = { workspace = true } +snowbridge-beacon-primitives.workspace = true +snowbridge-core.workspace = true +snowbridge-merkle-tree.workspace = true +snowbridge-outbound-queue-primitives.workspace = true +snowbridge-verification-primitives.workspace = true +sp-arithmetic.workspace = true +sp-core.workspace = true +sp-io.workspace = true +sp-runtime.workspace = true +sp-std.workspace = true +xcm-builder.workspace = true +xcm-executor.workspace = true +xcm.workspace = true [dev-dependencies] -pallet-message-queue = { workspace = true } +pallet-message-queue = { workspace = true, default-features = false } snowbridge-test-utils = { workspace = true } [features] diff --git a/bridges/snowbridge/pallets/outbound-queue-v2/runtime-api/Cargo.toml b/bridges/snowbridge/pallets/outbound-queue-v2/runtime-api/Cargo.toml index 3af9926fb31e5..fc1ac21604cf5 100644 --- a/bridges/snowbridge/pallets/outbound-queue-v2/runtime-api/Cargo.toml +++ b/bridges/snowbridge/pallets/outbound-queue-v2/runtime-api/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "snowbridge-outbound-queue-v2-runtime-api" description = "Snowbridge Outbound Queue Runtime API V2" -version = "0.2.0" +version = "0.3.0" authors = ["Snowfork "] edition.workspace = true repository.workspace = true @@ -19,11 +19,11 @@ exclude-from-umbrella = true [dependencies] codec = { features = ["derive"], workspace = true } -frame-support = { workspace = true } +frame-support.workspace = true scale-info = { features = ["derive"], workspace = true } -snowbridge-merkle-tree = { workspace = true } -sp-api = { workspace = true } -sp-std = { workspace = true } +snowbridge-merkle-tree.workspace = true +sp-api.workspace = true +sp-std.workspace = true [features] default = ["std"] diff --git a/bridges/snowbridge/pallets/outbound-queue/Cargo.toml b/bridges/snowbridge/pallets/outbound-queue/Cargo.toml index bfd187c61d0ae..3a1f6b8411fd5 100644 --- a/bridges/snowbridge/pallets/outbound-queue/Cargo.toml +++ b/bridges/snowbridge/pallets/outbound-queue/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "snowbridge-pallet-outbound-queue" description = "Snowbridge Outbound Queue Pallet" -version = "0.2.0" +version = "0.14.0" authors = ["Snowfork "] edition.workspace = true repository.workspace = true @@ -18,28 +18,26 @@ targets = ["x86_64-unknown-linux-gnu"] exclude-from-umbrella = true [dependencies] +bridge-hub-common.workspace = true codec = { features = ["derive"], workspace = true } +frame-benchmarking = { optional = true, workspace = true } +frame-support.workspace = true +frame-system.workspace = true scale-info = { features = ["derive"], workspace = true } serde = { features = ["alloc", "derive"], workspace = true } - -frame-benchmarking = { optional = true, workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } -sp-arithmetic = { workspace = true } -sp-core = { workspace = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } -sp-std = { workspace = true } - -bridge-hub-common = { workspace = true } +sp-arithmetic.workspace = true +sp-core.workspace = true +sp-io.workspace = true +sp-runtime.workspace = true +sp-std.workspace = true ethabi = { workspace = true } -snowbridge-core = { workspace = true } -snowbridge-merkle-tree = { workspace = true } -snowbridge-outbound-queue-primitives = { workspace = true } +snowbridge-core.workspace = true +snowbridge-merkle-tree.workspace = true +snowbridge-outbound-queue-primitives.workspace = true [dev-dependencies] -pallet-message-queue = { workspace = true } +pallet-message-queue = { workspace = true, default-features = false } [features] default = ["std"] diff --git a/bridges/snowbridge/pallets/outbound-queue/runtime-api/Cargo.toml b/bridges/snowbridge/pallets/outbound-queue/runtime-api/Cargo.toml index fc937e19b8b57..2aefd18decc1a 100644 --- a/bridges/snowbridge/pallets/outbound-queue/runtime-api/Cargo.toml +++ b/bridges/snowbridge/pallets/outbound-queue/runtime-api/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "snowbridge-outbound-queue-runtime-api" description = "Snowbridge Outbound Queue Runtime API" -version = "0.2.0" +version = "0.14.0" authors = ["Snowfork "] edition.workspace = true repository.workspace = true @@ -19,12 +19,12 @@ exclude-from-umbrella = true [dependencies] codec = { features = ["derive"], workspace = true } -frame-support = { workspace = true } -snowbridge-core = { workspace = true } -snowbridge-merkle-tree = { workspace = true } -snowbridge-outbound-queue-primitives = { workspace = true } -sp-api = { workspace = true } -sp-std = { workspace = true } +frame-support.workspace = true +snowbridge-core.workspace = true +snowbridge-merkle-tree.workspace = true +snowbridge-outbound-queue-primitives.workspace = true +sp-api.workspace = true +sp-std.workspace = true [features] default = ["std"] diff --git a/bridges/snowbridge/pallets/system-frontend/Cargo.toml b/bridges/snowbridge/pallets/system-frontend/Cargo.toml index 7c10065611470..43738b52230b9 100644 --- a/bridges/snowbridge/pallets/system-frontend/Cargo.toml +++ b/bridges/snowbridge/pallets/system-frontend/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "snowbridge-pallet-system-frontend" description = "Snowbridge System Frontend Pallet" -version = "0.2.0" +version = "0.3.0" authors = ["Snowfork "] edition.workspace = true repository.workspace = true @@ -20,24 +20,24 @@ exclude-from-umbrella = true [dependencies] codec = { features = ["derive"], workspace = true } frame-benchmarking = { optional = true, workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true log = { workspace = true } -pallet-asset-conversion = { workspace = true } +pallet-asset-conversion.workspace = true scale-info = { features = ["derive"], workspace = true } -snowbridge-core = { workspace = true } -sp-core = { workspace = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } -sp-std = { workspace = true } +snowbridge-core.workspace = true +sp-core.workspace = true +sp-io.workspace = true +sp-runtime.workspace = true +sp-std.workspace = true tracing = { workspace = true } -xcm = { workspace = true } -xcm-executor = { workspace = true } +xcm-executor.workspace = true +xcm.workspace = true [dev-dependencies] -pallet-balances = { workspace = true, default-features = true } +pallet-balances = { default-features = true, workspace = true } snowbridge-test-utils = { workspace = true } -sp-keyring = { workspace = true } +sp-keyring = { workspace = true, default-features = false } [features] default = ["std"] diff --git a/bridges/snowbridge/pallets/system-v2/Cargo.toml b/bridges/snowbridge/pallets/system-v2/Cargo.toml index 6255941f9c072..22517a10eb50b 100644 --- a/bridges/snowbridge/pallets/system-v2/Cargo.toml +++ b/bridges/snowbridge/pallets/system-v2/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "snowbridge-pallet-system-v2" description = "Snowbridge System Pallet V2" -version = "0.2.0" +version = "0.3.0" authors = ["Snowfork "] edition.workspace = true repository.workspace = true @@ -20,30 +20,27 @@ exclude-from-umbrella = true [dependencies] codec = { features = ["derive"], workspace = true } frame-benchmarking = { optional = true, workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true log = { workspace = true } scale-info = { features = ["derive"], workspace = true } - -sp-core = { workspace = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } -sp-std = { workspace = true } - -xcm = { workspace = true } -xcm-executor = { workspace = true } - -snowbridge-core = { workspace = true } -snowbridge-outbound-queue-primitives = { workspace = true } -snowbridge-pallet-system = { workspace = true } +snowbridge-core.workspace = true +snowbridge-outbound-queue-primitives.workspace = true +snowbridge-pallet-system.workspace = true +sp-core.workspace = true +sp-io.workspace = true +sp-runtime.workspace = true +sp-std.workspace = true +xcm-executor.workspace = true +xcm.workspace = true tracing = { workspace = true } [dev-dependencies] hex-literal = { workspace = true, default-features = true } -pallet-balances = { workspace = true, default-features = true } +pallet-balances = { default-features = true, workspace = true } snowbridge-test-utils = { workspace = true } -sp-keyring = { workspace = true, default-features = true } +sp-keyring = { default-features = true, workspace = true } [features] default = ["std"] diff --git a/bridges/snowbridge/pallets/system-v2/runtime-api/Cargo.toml b/bridges/snowbridge/pallets/system-v2/runtime-api/Cargo.toml index f33fb70fddb0a..fcad439b02cdd 100644 --- a/bridges/snowbridge/pallets/system-v2/runtime-api/Cargo.toml +++ b/bridges/snowbridge/pallets/system-v2/runtime-api/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "snowbridge-system-v2-runtime-api" description = "Snowbridge System Runtime API V2" -version = "0.2.0" +version = "0.3.0" authors = ["Snowfork "] edition.workspace = true repository.workspace = true @@ -19,10 +19,10 @@ exclude-from-umbrella = true [dependencies] codec = { features = ["derive"], workspace = true } -snowbridge-core = { workspace = true } -sp-api = { workspace = true } -sp-std = { workspace = true } -xcm = { workspace = true } +snowbridge-core.workspace = true +sp-api.workspace = true +sp-std.workspace = true +xcm.workspace = true [features] default = ["std"] diff --git a/bridges/snowbridge/pallets/system/Cargo.toml b/bridges/snowbridge/pallets/system/Cargo.toml index 14057c020ff27..a4b4c61dde693 100644 --- a/bridges/snowbridge/pallets/system/Cargo.toml +++ b/bridges/snowbridge/pallets/system/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "snowbridge-pallet-system" description = "Snowbridge System Pallet" -version = "0.2.0" +version = "0.14.0" authors = ["Snowfork "] edition.workspace = true repository.workspace = true @@ -20,29 +20,26 @@ exclude-from-umbrella = true [dependencies] codec = { features = ["derive"], workspace = true } frame-benchmarking = { optional = true, workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true log = { workspace = true } scale-info = { features = ["derive"], workspace = true } - -sp-core = { workspace = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } -sp-std = { workspace = true } - -xcm = { workspace = true } -xcm-executor = { workspace = true } - -snowbridge-core = { workspace = true } -snowbridge-outbound-queue-primitives = { workspace = true } +snowbridge-core.workspace = true +snowbridge-outbound-queue-primitives.workspace = true +sp-core.workspace = true +sp-io.workspace = true +sp-runtime.workspace = true +sp-std.workspace = true +xcm-executor.workspace = true +xcm.workspace = true [dev-dependencies] hex = { workspace = true, default-features = true } hex-literal = { workspace = true, default-features = true } -pallet-balances = { workspace = true, default-features = true } -pallet-message-queue = { workspace = true, default-features = true } -polkadot-primitives = { workspace = true, default-features = true } -snowbridge-pallet-outbound-queue = { workspace = true, default-features = true } +pallet-balances = { default-features = true, workspace = true } +pallet-message-queue = { default-features = true, workspace = true } +polkadot-primitives = { default-features = true, workspace = true } +snowbridge-pallet-outbound-queue = { default-features = true, workspace = true } [features] default = ["std"] diff --git a/bridges/snowbridge/pallets/system/runtime-api/Cargo.toml b/bridges/snowbridge/pallets/system/runtime-api/Cargo.toml index 7a5d6f7223bf8..98b0107de71ea 100644 --- a/bridges/snowbridge/pallets/system/runtime-api/Cargo.toml +++ b/bridges/snowbridge/pallets/system/runtime-api/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "snowbridge-system-runtime-api" description = "Snowbridge System Runtime API" -version = "0.2.0" +version = "0.14.0" authors = ["Snowfork "] edition.workspace = true repository.workspace = true @@ -19,10 +19,10 @@ exclude-from-umbrella = true [dependencies] codec = { features = ["derive"], workspace = true } -snowbridge-core = { workspace = true } -sp-api = { workspace = true } -sp-std = { workspace = true } -xcm = { workspace = true } +snowbridge-core.workspace = true +sp-api.workspace = true +sp-std.workspace = true +xcm.workspace = true [features] default = ["std"] diff --git a/bridges/snowbridge/primitives/beacon/Cargo.toml b/bridges/snowbridge/primitives/beacon/Cargo.toml index aecad856d9fe0..eadc6ec5675ec 100644 --- a/bridges/snowbridge/primitives/beacon/Cargo.toml +++ b/bridges/snowbridge/primitives/beacon/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "snowbridge-beacon-primitives" description = "Snowbridge Beacon Primitives" -version = "0.2.0" +version = "0.14.0" authors = ["Snowfork "] edition.workspace = true repository.workspace = true @@ -16,23 +16,22 @@ exclude-from-umbrella = true [dependencies] codec = { workspace = true } +frame-support.workspace = true hex = { workspace = true } rlp = { workspace = true } scale-info = { features = ["derive"], workspace = true } serde = { optional = true, features = ["derive"], workspace = true, default-features = true } - -frame-support = { workspace = true } -sp-core = { workspace = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } -sp-std = { workspace = true } +sp-core.workspace = true +sp-io.workspace = true +sp-runtime.workspace = true +sp-std.workspace = true byte-slice-cast = { workspace = true } ssz_rs = { workspace = true } ssz_rs_derive = { workspace = true } milagro-bls = { workspace = true } -snowbridge-ethereum = { workspace = true } +snowbridge-ethereum.workspace = true [dev-dependencies] hex-literal = { workspace = true, default-features = true } diff --git a/bridges/snowbridge/primitives/core/Cargo.toml b/bridges/snowbridge/primitives/core/Cargo.toml index dce837723b562..b086af198bdfa 100644 --- a/bridges/snowbridge/primitives/core/Cargo.toml +++ b/bridges/snowbridge/primitives/core/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "snowbridge-core" description = "Snowbridge Core" -version = "0.2.0" +version = "0.14.0" authors = ["Snowfork "] edition.workspace = true repository.workspace = true @@ -15,26 +15,23 @@ workspace = true exclude-from-umbrella = true [dependencies] +bp-relayers.workspace = true codec = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true hex-literal = { workspace = true, default-features = true } log = { workspace = true } +polkadot-parachain-primitives.workspace = true scale-info = { features = ["derive"], workspace = true } serde = { optional = true, features = ["alloc", "derive"], workspace = true } - -polkadot-parachain-primitives = { workspace = true } -xcm = { workspace = true } -xcm-builder = { workspace = true } - -frame-support = { workspace = true } -frame-system = { workspace = true } -sp-arithmetic = { workspace = true } -sp-core = { workspace = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } -sp-std = { workspace = true } -xcm-executor = { workspace = true } - -bp-relayers = { workspace = true } +sp-arithmetic.workspace = true +sp-core.workspace = true +sp-io.workspace = true +sp-runtime.workspace = true +sp-std.workspace = true +xcm-builder.workspace = true +xcm-executor.workspace = true +xcm.workspace = true [features] default = ["std"] diff --git a/bridges/snowbridge/primitives/ethereum/Cargo.toml b/bridges/snowbridge/primitives/ethereum/Cargo.toml index 2130a1716a54c..58e849ba681b3 100644 --- a/bridges/snowbridge/primitives/ethereum/Cargo.toml +++ b/bridges/snowbridge/primitives/ethereum/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "snowbridge-ethereum" description = "Snowbridge Ethereum" -version = "0.3.0" +version = "0.13.0" authors = ["Snowfork "] edition.workspace = true repository.workspace = true @@ -24,10 +24,9 @@ rlp = { workspace = true } scale-info = { features = ["derive"], workspace = true } serde = { optional = true, features = ["derive"], workspace = true, default-features = true } serde-big-array = { optional = true, features = ["const-generics"], workspace = true } - -sp-io = { workspace = true } -sp-runtime = { workspace = true } -sp-std = { workspace = true } +sp-io.workspace = true +sp-runtime.workspace = true +sp-std.workspace = true ethabi = { workspace = true } diff --git a/bridges/snowbridge/primitives/inbound-queue/Cargo.toml b/bridges/snowbridge/primitives/inbound-queue/Cargo.toml index 22b69793f58ff..3e36331435f79 100644 --- a/bridges/snowbridge/primitives/inbound-queue/Cargo.toml +++ b/bridges/snowbridge/primitives/inbound-queue/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "snowbridge-inbound-queue-primitives" description = "Snowbridge Inbound Queue Primitives" -version = "0.9.0" +version = "0.3.0" authors = ["Snowfork "] edition.workspace = true repository.workspace = true @@ -17,23 +17,20 @@ exclude-from-umbrella = true [dependencies] alloy-core = { workspace = true, features = ["sol-types"] } codec = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true log = { workspace = true } scale-info = { features = ["derive"], workspace = true } - -frame-support = { workspace = true } -frame-system = { workspace = true } -sp-core = { workspace = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } -sp-std = { workspace = true } - -xcm = { workspace = true } -xcm-builder = { workspace = true } -xcm-executor = { workspace = true } - -snowbridge-beacon-primitives = { workspace = true } -snowbridge-core = { workspace = true } -snowbridge-verification-primitives = { workspace = true } +snowbridge-beacon-primitives.workspace = true +snowbridge-core.workspace = true +snowbridge-verification-primitives.workspace = true +sp-core.workspace = true +sp-io.workspace = true +sp-runtime.workspace = true +sp-std.workspace = true +xcm-builder.workspace = true +xcm-executor.workspace = true +xcm.workspace = true hex-literal = { workspace = true, default-features = true } diff --git a/bridges/snowbridge/primitives/merkle-tree/Cargo.toml b/bridges/snowbridge/primitives/merkle-tree/Cargo.toml index efb3d268fd937..c9c3cc2821349 100644 --- a/bridges/snowbridge/primitives/merkle-tree/Cargo.toml +++ b/bridges/snowbridge/primitives/merkle-tree/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "snowbridge-merkle-tree" description = "Snowbridge Merkle Tree" -version = "0.2.0" +version = "0.3.0" authors = ["Snowfork "] edition.workspace = true repository.workspace = true @@ -17,15 +17,15 @@ exclude-from-umbrella = true [dependencies] codec = { workspace = true } scale-info = { features = ["derive"], workspace = true } -sp-core = { workspace = true } -sp-runtime = { workspace = true } +sp-core.workspace = true +sp-runtime.workspace = true [dev-dependencies] array-bytes = { workspace = true, default-features = true } hex = { workspace = true, default-features = true } hex-literal = { workspace = true, default-features = true } -sp-crypto-hashing = { workspace = true, default-features = true } -sp-tracing = { workspace = true, default-features = true } +sp-crypto-hashing = { default-features = true, workspace = true } +sp-tracing = { default-features = true, workspace = true } [features] default = ["std"] diff --git a/bridges/snowbridge/primitives/outbound-queue/Cargo.toml b/bridges/snowbridge/primitives/outbound-queue/Cargo.toml index 130921417b308..c1b211d7fdaf6 100644 --- a/bridges/snowbridge/primitives/outbound-queue/Cargo.toml +++ b/bridges/snowbridge/primitives/outbound-queue/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "snowbridge-outbound-queue-primitives" description = "Snowbridge Outbound Queue Primitives" -version = "0.2.0" +version = "0.3.0" authors = ["Snowfork "] edition.workspace = true repository.workspace = true @@ -16,28 +16,25 @@ exclude-from-umbrella = true [dependencies] codec = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true hex-literal = { workspace = true, default-features = true } log = { workspace = true } +polkadot-parachain-primitives.workspace = true scale-info = { features = ["derive"], workspace = true } - -polkadot-parachain-primitives = { workspace = true } -xcm = { workspace = true } -xcm-builder = { workspace = true } -xcm-executor = { workspace = true } - -frame-support = { workspace = true } -frame-system = { workspace = true } -sp-arithmetic = { workspace = true } -sp-core = { workspace = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } -sp-std = { workspace = true } +sp-arithmetic.workspace = true +sp-core.workspace = true +sp-io.workspace = true +sp-runtime.workspace = true +sp-std.workspace = true +xcm-builder.workspace = true +xcm-executor.workspace = true +xcm.workspace = true alloy-core = { workspace = true, features = ["sol-types"] } ethabi = { workspace = true } - -snowbridge-core = { workspace = true } -snowbridge-verification-primitives = { workspace = true } +snowbridge-core.workspace = true +snowbridge-verification-primitives.workspace = true [features] default = ["std"] diff --git a/bridges/snowbridge/primitives/verification/Cargo.toml b/bridges/snowbridge/primitives/verification/Cargo.toml index bf162e9ac9be0..b5408966ceaa3 100644 --- a/bridges/snowbridge/primitives/verification/Cargo.toml +++ b/bridges/snowbridge/primitives/verification/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "snowbridge-verification-primitives" description = "Snowbridge Verification Primitives" -version = "0.2.0" +version = "0.3.0" authors = ["Snowfork "] edition.workspace = true repository.workspace = true @@ -16,11 +16,11 @@ exclude-from-umbrella = true [dependencies] codec = { workspace = true } -frame-support = { workspace = true } +frame-support.workspace = true scale-info = { features = ["derive"], workspace = true } -snowbridge-beacon-primitives = { workspace = true } -sp-core = { workspace = true } -sp-std = { workspace = true } +snowbridge-beacon-primitives.workspace = true +sp-core.workspace = true +sp-std.workspace = true [features] default = ["std"] diff --git a/bridges/snowbridge/runtime/runtime-common/Cargo.toml b/bridges/snowbridge/runtime/runtime-common/Cargo.toml index 121fba6664555..8b46e8224f5b6 100644 --- a/bridges/snowbridge/runtime/runtime-common/Cargo.toml +++ b/bridges/snowbridge/runtime/runtime-common/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "snowbridge-runtime-common" description = "Snowbridge Runtime Common" -version = "0.2.0" +version = "0.14.0" authors = ["Snowfork "] edition.workspace = true repository.workspace = true @@ -16,17 +16,17 @@ exclude-from-umbrella = true [dependencies] codec = { workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true log = { workspace = true } -pallet-xcm = { workspace = true } -snowbridge-core = { workspace = true } -snowbridge-outbound-queue-primitives = { workspace = true } -sp-arithmetic = { workspace = true } -sp-std = { workspace = true } -xcm = { workspace = true } -xcm-builder = { workspace = true } -xcm-executor = { workspace = true } +pallet-xcm.workspace = true +snowbridge-core.workspace = true +snowbridge-outbound-queue-primitives.workspace = true +sp-arithmetic.workspace = true +sp-std.workspace = true +xcm-builder.workspace = true +xcm-executor.workspace = true +xcm.workspace = true [dev-dependencies] diff --git a/bridges/snowbridge/runtime/test-common/Cargo.toml b/bridges/snowbridge/runtime/test-common/Cargo.toml index a4fd7c9562938..a0efaa124d4a7 100644 --- a/bridges/snowbridge/runtime/test-common/Cargo.toml +++ b/bridges/snowbridge/runtime/test-common/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "snowbridge-runtime-test-common" description = "Snowbridge Runtime Tests" -version = "0.2.0" +version = "0.16.0" authors = ["Snowfork "] edition.workspace = true license = "Apache-2.0" @@ -17,37 +17,30 @@ exclude-from-umbrella = true [dependencies] codec = { features = ["derive"], workspace = true } - -# Substrate -frame-support = { workspace = true } -frame-system = { workspace = true } -pallet-balances = { workspace = true } -pallet-message-queue = { workspace = true } -pallet-session = { workspace = true } -pallet-timestamp = { workspace = true } -pallet-utility = { workspace = true } -sp-core = { workspace = true } -sp-io = { workspace = true } -sp-keyring = { workspace = true, default-features = true } -sp-runtime = { workspace = true } - -# Polkadot -pallet-xcm = { workspace = true } -xcm = { workspace = true } -xcm-executor = { workspace = true } - -# Cumulus -cumulus-pallet-parachain-system = { workspace = true } -pallet-collator-selection = { workspace = true } -parachain-info = { workspace = true } -parachains-runtimes-test-utils = { workspace = true } - -# Ethereum Bridge (Snowbridge) -snowbridge-core = { workspace = true } -snowbridge-pallet-ethereum-client = { workspace = true } -snowbridge-pallet-ethereum-client-fixtures = { workspace = true } -snowbridge-pallet-outbound-queue = { workspace = true } -snowbridge-pallet-system = { workspace = true } +cumulus-pallet-parachain-system.workspace = true +frame-support.workspace = true +frame-system.workspace = true +pallet-balances.workspace = true +pallet-collator-selection.workspace = true +pallet-message-queue.workspace = true +pallet-session.workspace = true +pallet-timestamp.workspace = true +pallet-utility.workspace = true +pallet-xcm.workspace = true +parachain-info.workspace = true +parachains-runtimes-test-utils.workspace = true +snowbridge-core.workspace = true +snowbridge-pallet-ethereum-client-fixtures.workspace = true +snowbridge-pallet-ethereum-client.workspace = true +snowbridge-pallet-outbound-queue.workspace = true +snowbridge-pallet-system.workspace = true +sp-core.workspace = true +sp-io.workspace = true +sp-keyring.default-features = true +sp-keyring.workspace = true +sp-runtime.workspace = true +xcm-executor.workspace = true +xcm.workspace = true [features] default = ["std"] diff --git a/bridges/snowbridge/test-utils/Cargo.toml b/bridges/snowbridge/test-utils/Cargo.toml index 3e0c35a2df4e1..ebaa3e1faee71 100644 --- a/bridges/snowbridge/test-utils/Cargo.toml +++ b/bridges/snowbridge/test-utils/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "snowbridge-test-utils" description = "Snowbridge test utilities" -version = "0.1.0" +version = "0.3.0" authors = ["Snowfork "] edition.workspace = true repository.workspace = true @@ -15,21 +15,32 @@ workspace = true exclude-from-umbrella = true [dependencies] -bp-relayers = { workspace = true, default-features = true } +bp-relayers.default-features = true +bp-relayers.workspace = true codec = { workspace = true, default-features = true } frame-benchmarking = { optional = true, workspace = true, default-features = true } -frame-support = { workspace = true, default-features = true } -frame-system = { workspace = true, default-features = true } +frame-support.default-features = true +frame-support.workspace = true +frame-system.default-features = true +frame-system.workspace = true log = { workspace = true, default-features = true } -pallet-asset-conversion = { workspace = true, default-features = true } -pallet-xcm = { workspace = true, default-features = true } +pallet-asset-conversion.default-features = true +pallet-asset-conversion.workspace = true +pallet-xcm.default-features = true +pallet-xcm.workspace = true scale-info = { features = ["derive"], workspace = true, default-features = true } -snowbridge-core = { workspace = true, default-features = true } -snowbridge-outbound-queue-primitives = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -xcm = { workspace = true, default-features = true } -xcm-builder = { workspace = true, default-features = true } -xcm-executor = { workspace = true, default-features = true } +snowbridge-core.default-features = true +snowbridge-core.workspace = true +snowbridge-outbound-queue-primitives.default-features = true +snowbridge-outbound-queue-primitives.workspace = true +sp-core.default-features = true +sp-core.workspace = true +xcm-builder.default-features = true +xcm-builder.workspace = true +xcm-executor.default-features = true +xcm-executor.workspace = true +xcm.default-features = true +xcm.workspace = true [features] runtime-benchmarks = [ diff --git a/cumulus/bin/pov-validator/Cargo.toml b/cumulus/bin/pov-validator/Cargo.toml index 6b59339c5fda3..77550013b85eb 100644 --- a/cumulus/bin/pov-validator/Cargo.toml +++ b/cumulus/bin/pov-validator/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cumulus-pov-validator" -version = "0.1.0" +version = "0.6.0" authors.workspace = true edition.workspace = true repository.workspace = true @@ -15,12 +15,12 @@ workspace = true anyhow = { workspace = true } clap = { workspace = true, features = ["derive"] } codec = { workspace = true } -polkadot-node-primitives = { workspace = true } -polkadot-parachain-primitives = { workspace = true } -polkadot-primitives = { workspace = true } -sc-executor = { workspace = true } -sp-core = { workspace = true } -sp-io = { workspace = true } -sp-maybe-compressed-blob = { workspace = true } +polkadot-node-primitives.workspace = true +polkadot-parachain-primitives.workspace = true +polkadot-primitives.workspace = true +sc-executor.workspace = true +sp-core.workspace = true +sp-io.workspace = true +sp-maybe-compressed-blob.workspace = true tracing = { workspace = true } tracing-subscriber = { workspace = true } diff --git a/cumulus/client/bootnodes/Cargo.toml b/cumulus/client/bootnodes/Cargo.toml index 48bc0484b0dff..1b6e83f420855 100644 --- a/cumulus/client/bootnodes/Cargo.toml +++ b/cumulus/client/bootnodes/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cumulus-client-bootnodes" -version = "0.1.0" +version = "0.2.0" authors.workspace = true edition.workspace = true description = "Parachain bootnodes registration and discovery." @@ -19,24 +19,26 @@ prost-build = { workspace = true } array-bytes = { workspace = true, default-features = true } async-channel = { workspace = true } codec = { workspace = true, default-features = true } +cumulus-client-network.default-features = true +cumulus-client-network.workspace = true +cumulus-primitives-core.default-features = true +cumulus-primitives-core.workspace = true +cumulus-relay-chain-interface.default-features = true +cumulus-relay-chain-interface.workspace = true futures = { workspace = true, default-features = true } hex = { workspace = true, default-features = true } ip_network = { workspace = true } log = { workspace = true, default-features = true } num-traits = { workspace = true, default-features = true } +parachains-common.default-features = true +parachains-common.workspace = true prost = { workspace = true } +sc-network.default-features = true +sc-network.workspace = true +sc-service.default-features = true +sc-service.workspace = true +sp-consensus-babe.default-features = true +sp-consensus-babe.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true tokio = { workspace = true, default-features = true } - -# Substrate -sc-network = { workspace = true, default-features = true } -sc-service = { workspace = true, default-features = true } -sp-consensus-babe = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } - -# Polkadot - -# Cumulus -cumulus-client-network = { workspace = true, default-features = true } -cumulus-primitives-core = { workspace = true, default-features = true } -cumulus-relay-chain-interface = { workspace = true, default-features = true } -parachains-common = { workspace = true, default-features = true } diff --git a/cumulus/client/cli/Cargo.toml b/cumulus/client/cli/Cargo.toml index f59a5f9f778df..0c597764bd74a 100644 --- a/cumulus/client/cli/Cargo.toml +++ b/cumulus/client/cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cumulus-client-cli" -version = "0.7.0" +version = "0.24.0" authors.workspace = true edition.workspace = true description = "Parachain node CLI utilities." @@ -14,13 +14,18 @@ workspace = true [dependencies] clap = { features = ["derive"], workspace = true } codec = { workspace = true, default-features = true } +sc-chain-spec.default-features = true +sc-chain-spec.workspace = true +sc-cli.default-features = false +sc-cli.workspace = true +sc-client-api.default-features = true +sc-client-api.workspace = true +sc-service.default-features = false +sc-service.workspace = true +sp-blockchain.default-features = true +sp-blockchain.workspace = true +sp-core.default-features = true +sp-core.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true url = { workspace = true } - -# Substrate -sc-chain-spec = { workspace = true, default-features = true } -sc-cli = { workspace = true, default-features = false } -sc-client-api = { workspace = true, default-features = true } -sc-service = { workspace = true, default-features = false } -sp-blockchain = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } diff --git a/cumulus/client/collator/Cargo.toml b/cumulus/client/collator/Cargo.toml index ff591c2d6e3ac..a4d82a1792d23 100644 --- a/cumulus/client/collator/Cargo.toml +++ b/cumulus/client/collator/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cumulus-client-collator" -version = "0.7.0" +version = "0.24.0" authors.workspace = true edition.workspace = true description = "Common node-side functionality and glue code to collate parachain blocks." @@ -13,40 +13,46 @@ workspace = true [dependencies] codec = { features = ["derive"], workspace = true, default-features = true } +cumulus-client-consensus-common.default-features = true +cumulus-client-consensus-common.workspace = true +cumulus-client-network.default-features = true +cumulus-client-network.workspace = true +cumulus-primitives-core.default-features = true +cumulus-primitives-core.workspace = true futures = { workspace = true } parking_lot = { workspace = true, default-features = true } +polkadot-node-primitives.default-features = true +polkadot-node-primitives.workspace = true +polkadot-node-subsystem.default-features = true +polkadot-node-subsystem.workspace = true +polkadot-overseer.default-features = true +polkadot-overseer.workspace = true +polkadot-primitives.default-features = true +polkadot-primitives.workspace = true +sc-client-api.default-features = true +sc-client-api.workspace = true +sp-api.default-features = true +sp-api.workspace = true +sp-consensus.default-features = true +sp-consensus.workspace = true +sp-core.default-features = true +sp-core.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true tracing = { workspace = true, default-features = true } -# Substrate -sc-client-api = { workspace = true, default-features = true } -sp-api = { workspace = true, default-features = true } -sp-consensus = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } - -# Polkadot -polkadot-node-primitives = { workspace = true, default-features = true } -polkadot-node-subsystem = { workspace = true, default-features = true } -polkadot-overseer = { workspace = true, default-features = true } -polkadot-primitives = { workspace = true, default-features = true } - -# Cumulus -cumulus-client-consensus-common = { workspace = true, default-features = true } -cumulus-client-network = { workspace = true, default-features = true } -cumulus-primitives-core = { workspace = true, default-features = true } - [dev-dependencies] async-trait = { workspace = true } # Substrate -sp-maybe-compressed-blob = { workspace = true, default-features = true } -sp-state-machine = { workspace = true, default-features = true } -sp-tracing = { workspace = true, default-features = true } +sp-maybe-compressed-blob = { default-features = true, workspace = true } +sp-state-machine = { default-features = true, workspace = true } +sp-tracing = { default-features = true, workspace = true } # Polkadot polkadot-node-subsystem-test-helpers = { workspace = true } # Cumulus cumulus-test-client = { workspace = true } -cumulus-test-relay-sproof-builder = { workspace = true, default-features = true } +cumulus-test-relay-sproof-builder = { default-features = true, workspace = true } cumulus-test-runtime = { workspace = true } diff --git a/cumulus/client/consensus/aura/Cargo.toml b/cumulus/client/consensus/aura/Cargo.toml index 8dca303ffebdb..3de485e345aeb 100644 --- a/cumulus/client/consensus/aura/Cargo.toml +++ b/cumulus/client/consensus/aura/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "cumulus-client-consensus-aura" description = "AURA consensus algorithm for parachains" -version = "0.7.0" +version = "0.24.0" authors.workspace = true edition.workspace = true license = "GPL-3.0-or-later WITH Classpath-exception-2.0" @@ -14,55 +14,82 @@ workspace = true [dependencies] async-trait = { workspace = true } codec = { features = ["derive"], workspace = true, default-features = true } +cumulus-client-collator.default-features = true +cumulus-client-collator.workspace = true +cumulus-client-consensus-common.default-features = true +cumulus-client-consensus-common.workspace = true +cumulus-client-consensus-proposer.default-features = true +cumulus-client-consensus-proposer.workspace = true +cumulus-client-parachain-inherent.default-features = true +cumulus-client-parachain-inherent.workspace = true +cumulus-primitives-aura.default-features = true +cumulus-primitives-aura.workspace = true +cumulus-primitives-core.default-features = true +cumulus-primitives-core.workspace = true +cumulus-relay-chain-interface.default-features = true +cumulus-relay-chain-interface.workspace = true futures = { workspace = true } parking_lot = { workspace = true } +polkadot-node-primitives.default-features = true +polkadot-node-primitives.workspace = true +polkadot-node-subsystem-util.default-features = true +polkadot-node-subsystem-util.workspace = true +polkadot-node-subsystem.default-features = true +polkadot-node-subsystem.workspace = true +polkadot-overseer.default-features = true +polkadot-overseer.workspace = true +polkadot-primitives.default-features = true +polkadot-primitives.workspace = true +prometheus-endpoint.default-features = true +prometheus-endpoint.workspace = true +sc-client-api.default-features = true +sc-client-api.workspace = true +sc-consensus-aura.default-features = true +sc-consensus-aura.workspace = true +sc-consensus-babe.default-features = true +sc-consensus-babe.workspace = true +sc-consensus-slots.default-features = true +sc-consensus-slots.workspace = true +sc-consensus.default-features = true +sc-consensus.workspace = true +sc-telemetry.default-features = true +sc-telemetry.workspace = true +sc-utils.default-features = true +sc-utils.workspace = true schnellru = { workspace = true } +sp-api.default-features = true +sp-api.workspace = true +sp-application-crypto.default-features = true +sp-application-crypto.workspace = true +sp-block-builder.default-features = true +sp-block-builder.workspace = true +sp-blockchain.default-features = true +sp-blockchain.workspace = true +sp-consensus-aura.default-features = true +sp-consensus-aura.workspace = true +sp-consensus.default-features = true +sp-consensus.workspace = true +sp-core.default-features = true +sp-core.workspace = true +sp-inherents.default-features = true +sp-inherents.workspace = true +sp-keystore.default-features = true +sp-keystore.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true +sp-state-machine.default-features = true +sp-state-machine.workspace = true +sp-timestamp.default-features = true +sp-timestamp.workspace = true +sp-trie.default-features = true +sp-trie.workspace = true tokio = { workspace = true, features = ["macros"] } tracing = { workspace = true, default-features = true } -# Substrate -prometheus-endpoint = { workspace = true, default-features = true } -sc-client-api = { workspace = true, default-features = true } -sc-consensus = { workspace = true, default-features = true } -sc-consensus-aura = { workspace = true, default-features = true } -sc-consensus-babe = { workspace = true, default-features = true } -sc-consensus-slots = { workspace = true, default-features = true } -sc-telemetry = { workspace = true, default-features = true } -sc-utils = { workspace = true, default-features = true } -sp-api = { workspace = true, default-features = true } -sp-application-crypto = { workspace = true, default-features = true } -sp-block-builder = { workspace = true, default-features = true } -sp-blockchain = { workspace = true, default-features = true } -sp-consensus = { workspace = true, default-features = true } -sp-consensus-aura = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-inherents = { workspace = true, default-features = true } -sp-keystore = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } -sp-state-machine = { workspace = true, default-features = true } -sp-timestamp = { workspace = true, default-features = true } -sp-trie = { workspace = true, default-features = true } - -# Cumulus -cumulus-client-collator = { workspace = true, default-features = true } -cumulus-client-consensus-common = { workspace = true, default-features = true } -cumulus-client-consensus-proposer = { workspace = true, default-features = true } -cumulus-client-parachain-inherent = { workspace = true, default-features = true } -cumulus-primitives-aura = { workspace = true, default-features = true } -cumulus-primitives-core = { workspace = true, default-features = true } -cumulus-relay-chain-interface = { workspace = true, default-features = true } - -# Polkadot -polkadot-node-primitives = { workspace = true, default-features = true } -polkadot-node-subsystem = { workspace = true, default-features = true } -polkadot-node-subsystem-util = { workspace = true, default-features = true } -polkadot-overseer = { workspace = true, default-features = true } -polkadot-primitives = { workspace = true, default-features = true } - [dev-dependencies] cumulus-test-client = { workspace = true } -cumulus-test-relay-sproof-builder = { workspace = true } +cumulus-test-relay-sproof-builder = { workspace = true, default-features = false } rstest = { workspace = true } -sp-keyring = { workspace = true } -sp-tracing = { workspace = true } -sp-version = { workspace = true } +sp-keyring = { workspace = true, default-features = false } +sp-tracing = { workspace = true, default-features = false } +sp-version = { workspace = true, default-features = false } diff --git a/cumulus/client/consensus/common/Cargo.toml b/cumulus/client/consensus/common/Cargo.toml index 1615215abfa73..194bd16f91326 100644 --- a/cumulus/client/consensus/common/Cargo.toml +++ b/cumulus/client/consensus/common/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "cumulus-client-consensus-common" description = "Cumulus specific common consensus implementations" -version = "0.7.0" +version = "0.24.0" authors.workspace = true edition.workspace = true license = "GPL-3.0-or-later WITH Classpath-exception-2.0" @@ -14,42 +14,54 @@ workspace = true [dependencies] async-trait = { workspace = true } codec = { features = ["derive"], workspace = true, default-features = true } +cumulus-client-pov-recovery.default-features = true +cumulus-client-pov-recovery.workspace = true +cumulus-primitives-core.default-features = true +cumulus-primitives-core.workspace = true +cumulus-relay-chain-interface.default-features = true +cumulus-relay-chain-interface.workspace = true +cumulus-relay-chain-streams.default-features = true +cumulus-relay-chain-streams.workspace = true dyn-clone = { workspace = true } futures = { workspace = true } log = { workspace = true, default-features = true } -tracing = { workspace = true, default-features = true } - -# Substrate -prometheus-endpoint = { workspace = true, default-features = true } -sc-client-api = { workspace = true, default-features = true } -sc-consensus = { workspace = true, default-features = true } -sc-consensus-babe = { workspace = true, default-features = true } -sc-network = { workspace = true, default-features = true } -sp-blockchain = { workspace = true, default-features = true } -sp-consensus = { workspace = true, default-features = true } -sp-consensus-slots = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } -sp-timestamp = { workspace = true, default-features = true } -sp-trie = { workspace = true, default-features = true } -sp-version = { workspace = true, default-features = true } - -# Polkadot -polkadot-primitives = { workspace = true, default-features = true } - -# Cumulus -cumulus-client-pov-recovery = { workspace = true, default-features = true } -cumulus-primitives-core = { workspace = true, default-features = true } -cumulus-relay-chain-interface = { workspace = true, default-features = true } -cumulus-relay-chain-streams = { workspace = true, default-features = true } +polkadot-primitives.default-features = true +polkadot-primitives.workspace = true +prometheus-endpoint.default-features = true +prometheus-endpoint.workspace = true +sc-client-api.default-features = true +sc-client-api.workspace = true +sc-consensus-babe.default-features = true +sc-consensus-babe.workspace = true +sc-consensus.default-features = true +sc-consensus.workspace = true +sc-network.default-features = true +sc-network.workspace = true schnellru = { workspace = true } +sp-blockchain.default-features = true +sp-blockchain.workspace = true +sp-consensus-slots.default-features = true +sp-consensus-slots.workspace = true +sp-consensus.default-features = true +sp-consensus.workspace = true +sp-core.default-features = true +sp-core.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true +sp-timestamp.default-features = true +sp-timestamp.workspace = true +sp-trie.default-features = true +sp-trie.workspace = true +sp-version.default-features = true +sp-version.workspace = true +tracing = { workspace = true, default-features = true } [dev-dependencies] futures-timer = { workspace = true } # Substrate -sp-tracing = { workspace = true, default-features = true } +sp-tracing = { default-features = true, workspace = true } # Cumulus cumulus-test-client = { workspace = true } -cumulus-test-relay-sproof-builder = { workspace = true, default-features = true } +cumulus-test-relay-sproof-builder = { default-features = true, workspace = true } diff --git a/cumulus/client/consensus/proposer/Cargo.toml b/cumulus/client/consensus/proposer/Cargo.toml index e391481bc4452..45d8ce97f2cf6 100644 --- a/cumulus/client/consensus/proposer/Cargo.toml +++ b/cumulus/client/consensus/proposer/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "cumulus-client-consensus-proposer" description = "A Substrate `Proposer` for building parachain blocks" -version = "0.7.0" +version = "0.20.0" authors.workspace = true edition.workspace = true license = "GPL-3.0-or-later WITH Classpath-exception-2.0" @@ -14,13 +14,14 @@ workspace = true [dependencies] anyhow = { workspace = true, default-features = true } async-trait = { workspace = true } +cumulus-primitives-parachain-inherent.default-features = true +cumulus-primitives-parachain-inherent.workspace = true +sp-consensus.default-features = true +sp-consensus.workspace = true +sp-inherents.default-features = true +sp-inherents.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true +sp-state-machine.default-features = true +sp-state-machine.workspace = true thiserror = { workspace = true } - -# Substrate -sp-consensus = { workspace = true, default-features = true } -sp-inherents = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } -sp-state-machine = { workspace = true, default-features = true } - -# Cumulus -cumulus-primitives-parachain-inherent = { workspace = true, default-features = true } diff --git a/cumulus/client/consensus/relay-chain/Cargo.toml b/cumulus/client/consensus/relay-chain/Cargo.toml index fdc343dc65dec..5d4b550a6b4cd 100644 --- a/cumulus/client/consensus/relay-chain/Cargo.toml +++ b/cumulus/client/consensus/relay-chain/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "cumulus-client-consensus-relay-chain" description = "The relay-chain provided consensus algorithm" -version = "0.7.0" +version = "0.24.0" authors.workspace = true edition.workspace = true license = "GPL-3.0-or-later WITH Classpath-exception-2.0" @@ -13,22 +13,30 @@ workspace = true [dependencies] async-trait = { workspace = true } +cumulus-client-consensus-common.default-features = true +cumulus-client-consensus-common.workspace = true +cumulus-primitives-core.default-features = true +cumulus-primitives-core.workspace = true +cumulus-relay-chain-interface.default-features = true +cumulus-relay-chain-interface.workspace = true futures = { workspace = true } parking_lot = { workspace = true, default-features = true } +prometheus-endpoint.default-features = true +prometheus-endpoint.workspace = true +sc-consensus.default-features = true +sc-consensus.workspace = true +sp-api.default-features = true +sp-api.workspace = true +sp-block-builder.default-features = true +sp-block-builder.workspace = true +sp-blockchain.default-features = true +sp-blockchain.workspace = true +sp-consensus.default-features = true +sp-consensus.workspace = true +sp-core.default-features = true +sp-core.workspace = true +sp-inherents.default-features = true +sp-inherents.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true tracing = { workspace = true, default-features = true } - -# Substrate -prometheus-endpoint = { workspace = true, default-features = true } -sc-consensus = { workspace = true, default-features = true } -sp-api = { workspace = true, default-features = true } -sp-block-builder = { workspace = true, default-features = true } -sp-blockchain = { workspace = true, default-features = true } -sp-consensus = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-inherents = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } - -# Cumulus -cumulus-client-consensus-common = { workspace = true, default-features = true } -cumulus-primitives-core = { workspace = true, default-features = true } -cumulus-relay-chain-interface = { workspace = true, default-features = true } diff --git a/cumulus/client/network/Cargo.toml b/cumulus/client/network/Cargo.toml index d82eaa2a91bbf..66e3011a6fa73 100644 --- a/cumulus/client/network/Cargo.toml +++ b/cumulus/client/network/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cumulus-client-network" -version = "0.7.0" +version = "0.24.0" authors.workspace = true description = "Cumulus-specific networking protocol" edition.workspace = true @@ -14,46 +14,54 @@ workspace = true [dependencies] async-trait = { workspace = true } codec = { features = ["derive"], workspace = true, default-features = true } +cumulus-relay-chain-interface.default-features = true +cumulus-relay-chain-interface.workspace = true futures = { workspace = true } futures-timer = { workspace = true } parking_lot = { workspace = true, default-features = true } +polkadot-node-primitives.default-features = true +polkadot-node-primitives.workspace = true +polkadot-node-subsystem.default-features = true +polkadot-node-subsystem.workspace = true +polkadot-parachain-primitives.default-features = true +polkadot-parachain-primitives.workspace = true +polkadot-primitives.default-features = true +polkadot-primitives.workspace = true +sc-client-api.default-features = true +sc-client-api.workspace = true +sc-network.default-features = true +sc-network.workspace = true +sp-api.default-features = true +sp-api.workspace = true +sp-blockchain.default-features = true +sp-blockchain.workspace = true +sp-consensus.default-features = true +sp-consensus.workspace = true +sp-core.default-features = true +sp-core.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true +sp-state-machine.default-features = true +sp-state-machine.workspace = true +sp-version.default-features = true +sp-version.workspace = true tracing = { workspace = true, default-features = true } -# Substrate -sc-client-api = { workspace = true, default-features = true } -sc-network = { workspace = true, default-features = true } -sp-api = { workspace = true, default-features = true } -sp-blockchain = { workspace = true, default-features = true } -sp-consensus = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } -sp-state-machine = { workspace = true, default-features = true } -sp-version = { workspace = true, default-features = true } - -# Polkadot -polkadot-node-primitives = { workspace = true, default-features = true } -polkadot-node-subsystem = { workspace = true, default-features = true } -polkadot-parachain-primitives = { workspace = true, default-features = true } -polkadot-primitives = { workspace = true, default-features = true } - -# Cumulus -cumulus-relay-chain-interface = { workspace = true, default-features = true } - [dev-dependencies] rstest = { workspace = true } tokio = { features = ["macros"], workspace = true, default-features = true } # Substrate -sc-client-api = { workspace = true, default-features = true } -sp-consensus = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-keyring = { workspace = true, default-features = true } -sp-keystore = { workspace = true, default-features = true } +sc-client-api = { default-features = true, workspace = true } +sp-consensus = { default-features = true, workspace = true } +sp-core = { default-features = true, workspace = true } +sp-keyring = { default-features = true, workspace = true } +sp-keystore = { default-features = true, workspace = true } # Polkadot polkadot-test-client = { workspace = true } # Cumulus -cumulus-primitives-core = { workspace = true, default-features = true } -cumulus-relay-chain-inprocess-interface = { workspace = true, default-features = true } +cumulus-primitives-core = { default-features = true, workspace = true } +cumulus-relay-chain-inprocess-interface = { default-features = true, workspace = true } cumulus-test-service = { workspace = true } diff --git a/cumulus/client/parachain-inherent/Cargo.toml b/cumulus/client/parachain-inherent/Cargo.toml index d2897ab354fa7..3f5299f29b16e 100644 --- a/cumulus/client/parachain-inherent/Cargo.toml +++ b/cumulus/client/parachain-inherent/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cumulus-client-parachain-inherent" -version = "0.1.0" +version = "0.18.0" authors.workspace = true edition.workspace = true description = "Inherent that needs to be present in every parachain block. Contains messages and a relay chain storage-proof." @@ -11,19 +11,26 @@ repository.workspace = true [dependencies] async-trait = { workspace = true } codec = { features = ["derive"], workspace = true, default-features = true } +cumulus-primitives-core.default-features = true +cumulus-primitives-core.workspace = true +cumulus-primitives-parachain-inherent.default-features = true +cumulus-primitives-parachain-inherent.workspace = true +cumulus-relay-chain-interface.default-features = true +cumulus-relay-chain-interface.workspace = true +cumulus-test-relay-sproof-builder.default-features = true +cumulus-test-relay-sproof-builder.workspace = true +sc-client-api.default-features = true +sc-client-api.workspace = true +sc-consensus-babe.default-features = true +sc-consensus-babe.workspace = true +sp-crypto-hashing.default-features = true +sp-crypto-hashing.workspace = true +sp-inherents.default-features = true +sp-inherents.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true +sp-state-machine.default-features = true +sp-state-machine.workspace = true +sp-storage.default-features = true +sp-storage.workspace = true tracing = { workspace = true, default-features = true } - -# Substrate -sc-client-api = { workspace = true, default-features = true } -sc-consensus-babe = { workspace = true, default-features = true } -sp-crypto-hashing = { workspace = true, default-features = true } -sp-inherents = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } -sp-state-machine = { workspace = true, default-features = true } -sp-storage = { workspace = true, default-features = true } - -# Cumulus -cumulus-primitives-core = { workspace = true, default-features = true } -cumulus-primitives-parachain-inherent = { workspace = true, default-features = true } -cumulus-relay-chain-interface = { workspace = true, default-features = true } -cumulus-test-relay-sproof-builder = { workspace = true, default-features = true } diff --git a/cumulus/client/pov-recovery/Cargo.toml b/cumulus/client/pov-recovery/Cargo.toml index d0534fc7a6add..6400037e3b8a2 100644 --- a/cumulus/client/pov-recovery/Cargo.toml +++ b/cumulus/client/pov-recovery/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cumulus-client-pov-recovery" -version = "0.7.0" +version = "0.24.0" authors.workspace = true description = "Parachain PoV recovery" edition.workspace = true @@ -15,41 +15,52 @@ workspace = true codec = { features = ["derive"], workspace = true, default-features = true } futures = { workspace = true } futures-timer = { workspace = true } +polkadot-node-primitives.default-features = true +polkadot-node-primitives.workspace = true +polkadot-node-subsystem.default-features = true +polkadot-node-subsystem.workspace = true +polkadot-overseer.default-features = true +polkadot-overseer.workspace = true +polkadot-primitives.default-features = true +polkadot-primitives.workspace = true rand = { workspace = true, default-features = true } +sc-client-api.default-features = true +sc-client-api.workspace = true +sc-consensus.default-features = true +sc-consensus.workspace = true +sc-network.default-features = true +sc-network.workspace = true +sp-api.default-features = true +sp-api.workspace = true +sp-consensus.default-features = true +sp-consensus.workspace = true +sp-maybe-compressed-blob.default-features = true +sp-maybe-compressed-blob.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true +sp-version.default-features = true +sp-version.workspace = true tracing = { workspace = true, default-features = true } -# Substrate -sc-client-api = { workspace = true, default-features = true } -sc-consensus = { workspace = true, default-features = true } -sc-network = { workspace = true, default-features = true } -sp-api = { workspace = true, default-features = true } -sp-consensus = { workspace = true, default-features = true } -sp-maybe-compressed-blob = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } -sp-version = { workspace = true, default-features = true } - -# Polkadot -polkadot-node-primitives = { workspace = true, default-features = true } -polkadot-node-subsystem = { workspace = true, default-features = true } -polkadot-overseer = { workspace = true, default-features = true } -polkadot-primitives = { workspace = true, default-features = true } - # Cumulus async-trait = { workspace = true } -cumulus-primitives-core = { workspace = true, default-features = true } -cumulus-relay-chain-interface = { workspace = true, default-features = true } -cumulus-relay-chain-streams = { workspace = true, default-features = true } +cumulus-primitives-core.default-features = true +cumulus-primitives-core.workspace = true +cumulus-relay-chain-interface.default-features = true +cumulus-relay-chain-interface.workspace = true +cumulus-relay-chain-streams.default-features = true +cumulus-relay-chain-streams.workspace = true [dev-dependencies] assert_matches = { workspace = true } rstest = { workspace = true } -sc-utils = { workspace = true, default-features = true } -sp-blockchain = { workspace = true, default-features = true } -sp-tracing = { workspace = true, default-features = true } +sc-utils = { default-features = true, workspace = true } +sp-blockchain = { default-features = true, workspace = true } +sp-tracing = { default-features = true, workspace = true } tokio = { features = ["macros"], workspace = true, default-features = true } # Cumulus cumulus-test-client = { workspace = true } # Substrate -sc-client-api = { workspace = true, default-features = true } +sc-client-api = { default-features = true, workspace = true } diff --git a/cumulus/client/relay-chain-inprocess-interface/Cargo.toml b/cumulus/client/relay-chain-inprocess-interface/Cargo.toml index b82a90a8840e0..060c1c27cf884 100644 --- a/cumulus/client/relay-chain-inprocess-interface/Cargo.toml +++ b/cumulus/client/relay-chain-inprocess-interface/Cargo.toml @@ -1,7 +1,7 @@ [package] authors.workspace = true name = "cumulus-relay-chain-inprocess-interface" -version = "0.7.0" +version = "0.25.0" edition.workspace = true description = "Implementation of the RelayChainInterface trait for Polkadot full-nodes." license = "GPL-3.0-or-later WITH Classpath-exception-2.0" @@ -14,37 +14,47 @@ workspace = true [dependencies] async-channel = { workspace = true } async-trait = { workspace = true } +cumulus-client-bootnodes.default-features = true +cumulus-client-bootnodes.workspace = true +cumulus-primitives-core.default-features = true +cumulus-primitives-core.workspace = true +cumulus-relay-chain-interface.default-features = true +cumulus-relay-chain-interface.workspace = true futures = { workspace = true } futures-timer = { workspace = true } - -# Substrate -sc-cli = { workspace = true, default-features = false } -sc-client-api = { workspace = true, default-features = true } -sc-network = { workspace = true, default-features = true } -sc-sysinfo = { workspace = true, default-features = true } -sc-telemetry = { workspace = true, default-features = true } -sc-tracing = { workspace = true, default-features = true } -sp-api = { workspace = true, default-features = true } -sp-consensus = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } -sp-state-machine = { workspace = true, default-features = true } - -# Polkadot polkadot-cli = { features = ["cli"], workspace = true } -polkadot-primitives = { workspace = true, default-features = true } -polkadot-service = { workspace = true, default-features = true } - -# Cumulus -cumulus-client-bootnodes = { workspace = true, default-features = true } -cumulus-primitives-core = { workspace = true, default-features = true } -cumulus-relay-chain-interface = { workspace = true, default-features = true } +polkadot-primitives.default-features = true +polkadot-primitives.workspace = true +polkadot-service.default-features = true +polkadot-service.workspace = true +sc-cli.default-features = false +sc-cli.workspace = true +sc-client-api.default-features = true +sc-client-api.workspace = true +sc-network.default-features = true +sc-network.workspace = true +sc-sysinfo.default-features = true +sc-sysinfo.workspace = true +sc-telemetry.default-features = true +sc-telemetry.workspace = true +sc-tracing.default-features = true +sc-tracing.workspace = true +sp-api.default-features = true +sp-api.workspace = true +sp-consensus.default-features = true +sp-consensus.workspace = true +sp-core.default-features = true +sp-core.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true +sp-state-machine.default-features = true +sp-state-machine.workspace = true [dev-dependencies] # Substrate -sp-keyring = { workspace = true, default-features = true } +sp-keyring = { default-features = true, workspace = true } # Polkadot metered = { features = ["futures_channel"], workspace = true } -polkadot-primitives = { workspace = true, default-features = true } +polkadot-primitives = { default-features = true, workspace = true } polkadot-test-client = { workspace = true } diff --git a/cumulus/client/relay-chain-interface/Cargo.toml b/cumulus/client/relay-chain-interface/Cargo.toml index be19f99526659..610ecbc919436 100644 --- a/cumulus/client/relay-chain-interface/Cargo.toml +++ b/cumulus/client/relay-chain-interface/Cargo.toml @@ -1,7 +1,7 @@ [package] authors.workspace = true name = "cumulus-relay-chain-interface" -version = "0.7.0" +version = "0.24.0" edition.workspace = true description = "Common interface for different relay chain datasources." license = "GPL-3.0-or-later WITH Classpath-exception-2.0" @@ -12,16 +12,21 @@ repository.workspace = true workspace = true [dependencies] -polkadot-overseer = { workspace = true, default-features = true } - -cumulus-primitives-core = { workspace = true, default-features = true } - -sc-client-api = { workspace = true, default-features = true } -sc-network = { workspace = true, default-features = true } -sp-api = { workspace = true, default-features = true } -sp-blockchain = { workspace = true, default-features = true } -sp-state-machine = { workspace = true, default-features = true } -sp-version = { workspace = true } +cumulus-primitives-core.default-features = true +cumulus-primitives-core.workspace = true +polkadot-overseer.default-features = true +polkadot-overseer.workspace = true +sc-client-api.default-features = true +sc-client-api.workspace = true +sc-network.default-features = true +sc-network.workspace = true +sp-api.default-features = true +sp-api.workspace = true +sp-blockchain.default-features = true +sp-blockchain.workspace = true +sp-state-machine.default-features = true +sp-state-machine.workspace = true +sp-version.workspace = true async-trait = { workspace = true } codec = { workspace = true, default-features = true } diff --git a/cumulus/client/relay-chain-minimal-node/Cargo.toml b/cumulus/client/relay-chain-minimal-node/Cargo.toml index 038870d02e42f..87d4c67bd6cce 100644 --- a/cumulus/client/relay-chain-minimal-node/Cargo.toml +++ b/cumulus/client/relay-chain-minimal-node/Cargo.toml @@ -1,7 +1,7 @@ [package] authors.workspace = true name = "cumulus-relay-chain-minimal-node" -version = "0.7.0" +version = "0.25.0" edition.workspace = true description = "Minimal node implementation to be used in tandem with RPC or light-client mode." license = "GPL-3.0-or-later WITH Classpath-exception-2.0" @@ -12,36 +12,54 @@ repository.workspace = true workspace = true [dependencies] -# polkadot deps -polkadot-core-primitives = { workspace = true, default-features = true } -polkadot-node-network-protocol = { workspace = true, default-features = true } -polkadot-node-subsystem-util = { workspace = true, default-features = true } -polkadot-overseer = { workspace = true, default-features = true } -polkadot-primitives = { workspace = true, default-features = true } - -polkadot-network-bridge = { workspace = true, default-features = true } -polkadot-service = { workspace = true, default-features = true } - -# substrate deps -prometheus-endpoint = { workspace = true, default-features = true } -sc-authority-discovery = { workspace = true, default-features = true } -sc-client-api = { workspace = true, default-features = true } -sc-network = { workspace = true, default-features = true } -sc-network-common = { workspace = true, default-features = true } -sc-service = { workspace = true, default-features = true } -sc-tracing = { workspace = true, default-features = true } -sc-utils = { workspace = true, default-features = true } -sp-api = { workspace = true, default-features = true } -sp-blockchain = { workspace = true, default-features = true } -sp-consensus = { workspace = true, default-features = true } -sp-consensus-babe = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } - -# cumulus deps -cumulus-client-bootnodes = { workspace = true, default-features = true } -cumulus-primitives-core = { workspace = true, default-features = true } -cumulus-relay-chain-interface = { workspace = true, default-features = true } -cumulus-relay-chain-rpc-interface = { workspace = true, default-features = true } +cumulus-client-bootnodes.default-features = true +cumulus-client-bootnodes.workspace = true +cumulus-primitives-core.default-features = true +cumulus-primitives-core.workspace = true +cumulus-relay-chain-interface.default-features = true +cumulus-relay-chain-interface.workspace = true +cumulus-relay-chain-rpc-interface.default-features = true +cumulus-relay-chain-rpc-interface.workspace = true +polkadot-core-primitives.default-features = true +polkadot-core-primitives.workspace = true +polkadot-network-bridge.default-features = true +polkadot-network-bridge.workspace = true +polkadot-node-network-protocol.default-features = true +polkadot-node-network-protocol.workspace = true +polkadot-node-subsystem-util.default-features = true +polkadot-node-subsystem-util.workspace = true +polkadot-overseer.default-features = true +polkadot-overseer.workspace = true +polkadot-primitives.default-features = true +polkadot-primitives.workspace = true +polkadot-service.default-features = true +polkadot-service.workspace = true +prometheus-endpoint.default-features = true +prometheus-endpoint.workspace = true +sc-authority-discovery.default-features = true +sc-authority-discovery.workspace = true +sc-client-api.default-features = true +sc-client-api.workspace = true +sc-network-common.default-features = true +sc-network-common.workspace = true +sc-network.default-features = true +sc-network.workspace = true +sc-service.default-features = true +sc-service.workspace = true +sc-tracing.default-features = true +sc-tracing.workspace = true +sc-utils.default-features = true +sc-utils.workspace = true +sp-api.default-features = true +sp-api.workspace = true +sp-blockchain.default-features = true +sp-blockchain.workspace = true +sp-consensus-babe.default-features = true +sp-consensus-babe.workspace = true +sp-consensus.default-features = true +sp-consensus.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true array-bytes = { workspace = true, default-features = true } async-channel = { workspace = true } diff --git a/cumulus/client/relay-chain-rpc-interface/Cargo.toml b/cumulus/client/relay-chain-rpc-interface/Cargo.toml index 47a2ab3da8c10..bb3350e8a5781 100644 --- a/cumulus/client/relay-chain-rpc-interface/Cargo.toml +++ b/cumulus/client/relay-chain-rpc-interface/Cargo.toml @@ -1,7 +1,7 @@ [package] authors.workspace = true name = "cumulus-relay-chain-rpc-interface" -version = "0.7.0" +version = "0.24.0" edition.workspace = true description = "Implementation of the RelayChainInterface trait that connects to a remote RPC-node." license = "GPL-3.0-or-later WITH Classpath-exception-2.0" @@ -12,23 +12,36 @@ repository.workspace = true workspace = true [dependencies] -polkadot-overseer = { workspace = true, default-features = true } - -cumulus-primitives-core = { workspace = true, default-features = true } -cumulus-relay-chain-interface = { workspace = true, default-features = true } - -prometheus-endpoint = { workspace = true, default-features = true } -sc-client-api = { workspace = true, default-features = true } -sc-network = { workspace = true, default-features = true } -sc-rpc-api = { workspace = true, default-features = true } -sc-service = { workspace = true, default-features = true } -sp-authority-discovery = { workspace = true, default-features = true } -sp-consensus-babe = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } -sp-state-machine = { workspace = true, default-features = true } -sp-storage = { workspace = true, default-features = true } -sp-version = { workspace = true, default-features = true } +cumulus-primitives-core.default-features = true +cumulus-primitives-core.workspace = true +cumulus-relay-chain-interface.default-features = true +cumulus-relay-chain-interface.workspace = true +polkadot-overseer.default-features = true +polkadot-overseer.workspace = true +prometheus-endpoint.default-features = true +prometheus-endpoint.workspace = true +sc-client-api.default-features = true +sc-client-api.workspace = true +sc-network.default-features = true +sc-network.workspace = true +sc-rpc-api.default-features = true +sc-rpc-api.workspace = true +sc-service.default-features = true +sc-service.workspace = true +sp-authority-discovery.default-features = true +sp-authority-discovery.workspace = true +sp-consensus-babe.default-features = true +sp-consensus-babe.workspace = true +sp-core.default-features = true +sp-core.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true +sp-state-machine.default-features = true +sp-state-machine.workspace = true +sp-storage.default-features = true +sp-storage.workspace = true +sp-version.default-features = true +sp-version.workspace = true tokio = { features = ["sync"], workspace = true, default-features = true } tokio-util = { features = ["compat"], workspace = true } diff --git a/cumulus/client/relay-chain-streams/Cargo.toml b/cumulus/client/relay-chain-streams/Cargo.toml index b6a441da4091e..3d5e73dc39824 100644 --- a/cumulus/client/relay-chain-streams/Cargo.toml +++ b/cumulus/client/relay-chain-streams/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cumulus-relay-chain-streams" -version = "0.7.0" +version = "0.2.0" authors.workspace = true description = "Cumulus client common relay chain streams." edition.workspace = true @@ -12,16 +12,15 @@ repository.workspace = true workspace = true [dependencies] +cumulus-relay-chain-interface.default-features = true +cumulus-relay-chain-interface.workspace = true futures = { workspace = true } +polkadot-node-subsystem.default-features = true +polkadot-node-subsystem.workspace = true +polkadot-primitives.default-features = true +polkadot-primitives.workspace = true +sp-api.default-features = true +sp-api.workspace = true +sp-consensus.default-features = true +sp-consensus.workspace = true tracing = { workspace = true, default-features = true } - -# Substrate -sp-api = { workspace = true, default-features = true } -sp-consensus = { workspace = true, default-features = true } - -# Polkadot -polkadot-node-subsystem = { workspace = true, default-features = true } -polkadot-primitives = { workspace = true, default-features = true } - -# Cumulus -cumulus-relay-chain-interface = { workspace = true, default-features = true } diff --git a/cumulus/client/service/Cargo.toml b/cumulus/client/service/Cargo.toml index 3ea36d70b42b6..4764263a8af01 100644 --- a/cumulus/client/service/Cargo.toml +++ b/cumulus/client/service/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cumulus-client-service" -version = "0.7.0" +version = "0.25.0" authors.workspace = true edition.workspace = true description = "Common functions used to assemble the components of a parachain node." @@ -13,41 +13,65 @@ workspace = true [dependencies] async-channel = { workspace = true } +cumulus-client-cli.default-features = true +cumulus-client-cli.workspace = true +cumulus-client-collator.default-features = true +cumulus-client-collator.workspace = true +cumulus-client-consensus-common.default-features = true +cumulus-client-consensus-common.workspace = true +cumulus-client-network.default-features = true +cumulus-client-network.workspace = true +cumulus-client-pov-recovery.default-features = true +cumulus-client-pov-recovery.workspace = true +cumulus-primitives-core.default-features = true +cumulus-primitives-core.workspace = true +cumulus-primitives-proof-size-hostfunction.default-features = true +cumulus-primitives-proof-size-hostfunction.workspace = true +cumulus-relay-chain-inprocess-interface.default-features = true +cumulus-relay-chain-inprocess-interface.workspace = true +cumulus-relay-chain-interface.default-features = true +cumulus-relay-chain-interface.workspace = true +cumulus-relay-chain-minimal-node.default-features = true +cumulus-relay-chain-minimal-node.workspace = true +cumulus-relay-chain-streams.default-features = true +cumulus-relay-chain-streams.workspace = true futures = { workspace = true } +polkadot-primitives.default-features = true +polkadot-primitives.workspace = true prometheus = { workspace = true } - -# Substrate -sc-client-api = { workspace = true, default-features = true } -sc-consensus = { workspace = true, default-features = true } -sc-network = { workspace = true, default-features = true } -sc-network-sync = { workspace = true, default-features = true } -sc-network-transactions = { workspace = true, default-features = true } -sc-rpc = { workspace = true, default-features = true } -sc-service = { workspace = true, default-features = true } -sc-sysinfo = { workspace = true, default-features = true } -sc-telemetry = { workspace = true, default-features = true } -sc-transaction-pool = { workspace = true, default-features = true } -sc-utils = { workspace = true, default-features = true } -sp-api = { workspace = true, default-features = true } -sp-blockchain = { workspace = true, default-features = true } -sp-consensus = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-io = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } -sp-transaction-pool = { workspace = true, default-features = true } - -# Polkadot -polkadot-primitives = { workspace = true, default-features = true } - -# Cumulus -cumulus-client-cli = { workspace = true, default-features = true } -cumulus-client-collator = { workspace = true, default-features = true } -cumulus-client-consensus-common = { workspace = true, default-features = true } -cumulus-client-network = { workspace = true, default-features = true } -cumulus-client-pov-recovery = { workspace = true, default-features = true } -cumulus-primitives-core = { workspace = true, default-features = true } -cumulus-primitives-proof-size-hostfunction = { workspace = true, default-features = true } -cumulus-relay-chain-inprocess-interface = { workspace = true, default-features = true } -cumulus-relay-chain-interface = { workspace = true, default-features = true } -cumulus-relay-chain-minimal-node = { workspace = true, default-features = true } -cumulus-relay-chain-streams = { workspace = true, default-features = true } +sc-client-api.default-features = true +sc-client-api.workspace = true +sc-consensus.default-features = true +sc-consensus.workspace = true +sc-network-sync.default-features = true +sc-network-sync.workspace = true +sc-network-transactions.default-features = true +sc-network-transactions.workspace = true +sc-network.default-features = true +sc-network.workspace = true +sc-rpc.default-features = true +sc-rpc.workspace = true +sc-service.default-features = true +sc-service.workspace = true +sc-sysinfo.default-features = true +sc-sysinfo.workspace = true +sc-telemetry.default-features = true +sc-telemetry.workspace = true +sc-transaction-pool.default-features = true +sc-transaction-pool.workspace = true +sc-utils.default-features = true +sc-utils.workspace = true +sp-api.default-features = true +sp-api.workspace = true +sp-blockchain.default-features = true +sp-blockchain.workspace = true +sp-consensus.default-features = true +sp-consensus.workspace = true +sp-core.default-features = true +sp-core.workspace = true +sp-io.default-features = true +sp-io.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true +sp-transaction-pool.default-features = true +sp-transaction-pool.workspace = true diff --git a/cumulus/pallets/aura-ext/Cargo.toml b/cumulus/pallets/aura-ext/Cargo.toml index ddad89066ac2e..42b0db36e07c1 100644 --- a/cumulus/pallets/aura-ext/Cargo.toml +++ b/cumulus/pallets/aura-ext/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cumulus-pallet-aura-ext" -version = "0.7.0" +version = "0.21.0" authors.workspace = true edition.workspace = true description = "AURA consensus extension pallet for parachains" @@ -13,32 +13,28 @@ workspace = true [dependencies] codec = { features = ["derive"], workspace = true } +cumulus-pallet-parachain-system.workspace = true +frame-support.workspace = true +frame-system.workspace = true +pallet-aura.workspace = true +pallet-timestamp.workspace = true scale-info = { features = ["derive"], workspace = true } - -# Substrate -frame-support = { workspace = true } -frame-system = { workspace = true } -pallet-aura = { workspace = true } -pallet-timestamp = { workspace = true } -sp-application-crypto = { workspace = true } -sp-consensus-aura = { workspace = true } -sp-runtime = { workspace = true } - -# Cumulus -cumulus-pallet-parachain-system = { workspace = true } +sp-application-crypto.workspace = true +sp-consensus-aura.workspace = true +sp-runtime.workspace = true [dev-dependencies] rstest = { workspace = true } # Cumulus -cumulus-pallet-parachain-system = { workspace = true, default-features = true } -cumulus-primitives-core = { workspace = true, default-features = true } -cumulus-test-relay-sproof-builder = { workspace = true, default-features = true } +cumulus-pallet-parachain-system = { default-features = true, workspace = true } +cumulus-primitives-core = { default-features = true, workspace = true } +cumulus-test-relay-sproof-builder = { default-features = true, workspace = true } # Substrate -sp-core = { workspace = true, default-features = true } -sp-io = { workspace = true, default-features = true } -sp-version = { workspace = true, default-features = true } +sp-core = { default-features = true, workspace = true } +sp-io = { default-features = true, workspace = true } +sp-version = { default-features = true, workspace = true } [features] default = ["std"] diff --git a/cumulus/pallets/collator-selection/Cargo.toml b/cumulus/pallets/collator-selection/Cargo.toml index eef9e701357c9..6585d555688b6 100644 --- a/cumulus/pallets/collator-selection/Cargo.toml +++ b/cumulus/pallets/collator-selection/Cargo.toml @@ -7,7 +7,7 @@ license = "Apache-2.0" name = "pallet-collator-selection" readme = "README.md" repository.workspace = true -version = "9.0.0" +version = "22.0.0" [lints] workspace = true @@ -17,27 +17,25 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { features = ["derive"], workspace = true } +frame-benchmarking = { optional = true, workspace = true } +frame-support.workspace = true +frame-system.workspace = true log = { workspace = true } +pallet-authorship.workspace = true +pallet-balances.workspace = true +pallet-session.workspace = true rand = { features = ["std_rng"], workspace = true } scale-info = { features = ["derive"], workspace = true } - -frame-support = { workspace = true } -frame-system = { workspace = true } -pallet-authorship = { workspace = true } -pallet-balances = { workspace = true } -pallet-session = { workspace = true } -sp-runtime = { workspace = true } -sp-staking = { workspace = true } - -frame-benchmarking = { optional = true, workspace = true } +sp-runtime.workspace = true +sp-staking.workspace = true [dev-dependencies] -pallet-aura = { workspace = true, default-features = true } -pallet-timestamp = { workspace = true, default-features = true } -sp-consensus-aura = { workspace = true, default-features = true } -sp-io = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } -sp-tracing = { workspace = true, default-features = true } +pallet-aura = { default-features = true, workspace = true } +pallet-timestamp = { default-features = true, workspace = true } +sp-consensus-aura = { default-features = true, workspace = true } +sp-io = { default-features = true, workspace = true } +sp-runtime = { default-features = true, workspace = true } +sp-tracing = { default-features = true, workspace = true } [features] default = ["std"] diff --git a/cumulus/pallets/dmp-queue/Cargo.toml b/cumulus/pallets/dmp-queue/Cargo.toml index a0b6d308e3037..8d3bf3a10075d 100644 --- a/cumulus/pallets/dmp-queue/Cargo.toml +++ b/cumulus/pallets/dmp-queue/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cumulus-pallet-dmp-queue" -version = "0.7.0" +version = "0.21.0" authors.workspace = true edition.workspace = true repository.workspace = true @@ -15,24 +15,19 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { features = ["derive"], workspace = true } +cumulus-primitives-core.workspace = true +frame-benchmarking = { optional = true, workspace = true } +frame-support.workspace = true +frame-system.workspace = true log = { workspace = true } scale-info = { features = ["derive"], workspace = true } - -frame-benchmarking = { optional = true, workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } - -# Polkadot -xcm = { workspace = true } - -# Cumulus -cumulus-primitives-core = { workspace = true } +sp-io.workspace = true +sp-runtime.workspace = true +xcm.workspace = true [dev-dependencies] -sp-core = { workspace = true, default-features = true } -sp-tracing = { workspace = true, default-features = true } +sp-core = { default-features = true, workspace = true } +sp-tracing = { default-features = true, workspace = true } [features] default = ["std"] diff --git a/cumulus/pallets/parachain-system/Cargo.toml b/cumulus/pallets/parachain-system/Cargo.toml index 28776b2dae581..6f913f581ce03 100644 --- a/cumulus/pallets/parachain-system/Cargo.toml +++ b/cumulus/pallets/parachain-system/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cumulus-pallet-parachain-system" -version = "0.7.0" +version = "0.21.0" authors.workspace = true edition.workspace = true description = "Base pallet for cumulus-based parachains" @@ -14,40 +14,34 @@ workspace = true [dependencies] bytes = { workspace = true } codec = { features = ["derive"], workspace = true } +cumulus-pallet-parachain-system-proc-macro.workspace = true +cumulus-primitives-core.workspace = true +cumulus-primitives-parachain-inherent.workspace = true +cumulus-primitives-proof-size-hostfunction.workspace = true environmental = { workspace = true } +frame-benchmarking = { optional = true, workspace = true } +frame-support.workspace = true +frame-system.workspace = true hashbrown = { workspace = true } impl-trait-for-tuples = { workspace = true } log = { workspace = true } +pallet-message-queue.workspace = true +polkadot-parachain-primitives = { features = ["wasm-api"], workspace = true } +polkadot-runtime-parachains.workspace = true scale-info = { features = ["derive"], workspace = true } +sp-consensus-babe.workspace = true +sp-core.workspace = true +sp-externalities.workspace = true +sp-inherents.workspace = true +sp-io.workspace = true +sp-runtime.workspace = true +sp-state-machine.workspace = true +sp-std.workspace = true +sp-trie.workspace = true +sp-version.workspace = true trie-db = { workspace = true } - -# Substrate -frame-benchmarking = { optional = true, workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } -pallet-message-queue = { workspace = true } -sp-consensus-babe = { workspace = true } -sp-core = { workspace = true } -sp-externalities = { workspace = true } -sp-inherents = { workspace = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } -sp-state-machine = { workspace = true } -sp-std = { workspace = true } -sp-trie = { workspace = true } -sp-version = { workspace = true } - -# Polkadot -polkadot-parachain-primitives = { features = ["wasm-api"], workspace = true } -polkadot-runtime-parachains = { workspace = true } -xcm = { workspace = true } -xcm-builder = { workspace = true } - -# Cumulus -cumulus-pallet-parachain-system-proc-macro = { workspace = true } -cumulus-primitives-core = { workspace = true } -cumulus-primitives-parachain-inherent = { workspace = true } -cumulus-primitives-proof-size-hostfunction = { workspace = true } +xcm-builder.workspace = true +xcm.workspace = true [dev-dependencies] assert_matches = { workspace = true } @@ -59,15 +53,15 @@ trie-standardmap = { workspace = true } # Substrate -sp-consensus-slots = { workspace = true, default-features = true } -sp-crypto-hashing = { workspace = true, default-features = true } -sp-keyring = { workspace = true, default-features = true } -sp-tracing = { workspace = true, default-features = true } -sp-version = { workspace = true, default-features = true } +sp-consensus-slots = { default-features = true, workspace = true } +sp-crypto-hashing = { default-features = true, workspace = true } +sp-keyring = { default-features = true, workspace = true } +sp-tracing = { default-features = true, workspace = true } +sp-version = { default-features = true, workspace = true } # Cumulus cumulus-test-client = { workspace = true } -cumulus-test-relay-sproof-builder = { workspace = true, default-features = true } +cumulus-test-relay-sproof-builder = { default-features = true, workspace = true } [features] default = ["std"] @@ -95,7 +89,6 @@ std = [ "sp-runtime/std", "sp-state-machine/std", "sp-std/std", - "sp-tracing/std", "sp-trie/std", "trie-db/std", "xcm-builder/std", diff --git a/cumulus/pallets/session-benchmarking/Cargo.toml b/cumulus/pallets/session-benchmarking/Cargo.toml index 6d77e567c9b6b..b0dd06d1bdfdc 100644 --- a/cumulus/pallets/session-benchmarking/Cargo.toml +++ b/cumulus/pallets/session-benchmarking/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cumulus-pallet-session-benchmarking" -version = "9.0.0" +version = "22.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -18,10 +18,10 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { workspace = true } frame-benchmarking = { optional = true, workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } -pallet-session = { workspace = true } -sp-runtime = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true +pallet-session.workspace = true +sp-runtime.workspace = true [features] default = ["std"] diff --git a/cumulus/pallets/solo-to-para/Cargo.toml b/cumulus/pallets/solo-to-para/Cargo.toml index 2088361bf11a5..237a17e417730 100644 --- a/cumulus/pallets/solo-to-para/Cargo.toml +++ b/cumulus/pallets/solo-to-para/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cumulus-pallet-solo-to-para" -version = "0.7.0" +version = "0.21.0" authors.workspace = true edition.workspace = true description = "Adds functionality to migrate from a Solo to a Parachain" @@ -13,19 +13,13 @@ workspace = true [dependencies] codec = { features = ["derive"], workspace = true } +cumulus-pallet-parachain-system.workspace = true +frame-support.workspace = true +frame-system.workspace = true +pallet-sudo.workspace = true +polkadot-primitives.workspace = true scale-info = { features = ["derive"], workspace = true } - -# Substrate -frame-support = { workspace = true } -frame-system = { workspace = true } -pallet-sudo = { workspace = true } -sp-runtime = { workspace = true } - -# Polkadot -polkadot-primitives = { workspace = true } - -# Cumulus -cumulus-pallet-parachain-system = { workspace = true } +sp-runtime.workspace = true [features] default = ["std"] diff --git a/cumulus/pallets/weight-reclaim/Cargo.toml b/cumulus/pallets/weight-reclaim/Cargo.toml index d412a9b105d98..b718a955bfc83 100644 --- a/cumulus/pallets/weight-reclaim/Cargo.toml +++ b/cumulus/pallets/weight-reclaim/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cumulus-pallet-weight-reclaim" -version = "1.0.0" +version = "0.3.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -15,15 +15,13 @@ workspace = true targets = ["x86_64-unknown-linux-gnu"] [dependencies] -# Substrate dependencies -sp-io = { workspace = true } -sp-runtime = { workspace = true } -sp-trie = { workspace = true } - -cumulus-primitives-storage-weight-reclaim = { workspace = true } +cumulus-primitives-storage-weight-reclaim.workspace = true frame-benchmarking = { optional = true, workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true +sp-io.workspace = true +sp-runtime.workspace = true +sp-trie.workspace = true # Other dependencies codec = { features = ["derive"], workspace = true } @@ -33,7 +31,7 @@ log = { workspace = true, default-features = true } scale-info = { features = ["derive"], workspace = true } [dev-dependencies] -cumulus-primitives-proof-size-hostfunction = { workspace = true } +cumulus-primitives-proof-size-hostfunction = { workspace = true, default-features = false } [features] default = ["std"] diff --git a/cumulus/pallets/xcm/Cargo.toml b/cumulus/pallets/xcm/Cargo.toml index 25938763c956a..bcd9cce96b9c2 100644 --- a/cumulus/pallets/xcm/Cargo.toml +++ b/cumulus/pallets/xcm/Cargo.toml @@ -2,7 +2,7 @@ authors.workspace = true edition.workspace = true name = "cumulus-pallet-xcm" -version = "0.7.0" +version = "0.20.0" license = "Apache-2.0" description = "Pallet for stuff specific to parachains' usage of XCM" homepage.workspace = true @@ -13,16 +13,13 @@ workspace = true [dependencies] codec = { features = ["derive"], workspace = true } +cumulus-primitives-core.workspace = true +frame-support.workspace = true +frame-system.workspace = true scale-info = { features = ["derive"], workspace = true } - -frame-support = { workspace = true } -frame-system = { workspace = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } - -xcm = { workspace = true } - -cumulus-primitives-core = { workspace = true } +sp-io.workspace = true +sp-runtime.workspace = true +xcm.workspace = true [features] default = ["std"] diff --git a/cumulus/pallets/xcmp-queue/Cargo.toml b/cumulus/pallets/xcmp-queue/Cargo.toml index 7a8b13c5db7cb..96a51a9e87bc6 100644 --- a/cumulus/pallets/xcmp-queue/Cargo.toml +++ b/cumulus/pallets/xcmp-queue/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cumulus-pallet-xcmp-queue" -version = "0.7.1" +version = "0.21.0" authors.workspace = true edition.workspace = true description = "Pallet to queue outbound and inbound XCMP messages." @@ -13,44 +13,36 @@ workspace = true [dependencies] codec = { features = ["derive"], workspace = true } +cumulus-primitives-core.workspace = true +frame-support.workspace = true +frame-system.workspace = true log = { workspace = true } +pallet-message-queue.workspace = true +polkadot-runtime-common.workspace = true +polkadot-runtime-parachains.workspace = true scale-info = { features = ["derive"], workspace = true } - -# Substrate -frame-support = { workspace = true } -frame-system = { workspace = true } -pallet-message-queue = { workspace = true } -sp-core = { workspace = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } - -# Polkadot -polkadot-runtime-common = { workspace = true } -polkadot-runtime-parachains = { workspace = true } -xcm = { workspace = true } -xcm-builder = { workspace = true } -xcm-executor = { workspace = true } - -# Cumulus -cumulus-primitives-core = { workspace = true } +sp-core.workspace = true +sp-io.workspace = true +sp-runtime.workspace = true +xcm-builder.workspace = true +xcm-executor.workspace = true +xcm.workspace = true # Optional import for weight accuracy testing approx = { workspace = true } # Optional import for benchmarking bounded-collections = { workspace = true } -frame-benchmarking = { optional = true, workspace = true } - -# Bridges bp-xcm-bridge-hub-router = { optional = true, workspace = true } +frame-benchmarking = { optional = true, workspace = true } [dev-dependencies] # Substrate -frame-support = { features = ["experimental"], workspace = true, default-features = true } -pallet-balances = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } +frame-support = { features = ["experimental"], default-features = true, workspace = true } +pallet-balances = { default-features = true, workspace = true } +sp-core = { default-features = true, workspace = true } # Cumulus -cumulus-pallet-parachain-system = { workspace = true, default-features = true } +cumulus-pallet-parachain-system = { default-features = true, workspace = true } [features] default = ["std"] diff --git a/cumulus/parachains/common/Cargo.toml b/cumulus/parachains/common/Cargo.toml index 8f75c0de91f35..8adfef8cd4ae9 100644 --- a/cumulus/parachains/common/Cargo.toml +++ b/cumulus/parachains/common/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "parachains-common" -version = "7.0.0" +version = "22.0.0" authors.workspace = true edition.workspace = true description = "Logic which is common to all parachain runtimes" @@ -16,33 +16,27 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { features = ["derive"], workspace = true } +cumulus-primitives-core.workspace = true +cumulus-primitives-utility.workspace = true +frame-support.workspace = true +frame-system.workspace = true log = { workspace = true } +pallet-asset-tx-payment.workspace = true +pallet-assets.workspace = true +pallet-authorship.workspace = true +pallet-balances.workspace = true +pallet-collator-selection.workspace = true +pallet-message-queue.workspace = true +pallet-xcm.workspace = true +parachain-info.workspace = true +polkadot-primitives.workspace = true scale-info = { features = ["derive"], workspace = true } - -# Substrate -frame-support = { workspace = true } -frame-system = { workspace = true } -pallet-asset-tx-payment = { workspace = true } -pallet-assets = { workspace = true } -pallet-authorship = { workspace = true } -pallet-balances = { workspace = true } -pallet-message-queue = { workspace = true } -sp-consensus-aura = { workspace = true } -sp-core = { workspace = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } - -# Polkadot -pallet-xcm = { workspace = true } -polkadot-primitives = { workspace = true } -xcm = { workspace = true } -xcm-executor = { workspace = true } - -# Cumulus -cumulus-primitives-core = { workspace = true } -cumulus-primitives-utility = { workspace = true } -pallet-collator-selection = { workspace = true } -parachain-info = { workspace = true } +sp-consensus-aura.workspace = true +sp-core.workspace = true +sp-io.workspace = true +sp-runtime.workspace = true +xcm-executor.workspace = true +xcm.workspace = true [features] default = ["std"] diff --git a/cumulus/parachains/integration-tests/emulated/chains/parachains/assets/asset-hub-rococo/Cargo.toml b/cumulus/parachains/integration-tests/emulated/chains/parachains/assets/asset-hub-rococo/Cargo.toml index 69ea0be6918ab..c127438edb180 100644 --- a/cumulus/parachains/integration-tests/emulated/chains/parachains/assets/asset-hub-rococo/Cargo.toml +++ b/cumulus/parachains/integration-tests/emulated/chains/parachains/assets/asset-hub-rococo/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "asset-hub-rococo-emulated-chain" -version = "0.0.0" +version = "0.1.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -11,22 +11,18 @@ publish = false workspace = true [dependencies] -# Substrate -frame-support = { workspace = true } -sp-core = { workspace = true } -sp-keyring = { workspace = true } - -# Cumulus -asset-hub-rococo-runtime = { workspace = true, default-features = true } -cumulus-primitives-core = { workspace = true } -emulated-integration-tests-common = { workspace = true } -parachains-common = { workspace = true, default-features = true } -rococo-emulated-chain = { workspace = true } +asset-hub-rococo-runtime.default-features = true +asset-hub-rococo-runtime.workspace = true +bp-bridge-hub-rococo.workspace = true +cumulus-primitives-core.workspace = true +emulated-integration-tests-common.workspace = true +frame-support.workspace = true +parachains-common.default-features = true +parachains-common.workspace = true +rococo-emulated-chain.workspace = true +sp-core.workspace = true +sp-keyring.workspace = true testnet-parachains-constants = { features = ["rococo"], workspace = true, default-features = true } - -# Polkadot -xcm = { workspace = true } -xcm-builder = { workspace = true, default-features = true } - -# Bridges -bp-bridge-hub-rococo = { workspace = true } +xcm-builder.default-features = true +xcm-builder.workspace = true +xcm.workspace = true diff --git a/cumulus/parachains/integration-tests/emulated/chains/parachains/assets/asset-hub-westend/Cargo.toml b/cumulus/parachains/integration-tests/emulated/chains/parachains/assets/asset-hub-westend/Cargo.toml index ab5988aa20750..14b966a84afd6 100644 --- a/cumulus/parachains/integration-tests/emulated/chains/parachains/assets/asset-hub-westend/Cargo.toml +++ b/cumulus/parachains/integration-tests/emulated/chains/parachains/assets/asset-hub-westend/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "asset-hub-westend-emulated-chain" -version = "0.0.0" +version = "0.1.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -11,22 +11,18 @@ publish = false workspace = true [dependencies] -# Substrate -frame-support = { workspace = true } -sp-core = { workspace = true } -sp-keyring = { workspace = true } - -# Cumulus -asset-hub-westend-runtime = { workspace = true } -cumulus-primitives-core = { workspace = true } -emulated-integration-tests-common = { workspace = true } -parachains-common = { workspace = true, default-features = true } +asset-hub-westend-runtime.workspace = true +bp-bridge-hub-westend.workspace = true +cumulus-primitives-core.workspace = true +emulated-integration-tests-common.workspace = true +frame-support.workspace = true +parachains-common.default-features = true +parachains-common.workspace = true +sp-core.workspace = true +sp-keyring.workspace = true testnet-parachains-constants = { features = ["westend"], workspace = true, default-features = true } -westend-emulated-chain = { workspace = true, default-features = true } - -# Polkadot -xcm = { workspace = true } -xcm-builder = { workspace = true, default-features = true } - -# Bridges -bp-bridge-hub-westend = { workspace = true } +westend-emulated-chain.default-features = true +westend-emulated-chain.workspace = true +xcm-builder.default-features = true +xcm-builder.workspace = true +xcm.workspace = true diff --git a/cumulus/parachains/integration-tests/emulated/chains/parachains/bridges/bridge-hub-rococo/Cargo.toml b/cumulus/parachains/integration-tests/emulated/chains/parachains/bridges/bridge-hub-rococo/Cargo.toml index 0b7e4ca24dd63..06e2105e86cfc 100644 --- a/cumulus/parachains/integration-tests/emulated/chains/parachains/bridges/bridge-hub-rococo/Cargo.toml +++ b/cumulus/parachains/integration-tests/emulated/chains/parachains/bridges/bridge-hub-rococo/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bridge-hub-rococo-emulated-chain" -version = "0.0.0" +version = "0.1.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -11,20 +11,15 @@ publish = false workspace = true [dependencies] -# Substrate -frame-support = { workspace = true } -sp-core = { workspace = true } -sp-keyring = { workspace = true } - -# Polkadot Dependencies -xcm = { workspace = true } - -# Bridge dependencies -bp-messages = { workspace = true } - -# Cumulus -bridge-hub-common = { workspace = true } -bridge-hub-rococo-runtime = { workspace = true, default-features = true } -emulated-integration-tests-common = { workspace = true } -parachains-common = { workspace = true, default-features = true } +bp-messages.workspace = true +bridge-hub-common.workspace = true +bridge-hub-rococo-runtime.default-features = true +bridge-hub-rococo-runtime.workspace = true +emulated-integration-tests-common.workspace = true +frame-support.workspace = true +parachains-common.default-features = true +parachains-common.workspace = true +sp-core.workspace = true +sp-keyring.workspace = true testnet-parachains-constants = { features = ["rococo"], workspace = true, default-features = true } +xcm.workspace = true diff --git a/cumulus/parachains/integration-tests/emulated/chains/parachains/bridges/bridge-hub-westend/Cargo.toml b/cumulus/parachains/integration-tests/emulated/chains/parachains/bridges/bridge-hub-westend/Cargo.toml index 1c7fc2163dc77..79276019db3f4 100644 --- a/cumulus/parachains/integration-tests/emulated/chains/parachains/bridges/bridge-hub-westend/Cargo.toml +++ b/cumulus/parachains/integration-tests/emulated/chains/parachains/bridges/bridge-hub-westend/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bridge-hub-westend-emulated-chain" -version = "0.0.0" +version = "0.1.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -11,20 +11,15 @@ publish = false workspace = true [dependencies] -# Substrate -frame-support = { workspace = true } -sp-core = { workspace = true } -sp-keyring = { workspace = true } - -# Polkadot Dependencies -xcm = { workspace = true } - -# Bridge dependencies -bp-messages = { workspace = true } - -# Cumulus -bridge-hub-common = { workspace = true } -bridge-hub-westend-runtime = { workspace = true, default-features = true } -emulated-integration-tests-common = { workspace = true } -parachains-common = { workspace = true, default-features = true } +bp-messages.workspace = true +bridge-hub-common.workspace = true +bridge-hub-westend-runtime.default-features = true +bridge-hub-westend-runtime.workspace = true +emulated-integration-tests-common.workspace = true +frame-support.workspace = true +parachains-common.default-features = true +parachains-common.workspace = true +sp-core.workspace = true +sp-keyring.workspace = true testnet-parachains-constants = { features = ["westend"], workspace = true, default-features = true } +xcm.workspace = true diff --git a/cumulus/parachains/integration-tests/emulated/chains/parachains/collectives/collectives-westend/Cargo.toml b/cumulus/parachains/integration-tests/emulated/chains/parachains/collectives/collectives-westend/Cargo.toml index 3164689f43842..37817bb91470c 100644 --- a/cumulus/parachains/integration-tests/emulated/chains/parachains/collectives/collectives-westend/Cargo.toml +++ b/cumulus/parachains/integration-tests/emulated/chains/parachains/collectives/collectives-westend/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "collectives-westend-emulated-chain" -version = "0.0.0" +version = "0.1.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -11,13 +11,11 @@ publish = false workspace = true [dependencies] -# Substrate -frame-support = { workspace = true } -sp-core = { workspace = true } - -# Cumulus -collectives-westend-runtime = { workspace = true } -cumulus-primitives-core = { workspace = true } -emulated-integration-tests-common = { workspace = true } -parachains-common = { workspace = true, default-features = true } +collectives-westend-runtime.workspace = true +cumulus-primitives-core.workspace = true +emulated-integration-tests-common.workspace = true +frame-support.workspace = true +parachains-common.default-features = true +parachains-common.workspace = true +sp-core.workspace = true testnet-parachains-constants = { features = ["westend"], workspace = true, default-features = true } diff --git a/cumulus/parachains/integration-tests/emulated/chains/parachains/coretime/coretime-rococo/Cargo.toml b/cumulus/parachains/integration-tests/emulated/chains/parachains/coretime/coretime-rococo/Cargo.toml index b1d36003b17f2..7678af04b50ca 100644 --- a/cumulus/parachains/integration-tests/emulated/chains/parachains/coretime/coretime-rococo/Cargo.toml +++ b/cumulus/parachains/integration-tests/emulated/chains/parachains/coretime/coretime-rococo/Cargo.toml @@ -11,13 +11,12 @@ publish = false workspace = true [dependencies] -# Substrate -frame-support = { workspace = true } -sp-core = { workspace = true } - -# Cumulus -coretime-rococo-runtime = { workspace = true, default-features = true } -cumulus-primitives-core = { workspace = true } -emulated-integration-tests-common = { workspace = true } -parachains-common = { workspace = true, default-features = true } +coretime-rococo-runtime.default-features = true +coretime-rococo-runtime.workspace = true +cumulus-primitives-core.workspace = true +emulated-integration-tests-common.workspace = true +frame-support.workspace = true +parachains-common.default-features = true +parachains-common.workspace = true +sp-core.workspace = true testnet-parachains-constants = { features = ["rococo"], workspace = true, default-features = true } diff --git a/cumulus/parachains/integration-tests/emulated/chains/parachains/coretime/coretime-westend/Cargo.toml b/cumulus/parachains/integration-tests/emulated/chains/parachains/coretime/coretime-westend/Cargo.toml index 267701f13145a..18b470a8fa636 100644 --- a/cumulus/parachains/integration-tests/emulated/chains/parachains/coretime/coretime-westend/Cargo.toml +++ b/cumulus/parachains/integration-tests/emulated/chains/parachains/coretime/coretime-westend/Cargo.toml @@ -11,13 +11,12 @@ publish = false workspace = true [dependencies] -# Substrate -frame-support = { workspace = true } -sp-core = { workspace = true } - -# Cumulus -coretime-westend-runtime = { workspace = true, default-features = true } -cumulus-primitives-core = { workspace = true } -emulated-integration-tests-common = { workspace = true } -parachains-common = { workspace = true, default-features = true } +coretime-westend-runtime.default-features = true +coretime-westend-runtime.workspace = true +cumulus-primitives-core.workspace = true +emulated-integration-tests-common.workspace = true +frame-support.workspace = true +parachains-common.default-features = true +parachains-common.workspace = true +sp-core.workspace = true testnet-parachains-constants = { features = ["westend"], workspace = true, default-features = true } diff --git a/cumulus/parachains/integration-tests/emulated/chains/parachains/people/people-rococo/Cargo.toml b/cumulus/parachains/integration-tests/emulated/chains/parachains/people/people-rococo/Cargo.toml index 5b83a4c9e0378..1b5b42db514cd 100644 --- a/cumulus/parachains/integration-tests/emulated/chains/parachains/people/people-rococo/Cargo.toml +++ b/cumulus/parachains/integration-tests/emulated/chains/parachains/people/people-rococo/Cargo.toml @@ -11,13 +11,11 @@ publish = false workspace = true [dependencies] -# Substrate -frame-support = { workspace = true } -sp-core = { workspace = true } - -# Cumulus -cumulus-primitives-core = { workspace = true } -emulated-integration-tests-common = { workspace = true } -parachains-common = { workspace = true, default-features = true } -people-rococo-runtime = { workspace = true } +cumulus-primitives-core.workspace = true +emulated-integration-tests-common.workspace = true +frame-support.workspace = true +parachains-common.default-features = true +parachains-common.workspace = true +people-rococo-runtime.workspace = true +sp-core.workspace = true testnet-parachains-constants = { features = ["rococo"], workspace = true, default-features = true } diff --git a/cumulus/parachains/integration-tests/emulated/chains/parachains/people/people-westend/Cargo.toml b/cumulus/parachains/integration-tests/emulated/chains/parachains/people/people-westend/Cargo.toml index d1a0379ddf5cd..a6600119600cb 100644 --- a/cumulus/parachains/integration-tests/emulated/chains/parachains/people/people-westend/Cargo.toml +++ b/cumulus/parachains/integration-tests/emulated/chains/parachains/people/people-westend/Cargo.toml @@ -11,13 +11,11 @@ publish = false workspace = true [dependencies] -# Substrate -frame-support = { workspace = true } -sp-core = { workspace = true } - -# Cumulus -cumulus-primitives-core = { workspace = true } -emulated-integration-tests-common = { workspace = true } -parachains-common = { workspace = true, default-features = true } -people-westend-runtime = { workspace = true } +cumulus-primitives-core.workspace = true +emulated-integration-tests-common.workspace = true +frame-support.workspace = true +parachains-common.default-features = true +parachains-common.workspace = true +people-westend-runtime.workspace = true +sp-core.workspace = true testnet-parachains-constants = { features = ["westend"], workspace = true, default-features = true } diff --git a/cumulus/parachains/integration-tests/emulated/chains/parachains/testing/penpal/Cargo.toml b/cumulus/parachains/integration-tests/emulated/chains/parachains/testing/penpal/Cargo.toml index c495aa145a059..46f5987cd6e18 100644 --- a/cumulus/parachains/integration-tests/emulated/chains/parachains/testing/penpal/Cargo.toml +++ b/cumulus/parachains/integration-tests/emulated/chains/parachains/testing/penpal/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "penpal-emulated-chain" -version = "0.0.0" +version = "0.1.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -11,16 +11,12 @@ publish = false workspace = true [dependencies] -# Substrate -frame-support = { workspace = true } -sp-core = { workspace = true } -sp-keyring = { workspace = true } - -# Polkadot -xcm = { workspace = true } - -# Cumulus -cumulus-primitives-core = { workspace = true } -emulated-integration-tests-common = { workspace = true } -parachains-common = { workspace = true, default-features = true } -penpal-runtime = { workspace = true } +cumulus-primitives-core.workspace = true +emulated-integration-tests-common.workspace = true +frame-support.workspace = true +parachains-common.default-features = true +parachains-common.workspace = true +penpal-runtime.workspace = true +sp-core.workspace = true +sp-keyring.workspace = true +xcm.workspace = true diff --git a/cumulus/parachains/integration-tests/emulated/chains/relays/rococo/Cargo.toml b/cumulus/parachains/integration-tests/emulated/chains/relays/rococo/Cargo.toml index 4d1d8c58412da..7349af843b116 100644 --- a/cumulus/parachains/integration-tests/emulated/chains/relays/rococo/Cargo.toml +++ b/cumulus/parachains/integration-tests/emulated/chains/relays/rococo/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rococo-emulated-chain" -version = "0.0.0" +version = "0.1.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -11,19 +11,16 @@ publish = false workspace = true [dependencies] -# Substrate -sc-consensus-grandpa = { workspace = true } -sp-authority-discovery = { workspace = true } -sp-consensus-babe = { workspace = true } -sp-consensus-beefy = { workspace = true, default-features = true } -sp-core = { workspace = true } -sp-keyring = { workspace = true } - -# Polkadot -polkadot-primitives = { workspace = true } -rococo-runtime = { workspace = true } -rococo-runtime-constants = { workspace = true } - -# Cumulus -emulated-integration-tests-common = { workspace = true } -parachains-common = { workspace = true, default-features = true } +emulated-integration-tests-common.workspace = true +parachains-common.default-features = true +parachains-common.workspace = true +polkadot-primitives.workspace = true +rococo-runtime-constants.workspace = true +rococo-runtime.workspace = true +sc-consensus-grandpa.workspace = true +sp-authority-discovery.workspace = true +sp-consensus-babe.workspace = true +sp-consensus-beefy.default-features = true +sp-consensus-beefy.workspace = true +sp-core.workspace = true +sp-keyring.workspace = true diff --git a/cumulus/parachains/integration-tests/emulated/chains/relays/westend/Cargo.toml b/cumulus/parachains/integration-tests/emulated/chains/relays/westend/Cargo.toml index 0733385540f86..0904eb59926f2 100644 --- a/cumulus/parachains/integration-tests/emulated/chains/relays/westend/Cargo.toml +++ b/cumulus/parachains/integration-tests/emulated/chains/relays/westend/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "westend-emulated-chain" -version = "0.0.0" +version = "0.1.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -11,20 +11,17 @@ publish = false workspace = true [dependencies] -# Substrate -pallet-staking = { workspace = true } -sc-consensus-grandpa = { workspace = true } -sp-authority-discovery = { workspace = true } -sp-consensus-babe = { workspace = true } -sp-consensus-beefy = { workspace = true, default-features = true } -sp-core = { workspace = true } -sp-runtime = { workspace = true } - -# Polkadot -polkadot-primitives = { workspace = true } -westend-runtime = { workspace = true } -westend-runtime-constants = { workspace = true } - -# Cumulus -emulated-integration-tests-common = { workspace = true } -parachains-common = { workspace = true, default-features = true } +emulated-integration-tests-common.workspace = true +pallet-staking.workspace = true +parachains-common.default-features = true +parachains-common.workspace = true +polkadot-primitives.workspace = true +sc-consensus-grandpa.workspace = true +sp-authority-discovery.workspace = true +sp-consensus-babe.workspace = true +sp-consensus-beefy.default-features = true +sp-consensus-beefy.workspace = true +sp-core.workspace = true +sp-runtime.workspace = true +westend-runtime-constants.workspace = true +westend-runtime.workspace = true diff --git a/cumulus/parachains/integration-tests/emulated/common/Cargo.toml b/cumulus/parachains/integration-tests/emulated/common/Cargo.toml index 9b64325237699..b6d5b113e7cc1 100644 --- a/cumulus/parachains/integration-tests/emulated/common/Cargo.toml +++ b/cumulus/parachains/integration-tests/emulated/common/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "emulated-integration-tests-common" -version = "3.0.0" +version = "22.1.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -12,46 +12,69 @@ repository.workspace = true workspace = true [dependencies] +asset-test-utils.default-features = true +asset-test-utils.workspace = true +bp-messages.default-features = true +bp-messages.workspace = true +bp-xcm-bridge-hub.default-features = true +bp-xcm-bridge-hub.workspace = true codec = { workspace = true } +cumulus-pallet-parachain-system.default-features = true +cumulus-pallet-parachain-system.workspace = true +cumulus-pallet-xcmp-queue.default-features = true +cumulus-pallet-xcmp-queue.workspace = true +cumulus-primitives-core.default-features = true +cumulus-primitives-core.workspace = true +frame-support.default-features = true +frame-support.workspace = true +frame-system.default-features = true +frame-system.workspace = true hex-literal = { workspace = true } -paste = { workspace = true, default-features = true } - -# Substrate -frame-support = { workspace = true, default-features = true } -frame-system = { workspace = true, default-features = true } -pallet-asset-conversion = { workspace = true, default-features = true } -pallet-assets = { workspace = true, default-features = true } -pallet-balances = { workspace = true, default-features = true } -pallet-message-queue = { workspace = true, default-features = true } -pallet-whitelist = { workspace = true, default-features = true } -sc-consensus-grandpa = { workspace = true, default-features = true } -sp-authority-discovery = { workspace = true, default-features = true } -sp-consensus-babe = { workspace = true, default-features = true } -sp-consensus-beefy = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-keyring = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } - -# Polkadot +pallet-asset-conversion.default-features = true +pallet-asset-conversion.workspace = true +pallet-assets.default-features = true +pallet-assets.workspace = true +pallet-balances.default-features = true +pallet-balances.workspace = true +pallet-bridge-messages.default-features = true +pallet-bridge-messages.workspace = true +pallet-message-queue.default-features = true +pallet-message-queue.workspace = true +pallet-whitelist.default-features = true +pallet-whitelist.workspace = true pallet-xcm = { features = ["test-utils"], workspace = true, default-features = true } -polkadot-parachain-primitives = { workspace = true, default-features = true } -polkadot-primitives = { workspace = true, default-features = true } -polkadot-runtime-parachains = { workspace = true, default-features = true } -xcm = { workspace = true, default-features = true } -xcm-executor = { workspace = true, default-features = true } -xcm-runtime-apis = { workspace = true, default-features = true } -xcm-simulator = { workspace = true, default-features = true } - -# Cumulus -asset-test-utils = { workspace = true, default-features = true } -cumulus-pallet-parachain-system = { workspace = true, default-features = true } -cumulus-pallet-xcmp-queue = { workspace = true, default-features = true } -cumulus-primitives-core = { workspace = true, default-features = true } -parachains-common = { workspace = true, default-features = true } -xcm-emulator = { workspace = true, default-features = true } - -# Bridges -bp-messages = { workspace = true, default-features = true } -bp-xcm-bridge-hub = { workspace = true, default-features = true } -pallet-bridge-messages = { workspace = true, default-features = true } -pallet-xcm-bridge-hub = { workspace = true, default-features = true } +pallet-xcm-bridge-hub.default-features = true +pallet-xcm-bridge-hub.workspace = true +parachains-common.default-features = true +parachains-common.workspace = true +paste = { workspace = true, default-features = true } +polkadot-parachain-primitives.default-features = true +polkadot-parachain-primitives.workspace = true +polkadot-primitives.default-features = true +polkadot-primitives.workspace = true +polkadot-runtime-parachains.default-features = true +polkadot-runtime-parachains.workspace = true +sc-consensus-grandpa.default-features = true +sc-consensus-grandpa.workspace = true +sp-authority-discovery.default-features = true +sp-authority-discovery.workspace = true +sp-consensus-babe.default-features = true +sp-consensus-babe.workspace = true +sp-consensus-beefy.default-features = true +sp-consensus-beefy.workspace = true +sp-core.default-features = true +sp-core.workspace = true +sp-keyring.default-features = true +sp-keyring.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true +xcm-emulator.default-features = true +xcm-emulator.workspace = true +xcm-executor.default-features = true +xcm-executor.workspace = true +xcm-runtime-apis.default-features = true +xcm-runtime-apis.workspace = true +xcm-simulator.default-features = true +xcm-simulator.workspace = true +xcm.default-features = true +xcm.workspace = true diff --git a/cumulus/parachains/integration-tests/emulated/networks/rococo-system/Cargo.toml b/cumulus/parachains/integration-tests/emulated/networks/rococo-system/Cargo.toml index 2f8889e481626..e10d3ff6bb373 100644 --- a/cumulus/parachains/integration-tests/emulated/networks/rococo-system/Cargo.toml +++ b/cumulus/parachains/integration-tests/emulated/networks/rococo-system/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rococo-system-emulated-network" -version = "0.0.0" +version = "0.1.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -11,11 +11,10 @@ publish = false workspace = true [dependencies] -# Cumulus -asset-hub-rococo-emulated-chain = { workspace = true } -bridge-hub-rococo-emulated-chain = { workspace = true } -coretime-rococo-emulated-chain = { workspace = true } -emulated-integration-tests-common = { workspace = true } -penpal-emulated-chain = { workspace = true } -people-rococo-emulated-chain = { workspace = true } -rococo-emulated-chain = { workspace = true } +asset-hub-rococo-emulated-chain.workspace = true +bridge-hub-rococo-emulated-chain.workspace = true +coretime-rococo-emulated-chain.workspace = true +emulated-integration-tests-common.workspace = true +penpal-emulated-chain.workspace = true +people-rococo-emulated-chain.workspace = true +rococo-emulated-chain.workspace = true diff --git a/cumulus/parachains/integration-tests/emulated/networks/rococo-westend-system/Cargo.toml b/cumulus/parachains/integration-tests/emulated/networks/rococo-westend-system/Cargo.toml index 1b789b21c7dfd..0534467b47515 100644 --- a/cumulus/parachains/integration-tests/emulated/networks/rococo-westend-system/Cargo.toml +++ b/cumulus/parachains/integration-tests/emulated/networks/rococo-westend-system/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rococo-westend-system-emulated-network" -version = "0.0.0" +version = "0.1.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -11,12 +11,12 @@ publish = false workspace = true [dependencies] -# Cumulus -asset-hub-rococo-emulated-chain = { workspace = true } -asset-hub-westend-emulated-chain = { workspace = true } -bridge-hub-rococo-emulated-chain = { workspace = true } -bridge-hub-westend-emulated-chain = { workspace = true } -emulated-integration-tests-common = { workspace = true } -penpal-emulated-chain = { workspace = true } -rococo-emulated-chain = { workspace = true } -westend-emulated-chain = { workspace = true, default-features = true } +asset-hub-rococo-emulated-chain.workspace = true +asset-hub-westend-emulated-chain.workspace = true +bridge-hub-rococo-emulated-chain.workspace = true +bridge-hub-westend-emulated-chain.workspace = true +emulated-integration-tests-common.workspace = true +penpal-emulated-chain.workspace = true +rococo-emulated-chain.workspace = true +westend-emulated-chain.default-features = true +westend-emulated-chain.workspace = true diff --git a/cumulus/parachains/integration-tests/emulated/networks/westend-system/Cargo.toml b/cumulus/parachains/integration-tests/emulated/networks/westend-system/Cargo.toml index 50e75a6bdd746..1601d727fa940 100644 --- a/cumulus/parachains/integration-tests/emulated/networks/westend-system/Cargo.toml +++ b/cumulus/parachains/integration-tests/emulated/networks/westend-system/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "westend-system-emulated-network" -version = "0.0.0" +version = "0.1.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -11,12 +11,11 @@ publish = false workspace = true [dependencies] -# Cumulus -asset-hub-westend-emulated-chain = { workspace = true } -bridge-hub-westend-emulated-chain = { workspace = true } -collectives-westend-emulated-chain = { workspace = true } -coretime-westend-emulated-chain = { workspace = true } -emulated-integration-tests-common = { workspace = true } -penpal-emulated-chain = { workspace = true } -people-westend-emulated-chain = { workspace = true } -westend-emulated-chain = { workspace = true } +asset-hub-westend-emulated-chain.workspace = true +bridge-hub-westend-emulated-chain.workspace = true +collectives-westend-emulated-chain.workspace = true +coretime-westend-emulated-chain.workspace = true +emulated-integration-tests-common.workspace = true +penpal-emulated-chain.workspace = true +people-westend-emulated-chain.workspace = true +westend-emulated-chain.workspace = true diff --git a/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/Cargo.toml b/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/Cargo.toml index b53edb39c73b5..04e9c401799c5 100644 --- a/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/Cargo.toml +++ b/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/Cargo.toml @@ -12,31 +12,30 @@ workspace = true [dependencies] assert_matches = { workspace = true } +asset-test-utils.default-features = true +asset-test-utils.workspace = true codec = { workspace = true } - -# Substrate -frame-support = { workspace = true } -pallet-asset-conversion = { workspace = true } -pallet-asset-rewards = { workspace = true } -pallet-assets = { workspace = true } -pallet-balances = { workspace = true } -pallet-message-queue = { workspace = true } -pallet-treasury = { workspace = true } -pallet-utility = { workspace = true } -sp-core = { workspace = true } -sp-runtime = { workspace = true } - -# Polkadot -pallet-xcm = { workspace = true } -polkadot-runtime-common = { workspace = true, default-features = true } -rococo-runtime-constants = { workspace = true, default-features = true } -xcm = { workspace = true } -xcm-executor = { workspace = true } -xcm-runtime-apis = { workspace = true, default-features = true } - -# Cumulus -asset-test-utils = { workspace = true, default-features = true } -cumulus-pallet-parachain-system = { workspace = true } -emulated-integration-tests-common = { workspace = true } -parachains-common = { workspace = true, default-features = true } -rococo-system-emulated-network = { workspace = true } +cumulus-pallet-parachain-system.workspace = true +emulated-integration-tests-common.workspace = true +frame-support.workspace = true +pallet-asset-conversion.workspace = true +pallet-asset-rewards.workspace = true +pallet-assets.workspace = true +pallet-balances.workspace = true +pallet-message-queue.workspace = true +pallet-treasury.workspace = true +pallet-utility.workspace = true +pallet-xcm.workspace = true +parachains-common.default-features = true +parachains-common.workspace = true +polkadot-runtime-common.default-features = true +polkadot-runtime-common.workspace = true +rococo-runtime-constants.default-features = true +rococo-runtime-constants.workspace = true +rococo-system-emulated-network.workspace = true +sp-core.workspace = true +sp-runtime.workspace = true +xcm-executor.workspace = true +xcm-runtime-apis.default-features = true +xcm-runtime-apis.workspace = true +xcm.workspace = true diff --git a/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/Cargo.toml b/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/Cargo.toml index e97aa4c417d67..5fc81d9a353c3 100644 --- a/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/Cargo.toml +++ b/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/Cargo.toml @@ -12,34 +12,31 @@ workspace = true [dependencies] assert_matches = { workspace = true } +asset-test-utils.default-features = true +asset-test-utils.workspace = true codec = { workspace = true } - -# Substrate -frame-support = { workspace = true } -pallet-asset-conversion = { workspace = true } -pallet-asset-rewards = { workspace = true } -pallet-assets = { workspace = true } -pallet-balances = { workspace = true } -pallet-message-queue = { workspace = true } -pallet-treasury = { workspace = true } -sp-core = { workspace = true } -sp-runtime = { workspace = true } - -# Polkadot -pallet-xcm = { workspace = true } -polkadot-runtime-common = { workspace = true, default-features = true } -xcm = { workspace = true } -xcm-builder = { workspace = true } -xcm-executor = { workspace = true } -xcm-runtime-apis = { workspace = true } - -# Cumulus -asset-test-utils = { workspace = true, default-features = true } -cumulus-pallet-parachain-system = { workspace = true } -cumulus-pallet-xcmp-queue = { workspace = true } -emulated-integration-tests-common = { workspace = true } -parachains-common = { workspace = true, default-features = true } -westend-system-emulated-network = { workspace = true } +cumulus-pallet-parachain-system.workspace = true +cumulus-pallet-xcmp-queue.workspace = true +emulated-integration-tests-common.workspace = true +frame-support.workspace = true +pallet-asset-conversion.workspace = true +pallet-asset-rewards.workspace = true +pallet-assets.workspace = true +pallet-balances.workspace = true +pallet-message-queue.workspace = true +pallet-treasury.workspace = true +pallet-xcm.workspace = true +parachains-common.default-features = true +parachains-common.workspace = true +polkadot-runtime-common.default-features = true +polkadot-runtime-common.workspace = true +sp-core.workspace = true +sp-runtime.workspace = true +westend-system-emulated-network.workspace = true +xcm-builder.workspace = true +xcm-executor.workspace = true +xcm-runtime-apis.workspace = true +xcm.workspace = true [dev-dependencies] -sp-tracing = { features = ["test-utils"], workspace = true, default-features = true } +sp-tracing = { features = ["test-utils"], default-features = true, workspace = true } diff --git a/cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-rococo/Cargo.toml b/cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-rococo/Cargo.toml index c44e9c5c91791..fa80722b19d78 100644 --- a/cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-rococo/Cargo.toml +++ b/cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-rococo/Cargo.toml @@ -11,41 +11,34 @@ publish = false workspace = true [dependencies] +asset-hub-rococo-runtime.workspace = true +bp-asset-hub-rococo.workspace = true codec = { workspace = true } +cumulus-pallet-xcmp-queue.workspace = true +emulated-integration-tests-common.workspace = true +frame-support.workspace = true hex-literal = { workspace = true, default-features = true } +pallet-asset-conversion.workspace = true +pallet-assets.workspace = true +pallet-balances.workspace = true +pallet-bridge-messages.workspace = true +pallet-message-queue.default-features = true +pallet-message-queue.workspace = true +pallet-xcm.workspace = true +parachains-common.default-features = true +parachains-common.workspace = true +rococo-system-emulated-network.workspace = true +rococo-westend-system-emulated-network.workspace = true scale-info = { features = ["derive"], workspace = true } - -# Substrate -frame-support = { workspace = true } -pallet-asset-conversion = { workspace = true } -pallet-assets = { workspace = true } -pallet-balances = { workspace = true } -pallet-message-queue = { workspace = true, default-features = true } -sp-core = { workspace = true } -sp-runtime = { workspace = true } - -# Polkadot -pallet-xcm = { workspace = true } -xcm = { workspace = true } -xcm-builder = { workspace = true } -xcm-executor = { workspace = true } - -# Bridges -bp-asset-hub-rococo = { workspace = true } -pallet-bridge-messages = { workspace = true } - -# Cumulus -asset-hub-rococo-runtime = { workspace = true } -cumulus-pallet-xcmp-queue = { workspace = true } -emulated-integration-tests-common = { workspace = true } -parachains-common = { workspace = true, default-features = true } -rococo-system-emulated-network = { workspace = true } -rococo-westend-system-emulated-network = { workspace = true } +snowbridge-inbound-queue-primitives.workspace = true +snowbridge-outbound-queue-primitives.workspace = true +snowbridge-pallet-inbound-queue-fixtures.default-features = true +snowbridge-pallet-inbound-queue-fixtures.workspace = true +snowbridge-pallet-outbound-queue.workspace = true +snowbridge-pallet-system.workspace = true +sp-core.workspace = true +sp-runtime.workspace = true testnet-parachains-constants = { features = ["rococo", "westend"], workspace = true, default-features = true } - -# Snowbridge -snowbridge-inbound-queue-primitives = { workspace = true } -snowbridge-outbound-queue-primitives = { workspace = true } -snowbridge-pallet-inbound-queue-fixtures = { workspace = true, default-features = true } -snowbridge-pallet-outbound-queue = { workspace = true } -snowbridge-pallet-system = { workspace = true } +xcm-builder.workspace = true +xcm-executor.workspace = true +xcm.workspace = true diff --git a/cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-westend/Cargo.toml b/cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-westend/Cargo.toml index dcfef7a077dd6..eecc2e2a91d7f 100644 --- a/cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-westend/Cargo.toml +++ b/cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-westend/Cargo.toml @@ -11,50 +11,42 @@ publish = false workspace = true [dependencies] +asset-hub-westend-runtime.workspace = true +bp-asset-hub-westend.workspace = true +bridge-hub-common.workspace = true +bridge-hub-westend-runtime.workspace = true codec = { workspace = true } +cumulus-pallet-parachain-system.workspace = true +cumulus-pallet-xcmp-queue.workspace = true +emulated-integration-tests-common.workspace = true +frame-support.workspace = true hex-literal = { workspace = true, default-features = true } +pallet-asset-conversion.workspace = true +pallet-assets.workspace = true +pallet-balances.workspace = true +pallet-bridge-messages.workspace = true +pallet-bridge-relayers.workspace = true +pallet-message-queue.default-features = true +pallet-message-queue.workspace = true +pallet-xcm.workspace = true +parachains-common.default-features = true +parachains-common.workspace = true +rococo-westend-system-emulated-network.workspace = true scale-info = { workspace = true } - -# Substrate -frame-support = { workspace = true } -pallet-asset-conversion = { workspace = true } -pallet-assets = { workspace = true } -pallet-balances = { workspace = true } -pallet-message-queue = { workspace = true, default-features = true } -sp-core = { workspace = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } - -# Polkadot -pallet-xcm = { workspace = true } -xcm = { workspace = true } -xcm-builder = { workspace = true } -xcm-executor = { workspace = true } - -# Bridges -pallet-bridge-messages = { workspace = true } -pallet-bridge-relayers = { workspace = true } - -# Cumulus -asset-hub-westend-runtime = { workspace = true } -bp-asset-hub-westend = { workspace = true } -bridge-hub-common = { workspace = true } -bridge-hub-westend-runtime = { workspace = true } -cumulus-pallet-parachain-system = { workspace = true } -cumulus-pallet-xcmp-queue = { workspace = true } -emulated-integration-tests-common = { workspace = true } -parachains-common = { workspace = true, default-features = true } -rococo-westend-system-emulated-network = { workspace = true } +snowbridge-core.workspace = true +snowbridge-inbound-queue-primitives.workspace = true +snowbridge-outbound-queue-primitives.workspace = true +snowbridge-pallet-inbound-queue-fixtures.workspace = true +snowbridge-pallet-inbound-queue-v2.workspace = true +snowbridge-pallet-inbound-queue.workspace = true +snowbridge-pallet-outbound-queue-v2.workspace = true +snowbridge-pallet-outbound-queue.workspace = true +snowbridge-pallet-system-v2.workspace = true +snowbridge-pallet-system.workspace = true +sp-core.workspace = true +sp-io.workspace = true +sp-runtime.workspace = true testnet-parachains-constants = { features = ["rococo", "westend"], workspace = true, default-features = true } - -# Snowbridge -snowbridge-core = { workspace = true } -snowbridge-inbound-queue-primitives = { workspace = true } -snowbridge-outbound-queue-primitives = { workspace = true } -snowbridge-pallet-inbound-queue = { workspace = true } -snowbridge-pallet-inbound-queue-fixtures = { workspace = true } -snowbridge-pallet-inbound-queue-v2 = { workspace = true } -snowbridge-pallet-outbound-queue = { workspace = true } -snowbridge-pallet-outbound-queue-v2 = { workspace = true } -snowbridge-pallet-system = { workspace = true } -snowbridge-pallet-system-v2 = { workspace = true } +xcm-builder.workspace = true +xcm-executor.workspace = true +xcm.workspace = true diff --git a/cumulus/parachains/integration-tests/emulated/tests/collectives/collectives-westend/Cargo.toml b/cumulus/parachains/integration-tests/emulated/tests/collectives/collectives-westend/Cargo.toml index 5d2288282ab66..1be60d0c08300 100644 --- a/cumulus/parachains/integration-tests/emulated/tests/collectives/collectives-westend/Cargo.toml +++ b/cumulus/parachains/integration-tests/emulated/tests/collectives/collectives-westend/Cargo.toml @@ -12,26 +12,22 @@ workspace = true [dependencies] codec = { workspace = true } - -# Substrate -frame-support = { workspace = true } -pallet-assets = { workspace = true } -pallet-balances = { workspace = true } -pallet-message-queue = { workspace = true } -pallet-treasury = { workspace = true } -pallet-utility = { workspace = true } -pallet-whitelist = { workspace = true } -sp-runtime = { workspace = true } - -# Polkadot -pallet-xcm = { workspace = true } -polkadot-runtime-common = { workspace = true, default-features = true } -westend-runtime-constants = { workspace = true, default-features = true } -xcm = { workspace = true } -xcm-executor = { workspace = true } - -# Cumulus -cumulus-pallet-parachain-system = { workspace = true } -cumulus-pallet-xcmp-queue = { workspace = true } -emulated-integration-tests-common = { workspace = true } -westend-system-emulated-network = { workspace = true } +cumulus-pallet-parachain-system.workspace = true +cumulus-pallet-xcmp-queue.workspace = true +emulated-integration-tests-common.workspace = true +frame-support.workspace = true +pallet-assets.workspace = true +pallet-balances.workspace = true +pallet-message-queue.workspace = true +pallet-treasury.workspace = true +pallet-utility.workspace = true +pallet-whitelist.workspace = true +pallet-xcm.workspace = true +polkadot-runtime-common.default-features = true +polkadot-runtime-common.workspace = true +sp-runtime.workspace = true +westend-runtime-constants.default-features = true +westend-runtime-constants.workspace = true +westend-system-emulated-network.workspace = true +xcm-executor.workspace = true +xcm.workspace = true diff --git a/cumulus/parachains/integration-tests/emulated/tests/coretime/coretime-rococo/Cargo.toml b/cumulus/parachains/integration-tests/emulated/tests/coretime/coretime-rococo/Cargo.toml index ae3adad2ca2d7..b22be4af10f01 100644 --- a/cumulus/parachains/integration-tests/emulated/tests/coretime/coretime-rococo/Cargo.toml +++ b/cumulus/parachains/integration-tests/emulated/tests/coretime/coretime-rococo/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "coretime-rococo-integration-tests" -version = "0.0.0" +version = "0.1.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -11,19 +11,18 @@ publish = false workspace = true [dependencies] -# Substrate -frame-support = { workspace = true } -pallet-broker = { workspace = true, default-features = true } -pallet-message-queue = { workspace = true } -sp-runtime = { workspace = true } - -# Polkadot -polkadot-runtime-parachains = { workspace = true, default-features = true } -rococo-runtime-constants = { workspace = true, default-features = true } -xcm = { workspace = true } -xcm-executor = { workspace = true } - -# Cumulus -cumulus-pallet-parachain-system = { workspace = true, default-features = true } -emulated-integration-tests-common = { workspace = true } -rococo-system-emulated-network = { workspace = true } +cumulus-pallet-parachain-system.default-features = true +cumulus-pallet-parachain-system.workspace = true +emulated-integration-tests-common.workspace = true +frame-support.workspace = true +pallet-broker.default-features = true +pallet-broker.workspace = true +pallet-message-queue.workspace = true +polkadot-runtime-parachains.default-features = true +polkadot-runtime-parachains.workspace = true +rococo-runtime-constants.default-features = true +rococo-runtime-constants.workspace = true +rococo-system-emulated-network.workspace = true +sp-runtime.workspace = true +xcm-executor.workspace = true +xcm.workspace = true diff --git a/cumulus/parachains/integration-tests/emulated/tests/coretime/coretime-westend/Cargo.toml b/cumulus/parachains/integration-tests/emulated/tests/coretime/coretime-westend/Cargo.toml index 8471051791674..18eaec23766a6 100644 --- a/cumulus/parachains/integration-tests/emulated/tests/coretime/coretime-westend/Cargo.toml +++ b/cumulus/parachains/integration-tests/emulated/tests/coretime/coretime-westend/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "coretime-westend-integration-tests" -version = "0.0.0" +version = "0.1.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -11,20 +11,19 @@ publish = false workspace = true [dependencies] -# Substrate -frame-support = { workspace = true } -pallet-broker = { workspace = true, default-features = true } -pallet-message-queue = { workspace = true } -pallet-xcm = { workspace = true } -sp-runtime = { workspace = true } - -# Polkadot -polkadot-runtime-parachains = { workspace = true, default-features = true } -westend-runtime-constants = { workspace = true, default-features = true } -xcm = { workspace = true } -xcm-executor = { workspace = true } - -# Cumulus -cumulus-pallet-parachain-system = { workspace = true, default-features = true } -emulated-integration-tests-common = { workspace = true } -westend-system-emulated-network = { workspace = true } +cumulus-pallet-parachain-system.default-features = true +cumulus-pallet-parachain-system.workspace = true +emulated-integration-tests-common.workspace = true +frame-support.workspace = true +pallet-broker.default-features = true +pallet-broker.workspace = true +pallet-message-queue.workspace = true +pallet-xcm.workspace = true +polkadot-runtime-parachains.default-features = true +polkadot-runtime-parachains.workspace = true +sp-runtime.workspace = true +westend-runtime-constants.default-features = true +westend-runtime-constants.workspace = true +westend-system-emulated-network.workspace = true +xcm-executor.workspace = true +xcm.workspace = true diff --git a/cumulus/parachains/integration-tests/emulated/tests/governance/westend/Cargo.toml b/cumulus/parachains/integration-tests/emulated/tests/governance/westend/Cargo.toml index fe57924de231c..44dbcc5fbcf63 100644 --- a/cumulus/parachains/integration-tests/emulated/tests/governance/westend/Cargo.toml +++ b/cumulus/parachains/integration-tests/emulated/tests/governance/westend/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "governance-westend-integration-tests" -version = "0.0.0" +version = "0.1.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -12,21 +12,23 @@ workspace = true [dependencies] codec = { workspace = true, default-features = true } - -# Substrate -frame-support = { workspace = true, default-features = true } -frame-system = { workspace = true, default-features = true } -pallet-utility = { workspace = true, default-features = true } -pallet-whitelist = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } - -pallet-xcm = { workspace = true, default-features = true } -xcm = { workspace = true, default-features = true } - -emulated-integration-tests-common = { workspace = true } - -# Local -collectives-westend-runtime = { workspace = true } -westend-runtime = { workspace = true } -westend-system-emulated-network = { workspace = true } +collectives-westend-runtime.workspace = true +emulated-integration-tests-common.workspace = true +frame-support.default-features = true +frame-support.workspace = true +frame-system.default-features = true +frame-system.workspace = true +pallet-utility.default-features = true +pallet-utility.workspace = true +pallet-whitelist.default-features = true +pallet-whitelist.workspace = true +pallet-xcm.default-features = true +pallet-xcm.workspace = true +sp-core.default-features = true +sp-core.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true +westend-runtime.workspace = true +westend-system-emulated-network.workspace = true +xcm.default-features = true +xcm.workspace = true diff --git a/cumulus/parachains/integration-tests/emulated/tests/people/people-rococo/Cargo.toml b/cumulus/parachains/integration-tests/emulated/tests/people/people-rococo/Cargo.toml index f6886a4b09268..907776de25298 100644 --- a/cumulus/parachains/integration-tests/emulated/tests/people/people-rococo/Cargo.toml +++ b/cumulus/parachains/integration-tests/emulated/tests/people/people-rococo/Cargo.toml @@ -11,17 +11,14 @@ publish = false workspace = true [dependencies] -# Substrate -frame-support = { workspace = true } -pallet-balances = { workspace = true } -sp-runtime = { workspace = true } - -# Polkadot -xcm = { workspace = true } -xcm-executor = { workspace = true } - -# Cumulus -asset-test-utils = { workspace = true, default-features = true } -emulated-integration-tests-common = { workspace = true } -parachains-common = { workspace = true, default-features = true } -rococo-system-emulated-network = { workspace = true } +asset-test-utils.default-features = true +asset-test-utils.workspace = true +emulated-integration-tests-common.workspace = true +frame-support.workspace = true +pallet-balances.workspace = true +parachains-common.default-features = true +parachains-common.workspace = true +rococo-system-emulated-network.workspace = true +sp-runtime.workspace = true +xcm-executor.workspace = true +xcm.workspace = true diff --git a/cumulus/parachains/integration-tests/emulated/tests/people/people-westend/Cargo.toml b/cumulus/parachains/integration-tests/emulated/tests/people/people-westend/Cargo.toml index 7ad99d5c6c5f7..eff80ab2321d6 100644 --- a/cumulus/parachains/integration-tests/emulated/tests/people/people-westend/Cargo.toml +++ b/cumulus/parachains/integration-tests/emulated/tests/people/people-westend/Cargo.toml @@ -11,23 +11,19 @@ publish = false workspace = true [dependencies] +asset-test-utils.default-features = true +asset-test-utils.workspace = true codec = { workspace = true } - -# Substrate -frame-support = { workspace = true } -pallet-balances = { workspace = true } -pallet-identity = { workspace = true } -pallet-message-queue = { workspace = true } -pallet-xcm = { workspace = true } -sp-runtime = { workspace = true } - -# Polkadot -westend-runtime = { workspace = true } -xcm = { workspace = true } -xcm-executor = { workspace = true } - -# Cumulus -asset-test-utils = { workspace = true, default-features = true } -emulated-integration-tests-common = { workspace = true } -parachains-common = { workspace = true, default-features = true } -westend-system-emulated-network = { workspace = true } +emulated-integration-tests-common.workspace = true +frame-support.workspace = true +pallet-balances.workspace = true +pallet-identity.workspace = true +pallet-message-queue.workspace = true +pallet-xcm.workspace = true +parachains-common.default-features = true +parachains-common.workspace = true +sp-runtime.workspace = true +westend-runtime.workspace = true +westend-system-emulated-network.workspace = true +xcm-executor.workspace = true +xcm.workspace = true diff --git a/cumulus/parachains/pallets/collective-content/Cargo.toml b/cumulus/parachains/pallets/collective-content/Cargo.toml index 8512702edfd42..783993431688d 100644 --- a/cumulus/parachains/pallets/collective-content/Cargo.toml +++ b/cumulus/parachains/pallets/collective-content/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-collective-content" -version = "0.6.0" +version = "0.19.0" authors = ["Parity Technologies "] edition.workspace = true description = "Managed content" @@ -13,17 +13,15 @@ workspace = true [dependencies] codec = { features = ["derive", "max-encoded-len"], workspace = true } -scale-info = { features = ["derive"], workspace = true } - frame-benchmarking = { optional = true, workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } - -sp-core = { workspace = true } -sp-runtime = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true +scale-info = { features = ["derive"], workspace = true } +sp-core.workspace = true +sp-runtime.workspace = true [dev-dependencies] -sp-io = { workspace = true } +sp-io = { workspace = true, default-features = false } [features] default = ["std"] diff --git a/cumulus/parachains/pallets/parachain-info/Cargo.toml b/cumulus/parachains/pallets/parachain-info/Cargo.toml index 604441c65f295..b329779c4e570 100644 --- a/cumulus/parachains/pallets/parachain-info/Cargo.toml +++ b/cumulus/parachains/pallets/parachain-info/Cargo.toml @@ -2,7 +2,7 @@ authors.workspace = true edition.workspace = true name = "staging-parachain-info" -version = "0.7.0" +version = "0.21.0" license = "Apache-2.0" description = "Pallet to store the parachain ID" homepage.workspace = true @@ -13,14 +13,11 @@ workspace = true [dependencies] codec = { features = ["derive"], workspace = true } +cumulus-primitives-core.workspace = true +frame-support.workspace = true +frame-system.workspace = true scale-info = { features = ["derive"], workspace = true } - -frame-support = { workspace = true } -frame-system = { workspace = true } - -sp-runtime = { workspace = true } - -cumulus-primitives-core = { workspace = true } +sp-runtime.workspace = true [features] default = ["std"] diff --git a/cumulus/parachains/pallets/ping/Cargo.toml b/cumulus/parachains/pallets/ping/Cargo.toml index d4ce50450e086..82db4ba98632f 100644 --- a/cumulus/parachains/pallets/ping/Cargo.toml +++ b/cumulus/parachains/pallets/ping/Cargo.toml @@ -2,7 +2,7 @@ authors.workspace = true edition.workspace = true name = "cumulus-ping" -version = "0.7.0" +version = "0.21.0" license = "Apache-2.0" description = "Ping Pallet for Cumulus XCM/UMP testing." homepage.workspace = true @@ -13,16 +13,13 @@ workspace = true [dependencies] codec = { features = ["derive"], workspace = true } +cumulus-pallet-xcm.workspace = true +cumulus-primitives-core.workspace = true +frame-support.workspace = true +frame-system.workspace = true scale-info = { features = ["derive"], workspace = true } - -frame-support = { workspace = true } -frame-system = { workspace = true } -sp-runtime = { workspace = true } - -xcm = { workspace = true } - -cumulus-pallet-xcm = { workspace = true } -cumulus-primitives-core = { workspace = true } +sp-runtime.workspace = true +xcm.workspace = true [features] default = ["std"] diff --git a/cumulus/parachains/runtimes/assets/asset-hub-rococo/Cargo.toml b/cumulus/parachains/runtimes/assets/asset-hub-rococo/Cargo.toml index 666c53cee373f..25deb4df85648 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-rococo/Cargo.toml +++ b/cumulus/parachains/runtimes/assets/asset-hub-rococo/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "asset-hub-rococo-runtime" -version = "0.11.0" +version = "0.26.0" authors.workspace = true edition.workspace = true description = "Rococo variant of Asset Hub parachain runtime" @@ -13,95 +13,87 @@ workspace = true [dependencies] codec = { features = ["derive", "max-encoded-len"], workspace = true } +frame-benchmarking = { optional = true, workspace = true } +frame-executive.workspace = true +frame-metadata-hash-extension.workspace = true +frame-support.workspace = true +frame-system-benchmarking = { optional = true, workspace = true } +frame-system-rpc-runtime-api.workspace = true +frame-system.workspace = true +frame-try-runtime = { optional = true, workspace = true } hex-literal = { workspace = true, default-features = true } log = { workspace = true } +pallet-asset-conversion-ops.workspace = true +pallet-asset-conversion-tx-payment.workspace = true +pallet-asset-conversion.workspace = true +pallet-asset-rewards.workspace = true +pallet-assets-freezer.workspace = true +pallet-assets.workspace = true +pallet-aura.workspace = true +pallet-authorship.workspace = true +pallet-balances.workspace = true +pallet-message-queue.workspace = true +pallet-multisig.workspace = true +pallet-nft-fractionalization.workspace = true +pallet-nfts.workspace = true +pallet-proxy.workspace = true +pallet-session.workspace = true +pallet-timestamp.workspace = true +pallet-transaction-payment-rpc-runtime-api.workspace = true +pallet-transaction-payment.workspace = true +pallet-uniques.workspace = true +pallet-utility.workspace = true scale-info = { features = ["derive"], workspace = true } serde_json = { features = ["alloc"], workspace = true } - -# Substrate -frame-benchmarking = { optional = true, workspace = true } -frame-executive = { workspace = true } -frame-metadata-hash-extension = { workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } -frame-system-benchmarking = { optional = true, workspace = true } -frame-system-rpc-runtime-api = { workspace = true } -frame-try-runtime = { optional = true, workspace = true } -pallet-asset-conversion = { workspace = true } -pallet-asset-conversion-ops = { workspace = true } -pallet-asset-conversion-tx-payment = { workspace = true } -pallet-asset-rewards = { workspace = true } -pallet-assets = { workspace = true } -pallet-assets-freezer = { workspace = true } -pallet-aura = { workspace = true } -pallet-authorship = { workspace = true } -pallet-balances = { workspace = true } -pallet-message-queue = { workspace = true } -pallet-multisig = { workspace = true } -pallet-nft-fractionalization = { workspace = true } -pallet-nfts = { workspace = true } -pallet-proxy = { workspace = true } -pallet-session = { workspace = true } -pallet-timestamp = { workspace = true } -pallet-transaction-payment = { workspace = true } -pallet-transaction-payment-rpc-runtime-api = { workspace = true } -pallet-uniques = { workspace = true } -pallet-utility = { workspace = true } -sp-api = { workspace = true } -sp-block-builder = { workspace = true } -sp-consensus-aura = { workspace = true } -sp-core = { workspace = true } -sp-genesis-builder = { workspace = true } -sp-inherents = { workspace = true } -sp-keyring = { workspace = true } -sp-offchain = { workspace = true } -sp-runtime = { workspace = true } -sp-session = { workspace = true } -sp-storage = { workspace = true } -sp-transaction-pool = { workspace = true } -sp-version = { workspace = true } -sp-weights = { workspace = true } +sp-api.workspace = true +sp-block-builder.workspace = true +sp-consensus-aura.workspace = true +sp-core.workspace = true +sp-genesis-builder.workspace = true +sp-inherents.workspace = true +sp-keyring.workspace = true +sp-offchain.workspace = true +sp-runtime.workspace = true +sp-session.workspace = true +sp-storage.workspace = true +sp-transaction-pool.workspace = true +sp-version.workspace = true +sp-weights.workspace = true # num-traits feature needed for dex integer sq root: -primitive-types = { features = ["codec", "num-traits", "scale-info"], workspace = true } - -# Polkadot -pallet-xcm = { workspace = true } -pallet-xcm-benchmarks = { optional = true, workspace = true } -polkadot-parachain-primitives = { workspace = true } -polkadot-runtime-common = { workspace = true } -rococo-runtime-constants = { workspace = true } -xcm = { workspace = true } -xcm-builder = { workspace = true } -xcm-executor = { workspace = true } -xcm-runtime-apis = { workspace = true } - -# Cumulus -assets-common = { workspace = true } -cumulus-pallet-aura-ext = { workspace = true } -cumulus-pallet-parachain-system = { workspace = true } -cumulus-pallet-session-benchmarking = { workspace = true } -cumulus-pallet-weight-reclaim = { workspace = true } -cumulus-pallet-xcm = { workspace = true } +assets-common.workspace = true +bp-asset-hub-rococo.workspace = true +bp-asset-hub-westend.workspace = true +bp-bridge-hub-rococo.workspace = true +bp-bridge-hub-westend.workspace = true +cumulus-pallet-aura-ext.workspace = true +cumulus-pallet-parachain-system.workspace = true +cumulus-pallet-session-benchmarking.workspace = true +cumulus-pallet-weight-reclaim.workspace = true +cumulus-pallet-xcm.workspace = true cumulus-pallet-xcmp-queue = { features = ["bridging"], workspace = true } -cumulus-primitives-aura = { workspace = true } -cumulus-primitives-core = { workspace = true } -cumulus-primitives-utility = { workspace = true } -pallet-collator-selection = { workspace = true } -parachain-info = { workspace = true } -parachains-common = { workspace = true } +cumulus-primitives-aura.workspace = true +cumulus-primitives-core.workspace = true +cumulus-primitives-utility.workspace = true +pallet-collator-selection.workspace = true +pallet-xcm-benchmarks = { optional = true, workspace = true } +pallet-xcm-bridge-hub-router.workspace = true +pallet-xcm.workspace = true +parachain-info.workspace = true +parachains-common.workspace = true +polkadot-parachain-primitives.workspace = true +polkadot-runtime-common.workspace = true +primitive-types = { features = ["codec", "num-traits", "scale-info"], workspace = true } +rococo-runtime-constants.workspace = true testnet-parachains-constants = { features = ["rococo"], workspace = true } - -# Bridges -bp-asset-hub-rococo = { workspace = true } -bp-asset-hub-westend = { workspace = true } -bp-bridge-hub-rococo = { workspace = true } -bp-bridge-hub-westend = { workspace = true } -pallet-xcm-bridge-hub-router = { workspace = true } +xcm-builder.workspace = true +xcm-executor.workspace = true +xcm-runtime-apis.workspace = true +xcm.workspace = true [dev-dependencies] -asset-test-utils = { workspace = true, default-features = true } -parachains-runtimes-test-utils = { workspace = true, default-features = true } +asset-test-utils = { default-features = true, workspace = true } +parachains-runtimes-test-utils = { default-features = true, workspace = true } [build-dependencies] substrate-wasm-builder = { optional = true, workspace = true, default-features = true } diff --git a/cumulus/parachains/runtimes/assets/asset-hub-rococo/bridge-primitives/Cargo.toml b/cumulus/parachains/runtimes/assets/asset-hub-rococo/bridge-primitives/Cargo.toml index f7159f334a8b5..edd28471f376f 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-rococo/bridge-primitives/Cargo.toml +++ b/cumulus/parachains/runtimes/assets/asset-hub-rococo/bridge-primitives/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "bp-asset-hub-rococo" description = "Primitives of AssetHubRococo parachain runtime." -version = "0.4.0" +version = "0.18.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -14,23 +14,17 @@ exclude-from-umbrella = true workspace = true [dependencies] +bp-bridge-hub-cumulus.workspace = true +bp-messages.workspace = true +bp-runtime.workspace = true +bp-xcm-bridge-hub-router.workspace = true codec = { workspace = true } +frame-support.workspace = true scale-info = { features = ["derive"], workspace = true } - -# Substrate Dependencies -frame-support = { workspace = true } -sp-api = { workspace = true } -sp-core = { workspace = true } - -# Bridge Dependencies -bp-bridge-hub-cumulus = { workspace = true } -bp-messages = { workspace = true } -bp-runtime = { workspace = true } -bp-xcm-bridge-hub-router = { workspace = true } +sp-api.workspace = true +sp-core.workspace = true testnet-parachains-constants = { features = ["rococo"], workspace = true } - -# Polkadot dependencies -xcm = { workspace = true } +xcm.workspace = true [features] default = ["std"] diff --git a/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs b/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs index 8c91cae50f4e4..05f7a699531e5 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs @@ -129,7 +129,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: alloc::borrow::Cow::Borrowed("statemine"), impl_name: alloc::borrow::Cow::Borrowed("statemine"), authoring_version: 1, - spec_version: 1_019_001, + spec_version: 1_019_002, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 16, diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/Cargo.toml b/cumulus/parachains/runtimes/assets/asset-hub-westend/Cargo.toml index 9896d79ab6965..f75d9db43977d 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-westend/Cargo.toml +++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "asset-hub-westend-runtime" -version = "0.15.0" +version = "0.32.0" authors.workspace = true edition.workspace = true description = "Westend variant of Asset Hub parachain runtime" @@ -13,105 +13,97 @@ workspace = true [dependencies] codec = { features = ["derive", "max-encoded-len"], workspace = true } +frame-benchmarking = { optional = true, workspace = true } +frame-executive.workspace = true +frame-metadata-hash-extension.workspace = true +frame-support.workspace = true +frame-system-benchmarking = { optional = true, workspace = true } +frame-system-rpc-runtime-api.workspace = true +frame-system.workspace = true +frame-try-runtime = { optional = true, workspace = true } hex-literal = { workspace = true, default-features = true } log = { workspace = true } +pallet-asset-conversion-ops.workspace = true +pallet-asset-conversion-tx-payment.workspace = true +pallet-asset-conversion.workspace = true +pallet-asset-rewards.workspace = true +pallet-assets-freezer.workspace = true +pallet-assets.workspace = true +pallet-aura.workspace = true +pallet-authorship.workspace = true +pallet-balances.workspace = true +pallet-migrations.workspace = true +pallet-multisig.workspace = true +pallet-nft-fractionalization.workspace = true +pallet-nfts-runtime-api.workspace = true +pallet-nfts.workspace = true +pallet-proxy.workspace = true +pallet-revive.workspace = true +pallet-session.workspace = true +pallet-state-trie-migration.workspace = true +pallet-timestamp.workspace = true +pallet-transaction-payment-rpc-runtime-api.workspace = true +pallet-transaction-payment.workspace = true +pallet-uniques.workspace = true +pallet-utility.workspace = true scale-info = { features = ["derive"], workspace = true } serde_json = { features = ["alloc"], workspace = true } - -# Substrate -frame-benchmarking = { optional = true, workspace = true } -frame-executive = { workspace = true } -frame-metadata-hash-extension = { workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } -frame-system-benchmarking = { optional = true, workspace = true } -frame-system-rpc-runtime-api = { workspace = true } -frame-try-runtime = { optional = true, workspace = true } -pallet-asset-conversion = { workspace = true } -pallet-asset-conversion-ops = { workspace = true } -pallet-asset-conversion-tx-payment = { workspace = true } -pallet-asset-rewards = { workspace = true } -pallet-assets = { workspace = true } -pallet-assets-freezer = { workspace = true } -pallet-aura = { workspace = true } -pallet-authorship = { workspace = true } -pallet-balances = { workspace = true } -pallet-migrations = { workspace = true } -pallet-multisig = { workspace = true } -pallet-nft-fractionalization = { workspace = true } -pallet-nfts = { workspace = true } -pallet-nfts-runtime-api = { workspace = true } -pallet-proxy = { workspace = true } -pallet-revive = { workspace = true } -pallet-session = { workspace = true } -pallet-state-trie-migration = { workspace = true } -pallet-timestamp = { workspace = true } -pallet-transaction-payment = { workspace = true } -pallet-transaction-payment-rpc-runtime-api = { workspace = true } -pallet-uniques = { workspace = true } -pallet-utility = { workspace = true } -sp-api = { workspace = true } -sp-block-builder = { workspace = true } -sp-consensus-aura = { workspace = true } -sp-core = { workspace = true } -sp-genesis-builder = { workspace = true } -sp-inherents = { workspace = true } -sp-io = { workspace = true } -sp-keyring = { workspace = true } -sp-offchain = { workspace = true } -sp-runtime = { workspace = true } -sp-session = { workspace = true } -sp-std = { workspace = true } -sp-storage = { workspace = true } -sp-transaction-pool = { workspace = true } -sp-version = { workspace = true } +sp-api.workspace = true +sp-block-builder.workspace = true +sp-consensus-aura.workspace = true +sp-core.workspace = true +sp-genesis-builder.workspace = true +sp-inherents.workspace = true +sp-io.workspace = true +sp-keyring.workspace = true +sp-offchain.workspace = true +sp-runtime.workspace = true +sp-session.workspace = true +sp-std.workspace = true +sp-storage.workspace = true +sp-transaction-pool.workspace = true +sp-version.workspace = true # num-traits feature needed for dex integer sq root: -primitive-types = { features = ["codec", "num-traits", "scale-info"], workspace = true } - -# Polkadot -pallet-xcm = { workspace = true } -pallet-xcm-benchmarks = { optional = true, workspace = true } -polkadot-parachain-primitives = { workspace = true } -polkadot-runtime-common = { workspace = true } -westend-runtime-constants = { workspace = true } -xcm = { workspace = true } -xcm-builder = { workspace = true } -xcm-executor = { workspace = true } -xcm-runtime-apis = { workspace = true } - -# Cumulus -assets-common = { workspace = true } -cumulus-pallet-aura-ext = { workspace = true } -cumulus-pallet-parachain-system = { workspace = true } -cumulus-pallet-session-benchmarking = { workspace = true } -cumulus-pallet-weight-reclaim = { workspace = true } -cumulus-pallet-xcm = { workspace = true } +assets-common.workspace = true +bp-asset-hub-rococo.workspace = true +bp-asset-hub-westend.workspace = true +bp-bridge-hub-rococo.workspace = true +bp-bridge-hub-westend.workspace = true +cumulus-pallet-aura-ext.workspace = true +cumulus-pallet-parachain-system.workspace = true +cumulus-pallet-session-benchmarking.workspace = true +cumulus-pallet-weight-reclaim.workspace = true +cumulus-pallet-xcm.workspace = true cumulus-pallet-xcmp-queue = { features = ["bridging"], workspace = true } -cumulus-primitives-aura = { workspace = true } -cumulus-primitives-core = { workspace = true } -cumulus-primitives-utility = { workspace = true } -pallet-collator-selection = { workspace = true } -pallet-message-queue = { workspace = true } -parachain-info = { workspace = true } -parachains-common = { workspace = true } +cumulus-primitives-aura.workspace = true +cumulus-primitives-core.workspace = true +cumulus-primitives-utility.workspace = true +pallet-collator-selection.workspace = true +pallet-message-queue.workspace = true +pallet-xcm-benchmarks = { optional = true, workspace = true } +pallet-xcm-bridge-hub-router.workspace = true +pallet-xcm.workspace = true +parachain-info.workspace = true +parachains-common.workspace = true +polkadot-parachain-primitives.workspace = true +polkadot-runtime-common.workspace = true +primitive-types = { features = ["codec", "num-traits", "scale-info"], workspace = true } +snowbridge-outbound-queue-primitives.workspace = true +snowbridge-pallet-system-frontend.workspace = true +snowbridge-runtime-common.workspace = true testnet-parachains-constants = { features = ["westend"], workspace = true } - -# Bridges -bp-asset-hub-rococo = { workspace = true } -bp-asset-hub-westend = { workspace = true } -bp-bridge-hub-rococo = { workspace = true } -bp-bridge-hub-westend = { workspace = true } -pallet-xcm-bridge-hub-router = { workspace = true } -snowbridge-outbound-queue-primitives = { workspace = true } -snowbridge-pallet-system-frontend = { workspace = true } -snowbridge-runtime-common = { workspace = true } +westend-runtime-constants.workspace = true +xcm-builder.workspace = true +xcm-executor.workspace = true +xcm-runtime-apis.workspace = true +xcm.workspace = true [dev-dependencies] alloy-core = { workspace = true, features = ["sol-types"] } -asset-test-utils = { workspace = true, default-features = true } -pallet-revive-fixtures = { workspace = true, default-features = true } -parachains-runtimes-test-utils = { workspace = true, default-features = true } +asset-test-utils = { default-features = true, workspace = true } +pallet-revive-fixtures = { default-features = true, workspace = true } +parachains-runtimes-test-utils = { default-features = true, workspace = true } [build-dependencies] substrate-wasm-builder = { optional = true, workspace = true, default-features = true } diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/bridge-primitives/Cargo.toml b/cumulus/parachains/runtimes/assets/asset-hub-westend/bridge-primitives/Cargo.toml index f078f8edcb9c8..95e58f6c72abb 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-westend/bridge-primitives/Cargo.toml +++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/bridge-primitives/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "bp-asset-hub-westend" description = "Primitives of AssetHubWestend parachain runtime." -version = "0.3.0" +version = "0.17.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -14,23 +14,17 @@ exclude-from-umbrella = true workspace = true [dependencies] +bp-bridge-hub-cumulus.workspace = true +bp-messages.workspace = true +bp-runtime.workspace = true +bp-xcm-bridge-hub-router.workspace = true codec = { workspace = true } +frame-support.workspace = true scale-info = { features = ["derive"], workspace = true } - -# Substrate Dependencies -frame-support = { workspace = true } -sp-api = { workspace = true } -sp-core = { workspace = true } - -# Bridge Dependencies -bp-bridge-hub-cumulus = { workspace = true } -bp-messages = { workspace = true } -bp-runtime = { workspace = true } -bp-xcm-bridge-hub-router = { workspace = true } +sp-api.workspace = true +sp-core.workspace = true testnet-parachains-constants = { features = ["westend"], workspace = true } - -# Polkadot dependencies -xcm = { workspace = true } +xcm.workspace = true [features] default = ["std"] diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs index 99d69b9c60bd0..7705d95cd7523 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs @@ -133,7 +133,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: alloc::borrow::Cow::Borrowed("westmint"), impl_name: alloc::borrow::Cow::Borrowed("westmint"), authoring_version: 1, - spec_version: 1_019_001, + spec_version: 1_019_002, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 16, diff --git a/cumulus/parachains/runtimes/assets/common/Cargo.toml b/cumulus/parachains/runtimes/assets/common/Cargo.toml index 69ccfca9da961..901f6fe856fb0 100644 --- a/cumulus/parachains/runtimes/assets/common/Cargo.toml +++ b/cumulus/parachains/runtimes/assets/common/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "assets-common" -version = "0.7.0" +version = "0.22.0" authors.workspace = true edition.workspace = true description = "Assets common utilities" @@ -13,31 +13,25 @@ workspace = true [dependencies] codec = { features = ["derive"], workspace = true } +cumulus-primitives-core.workspace = true +ethereum-standards.workspace = true +frame-support.workspace = true +frame-system.workspace = true impl-trait-for-tuples = { workspace = true } +pallet-asset-conversion.workspace = true +pallet-assets.workspace = true +pallet-revive-uapi = { workspace = true, features = ["scale"] } +pallet-revive.workspace = true +pallet-xcm.workspace = true +parachains-common.workspace = true scale-info = { features = ["derive"], workspace = true } +sp-api.workspace = true +sp-core.workspace = true +sp-runtime.workspace = true tracing = { workspace = true } - -# Substrate -frame-support = { workspace = true } -frame-system = { workspace = true } -pallet-asset-conversion = { workspace = true } -pallet-assets = { workspace = true } -pallet-revive = { workspace = true } -pallet-revive-uapi = { workspace = true, features = ["scale"] } -sp-api = { workspace = true } -sp-core = { workspace = true } -sp-runtime = { workspace = true } - -# Polkadot -pallet-xcm = { workspace = true } -xcm = { workspace = true } -xcm-builder = { workspace = true } -xcm-executor = { workspace = true } - -# Cumulus -cumulus-primitives-core = { workspace = true } -ethereum-standards = { workspace = true } -parachains-common = { workspace = true } +xcm-builder.workspace = true +xcm-executor.workspace = true +xcm.workspace = true [features] default = ["std"] diff --git a/cumulus/parachains/runtimes/assets/test-utils/Cargo.toml b/cumulus/parachains/runtimes/assets/test-utils/Cargo.toml index a4c83ea39890f..94128f1c72e4e 100644 --- a/cumulus/parachains/runtimes/assets/test-utils/Cargo.toml +++ b/cumulus/parachains/runtimes/assets/test-utils/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "asset-test-utils" -version = "7.0.0" +version = "24.0.0" authors.workspace = true edition.workspace = true description = "Test utils for Asset Hub runtimes." @@ -13,36 +13,28 @@ workspace = true [dependencies] codec = { features = ["derive", "max-encoded-len"], workspace = true } - -# Substrate -frame-support = { workspace = true } -frame-system = { workspace = true } -pallet-asset-conversion = { workspace = true } -pallet-assets = { workspace = true } -pallet-balances = { workspace = true } -pallet-session = { workspace = true } -pallet-timestamp = { workspace = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } - -# Cumulus -cumulus-pallet-parachain-system = { workspace = true } -cumulus-pallet-xcmp-queue = { workspace = true } -cumulus-primitives-core = { workspace = true } -pallet-collator-selection = { workspace = true } -parachain-info = { workspace = true } -parachains-common = { workspace = true } -parachains-runtimes-test-utils = { workspace = true } - -# Polkadot -pallet-xcm = { workspace = true } -xcm = { workspace = true } -xcm-builder = { workspace = true } -xcm-executor = { workspace = true } -xcm-runtime-apis = { workspace = true } - -# Bridges -pallet-xcm-bridge-hub-router = { workspace = true } +cumulus-pallet-parachain-system.workspace = true +cumulus-pallet-xcmp-queue.workspace = true +cumulus-primitives-core.workspace = true +frame-support.workspace = true +frame-system.workspace = true +pallet-asset-conversion.workspace = true +pallet-assets.workspace = true +pallet-balances.workspace = true +pallet-collator-selection.workspace = true +pallet-session.workspace = true +pallet-timestamp.workspace = true +pallet-xcm-bridge-hub-router.workspace = true +pallet-xcm.workspace = true +parachain-info.workspace = true +parachains-common.workspace = true +parachains-runtimes-test-utils.workspace = true +sp-io.workspace = true +sp-runtime.workspace = true +xcm-builder.workspace = true +xcm-executor.workspace = true +xcm-runtime-apis.workspace = true +xcm.workspace = true [features] default = ["std"] diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/Cargo.toml b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/Cargo.toml index 339506642b595..306fb83dd4fde 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/Cargo.toml +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bridge-hub-rococo-runtime" -version = "0.5.0" +version = "0.20.0" authors.workspace = true edition.workspace = true description = "Rococo's BridgeHub parachain runtime" @@ -15,118 +15,107 @@ workspace = true substrate-wasm-builder = { optional = true, workspace = true, default-features = true } [dependencies] +bp-asset-hub-rococo.workspace = true +bp-asset-hub-westend.workspace = true +bp-bridge-hub-rococo.workspace = true +bp-bridge-hub-westend.workspace = true +bp-header-chain.workspace = true +bp-messages.workspace = true +bp-parachains.workspace = true +bp-polkadot-bulletin.workspace = true +bp-polkadot-core.workspace = true +bp-relayers.workspace = true +bp-rococo.workspace = true +bp-runtime.workspace = true +bp-westend.workspace = true +bp-xcm-bridge-hub-router.workspace = true +bridge-hub-common.workspace = true +bridge-runtime-common.workspace = true codec = { features = ["derive"], workspace = true } +cumulus-pallet-aura-ext.workspace = true +cumulus-pallet-parachain-system.workspace = true +cumulus-pallet-session-benchmarking.workspace = true +cumulus-pallet-weight-reclaim.workspace = true +cumulus-pallet-xcm.workspace = true +cumulus-pallet-xcmp-queue = { features = ["bridging"], workspace = true } +cumulus-primitives-aura.workspace = true +cumulus-primitives-core.workspace = true +cumulus-primitives-utility.workspace = true +frame-benchmarking = { optional = true, workspace = true } +frame-executive.workspace = true +frame-metadata-hash-extension.workspace = true +frame-support.workspace = true +frame-system-benchmarking = { optional = true, workspace = true } +frame-system-rpc-runtime-api.workspace = true +frame-system.workspace = true +frame-try-runtime = { optional = true, workspace = true } hex-literal = { workspace = true, default-features = true } log = { workspace = true } +pallet-aura.workspace = true +pallet-authorship.workspace = true +pallet-balances.workspace = true +pallet-bridge-grandpa.workspace = true +pallet-bridge-messages.workspace = true +pallet-bridge-parachains.workspace = true +pallet-bridge-relayers.workspace = true +pallet-collator-selection.workspace = true +pallet-message-queue.workspace = true +pallet-multisig.workspace = true +pallet-session.workspace = true +pallet-timestamp.workspace = true +pallet-transaction-payment-rpc-runtime-api.workspace = true +pallet-transaction-payment.workspace = true +pallet-utility.workspace = true +pallet-xcm-benchmarks = { optional = true, workspace = true } +pallet-xcm-bridge-hub.workspace = true +pallet-xcm.workspace = true +parachain-info.workspace = true +parachains-common.workspace = true +polkadot-parachain-primitives.workspace = true +polkadot-runtime-common.workspace = true +rococo-runtime-constants.workspace = true scale-info = { features = ["derive"], workspace = true } serde = { optional = true, features = ["derive"], workspace = true, default-features = true } serde_json = { features = ["alloc"], workspace = true } - -# Substrate -frame-benchmarking = { optional = true, workspace = true } -frame-executive = { workspace = true } -frame-metadata-hash-extension = { workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } -frame-system-benchmarking = { optional = true, workspace = true } -frame-system-rpc-runtime-api = { workspace = true } -frame-try-runtime = { optional = true, workspace = true } -pallet-aura = { workspace = true } -pallet-authorship = { workspace = true } -pallet-balances = { workspace = true } -pallet-message-queue = { workspace = true } -pallet-multisig = { workspace = true } -pallet-session = { workspace = true } -pallet-timestamp = { workspace = true } -pallet-transaction-payment = { workspace = true } -pallet-transaction-payment-rpc-runtime-api = { workspace = true } -pallet-utility = { workspace = true } -sp-api = { workspace = true } -sp-block-builder = { workspace = true } -sp-consensus-aura = { workspace = true } -sp-core = { workspace = true } -sp-genesis-builder = { workspace = true } -sp-inherents = { workspace = true } -sp-io = { workspace = true } -sp-keyring = { workspace = true } -sp-offchain = { workspace = true } -sp-runtime = { workspace = true } -sp-session = { workspace = true } -sp-std = { workspace = true } -sp-storage = { workspace = true } -sp-transaction-pool = { workspace = true } -sp-version = { workspace = true } - -# Polkadot -pallet-xcm = { workspace = true } -pallet-xcm-benchmarks = { optional = true, workspace = true } -polkadot-parachain-primitives = { workspace = true } -polkadot-runtime-common = { workspace = true } -rococo-runtime-constants = { workspace = true } -xcm = { workspace = true } -xcm-builder = { workspace = true } -xcm-executor = { workspace = true } -xcm-runtime-apis = { workspace = true } - -# Cumulus -cumulus-pallet-aura-ext = { workspace = true } -cumulus-pallet-parachain-system = { workspace = true } -cumulus-pallet-session-benchmarking = { workspace = true } -cumulus-pallet-weight-reclaim = { workspace = true } -cumulus-pallet-xcm = { workspace = true } -cumulus-pallet-xcmp-queue = { features = ["bridging"], workspace = true } -cumulus-primitives-aura = { workspace = true } -cumulus-primitives-core = { workspace = true } -cumulus-primitives-utility = { workspace = true } -pallet-collator-selection = { workspace = true } -parachain-info = { workspace = true } -parachains-common = { workspace = true } +snowbridge-beacon-primitives.workspace = true +snowbridge-core.workspace = true +snowbridge-inbound-queue-primitives.workspace = true +snowbridge-merkle-tree.workspace = true +snowbridge-outbound-queue-primitives.workspace = true +snowbridge-outbound-queue-runtime-api.workspace = true +snowbridge-pallet-ethereum-client.workspace = true +snowbridge-pallet-inbound-queue.workspace = true +snowbridge-pallet-outbound-queue.workspace = true +snowbridge-pallet-system.workspace = true +snowbridge-runtime-common.workspace = true +snowbridge-system-runtime-api.workspace = true +sp-api.workspace = true +sp-block-builder.workspace = true +sp-consensus-aura.workspace = true +sp-core.workspace = true +sp-genesis-builder.workspace = true +sp-inherents.workspace = true +sp-io.workspace = true +sp-keyring.workspace = true +sp-offchain.workspace = true +sp-runtime.workspace = true +sp-session.workspace = true +sp-std.workspace = true +sp-storage.workspace = true +sp-transaction-pool.workspace = true +sp-version.workspace = true testnet-parachains-constants = { features = ["rococo"], workspace = true } - -# Bridges -bp-asset-hub-rococo = { workspace = true } -bp-asset-hub-westend = { workspace = true } -bp-bridge-hub-rococo = { workspace = true } -bp-bridge-hub-westend = { workspace = true } -bp-header-chain = { workspace = true } -bp-messages = { workspace = true } -bp-parachains = { workspace = true } -bp-polkadot-bulletin = { workspace = true } -bp-polkadot-core = { workspace = true } -bp-relayers = { workspace = true } -bp-rococo = { workspace = true } -bp-runtime = { workspace = true } -bp-westend = { workspace = true } -bp-xcm-bridge-hub-router = { workspace = true } -bridge-runtime-common = { workspace = true } -pallet-bridge-grandpa = { workspace = true } -pallet-bridge-messages = { workspace = true } -pallet-bridge-parachains = { workspace = true } -pallet-bridge-relayers = { workspace = true } -pallet-xcm-bridge-hub = { workspace = true } - -# Ethereum Bridge (Snowbridge) -snowbridge-beacon-primitives = { workspace = true } -snowbridge-core = { workspace = true } -snowbridge-inbound-queue-primitives = { workspace = true } -snowbridge-merkle-tree = { workspace = true } -snowbridge-outbound-queue-primitives = { workspace = true } -snowbridge-outbound-queue-runtime-api = { workspace = true } -snowbridge-pallet-ethereum-client = { workspace = true } -snowbridge-pallet-inbound-queue = { workspace = true } -snowbridge-pallet-outbound-queue = { workspace = true } -snowbridge-pallet-system = { workspace = true } -snowbridge-runtime-common = { workspace = true } -snowbridge-system-runtime-api = { workspace = true } - -bridge-hub-common = { workspace = true } +xcm-builder.workspace = true +xcm-executor.workspace = true +xcm-runtime-apis.workspace = true +xcm.workspace = true [dev-dependencies] -bridge-hub-test-utils = { workspace = true, default-features = true } -bridge-runtime-common = { features = ["integrity-test"], workspace = true, default-features = true } -pallet-bridge-relayers = { features = ["integrity-test"], workspace = true } -parachains-runtimes-test-utils = { workspace = true, default-features = true } -snowbridge-runtime-test-common = { workspace = true, default-features = true } +bridge-hub-test-utils = { default-features = true, workspace = true } +bridge-runtime-common = { features = ["integrity-test"], default-features = true, workspace = true } +pallet-bridge-relayers = { features = ["integrity-test"], workspace = true, default-features = false } +parachains-runtimes-test-utils = { default-features = true, workspace = true } +snowbridge-runtime-test-common = { default-features = true, workspace = true } [features] default = ["std"] diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/bridge-primitives/Cargo.toml b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/bridge-primitives/Cargo.toml index 4341e18556e86..903cb3d58db94 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/bridge-primitives/Cargo.toml +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/bridge-primitives/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "bp-bridge-hub-rococo" description = "Primitives of BridgeHubRococo parachain runtime." -version = "0.7.0" +version = "0.22.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -14,19 +14,15 @@ exclude-from-umbrella = true workspace = true [dependencies] +bp-bridge-hub-cumulus.workspace = true +bp-messages.workspace = true +bp-runtime.workspace = true +bp-xcm-bridge-hub.workspace = true codec = { features = ["derive"], workspace = true } - -# Bridge Dependencies -bp-bridge-hub-cumulus = { workspace = true } -bp-messages = { workspace = true } -bp-runtime = { workspace = true } -bp-xcm-bridge-hub = { workspace = true } - -# Substrate Based Dependencies -frame-support = { workspace = true } -sp-api = { workspace = true } -sp-runtime = { workspace = true } -sp-std = { workspace = true } +frame-support.workspace = true +sp-api.workspace = true +sp-runtime.workspace = true +sp-std.workspace = true [features] default = ["std"] diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs index 85e95fe61fa93..dab96d503d85f 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs @@ -253,7 +253,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: alloc::borrow::Cow::Borrowed("bridge-hub-rococo"), impl_name: alloc::borrow::Cow::Borrowed("bridge-hub-rococo"), authoring_version: 1, - spec_version: 1_019_001, + spec_version: 1_019_002, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 6, diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/Cargo.toml b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/Cargo.toml index be4788005f136..b5804358112ee 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/Cargo.toml +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bridge-hub-westend-runtime" -version = "0.3.0" +version = "0.17.0" authors.workspace = true edition.workspace = true description = "Westend's BridgeHub parachain runtime" @@ -12,122 +12,111 @@ repository.workspace = true workspace = true [dependencies] +bp-asset-hub-rococo.workspace = true +bp-asset-hub-westend.workspace = true +bp-bridge-hub-rococo.workspace = true +bp-bridge-hub-westend.workspace = true +bp-header-chain.workspace = true +bp-messages.workspace = true +bp-parachains.workspace = true +bp-polkadot-core.workspace = true +bp-relayers.workspace = true +bp-rococo.workspace = true +bp-runtime.workspace = true +bp-westend.workspace = true +bp-xcm-bridge-hub-router.workspace = true +bridge-hub-common.workspace = true +bridge-runtime-common.workspace = true codec = { features = ["derive"], workspace = true } -hex-literal = { workspace = true, default-features = true } -scale-info = { features = ["derive"], workspace = true } -serde = { optional = true, features = ["derive"], workspace = true, default-features = true } -serde_json = { features = ["alloc"], workspace = true } -tracing = { workspace = true } - -# Substrate +cumulus-pallet-aura-ext.workspace = true +cumulus-pallet-parachain-system.workspace = true +cumulus-pallet-session-benchmarking.workspace = true +cumulus-pallet-weight-reclaim.workspace = true +cumulus-pallet-xcm.workspace = true +cumulus-pallet-xcmp-queue = { features = ["bridging"], workspace = true } +cumulus-primitives-aura.workspace = true +cumulus-primitives-core.workspace = true +cumulus-primitives-utility.workspace = true frame-benchmarking = { optional = true, workspace = true } -frame-executive = { workspace = true } -frame-metadata-hash-extension = { workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-executive.workspace = true +frame-metadata-hash-extension.workspace = true +frame-support.workspace = true frame-system-benchmarking = { optional = true, workspace = true } -frame-system-rpc-runtime-api = { workspace = true } +frame-system-rpc-runtime-api.workspace = true +frame-system.workspace = true frame-try-runtime = { optional = true, workspace = true } -pallet-aura = { workspace = true } -pallet-authorship = { workspace = true } -pallet-balances = { workspace = true } -pallet-message-queue = { workspace = true } -pallet-multisig = { workspace = true } -pallet-session = { workspace = true } -pallet-timestamp = { workspace = true } -pallet-transaction-payment = { workspace = true } -pallet-transaction-payment-rpc-runtime-api = { workspace = true } -pallet-utility = { workspace = true } -sp-api = { workspace = true } -sp-block-builder = { workspace = true } -sp-consensus-aura = { workspace = true } -sp-core = { workspace = true } -sp-genesis-builder = { workspace = true } -sp-inherents = { workspace = true } -sp-io = { workspace = true } -sp-keyring = { workspace = true } -sp-offchain = { workspace = true } -sp-runtime = { workspace = true } -sp-session = { workspace = true } -sp-std = { workspace = true } -sp-storage = { workspace = true } -sp-transaction-pool = { workspace = true } -sp-version = { workspace = true } - -# Polkadot -pallet-xcm = { workspace = true } +hex-literal = { workspace = true, default-features = true } +pallet-aura.workspace = true +pallet-authorship.workspace = true +pallet-balances.workspace = true +pallet-bridge-grandpa.workspace = true +pallet-bridge-messages.workspace = true +pallet-bridge-parachains.workspace = true +pallet-bridge-relayers.workspace = true +pallet-collator-selection.workspace = true +pallet-message-queue.workspace = true +pallet-multisig.workspace = true +pallet-session.workspace = true +pallet-timestamp.workspace = true +pallet-transaction-payment-rpc-runtime-api.workspace = true +pallet-transaction-payment.workspace = true +pallet-utility.workspace = true pallet-xcm-benchmarks = { optional = true, workspace = true } -polkadot-parachain-primitives = { workspace = true } -polkadot-runtime-common = { workspace = true } -westend-runtime-constants = { workspace = true } -xcm = { workspace = true } -xcm-builder = { workspace = true } -xcm-executor = { workspace = true } -xcm-runtime-apis = { workspace = true } - -# Cumulus -cumulus-pallet-aura-ext = { workspace = true } -cumulus-pallet-parachain-system = { workspace = true } -cumulus-pallet-session-benchmarking = { workspace = true } -cumulus-pallet-weight-reclaim = { workspace = true } -cumulus-pallet-xcm = { workspace = true } -cumulus-pallet-xcmp-queue = { features = ["bridging"], workspace = true } -cumulus-primitives-aura = { workspace = true } -cumulus-primitives-core = { workspace = true } -cumulus-primitives-utility = { workspace = true } - -pallet-collator-selection = { workspace = true } -parachain-info = { workspace = true } -parachains-common = { workspace = true } +pallet-xcm-bridge-hub.workspace = true +pallet-xcm.workspace = true +parachain-info.workspace = true +parachains-common.workspace = true +polkadot-parachain-primitives.workspace = true +polkadot-runtime-common.workspace = true +scale-info = { features = ["derive"], workspace = true } +serde = { optional = true, features = ["derive"], workspace = true, default-features = true } +serde_json = { features = ["alloc"], workspace = true } +snowbridge-beacon-primitives.workspace = true +snowbridge-core.workspace = true +snowbridge-inbound-queue-primitives.workspace = true +snowbridge-merkle-tree.workspace = true +snowbridge-outbound-queue-primitives.workspace = true +snowbridge-outbound-queue-runtime-api.workspace = true +snowbridge-outbound-queue-v2-runtime-api.workspace = true +snowbridge-pallet-ethereum-client.workspace = true +snowbridge-pallet-inbound-queue-v2.workspace = true +snowbridge-pallet-inbound-queue.workspace = true +snowbridge-pallet-outbound-queue-v2.workspace = true +snowbridge-pallet-outbound-queue.workspace = true +snowbridge-pallet-system-v2.workspace = true +snowbridge-pallet-system.workspace = true +snowbridge-runtime-common.workspace = true +snowbridge-system-runtime-api.workspace = true +snowbridge-system-v2-runtime-api.workspace = true +sp-api.workspace = true +sp-block-builder.workspace = true +sp-consensus-aura.workspace = true +sp-core.workspace = true +sp-genesis-builder.workspace = true +sp-inherents.workspace = true +sp-io.workspace = true +sp-keyring.workspace = true +sp-offchain.workspace = true +sp-runtime.workspace = true +sp-session.workspace = true +sp-std.workspace = true +sp-storage.workspace = true +sp-transaction-pool.workspace = true +sp-version.workspace = true testnet-parachains-constants = { features = ["westend"], workspace = true } - -# Bridges -bp-asset-hub-rococo = { workspace = true } -bp-asset-hub-westend = { workspace = true } -bp-bridge-hub-rococo = { workspace = true } -bp-bridge-hub-westend = { workspace = true } -bp-header-chain = { workspace = true } -bp-messages = { workspace = true } -bp-parachains = { workspace = true } -bp-polkadot-core = { workspace = true } -bp-relayers = { workspace = true } -bp-rococo = { workspace = true } -bp-runtime = { workspace = true } -bp-westend = { workspace = true } -bp-xcm-bridge-hub-router = { workspace = true } -bridge-hub-common = { workspace = true } -bridge-runtime-common = { workspace = true } -pallet-bridge-grandpa = { workspace = true } -pallet-bridge-messages = { workspace = true } -pallet-bridge-parachains = { workspace = true } -pallet-bridge-relayers = { workspace = true } -pallet-xcm-bridge-hub = { workspace = true } - -# Ethereum Bridge (Snowbridge) -snowbridge-beacon-primitives = { workspace = true } -snowbridge-core = { workspace = true } -snowbridge-inbound-queue-primitives = { workspace = true } -snowbridge-merkle-tree = { workspace = true } -snowbridge-outbound-queue-primitives = { workspace = true } -snowbridge-outbound-queue-runtime-api = { workspace = true } -snowbridge-outbound-queue-v2-runtime-api = { workspace = true } -snowbridge-pallet-ethereum-client = { workspace = true } -snowbridge-pallet-inbound-queue = { workspace = true } -snowbridge-pallet-inbound-queue-v2 = { workspace = true } -snowbridge-pallet-outbound-queue = { workspace = true } -snowbridge-pallet-outbound-queue-v2 = { workspace = true } -snowbridge-pallet-system = { workspace = true } -snowbridge-pallet-system-v2 = { workspace = true } -snowbridge-runtime-common = { workspace = true } -snowbridge-system-runtime-api = { workspace = true } -snowbridge-system-v2-runtime-api = { workspace = true } +tracing = { workspace = true } +westend-runtime-constants.workspace = true +xcm-builder.workspace = true +xcm-executor.workspace = true +xcm-runtime-apis.workspace = true +xcm.workspace = true [dev-dependencies] -bridge-hub-test-utils = { workspace = true, default-features = true } -bridge-runtime-common = { features = ["integrity-test"], workspace = true, default-features = true } -pallet-bridge-relayers = { features = ["integrity-test"], workspace = true } -parachains-runtimes-test-utils = { workspace = true, default-features = true } -snowbridge-runtime-test-common = { workspace = true, default-features = true } +bridge-hub-test-utils = { default-features = true, workspace = true } +bridge-runtime-common = { features = ["integrity-test"], default-features = true, workspace = true } +pallet-bridge-relayers = { features = ["integrity-test"], workspace = true, default-features = false } +parachains-runtimes-test-utils = { default-features = true, workspace = true } +snowbridge-runtime-test-common = { default-features = true, workspace = true } [build-dependencies] substrate-wasm-builder = { optional = true, workspace = true, default-features = true } diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/bridge-primitives/Cargo.toml b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/bridge-primitives/Cargo.toml index 9ddddf646f8c8..68b0c83c1988c 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/bridge-primitives/Cargo.toml +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/bridge-primitives/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "bp-bridge-hub-westend" description = "Primitives of BridgeHubWestend parachain runtime." -version = "0.3.0" +version = "0.18.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -14,19 +14,15 @@ exclude-from-umbrella = true workspace = true [dependencies] +bp-bridge-hub-cumulus.workspace = true +bp-messages.workspace = true +bp-runtime.workspace = true +bp-xcm-bridge-hub.workspace = true codec = { features = ["derive"], workspace = true } - -# Bridge Dependencies -bp-bridge-hub-cumulus = { workspace = true } -bp-messages = { workspace = true } -bp-runtime = { workspace = true } -bp-xcm-bridge-hub = { workspace = true } - -# Substrate Based Dependencies -frame-support = { workspace = true } -sp-api = { workspace = true } -sp-runtime = { workspace = true } -sp-std = { workspace = true } +frame-support.workspace = true +sp-api.workspace = true +sp-runtime.workspace = true +sp-std.workspace = true [features] default = ["std"] diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/lib.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/lib.rs index 09f24d42647b4..426aea9fe4c29 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/lib.rs @@ -243,7 +243,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: alloc::borrow::Cow::Borrowed("bridge-hub-westend"), impl_name: alloc::borrow::Cow::Borrowed("bridge-hub-westend"), authoring_version: 1, - spec_version: 1_019_001, + spec_version: 1_019_002, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 6, diff --git a/cumulus/parachains/runtimes/bridge-hubs/common/Cargo.toml b/cumulus/parachains/runtimes/bridge-hubs/common/Cargo.toml index 83f8171f3c404..94fb18d9896ef 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/common/Cargo.toml +++ b/cumulus/parachains/runtimes/bridge-hubs/common/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bridge-hub-common" -version = "0.1.0" +version = "0.14.0" authors.workspace = true edition.workspace = true description = "Bridge hub common utilities" @@ -13,17 +13,17 @@ workspace = true [dependencies] codec = { features = ["derive"], workspace = true } -cumulus-primitives-core = { workspace = true } -frame-support = { workspace = true } -pallet-message-queue = { workspace = true } +cumulus-primitives-core.workspace = true +frame-support.workspace = true +pallet-message-queue.workspace = true scale-info = { features = ["derive"], workspace = true } -snowbridge-core = { workspace = true } -sp-core = { workspace = true } -sp-runtime = { workspace = true } -sp-std = { workspace = true } -xcm = { workspace = true } -xcm-builder = { workspace = true } -xcm-executor = { workspace = true } +snowbridge-core.workspace = true +sp-core.workspace = true +sp-runtime.workspace = true +sp-std.workspace = true +xcm-builder.workspace = true +xcm-executor.workspace = true +xcm.workspace = true [features] default = ["std"] diff --git a/cumulus/parachains/runtimes/bridge-hubs/test-utils/Cargo.toml b/cumulus/parachains/runtimes/bridge-hubs/test-utils/Cargo.toml index dc390d48cc777..7f88c5b0f7b40 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/test-utils/Cargo.toml +++ b/cumulus/parachains/runtimes/bridge-hubs/test-utils/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bridge-hub-test-utils" -version = "0.7.0" +version = "0.23.0" authors.workspace = true edition.workspace = true description = "Utils for BridgeHub testing" @@ -12,49 +12,44 @@ repository.workspace = true workspace = true [dependencies] +asset-test-utils.default-features = true +asset-test-utils.workspace = true +bp-header-chain.workspace = true +bp-messages.workspace = true +bp-parachains.workspace = true +bp-polkadot-core.workspace = true +bp-relayers.workspace = true +bp-runtime.workspace = true +bp-test-utils.workspace = true codec = { features = ["derive", "max-encoded-len"], workspace = true } +cumulus-pallet-parachain-system.workspace = true +cumulus-pallet-xcmp-queue.workspace = true +frame-support.workspace = true +frame-system.workspace = true impl-trait-for-tuples = { workspace = true } log = { workspace = true } - -# Substrate -frame-support = { workspace = true } -frame-system = { workspace = true } -pallet-balances = { workspace = true } -pallet-timestamp = { workspace = true } -pallet-utility = { workspace = true } -sp-core = { workspace = true } -sp-io = { workspace = true } -sp-keyring = { workspace = true, default-features = true } -sp-runtime = { workspace = true } -sp-std = { workspace = true } -sp-tracing = { workspace = true, default-features = true } - -# Cumulus -asset-test-utils = { workspace = true, default-features = true } -cumulus-pallet-parachain-system = { workspace = true } -cumulus-pallet-xcmp-queue = { workspace = true } -parachains-common = { workspace = true } -parachains-runtimes-test-utils = { workspace = true } - -# Polkadot -pallet-xcm = { workspace = true } -xcm = { workspace = true } -xcm-builder = { workspace = true } -xcm-executor = { workspace = true } - -# Bridges -bp-header-chain = { workspace = true } -bp-messages = { workspace = true } -bp-parachains = { workspace = true } -bp-polkadot-core = { workspace = true } -bp-relayers = { workspace = true } -bp-runtime = { workspace = true } -bp-test-utils = { workspace = true } -pallet-bridge-grandpa = { workspace = true } +pallet-balances.workspace = true +pallet-bridge-grandpa.workspace = true pallet-bridge-messages = { features = ["test-helpers"], workspace = true } -pallet-bridge-parachains = { workspace = true } -pallet-bridge-relayers = { workspace = true } -pallet-xcm-bridge-hub = { workspace = true } +pallet-bridge-parachains.workspace = true +pallet-bridge-relayers.workspace = true +pallet-timestamp.workspace = true +pallet-utility.workspace = true +pallet-xcm-bridge-hub.workspace = true +pallet-xcm.workspace = true +parachains-common.workspace = true +parachains-runtimes-test-utils.workspace = true +sp-core.workspace = true +sp-io.workspace = true +sp-keyring.default-features = true +sp-keyring.workspace = true +sp-runtime.workspace = true +sp-std.workspace = true +sp-tracing.default-features = true +sp-tracing.workspace = true +xcm-builder.workspace = true +xcm-executor.workspace = true +xcm.workspace = true [features] default = ["std"] diff --git a/cumulus/parachains/runtimes/collectives/collectives-westend/Cargo.toml b/cumulus/parachains/runtimes/collectives/collectives-westend/Cargo.toml index 23a79deb598c2..23ee689c0d0d8 100644 --- a/cumulus/parachains/runtimes/collectives/collectives-westend/Cargo.toml +++ b/cumulus/parachains/runtimes/collectives/collectives-westend/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "collectives-westend-runtime" -version = "3.0.0" +version = "20.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -13,88 +13,81 @@ workspace = true [dependencies] codec = { features = ["derive", "max-encoded-len"], workspace = true } -hex-literal = { workspace = true, default-features = true } -log = { workspace = true } -scale-info = { features = ["derive"], workspace = true } -serde_json = { features = ["alloc"], workspace = true } - -# Substrate +cumulus-pallet-aura-ext.workspace = true +cumulus-pallet-parachain-system.workspace = true +cumulus-pallet-session-benchmarking.workspace = true +cumulus-pallet-weight-reclaim.workspace = true +cumulus-pallet-xcm.workspace = true +cumulus-pallet-xcmp-queue.workspace = true +cumulus-primitives-aura.workspace = true +cumulus-primitives-core.workspace = true +cumulus-primitives-utility.workspace = true frame-benchmarking = { optional = true, workspace = true } -frame-executive = { workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-executive.workspace = true +frame-support.workspace = true frame-system-benchmarking = { optional = true, workspace = true } -frame-system-rpc-runtime-api = { workspace = true } +frame-system-rpc-runtime-api.workspace = true +frame-system.workspace = true frame-try-runtime = { optional = true, workspace = true } -pallet-alliance = { workspace = true } -pallet-asset-rate = { workspace = true } -pallet-aura = { workspace = true } -pallet-authorship = { workspace = true } -pallet-balances = { workspace = true } -pallet-collective = { workspace = true } -pallet-core-fellowship = { workspace = true } -pallet-multisig = { workspace = true } -pallet-preimage = { workspace = true } -pallet-proxy = { workspace = true } -pallet-ranked-collective = { workspace = true } -pallet-referenda = { workspace = true } -pallet-salary = { workspace = true } -pallet-scheduler = { workspace = true } -pallet-session = { workspace = true } -pallet-state-trie-migration = { workspace = true } -pallet-timestamp = { workspace = true } -pallet-transaction-payment = { workspace = true } -pallet-transaction-payment-rpc-runtime-api = { workspace = true } -pallet-treasury = { workspace = true } -pallet-utility = { workspace = true } -sp-api = { workspace = true } -sp-arithmetic = { workspace = true } -sp-block-builder = { workspace = true } -sp-consensus-aura = { workspace = true } -sp-core = { workspace = true } -sp-genesis-builder = { workspace = true } -sp-inherents = { workspace = true } -sp-keyring = { workspace = true } -sp-offchain = { workspace = true } -sp-runtime = { workspace = true } -sp-session = { workspace = true } -sp-std = { workspace = true } -sp-storage = { workspace = true } -sp-transaction-pool = { workspace = true } -sp-version = { workspace = true } - -# Polkadot -pallet-xcm = { workspace = true } +hex-literal = { workspace = true, default-features = true } +log = { workspace = true } +pallet-alliance.workspace = true +pallet-asset-rate.workspace = true +pallet-aura.workspace = true +pallet-authorship.workspace = true +pallet-balances.workspace = true +pallet-collator-selection.workspace = true +pallet-collective-content.workspace = true +pallet-collective.workspace = true +pallet-core-fellowship.workspace = true +pallet-message-queue.workspace = true +pallet-multisig.workspace = true +pallet-preimage.workspace = true +pallet-proxy.workspace = true +pallet-ranked-collective.workspace = true +pallet-referenda.workspace = true +pallet-salary.workspace = true +pallet-scheduler.workspace = true +pallet-session.workspace = true +pallet-state-trie-migration.workspace = true +pallet-timestamp.workspace = true +pallet-transaction-payment-rpc-runtime-api.workspace = true +pallet-transaction-payment.workspace = true +pallet-treasury.workspace = true +pallet-utility.workspace = true pallet-xcm-benchmarks = { optional = true, workspace = true } -polkadot-parachain-primitives = { workspace = true } -polkadot-runtime-common = { workspace = true } -westend-runtime-constants = { workspace = true } -xcm = { workspace = true } -xcm-builder = { workspace = true } -xcm-executor = { workspace = true } -xcm-runtime-apis = { workspace = true } - -# Cumulus -cumulus-pallet-aura-ext = { workspace = true } -cumulus-pallet-parachain-system = { workspace = true } -cumulus-pallet-session-benchmarking = { workspace = true } -cumulus-pallet-weight-reclaim = { workspace = true } -cumulus-pallet-xcm = { workspace = true } -cumulus-pallet-xcmp-queue = { workspace = true } -cumulus-primitives-aura = { workspace = true } -cumulus-primitives-core = { workspace = true } -cumulus-primitives-utility = { workspace = true } -pallet-message-queue = { workspace = true } - -pallet-collator-selection = { workspace = true } -pallet-collective-content = { workspace = true } -parachain-info = { workspace = true } -parachains-common = { workspace = true } +pallet-xcm.workspace = true +parachain-info.workspace = true +parachains-common.workspace = true +polkadot-parachain-primitives.workspace = true +polkadot-runtime-common.workspace = true +scale-info = { features = ["derive"], workspace = true } +serde_json = { features = ["alloc"], workspace = true } +sp-api.workspace = true +sp-arithmetic.workspace = true +sp-block-builder.workspace = true +sp-consensus-aura.workspace = true +sp-core.workspace = true +sp-genesis-builder.workspace = true +sp-inherents.workspace = true +sp-keyring.workspace = true +sp-offchain.workspace = true +sp-runtime.workspace = true +sp-session.workspace = true +sp-std.workspace = true +sp-storage.workspace = true +sp-transaction-pool.workspace = true +sp-version.workspace = true testnet-parachains-constants = { features = ["westend"], workspace = true } +westend-runtime-constants.workspace = true +xcm-builder.workspace = true +xcm-executor.workspace = true +xcm-runtime-apis.workspace = true +xcm.workspace = true [dev-dependencies] -parachains-runtimes-test-utils = { workspace = true, default-features = true } -sp-io = { features = ["std"], workspace = true, default-features = true } +parachains-runtimes-test-utils = { default-features = true, workspace = true } +sp-io = { features = ["std"], default-features = true, workspace = true } [build-dependencies] substrate-wasm-builder = { optional = true, workspace = true, default-features = true } diff --git a/cumulus/parachains/runtimes/collectives/collectives-westend/src/lib.rs b/cumulus/parachains/runtimes/collectives/collectives-westend/src/lib.rs index 3e82c78b6dc6b..dc4c8d60250e6 100644 --- a/cumulus/parachains/runtimes/collectives/collectives-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/collectives/collectives-westend/src/lib.rs @@ -126,7 +126,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: alloc::borrow::Cow::Borrowed("collectives-westend"), impl_name: alloc::borrow::Cow::Borrowed("collectives-westend"), authoring_version: 1, - spec_version: 1_019_001, + spec_version: 1_019_002, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 6, diff --git a/cumulus/parachains/runtimes/constants/Cargo.toml b/cumulus/parachains/runtimes/constants/Cargo.toml index 01b023e0fb89b..ef479407dedae 100644 --- a/cumulus/parachains/runtimes/constants/Cargo.toml +++ b/cumulus/parachains/runtimes/constants/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "testnet-parachains-constants" -version = "1.0.0" +version = "14.0.0" authors.workspace = true edition.workspace = true description = "Common constants for Testnet Parachains runtimes" @@ -15,20 +15,14 @@ workspace = true targets = ["x86_64-unknown-linux-gnu"] [dependencies] -smallvec = { workspace = true, default-features = true } - -# Substrate -frame-support = { workspace = true } -sp-runtime = { workspace = true } - -# Polkadot -polkadot-core-primitives = { workspace = true } +cumulus-primitives-core.workspace = true +frame-support.workspace = true +polkadot-core-primitives.workspace = true rococo-runtime-constants = { optional = true, workspace = true } +smallvec = { workspace = true, default-features = true } +sp-runtime.workspace = true westend-runtime-constants = { optional = true, workspace = true } -xcm = { workspace = true } - -# Cumulus -cumulus-primitives-core = { workspace = true } +xcm.workspace = true [features] default = ["std"] diff --git a/cumulus/parachains/runtimes/coretime/coretime-rococo/Cargo.toml b/cumulus/parachains/runtimes/coretime/coretime-rococo/Cargo.toml index 796e4cee03284..fe9c4ff3ba950 100644 --- a/cumulus/parachains/runtimes/coretime/coretime-rococo/Cargo.toml +++ b/cumulus/parachains/runtimes/coretime/coretime-rococo/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "coretime-rococo-runtime" -version = "0.1.0" +version = "0.16.0" authors.workspace = true edition.workspace = true description = "Rococo's Coretime parachain runtime" @@ -13,75 +13,69 @@ workspace = true [dependencies] codec = { features = ["derive"], workspace = true } -log = { workspace = true } -scale-info = { features = ["derive"], workspace = true } -serde = { optional = true, features = ["derive"], workspace = true, default-features = true } -serde_json = { features = ["alloc"], workspace = true } - -# Substrate +cumulus-pallet-aura-ext.workspace = true +cumulus-pallet-parachain-system.workspace = true +cumulus-pallet-session-benchmarking.workspace = true +cumulus-pallet-weight-reclaim.workspace = true +cumulus-pallet-xcm.workspace = true +cumulus-pallet-xcmp-queue.workspace = true +cumulus-primitives-aura.workspace = true +cumulus-primitives-core.workspace = true +cumulus-primitives-utility.workspace = true frame-benchmarking = { optional = true, workspace = true } -frame-executive = { workspace = true } -frame-metadata-hash-extension = { workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-executive.workspace = true +frame-metadata-hash-extension.workspace = true +frame-support.workspace = true frame-system-benchmarking = { optional = true, workspace = true } -frame-system-rpc-runtime-api = { workspace = true } +frame-system-rpc-runtime-api.workspace = true +frame-system.workspace = true frame-try-runtime = { optional = true, workspace = true } -pallet-aura = { workspace = true } -pallet-authorship = { workspace = true } -pallet-balances = { workspace = true } -pallet-broker = { workspace = true } -pallet-message-queue = { workspace = true } -pallet-multisig = { workspace = true } -pallet-proxy = { workspace = true } -pallet-session = { workspace = true } -pallet-sudo = { workspace = true } -pallet-timestamp = { workspace = true } -pallet-transaction-payment = { workspace = true } -pallet-transaction-payment-rpc-runtime-api = { workspace = true } -pallet-utility = { workspace = true } -sp-api = { workspace = true } -sp-block-builder = { workspace = true } -sp-consensus-aura = { workspace = true } -sp-core = { workspace = true } -sp-genesis-builder = { workspace = true } -sp-inherents = { workspace = true } -sp-keyring = { workspace = true } -sp-offchain = { workspace = true } -sp-runtime = { workspace = true } -sp-session = { workspace = true } -sp-storage = { workspace = true } -sp-transaction-pool = { workspace = true } -sp-version = { workspace = true } - -# Polkadot -pallet-xcm = { workspace = true } +log = { workspace = true } +pallet-aura.workspace = true +pallet-authorship.workspace = true +pallet-balances.workspace = true +pallet-broker.workspace = true +pallet-collator-selection.workspace = true +pallet-message-queue.workspace = true +pallet-multisig.workspace = true +pallet-proxy.workspace = true +pallet-session.workspace = true +pallet-sudo.workspace = true +pallet-timestamp.workspace = true +pallet-transaction-payment-rpc-runtime-api.workspace = true +pallet-transaction-payment.workspace = true +pallet-utility.workspace = true pallet-xcm-benchmarks = { optional = true, workspace = true } -polkadot-parachain-primitives = { workspace = true } -polkadot-runtime-common = { workspace = true } -rococo-runtime-constants = { workspace = true } -xcm = { workspace = true } -xcm-builder = { workspace = true } -xcm-executor = { workspace = true } -xcm-runtime-apis = { workspace = true } - -# Cumulus -cumulus-pallet-aura-ext = { workspace = true } -cumulus-pallet-parachain-system = { workspace = true } -cumulus-pallet-session-benchmarking = { workspace = true } -cumulus-pallet-weight-reclaim = { workspace = true } -cumulus-pallet-xcm = { workspace = true } -cumulus-pallet-xcmp-queue = { workspace = true } -cumulus-primitives-aura = { workspace = true } -cumulus-primitives-core = { workspace = true } -cumulus-primitives-utility = { workspace = true } -pallet-collator-selection = { workspace = true } -parachain-info = { workspace = true } -parachains-common = { workspace = true } +pallet-xcm.workspace = true +parachain-info.workspace = true +parachains-common.workspace = true +polkadot-parachain-primitives.workspace = true +polkadot-runtime-common.workspace = true +rococo-runtime-constants.workspace = true +scale-info = { features = ["derive"], workspace = true } +serde = { optional = true, features = ["derive"], workspace = true, default-features = true } +serde_json = { features = ["alloc"], workspace = true } +sp-api.workspace = true +sp-block-builder.workspace = true +sp-consensus-aura.workspace = true +sp-core.workspace = true +sp-genesis-builder.workspace = true +sp-inherents.workspace = true +sp-keyring.workspace = true +sp-offchain.workspace = true +sp-runtime.workspace = true +sp-session.workspace = true +sp-storage.workspace = true +sp-transaction-pool.workspace = true +sp-version.workspace = true testnet-parachains-constants = { features = ["rococo"], workspace = true } +xcm-builder.workspace = true +xcm-executor.workspace = true +xcm-runtime-apis.workspace = true +xcm.workspace = true [dev-dependencies] -parachains-runtimes-test-utils = { workspace = true } +parachains-runtimes-test-utils = { workspace = true, default-features = false } [build-dependencies] substrate-wasm-builder = { optional = true, workspace = true, default-features = true } diff --git a/cumulus/parachains/runtimes/coretime/coretime-rococo/src/lib.rs b/cumulus/parachains/runtimes/coretime/coretime-rococo/src/lib.rs index 553529b8f2b1a..9d6ba40fec724 100644 --- a/cumulus/parachains/runtimes/coretime/coretime-rococo/src/lib.rs +++ b/cumulus/parachains/runtimes/coretime/coretime-rococo/src/lib.rs @@ -159,7 +159,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: alloc::borrow::Cow::Borrowed("coretime-rococo"), impl_name: alloc::borrow::Cow::Borrowed("coretime-rococo"), authoring_version: 1, - spec_version: 1_019_001, + spec_version: 1_019_002, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 2, diff --git a/cumulus/parachains/runtimes/coretime/coretime-westend/Cargo.toml b/cumulus/parachains/runtimes/coretime/coretime-westend/Cargo.toml index a2f178b043495..7377d480e4725 100644 --- a/cumulus/parachains/runtimes/coretime/coretime-westend/Cargo.toml +++ b/cumulus/parachains/runtimes/coretime/coretime-westend/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "coretime-westend-runtime" -version = "0.1.0" +version = "0.16.0" authors.workspace = true edition.workspace = true description = "Westend's Coretime parachain runtime" @@ -13,76 +13,69 @@ workspace = true [dependencies] codec = { features = ["derive"], workspace = true } -log = { workspace = true } -scale-info = { features = ["derive"], workspace = true } -serde = { optional = true, features = ["derive"], workspace = true, default-features = true } -serde_json = { features = ["alloc"], workspace = true } - -# Substrate +cumulus-pallet-aura-ext.workspace = true +cumulus-pallet-parachain-system.workspace = true +cumulus-pallet-session-benchmarking.workspace = true +cumulus-pallet-weight-reclaim.workspace = true +cumulus-pallet-xcm.workspace = true +cumulus-pallet-xcmp-queue.workspace = true +cumulus-primitives-aura.workspace = true +cumulus-primitives-core.workspace = true +cumulus-primitives-utility.workspace = true frame-benchmarking = { optional = true, workspace = true } -frame-executive = { workspace = true } -frame-metadata-hash-extension = { workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-executive.workspace = true +frame-metadata-hash-extension.workspace = true +frame-support.workspace = true frame-system-benchmarking = { optional = true, workspace = true } -frame-system-rpc-runtime-api = { workspace = true } +frame-system-rpc-runtime-api.workspace = true +frame-system.workspace = true frame-try-runtime = { optional = true, workspace = true } -pallet-aura = { workspace = true } -pallet-authorship = { workspace = true } -pallet-balances = { workspace = true } -pallet-broker = { workspace = true } -pallet-message-queue = { workspace = true } -pallet-multisig = { workspace = true } -pallet-proxy = { workspace = true } -pallet-session = { workspace = true } -pallet-sudo = { workspace = true } -pallet-timestamp = { workspace = true } -pallet-transaction-payment = { workspace = true } -pallet-transaction-payment-rpc-runtime-api = { workspace = true } -pallet-utility = { workspace = true } -sp-api = { workspace = true } -sp-block-builder = { workspace = true } -sp-consensus-aura = { workspace = true } -sp-core = { workspace = true } -sp-genesis-builder = { workspace = true } -sp-inherents = { workspace = true } -sp-keyring = { workspace = true } -sp-offchain = { workspace = true } -sp-runtime = { workspace = true } -sp-session = { workspace = true } -sp-storage = { workspace = true } -sp-transaction-pool = { workspace = true } -sp-version = { workspace = true } - -# Polkadot -pallet-xcm = { workspace = true } +log = { workspace = true } +pallet-aura.workspace = true +pallet-authorship.workspace = true +pallet-balances.workspace = true +pallet-broker.workspace = true +pallet-collator-selection.workspace = true +pallet-message-queue.workspace = true +pallet-multisig.workspace = true +pallet-proxy.workspace = true +pallet-session.workspace = true +pallet-sudo.workspace = true +pallet-timestamp.workspace = true +pallet-transaction-payment-rpc-runtime-api.workspace = true +pallet-transaction-payment.workspace = true +pallet-utility.workspace = true pallet-xcm-benchmarks = { optional = true, workspace = true } -polkadot-parachain-primitives = { workspace = true } -polkadot-runtime-common = { workspace = true } -westend-runtime-constants = { workspace = true } -xcm = { workspace = true } -xcm-builder = { workspace = true } -xcm-executor = { workspace = true } -xcm-runtime-apis = { workspace = true } - -# Cumulus -cumulus-pallet-aura-ext = { workspace = true } -cumulus-pallet-parachain-system = { workspace = true } -cumulus-pallet-session-benchmarking = { workspace = true } -cumulus-pallet-weight-reclaim = { workspace = true } -cumulus-pallet-xcm = { workspace = true } -cumulus-pallet-xcmp-queue = { workspace = true } -cumulus-primitives-aura = { workspace = true } -cumulus-primitives-core = { workspace = true } -cumulus-primitives-utility = { workspace = true } - -pallet-collator-selection = { workspace = true } -parachain-info = { workspace = true } -parachains-common = { workspace = true } +pallet-xcm.workspace = true +parachain-info.workspace = true +parachains-common.workspace = true +polkadot-parachain-primitives.workspace = true +polkadot-runtime-common.workspace = true +scale-info = { features = ["derive"], workspace = true } +serde = { optional = true, features = ["derive"], workspace = true, default-features = true } +serde_json = { features = ["alloc"], workspace = true } +sp-api.workspace = true +sp-block-builder.workspace = true +sp-consensus-aura.workspace = true +sp-core.workspace = true +sp-genesis-builder.workspace = true +sp-inherents.workspace = true +sp-keyring.workspace = true +sp-offchain.workspace = true +sp-runtime.workspace = true +sp-session.workspace = true +sp-storage.workspace = true +sp-transaction-pool.workspace = true +sp-version.workspace = true testnet-parachains-constants = { features = ["westend"], workspace = true } +westend-runtime-constants.workspace = true +xcm-builder.workspace = true +xcm-executor.workspace = true +xcm-runtime-apis.workspace = true +xcm.workspace = true [dev-dependencies] -parachains-runtimes-test-utils = { workspace = true, default-features = true } +parachains-runtimes-test-utils = { default-features = true, workspace = true } [build-dependencies] substrate-wasm-builder = { optional = true, workspace = true, default-features = true } diff --git a/cumulus/parachains/runtimes/coretime/coretime-westend/src/lib.rs b/cumulus/parachains/runtimes/coretime/coretime-westend/src/lib.rs index d4256fb47ae46..98af506d39eed 100644 --- a/cumulus/parachains/runtimes/coretime/coretime-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/coretime/coretime-westend/src/lib.rs @@ -159,7 +159,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: alloc::borrow::Cow::Borrowed("coretime-westend"), impl_name: alloc::borrow::Cow::Borrowed("coretime-westend"), authoring_version: 1, - spec_version: 1_019_001, + spec_version: 1_019_002, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 2, diff --git a/cumulus/parachains/runtimes/glutton/glutton-westend/Cargo.toml b/cumulus/parachains/runtimes/glutton/glutton-westend/Cargo.toml index 5fa923c889260..e1dcdeb3c9ebc 100644 --- a/cumulus/parachains/runtimes/glutton/glutton-westend/Cargo.toml +++ b/cumulus/parachains/runtimes/glutton/glutton-westend/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "glutton-westend-runtime" -version = "3.0.0" +version = "18.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -13,53 +13,48 @@ workspace = true [dependencies] codec = { features = ["derive"], workspace = true } -scale-info = { features = ["derive"], workspace = true } -serde_json = { features = ["alloc"], workspace = true } - -# Substrate +cumulus-pallet-aura-ext.workspace = true +cumulus-pallet-parachain-system.workspace = true +cumulus-pallet-xcm.workspace = true +cumulus-primitives-aura.workspace = true +cumulus-primitives-core.workspace = true frame-benchmarking = { optional = true, workspace = true } -frame-executive = { workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-executive.workspace = true +frame-support.workspace = true frame-system-benchmarking = { optional = true, workspace = true } -frame-system-rpc-runtime-api = { workspace = true } +frame-system-rpc-runtime-api.workspace = true +frame-system.workspace = true frame-try-runtime = { optional = true, workspace = true } -pallet-aura = { workspace = true } -pallet-glutton = { workspace = true } -pallet-message-queue = { workspace = true } -pallet-sudo = { workspace = true } -pallet-timestamp = { workspace = true } -sp-api = { workspace = true } -sp-block-builder = { workspace = true } -sp-consensus-aura = { workspace = true } -sp-core = { workspace = true } -sp-genesis-builder = { workspace = true } -sp-inherents = { workspace = true } -sp-keyring = { workspace = true } -sp-offchain = { workspace = true } -sp-runtime = { workspace = true } -sp-session = { workspace = true } -sp-storage = { workspace = true } -sp-transaction-pool = { workspace = true } -sp-version = { workspace = true } - -# Polkadot -xcm = { workspace = true } -xcm-builder = { workspace = true } -xcm-executor = { workspace = true } - -# Cumulus -cumulus-pallet-aura-ext = { workspace = true } -cumulus-pallet-parachain-system = { workspace = true } -cumulus-pallet-xcm = { workspace = true } -cumulus-primitives-aura = { workspace = true } -cumulus-primitives-core = { workspace = true } -parachain-info = { workspace = true } -parachains-common = { workspace = true } +pallet-aura.workspace = true +pallet-glutton.workspace = true +pallet-message-queue.workspace = true +pallet-sudo.workspace = true +pallet-timestamp.workspace = true +parachain-info.workspace = true +parachains-common.workspace = true +scale-info = { features = ["derive"], workspace = true } +serde_json = { features = ["alloc"], workspace = true } +sp-api.workspace = true +sp-block-builder.workspace = true +sp-consensus-aura.workspace = true +sp-core.workspace = true +sp-genesis-builder.workspace = true +sp-inherents.workspace = true +sp-keyring.workspace = true +sp-offchain.workspace = true +sp-runtime.workspace = true +sp-session.workspace = true +sp-storage.workspace = true +sp-transaction-pool.workspace = true +sp-version.workspace = true testnet-parachains-constants = { features = ["westend"], workspace = true } +xcm-builder.workspace = true +xcm-executor.workspace = true +xcm.workspace = true [build-dependencies] -substrate-wasm-builder = { workspace = true, default-features = true } +substrate-wasm-builder.default-features = true +substrate-wasm-builder.workspace = true [features] default = ["std"] diff --git a/cumulus/parachains/runtimes/glutton/glutton-westend/src/lib.rs b/cumulus/parachains/runtimes/glutton/glutton-westend/src/lib.rs index 4d852c5946d3a..40545f2af75d2 100644 --- a/cumulus/parachains/runtimes/glutton/glutton-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/glutton/glutton-westend/src/lib.rs @@ -103,7 +103,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: alloc::borrow::Cow::Borrowed("glutton-westend"), impl_name: alloc::borrow::Cow::Borrowed("glutton-westend"), authoring_version: 1, - spec_version: 1_019_001, + spec_version: 1_019_002, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 1, diff --git a/cumulus/parachains/runtimes/people/people-rococo/Cargo.toml b/cumulus/parachains/runtimes/people/people-rococo/Cargo.toml index fe97d06f10303..3dad25b8c12fc 100644 --- a/cumulus/parachains/runtimes/people/people-rococo/Cargo.toml +++ b/cumulus/parachains/runtimes/people/people-rococo/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "people-rococo-runtime" -version = "0.1.0" +version = "0.16.0" authors.workspace = true edition.workspace = true description = "Rococo's People parachain runtime" @@ -13,75 +13,69 @@ workspace = true [dependencies] codec = { features = ["derive"], workspace = true } +cumulus-pallet-aura-ext.workspace = true +cumulus-pallet-parachain-system.workspace = true +cumulus-pallet-session-benchmarking.workspace = true +cumulus-pallet-weight-reclaim.workspace = true +cumulus-pallet-xcm.workspace = true +cumulus-pallet-xcmp-queue.workspace = true +cumulus-primitives-aura.workspace = true +cumulus-primitives-core.workspace = true +cumulus-primitives-utility.workspace = true enumflags2 = { workspace = true } -log = { workspace = true } -scale-info = { features = ["derive"], workspace = true } -serde = { optional = true, features = ["derive"], workspace = true, default-features = true } -serde_json = { features = ["alloc"], workspace = true } - -# Substrate frame-benchmarking = { optional = true, workspace = true } -frame-executive = { workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-executive.workspace = true +frame-support.workspace = true frame-system-benchmarking = { optional = true, workspace = true } -frame-system-rpc-runtime-api = { workspace = true } +frame-system-rpc-runtime-api.workspace = true +frame-system.workspace = true frame-try-runtime = { optional = true, workspace = true } -pallet-aura = { workspace = true } -pallet-authorship = { workspace = true } -pallet-balances = { workspace = true } -pallet-identity = { workspace = true } -pallet-message-queue = { workspace = true } -pallet-migrations = { workspace = true } -pallet-multisig = { workspace = true } -pallet-proxy = { workspace = true } -pallet-session = { workspace = true } -pallet-timestamp = { workspace = true } -pallet-transaction-payment = { workspace = true } -pallet-transaction-payment-rpc-runtime-api = { workspace = true } -pallet-utility = { workspace = true } -sp-api = { workspace = true } -sp-block-builder = { workspace = true } -sp-consensus-aura = { workspace = true } -sp-core = { workspace = true } -sp-genesis-builder = { workspace = true } -sp-inherents = { workspace = true } -sp-keyring = { workspace = true } -sp-offchain = { workspace = true } -sp-runtime = { workspace = true } -sp-session = { workspace = true } -sp-storage = { workspace = true } -sp-transaction-pool = { workspace = true } -sp-version = { workspace = true } - -# Polkadot -pallet-xcm = { workspace = true } +log = { workspace = true } +pallet-aura.workspace = true +pallet-authorship.workspace = true +pallet-balances.workspace = true +pallet-collator-selection.workspace = true +pallet-identity.workspace = true +pallet-message-queue.workspace = true +pallet-migrations.workspace = true +pallet-multisig.workspace = true +pallet-proxy.workspace = true +pallet-session.workspace = true +pallet-timestamp.workspace = true +pallet-transaction-payment-rpc-runtime-api.workspace = true +pallet-transaction-payment.workspace = true +pallet-utility.workspace = true pallet-xcm-benchmarks = { optional = true, workspace = true } -polkadot-parachain-primitives = { workspace = true } -polkadot-runtime-common = { workspace = true } -rococo-runtime-constants = { workspace = true } -xcm = { workspace = true } -xcm-builder = { workspace = true } -xcm-executor = { workspace = true } -xcm-runtime-apis = { workspace = true } - -# Cumulus -cumulus-pallet-aura-ext = { workspace = true } -cumulus-pallet-parachain-system = { workspace = true } -cumulus-pallet-session-benchmarking = { workspace = true } -cumulus-pallet-weight-reclaim = { workspace = true } -cumulus-pallet-xcm = { workspace = true } -cumulus-pallet-xcmp-queue = { workspace = true } -cumulus-primitives-aura = { workspace = true } -cumulus-primitives-core = { workspace = true } -cumulus-primitives-utility = { workspace = true } -pallet-collator-selection = { workspace = true } -parachain-info = { workspace = true } -parachains-common = { workspace = true } +pallet-xcm.workspace = true +parachain-info.workspace = true +parachains-common.workspace = true +polkadot-parachain-primitives.workspace = true +polkadot-runtime-common.workspace = true +rococo-runtime-constants.workspace = true +scale-info = { features = ["derive"], workspace = true } +serde = { optional = true, features = ["derive"], workspace = true, default-features = true } +serde_json = { features = ["alloc"], workspace = true } +sp-api.workspace = true +sp-block-builder.workspace = true +sp-consensus-aura.workspace = true +sp-core.workspace = true +sp-genesis-builder.workspace = true +sp-inherents.workspace = true +sp-keyring.workspace = true +sp-offchain.workspace = true +sp-runtime.workspace = true +sp-session.workspace = true +sp-storage.workspace = true +sp-transaction-pool.workspace = true +sp-version.workspace = true testnet-parachains-constants = { features = ["rococo"], workspace = true } +xcm-builder.workspace = true +xcm-executor.workspace = true +xcm-runtime-apis.workspace = true +xcm.workspace = true [dev-dependencies] -parachains-runtimes-test-utils = { workspace = true, default-features = true } +parachains-runtimes-test-utils = { default-features = true, workspace = true } [build-dependencies] substrate-wasm-builder = { optional = true, workspace = true, default-features = true } diff --git a/cumulus/parachains/runtimes/people/people-rococo/src/lib.rs b/cumulus/parachains/runtimes/people/people-rococo/src/lib.rs index f99d81fa3efa8..67d1c87e05d60 100644 --- a/cumulus/parachains/runtimes/people/people-rococo/src/lib.rs +++ b/cumulus/parachains/runtimes/people/people-rococo/src/lib.rs @@ -146,7 +146,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: alloc::borrow::Cow::Borrowed("people-rococo"), impl_name: alloc::borrow::Cow::Borrowed("people-rococo"), authoring_version: 1, - spec_version: 1_019_001, + spec_version: 1_019_002, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 1, diff --git a/cumulus/parachains/runtimes/people/people-westend/Cargo.toml b/cumulus/parachains/runtimes/people/people-westend/Cargo.toml index 9c19b12319f86..00459036e56aa 100644 --- a/cumulus/parachains/runtimes/people/people-westend/Cargo.toml +++ b/cumulus/parachains/runtimes/people/people-westend/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "people-westend-runtime" -version = "0.1.0" +version = "0.16.0" authors.workspace = true edition.workspace = true description = "Westend's People parachain runtime" @@ -13,76 +13,70 @@ workspace = true [dependencies] codec = { features = ["derive"], workspace = true } +cumulus-pallet-aura-ext.workspace = true +cumulus-pallet-parachain-system.workspace = true +cumulus-pallet-session-benchmarking.workspace = true +cumulus-pallet-weight-reclaim.workspace = true +cumulus-pallet-xcm.workspace = true +cumulus-pallet-xcmp-queue.workspace = true +cumulus-primitives-aura.workspace = true +cumulus-primitives-core.workspace = true +cumulus-primitives-utility.workspace = true enumflags2 = { workspace = true } -log = { workspace = true } -scale-info = { features = ["derive"], workspace = true } -serde = { optional = true, features = ["derive"], workspace = true, default-features = true } -serde_json = { features = ["alloc"], workspace = true } - -# Substrate frame-benchmarking = { optional = true, workspace = true } -frame-executive = { workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-executive.workspace = true +frame-support.workspace = true frame-system-benchmarking = { optional = true, workspace = true } -frame-system-rpc-runtime-api = { workspace = true } +frame-system-rpc-runtime-api.workspace = true +frame-system.workspace = true frame-try-runtime = { optional = true, workspace = true } -pallet-aura = { workspace = true } -pallet-authorship = { workspace = true } -pallet-balances = { workspace = true } -pallet-identity = { workspace = true } -pallet-message-queue = { workspace = true } -pallet-migrations = { workspace = true } -pallet-multisig = { workspace = true } -pallet-proxy = { workspace = true } -pallet-session = { workspace = true } -pallet-timestamp = { workspace = true } -pallet-transaction-payment = { workspace = true } -pallet-transaction-payment-rpc-runtime-api = { workspace = true } -pallet-utility = { workspace = true } -sp-api = { workspace = true } -sp-block-builder = { workspace = true } -sp-consensus-aura = { workspace = true } -sp-core = { workspace = true } -sp-genesis-builder = { workspace = true } -sp-inherents = { workspace = true } -sp-keyring = { workspace = true } -sp-offchain = { workspace = true } -sp-runtime = { workspace = true } -sp-session = { workspace = true } -sp-statement-store = { workspace = true } -sp-storage = { workspace = true } -sp-transaction-pool = { workspace = true } -sp-version = { workspace = true } - -# Polkadot -pallet-xcm = { workspace = true } +log = { workspace = true } +pallet-aura.workspace = true +pallet-authorship.workspace = true +pallet-balances.workspace = true +pallet-collator-selection.workspace = true +pallet-identity.workspace = true +pallet-message-queue.workspace = true +pallet-migrations.workspace = true +pallet-multisig.workspace = true +pallet-proxy.workspace = true +pallet-session.workspace = true +pallet-timestamp.workspace = true +pallet-transaction-payment-rpc-runtime-api.workspace = true +pallet-transaction-payment.workspace = true +pallet-utility.workspace = true pallet-xcm-benchmarks = { optional = true, workspace = true } -polkadot-parachain-primitives = { workspace = true } -polkadot-runtime-common = { workspace = true } -westend-runtime-constants = { workspace = true } -xcm = { workspace = true } -xcm-builder = { workspace = true } -xcm-executor = { workspace = true } -xcm-runtime-apis = { workspace = true } - -# Cumulus -cumulus-pallet-aura-ext = { workspace = true } -cumulus-pallet-parachain-system = { workspace = true } -cumulus-pallet-session-benchmarking = { workspace = true } -cumulus-pallet-weight-reclaim = { workspace = true } -cumulus-pallet-xcm = { workspace = true } -cumulus-pallet-xcmp-queue = { workspace = true } -cumulus-primitives-aura = { workspace = true } -cumulus-primitives-core = { workspace = true } -cumulus-primitives-utility = { workspace = true } -pallet-collator-selection = { workspace = true } -parachain-info = { workspace = true } -parachains-common = { workspace = true } +pallet-xcm.workspace = true +parachain-info.workspace = true +parachains-common.workspace = true +polkadot-parachain-primitives.workspace = true +polkadot-runtime-common.workspace = true +scale-info = { features = ["derive"], workspace = true } +serde = { optional = true, features = ["derive"], workspace = true, default-features = true } +serde_json = { features = ["alloc"], workspace = true } +sp-api.workspace = true +sp-block-builder.workspace = true +sp-consensus-aura.workspace = true +sp-core.workspace = true +sp-genesis-builder.workspace = true +sp-inherents.workspace = true +sp-keyring.workspace = true +sp-offchain.workspace = true +sp-runtime.workspace = true +sp-session.workspace = true +sp-statement-store.workspace = true +sp-storage.workspace = true +sp-transaction-pool.workspace = true +sp-version.workspace = true testnet-parachains-constants = { features = ["westend"], workspace = true } +westend-runtime-constants.workspace = true +xcm-builder.workspace = true +xcm-executor.workspace = true +xcm-runtime-apis.workspace = true +xcm.workspace = true [dev-dependencies] -parachains-runtimes-test-utils = { workspace = true, default-features = true } +parachains-runtimes-test-utils = { default-features = true, workspace = true } [build-dependencies] substrate-wasm-builder = { optional = true, workspace = true, default-features = true } diff --git a/cumulus/parachains/runtimes/people/people-westend/src/lib.rs b/cumulus/parachains/runtimes/people/people-westend/src/lib.rs index 3636add232239..2e864470e80dd 100644 --- a/cumulus/parachains/runtimes/people/people-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/people/people-westend/src/lib.rs @@ -149,7 +149,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: alloc::borrow::Cow::Borrowed("people-westend"), impl_name: alloc::borrow::Cow::Borrowed("people-westend"), authoring_version: 1, - spec_version: 1_019_001, + spec_version: 1_019_002, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 2, diff --git a/cumulus/parachains/runtimes/test-utils/Cargo.toml b/cumulus/parachains/runtimes/test-utils/Cargo.toml index 07d9da5e7a4e6..63f01a9ab9d21 100644 --- a/cumulus/parachains/runtimes/test-utils/Cargo.toml +++ b/cumulus/parachains/runtimes/test-utils/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "parachains-runtimes-test-utils" -version = "7.0.0" +version = "23.0.0" authors.workspace = true edition.workspace = true description = "Utils for Runtimes testing" @@ -13,35 +13,30 @@ workspace = true [dependencies] codec = { features = ["derive", "max-encoded-len"], workspace = true } - -# Substrate -frame-support = { workspace = true } -frame-system = { workspace = true } -pallet-balances = { workspace = true } -pallet-session = { workspace = true } -pallet-timestamp = { workspace = true } -sp-consensus-aura = { workspace = true } -sp-core = { workspace = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } -sp-tracing = { workspace = true, default-features = true } - -# Cumulus -cumulus-pallet-parachain-system = { workspace = true } -cumulus-pallet-xcmp-queue = { workspace = true } -cumulus-primitives-core = { workspace = true } -cumulus-primitives-parachain-inherent = { workspace = true } -cumulus-test-relay-sproof-builder = { workspace = true } -pallet-collator-selection = { workspace = true } -parachain-info = { workspace = true } -parachains-common = { workspace = true } - -# Polkadot -pallet-xcm = { workspace = true } -polkadot-parachain-primitives = { workspace = true } -xcm = { workspace = true } -xcm-executor = { workspace = true } -xcm-runtime-apis = { workspace = true } +cumulus-pallet-parachain-system.workspace = true +cumulus-pallet-xcmp-queue.workspace = true +cumulus-primitives-core.workspace = true +cumulus-primitives-parachain-inherent.workspace = true +cumulus-test-relay-sproof-builder.workspace = true +frame-support.workspace = true +frame-system.workspace = true +pallet-balances.workspace = true +pallet-collator-selection.workspace = true +pallet-session.workspace = true +pallet-timestamp.workspace = true +pallet-xcm.workspace = true +parachain-info.workspace = true +parachains-common.workspace = true +polkadot-parachain-primitives.workspace = true +sp-consensus-aura.workspace = true +sp-core.workspace = true +sp-io.workspace = true +sp-runtime.workspace = true +sp-tracing.default-features = true +sp-tracing.workspace = true +xcm-executor.workspace = true +xcm-runtime-apis.workspace = true +xcm.workspace = true [features] default = ["std"] diff --git a/cumulus/parachains/runtimes/testing/penpal/Cargo.toml b/cumulus/parachains/runtimes/testing/penpal/Cargo.toml index a79d02c3e7236..da322de298a41 100644 --- a/cumulus/parachains/runtimes/testing/penpal/Cargo.toml +++ b/cumulus/parachains/runtimes/testing/penpal/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "penpal-runtime" -version = "0.14.0" +version = "0.30.0" authors = ["Anonymous"] description = "A parachain for communication back and forth with XCM of assets and uniques." license = "Unlicense" @@ -15,71 +15,65 @@ workspace = true targets = ["x86_64-unknown-linux-gnu"] [dependencies] +assets-common.workspace = true codec = { features = ["derive"], workspace = true } +cumulus-pallet-aura-ext.workspace = true +cumulus-pallet-parachain-system.workspace = true +cumulus-pallet-session-benchmarking.workspace = true +cumulus-pallet-xcm.workspace = true +cumulus-pallet-xcmp-queue.workspace = true +cumulus-primitives-core.workspace = true +cumulus-primitives-utility.workspace = true +frame-benchmarking = { optional = true, workspace = true } +frame-executive.workspace = true +frame-support.workspace = true +frame-system-benchmarking = { optional = true, workspace = true } +frame-system-rpc-runtime-api.workspace = true +frame-system.workspace = true +frame-try-runtime = { optional = true, workspace = true } hex-literal = { optional = true, workspace = true, default-features = true } log = { workspace = true } +pallet-asset-conversion.workspace = true +pallet-asset-tx-payment.workspace = true +pallet-assets.workspace = true +pallet-aura.workspace = true +pallet-authorship.workspace = true +pallet-balances.workspace = true +pallet-collator-selection.workspace = true +pallet-message-queue.workspace = true +pallet-revive.workspace = true +pallet-session.workspace = true +pallet-sudo.workspace = true +pallet-timestamp.workspace = true +pallet-transaction-payment-rpc-runtime-api.workspace = true +pallet-transaction-payment.workspace = true +pallet-xcm.workspace = true +parachain-info.workspace = true +parachains-common.workspace = true +polkadot-parachain-primitives.workspace = true +polkadot-primitives.workspace = true +polkadot-runtime-common.workspace = true scale-info = { features = ["derive"], workspace = true } serde_json = { features = ["alloc"], workspace = true } smallvec = { workspace = true, default-features = true } - -# Substrate -frame-benchmarking = { optional = true, workspace = true } -frame-executive = { workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } -frame-system-benchmarking = { optional = true, workspace = true } -frame-system-rpc-runtime-api = { workspace = true } -frame-try-runtime = { optional = true, workspace = true } -pallet-asset-conversion = { workspace = true } -pallet-asset-tx-payment = { workspace = true } -pallet-assets = { workspace = true } -pallet-aura = { workspace = true } -pallet-authorship = { workspace = true } -pallet-balances = { workspace = true } -pallet-revive = { workspace = true } -pallet-session = { workspace = true } -pallet-sudo = { workspace = true } -pallet-timestamp = { workspace = true } -pallet-transaction-payment = { workspace = true } -pallet-transaction-payment-rpc-runtime-api = { workspace = true } -sp-api = { workspace = true } -sp-block-builder = { workspace = true } -sp-consensus-aura = { workspace = true } -sp-core = { workspace = true } -sp-genesis-builder = { workspace = true } -sp-inherents = { workspace = true } -sp-keyring = { workspace = true } -sp-offchain = { workspace = true } -sp-runtime = { workspace = true } -sp-session = { workspace = true } -sp-storage = { workspace = true } -sp-transaction-pool = { workspace = true } -sp-version = { workspace = true } - -# Polkadot -pallet-xcm = { workspace = true } -polkadot-parachain-primitives = { workspace = true } -polkadot-primitives = { workspace = true } -polkadot-runtime-common = { workspace = true } -xcm = { workspace = true } -xcm-builder = { workspace = true } -xcm-executor = { workspace = true } -xcm-runtime-apis = { workspace = true } - -# Cumulus -assets-common = { workspace = true } -cumulus-pallet-aura-ext = { workspace = true } -cumulus-pallet-parachain-system = { workspace = true } -cumulus-pallet-session-benchmarking = { workspace = true } -cumulus-pallet-xcm = { workspace = true } -cumulus-pallet-xcmp-queue = { workspace = true } -cumulus-primitives-core = { workspace = true } -cumulus-primitives-utility = { workspace = true } -pallet-collator-selection = { workspace = true } -pallet-message-queue = { workspace = true } -parachain-info = { workspace = true } -parachains-common = { workspace = true } +sp-api.workspace = true +sp-block-builder.workspace = true +sp-consensus-aura.workspace = true +sp-core.workspace = true +sp-genesis-builder.workspace = true +sp-inherents.workspace = true +sp-keyring.workspace = true +sp-offchain.workspace = true +sp-runtime.workspace = true +sp-session.workspace = true +sp-storage.workspace = true +sp-transaction-pool.workspace = true +sp-version.workspace = true testnet-parachains-constants = { features = ["westend"], workspace = true } +xcm-builder.workspace = true +xcm-executor.workspace = true +xcm-runtime-apis.workspace = true +xcm.workspace = true primitive-types = { workspace = true, default-features = false, features = [ "codec", diff --git a/cumulus/parachains/runtimes/testing/rococo-parachain/Cargo.toml b/cumulus/parachains/runtimes/testing/rococo-parachain/Cargo.toml index b78a592c59593..910d2fa0e979c 100644 --- a/cumulus/parachains/runtimes/testing/rococo-parachain/Cargo.toml +++ b/cumulus/parachains/runtimes/testing/rococo-parachain/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rococo-parachain-runtime" -version = "0.6.0" +version = "0.21.0" authors.workspace = true edition.workspace = true description = "Simple runtime used by the rococo parachain(s)" @@ -13,56 +13,50 @@ workspace = true [dependencies] codec = { features = ["derive"], workspace = true } +cumulus-pallet-aura-ext.workspace = true +cumulus-pallet-parachain-system.workspace = true +cumulus-pallet-weight-reclaim.workspace = true +cumulus-pallet-xcm.workspace = true +cumulus-pallet-xcmp-queue.workspace = true +cumulus-ping.workspace = true +cumulus-primitives-aura.workspace = true +cumulus-primitives-core.workspace = true +cumulus-primitives-utility.workspace = true +frame-benchmarking = { optional = true, workspace = true } +frame-executive.workspace = true +frame-support.workspace = true +frame-system-rpc-runtime-api.workspace = true +frame-system.workspace = true +pallet-assets.workspace = true +pallet-aura.workspace = true +pallet-balances.workspace = true +pallet-message-queue.workspace = true +pallet-sudo.workspace = true +pallet-timestamp.workspace = true +pallet-transaction-payment-rpc-runtime-api.workspace = true +pallet-transaction-payment.workspace = true +pallet-xcm.workspace = true +parachain-info.workspace = true +parachains-common.workspace = true +polkadot-parachain-primitives.workspace = true +polkadot-runtime-common.workspace = true scale-info = { features = ["derive"], workspace = true } serde_json = { features = ["alloc"], workspace = true } - -# Substrate -frame-benchmarking = { optional = true, workspace = true } -frame-executive = { workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } -frame-system-rpc-runtime-api = { workspace = true } -pallet-assets = { workspace = true } -pallet-aura = { workspace = true } -pallet-balances = { workspace = true } -pallet-sudo = { workspace = true } -pallet-timestamp = { workspace = true } -pallet-transaction-payment = { workspace = true } -pallet-transaction-payment-rpc-runtime-api = { workspace = true } -sp-api = { workspace = true } -sp-block-builder = { workspace = true } -sp-consensus-aura = { workspace = true } -sp-core = { workspace = true } -sp-genesis-builder = { workspace = true } -sp-inherents = { workspace = true } -sp-keyring = { workspace = true } -sp-offchain = { workspace = true } -sp-runtime = { workspace = true } -sp-session = { workspace = true } -sp-transaction-pool = { workspace = true } -sp-version = { workspace = true } - -# Polkadot -pallet-xcm = { workspace = true } -polkadot-parachain-primitives = { workspace = true } -polkadot-runtime-common = { workspace = true } -xcm = { workspace = true } -xcm-builder = { workspace = true } -xcm-executor = { workspace = true } - -# Cumulus -cumulus-pallet-aura-ext = { workspace = true } -cumulus-pallet-parachain-system = { workspace = true } -cumulus-pallet-weight-reclaim = { workspace = true } -cumulus-pallet-xcm = { workspace = true } -cumulus-pallet-xcmp-queue = { workspace = true } -cumulus-ping = { workspace = true } -cumulus-primitives-aura = { workspace = true } -cumulus-primitives-core = { workspace = true } -cumulus-primitives-utility = { workspace = true } -pallet-message-queue = { workspace = true } -parachain-info = { workspace = true } -parachains-common = { workspace = true } +sp-api.workspace = true +sp-block-builder.workspace = true +sp-consensus-aura.workspace = true +sp-core.workspace = true +sp-genesis-builder.workspace = true +sp-inherents.workspace = true +sp-keyring.workspace = true +sp-offchain.workspace = true +sp-runtime.workspace = true +sp-session.workspace = true +sp-transaction-pool.workspace = true +sp-version.workspace = true +xcm-builder.workspace = true +xcm-executor.workspace = true +xcm.workspace = true [build-dependencies] substrate-wasm-builder = { optional = true, workspace = true, default-features = true } diff --git a/cumulus/parachains/runtimes/testing/yet-another-parachain/Cargo.toml b/cumulus/parachains/runtimes/testing/yet-another-parachain/Cargo.toml index 9ff8322f57c0d..be3a14a6f0eae 100644 --- a/cumulus/parachains/runtimes/testing/yet-another-parachain/Cargo.toml +++ b/cumulus/parachains/runtimes/testing/yet-another-parachain/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "yet-another-parachain-runtime" -version = "0.6.0" +version = "0.2.0" authors.workspace = true edition.workspace = true description = "Simple runtime used by the testing parachain(s)" @@ -13,61 +13,55 @@ workspace = true [dependencies] codec = { features = ["derive"], workspace = true } -scale-info = { features = ["derive"], workspace = true } -serde_json = { features = ["alloc"], workspace = true } - -# Substrate -cumulus-pallet-xcm = { workspace = true } -cumulus-pallet-xcmp-queue = { workspace = true } +cumulus-pallet-aura-ext.workspace = true +cumulus-pallet-parachain-system = { workspace = true, features = ["experimental-ump-signals"] } +cumulus-pallet-weight-reclaim.workspace = true +cumulus-pallet-xcm.workspace = true +cumulus-pallet-xcmp-queue.workspace = true +cumulus-primitives-aura.workspace = true +cumulus-primitives-core.workspace = true +cumulus-primitives-utility.workspace = true frame-benchmarking = { optional = true, workspace = true } -frame-executive = { workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } -frame-system-rpc-runtime-api = { workspace = true } -pallet-assets = { workspace = true } -pallet-aura = { workspace = true } -pallet-authorship = { workspace = true } -pallet-balances = { workspace = true } +frame-executive.workspace = true +frame-support.workspace = true +frame-system-rpc-runtime-api.workspace = true +frame-system.workspace = true +pallet-assets.workspace = true +pallet-aura.workspace = true +pallet-authorship.workspace = true +pallet-balances.workspace = true pallet-message-queue.workspace = true -pallet-sudo = { workspace = true } -pallet-timestamp = { workspace = true } -pallet-transaction-payment = { workspace = true } -pallet-transaction-payment-rpc-runtime-api = { workspace = true } -pallet-utility = { workspace = true } -pallet-verify-signature = { workspace = true } +pallet-sudo.workspace = true +pallet-timestamp.workspace = true +pallet-transaction-payment-rpc-runtime-api.workspace = true +pallet-transaction-payment.workspace = true +pallet-utility.workspace = true +pallet-verify-signature.workspace = true pallet-xcm.workspace = true -sp-api = { workspace = true } -sp-block-builder = { workspace = true } -sp-consensus-aura = { workspace = true } -sp-core = { workspace = true } -sp-genesis-builder = { workspace = true } -sp-inherents = { workspace = true } -sp-io = { workspace = true } -sp-keyring = { workspace = true } -sp-offchain = { workspace = true } -sp-runtime = { workspace = true } -sp-session = { workspace = true } -sp-transaction-pool = { workspace = true } -sp-version = { workspace = true } +parachain-info.workspace = true +parachains-common.workspace = true +polkadot-parachain-primitives.workspace = true +polkadot-runtime-common.workspace = true +scale-info = { features = ["derive"], workspace = true } +serde_json = { features = ["alloc"], workspace = true } +sp-api.workspace = true +sp-block-builder.workspace = true +sp-consensus-aura.workspace = true +sp-core.workspace = true +sp-genesis-builder.workspace = true +sp-inherents.workspace = true +sp-io.workspace = true +sp-keyring.workspace = true +sp-offchain.workspace = true +sp-runtime.workspace = true +sp-session.workspace = true +sp-transaction-pool.workspace = true +sp-version.workspace = true +testnet-parachains-constants = { features = ["rococo"], workspace = true } xcm-builder.workspace = true xcm-executor.workspace = true xcm.workspace = true -# Polkadot -polkadot-parachain-primitives = { workspace = true } -polkadot-runtime-common = { workspace = true } - -# Cumulus -cumulus-pallet-aura-ext = { workspace = true } -cumulus-pallet-parachain-system = { workspace = true, features = ["experimental-ump-signals"] } -cumulus-pallet-weight-reclaim = { workspace = true } -cumulus-primitives-aura = { workspace = true } -cumulus-primitives-core = { workspace = true } -cumulus-primitives-utility = { workspace = true } -parachain-info = { workspace = true } -parachains-common = { workspace = true } -testnet-parachains-constants = { features = ["rococo"], workspace = true } - [build-dependencies] substrate-wasm-builder = { optional = true, workspace = true, default-features = true } diff --git a/cumulus/polkadot-omni-node/Cargo.toml b/cumulus/polkadot-omni-node/Cargo.toml index fd4641f0a69f6..96c3162d588b2 100644 --- a/cumulus/polkadot-omni-node/Cargo.toml +++ b/cumulus/polkadot-omni-node/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-omni-node" -version = "0.1.0" +version = "0.7.0" authors.workspace = true edition.workspace = true build = "build.rs" @@ -14,15 +14,14 @@ workspace = true [dependencies] color-eyre = { workspace = true } - -# Local -polkadot-omni-node-lib = { workspace = true } +polkadot-omni-node-lib.workspace = true [dev-dependencies] assert_cmd = { workspace = true } [build-dependencies] -substrate-build-script-utils = { workspace = true, default-features = true } +substrate-build-script-utils.default-features = true +substrate-build-script-utils.workspace = true [features] default = [] diff --git a/cumulus/polkadot-omni-node/lib/Cargo.toml b/cumulus/polkadot-omni-node/lib/Cargo.toml index fa97d36c68572..abb4b50b5aca7 100644 --- a/cumulus/polkadot-omni-node/lib/Cargo.toml +++ b/cumulus/polkadot-omni-node/lib/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-omni-node-lib" -version = "0.1.0" +version = "0.7.0" authors.workspace = true edition.workspace = true description = "Helper library that can be used to build a parachain node" @@ -16,7 +16,7 @@ path = "src/lib.rs" [dependencies] async-trait = { workspace = true } -chain-spec-builder = { workspace = true } +chain-spec-builder.workspace = true clap = { features = ["derive"], workspace = true } codec = { workspace = true, default-features = true } color-print = { workspace = true } @@ -27,83 +27,134 @@ serde = { features = ["derive"], workspace = true, default-features = true } serde_json = { workspace = true, default-features = true } # Local -jsonrpsee = { features = ["server"], workspace = true } -parachains-common = { workspace = true, default-features = true } -scale-info = { workspace = true } -subxt-metadata = { workspace = true, default-features = true } - -# Substrate +cumulus-client-bootnodes.default-features = true +cumulus-client-bootnodes.workspace = true +cumulus-client-cli.default-features = true +cumulus-client-cli.workspace = true +cumulus-client-collator.default-features = true +cumulus-client-collator.workspace = true +cumulus-client-consensus-aura.default-features = true +cumulus-client-consensus-aura.workspace = true +cumulus-client-consensus-common.default-features = true +cumulus-client-consensus-common.workspace = true +cumulus-client-consensus-proposer.default-features = true +cumulus-client-consensus-proposer.workspace = true +cumulus-client-consensus-relay-chain.default-features = true +cumulus-client-consensus-relay-chain.workspace = true +cumulus-client-parachain-inherent.default-features = true +cumulus-client-parachain-inherent.workspace = true +cumulus-client-service.default-features = true +cumulus-client-service.workspace = true +cumulus-primitives-aura.default-features = true +cumulus-primitives-aura.workspace = true +cumulus-primitives-core.default-features = true +cumulus-primitives-core.workspace = true +cumulus-relay-chain-interface.default-features = true +cumulus-relay-chain-interface.workspace = true frame-benchmarking = { optional = true, workspace = true, default-features = true } -frame-benchmarking-cli = { workspace = true, default-features = true } +frame-benchmarking-cli.default-features = true +frame-benchmarking-cli.workspace = true frame-support = { optional = true, workspace = true, default-features = true } -frame-system-rpc-runtime-api = { workspace = true, default-features = true } +frame-system-rpc-runtime-api.default-features = true +frame-system-rpc-runtime-api.workspace = true frame-try-runtime = { optional = true, workspace = true, default-features = true } -pallet-transaction-payment = { workspace = true, default-features = true } -pallet-transaction-payment-rpc = { workspace = true, default-features = true } -pallet-transaction-payment-rpc-runtime-api = { workspace = true, default-features = true } -prometheus-endpoint = { workspace = true, default-features = true } -sc-basic-authorship = { workspace = true, default-features = true } -sc-chain-spec = { workspace = true, default-features = true } -sc-cli = { workspace = true, default-features = false } -sc-client-api = { workspace = true, default-features = true } -sc-client-db = { workspace = true, default-features = true } -sc-consensus = { workspace = true, default-features = true } -sc-consensus-manual-seal = { workspace = true, default-features = true } -sc-executor = { workspace = true, default-features = true } -sc-keystore = { workspace = true, default-features = true } -sc-network = { workspace = true, default-features = true } -sc-network-statement = { workspace = true, default-features = true } -sc-network-sync = { workspace = true, default-features = true } -sc-offchain = { workspace = true, default-features = true } -sc-rpc = { workspace = true, default-features = true } -sc-runtime-utilities = { workspace = true, default-features = true } -sc-service = { workspace = true, default-features = false } -sc-statement-store = { workspace = true, default-features = true } -sc-sysinfo = { workspace = true, default-features = true } -sc-telemetry = { workspace = true, default-features = true } -sc-tracing = { workspace = true, default-features = true } -sc-transaction-pool = { workspace = true, default-features = true } -sc-transaction-pool-api = { workspace = true, default-features = true } -sp-api = { workspace = true, default-features = true } -sp-block-builder = { workspace = true, default-features = true } -sp-consensus = { workspace = true, default-features = true } -sp-consensus-aura = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-genesis-builder = { workspace = true } -sp-inherents = { workspace = true, default-features = true } -sp-keystore = { workspace = true, default-features = true } -sp-offchain = { workspace = true, default-features = true } -sp-runtime = { workspace = true } -sp-session = { workspace = true, default-features = true } -sp-statement-store = { workspace = true, default-features = true } -sp-storage = { workspace = true, default-features = true } -sp-timestamp = { workspace = true, default-features = true } -sp-transaction-pool = { workspace = true, default-features = true } -sp-version = { workspace = true, default-features = true } -sp-weights = { workspace = true, default-features = true } -substrate-frame-rpc-system = { workspace = true, default-features = true } -substrate-state-trie-migration-rpc = { workspace = true, default-features = true } - -# Polkadot -polkadot-cli = { workspace = true, default-features = true, features = [ - "service", -] } -polkadot-primitives = { workspace = true, default-features = true } - -# Cumulus -cumulus-client-bootnodes = { workspace = true, default-features = true } -cumulus-client-cli = { workspace = true, default-features = true } -cumulus-client-collator = { workspace = true, default-features = true } -cumulus-client-consensus-aura = { workspace = true, default-features = true } -cumulus-client-consensus-common = { workspace = true, default-features = true } -cumulus-client-consensus-proposer = { workspace = true, default-features = true } -cumulus-client-consensus-relay-chain = { workspace = true, default-features = true } -cumulus-client-parachain-inherent = { workspace = true, default-features = true } -cumulus-client-service = { workspace = true, default-features = true } -cumulus-primitives-aura = { workspace = true, default-features = true } -cumulus-primitives-core = { workspace = true, default-features = true } -cumulus-relay-chain-interface = { workspace = true, default-features = true } futures-timer = { workspace = true } +jsonrpsee = { features = ["server"], workspace = true } +pallet-transaction-payment-rpc-runtime-api.default-features = true +pallet-transaction-payment-rpc-runtime-api.workspace = true +pallet-transaction-payment-rpc.default-features = true +pallet-transaction-payment-rpc.workspace = true +pallet-transaction-payment.default-features = true +pallet-transaction-payment.workspace = true +parachains-common.default-features = true +parachains-common.workspace = true +polkadot-cli = { workspace = true, features = ["service"], default-features = true } +polkadot-primitives.default-features = true +polkadot-primitives.workspace = true +prometheus-endpoint.default-features = true +prometheus-endpoint.workspace = true +sc-basic-authorship.default-features = true +sc-basic-authorship.workspace = true +sc-chain-spec.default-features = true +sc-chain-spec.workspace = true +sc-cli.default-features = false +sc-cli.workspace = true +sc-client-api.default-features = true +sc-client-api.workspace = true +sc-client-db.default-features = true +sc-client-db.workspace = true +sc-consensus-manual-seal.default-features = true +sc-consensus-manual-seal.workspace = true +sc-consensus.default-features = true +sc-consensus.workspace = true +sc-executor.default-features = true +sc-executor.workspace = true +sc-keystore.default-features = true +sc-keystore.workspace = true +sc-network-statement.default-features = true +sc-network-statement.workspace = true +sc-network-sync.default-features = true +sc-network-sync.workspace = true +sc-network.default-features = true +sc-network.workspace = true +sc-offchain.default-features = true +sc-offchain.workspace = true +sc-rpc.default-features = true +sc-rpc.workspace = true +sc-runtime-utilities.default-features = true +sc-runtime-utilities.workspace = true +sc-service.default-features = false +sc-service.workspace = true +sc-statement-store.default-features = true +sc-statement-store.workspace = true +sc-sysinfo.default-features = true +sc-sysinfo.workspace = true +sc-telemetry.default-features = true +sc-telemetry.workspace = true +sc-tracing.default-features = true +sc-tracing.workspace = true +sc-transaction-pool-api.default-features = true +sc-transaction-pool-api.workspace = true +sc-transaction-pool.default-features = true +sc-transaction-pool.workspace = true +scale-info = { workspace = true } +sp-api.default-features = true +sp-api.workspace = true +sp-block-builder.default-features = true +sp-block-builder.workspace = true +sp-consensus-aura.default-features = true +sp-consensus-aura.workspace = true +sp-consensus.default-features = true +sp-consensus.workspace = true +sp-core.default-features = true +sp-core.workspace = true +sp-genesis-builder.workspace = true +sp-inherents.default-features = true +sp-inherents.workspace = true +sp-keystore.default-features = true +sp-keystore.workspace = true +sp-offchain.default-features = true +sp-offchain.workspace = true +sp-runtime.workspace = true +sp-session.default-features = true +sp-session.workspace = true +sp-statement-store.default-features = true +sp-statement-store.workspace = true +sp-storage.default-features = true +sp-storage.workspace = true +sp-timestamp.default-features = true +sp-timestamp.workspace = true +sp-transaction-pool.default-features = true +sp-transaction-pool.workspace = true +sp-version.default-features = true +sp-version.workspace = true +sp-weights.default-features = true +sp-weights.workspace = true +substrate-frame-rpc-system.default-features = true +substrate-frame-rpc-system.workspace = true +substrate-state-trie-migration-rpc.default-features = true +substrate-state-trie-migration-rpc.workspace = true +subxt-metadata = { workspace = true, default-features = true } [dev-dependencies] assert_cmd = { workspace = true } diff --git a/cumulus/polkadot-parachain/Cargo.toml b/cumulus/polkadot-parachain/Cargo.toml index 62e6c21b6d343..4c30be9677bf2 100644 --- a/cumulus/polkadot-parachain/Cargo.toml +++ b/cumulus/polkadot-parachain/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-parachain-bin" -version = "4.0.0" +version = "6.0.0" authors.workspace = true edition.workspace = true build = "build.rs" @@ -8,6 +8,7 @@ description = "Runs a polkadot parachain node" license = "Apache-2.0" homepage.workspace = true repository.workspace = true +publish = false [lints] workspace = true @@ -17,52 +18,54 @@ name = "polkadot-parachain" path = "src/main.rs" [dependencies] +asset-hub-rococo-runtime.default-features = true +asset-hub-rococo-runtime.workspace = true +asset-hub-westend-runtime.workspace = true +bridge-hub-rococo-runtime.default-features = true +bridge-hub-rococo-runtime.workspace = true +bridge-hub-westend-runtime.default-features = true +bridge-hub-westend-runtime.workspace = true +collectives-westend-runtime.workspace = true color-eyre = { workspace = true } +coretime-rococo-runtime.workspace = true +coretime-westend-runtime.workspace = true +cumulus-client-consensus-aura.workspace = true +cumulus-primitives-core.default-features = true +cumulus-primitives-core.workspace = true +glutton-westend-runtime.workspace = true hex-literal = { workspace = true, default-features = true } log = { workspace = true, default-features = true } +parachains-common.default-features = true +parachains-common.workspace = true +penpal-runtime.workspace = true +people-rococo-runtime.workspace = true +people-westend-runtime.workspace = true +polkadot-omni-node-lib = { features = ["rococo-native", "westend-native"], workspace = true } +rococo-parachain-runtime.workspace = true +sc-chain-spec.default-features = true +sc-chain-spec.workspace = true +sc-cli.default-features = true +sc-cli.workspace = true +sc-service.default-features = true +sc-service.workspace = true serde = { features = ["derive"], workspace = true, default-features = true } serde_json = { workspace = true, default-features = true } - -# Local -asset-hub-rococo-runtime = { workspace = true, default-features = true } -asset-hub-westend-runtime = { workspace = true } -bridge-hub-rococo-runtime = { workspace = true, default-features = true } -bridge-hub-westend-runtime = { workspace = true, default-features = true } -collectives-westend-runtime = { workspace = true } -coretime-rococo-runtime = { workspace = true } -coretime-westend-runtime = { workspace = true } -glutton-westend-runtime = { workspace = true } -parachains-common = { workspace = true, default-features = true } -penpal-runtime = { workspace = true } -people-rococo-runtime = { workspace = true } -people-westend-runtime = { workspace = true } -polkadot-omni-node-lib = { features = [ - "rococo-native", - "westend-native", -], workspace = true } -rococo-parachain-runtime = { workspace = true } - -# Substrate -sc-chain-spec = { workspace = true, default-features = true } -sc-cli = { workspace = true, default-features = true } -sc-service = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-genesis-builder = { workspace = true, default-features = true } -sp-keyring = { workspace = true, default-features = true } - -# Polkadot -xcm = { workspace = true, default-features = true } - -# Cumulus -cumulus-client-consensus-aura = { workspace = true } -cumulus-primitives-core = { workspace = true, default-features = true } -yet-another-parachain-runtime = { workspace = true } +sp-core.default-features = true +sp-core.workspace = true +sp-genesis-builder.default-features = true +sp-genesis-builder.workspace = true +sp-keyring.default-features = true +sp-keyring.workspace = true +xcm.default-features = true +xcm.workspace = true +yet-another-parachain-runtime.workspace = true [dev-dependencies] assert_cmd = { workspace = true } [build-dependencies] -substrate-build-script-utils = { workspace = true, default-features = true } +substrate-build-script-utils.default-features = true +substrate-build-script-utils.workspace = true [features] default = [] diff --git a/cumulus/primitives/aura/Cargo.toml b/cumulus/primitives/aura/Cargo.toml index fcbdcc4e23dad..615f0f8509b5f 100644 --- a/cumulus/primitives/aura/Cargo.toml +++ b/cumulus/primitives/aura/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cumulus-primitives-aura" -version = "0.7.0" +version = "0.18.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -12,9 +12,8 @@ repository.workspace = true workspace = true [dependencies] -# Substrate -sp-api = { workspace = true } -sp-consensus-aura = { workspace = true } +sp-api.workspace = true +sp-consensus-aura.workspace = true [features] default = ["std"] diff --git a/cumulus/primitives/core/Cargo.toml b/cumulus/primitives/core/Cargo.toml index 592026b824128..c5e63194921e1 100644 --- a/cumulus/primitives/core/Cargo.toml +++ b/cumulus/primitives/core/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cumulus-primitives-core" -version = "0.7.0" +version = "0.19.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -13,19 +13,15 @@ workspace = true [dependencies] codec = { features = ["derive"], workspace = true } +polkadot-core-primitives.workspace = true +polkadot-parachain-primitives.workspace = true +polkadot-primitives.workspace = true scale-info = { features = ["derive"], workspace = true } +sp-api.workspace = true +sp-runtime.workspace = true +sp-trie.workspace = true tracing = { workspace = true } - -# Substrate -sp-api = { workspace = true } -sp-runtime = { workspace = true } -sp-trie = { workspace = true } - -# Polkadot -polkadot-core-primitives = { workspace = true } -polkadot-parachain-primitives = { workspace = true } -polkadot-primitives = { workspace = true } -xcm = { workspace = true } +xcm.workspace = true [features] default = ["std"] diff --git a/cumulus/primitives/parachain-inherent/Cargo.toml b/cumulus/primitives/parachain-inherent/Cargo.toml index 61c480fe3c514..5c7702797c000 100644 --- a/cumulus/primitives/parachain-inherent/Cargo.toml +++ b/cumulus/primitives/parachain-inherent/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cumulus-primitives-parachain-inherent" -version = "0.7.0" +version = "0.19.0" authors.workspace = true edition.workspace = true description = "Inherent that needs to be present in every parachain block. Contains messages and a relay chain storage-proof." @@ -14,18 +14,14 @@ workspace = true [dependencies] async-trait = { optional = true, workspace = true } codec = { features = ["derive"], workspace = true } +cumulus-primitives-core.workspace = true scale-info = { features = ["derive"], workspace = true } - -# Substrate -sp-core = { workspace = true } -sp-inherents = { workspace = true } -sp-trie = { workspace = true } - -# Cumulus -cumulus-primitives-core = { workspace = true } +sp-core.workspace = true +sp-inherents.workspace = true +sp-trie.workspace = true [dev-dependencies] -cumulus-test-relay-sproof-builder = { workspace = true, default-features = true } +cumulus-test-relay-sproof-builder = { default-features = true, workspace = true } [features] default = ["std"] diff --git a/cumulus/primitives/proof-size-hostfunction/Cargo.toml b/cumulus/primitives/proof-size-hostfunction/Cargo.toml index b3b300d66ef32..14d4eccf363ab 100644 --- a/cumulus/primitives/proof-size-hostfunction/Cargo.toml +++ b/cumulus/primitives/proof-size-hostfunction/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cumulus-primitives-proof-size-hostfunction" -version = "0.2.0" +version = "0.13.0" authors.workspace = true edition.workspace = true description = "Hostfunction exposing storage proof size to the runtime." @@ -12,14 +12,14 @@ repository.workspace = true workspace = true [dependencies] -sp-externalities = { workspace = true } -sp-runtime-interface = { workspace = true } -sp-trie = { workspace = true } +sp-externalities.workspace = true +sp-runtime-interface.workspace = true +sp-trie.workspace = true [dev-dependencies] -sp-core = { workspace = true, default-features = true } -sp-io = { workspace = true, default-features = true } -sp-state-machine = { workspace = true, default-features = true } +sp-core = { default-features = true, workspace = true } +sp-io = { default-features = true, workspace = true } +sp-state-machine = { default-features = true, workspace = true } [features] default = ["std"] diff --git a/cumulus/primitives/storage-weight-reclaim/Cargo.toml b/cumulus/primitives/storage-weight-reclaim/Cargo.toml index 4bcbabc1f16c3..25f31774f694e 100644 --- a/cumulus/primitives/storage-weight-reclaim/Cargo.toml +++ b/cumulus/primitives/storage-weight-reclaim/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cumulus-primitives-storage-weight-reclaim" -version = "1.0.0" +version = "12.0.0" authors.workspace = true edition.workspace = true description = "Utilities to reclaim storage weight." @@ -13,23 +13,20 @@ workspace = true [dependencies] codec = { features = ["derive"], workspace = true } +cumulus-primitives-core.workspace = true +cumulus-primitives-proof-size-hostfunction.workspace = true +docify = { workspace = true } +frame-benchmarking = { optional = true, workspace = true } +frame-support.workspace = true +frame-system.workspace = true log = { workspace = true } scale-info = { features = ["derive"], workspace = true } - -frame-benchmarking = { optional = true, workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } - -sp-runtime = { workspace = true } - -cumulus-primitives-core = { workspace = true } -cumulus-primitives-proof-size-hostfunction = { workspace = true } -docify = { workspace = true } +sp-runtime.workspace = true [dev-dependencies] cumulus-test-runtime = { workspace = true } -sp-io = { workspace = true } -sp-trie = { workspace = true } +sp-io = { workspace = true, default-features = false } +sp-trie = { workspace = true, default-features = false } [features] default = ["std"] diff --git a/cumulus/primitives/timestamp/Cargo.toml b/cumulus/primitives/timestamp/Cargo.toml index 70cb3e607b983..ab13863967422 100644 --- a/cumulus/primitives/timestamp/Cargo.toml +++ b/cumulus/primitives/timestamp/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cumulus-primitives-timestamp" -version = "0.7.0" +version = "0.20.0" authors.workspace = true edition.workspace = true description = "Provides timestamp related functionality for parachains." @@ -12,12 +12,9 @@ repository.workspace = true workspace = true [dependencies] -# Substrate -sp-inherents = { workspace = true } -sp-timestamp = { workspace = true } - -# Cumulus -cumulus-primitives-core = { workspace = true } +cumulus-primitives-core.workspace = true +sp-inherents.workspace = true +sp-timestamp.workspace = true [features] default = ["std"] diff --git a/cumulus/primitives/utility/Cargo.toml b/cumulus/primitives/utility/Cargo.toml index 9028bf395831e..62db924f87232 100644 --- a/cumulus/primitives/utility/Cargo.toml +++ b/cumulus/primitives/utility/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cumulus-primitives-utility" -version = "0.7.0" +version = "0.21.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -13,21 +13,15 @@ workspace = true [dependencies] codec = { features = ["derive"], workspace = true } +cumulus-primitives-core.workspace = true +frame-support.workspace = true log = { workspace = true } - -# Substrate -frame-support = { workspace = true } -pallet-asset-conversion = { workspace = true } -sp-runtime = { workspace = true } - -# Polkadot -polkadot-runtime-common = { workspace = true } -xcm = { workspace = true } -xcm-builder = { workspace = true } -xcm-executor = { workspace = true } - -# Cumulus -cumulus-primitives-core = { workspace = true } +pallet-asset-conversion.workspace = true +polkadot-runtime-common.workspace = true +sp-runtime.workspace = true +xcm-builder.workspace = true +xcm-executor.workspace = true +xcm.workspace = true [features] default = ["std"] diff --git a/cumulus/test/client/Cargo.toml b/cumulus/test/client/Cargo.toml index f64ee832ace3b..86f6521e0e644 100644 --- a/cumulus/test/client/Cargo.toml +++ b/cumulus/test/client/Cargo.toml @@ -10,42 +10,63 @@ workspace = true [dependencies] codec = { features = ["derive"], workspace = true } - -# Substrate -frame-system = { workspace = true, default-features = true } -pallet-balances = { workspace = true, default-features = true } -pallet-transaction-payment = { workspace = true, default-features = true } -sc-block-builder = { workspace = true, default-features = true } -sc-consensus = { workspace = true, default-features = true } -sc-consensus-aura = { workspace = true, default-features = true } -sc-executor = { workspace = true, default-features = true } -sc-executor-common = { workspace = true, default-features = true } -sc-service = { workspace = true, default-features = true } -sp-api = { workspace = true, default-features = true } -sp-application-crypto = { workspace = true, default-features = true } -sp-blockchain = { workspace = true, default-features = true } -sp-consensus-aura = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-inherents = { workspace = true, default-features = true } -sp-io = { workspace = true, default-features = true } -sp-keyring = { workspace = true, default-features = true } -sp-keystore = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } -sp-timestamp = { workspace = true, default-features = true } -substrate-test-client = { workspace = true } - -# Polkadot -polkadot-parachain-primitives = { workspace = true, default-features = true } -polkadot-primitives = { workspace = true, default-features = true } - -# Cumulus -cumulus-pallet-weight-reclaim = { workspace = true, default-features = true } -cumulus-primitives-core = { workspace = true, default-features = true } -cumulus-primitives-parachain-inherent = { workspace = true, default-features = true } -cumulus-primitives-proof-size-hostfunction = { workspace = true, default-features = true } -cumulus-test-relay-sproof-builder = { workspace = true, default-features = true } -cumulus-test-runtime = { workspace = true } -cumulus-test-service = { workspace = true } +cumulus-pallet-weight-reclaim.default-features = true +cumulus-pallet-weight-reclaim.workspace = true +cumulus-primitives-core.default-features = true +cumulus-primitives-core.workspace = true +cumulus-primitives-parachain-inherent.default-features = true +cumulus-primitives-parachain-inherent.workspace = true +cumulus-primitives-proof-size-hostfunction.default-features = true +cumulus-primitives-proof-size-hostfunction.workspace = true +cumulus-test-relay-sproof-builder.default-features = true +cumulus-test-relay-sproof-builder.workspace = true +cumulus-test-runtime.workspace = true +cumulus-test-service.workspace = true +frame-system.default-features = true +frame-system.workspace = true +pallet-balances.default-features = true +pallet-balances.workspace = true +pallet-transaction-payment.default-features = true +pallet-transaction-payment.workspace = true +polkadot-parachain-primitives.default-features = true +polkadot-parachain-primitives.workspace = true +polkadot-primitives.default-features = true +polkadot-primitives.workspace = true +sc-block-builder.default-features = true +sc-block-builder.workspace = true +sc-consensus-aura.default-features = true +sc-consensus-aura.workspace = true +sc-consensus.default-features = true +sc-consensus.workspace = true +sc-executor-common.default-features = true +sc-executor-common.workspace = true +sc-executor.default-features = true +sc-executor.workspace = true +sc-service.default-features = true +sc-service.workspace = true +sp-api.default-features = true +sp-api.workspace = true +sp-application-crypto.default-features = true +sp-application-crypto.workspace = true +sp-blockchain.default-features = true +sp-blockchain.workspace = true +sp-consensus-aura.default-features = true +sp-consensus-aura.workspace = true +sp-core.default-features = true +sp-core.workspace = true +sp-inherents.default-features = true +sp-inherents.workspace = true +sp-io.default-features = true +sp-io.workspace = true +sp-keyring.default-features = true +sp-keyring.workspace = true +sp-keystore.default-features = true +sp-keystore.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true +sp-timestamp.default-features = true +sp-timestamp.workspace = true +substrate-test-client.workspace = true [features] runtime-benchmarks = [ diff --git a/cumulus/test/relay-sproof-builder/Cargo.toml b/cumulus/test/relay-sproof-builder/Cargo.toml index c1efa141a45d2..a4ed20c0ea7d6 100644 --- a/cumulus/test/relay-sproof-builder/Cargo.toml +++ b/cumulus/test/relay-sproof-builder/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cumulus-test-relay-sproof-builder" -version = "0.7.0" +version = "0.20.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -13,17 +13,11 @@ workspace = true [dependencies] codec = { features = ["derive"], workspace = true } - -# Substrate -sp-runtime = { workspace = true } -sp-state-machine = { workspace = true } -sp-trie = { workspace = true } - -# Polkadot -polkadot-primitives = { workspace = true } - -# Cumulus -cumulus-primitives-core = { workspace = true } +cumulus-primitives-core.workspace = true +polkadot-primitives.workspace = true +sp-runtime.workspace = true +sp-state-machine.workspace = true +sp-trie.workspace = true [features] default = ["std"] diff --git a/cumulus/test/runtime/Cargo.toml b/cumulus/test/runtime/Cargo.toml index 896e30bf68b65..12d9285900d10 100644 --- a/cumulus/test/runtime/Cargo.toml +++ b/cumulus/test/runtime/Cargo.toml @@ -10,44 +10,40 @@ workspace = true [dependencies] codec = { features = ["derive"], workspace = true } +cumulus-pallet-aura-ext.workspace = true +cumulus-pallet-parachain-system.workspace = true +cumulus-pallet-weight-reclaim.workspace = true +cumulus-primitives-aura.workspace = true +cumulus-primitives-core.workspace = true +frame-executive.workspace = true +frame-support.workspace = true +frame-system-rpc-runtime-api.workspace = true +frame-system.workspace = true +pallet-aura.workspace = true +pallet-authorship.workspace = true +pallet-balances.workspace = true +pallet-glutton.workspace = true +pallet-message-queue.workspace = true +pallet-session.workspace = true +pallet-sudo.workspace = true +pallet-timestamp.workspace = true +pallet-transaction-payment.workspace = true +parachain-info.workspace = true scale-info = { features = ["derive"], workspace = true } serde_json = { workspace = true } - -# Substrate -frame-executive = { workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } -frame-system-rpc-runtime-api = { workspace = true } -pallet-aura = { workspace = true } -pallet-authorship = { workspace = true } -pallet-balances = { workspace = true } -pallet-glutton = { workspace = true } -pallet-message-queue = { workspace = true } -pallet-session = { workspace = true } -pallet-sudo = { workspace = true } -pallet-timestamp = { workspace = true } -pallet-transaction-payment = { workspace = true } -sp-api = { workspace = true } -sp-block-builder = { workspace = true } -sp-consensus-aura = { workspace = true } -sp-core = { workspace = true } -sp-genesis-builder = { workspace = true } -sp-inherents = { workspace = true } -sp-io = { workspace = true } -sp-keyring = { workspace = true } -sp-offchain = { workspace = true } -sp-runtime = { workspace = true } -sp-session = { workspace = true } -sp-transaction-pool = { workspace = true } -sp-version = { workspace = true } - -# Cumulus -cumulus-pallet-aura-ext = { workspace = true } -cumulus-pallet-parachain-system = { workspace = true } -cumulus-pallet-weight-reclaim = { workspace = true } -cumulus-primitives-aura = { workspace = true } -cumulus-primitives-core = { workspace = true } -parachain-info = { workspace = true } +sp-api.workspace = true +sp-block-builder.workspace = true +sp-consensus-aura.workspace = true +sp-core.workspace = true +sp-genesis-builder.workspace = true +sp-inherents.workspace = true +sp-io.workspace = true +sp-keyring.workspace = true +sp-offchain.workspace = true +sp-runtime.workspace = true +sp-session.workspace = true +sp-transaction-pool.workspace = true +sp-version.workspace = true [build-dependencies] substrate-wasm-builder = { optional = true, workspace = true, default-features = true } diff --git a/cumulus/test/service/Cargo.toml b/cumulus/test/service/Cargo.toml index 5873f4f7762b0..bfd36e29fc41b 100644 --- a/cumulus/test/service/Cargo.toml +++ b/cumulus/test/service/Cargo.toml @@ -17,77 +17,122 @@ async-trait = { workspace = true } clap = { features = ["derive"], workspace = true } codec = { workspace = true, default-features = true } criterion = { features = ["async_tokio"], workspace = true, default-features = true } +cumulus-client-cli.default-features = true +cumulus-client-cli.workspace = true +cumulus-client-collator.default-features = true +cumulus-client-collator.workspace = true +cumulus-client-consensus-aura.default-features = true +cumulus-client-consensus-aura.workspace = true +cumulus-client-consensus-common.default-features = true +cumulus-client-consensus-common.workspace = true +cumulus-client-consensus-proposer.default-features = true +cumulus-client-consensus-proposer.workspace = true +cumulus-client-parachain-inherent.default-features = true +cumulus-client-parachain-inherent.workspace = true +cumulus-client-pov-recovery.default-features = true +cumulus-client-pov-recovery.workspace = true +cumulus-client-service.default-features = true +cumulus-client-service.workspace = true +cumulus-pallet-parachain-system.workspace = true +cumulus-pallet-weight-reclaim.default-features = true +cumulus-pallet-weight-reclaim.workspace = true +cumulus-primitives-core.default-features = true +cumulus-primitives-core.workspace = true +cumulus-relay-chain-inprocess-interface.default-features = true +cumulus-relay-chain-inprocess-interface.workspace = true +cumulus-relay-chain-interface.default-features = true +cumulus-relay-chain-interface.workspace = true +cumulus-relay-chain-minimal-node.default-features = true +cumulus-relay-chain-minimal-node.workspace = true +cumulus-test-relay-sproof-builder.default-features = true +cumulus-test-relay-sproof-builder.workspace = true +cumulus-test-runtime.workspace = true +frame-system-rpc-runtime-api.default-features = true +frame-system-rpc-runtime-api.workspace = true +frame-system.default-features = true +frame-system.workspace = true jsonrpsee = { features = ["server"], workspace = true } +pallet-timestamp.default-features = true +pallet-timestamp.workspace = true +pallet-transaction-payment.default-features = true +pallet-transaction-payment.workspace = true +polkadot-cli.default-features = true +polkadot-cli.workspace = true +polkadot-node-subsystem.default-features = true +polkadot-node-subsystem.workspace = true +polkadot-overseer.default-features = true +polkadot-overseer.workspace = true +polkadot-primitives.default-features = true +polkadot-primitives.workspace = true +polkadot-service.default-features = true +polkadot-service.workspace = true +polkadot-test-service.workspace = true prometheus = { workspace = true } rand = { workspace = true, default-features = true } +sc-basic-authorship.default-features = true +sc-basic-authorship.workspace = true +sc-block-builder.default-features = true +sc-block-builder.workspace = true +sc-chain-spec.default-features = true +sc-chain-spec.workspace = true +sc-cli.default-features = true +sc-cli.workspace = true +sc-client-api.default-features = true +sc-client-api.workspace = true +sc-consensus-aura.default-features = true +sc-consensus-aura.workspace = true +sc-consensus.default-features = true +sc-consensus.workspace = true +sc-executor-common.default-features = true +sc-executor-common.workspace = true +sc-executor-wasmtime.default-features = true +sc-executor-wasmtime.workspace = true +sc-executor.default-features = true +sc-executor.workspace = true +sc-network.default-features = true +sc-network.workspace = true +sc-service.default-features = true +sc-service.workspace = true +sc-telemetry.default-features = true +sc-telemetry.workspace = true +sc-tracing.default-features = true +sc-tracing.workspace = true +sc-transaction-pool-api.default-features = true +sc-transaction-pool-api.workspace = true +sc-transaction-pool.default-features = true +sc-transaction-pool.workspace = true serde = { features = ["derive"], workspace = true, default-features = true } serde_json = { workspace = true, default-features = true } +sp-api.default-features = true +sp-api.workspace = true +sp-arithmetic.default-features = true +sp-arithmetic.workspace = true +sp-blockchain.default-features = true +sp-blockchain.workspace = true +sp-consensus-aura.default-features = true +sp-consensus-aura.workspace = true +sp-consensus.default-features = true +sp-consensus.workspace = true +sp-core.default-features = true +sp-core.workspace = true +sp-genesis-builder.default-features = true +sp-genesis-builder.workspace = true +sp-io.default-features = true +sp-io.workspace = true +sp-keyring.default-features = true +sp-keyring.workspace = true +sp-runtime.workspace = true +sp-state-machine.default-features = true +sp-state-machine.workspace = true +sp-timestamp.default-features = true +sp-timestamp.workspace = true +sp-tracing.default-features = true +sp-tracing.workspace = true +substrate-test-client.workspace = true tokio = { features = ["macros"], workspace = true, default-features = true } tracing = { workspace = true, default-features = true } url = { workspace = true } -# Substrate -frame-system = { workspace = true, default-features = true } -frame-system-rpc-runtime-api = { workspace = true, default-features = true } -pallet-transaction-payment = { workspace = true, default-features = true } -sc-basic-authorship = { workspace = true, default-features = true } -sc-block-builder = { workspace = true, default-features = true } -sc-chain-spec = { workspace = true, default-features = true } -sc-cli = { workspace = true, default-features = true } -sc-client-api = { workspace = true, default-features = true } -sc-consensus = { workspace = true, default-features = true } -sc-consensus-aura = { workspace = true, default-features = true } -sc-executor = { workspace = true, default-features = true } -sc-executor-common = { workspace = true, default-features = true } -sc-executor-wasmtime = { workspace = true, default-features = true } -sc-network = { workspace = true, default-features = true } -sc-service = { workspace = true, default-features = true } -sc-telemetry = { workspace = true, default-features = true } -sc-tracing = { workspace = true, default-features = true } -sc-transaction-pool = { workspace = true, default-features = true } -sc-transaction-pool-api = { workspace = true, default-features = true } -sp-api = { workspace = true, default-features = true } -sp-arithmetic = { workspace = true, default-features = true } -sp-blockchain = { workspace = true, default-features = true } -sp-consensus = { workspace = true, default-features = true } -sp-consensus-aura = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-genesis-builder = { workspace = true, default-features = true } -sp-io = { workspace = true, default-features = true } -sp-keyring = { workspace = true, default-features = true } -sp-runtime = { workspace = true } -sp-state-machine = { workspace = true, default-features = true } -sp-timestamp = { workspace = true, default-features = true } -sp-tracing = { workspace = true, default-features = true } -substrate-test-client = { workspace = true } - -# Polkadot -polkadot-cli = { workspace = true, default-features = true } -polkadot-node-subsystem = { workspace = true, default-features = true } -polkadot-overseer = { workspace = true, default-features = true } -polkadot-primitives = { workspace = true, default-features = true } -polkadot-service = { workspace = true, default-features = true } -polkadot-test-service = { workspace = true } - -# Cumulus -cumulus-client-cli = { workspace = true, default-features = true } -cumulus-client-collator = { workspace = true, default-features = true } -cumulus-client-consensus-aura = { workspace = true, default-features = true } -cumulus-client-consensus-common = { workspace = true, default-features = true } -cumulus-client-consensus-proposer = { workspace = true, default-features = true } -cumulus-client-parachain-inherent = { workspace = true, default-features = true } -cumulus-client-pov-recovery = { workspace = true, default-features = true } -cumulus-client-service = { workspace = true, default-features = true } -cumulus-pallet-parachain-system = { workspace = true } -cumulus-pallet-weight-reclaim = { workspace = true, default-features = true } -cumulus-primitives-core = { workspace = true, default-features = true } -cumulus-relay-chain-inprocess-interface = { workspace = true, default-features = true } -cumulus-relay-chain-interface = { workspace = true, default-features = true } -cumulus-relay-chain-minimal-node = { workspace = true, default-features = true } -cumulus-test-relay-sproof-builder = { workspace = true, default-features = true } -cumulus-test-runtime = { workspace = true } -pallet-timestamp = { workspace = true, default-features = true } - [dev-dependencies] cumulus-test-client = { workspace = true } futures = { workspace = true } @@ -96,7 +141,7 @@ futures = { workspace = true } polkadot-test-service = { workspace = true } # Substrate dependencies -sc-cli = { workspace = true, default-features = true } +sc-cli = { default-features = true, workspace = true } [features] runtime-benchmarks = [ diff --git a/cumulus/xcm/xcm-emulator/Cargo.toml b/cumulus/xcm/xcm-emulator/Cargo.toml index a57df58b03ec6..cd9658f191d59 100644 --- a/cumulus/xcm/xcm-emulator/Cargo.toml +++ b/cumulus/xcm/xcm-emulator/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "xcm-emulator" description = "Test kit to emulate XCM program execution." -version = "0.5.0" +version = "0.20.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -14,34 +14,50 @@ workspace = true [dependencies] array-bytes = { workspace = true } codec = { workspace = true, default-features = true } +cumulus-pallet-parachain-system.default-features = true +cumulus-pallet-parachain-system.workspace = true +cumulus-primitives-core.default-features = true +cumulus-primitives-core.workspace = true +cumulus-primitives-parachain-inherent.default-features = true +cumulus-primitives-parachain-inherent.workspace = true +cumulus-test-relay-sproof-builder.default-features = true +cumulus-test-relay-sproof-builder.workspace = true +frame-support.default-features = true +frame-support.workspace = true +frame-system.default-features = true +frame-system.workspace = true impl-trait-for-tuples = { workspace = true } log = { workspace = true } +pallet-balances.default-features = true +pallet-balances.workspace = true +pallet-message-queue.default-features = true +pallet-message-queue.workspace = true +pallet-timestamp.default-features = true +pallet-timestamp.workspace = true +parachains-common.default-features = true +parachains-common.workspace = true paste = { workspace = true, default-features = true } - -# Substrate -frame-support = { workspace = true, default-features = true } -frame-system = { workspace = true, default-features = true } -pallet-balances = { workspace = true, default-features = true } -pallet-message-queue = { workspace = true, default-features = true } -pallet-timestamp = { workspace = true, default-features = true } -sp-arithmetic = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-crypto-hashing = { workspace = true, default-features = true } -sp-io = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } -sp-tracing = { workspace = true, default-features = true } - -# Cumulus -cumulus-pallet-parachain-system = { workspace = true, default-features = true } -cumulus-primitives-core = { workspace = true, default-features = true } -cumulus-primitives-parachain-inherent = { workspace = true, default-features = true } -cumulus-test-relay-sproof-builder = { workspace = true, default-features = true } -parachains-common = { workspace = true, default-features = true } - -# Polkadot -polkadot-parachain-primitives = { workspace = true, default-features = true } -polkadot-primitives = { workspace = true, default-features = true } -polkadot-runtime-parachains = { workspace = true, default-features = true } -xcm = { workspace = true, default-features = true } -xcm-executor = { workspace = true, default-features = true } -xcm-simulator = { workspace = true, default-features = true } +polkadot-parachain-primitives.default-features = true +polkadot-parachain-primitives.workspace = true +polkadot-primitives.default-features = true +polkadot-primitives.workspace = true +polkadot-runtime-parachains.default-features = true +polkadot-runtime-parachains.workspace = true +sp-arithmetic.default-features = true +sp-arithmetic.workspace = true +sp-core.default-features = true +sp-core.workspace = true +sp-crypto-hashing.default-features = true +sp-crypto-hashing.workspace = true +sp-io.default-features = true +sp-io.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true +sp-tracing.default-features = true +sp-tracing.workspace = true +xcm-executor.default-features = true +xcm-executor.workspace = true +xcm-simulator.default-features = true +xcm-simulator.workspace = true +xcm.default-features = true +xcm.workspace = true diff --git a/cumulus/zombienet/zombienet-sdk-helpers/Cargo.toml b/cumulus/zombienet/zombienet-sdk-helpers/Cargo.toml index a7630d48b8875..71746f79f83db 100644 --- a/cumulus/zombienet/zombienet-sdk-helpers/Cargo.toml +++ b/cumulus/zombienet/zombienet-sdk-helpers/Cargo.toml @@ -11,8 +11,10 @@ publish = false anyhow = { workspace = true, default-features = true } codec = { workspace = true, features = ["derive"] } log = { workspace = true } -polkadot-primitives = { workspace = true, default-features = true } -cumulus-primitives-core = { workspace = true, default-features = true } +polkadot-primitives.workspace = true +polkadot-primitives.default-features = true +cumulus-primitives-core.workspace = true +cumulus-primitives-core.default-features = true tokio = { workspace = true, features = ["rt-multi-thread", "macros", "time"] } zombienet-sdk = { workspace = true } futures = { workspace = true } diff --git a/cumulus/zombienet/zombienet-sdk/Cargo.toml b/cumulus/zombienet/zombienet-sdk/Cargo.toml index 49e5911660543..a4cf7e628616d 100644 --- a/cumulus/zombienet/zombienet-sdk/Cargo.toml +++ b/cumulus/zombienet/zombienet-sdk/Cargo.toml @@ -11,16 +11,20 @@ publish = false anyhow = { workspace = true } env_logger = { workspace = true } log = { workspace = true } -polkadot-primitives = { workspace = true, default-features = true } +polkadot-primitives.workspace = true +polkadot-primitives.default-features = true serde = { workspace = true } serde_json = { workspace = true } tokio = { workspace = true, features = ["rt-multi-thread"] } zombienet-sdk = { workspace = true } zombienet-orchestrator = { workspace = true } -cumulus-zombienet-sdk-helpers = { workspace = true } -sp-statement-store = { workspace = true, default-features = true } -sp-keyring = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } +cumulus-zombienet-sdk-helpers.workspace = true +sp-statement-store.workspace = true +sp-statement-store.default-features = true +sp-keyring.workspace = true +sp-keyring.default-features = true +sp-core.workspace = true +sp-core.default-features = true [features] zombie-ci = [] diff --git a/docs/sdk/Cargo.toml b/docs/sdk/Cargo.toml index 5e822edcca568..6b5b9b067ff54 100644 --- a/docs/sdk/Cargo.toml +++ b/docs/sdk/Cargo.toml @@ -8,7 +8,7 @@ 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" +version = "0.1.0" [lints] workspace = true @@ -17,112 +17,155 @@ workspace = true # Needed for all FRAME-based code codec = { workspace = true } frame = { features = ["experimental", "runtime"], workspace = true, default-features = true } -pallet-contracts = { workspace = true } -pallet-default-config-example = { workspace = true, default-features = true } -pallet-example-offchain-worker = { workspace = true, default-features = true } -pallet-examples = { workspace = true } +pallet-contracts.workspace = true +pallet-default-config-example.default-features = true +pallet-default-config-example.workspace = true +pallet-example-offchain-worker.default-features = true +pallet-example-offchain-worker.workspace = true +pallet-examples.workspace = true scale-info = { workspace = true } # How we build docs in rust-docs +chain-spec-builder.default-features = true +chain-spec-builder.workspace = true +chain-spec-guide-runtime.default-features = true +chain-spec-guide-runtime.workspace = true +cumulus-client-service.default-features = true +cumulus-client-service.workspace = true +cumulus-pallet-aura-ext.default-features = true +cumulus-pallet-aura-ext.workspace = true +cumulus-pallet-parachain-system.default-features = true +cumulus-pallet-parachain-system.workspace = true +cumulus-pallet-weight-reclaim.default-features = true +cumulus-pallet-weight-reclaim.workspace = true +cumulus-primitives-proof-size-hostfunction.default-features = true +cumulus-primitives-proof-size-hostfunction.workspace = true docify = { workspace = true } -serde_json = { workspace = true } -simple-mermaid = { workspace = true } - -# Polkadot SDK deps, typically all should only be in scope such that we can link to their doc item. -chain-spec-builder = { workspace = true, default-features = true } -frame-benchmarking = { workspace = true } -frame-executive = { workspace = true } -frame-metadata-hash-extension = { workspace = true, default-features = true } -frame-support = { workspace = true } -frame-system = { workspace = true } -kitchensink-runtime = { workspace = true } +first-runtime.default-features = true +first-runtime.workspace = true +frame-benchmarking.workspace = true +frame-executive.workspace = true +frame-metadata-hash-extension.default-features = true +frame-metadata-hash-extension.workspace = true +frame-support.workspace = true +frame-system.workspace = true +kitchensink-runtime.workspace = true log = { workspace = true, default-features = true } -node-cli = { workspace = true } -pallet-example-authorization-tx-extension = { workspace = true, default-features = true } -pallet-example-single-block-migrations = { workspace = true, default-features = true } +minimal-template-runtime.default-features = true +minimal-template-runtime.workspace = true +node-cli.workspace = true +pallet-asset-conversion-tx-payment.default-features = true +pallet-asset-conversion-tx-payment.workspace = true +pallet-asset-tx-payment.default-features = true +pallet-asset-tx-payment.workspace = true +pallet-assets.default-features = true +pallet-assets.workspace = true +pallet-aura.default-features = true +pallet-aura.workspace = true +pallet-babe.default-features = true +pallet-babe.workspace = true +pallet-balances.default-features = true +pallet-balances.workspace = true +pallet-collective.default-features = true +pallet-collective.workspace = true +pallet-democracy.default-features = true +pallet-democracy.workspace = true +pallet-example-authorization-tx-extension.default-features = true +pallet-example-authorization-tx-extension.workspace = true +pallet-example-single-block-migrations.default-features = true +pallet-example-single-block-migrations.workspace = true +pallet-grandpa.default-features = true +pallet-grandpa.workspace = true +pallet-nfts.default-features = true +pallet-nfts.workspace = true +pallet-preimage.default-features = true +pallet-preimage.workspace = true +pallet-scheduler.default-features = true +pallet-scheduler.workspace = true +pallet-skip-feeless-payment.default-features = true +pallet-skip-feeless-payment.workspace = true +pallet-timestamp.default-features = true +pallet-timestamp.workspace = true +pallet-transaction-payment.default-features = true +pallet-transaction-payment.workspace = true +pallet-uniques.default-features = true +pallet-uniques.workspace = true +pallet-xcm.workspace = true +parachain-info.default-features = true +parachain-info.workspace = true +polkadot-omni-node-lib.default-features = true +polkadot-omni-node-lib.workspace = true polkadot-sdk = { features = ["runtime-full"], workspace = true, default-features = true } -subkey = { workspace = true, default-features = true } - -# Substrate Client -sc-chain-spec = { workspace = true, default-features = true } -sc-cli = { workspace = true, default-features = true } -sc-client-db = { workspace = true, default-features = true } -sc-consensus-aura = { workspace = true, default-features = true } -sc-consensus-babe = { workspace = true, default-features = true } -sc-consensus-beefy = { workspace = true, default-features = true } -sc-consensus-grandpa = { workspace = true, default-features = true } -sc-consensus-manual-seal = { workspace = true, default-features = true } -sc-consensus-pow = { workspace = true, default-features = true } -sc-executor = { workspace = true, default-features = true } -sc-network = { workspace = true, default-features = true } -sc-rpc = { workspace = true, default-features = true } -sc-rpc-api = { workspace = true, default-features = true } -sc-service = { workspace = true, default-features = true } - -substrate-wasm-builder = { workspace = true, default-features = true } - -# Cumulus -cumulus-client-service = { workspace = true, default-features = true } -cumulus-pallet-aura-ext = { workspace = true, default-features = true } -cumulus-pallet-parachain-system = { workspace = true, default-features = true } -cumulus-pallet-weight-reclaim = { workspace = true, default-features = true } -cumulus-primitives-proof-size-hostfunction = { workspace = true, default-features = true } -parachain-info = { workspace = true, default-features = true } - -# Omni Node -polkadot-omni-node-lib = { workspace = true, default-features = true } - -# Pallets and FRAME internals -pallet-asset-conversion-tx-payment = { workspace = true, default-features = true } -pallet-asset-tx-payment = { workspace = true, default-features = true } -pallet-assets = { workspace = true, default-features = true } -pallet-aura = { workspace = true, default-features = true } -pallet-babe = { workspace = true, default-features = true } -pallet-balances = { workspace = true, default-features = true } -pallet-collective = { workspace = true, default-features = true } -pallet-democracy = { workspace = true, default-features = true } -pallet-grandpa = { workspace = true, default-features = true } -pallet-nfts = { workspace = true, default-features = true } -pallet-preimage = { workspace = true, default-features = true } -pallet-scheduler = { workspace = true, default-features = true } -pallet-skip-feeless-payment = { workspace = true, default-features = true } -pallet-timestamp = { workspace = true, default-features = true } -pallet-transaction-payment = { workspace = true, default-features = true } -pallet-uniques = { workspace = true, default-features = true } - -# Primitives -sp-api = { workspace = true, default-features = true } -sp-arithmetic = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-genesis-builder = { workspace = true, default-features = true } -sp-io = { workspace = true, default-features = true } -sp-keyring = { workspace = true, default-features = true } -sp-offchain = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } -sp-runtime-interface = { workspace = true, default-features = true } -sp-std = { workspace = true, default-features = true } -sp-storage = { workspace = true, default-features = true } -sp-tracing = { workspace = true, default-features = true } -sp-version = { workspace = true, default-features = true } -sp-weights = { workspace = true, default-features = true } - -# XCM -pallet-xcm = { workspace = true } -xcm = { workspace = true, default-features = true } -xcm-builder = { workspace = true } -xcm-docs = { workspace = true } -xcm-executor = { workspace = true } -xcm-simulator = { workspace = true } - -# Runtime guides -chain-spec-guide-runtime = { workspace = true, default-features = true } - -# Templates -minimal-template-runtime = { workspace = true, default-features = true } -solochain-template-runtime = { workspace = true, default-features = true } - -# local packages -first-runtime = { workspace = true, default-features = true } +sc-chain-spec.default-features = true +sc-chain-spec.workspace = true +sc-cli.default-features = true +sc-cli.workspace = true +sc-client-db.default-features = true +sc-client-db.workspace = true +sc-consensus-aura.default-features = true +sc-consensus-aura.workspace = true +sc-consensus-babe.default-features = true +sc-consensus-babe.workspace = true +sc-consensus-beefy.default-features = true +sc-consensus-beefy.workspace = true +sc-consensus-grandpa.default-features = true +sc-consensus-grandpa.workspace = true +sc-consensus-manual-seal.default-features = true +sc-consensus-manual-seal.workspace = true +sc-consensus-pow.default-features = true +sc-consensus-pow.workspace = true +sc-executor.default-features = true +sc-executor.workspace = true +sc-network.default-features = true +sc-network.workspace = true +sc-rpc-api.default-features = true +sc-rpc-api.workspace = true +sc-rpc.default-features = true +sc-rpc.workspace = true +sc-service.default-features = true +sc-service.workspace = true +serde_json = { workspace = true } +simple-mermaid = { workspace = true } +solochain-template-runtime.default-features = true +solochain-template-runtime.workspace = true +sp-api.default-features = true +sp-api.workspace = true +sp-arithmetic.default-features = true +sp-arithmetic.workspace = true +sp-core.default-features = true +sp-core.workspace = true +sp-genesis-builder.default-features = true +sp-genesis-builder.workspace = true +sp-io.default-features = true +sp-io.workspace = true +sp-keyring.default-features = true +sp-keyring.workspace = true +sp-offchain.default-features = true +sp-offchain.workspace = true +sp-runtime-interface.default-features = true +sp-runtime-interface.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true +sp-std.default-features = true +sp-std.workspace = true +sp-storage.default-features = true +sp-storage.workspace = true +sp-tracing.default-features = true +sp-tracing.workspace = true +sp-version.default-features = true +sp-version.workspace = true +sp-weights.default-features = true +sp-weights.workspace = true +subkey.default-features = true +subkey.workspace = true +substrate-wasm-builder.default-features = true +substrate-wasm-builder.workspace = true +xcm-builder.workspace = true +xcm-docs.workspace = true +xcm-executor.workspace = true +xcm-simulator.workspace = true +xcm.default-features = true +xcm.workspace = true [dev-dependencies] assert_cmd = { workspace = true } diff --git a/docs/sdk/packages/guides/first-pallet/Cargo.toml b/docs/sdk/packages/guides/first-pallet/Cargo.toml index e6325c31781a6..382b0ceca9821 100644 --- a/docs/sdk/packages/guides/first-pallet/Cargo.toml +++ b/docs/sdk/packages/guides/first-pallet/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "polkadot-sdk-docs-first-pallet" description = "A simple pallet created for the polkadot-sdk-docs guides" -version = "0.0.0" +version = "0.1.0" license = "MIT-0" authors.workspace = true homepage.workspace = true diff --git a/docs/sdk/packages/guides/first-runtime/Cargo.toml b/docs/sdk/packages/guides/first-runtime/Cargo.toml index 8ed17dea1b71e..f02be6d38c74d 100644 --- a/docs/sdk/packages/guides/first-runtime/Cargo.toml +++ b/docs/sdk/packages/guides/first-runtime/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "polkadot-sdk-docs-first-runtime" description = "A simple runtime created for the polkadot-sdk-docs guides" -version = "0.0.0" +version = "0.1.0" license = "MIT-0" authors.workspace = true homepage.workspace = true @@ -14,24 +14,16 @@ workspace = true [dependencies] codec = { workspace = true } +first-pallet.workspace = true +frame = { workspace = true, features = ["runtime"] } +pallet-balances.workspace = true +pallet-sudo.workspace = true +pallet-timestamp.workspace = true +pallet-transaction-payment-rpc-runtime-api.workspace = true +pallet-transaction-payment.workspace = true scale-info = { workspace = true } serde_json = { workspace = true } - -# this is a frame-based runtime, thus importing `frame` with runtime feature enabled. -frame = { workspace = true, features = ["runtime"] } - -# pallets that we want to use -pallet-balances = { workspace = true } -pallet-sudo = { workspace = true } -pallet-timestamp = { workspace = true } -pallet-transaction-payment = { workspace = true } -pallet-transaction-payment-rpc-runtime-api = { workspace = true } - -# other polkadot-sdk-deps -sp-keyring = { workspace = true } - -# local pallet templates -first-pallet = { workspace = true } +sp-keyring.workspace = true docify = { workspace = true } diff --git a/docs/sdk/src/reference_docs/chain_spec_runtime/Cargo.toml b/docs/sdk/src/reference_docs/chain_spec_runtime/Cargo.toml index 999abd0b1192f..78592485d64f9 100644 --- a/docs/sdk/src/reference_docs/chain_spec_runtime/Cargo.toml +++ b/docs/sdk/src/reference_docs/chain_spec_runtime/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "chain-spec-guide-runtime" description = "A minimal runtime for chain spec guide" -version = "0.0.0" +version = "0.1.0" license = "MIT-0" authors.workspace = true homepage.workspace = true @@ -12,24 +12,20 @@ publish = false [dependencies] codec = { workspace = true } docify = { workspace = true } -frame-support = { workspace = true } +frame = { features = ["experimental", "runtime"], workspace = true } +frame-support.workspace = true scale-info = { workspace = true } serde = { workspace = true } serde_json = { workspace = true } - -# this is a frame-based runtime, thus importing `frame` with runtime feature enabled. -frame = { features = ["experimental", "runtime"], workspace = true } - -# genesis builder that allows us to interact with runtime genesis config sp-application-crypto = { features = ["serde"], workspace = true } -sp-core = { workspace = true } -sp-genesis-builder = { workspace = true } -sp-keyring = { workspace = true } +sp-core.workspace = true +sp-genesis-builder.workspace = true +sp-keyring.workspace = true sp-runtime = { features = ["serde"], workspace = true } [dev-dependencies] cmd_lib = { workspace = true } -sc-chain-spec = { workspace = true, default-features = true } +sc-chain-spec = { default-features = true, workspace = true } [build-dependencies] substrate-wasm-builder = { optional = true, workspace = true, default-features = true } diff --git a/polkadot/Cargo.toml b/polkadot/Cargo.toml index aa8d633c5c045..bff784bf7d3f1 100644 --- a/polkadot/Cargo.toml +++ b/polkadot/Cargo.toml @@ -6,7 +6,7 @@ rust-version = "1.64.0" readme = "README.md" authors.workspace = true edition.workspace = true -version = "6.0.0" +version = "24.0.0" default-run = "polkadot" homepage.workspace = true repository.workspace = true @@ -67,17 +67,18 @@ path = "src/bin/prepare-worker.rs" [dependencies] color-eyre = { workspace = true } -tikv-jemallocator = { optional = true, features = ["unprefixed_malloc_on_supported_platforms"], workspace = true } - -# Crates in our workspace, defined as dependencies so we can pass them feature flags. polkadot-cli = { features = ["rococo-native", "westend-native"], workspace = true, default-features = true } -polkadot-node-core-pvf = { workspace = true, default-features = true } -polkadot-node-core-pvf-prepare-worker = { workspace = true, default-features = true } -polkadot-overseer = { workspace = true, default-features = true } - -# Needed for worker binaries. -polkadot-node-core-pvf-common = { workspace = true, default-features = true } -polkadot-node-core-pvf-execute-worker = { workspace = true, default-features = true } +polkadot-node-core-pvf-common.default-features = true +polkadot-node-core-pvf-common.workspace = true +polkadot-node-core-pvf-execute-worker.default-features = true +polkadot-node-core-pvf-execute-worker.workspace = true +polkadot-node-core-pvf-prepare-worker.default-features = true +polkadot-node-core-pvf-prepare-worker.workspace = true +polkadot-node-core-pvf.default-features = true +polkadot-node-core-pvf.workspace = true +polkadot-overseer.default-features = true +polkadot-overseer.workspace = true +tikv-jemallocator = { optional = true, features = ["unprefixed_malloc_on_supported_platforms"], workspace = true } [target.'cfg(target_os = "linux")'.dependencies] tikv-jemallocator = { workspace = true, features = ["unprefixed_malloc_on_supported_platforms"] } @@ -85,13 +86,14 @@ tikv-jemallocator = { workspace = true, features = ["unprefixed_malloc_on_suppor [dev-dependencies] assert_cmd = { workspace = true } nix = { features = ["signal"], workspace = true } -polkadot-core-primitives = { workspace = true, default-features = true } -substrate-rpc-client = { workspace = true, default-features = true } +polkadot-core-primitives = { default-features = true, workspace = true } +substrate-rpc-client = { default-features = true, workspace = true } tempfile = { workspace = true } tokio = { workspace = true, default-features = true } [build-dependencies] -substrate-build-script-utils = { workspace = true, default-features = true } +substrate-build-script-utils.default-features = true +substrate-build-script-utils.workspace = true [features] runtime-benchmarks = ["polkadot-cli/runtime-benchmarks"] diff --git a/polkadot/cli/Cargo.toml b/polkadot/cli/Cargo.toml index ea64ff024e3a5..269b8fce43ac0 100644 --- a/polkadot/cli/Cargo.toml +++ b/polkadot/cli/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "polkadot-cli" description = "Polkadot Relay-chain Client Node" -version = "7.0.0" +version = "25.0.0" authors.workspace = true edition.workspace = true license.workspace = true @@ -21,28 +21,34 @@ crate-type = ["cdylib", "rlib"] [dependencies] clap = { features = ["derive"], optional = true, workspace = true } +frame-benchmarking-cli = { optional = true, workspace = true, default-features = true } futures = { workspace = true } log = { workspace = true, default-features = true } +polkadot-node-metrics.default-features = true +polkadot-node-metrics.workspace = true +polkadot-node-primitives.default-features = true +polkadot-node-primitives.workspace = true +polkadot-service = { optional = true, workspace = true } pyroscope = { optional = true, workspace = true } pyroscope_pprofrs = { optional = true, workspace = true } -thiserror = { workspace = true } - -polkadot-service = { optional = true, workspace = true } - -frame-benchmarking-cli = { optional = true, workspace = true, default-features = true } -polkadot-node-metrics = { workspace = true, default-features = true } -polkadot-node-primitives = { workspace = true, default-features = true } sc-cli = { optional = true, workspace = true, default-features = true } sc-service = { optional = true, workspace = true, default-features = true } -sc-storage-monitor = { workspace = true, default-features = true } -sc-sysinfo = { workspace = true, default-features = true } +sc-storage-monitor.default-features = true +sc-storage-monitor.workspace = true +sc-sysinfo.default-features = true +sc-sysinfo.workspace = true sc-tracing = { optional = true, workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-keyring = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } +sp-core.default-features = true +sp-core.workspace = true +sp-keyring.default-features = true +sp-keyring.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true +thiserror = { workspace = true } [build-dependencies] -substrate-build-script-utils = { workspace = true, default-features = true } +substrate-build-script-utils.default-features = true +substrate-build-script-utils.workspace = true [features] default = ["cli", "db", "full-node"] diff --git a/polkadot/core-primitives/Cargo.toml b/polkadot/core-primitives/Cargo.toml index 1fb14e9d58e7e..0f165f17e53bc 100644 --- a/polkadot/core-primitives/Cargo.toml +++ b/polkadot/core-primitives/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-core-primitives" -version = "7.0.0" +version = "18.0.0" description = "Core Polkadot types used by Relay Chains and parachains." authors.workspace = true edition.workspace = true @@ -14,8 +14,8 @@ workspace = true [dependencies] codec = { features = ["derive"], workspace = true } scale-info = { features = ["derive"], workspace = true } -sp-core = { workspace = true } -sp-runtime = { workspace = true } +sp-core.workspace = true +sp-runtime.workspace = true [features] default = ["std"] diff --git a/polkadot/erasure-coding/Cargo.toml b/polkadot/erasure-coding/Cargo.toml index ba712a89613b8..4fbf790f4ac28 100644 --- a/polkadot/erasure-coding/Cargo.toml +++ b/polkadot/erasure-coding/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-erasure-coding" -version = "7.0.0" +version = "20.0.0" description = "Erasure coding used for Polkadot's availability system" authors.workspace = true edition.workspace = true @@ -14,10 +14,14 @@ workspace = true [dependencies] codec = { features = ["derive", "std"], workspace = true } novelpoly = { workspace = true } -polkadot-node-primitives = { workspace = true, default-features = true } -polkadot-primitives = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-trie = { workspace = true, default-features = true } +polkadot-node-primitives.default-features = true +polkadot-node-primitives.workspace = true +polkadot-primitives.default-features = true +polkadot-primitives.workspace = true +sp-core.default-features = true +sp-core.workspace = true +sp-trie.default-features = true +sp-trie.workspace = true thiserror = { workspace = true } [dev-dependencies] diff --git a/polkadot/erasure-coding/fuzzer/Cargo.toml b/polkadot/erasure-coding/fuzzer/Cargo.toml index 5f1c2bda40580..7919fb3a81ab3 100644 --- a/polkadot/erasure-coding/fuzzer/Cargo.toml +++ b/polkadot/erasure-coding/fuzzer/Cargo.toml @@ -11,9 +11,12 @@ workspace = true [dependencies] honggfuzz = { workspace = true } -polkadot-erasure-coding = { workspace = true, default-features = true } -polkadot-node-primitives = { workspace = true, default-features = true } -polkadot-primitives = { workspace = true, default-features = true } +polkadot-erasure-coding.default-features = true +polkadot-erasure-coding.workspace = true +polkadot-node-primitives.default-features = true +polkadot-node-primitives.workspace = true +polkadot-primitives.default-features = true +polkadot-primitives.workspace = true [[bin]] name = "reconstruct" diff --git a/polkadot/node/collation-generation/Cargo.toml b/polkadot/node/collation-generation/Cargo.toml index e1400ac072db4..d9fe4f2812949 100644 --- a/polkadot/node/collation-generation/Cargo.toml +++ b/polkadot/node/collation-generation/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-node-collation-generation" -version = "7.0.0" +version = "24.0.0" authors.workspace = true edition.workspace = true license.workspace = true @@ -14,20 +14,27 @@ workspace = true [dependencies] codec = { features = ["bit-vec", "derive"], workspace = true } futures = { workspace = true } -gum = { workspace = true, default-features = true } -polkadot-erasure-coding = { workspace = true, default-features = true } -polkadot-node-primitives = { workspace = true, default-features = true } -polkadot-node-subsystem = { workspace = true, default-features = true } -polkadot-node-subsystem-util = { workspace = true, default-features = true } -polkadot-primitives = { workspace = true, default-features = true } +gum.default-features = true +gum.workspace = true +polkadot-erasure-coding.default-features = true +polkadot-erasure-coding.workspace = true +polkadot-node-primitives.default-features = true +polkadot-node-primitives.workspace = true +polkadot-node-subsystem-util.default-features = true +polkadot-node-subsystem-util.workspace = true +polkadot-node-subsystem.default-features = true +polkadot-node-subsystem.workspace = true +polkadot-primitives.default-features = true +polkadot-primitives.workspace = true schnellru = { workspace = true } -sp-core = { workspace = true, default-features = true } +sp-core.default-features = true +sp-core.workspace = true thiserror = { workspace = true } [dev-dependencies] assert_matches = { workspace = true } polkadot-node-subsystem-test-helpers = { workspace = true } -polkadot-primitives = { workspace = true, features = ["test"] } +polkadot-primitives = { features = ["test"], workspace = true, default-features = false } polkadot-primitives-test-helpers = { workspace = true } rstest = { workspace = true } -sp-keyring = { workspace = true, default-features = true } +sp-keyring = { default-features = true, workspace = true } diff --git a/polkadot/node/core/approval-voting-parallel/Cargo.toml b/polkadot/node/core/approval-voting-parallel/Cargo.toml index d39cb02e5dfc2..6ae11deb8bc65 100644 --- a/polkadot/node/core/approval-voting-parallel/Cargo.toml +++ b/polkadot/node/core/approval-voting-parallel/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-node-core-approval-voting-parallel" -version = "7.0.0" +version = "0.7.0" authors.workspace = true edition.workspace = true license.workspace = true @@ -14,21 +14,30 @@ workspace = true [dependencies] async-trait = { workspace = true } futures = { workspace = true } -gum = { workspace = true } +gum.workspace = true itertools = { workspace = true } - -polkadot-approval-distribution = { workspace = true, default-features = true } -polkadot-node-core-approval-voting = { workspace = true, default-features = true } -polkadot-node-metrics = { workspace = true, default-features = true } -polkadot-node-network-protocol = { workspace = true, default-features = true } -polkadot-node-primitives = { workspace = true, default-features = true } -polkadot-node-subsystem = { workspace = true, default-features = true } -polkadot-node-subsystem-util = { workspace = true, default-features = true } -polkadot-overseer = { workspace = true, default-features = true } -polkadot-primitives = { workspace = true, default-features = true } - -sc-keystore = { workspace = true, default-features = false } -sp-consensus = { workspace = true, default-features = false } +polkadot-approval-distribution.default-features = true +polkadot-approval-distribution.workspace = true +polkadot-node-core-approval-voting.default-features = true +polkadot-node-core-approval-voting.workspace = true +polkadot-node-metrics.default-features = true +polkadot-node-metrics.workspace = true +polkadot-node-network-protocol.default-features = true +polkadot-node-network-protocol.workspace = true +polkadot-node-primitives.default-features = true +polkadot-node-primitives.workspace = true +polkadot-node-subsystem-util.default-features = true +polkadot-node-subsystem-util.workspace = true +polkadot-node-subsystem.default-features = true +polkadot-node-subsystem.workspace = true +polkadot-overseer.default-features = true +polkadot-overseer.workspace = true +polkadot-primitives.default-features = true +polkadot-primitives.workspace = true +sc-keystore.default-features = false +sc-keystore.workspace = true +sp-consensus.default-features = false +sp-consensus.workspace = true rand = { workspace = true } rand_core = { workspace = true } @@ -37,9 +46,9 @@ rand_core = { workspace = true } assert_matches = { workspace = true } async-trait = { workspace = true } kvdb-memorydb = { workspace = true } -polkadot-node-subsystem-test-helpers = { workspace = true, default-features = true } +polkadot-node-subsystem-test-helpers = { default-features = true, workspace = true } schnorrkel = { workspace = true, default-features = true } -sp-consensus-babe = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-keyring = { workspace = true, default-features = true } -sp-tracing = { workspace = true } +sp-consensus-babe = { default-features = true, workspace = true } +sp-core = { default-features = true, workspace = true } +sp-keyring = { default-features = true, workspace = true } +sp-tracing = { workspace = true, default-features = false } diff --git a/polkadot/node/core/approval-voting/Cargo.toml b/polkadot/node/core/approval-voting/Cargo.toml index f24a86d67be41..6f401e413b5da 100644 --- a/polkadot/node/core/approval-voting/Cargo.toml +++ b/polkadot/node/core/approval-voting/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-node-core-approval-voting" -version = "7.0.0" +version = "24.0.0" authors.workspace = true edition.workspace = true license.workspace = true @@ -24,28 +24,33 @@ codec = { features = ["bit-vec", "derive"], workspace = true } derive_more = { workspace = true, default-features = true } futures = { workspace = true } futures-timer = { workspace = true } -gum = { workspace = true, default-features = true } +gum.default-features = true +gum.workspace = true itertools = { workspace = true } merlin = { workspace = true, default-features = true } +polkadot-node-primitives.default-features = true +polkadot-node-primitives.workspace = true +polkadot-node-subsystem-util.default-features = true +polkadot-node-subsystem-util.workspace = true +polkadot-node-subsystem.default-features = true +polkadot-node-subsystem.workspace = true +polkadot-overseer.default-features = true +polkadot-overseer.workspace = true +polkadot-primitives.default-features = true +polkadot-primitives.workspace = true schnellru = { workspace = true } schnorrkel = { workspace = true, default-features = true } thiserror = { workspace = true } -polkadot-node-primitives = { workspace = true, default-features = true } -polkadot-node-subsystem = { workspace = true, default-features = true } -polkadot-node-subsystem-util = { workspace = true, default-features = true } -polkadot-overseer = { workspace = true, default-features = true } -polkadot-primitives = { workspace = true, default-features = true } - rand = { workspace = true, default-features = true } rand_chacha = { workspace = true, default-features = true } # rand_core should match schnorrkel rand_core = { workspace = true } -sc-keystore = { workspace = true } +sc-keystore.workspace = true sp-application-crypto = { features = ["full_crypto"], workspace = true } -sp-consensus = { workspace = true } -sp-consensus-slots = { workspace = true } -sp-runtime = { workspace = true } +sp-consensus-slots.workspace = true +sp-consensus.workspace = true +sp-runtime.workspace = true [dev-dependencies] assert_matches = { workspace = true } @@ -53,13 +58,13 @@ async-trait = { workspace = true } kvdb-memorydb = { workspace = true } parking_lot = { workspace = true, default-features = true } polkadot-node-subsystem-test-helpers = { workspace = true } -polkadot-primitives = { workspace = true, features = ["test"] } +polkadot-primitives = { features = ["test"], workspace = true, default-features = false } polkadot-primitives-test-helpers = { workspace = true } -sp-consensus-babe = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-keyring = { workspace = true, default-features = true } -sp-keystore = { workspace = true, default-features = true } -sp-tracing = { workspace = true } +sp-consensus-babe = { default-features = true, workspace = true } +sp-core = { default-features = true, workspace = true } +sp-keyring = { default-features = true, workspace = true } +sp-keystore = { default-features = true, workspace = true } +sp-tracing = { workspace = true, default-features = false } polkadot-subsystem-bench = { workspace = true } diff --git a/polkadot/node/core/av-store/Cargo.toml b/polkadot/node/core/av-store/Cargo.toml index 920aa773d5215..f6ca31688249d 100644 --- a/polkadot/node/core/av-store/Cargo.toml +++ b/polkadot/node/core/av-store/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "polkadot-node-core-av-store" description = "The Availability Store subsystem. Wrapper over the DB that stores availability data and chunks." -version = "7.0.0" +version = "24.0.0" authors.workspace = true edition.workspace = true license.workspace = true @@ -15,25 +15,31 @@ workspace = true bitvec = { workspace = true, default-features = true } futures = { workspace = true } futures-timer = { workspace = true } -gum = { workspace = true, default-features = true } +gum.default-features = true +gum.workspace = true thiserror = { workspace = true } codec = { features = ["derive"], workspace = true, default-features = true } -polkadot-erasure-coding = { workspace = true, default-features = true } -polkadot-node-primitives = { workspace = true, default-features = true } -polkadot-node-subsystem = { workspace = true, default-features = true } -polkadot-node-subsystem-util = { workspace = true, default-features = true } -polkadot-primitives = { workspace = true, default-features = true } -sp-consensus = { workspace = true } +polkadot-erasure-coding.default-features = true +polkadot-erasure-coding.workspace = true +polkadot-node-primitives.default-features = true +polkadot-node-primitives.workspace = true +polkadot-node-subsystem-util.default-features = true +polkadot-node-subsystem-util.workspace = true +polkadot-node-subsystem.default-features = true +polkadot-node-subsystem.workspace = true +polkadot-primitives.default-features = true +polkadot-primitives.workspace = true +sp-consensus.workspace = true [dev-dependencies] assert_matches = { workspace = true } kvdb-memorydb = { workspace = true } -sp-tracing = { workspace = true } +sp-tracing = { workspace = true, default-features = false } parking_lot = { workspace = true, default-features = true } polkadot-node-subsystem-test-helpers = { workspace = true } -polkadot-node-subsystem-util = { workspace = true, default-features = true } +polkadot-node-subsystem-util = { default-features = true, workspace = true } polkadot-primitives-test-helpers = { workspace = true } -sp-core = { workspace = true, default-features = true } -sp-keyring = { workspace = true, default-features = true } +sp-core = { default-features = true, workspace = true } +sp-keyring = { default-features = true, workspace = true } diff --git a/polkadot/node/core/backing/Cargo.toml b/polkadot/node/core/backing/Cargo.toml index a234bdd3046ff..caac888a84318 100644 --- a/polkadot/node/core/backing/Cargo.toml +++ b/polkadot/node/core/backing/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-node-core-backing" -version = "7.0.0" +version = "24.0.0" authors.workspace = true edition.workspace = true license.workspace = true @@ -15,26 +15,35 @@ workspace = true bitvec = { features = ["alloc"], workspace = true } fatality = { workspace = true } futures = { workspace = true } -gum = { workspace = true, default-features = true } -polkadot-erasure-coding = { workspace = true, default-features = true } -polkadot-node-primitives = { workspace = true, default-features = true } -polkadot-node-subsystem = { workspace = true, default-features = true } -polkadot-node-subsystem-util = { workspace = true, default-features = true } -polkadot-parachain-primitives = { workspace = true, default-features = true } -polkadot-primitives = { workspace = true, default-features = true } -polkadot-statement-table = { workspace = true, default-features = true } +gum.default-features = true +gum.workspace = true +polkadot-erasure-coding.default-features = true +polkadot-erasure-coding.workspace = true +polkadot-node-primitives.default-features = true +polkadot-node-primitives.workspace = true +polkadot-node-subsystem-util.default-features = true +polkadot-node-subsystem-util.workspace = true +polkadot-node-subsystem.default-features = true +polkadot-node-subsystem.workspace = true +polkadot-parachain-primitives.default-features = true +polkadot-parachain-primitives.workspace = true +polkadot-primitives.default-features = true +polkadot-primitives.workspace = true +polkadot-statement-table.default-features = true +polkadot-statement-table.workspace = true schnellru = { workspace = true } -sp-keystore = { workspace = true, default-features = true } +sp-keystore.default-features = true +sp-keystore.workspace = true thiserror = { workspace = true } [dev-dependencies] assert_matches = { workspace = true } futures = { features = ["thread-pool"], workspace = true } polkadot-node-subsystem-test-helpers = { workspace = true } -polkadot-primitives = { workspace = true, features = ["test"] } +polkadot-primitives = { features = ["test"], workspace = true, default-features = false } polkadot-primitives-test-helpers = { workspace = true } -sc-keystore = { workspace = true, default-features = true } -sp-application-crypto = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-keyring = { workspace = true, default-features = true } -sp-tracing = { workspace = true, default-features = true } +sc-keystore = { default-features = true, workspace = true } +sp-application-crypto = { default-features = true, workspace = true } +sp-core = { default-features = true, workspace = true } +sp-keyring = { default-features = true, workspace = true } +sp-tracing = { default-features = true, workspace = true } diff --git a/polkadot/node/core/bitfield-signing/Cargo.toml b/polkadot/node/core/bitfield-signing/Cargo.toml index e75404729dbdb..7252c37500236 100644 --- a/polkadot/node/core/bitfield-signing/Cargo.toml +++ b/polkadot/node/core/bitfield-signing/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-node-core-bitfield-signing" -version = "7.0.0" +version = "24.0.0" authors.workspace = true edition.workspace = true license.workspace = true @@ -13,11 +13,16 @@ workspace = true [dependencies] futures = { workspace = true } -gum = { workspace = true, default-features = true } -polkadot-node-subsystem = { workspace = true, default-features = true } -polkadot-node-subsystem-util = { workspace = true, default-features = true } -polkadot-primitives = { workspace = true, default-features = true } -sp-keystore = { workspace = true, default-features = true } +gum.default-features = true +gum.workspace = true +polkadot-node-subsystem-util.default-features = true +polkadot-node-subsystem-util.workspace = true +polkadot-node-subsystem.default-features = true +polkadot-node-subsystem.workspace = true +polkadot-primitives.default-features = true +polkadot-primitives.workspace = true +sp-keystore.default-features = true +sp-keystore.workspace = true thiserror = { workspace = true } wasm-timer = { workspace = true } diff --git a/polkadot/node/core/candidate-validation/Cargo.toml b/polkadot/node/core/candidate-validation/Cargo.toml index e92976609f9e8..ac0ae498a548e 100644 --- a/polkadot/node/core/candidate-validation/Cargo.toml +++ b/polkadot/node/core/candidate-validation/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "polkadot-node-core-candidate-validation" description = "Polkadot crate that implements the Candidate Validation subsystem. Handles requests to validate candidates according to a PVF." -version = "7.0.0" +version = "24.0.0" authors.workspace = true edition.workspace = true license.workspace = true @@ -15,30 +15,38 @@ workspace = true async-trait = { workspace = true } futures = { workspace = true } futures-timer = { workspace = true } -gum = { workspace = true, default-features = true } +gum.default-features = true +gum.workspace = true codec = { features = ["bit-vec", "derive"], workspace = true } -sp-application-crypto = { workspace = true } -sp-keystore = { workspace = true } - -polkadot-node-metrics = { workspace = true, default-features = true } -polkadot-node-primitives = { workspace = true, default-features = true } -polkadot-node-subsystem = { workspace = true, default-features = true } -polkadot-node-subsystem-util = { workspace = true, default-features = true } -polkadot-overseer = { workspace = true, default-features = true } -polkadot-parachain-primitives = { workspace = true, default-features = true } -polkadot-primitives = { workspace = true, default-features = true } +polkadot-node-metrics.default-features = true +polkadot-node-metrics.workspace = true +polkadot-node-primitives.default-features = true +polkadot-node-primitives.workspace = true +polkadot-node-subsystem-util.default-features = true +polkadot-node-subsystem-util.workspace = true +polkadot-node-subsystem.default-features = true +polkadot-node-subsystem.workspace = true +polkadot-overseer.default-features = true +polkadot-overseer.workspace = true +polkadot-parachain-primitives.default-features = true +polkadot-parachain-primitives.workspace = true +polkadot-primitives.default-features = true +polkadot-primitives.workspace = true +sp-application-crypto.workspace = true +sp-keystore.workspace = true [target.'cfg(not(any(target_os = "android", target_os = "unknown")))'.dependencies] -polkadot-node-core-pvf = { workspace = true, default-features = true } +polkadot-node-core-pvf.workspace = true +polkadot-node-core-pvf.default-features = true [dev-dependencies] assert_matches = { workspace = true } futures = { features = ["thread-pool"], workspace = true } polkadot-node-subsystem-test-helpers = { workspace = true } -polkadot-primitives = { workspace = true, features = ["test"] } +polkadot-primitives = { features = ["test"], workspace = true, default-features = false } polkadot-primitives-test-helpers = { workspace = true } rstest = { workspace = true } -sp-core = { workspace = true, default-features = true } -sp-keyring = { workspace = true, default-features = true } -sp-maybe-compressed-blob = { workspace = true, default-features = true } +sp-core = { default-features = true, workspace = true } +sp-keyring = { default-features = true, workspace = true } +sp-maybe-compressed-blob = { default-features = true, workspace = true } diff --git a/polkadot/node/core/chain-api/Cargo.toml b/polkadot/node/core/chain-api/Cargo.toml index 0689a41233c79..14769f240b0e5 100644 --- a/polkadot/node/core/chain-api/Cargo.toml +++ b/polkadot/node/core/chain-api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-node-core-chain-api" -version = "7.0.0" +version = "24.0.0" authors.workspace = true edition.workspace = true license.workspace = true @@ -13,19 +13,25 @@ workspace = true [dependencies] futures = { workspace = true } -gum = { workspace = true, default-features = true } -polkadot-node-metrics = { workspace = true, default-features = true } -polkadot-node-subsystem = { workspace = true, default-features = true } -polkadot-node-subsystem-types = { workspace = true, default-features = true } -sc-client-api = { workspace = true, default-features = true } -sc-consensus-babe = { workspace = true, default-features = true } +gum.default-features = true +gum.workspace = true +polkadot-node-metrics.default-features = true +polkadot-node-metrics.workspace = true +polkadot-node-subsystem-types.default-features = true +polkadot-node-subsystem-types.workspace = true +polkadot-node-subsystem.default-features = true +polkadot-node-subsystem.workspace = true +sc-client-api.default-features = true +sc-client-api.workspace = true +sc-consensus-babe.default-features = true +sc-consensus-babe.workspace = true [dev-dependencies] codec = { workspace = true, default-features = true } futures = { features = ["thread-pool"], workspace = true } maplit = { workspace = true } -polkadot-node-primitives = { workspace = true, default-features = true } +polkadot-node-primitives = { default-features = true, workspace = true } polkadot-node-subsystem-test-helpers = { workspace = true } -polkadot-primitives = { workspace = true, default-features = true } -sp-blockchain = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } +polkadot-primitives = { default-features = true, workspace = true } +sp-blockchain = { default-features = true, workspace = true } +sp-core = { default-features = true, workspace = true } diff --git a/polkadot/node/core/chain-selection/Cargo.toml b/polkadot/node/core/chain-selection/Cargo.toml index 69f00b9272d64..4933277b14e16 100644 --- a/polkadot/node/core/chain-selection/Cargo.toml +++ b/polkadot/node/core/chain-selection/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "polkadot-node-core-chain-selection" description = "Chain Selection Subsystem" -version = "7.0.0" +version = "24.0.0" authors.workspace = true edition.workspace = true license.workspace = true @@ -15,11 +15,16 @@ workspace = true codec = { workspace = true, default-features = true } futures = { workspace = true } futures-timer = { workspace = true } -gum = { workspace = true, default-features = true } -polkadot-node-primitives = { workspace = true, default-features = true } -polkadot-node-subsystem = { workspace = true, default-features = true } -polkadot-node-subsystem-util = { workspace = true, default-features = true } -polkadot-primitives = { workspace = true, default-features = true } +gum.default-features = true +gum.workspace = true +polkadot-node-primitives.default-features = true +polkadot-node-primitives.workspace = true +polkadot-node-subsystem-util.default-features = true +polkadot-node-subsystem-util.workspace = true +polkadot-node-subsystem.default-features = true +polkadot-node-subsystem.workspace = true +polkadot-primitives.default-features = true +polkadot-primitives.workspace = true thiserror = { workspace = true } [dev-dependencies] @@ -27,4 +32,4 @@ assert_matches = { workspace = true } kvdb-memorydb = { workspace = true } parking_lot = { workspace = true, default-features = true } polkadot-node-subsystem-test-helpers = { workspace = true } -sp-core = { workspace = true, default-features = true } +sp-core = { default-features = true, workspace = true } diff --git a/polkadot/node/core/dispute-coordinator/Cargo.toml b/polkadot/node/core/dispute-coordinator/Cargo.toml index 91ef7077f2cb0..4d9dc271afc1c 100644 --- a/polkadot/node/core/dispute-coordinator/Cargo.toml +++ b/polkadot/node/core/dispute-coordinator/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-node-core-dispute-coordinator" -version = "7.0.0" +version = "24.0.0" description = "The node-side components that participate in disputes" authors.workspace = true edition.workspace = true @@ -15,29 +15,33 @@ workspace = true codec = { workspace = true, default-features = true } fatality = { workspace = true } futures = { workspace = true } -gum = { workspace = true, default-features = true } +gum.default-features = true +gum.workspace = true +polkadot-node-primitives.default-features = true +polkadot-node-primitives.workspace = true +polkadot-node-subsystem-util.default-features = true +polkadot-node-subsystem-util.workspace = true +polkadot-node-subsystem.default-features = true +polkadot-node-subsystem.workspace = true +polkadot-primitives.default-features = true +polkadot-primitives.workspace = true +sc-keystore.default-features = true +sc-keystore.workspace = true schnellru = { workspace = true } thiserror = { workspace = true } -polkadot-node-primitives = { workspace = true, default-features = true } -polkadot-node-subsystem = { workspace = true, default-features = true } -polkadot-node-subsystem-util = { workspace = true, default-features = true } -polkadot-primitives = { workspace = true, default-features = true } - -sc-keystore = { workspace = true, default-features = true } - [dev-dependencies] assert_matches = { workspace = true } futures-timer = { workspace = true } kvdb-memorydb = { workspace = true } polkadot-node-subsystem-test-helpers = { workspace = true } -polkadot-primitives = { workspace = true, features = ["test"] } +polkadot-primitives = { features = ["test"], workspace = true, default-features = false } polkadot-primitives-test-helpers = { workspace = true } -sp-application-crypto = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-keyring = { workspace = true, default-features = true } -sp-keystore = { workspace = true, default-features = true } -sp-tracing = { workspace = true, default-features = true } +sp-application-crypto = { default-features = true, workspace = true } +sp-core = { default-features = true, workspace = true } +sp-keyring = { default-features = true, workspace = true } +sp-keystore = { default-features = true, workspace = true } +sp-tracing = { default-features = true, workspace = true } [features] # If not enabled, the dispute coordinator will do nothing. diff --git a/polkadot/node/core/parachains-inherent/Cargo.toml b/polkadot/node/core/parachains-inherent/Cargo.toml index 264b8da2b44d3..050179b3e505c 100644 --- a/polkadot/node/core/parachains-inherent/Cargo.toml +++ b/polkadot/node/core/parachains-inherent/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-node-core-parachains-inherent" -version = "7.0.0" +version = "24.0.0" authors.workspace = true edition.workspace = true license.workspace = true @@ -15,10 +15,16 @@ workspace = true async-trait = { workspace = true } futures = { workspace = true } futures-timer = { workspace = true } -gum = { workspace = true, default-features = true } -polkadot-node-subsystem = { workspace = true, default-features = true } -polkadot-overseer = { workspace = true, default-features = true } -polkadot-primitives = { workspace = true, default-features = true } -sp-blockchain = { workspace = true, default-features = true } -sp-inherents = { workspace = true, default-features = true } +gum.default-features = true +gum.workspace = true +polkadot-node-subsystem.default-features = true +polkadot-node-subsystem.workspace = true +polkadot-overseer.default-features = true +polkadot-overseer.workspace = true +polkadot-primitives.default-features = true +polkadot-primitives.workspace = true +sp-blockchain.default-features = true +sp-blockchain.workspace = true +sp-inherents.default-features = true +sp-inherents.workspace = true thiserror = { workspace = true } diff --git a/polkadot/node/core/prospective-parachains/Cargo.toml b/polkadot/node/core/prospective-parachains/Cargo.toml index 0d0ede8d1d9bf..2ccb17f092fc1 100644 --- a/polkadot/node/core/prospective-parachains/Cargo.toml +++ b/polkadot/node/core/prospective-parachains/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-node-core-prospective-parachains" -version = "6.0.0" +version = "23.0.0" authors.workspace = true edition.workspace = true license.workspace = true @@ -14,19 +14,22 @@ workspace = true [dependencies] fatality = { workspace = true } futures = { workspace = true } -gum = { workspace = true, default-features = true } +gum.default-features = true +gum.workspace = true +polkadot-node-subsystem-util.default-features = true +polkadot-node-subsystem-util.workspace = true +polkadot-node-subsystem.default-features = true +polkadot-node-subsystem.workspace = true +polkadot-primitives.default-features = true +polkadot-primitives.workspace = true thiserror = { workspace = true } -polkadot-node-subsystem = { workspace = true, default-features = true } -polkadot-node-subsystem-util = { workspace = true, default-features = true } -polkadot-primitives = { workspace = true, default-features = true } - [dev-dependencies] assert_matches = { workspace = true } polkadot-node-subsystem-test-helpers = { workspace = true } -polkadot-primitives = { workspace = true, features = ["test"] } +polkadot-primitives = { features = ["test"], workspace = true, default-features = false } polkadot-primitives-test-helpers = { workspace = true } rand = { workspace = true } rstest = { workspace = true } -sp-core = { workspace = true, default-features = true } -sp-tracing = { workspace = true } +sp-core = { default-features = true, workspace = true } +sp-tracing = { workspace = true, default-features = false } diff --git a/polkadot/node/core/provisioner/Cargo.toml b/polkadot/node/core/provisioner/Cargo.toml index ec1430af6c04b..10e3d5d331c24 100644 --- a/polkadot/node/core/provisioner/Cargo.toml +++ b/polkadot/node/core/provisioner/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-node-core-provisioner" -version = "7.0.0" +version = "24.0.0" description = "Responsible for assembling a relay chain block from a set of available parachain candidates" authors.workspace = true edition.workspace = true @@ -16,16 +16,21 @@ bitvec = { features = ["alloc"], workspace = true } fatality = { workspace = true } futures = { workspace = true } futures-timer = { workspace = true } -gum = { workspace = true, default-features = true } -polkadot-node-primitives = { workspace = true, default-features = true } -polkadot-node-subsystem = { workspace = true, default-features = true } -polkadot-node-subsystem-util = { workspace = true, default-features = true } -polkadot-primitives = { workspace = true, default-features = true } +gum.default-features = true +gum.workspace = true +polkadot-node-primitives.default-features = true +polkadot-node-primitives.workspace = true +polkadot-node-subsystem-util.default-features = true +polkadot-node-subsystem-util.workspace = true +polkadot-node-subsystem.default-features = true +polkadot-node-subsystem.workspace = true +polkadot-primitives.default-features = true +polkadot-primitives.workspace = true thiserror = { workspace = true } [dev-dependencies] polkadot-node-subsystem-test-helpers = { workspace = true } -polkadot-primitives = { workspace = true, features = ["test"] } +polkadot-primitives = { features = ["test"], workspace = true, default-features = false } polkadot-primitives-test-helpers = { workspace = true } -sp-application-crypto = { workspace = true, default-features = true } -sp-keystore = { workspace = true, default-features = true } +sp-application-crypto = { default-features = true, workspace = true } +sp-keystore = { default-features = true, workspace = true } diff --git a/polkadot/node/core/pvf-checker/Cargo.toml b/polkadot/node/core/pvf-checker/Cargo.toml index 789d75b34c019..113280eb56a93 100644 --- a/polkadot/node/core/pvf-checker/Cargo.toml +++ b/polkadot/node/core/pvf-checker/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "polkadot-node-core-pvf-checker" description = "Polkadot crate that implements the PVF pre-checking subsystem. Responsible for checking and voting for PVFs that are pending approval." -version = "7.0.0" +version = "24.0.0" authors.workspace = true edition.workspace = true license.workspace = true @@ -13,20 +13,23 @@ workspace = true [dependencies] futures = { workspace = true } -gum = { workspace = true, default-features = true } - -polkadot-node-subsystem = { workspace = true, default-features = true } -polkadot-node-subsystem-util = { workspace = true, default-features = true } -polkadot-primitives = { workspace = true, default-features = true } - -sp-keystore = { workspace = true, default-features = true } +gum.default-features = true +gum.workspace = true +polkadot-node-subsystem-util.default-features = true +polkadot-node-subsystem-util.workspace = true +polkadot-node-subsystem.default-features = true +polkadot-node-subsystem.workspace = true +polkadot-primitives.default-features = true +polkadot-primitives.workspace = true +sp-keystore.default-features = true +sp-keystore.workspace = true [dev-dependencies] futures-timer = { workspace = true } polkadot-node-subsystem-test-helpers = { workspace = true } polkadot-primitives-test-helpers = { workspace = true } -sc-keystore = { workspace = true, default-features = true } -sp-application-crypto = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-keyring = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } +sc-keystore = { default-features = true, workspace = true } +sp-application-crypto = { default-features = true, workspace = true } +sp-core = { default-features = true, workspace = true } +sp-keyring = { default-features = true, workspace = true } +sp-runtime = { default-features = true, workspace = true } diff --git a/polkadot/node/core/pvf/Cargo.toml b/polkadot/node/core/pvf/Cargo.toml index 5de660b7b6e9e..74a78810323f8 100644 --- a/polkadot/node/core/pvf/Cargo.toml +++ b/polkadot/node/core/pvf/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "polkadot-node-core-pvf" description = "Polkadot crate that implements the PVF validation host. Responsible for coordinating preparation and execution of PVFs." -version = "7.0.0" +version = "24.0.0" authors.workspace = true edition.workspace = true license.workspace = true @@ -20,7 +20,8 @@ always-assert = { workspace = true } array-bytes = { workspace = true, default-features = true } futures = { workspace = true } futures-timer = { workspace = true } -gum = { workspace = true, default-features = true } +gum.default-features = true +gum.workspace = true is_executable = { optional = true, workspace = true } pin-project = { workspace = true } rand = { workspace = true, default-features = true } @@ -31,28 +32,33 @@ thiserror = { workspace = true } tokio = { features = ["fs", "process"], workspace = true, default-features = true } codec = { features = ["derive"], workspace = true } - -polkadot-node-core-pvf-common = { workspace = true, default-features = true } -polkadot-node-metrics = { workspace = true, default-features = true } -polkadot-node-primitives = { workspace = true, default-features = true } -polkadot-node-subsystem = { workspace = true, default-features = true } -polkadot-parachain-primitives = { workspace = true, default-features = true } -polkadot-primitives = { workspace = true, default-features = true } - +polkadot-node-core-pvf-common.default-features = true +polkadot-node-core-pvf-common.workspace = true polkadot-node-core-pvf-execute-worker = { optional = true, workspace = true, default-features = true } polkadot-node-core-pvf-prepare-worker = { optional = true, workspace = true, default-features = true } -sc-tracing = { workspace = true } -sp-core = { workspace = true, default-features = true } +polkadot-node-metrics.default-features = true +polkadot-node-metrics.workspace = true +polkadot-node-primitives.default-features = true +polkadot-node-primitives.workspace = true +polkadot-node-subsystem.default-features = true +polkadot-node-subsystem.workspace = true +polkadot-parachain-primitives.default-features = true +polkadot-parachain-primitives.workspace = true +polkadot-primitives.default-features = true +polkadot-primitives.workspace = true +sc-tracing.workspace = true +sp-core.default-features = true +sp-core.workspace = true sp-maybe-compressed-blob = { optional = true, workspace = true, default-features = true } [dev-dependencies] assert_matches = { workspace = true } criterion = { features = ["async_tokio", "cargo_bench_support"], workspace = true } -polkadot-node-core-pvf-common = { features = ["test-utils"], workspace = true, default-features = true } +polkadot-node-core-pvf-common = { features = ["test-utils"], default-features = true, workspace = true } polkadot-node-subsystem-test-helpers = { workspace = true } # For benches and integration tests, depend on ourselves with the test-utils feature. -polkadot-node-core-pvf = { features = ["test-utils"], workspace = true, default-features = true } +polkadot-node-core-pvf = { features = ["test-utils"], default-features = true, workspace = true } rococo-runtime = { workspace = true } test-parachain-adder = { workspace = true } diff --git a/polkadot/node/core/pvf/common/Cargo.toml b/polkadot/node/core/pvf/common/Cargo.toml index 1606aceb58c27..3bb9b4696d85c 100644 --- a/polkadot/node/core/pvf/common/Cargo.toml +++ b/polkadot/node/core/pvf/common/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "polkadot-node-core-pvf-common" description = "Polkadot crate that contains functionality related to PVFs that is shared by the PVF host and the PVF workers." -version = "7.0.0" +version = "20.0.0" authors.workspace = true edition.workspace = true license.workspace = true @@ -14,25 +14,33 @@ workspace = true [dependencies] cpu-time = { workspace = true } futures = { workspace = true } -gum = { workspace = true, default-features = true } +gum.default-features = true +gum.workspace = true libc = { workspace = true } nix = { features = ["resource", "sched"], workspace = true } thiserror = { workspace = true } codec = { features = ["derive"], workspace = true } - -polkadot-parachain-primitives = { workspace = true, default-features = true } -polkadot-primitives = { workspace = true, default-features = true } - -sc-executor = { workspace = true, default-features = true } -sc-executor-common = { workspace = true, default-features = true } -sc-executor-wasmtime = { workspace = true, default-features = true } - -sp-core = { workspace = true, default-features = true } -sp-crypto-hashing = { workspace = true, default-features = true } -sp-externalities = { workspace = true, default-features = true } -sp-io = { workspace = true, default-features = true } -sp-tracing = { workspace = true, default-features = true } +polkadot-parachain-primitives.default-features = true +polkadot-parachain-primitives.workspace = true +polkadot-primitives.default-features = true +polkadot-primitives.workspace = true +sc-executor-common.default-features = true +sc-executor-common.workspace = true +sc-executor-wasmtime.default-features = true +sc-executor-wasmtime.workspace = true +sc-executor.default-features = true +sc-executor.workspace = true +sp-core.default-features = true +sp-core.workspace = true +sp-crypto-hashing.default-features = true +sp-crypto-hashing.workspace = true +sp-externalities.default-features = true +sp-externalities.workspace = true +sp-io.default-features = true +sp-io.workspace = true +sp-tracing.default-features = true +sp-tracing.workspace = true [target.'cfg(target_os = "linux")'.dependencies] landlock = { workspace = true } diff --git a/polkadot/node/core/pvf/execute-worker/Cargo.toml b/polkadot/node/core/pvf/execute-worker/Cargo.toml index 4df425dfd199b..7a7bfff427267 100644 --- a/polkadot/node/core/pvf/execute-worker/Cargo.toml +++ b/polkadot/node/core/pvf/execute-worker/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "polkadot-node-core-pvf-execute-worker" description = "Polkadot crate that contains the logic for executing PVFs. Used by the polkadot-execute-worker binary." -version = "7.0.0" +version = "20.0.0" authors.workspace = true edition.workspace = true license.workspace = true @@ -14,18 +14,22 @@ workspace = true [dependencies] cfg-if = { workspace = true } cpu-time = { workspace = true } -gum = { workspace = true, default-features = true } +gum.default-features = true +gum.workspace = true libc = { workspace = true } nix = { features = ["process", "resource", "sched"], workspace = true } codec = { features = ["derive"], workspace = true } - -polkadot-node-core-pvf-common = { workspace = true, default-features = true } -polkadot-node-primitives = { workspace = true, default-features = true } -polkadot-parachain-primitives = { workspace = true, default-features = true } -polkadot-primitives = { workspace = true, default-features = true } - -sp-maybe-compressed-blob = { workspace = true, default-features = true } +polkadot-node-core-pvf-common.default-features = true +polkadot-node-core-pvf-common.workspace = true +polkadot-node-primitives.default-features = true +polkadot-node-primitives.workspace = true +polkadot-parachain-primitives.default-features = true +polkadot-parachain-primitives.workspace = true +polkadot-primitives.default-features = true +polkadot-primitives.workspace = true +sp-maybe-compressed-blob.default-features = true +sp-maybe-compressed-blob.workspace = true [features] builder = [] diff --git a/polkadot/node/core/pvf/prepare-worker/Cargo.toml b/polkadot/node/core/pvf/prepare-worker/Cargo.toml index 9921cf73aea05..d02543759d6e3 100644 --- a/polkadot/node/core/pvf/prepare-worker/Cargo.toml +++ b/polkadot/node/core/pvf/prepare-worker/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "polkadot-node-core-pvf-prepare-worker" description = "Polkadot crate that contains the logic for preparing PVFs. Used by the polkadot-prepare-worker binary." -version = "7.0.0" +version = "20.0.0" authors.workspace = true edition.workspace = true license.workspace = true @@ -17,19 +17,22 @@ harness = false [dependencies] cfg-if = { workspace = true } -gum = { workspace = true, default-features = true } +gum.default-features = true +gum.workspace = true libc = { workspace = true } nix = { features = ["process", "resource", "sched"], workspace = true } tikv-jemalloc-ctl = { optional = true, workspace = true } tikv-jemallocator = { optional = true, workspace = true } -tracking-allocator = { workspace = true, default-features = true } +tracking-allocator.default-features = true +tracking-allocator.workspace = true codec = { features = ["derive"], workspace = true } - -polkadot-node-core-pvf-common = { workspace = true, default-features = true } -polkadot-primitives = { workspace = true, default-features = true } - -sp-maybe-compressed-blob = { workspace = true, default-features = true } +polkadot-node-core-pvf-common.default-features = true +polkadot-node-core-pvf-common.workspace = true +polkadot-primitives.default-features = true +polkadot-primitives.workspace = true +sp-maybe-compressed-blob.default-features = true +sp-maybe-compressed-blob.workspace = true [target.'cfg(target_os = "linux")'.dependencies] tikv-jemallocator = { workspace = true } @@ -38,7 +41,7 @@ tikv-jemalloc-ctl = { workspace = true } [dev-dependencies] criterion = { features = ["cargo_bench_support"], workspace = true } rococo-runtime = { workspace = true } -sp-maybe-compressed-blob = { workspace = true, default-features = true } +sp-maybe-compressed-blob = { default-features = true, workspace = true } [features] builder = [] diff --git a/polkadot/node/core/runtime-api/Cargo.toml b/polkadot/node/core/runtime-api/Cargo.toml index 65c92dc5c0704..91ac2482cd8a4 100644 --- a/polkadot/node/core/runtime-api/Cargo.toml +++ b/polkadot/node/core/runtime-api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-node-core-runtime-api" -version = "7.0.0" +version = "24.0.0" description = "Wrapper around the parachain-related runtime APIs" authors.workspace = true edition.workspace = true @@ -13,22 +13,26 @@ workspace = true [dependencies] futures = { workspace = true } -gum = { workspace = true, default-features = true } +gum.default-features = true +gum.workspace = true +polkadot-node-metrics.default-features = true +polkadot-node-metrics.workspace = true +polkadot-node-subsystem-types.default-features = true +polkadot-node-subsystem-types.workspace = true +polkadot-node-subsystem.default-features = true +polkadot-node-subsystem.workspace = true +polkadot-primitives.default-features = true +polkadot-primitives.workspace = true schnellru = { workspace = true } - -sp-consensus-babe = { workspace = true, default-features = true } - -polkadot-node-metrics = { workspace = true, default-features = true } -polkadot-node-subsystem = { workspace = true, default-features = true } -polkadot-node-subsystem-types = { workspace = true, default-features = true } -polkadot-primitives = { workspace = true, default-features = true } +sp-consensus-babe.default-features = true +sp-consensus-babe.workspace = true [dev-dependencies] async-trait = { workspace = true } futures = { features = ["thread-pool"], workspace = true } -polkadot-node-primitives = { workspace = true, default-features = true } +polkadot-node-primitives = { default-features = true, workspace = true } polkadot-node-subsystem-test-helpers = { workspace = true } polkadot-primitives-test-helpers = { workspace = true } -sp-api = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-keyring = { workspace = true, default-features = true } +sp-api = { default-features = true, workspace = true } +sp-core = { default-features = true, workspace = true } +sp-keyring = { default-features = true, workspace = true } diff --git a/polkadot/node/gum/Cargo.toml b/polkadot/node/gum/Cargo.toml index f4c22dd7595e0..152e9131a5541 100644 --- a/polkadot/node/gum/Cargo.toml +++ b/polkadot/node/gum/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tracing-gum" -version = "7.0.0" +version = "20.0.0" authors.workspace = true edition.workspace = true license.workspace = true @@ -13,6 +13,7 @@ workspace = true [dependencies] coarsetime = { workspace = true } -gum-proc-macro = { workspace = true, default-features = true } +gum-proc-macro.default-features = true +gum-proc-macro.workspace = true polkadot-primitives = { features = ["std"], workspace = true, default-features = true } tracing = { workspace = true, default-features = true } diff --git a/polkadot/node/malus/Cargo.toml b/polkadot/node/malus/Cargo.toml index a9dc6d39d1407..7613aafac9cc9 100644 --- a/polkadot/node/malus/Cargo.toml +++ b/polkadot/node/malus/Cargo.toml @@ -34,30 +34,41 @@ async-trait = { workspace = true } clap = { features = ["derive"], workspace = true } color-eyre = { workspace = true } futures = { workspace = true } -gum = { workspace = true, default-features = true } +gum.default-features = true +gum.workspace = true polkadot-cli = { features = ["malus", "rococo-native", "westend-native"], workspace = true, default-features = true } -polkadot-erasure-coding = { workspace = true, default-features = true } -polkadot-node-network-protocol = { workspace = true, default-features = true } -polkadot-node-primitives = { workspace = true, default-features = true } -polkadot-node-subsystem = { workspace = true, default-features = true } -polkadot-node-subsystem-types = { workspace = true, default-features = true } -polkadot-node-subsystem-util = { workspace = true, default-features = true } -polkadot-primitives = { workspace = true, default-features = true } +polkadot-erasure-coding.default-features = true +polkadot-erasure-coding.workspace = true +polkadot-node-core-pvf-common.default-features = true +polkadot-node-core-pvf-common.workspace = true +polkadot-node-core-pvf-execute-worker.default-features = true +polkadot-node-core-pvf-execute-worker.workspace = true +polkadot-node-core-pvf-prepare-worker.default-features = true +polkadot-node-core-pvf-prepare-worker.workspace = true +polkadot-node-network-protocol.default-features = true +polkadot-node-network-protocol.workspace = true +polkadot-node-primitives.default-features = true +polkadot-node-primitives.workspace = true +polkadot-node-subsystem-types.default-features = true +polkadot-node-subsystem-types.workspace = true +polkadot-node-subsystem-util.default-features = true +polkadot-node-subsystem-util.workspace = true +polkadot-node-subsystem.default-features = true +polkadot-node-subsystem.workspace = true +polkadot-primitives.default-features = true +polkadot-primitives.workspace = true rand = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } - -# Required for worker binaries to build. -polkadot-node-core-pvf-common = { workspace = true, default-features = true } -polkadot-node-core-pvf-execute-worker = { workspace = true, default-features = true } -polkadot-node-core-pvf-prepare-worker = { workspace = true, default-features = true } +sp-core.default-features = true +sp-core.workspace = true [dev-dependencies] futures = { features = ["thread-pool"], workspace = true } polkadot-node-subsystem-test-helpers = { workspace = true } -sp-core = { workspace = true, default-features = true } +sp-core = { default-features = true, workspace = true } [build-dependencies] -substrate-build-script-utils = { workspace = true, default-features = true } +substrate-build-script-utils.default-features = true +substrate-build-script-utils.workspace = true [features] default = [] diff --git a/polkadot/node/metrics/Cargo.toml b/polkadot/node/metrics/Cargo.toml index ccd3756705b61..9ac3c30439103 100644 --- a/polkadot/node/metrics/Cargo.toml +++ b/polkadot/node/metrics/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "polkadot-node-metrics" description = "Subsystem metric helpers" -version = "7.0.0" +version = "24.0.0" authors.workspace = true edition.workspace = true license.workspace = true @@ -18,12 +18,16 @@ futures-timer = { workspace = true } bs58 = { features = ["alloc"], workspace = true, default-features = true } codec = { workspace = true, default-features = true } metered = { features = ["futures_channel"], workspace = true } -polkadot-primitives = { workspace = true, default-features = true } -prometheus-endpoint = { workspace = true, default-features = true } -# Both `sc-service` and `sc-cli` are required by runtime metrics `logger_hook()`. -sc-cli = { workspace = true, default-features = false } -sc-service = { workspace = true, default-features = false } -sc-tracing = { workspace = true, default-features = true } +polkadot-primitives.default-features = true +polkadot-primitives.workspace = true +prometheus-endpoint.default-features = true +prometheus-endpoint.workspace = true +sc-cli.default-features = false +sc-cli.workspace = true +sc-service.default-features = false +sc-service.workspace = true +sc-tracing.default-features = true +sc-tracing.workspace = true [dev-dependencies] http-body-util = { workspace = true } @@ -31,8 +35,8 @@ hyper = { workspace = true } hyper-util = { features = ["client-legacy", "tokio"], workspace = true } polkadot-test-service = { features = ["runtime-metrics"], workspace = true } prometheus-parse = { workspace = true } -sc-service = { workspace = true, default-features = true } -sp-keyring = { workspace = true, default-features = true } +sc-service = { default-features = true, workspace = true } +sp-keyring = { default-features = true, workspace = true } tokio = { workspace = true, default-features = true } [features] diff --git a/polkadot/node/network/approval-distribution/Cargo.toml b/polkadot/node/network/approval-distribution/Cargo.toml index 8d6b45ab63459..7b0193f992dcb 100644 --- a/polkadot/node/network/approval-distribution/Cargo.toml +++ b/polkadot/node/network/approval-distribution/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-approval-distribution" -version = "7.0.0" +version = "24.0.0" description = "Polkadot Approval Distribution subsystem for the distribution of assignments and approvals for approval checks on candidates over the network." authors.workspace = true edition.workspace = true @@ -13,23 +13,30 @@ workspace = true [dependencies] itertools = { workspace = true } -polkadot-node-metrics = { workspace = true, default-features = true } -polkadot-node-network-protocol = { workspace = true, default-features = true } -polkadot-node-primitives = { workspace = true, default-features = true } -polkadot-node-subsystem = { workspace = true, default-features = true } -polkadot-node-subsystem-util = { workspace = true, default-features = true } -polkadot-primitives = { workspace = true, default-features = true } +polkadot-node-metrics.default-features = true +polkadot-node-metrics.workspace = true +polkadot-node-network-protocol.default-features = true +polkadot-node-network-protocol.workspace = true +polkadot-node-primitives.default-features = true +polkadot-node-primitives.workspace = true +polkadot-node-subsystem-util.default-features = true +polkadot-node-subsystem-util.workspace = true +polkadot-node-subsystem.default-features = true +polkadot-node-subsystem.workspace = true +polkadot-primitives.default-features = true +polkadot-primitives.workspace = true rand = { workspace = true, default-features = true } futures = { workspace = true } futures-timer = { workspace = true } -gum = { workspace = true, default-features = true } +gum.default-features = true +gum.workspace = true [dev-dependencies] -sc-keystore = { workspace = true } -sp-application-crypto = { workspace = true, default-features = true } -sp-authority-discovery = { workspace = true, default-features = true } -sp-core = { features = ["std"], workspace = true, default-features = true } +sc-keystore = { workspace = true, default-features = false } +sp-application-crypto = { default-features = true, workspace = true } +sp-authority-discovery = { default-features = true, workspace = true } +sp-core = { features = ["std"], default-features = true, workspace = true } polkadot-node-subsystem-test-helpers = { workspace = true } polkadot-primitives-test-helpers = { workspace = true } @@ -39,4 +46,4 @@ rand_chacha = { workspace = true, default-features = true } schnorrkel = { workspace = true } # rand_core should match schnorrkel rand_core = { workspace = true } -sp-tracing = { workspace = true } +sp-tracing = { workspace = true, default-features = false } diff --git a/polkadot/node/network/availability-distribution/Cargo.toml b/polkadot/node/network/availability-distribution/Cargo.toml index 6cd72e1d92341..a48a5cb9d66a6 100644 --- a/polkadot/node/network/availability-distribution/Cargo.toml +++ b/polkadot/node/network/availability-distribution/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "polkadot-availability-distribution" description = "The Availability Distribution subsystem. Requests the required availability data. Also distributes availability data and chunks to requesters." -version = "7.0.0" +version = "24.0.0" authors.workspace = true edition.workspace = true license.workspace = true @@ -21,18 +21,27 @@ required-features = ["subsystem-benchmarks"] codec = { features = ["std"], workspace = true, default-features = true } fatality = { workspace = true } futures = { workspace = true } -gum = { workspace = true, default-features = true } -polkadot-erasure-coding = { workspace = true, default-features = true } -polkadot-node-network-protocol = { workspace = true, default-features = true } -polkadot-node-primitives = { workspace = true, default-features = true } -polkadot-node-subsystem = { workspace = true, default-features = true } -polkadot-node-subsystem-util = { workspace = true, default-features = true } -polkadot-primitives = { workspace = true, default-features = true } +gum.default-features = true +gum.workspace = true +polkadot-erasure-coding.default-features = true +polkadot-erasure-coding.workspace = true +polkadot-node-network-protocol.default-features = true +polkadot-node-network-protocol.workspace = true +polkadot-node-primitives.default-features = true +polkadot-node-primitives.workspace = true +polkadot-node-subsystem-util.default-features = true +polkadot-node-subsystem-util.workspace = true +polkadot-node-subsystem.default-features = true +polkadot-node-subsystem.workspace = true +polkadot-primitives.default-features = true +polkadot-primitives.workspace = true rand = { workspace = true, default-features = true } -sc-network = { workspace = true, default-features = true } +sc-network.default-features = true +sc-network.workspace = true schnellru = { workspace = true } sp-core = { features = ["std"], workspace = true, default-features = true } -sp-keystore = { workspace = true, default-features = true } +sp-keystore.default-features = true +sp-keystore.workspace = true thiserror = { workspace = true } [dev-dependencies] @@ -42,10 +51,10 @@ polkadot-node-subsystem-test-helpers = { workspace = true } polkadot-primitives-test-helpers = { workspace = true } polkadot-subsystem-bench = { workspace = true } rstest = { workspace = true } -sc-network = { workspace = true, default-features = true } -sp-core = { features = ["std"], workspace = true, default-features = true } -sp-keyring = { workspace = true, default-features = true } -sp-tracing = { workspace = true, default-features = true } +sc-network = { default-features = true, workspace = true } +sp-core = { features = ["std"], default-features = true, workspace = true } +sp-keyring = { default-features = true, workspace = true } +sp-tracing = { default-features = true, workspace = true } [features] subsystem-benchmarks = [] diff --git a/polkadot/node/network/availability-recovery/Cargo.toml b/polkadot/node/network/availability-recovery/Cargo.toml index a3420a2997cdd..e599e1c29b5af 100644 --- a/polkadot/node/network/availability-recovery/Cargo.toml +++ b/polkadot/node/network/availability-recovery/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "polkadot-availability-recovery" description = "The Availability Recovery subsystem. Handles requests for recovering the availability data of included candidates." -version = "7.0.0" +version = "24.0.0" authors.workspace = true edition.workspace = true license.workspace = true @@ -21,30 +21,38 @@ required-features = ["subsystem-benchmarks"] async-trait = { workspace = true } fatality = { workspace = true } futures = { workspace = true } -gum = { workspace = true, default-features = true } +gum.default-features = true +gum.workspace = true rand = { workspace = true, default-features = true } schnellru = { workspace = true } thiserror = { workspace = true } tokio = { workspace = true, default-features = true } codec = { features = ["derive"], workspace = true } -polkadot-erasure-coding = { workspace = true, default-features = true } -polkadot-node-network-protocol = { workspace = true, default-features = true } -polkadot-node-primitives = { workspace = true, default-features = true } -polkadot-node-subsystem = { workspace = true, default-features = true } -polkadot-node-subsystem-util = { workspace = true, default-features = true } -polkadot-primitives = { workspace = true, default-features = true } -sc-network = { workspace = true, default-features = true } +polkadot-erasure-coding.default-features = true +polkadot-erasure-coding.workspace = true +polkadot-node-network-protocol.default-features = true +polkadot-node-network-protocol.workspace = true +polkadot-node-primitives.default-features = true +polkadot-node-primitives.workspace = true +polkadot-node-subsystem-util.default-features = true +polkadot-node-subsystem-util.workspace = true +polkadot-node-subsystem.default-features = true +polkadot-node-subsystem.workspace = true +polkadot-primitives.default-features = true +polkadot-primitives.workspace = true +sc-network.default-features = true +sc-network.workspace = true [dev-dependencies] assert_matches = { workspace = true } futures-timer = { workspace = true } rstest = { workspace = true } -sc-network = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-keyring = { workspace = true, default-features = true } -sp-tracing = { workspace = true, default-features = true } +sc-network = { default-features = true, workspace = true } +sp-core = { default-features = true, workspace = true } +sp-keyring = { default-features = true, workspace = true } +sp-tracing = { default-features = true, workspace = true } polkadot-node-subsystem-test-helpers = { workspace = true } polkadot-primitives-test-helpers = { workspace = true } diff --git a/polkadot/node/network/bitfield-distribution/Cargo.toml b/polkadot/node/network/bitfield-distribution/Cargo.toml index 95d6c5782ea09..8501854b8f8e7 100644 --- a/polkadot/node/network/bitfield-distribution/Cargo.toml +++ b/polkadot/node/network/bitfield-distribution/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-availability-bitfield-distribution" -version = "7.0.0" +version = "24.0.0" description = "Polkadot Bitfiled Distribution subsystem, which gossips signed availability bitfields used to compactly determine which backed candidates are available or not based on a 2/3+ quorum." authors.workspace = true edition.workspace = true @@ -14,11 +14,16 @@ workspace = true [dependencies] futures = { workspace = true } futures-timer = { workspace = true } -gum = { workspace = true, default-features = true } -polkadot-node-network-protocol = { workspace = true, default-features = true } -polkadot-node-subsystem = { workspace = true, default-features = true } -polkadot-node-subsystem-util = { workspace = true, default-features = true } -polkadot-primitives = { workspace = true, default-features = true } +gum.default-features = true +gum.workspace = true +polkadot-node-network-protocol.default-features = true +polkadot-node-network-protocol.workspace = true +polkadot-node-subsystem-util.default-features = true +polkadot-node-subsystem-util.workspace = true +polkadot-node-subsystem.default-features = true +polkadot-node-subsystem.workspace = true +polkadot-primitives.default-features = true +polkadot-primitives.workspace = true rand = { workspace = true, default-features = true } [dev-dependencies] @@ -27,9 +32,9 @@ bitvec = { features = ["alloc"], workspace = true } maplit = { workspace = true } polkadot-node-subsystem-test-helpers = { workspace = true } rand_chacha = { workspace = true, default-features = true } -sp-application-crypto = { workspace = true, default-features = true } -sp-authority-discovery = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-keyring = { workspace = true, default-features = true } -sp-keystore = { workspace = true, default-features = true } -sp-tracing = { workspace = true } +sp-application-crypto = { default-features = true, workspace = true } +sp-authority-discovery = { default-features = true, workspace = true } +sp-core = { default-features = true, workspace = true } +sp-keyring = { default-features = true, workspace = true } +sp-keystore = { default-features = true, workspace = true } +sp-tracing = { workspace = true, default-features = false } diff --git a/polkadot/node/network/bridge/Cargo.toml b/polkadot/node/network/bridge/Cargo.toml index cdc1bc3f6c1bc..ab0c77e4f3138 100644 --- a/polkadot/node/network/bridge/Cargo.toml +++ b/polkadot/node/network/bridge/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-network-bridge" -version = "7.0.0" +version = "24.0.0" description = "The Network Bridge Subsystem — protocol multiplexer for Polkadot." authors.workspace = true edition.workspace = true @@ -18,22 +18,30 @@ bytes = { workspace = true, default-features = true } codec = { features = ["derive"], workspace = true } fatality = { workspace = true } futures = { workspace = true } -gum = { workspace = true, default-features = true } +gum.default-features = true +gum.workspace = true parking_lot = { workspace = true, default-features = true } -polkadot-node-metrics = { workspace = true, default-features = true } -polkadot-node-network-protocol = { workspace = true, default-features = true } -polkadot-node-subsystem = { workspace = true, default-features = true } -polkadot-overseer = { workspace = true, default-features = true } -polkadot-primitives = { workspace = true, default-features = true } -sc-network = { workspace = true, default-features = true } -sp-consensus = { workspace = true, default-features = true } +polkadot-node-metrics.default-features = true +polkadot-node-metrics.workspace = true +polkadot-node-network-protocol.default-features = true +polkadot-node-network-protocol.workspace = true +polkadot-node-subsystem.default-features = true +polkadot-node-subsystem.workspace = true +polkadot-overseer.default-features = true +polkadot-overseer.workspace = true +polkadot-primitives.default-features = true +polkadot-primitives.workspace = true +sc-network.default-features = true +sc-network.workspace = true +sp-consensus.default-features = true +sp-consensus.workspace = true thiserror = { workspace = true } [dev-dependencies] assert_matches = { workspace = true } futures-timer = { workspace = true } polkadot-node-subsystem-test-helpers = { workspace = true } -polkadot-node-subsystem-util = { workspace = true, default-features = true } +polkadot-node-subsystem-util = { default-features = true, workspace = true } polkadot-primitives-test-helpers = { workspace = true } -sp-core = { workspace = true, default-features = true } -sp-keyring = { workspace = true, default-features = true } +sp-core = { default-features = true, workspace = true } +sp-keyring = { default-features = true, workspace = true } diff --git a/polkadot/node/network/collator-protocol/Cargo.toml b/polkadot/node/network/collator-protocol/Cargo.toml index cd9ea08446a1f..cfa58208ef72d 100644 --- a/polkadot/node/network/collator-protocol/Cargo.toml +++ b/polkadot/node/network/collator-protocol/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-collator-protocol" -version = "7.0.0" +version = "24.0.0" description = "Polkadot Collator Protocol subsystem. Allows collators and validators to talk to each other." authors.workspace = true edition.workspace = true @@ -16,19 +16,27 @@ async-trait = { workspace = true, optional = true } bitvec = { features = ["alloc"], workspace = true } futures = { workspace = true } futures-timer = { workspace = true } -gum = { workspace = true, default-features = true } +gum.default-features = true +gum.workspace = true schnellru = { workspace = true } - -sp-core = { workspace = true, default-features = true } -sp-keystore = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } +sp-core.default-features = true +sp-core.workspace = true +sp-keystore.default-features = true +sp-keystore.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true fatality = { workspace = true } -polkadot-node-network-protocol = { workspace = true, default-features = true } -polkadot-node-primitives = { workspace = true, default-features = true } -polkadot-node-subsystem = { workspace = true, default-features = true } -polkadot-node-subsystem-util = { workspace = true, default-features = true } -polkadot-primitives = { workspace = true, default-features = true } +polkadot-node-network-protocol.default-features = true +polkadot-node-network-protocol.workspace = true +polkadot-node-primitives.default-features = true +polkadot-node-primitives.workspace = true +polkadot-node-subsystem-util.default-features = true +polkadot-node-subsystem-util.workspace = true +polkadot-node-subsystem.default-features = true +polkadot-node-subsystem.workspace = true +polkadot-primitives.default-features = true +polkadot-primitives.workspace = true thiserror = { workspace = true } tokio-util = { workspace = true } # This should have really been a dev-dependency but clippy is complaining that it's not used with @@ -39,13 +47,13 @@ tokio = { features = ["macros"], workspace = true, default-features = true, opti [dev-dependencies] assert_matches = { workspace = true } rstest = { workspace = true } -sp-tracing = { workspace = true } +sp-tracing = { workspace = true, default-features = false } codec = { features = ["std"], workspace = true, default-features = true } -sc-keystore = { workspace = true, default-features = true } -sc-network = { workspace = true, default-features = true } -sp-core = { features = ["std"], workspace = true, default-features = true } -sp-keyring = { workspace = true, default-features = true } +sc-keystore = { default-features = true, workspace = true } +sc-network = { default-features = true, workspace = true } +sp-core = { features = ["std"], default-features = true, workspace = true } +sp-keyring = { default-features = true, workspace = true } polkadot-node-subsystem-test-helpers = { workspace = true } polkadot-primitives-test-helpers = { workspace = true } diff --git a/polkadot/node/network/dispute-distribution/Cargo.toml b/polkadot/node/network/dispute-distribution/Cargo.toml index 94b793149c11c..c4830576a5956 100644 --- a/polkadot/node/network/dispute-distribution/Cargo.toml +++ b/polkadot/node/network/dispute-distribution/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-dispute-distribution" -version = "7.0.0" +version = "24.0.0" description = "Polkadot Dispute Distribution subsystem, which ensures all concerned validators are aware of a dispute and have the relevant votes." authors.workspace = true edition.workspace = true @@ -16,16 +16,25 @@ codec = { features = ["std"], workspace = true, default-features = true } fatality = { workspace = true } futures = { workspace = true } futures-timer = { workspace = true } -gum = { workspace = true, default-features = true } +gum.default-features = true +gum.workspace = true indexmap = { workspace = true } -polkadot-node-network-protocol = { workspace = true, default-features = true } -polkadot-node-primitives = { workspace = true, default-features = true } -polkadot-node-subsystem = { workspace = true, default-features = true } -polkadot-node-subsystem-util = { workspace = true, default-features = true } -polkadot-primitives = { workspace = true, default-features = true } -sc-network = { workspace = true, default-features = true } -sp-application-crypto = { workspace = true, default-features = true } -sp-keystore = { workspace = true, default-features = true } +polkadot-node-network-protocol.default-features = true +polkadot-node-network-protocol.workspace = true +polkadot-node-primitives.default-features = true +polkadot-node-primitives.workspace = true +polkadot-node-subsystem-util.default-features = true +polkadot-node-subsystem-util.workspace = true +polkadot-node-subsystem.default-features = true +polkadot-node-subsystem.workspace = true +polkadot-primitives.default-features = true +polkadot-primitives.workspace = true +sc-network.default-features = true +sc-network.workspace = true +sp-application-crypto.default-features = true +sp-application-crypto.workspace = true +sp-keystore.default-features = true +sp-keystore.workspace = true thiserror = { workspace = true } [dev-dependencies] @@ -35,6 +44,6 @@ async-trait = { workspace = true } futures-timer = { workspace = true } polkadot-node-subsystem-test-helpers = { workspace = true } polkadot-primitives-test-helpers = { workspace = true } -sc-keystore = { workspace = true, default-features = true } -sp-keyring = { workspace = true, default-features = true } -sp-tracing = { workspace = true, default-features = true } +sc-keystore = { default-features = true, workspace = true } +sp-keyring = { default-features = true, workspace = true } +sp-tracing = { default-features = true, workspace = true } diff --git a/polkadot/node/network/gossip-support/Cargo.toml b/polkadot/node/network/gossip-support/Cargo.toml index e1d8c2b2f9dee..eafdeccffdef4 100644 --- a/polkadot/node/network/gossip-support/Cargo.toml +++ b/polkadot/node/network/gossip-support/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-gossip-support" -version = "7.0.0" +version = "24.0.1" description = "Polkadot Gossip Support subsystem. Responsible for keeping track of session changes and issuing a connection request to the relevant validators on every new session." authors.workspace = true edition.workspace = true @@ -12,28 +12,37 @@ repository.workspace = true workspace = true [dependencies] -sc-network = { workspace = true, default-features = true } -sp-application-crypto = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-crypto-hashing = { workspace = true, default-features = true } -sp-keystore = { workspace = true, default-features = true } - -polkadot-node-network-protocol = { workspace = true, default-features = true } -polkadot-node-subsystem = { workspace = true, default-features = true } -polkadot-node-subsystem-util = { workspace = true, default-features = true } -polkadot-primitives = { workspace = true, default-features = true } +polkadot-node-network-protocol.default-features = true +polkadot-node-network-protocol.workspace = true +polkadot-node-subsystem-util.default-features = true +polkadot-node-subsystem-util.workspace = true +polkadot-node-subsystem.default-features = true +polkadot-node-subsystem.workspace = true +polkadot-primitives.default-features = true +polkadot-primitives.workspace = true +sc-network.default-features = true +sc-network.workspace = true +sp-application-crypto.default-features = true +sp-application-crypto.workspace = true +sp-core.default-features = true +sp-core.workspace = true +sp-crypto-hashing.default-features = true +sp-crypto-hashing.workspace = true +sp-keystore.default-features = true +sp-keystore.workspace = true futures = { workspace = true } futures-timer = { workspace = true } -gum = { workspace = true, default-features = true } +gum.default-features = true +gum.workspace = true rand = { workspace = true } rand_chacha = { workspace = true } [dev-dependencies] -sp-authority-discovery = { workspace = true, default-features = true } -sp-consensus-babe = { workspace = true, default-features = true } -sp-keyring = { workspace = true, default-features = true } -sp-tracing = { workspace = true, default-features = true } +sp-authority-discovery = { default-features = true, workspace = true } +sp-consensus-babe = { default-features = true, workspace = true } +sp-keyring = { default-features = true, workspace = true } +sp-tracing = { default-features = true, workspace = true } polkadot-node-subsystem-test-helpers = { workspace = true } diff --git a/polkadot/node/network/protocol/Cargo.toml b/polkadot/node/network/protocol/Cargo.toml index 83a24959f60a9..4775deab51b7d 100644 --- a/polkadot/node/network/protocol/Cargo.toml +++ b/polkadot/node/network/protocol/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-node-network-protocol" -version = "7.0.0" +version = "24.0.0" authors.workspace = true edition.workspace = true license.workspace = true @@ -19,15 +19,22 @@ codec = { features = ["derive"], workspace = true } derive_more = { workspace = true, default-features = true } fatality = { workspace = true } futures = { workspace = true } -gum = { workspace = true, default-features = true } +gum.default-features = true +gum.workspace = true hex = { workspace = true, default-features = true } -polkadot-node-primitives = { workspace = true, default-features = true } -polkadot-primitives = { workspace = true, default-features = true } +polkadot-node-primitives.default-features = true +polkadot-node-primitives.workspace = true +polkadot-primitives.default-features = true +polkadot-primitives.workspace = true rand = { workspace = true, default-features = true } -sc-authority-discovery = { workspace = true, default-features = true } -sc-network = { workspace = true, default-features = true } -sc-network-types = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } +sc-authority-discovery.default-features = true +sc-authority-discovery.workspace = true +sc-network-types.default-features = true +sc-network-types.workspace = true +sc-network.default-features = true +sc-network.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true strum = { features = ["derive"], workspace = true, default-features = true } thiserror = { workspace = true } diff --git a/polkadot/node/network/statement-distribution/Cargo.toml b/polkadot/node/network/statement-distribution/Cargo.toml index 50ff448d0c8d4..2fd9d810af670 100644 --- a/polkadot/node/network/statement-distribution/Cargo.toml +++ b/polkadot/node/network/statement-distribution/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "polkadot-statement-distribution" description = "Statement Distribution Subsystem" -version = "7.0.0" +version = "24.0.0" authors.workspace = true edition.workspace = true license.workspace = true @@ -23,13 +23,20 @@ codec = { features = ["derive"], workspace = true } fatality = { workspace = true } futures = { workspace = true } futures-timer = { workspace = true } -gum = { workspace = true, default-features = true } -polkadot-node-network-protocol = { workspace = true, default-features = true } -polkadot-node-primitives = { workspace = true, default-features = true } -polkadot-node-subsystem = { workspace = true, default-features = true } -polkadot-node-subsystem-util = { workspace = true, default-features = true } -polkadot-primitives = { workspace = true, default-features = true } -sp-keystore = { workspace = true, default-features = true } +gum.default-features = true +gum.workspace = true +polkadot-node-network-protocol.default-features = true +polkadot-node-network-protocol.workspace = true +polkadot-node-primitives.default-features = true +polkadot-node-primitives.workspace = true +polkadot-node-subsystem-util.default-features = true +polkadot-node-subsystem-util.workspace = true +polkadot-node-subsystem.default-features = true +polkadot-node-subsystem.workspace = true +polkadot-primitives.default-features = true +polkadot-primitives.workspace = true +sp-keystore.default-features = true +sp-keystore.workspace = true thiserror = { workspace = true } [dev-dependencies] @@ -37,18 +44,18 @@ assert_matches = { workspace = true } async-channel = { workspace = true } futures-timer = { workspace = true } polkadot-node-subsystem-test-helpers = { workspace = true } -polkadot-primitives = { workspace = true, features = ["test"] } +polkadot-primitives = { features = ["test"], workspace = true, default-features = false } polkadot-primitives-test-helpers = { workspace = true } polkadot-subsystem-bench = { workspace = true } rand_chacha = { workspace = true, default-features = true } rstest = { workspace = true } -sc-keystore = { workspace = true, default-features = true } -sc-network = { workspace = true, default-features = true } -sp-application-crypto = { workspace = true, default-features = true } -sp-authority-discovery = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-keyring = { workspace = true, default-features = true } -sp-tracing = { workspace = true, default-features = true } +sc-keystore = { default-features = true, workspace = true } +sc-network = { default-features = true, workspace = true } +sp-application-crypto = { default-features = true, workspace = true } +sp-authority-discovery = { default-features = true, workspace = true } +sp-core = { default-features = true, workspace = true } +sp-keyring = { default-features = true, workspace = true } +sp-tracing = { default-features = true, workspace = true } [features] subsystem-benchmarks = [] diff --git a/polkadot/node/overseer/Cargo.toml b/polkadot/node/overseer/Cargo.toml index 79a3558761f02..6681b1ba12c5e 100644 --- a/polkadot/node/overseer/Cargo.toml +++ b/polkadot/node/overseer/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-overseer" -version = "7.0.0" +version = "24.0.0" authors.workspace = true edition.workspace = true license.workspace = true @@ -15,15 +15,23 @@ workspace = true async-trait = { workspace = true } futures = { workspace = true } futures-timer = { workspace = true } -gum = { workspace = true, default-features = true } +gum.default-features = true +gum.workspace = true orchestra = { features = ["futures_channel"], workspace = true } -polkadot-node-metrics = { workspace = true, default-features = true } -polkadot-node-network-protocol = { workspace = true, default-features = true } -polkadot-node-primitives = { workspace = true, default-features = true } -polkadot-node-subsystem-types = { workspace = true, default-features = true } -polkadot-primitives = { workspace = true, default-features = true } -sc-client-api = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } +polkadot-node-metrics.default-features = true +polkadot-node-metrics.workspace = true +polkadot-node-network-protocol.default-features = true +polkadot-node-network-protocol.workspace = true +polkadot-node-primitives.default-features = true +polkadot-node-primitives.workspace = true +polkadot-node-subsystem-types.default-features = true +polkadot-node-subsystem-types.workspace = true +polkadot-primitives.default-features = true +polkadot-primitives.workspace = true +sc-client-api.default-features = true +sc-client-api.workspace = true +sp-core.default-features = true +sp-core.workspace = true tikv-jemalloc-ctl = { optional = true, workspace = true } [target.'cfg(target_os = "linux")'.dependencies] @@ -40,5 +48,5 @@ polkadot-primitives-test-helpers = { workspace = true } [features] default = ["futures_channel"] expand = ["orchestra/expand"] -futures_channel = ["metered/futures_channel", "orchestra/futures_channel"] +futures_channel = ["orchestra/futures_channel"] jemalloc-allocator = ["dep:tikv-jemalloc-ctl"] diff --git a/polkadot/node/primitives/Cargo.toml b/polkadot/node/primitives/Cargo.toml index fac934a90d36a..e567d68588aa7 100644 --- a/polkadot/node/primitives/Cargo.toml +++ b/polkadot/node/primitives/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "polkadot-node-primitives" description = "Primitives types for the Node-side" -version = "7.0.0" +version = "20.0.0" authors.workspace = true edition.workspace = true license.workspace = true @@ -17,16 +17,21 @@ bounded-vec = { workspace = true } codec = { features = ["derive"], workspace = true } futures = { workspace = true } futures-timer = { workspace = true } -polkadot-parachain-primitives = { workspace = true } -polkadot-primitives = { workspace = true, default-features = true } -sc-keystore = { workspace = true } +polkadot-parachain-primitives.workspace = true +polkadot-primitives.default-features = true +polkadot-primitives.workspace = true +sc-keystore.workspace = true schnorrkel = { workspace = true, default-features = true } serde = { features = ["derive"], workspace = true, default-features = true } -sp-application-crypto = { workspace = true, default-features = true } -sp-consensus-babe = { workspace = true, default-features = true } -sp-consensus-slots = { workspace = true } -sp-keystore = { workspace = true, default-features = true } -sp-maybe-compressed-blob = { workspace = true, default-features = true } +sp-application-crypto.default-features = true +sp-application-crypto.workspace = true +sp-consensus-babe.default-features = true +sp-consensus-babe.workspace = true +sp-consensus-slots.workspace = true +sp-keystore.default-features = true +sp-keystore.workspace = true +sp-maybe-compressed-blob.default-features = true +sp-maybe-compressed-blob.workspace = true thiserror = { workspace = true } [target.'cfg(not(target_os = "unknown"))'.dependencies] diff --git a/polkadot/node/service/Cargo.toml b/polkadot/node/service/Cargo.toml index 9bb7b054e5cad..61aabbc6fa01c 100644 --- a/polkadot/node/service/Cargo.toml +++ b/polkadot/node/service/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "polkadot-service" rust-version = "1.60" -version = "7.0.1" +version = "25.0.0" authors.workspace = true edition.workspace = true license.workspace = true @@ -13,106 +13,124 @@ repository.workspace = true workspace = true [dependencies] -# Substrate Client -mmr-gadget = { workspace = true, default-features = true } -sc-authority-discovery = { workspace = true, default-features = true } -sc-basic-authorship = { workspace = true, default-features = true } -sc-chain-spec = { workspace = true, default-features = true } -sc-client-api = { workspace = true, default-features = true } -sc-consensus = { workspace = true, default-features = true } -sc-consensus-babe = { workspace = true, default-features = true } -sc-consensus-beefy = { workspace = true, default-features = true } -sc-consensus-grandpa = { workspace = true, default-features = true } -sc-consensus-slots = { workspace = true, default-features = true } -sc-executor = { workspace = true, default-features = true } -sc-keystore = { workspace = true, default-features = true } -sc-network = { workspace = true, default-features = true } -sc-network-sync = { workspace = true, default-features = true } -sc-offchain = { workspace = true, default-features = true } -sc-service = { workspace = true } -sc-sync-state-rpc = { workspace = true, default-features = true } -sc-sysinfo = { workspace = true, default-features = true } -sc-telemetry = { workspace = true, default-features = true } -sc-transaction-pool = { workspace = true, default-features = true } -sc-transaction-pool-api = { workspace = true, default-features = true } -sp-genesis-builder = { workspace = true, default-features = true } -sp-mmr-primitives = { workspace = true, default-features = true } - -# Substrate Primitives -pallet-transaction-payment = { workspace = true, default-features = true } -sp-api = { workspace = true, default-features = true } -sp-authority-discovery = { workspace = true, default-features = true } -sp-block-builder = { workspace = true, default-features = true } -sp-blockchain = { workspace = true, default-features = true } -sp-consensus = { workspace = true, default-features = true } -sp-consensus-babe = { workspace = true, default-features = true } -sp-consensus-beefy = { workspace = true, default-features = true } -sp-consensus-grandpa = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-inherents = { workspace = true, default-features = true } -sp-io = { workspace = true, default-features = true } -sp-keyring = { workspace = true, default-features = true } -sp-offchain = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } -sp-session = { workspace = true, default-features = true } -sp-timestamp = { workspace = true, default-features = true } -sp-transaction-pool = { workspace = true, default-features = true } -sp-version = { workspace = true, default-features = true } -sp-weights = { workspace = true, default-features = true } - -# Substrate Pallets +frame-benchmarking-cli.default-features = true +frame-benchmarking-cli.workspace = true +frame-benchmarking.default-features = true +frame-benchmarking.workspace = true frame-metadata-hash-extension = { optional = true, workspace = true, default-features = true } -frame-system = { workspace = true, default-features = true } -pallet-transaction-payment-rpc-runtime-api = { workspace = true, default-features = true } - -# Substrate Other -frame-benchmarking = { workspace = true, default-features = true } -frame-benchmarking-cli = { workspace = true, default-features = true } -frame-system-rpc-runtime-api = { workspace = true, default-features = true } -prometheus-endpoint = { workspace = true, default-features = true } +frame-system-rpc-runtime-api.default-features = true +frame-system-rpc-runtime-api.workspace = true +frame-system.default-features = true +frame-system.workspace = true +mmr-gadget.default-features = true +mmr-gadget.workspace = true +pallet-transaction-payment-rpc-runtime-api.default-features = true +pallet-transaction-payment-rpc-runtime-api.workspace = true +pallet-transaction-payment.default-features = true +pallet-transaction-payment.workspace = true +prometheus-endpoint.default-features = true +prometheus-endpoint.workspace = true +sc-authority-discovery.default-features = true +sc-authority-discovery.workspace = true +sc-basic-authorship.default-features = true +sc-basic-authorship.workspace = true +sc-chain-spec.default-features = true +sc-chain-spec.workspace = true +sc-client-api.default-features = true +sc-client-api.workspace = true +sc-consensus-babe.default-features = true +sc-consensus-babe.workspace = true +sc-consensus-beefy.default-features = true +sc-consensus-beefy.workspace = true +sc-consensus-grandpa.default-features = true +sc-consensus-grandpa.workspace = true +sc-consensus-slots.default-features = true +sc-consensus-slots.workspace = true +sc-consensus.default-features = true +sc-consensus.workspace = true +sc-executor.default-features = true +sc-executor.workspace = true +sc-keystore.default-features = true +sc-keystore.workspace = true +sc-network-sync.default-features = true +sc-network-sync.workspace = true +sc-network.default-features = true +sc-network.workspace = true +sc-offchain.default-features = true +sc-offchain.workspace = true +sc-service.workspace = true +sc-sync-state-rpc.default-features = true +sc-sync-state-rpc.workspace = true +sc-sysinfo.default-features = true +sc-sysinfo.workspace = true +sc-telemetry.default-features = true +sc-telemetry.workspace = true +sc-transaction-pool-api.default-features = true +sc-transaction-pool-api.workspace = true +sc-transaction-pool.default-features = true +sc-transaction-pool.workspace = true +sp-api.default-features = true +sp-api.workspace = true +sp-authority-discovery.default-features = true +sp-authority-discovery.workspace = true +sp-block-builder.default-features = true +sp-block-builder.workspace = true +sp-blockchain.default-features = true +sp-blockchain.workspace = true +sp-consensus-babe.default-features = true +sp-consensus-babe.workspace = true +sp-consensus-beefy.default-features = true +sp-consensus-beefy.workspace = true +sp-consensus-grandpa.default-features = true +sp-consensus-grandpa.workspace = true +sp-consensus.default-features = true +sp-consensus.workspace = true +sp-core.default-features = true +sp-core.workspace = true +sp-genesis-builder.default-features = true +sp-genesis-builder.workspace = true +sp-inherents.default-features = true +sp-inherents.workspace = true +sp-io.default-features = true +sp-io.workspace = true +sp-keyring.default-features = true +sp-keyring.workspace = true +sp-mmr-primitives.default-features = true +sp-mmr-primitives.workspace = true +sp-offchain.default-features = true +sp-offchain.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true +sp-session.default-features = true +sp-session.workspace = true +sp-timestamp.default-features = true +sp-timestamp.workspace = true +sp-transaction-pool.default-features = true +sp-transaction-pool.workspace = true +sp-version.default-features = true +sp-version.workspace = true +sp-weights.default-features = true +sp-weights.workspace = true # External Crates async-trait = { workspace = true } codec = { workspace = true, default-features = true } futures = { workspace = true } -gum = { workspace = true, default-features = true } +gum.default-features = true +gum.workspace = true is_executable = { workspace = true } kvdb = { workspace = true } kvdb-rocksdb = { optional = true, workspace = true } log = { workspace = true, default-features = true } parity-db = { optional = true, workspace = true } parking_lot = { workspace = true, default-features = true } -serde = { features = ["derive"], workspace = true, default-features = true } -serde_json = { workspace = true, default-features = true } -thiserror = { workspace = true } - -# Polkadot -polkadot-core-primitives = { workspace = true, default-features = true } -polkadot-node-core-parachains-inherent = { workspace = true, default-features = true } -polkadot-node-network-protocol = { workspace = true, default-features = true } -polkadot-node-primitives = { workspace = true, default-features = true } -polkadot-node-subsystem = { workspace = true, default-features = true } -polkadot-node-subsystem-types = { workspace = true, default-features = true } -polkadot-node-subsystem-util = { workspace = true, default-features = true } -polkadot-overseer = { workspace = true, default-features = true } -polkadot-primitives = { workspace = true, default-features = true } -polkadot-rpc = { workspace = true, default-features = true } -polkadot-runtime-parachains = { workspace = true, default-features = true } - -# Polkadot Runtime Constants -rococo-runtime-constants = { optional = true, workspace = true, default-features = true } -westend-runtime-constants = { optional = true, workspace = true, default-features = true } - -# Polkadot Runtimes -rococo-runtime = { optional = true, workspace = true } -westend-runtime = { optional = true, workspace = true } - -# Polkadot Subsystems polkadot-approval-distribution = { optional = true, workspace = true, default-features = true } polkadot-availability-bitfield-distribution = { optional = true, workspace = true, default-features = true } polkadot-availability-distribution = { optional = true, workspace = true, default-features = true } polkadot-availability-recovery = { optional = true, workspace = true, default-features = true } polkadot-collator-protocol = { optional = true, workspace = true, default-features = true } +polkadot-core-primitives.default-features = true +polkadot-core-primitives.workspace = true polkadot-dispute-distribution = { optional = true, workspace = true, default-features = true } polkadot-gossip-support = { optional = true, workspace = true, default-features = true } polkadot-network-bridge = { optional = true, workspace = true, default-features = true } @@ -126,22 +144,50 @@ polkadot-node-core-candidate-validation = { optional = true, workspace = true, d polkadot-node-core-chain-api = { optional = true, workspace = true, default-features = true } polkadot-node-core-chain-selection = { optional = true, workspace = true, default-features = true } polkadot-node-core-dispute-coordinator = { optional = true, workspace = true, default-features = true } +polkadot-node-core-parachains-inherent.default-features = true +polkadot-node-core-parachains-inherent.workspace = true polkadot-node-core-prospective-parachains = { optional = true, workspace = true, default-features = true } polkadot-node-core-provisioner = { optional = true, workspace = true, default-features = true } polkadot-node-core-pvf = { optional = true, workspace = true, default-features = true } polkadot-node-core-pvf-checker = { optional = true, workspace = true, default-features = true } polkadot-node-core-runtime-api = { optional = true, workspace = true, default-features = true } +polkadot-node-network-protocol.default-features = true +polkadot-node-network-protocol.workspace = true +polkadot-node-primitives.default-features = true +polkadot-node-primitives.workspace = true +polkadot-node-subsystem-types.default-features = true +polkadot-node-subsystem-types.workspace = true +polkadot-node-subsystem-util.default-features = true +polkadot-node-subsystem-util.workspace = true +polkadot-node-subsystem.default-features = true +polkadot-node-subsystem.workspace = true +polkadot-overseer.default-features = true +polkadot-overseer.workspace = true +polkadot-primitives.default-features = true +polkadot-primitives.workspace = true +polkadot-rpc.default-features = true +polkadot-rpc.workspace = true +polkadot-runtime-parachains.default-features = true +polkadot-runtime-parachains.workspace = true polkadot-statement-distribution = { optional = true, workspace = true, default-features = true } - -xcm = { workspace = true, default-features = true } -xcm-runtime-apis = { workspace = true, default-features = true } +rococo-runtime = { optional = true, workspace = true } +rococo-runtime-constants = { optional = true, workspace = true, default-features = true } +serde = { features = ["derive"], workspace = true, default-features = true } +serde_json = { workspace = true, default-features = true } +thiserror = { workspace = true } +westend-runtime = { optional = true, workspace = true } +westend-runtime-constants = { optional = true, workspace = true, default-features = true } +xcm-runtime-apis.default-features = true +xcm-runtime-apis.workspace = true +xcm.default-features = true +xcm.workspace = true [dev-dependencies] assert_matches = { workspace = true } polkadot-node-subsystem-test-helpers = { workspace = true } polkadot-primitives-test-helpers = { workspace = true } polkadot-test-client = { workspace = true } -sp-tracing = { workspace = true } +sp-tracing = { workspace = true, default-features = false } tempfile = { workspace = true } [features] diff --git a/polkadot/node/subsystem-bench/Cargo.toml b/polkadot/node/subsystem-bench/Cargo.toml index ede7cb67d8b8e..b3d909af9b7de 100644 --- a/polkadot/node/subsystem-bench/Cargo.toml +++ b/polkadot/node/subsystem-bench/Cargo.toml @@ -27,56 +27,82 @@ clap = { features = ["derive"], workspace = true } color-eyre = { workspace = true } colored = { workspace = true } futures = { workspace = true } -gum = { workspace = true, default-features = true } +gum.default-features = true +gum.workspace = true hex = { workspace = true, default-features = true } kvdb-memorydb = { workspace = true } -polkadot-availability-bitfield-distribution = { workspace = true, default-features = true } -polkadot-availability-distribution = { workspace = true, default-features = true } +polkadot-availability-bitfield-distribution.default-features = true +polkadot-availability-bitfield-distribution.workspace = true +polkadot-availability-distribution.default-features = true +polkadot-availability-distribution.workspace = true polkadot-availability-recovery = { features = ["subsystem-benchmarks"], workspace = true, default-features = true } -polkadot-node-core-av-store = { workspace = true, default-features = true } -polkadot-node-network-protocol = { workspace = true, default-features = true } -polkadot-node-primitives = { workspace = true, default-features = true } -polkadot-node-subsystem = { workspace = true, default-features = true } -polkadot-node-subsystem-types = { workspace = true, default-features = true } -polkadot-node-subsystem-util = { workspace = true, default-features = true } -polkadot-overseer = { workspace = true, default-features = true } +polkadot-node-core-av-store.default-features = true +polkadot-node-core-av-store.workspace = true +polkadot-node-network-protocol.default-features = true +polkadot-node-network-protocol.workspace = true +polkadot-node-primitives.default-features = true +polkadot-node-primitives.workspace = true +polkadot-node-subsystem-types.default-features = true +polkadot-node-subsystem-types.workspace = true +polkadot-node-subsystem-util.default-features = true +polkadot-node-subsystem-util.workspace = true +polkadot-node-subsystem.default-features = true +polkadot-node-subsystem.workspace = true +polkadot-overseer.default-features = true +polkadot-overseer.workspace = true polkadot-primitives = { workspace = true, features = ["test"] } -polkadot-statement-distribution = { workspace = true, default-features = true } +polkadot-statement-distribution.default-features = true +polkadot-statement-distribution.workspace = true # `rand` only supports uniform distribution, we need normal distribution for latency. rand = { workspace = true, default-features = true } rand_distr = { workspace = true } -sc-keystore = { workspace = true, default-features = true } +sc-keystore.default-features = true +sc-keystore.workspace = true sha1 = { workspace = true } -sp-core = { workspace = true, default-features = true } -sp-keystore = { workspace = true, default-features = true } -sp-tracing = { workspace = true } +sp-core.default-features = true +sp-core.workspace = true +sp-keystore.default-features = true +sp-keystore.workspace = true +sp-tracing.workspace = true tikv-jemallocator = { features = ["profiling", "unprefixed_malloc_on_supported_platforms"], workspace = true, optional = true } codec = { features = ["derive", "std"], workspace = true, default-features = true } itertools = { workspace = true } -polkadot-node-metrics = { workspace = true, default-features = true } -polkadot-node-subsystem-test-helpers = { workspace = true } -polkadot-primitives-test-helpers = { workspace = true } +polkadot-approval-distribution.default-features = true +polkadot-approval-distribution.workspace = true +polkadot-node-core-approval-voting-parallel.default-features = true +polkadot-node-core-approval-voting-parallel.workspace = true +polkadot-node-core-approval-voting.default-features = true +polkadot-node-core-approval-voting.workspace = true +polkadot-node-metrics.default-features = true +polkadot-node-metrics.workspace = true +polkadot-node-subsystem-test-helpers.workspace = true +polkadot-primitives-test-helpers.workspace = true prometheus = { workspace = true } -prometheus-endpoint = { workspace = true, default-features = true } -sc-network = { workspace = true, default-features = true } -sc-network-types = { workspace = true, default-features = true } -sc-service = { workspace = true, default-features = true } +prometheus-endpoint.default-features = true +prometheus-endpoint.workspace = true +sc-network-types.default-features = true +sc-network-types.workspace = true +sc-network.default-features = true +sc-network.workspace = true +sc-service.default-features = true +sc-service.workspace = true serde = { workspace = true, default-features = true } serde_json = { workspace = true } serde_yaml = { workspace = true } -sp-application-crypto = { workspace = true, default-features = true } -sp-consensus = { workspace = true, default-features = true } -sp-keyring = { workspace = true, default-features = true } +sp-application-crypto.default-features = true +sp-application-crypto.workspace = true +sp-consensus-babe.default-features = true +sp-consensus-babe.workspace = true +sp-consensus.default-features = true +sp-consensus.workspace = true +sp-keyring.default-features = true +sp-keyring.workspace = true +sp-runtime.workspace = true +sp-timestamp.default-features = true +sp-timestamp.workspace = true tokio = { features = ["parking_lot", "rt-multi-thread"], workspace = true, default-features = true } -polkadot-approval-distribution = { workspace = true, default-features = true } -polkadot-node-core-approval-voting = { workspace = true, default-features = true } -polkadot-node-core-approval-voting-parallel = { workspace = true, default-features = true } -sp-consensus-babe = { workspace = true, default-features = true } -sp-runtime = { workspace = true } -sp-timestamp = { workspace = true, default-features = true } - orchestra = { features = ["futures_channel"], workspace = true } paste = { workspace = true, default-features = true } pyroscope = { workspace = true } diff --git a/polkadot/node/subsystem-test-helpers/Cargo.toml b/polkadot/node/subsystem-test-helpers/Cargo.toml index 4e660b15c1e29..d80c58a6ef4f2 100644 --- a/polkadot/node/subsystem-test-helpers/Cargo.toml +++ b/polkadot/node/subsystem-test-helpers/Cargo.toml @@ -14,16 +14,27 @@ workspace = true async-trait = { workspace = true } futures = { workspace = true } parking_lot = { workspace = true, default-features = true } -polkadot-erasure-coding = { workspace = true, default-features = true } -polkadot-node-primitives = { workspace = true, default-features = true } -polkadot-node-subsystem = { workspace = true, default-features = true } -polkadot-node-subsystem-util = { workspace = true, default-features = true } -polkadot-primitives = { workspace = true, default-features = true } - -sc-client-api = { workspace = true, default-features = true } -sc-keystore = { workspace = true, default-features = true } -sc-utils = { workspace = true, default-features = true } -sp-application-crypto = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-keyring = { workspace = true, default-features = true } -sp-keystore = { workspace = true, default-features = true } +polkadot-erasure-coding.default-features = true +polkadot-erasure-coding.workspace = true +polkadot-node-primitives.default-features = true +polkadot-node-primitives.workspace = true +polkadot-node-subsystem-util.default-features = true +polkadot-node-subsystem-util.workspace = true +polkadot-node-subsystem.default-features = true +polkadot-node-subsystem.workspace = true +polkadot-primitives.default-features = true +polkadot-primitives.workspace = true +sc-client-api.default-features = true +sc-client-api.workspace = true +sc-keystore.default-features = true +sc-keystore.workspace = true +sc-utils.default-features = true +sc-utils.workspace = true +sp-application-crypto.default-features = true +sp-application-crypto.workspace = true +sp-core.default-features = true +sp-core.workspace = true +sp-keyring.default-features = true +sp-keyring.workspace = true +sp-keystore.default-features = true +sp-keystore.workspace = true diff --git a/polkadot/node/subsystem-types/Cargo.toml b/polkadot/node/subsystem-types/Cargo.toml index aa0efcec6a74c..debe0240fe91b 100644 --- a/polkadot/node/subsystem-types/Cargo.toml +++ b/polkadot/node/subsystem-types/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "polkadot-node-subsystem-types" description = "Subsystem traits and message definitions" -version = "7.0.0" +version = "24.0.0" authors.workspace = true edition.workspace = true license.workspace = true @@ -17,19 +17,33 @@ derive_more = { workspace = true, default-features = true } fatality = { workspace = true } futures = { workspace = true } orchestra = { features = ["futures_channel"], workspace = true } -polkadot-node-network-protocol = { workspace = true, default-features = true } -polkadot-node-primitives = { workspace = true, default-features = true } -polkadot-primitives = { workspace = true, default-features = true } -polkadot-statement-table = { workspace = true, default-features = true } -prometheus-endpoint = { workspace = true, default-features = true } -sc-client-api = { workspace = true, default-features = true } -sc-network = { workspace = true, default-features = true } -sc-network-types = { workspace = true, default-features = true } -sc-transaction-pool-api = { workspace = true, default-features = true } +polkadot-node-network-protocol.default-features = true +polkadot-node-network-protocol.workspace = true +polkadot-node-primitives.default-features = true +polkadot-node-primitives.workspace = true +polkadot-primitives.default-features = true +polkadot-primitives.workspace = true +polkadot-statement-table.default-features = true +polkadot-statement-table.workspace = true +prometheus-endpoint.default-features = true +prometheus-endpoint.workspace = true +sc-client-api.default-features = true +sc-client-api.workspace = true +sc-network-types.default-features = true +sc-network-types.workspace = true +sc-network.default-features = true +sc-network.workspace = true +sc-transaction-pool-api.default-features = true +sc-transaction-pool-api.workspace = true smallvec = { workspace = true, default-features = true } -sp-api = { workspace = true, default-features = true } -sp-authority-discovery = { workspace = true, default-features = true } -sp-blockchain = { workspace = true, default-features = true } -sp-consensus-babe = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } +sp-api.default-features = true +sp-api.workspace = true +sp-authority-discovery.default-features = true +sp-authority-discovery.workspace = true +sp-blockchain.default-features = true +sp-blockchain.workspace = true +sp-consensus-babe.default-features = true +sp-consensus-babe.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true thiserror = { workspace = true } diff --git a/polkadot/node/subsystem-util/Cargo.toml b/polkadot/node/subsystem-util/Cargo.toml index ad118504c8d0b..7302ebdedaba2 100644 --- a/polkadot/node/subsystem-util/Cargo.toml +++ b/polkadot/node/subsystem-util/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "polkadot-node-subsystem-util" description = "Subsystem traits and message definitions" -version = "7.0.0" +version = "24.0.1" authors.workspace = true edition.workspace = true license.workspace = true @@ -15,7 +15,8 @@ workspace = true codec = { features = ["derive"], workspace = true } fatality = { workspace = true } futures = { workspace = true } -gum = { workspace = true, default-features = true } +gum.default-features = true +gum.workspace = true itertools = { workspace = true } parking_lot = { workspace = true, default-features = true } rand = { workspace = true, default-features = true } @@ -23,19 +24,30 @@ schnellru = { workspace = true } thiserror = { workspace = true } metered = { features = ["futures_channel"], workspace = true } -polkadot-erasure-coding = { workspace = true, default-features = true } -polkadot-node-metrics = { workspace = true, default-features = true } -polkadot-node-network-protocol = { workspace = true, default-features = true } -polkadot-node-primitives = { workspace = true, default-features = true } -polkadot-node-subsystem = { workspace = true, default-features = true } -polkadot-node-subsystem-types = { workspace = true, default-features = true } -polkadot-overseer = { workspace = true, default-features = true } -polkadot-primitives = { workspace = true, default-features = true } - -sc-keystore = { workspace = true, default-features = true } -sp-application-crypto = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-keystore = { workspace = true, default-features = true } +polkadot-erasure-coding.default-features = true +polkadot-erasure-coding.workspace = true +polkadot-node-metrics.default-features = true +polkadot-node-metrics.workspace = true +polkadot-node-network-protocol.default-features = true +polkadot-node-network-protocol.workspace = true +polkadot-node-primitives.default-features = true +polkadot-node-primitives.workspace = true +polkadot-node-subsystem-types.default-features = true +polkadot-node-subsystem-types.workspace = true +polkadot-node-subsystem.default-features = true +polkadot-node-subsystem.workspace = true +polkadot-overseer.default-features = true +polkadot-overseer.workspace = true +polkadot-primitives.default-features = true +polkadot-primitives.workspace = true +sc-keystore.default-features = true +sc-keystore.workspace = true +sp-application-crypto.default-features = true +sp-application-crypto.workspace = true +sp-core.default-features = true +sp-core.workspace = true +sp-keystore.default-features = true +sp-keystore.workspace = true kvdb = { workspace = true } parity-db = { workspace = true } diff --git a/polkadot/node/subsystem/Cargo.toml b/polkadot/node/subsystem/Cargo.toml index 8b4a26e33ee6e..5c80c0f7d8273 100644 --- a/polkadot/node/subsystem/Cargo.toml +++ b/polkadot/node/subsystem/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "polkadot-node-subsystem" description = "Subsystem traits and message definitions and the generated overseer" -version = "7.0.0" +version = "24.0.0" authors.workspace = true edition.workspace = true license.workspace = true @@ -12,5 +12,7 @@ repository.workspace = true workspace = true [dependencies] -polkadot-node-subsystem-types = { workspace = true, default-features = true } -polkadot-overseer = { workspace = true, default-features = true } +polkadot-node-subsystem-types.default-features = true +polkadot-node-subsystem-types.workspace = true +polkadot-overseer.default-features = true +polkadot-overseer.workspace = true diff --git a/polkadot/node/test/client/Cargo.toml b/polkadot/node/test/client/Cargo.toml index 6b082954093a4..bef573704d56e 100644 --- a/polkadot/node/test/client/Cargo.toml +++ b/polkadot/node/test/client/Cargo.toml @@ -11,31 +11,41 @@ workspace = true [dependencies] codec = { features = ["derive"], workspace = true } - -# Polkadot dependencies -polkadot-primitives = { workspace = true, default-features = true } -polkadot-test-runtime = { workspace = true } -polkadot-test-service = { workspace = true } - -# Substrate dependencies -frame-benchmarking = { workspace = true, default-features = true } -sc-block-builder = { workspace = true, default-features = true } -sc-consensus = { workspace = true, default-features = true } -sc-service = { workspace = true, default-features = true } -sp-api = { workspace = true, default-features = true } -sp-blockchain = { workspace = true, default-features = true } -sp-consensus = { workspace = true, default-features = true } -sp-consensus-babe = { workspace = true, default-features = true } -sp-inherents = { workspace = true, default-features = true } -sp-io = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } -sp-state-machine = { workspace = true, default-features = true } -sp-timestamp = { workspace = true, default-features = true } -substrate-test-client = { workspace = true } +frame-benchmarking.default-features = true +frame-benchmarking.workspace = true +polkadot-primitives.default-features = true +polkadot-primitives.workspace = true +polkadot-test-runtime.workspace = true +polkadot-test-service.workspace = true +sc-block-builder.default-features = true +sc-block-builder.workspace = true +sc-consensus.default-features = true +sc-consensus.workspace = true +sc-service.default-features = true +sc-service.workspace = true +sp-api.default-features = true +sp-api.workspace = true +sp-blockchain.default-features = true +sp-blockchain.workspace = true +sp-consensus-babe.default-features = true +sp-consensus-babe.workspace = true +sp-consensus.default-features = true +sp-consensus.workspace = true +sp-inherents.default-features = true +sp-inherents.workspace = true +sp-io.default-features = true +sp-io.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true +sp-state-machine.default-features = true +sp-state-machine.workspace = true +sp-timestamp.default-features = true +sp-timestamp.workspace = true +substrate-test-client.workspace = true [dev-dependencies] futures = { workspace = true } -sp-keyring = { workspace = true, default-features = true } +sp-keyring = { default-features = true, workspace = true } [features] runtime-benchmarks = [ diff --git a/polkadot/node/test/service/Cargo.toml b/polkadot/node/test/service/Cargo.toml index 71e1fede8fcff..4485d3b76430f 100644 --- a/polkadot/node/test/service/Cargo.toml +++ b/polkadot/node/test/service/Cargo.toml @@ -10,49 +10,74 @@ license.workspace = true workspace = true [dependencies] +frame-system.default-features = true +frame-system.workspace = true futures = { workspace = true } +pallet-balances.default-features = true +pallet-balances.workspace = true +pallet-staking.default-features = true +pallet-staking.workspace = true +pallet-transaction-payment.default-features = true +pallet-transaction-payment.workspace = true +polkadot-node-primitives.default-features = true +polkadot-node-primitives.workspace = true +polkadot-node-subsystem.default-features = true +polkadot-node-subsystem.workspace = true +polkadot-overseer.default-features = true +polkadot-overseer.workspace = true +polkadot-parachain-primitives.default-features = true +polkadot-parachain-primitives.workspace = true +polkadot-primitives.default-features = true +polkadot-primitives.workspace = true +polkadot-runtime-common.default-features = true +polkadot-runtime-common.workspace = true +polkadot-runtime-parachains.default-features = true +polkadot-runtime-parachains.workspace = true +polkadot-service.default-features = true +polkadot-service.workspace = true +polkadot-test-runtime.workspace = true rand = { workspace = true, default-features = true } +sc-chain-spec.default-features = true +sc-chain-spec.workspace = true +sc-cli.default-features = true +sc-cli.workspace = true +sc-client-api.default-features = true +sc-client-api.workspace = true +sc-consensus-grandpa.default-features = true +sc-consensus-grandpa.workspace = true +sc-consensus.default-features = true +sc-consensus.workspace = true +sc-network.default-features = true +sc-network.workspace = true +sc-service.workspace = true +sc-tracing.default-features = true +sc-tracing.workspace = true serde_json = { workspace = true, default-features = true } +sp-arithmetic.default-features = true +sp-arithmetic.workspace = true +sp-authority-discovery.default-features = true +sp-authority-discovery.workspace = true +sp-blockchain.default-features = true +sp-blockchain.workspace = true +sp-consensus-babe.default-features = true +sp-consensus-babe.workspace = true +sp-consensus.default-features = true +sp-consensus.workspace = true +sp-core.default-features = true +sp-core.workspace = true +sp-keyring.default-features = true +sp-keyring.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true +sp-state-machine.default-features = true +sp-state-machine.workspace = true +substrate-test-client.workspace = true +test-runtime-constants.default-features = true +test-runtime-constants.workspace = true tokio = { workspace = true, default-features = true } -# Polkadot dependencies -polkadot-node-primitives = { workspace = true, default-features = true } -polkadot-node-subsystem = { workspace = true, default-features = true } -polkadot-overseer = { workspace = true, default-features = true } -polkadot-parachain-primitives = { workspace = true, default-features = true } -polkadot-primitives = { workspace = true, default-features = true } -polkadot-runtime-common = { workspace = true, default-features = true } -polkadot-runtime-parachains = { workspace = true, default-features = true } -polkadot-service = { workspace = true, default-features = true } -polkadot-test-runtime = { workspace = true } -test-runtime-constants = { workspace = true, default-features = true } - -# Substrate dependencies -frame-system = { workspace = true, default-features = true } -pallet-balances = { workspace = true, default-features = true } -pallet-staking = { workspace = true, default-features = true } -pallet-transaction-payment = { workspace = true, default-features = true } -sc-chain-spec = { workspace = true, default-features = true } -sc-cli = { workspace = true, default-features = true } -sc-client-api = { workspace = true, default-features = true } -sc-consensus = { workspace = true, default-features = true } -sc-consensus-grandpa = { workspace = true, default-features = true } -sc-network = { workspace = true, default-features = true } -sc-service = { workspace = true } -sc-tracing = { workspace = true, default-features = true } -sp-arithmetic = { workspace = true, default-features = true } -sp-authority-discovery = { workspace = true, default-features = true } -sp-blockchain = { workspace = true, default-features = true } -sp-consensus = { workspace = true, default-features = true } -sp-consensus-babe = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-keyring = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } -sp-state-machine = { workspace = true, default-features = true } -substrate-test-client = { workspace = true } - [dev-dependencies] -pallet-balances = { workspace = true } +pallet-balances = { workspace = true, default-features = false } tokio = { features = ["macros"], workspace = true, default-features = true } [features] diff --git a/polkadot/node/zombienet-backchannel/Cargo.toml b/polkadot/node/zombienet-backchannel/Cargo.toml index b74f2b068d712..48b68c6002dcc 100644 --- a/polkadot/node/zombienet-backchannel/Cargo.toml +++ b/polkadot/node/zombienet-backchannel/Cargo.toml @@ -14,7 +14,8 @@ workspace = true [dependencies] codec = { features = ["derive"], workspace = true, default-features = true } futures-util = { workspace = true, default-features = true } -gum = { workspace = true, default-features = true } +gum.default-features = true +gum.workspace = true serde = { features = ["derive"], workspace = true, default-features = true } serde_json = { workspace = true, default-features = true } thiserror = { workspace = true } diff --git a/polkadot/parachain/Cargo.toml b/polkadot/parachain/Cargo.toml index 0dd103d58b25e..c3d9a3f6c40b3 100644 --- a/polkadot/parachain/Cargo.toml +++ b/polkadot/parachain/Cargo.toml @@ -4,7 +4,7 @@ description = "Types and utilities for creating and working with parachains" authors.workspace = true edition.workspace = true license.workspace = true -version = "6.0.0" +version = "17.0.0" homepage.workspace = true repository.workspace = true @@ -18,11 +18,11 @@ workspace = true bounded-collections = { features = ["serde"], workspace = true } codec = { features = ["derive"], workspace = true } derive_more = { workspace = true, default-features = true } -polkadot-core-primitives = { workspace = true } +polkadot-core-primitives.workspace = true scale-info = { features = ["derive", "serde"], workspace = true } sp-core = { features = ["serde"], workspace = true } sp-runtime = { features = ["serde"], workspace = true } -sp-weights = { workspace = true } +sp-weights.workspace = true # all optional crates. serde = { features = ["alloc", "derive"], workspace = true } diff --git a/polkadot/parachain/test-parachains/adder/Cargo.toml b/polkadot/parachain/test-parachains/adder/Cargo.toml index 945b0e1569047..cca182226bc08 100644 --- a/polkadot/parachain/test-parachains/adder/Cargo.toml +++ b/polkadot/parachain/test-parachains/adder/Cargo.toml @@ -4,7 +4,7 @@ description = "Test parachain which adds to a number as its state transition" build = "build.rs" edition.workspace = true license.workspace = true -version = "1.0.0" +version = "0.1.0" authors.workspace = true publish = false @@ -15,13 +15,12 @@ workspace = true codec = { features = ["derive"], workspace = true } dlmalloc = { features = ["global"], workspace = true } polkadot-parachain-primitives = { features = ["wasm-api"], workspace = true } -tiny-keccak = { features = ["keccak"], workspace = true } - -# We need to make sure the global allocator is disabled until we have support of full substrate externalities sp-io = { features = ["disable_allocator"], workspace = true } +tiny-keccak = { features = ["keccak"], workspace = true } [build-dependencies] -substrate-wasm-builder = { workspace = true, default-features = true } +substrate-wasm-builder.default-features = true +substrate-wasm-builder.workspace = true [features] default = ["std"] diff --git a/polkadot/parachain/test-parachains/adder/collator/Cargo.toml b/polkadot/parachain/test-parachains/adder/collator/Cargo.toml index 301a0d10ba851..410441f03d1eb 100644 --- a/polkadot/parachain/test-parachains/adder/collator/Cargo.toml +++ b/polkadot/parachain/test-parachains/adder/collator/Cargo.toml @@ -20,24 +20,29 @@ codec = { features = ["derive"], workspace = true } futures = { workspace = true } futures-timer = { workspace = true } log = { workspace = true, default-features = true } - -polkadot-cli = { workspace = true, default-features = true } -polkadot-node-primitives = { workspace = true, default-features = true } -polkadot-node-subsystem = { workspace = true, default-features = true } -polkadot-primitives = { workspace = true, default-features = true } +polkadot-cli.default-features = true +polkadot-cli.workspace = true +polkadot-node-primitives.default-features = true +polkadot-node-primitives.workspace = true +polkadot-node-subsystem.default-features = true +polkadot-node-subsystem.workspace = true +polkadot-primitives.default-features = true +polkadot-primitives.workspace = true polkadot-service = { features = ["rococo-native"], workspace = true, default-features = true } -test-parachain-adder = { workspace = true } - -sc-cli = { workspace = true, default-features = true } -sc-service = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } +sc-cli.default-features = true +sc-cli.workspace = true +sc-service.default-features = true +sc-service.workspace = true +sp-core.default-features = true +sp-core.workspace = true +test-parachain-adder.workspace = true [dev-dependencies] -polkadot-node-core-pvf = { features = ["test-utils"], workspace = true, default-features = true } -polkadot-parachain-primitives = { workspace = true, default-features = true } +polkadot-node-core-pvf = { features = ["test-utils"], default-features = true, workspace = true } +polkadot-parachain-primitives = { default-features = true, workspace = true } polkadot-test-service = { workspace = true } -sc-service = { workspace = true, default-features = true } -sp-keyring = { workspace = true, default-features = true } +sc-service = { default-features = true, workspace = true } +sp-keyring = { default-features = true, workspace = true } tokio = { features = ["macros"], workspace = true, default-features = true } diff --git a/polkadot/parachain/test-parachains/halt/Cargo.toml b/polkadot/parachain/test-parachains/halt/Cargo.toml index cc4661faf30c7..756c3102fe4fe 100644 --- a/polkadot/parachain/test-parachains/halt/Cargo.toml +++ b/polkadot/parachain/test-parachains/halt/Cargo.toml @@ -3,7 +3,7 @@ name = "test-parachain-halt" description = "Test parachain which executes forever" build = "build.rs" publish = false -version = "1.0.0" +version = "0.1.0" authors.workspace = true edition.workspace = true license.workspace = true @@ -13,7 +13,8 @@ workspace = true [build-dependencies] rustversion = { workspace = true } -substrate-wasm-builder = { workspace = true, default-features = true } +substrate-wasm-builder.default-features = true +substrate-wasm-builder.workspace = true [features] default = ["std"] diff --git a/polkadot/parachain/test-parachains/undying/Cargo.toml b/polkadot/parachain/test-parachains/undying/Cargo.toml index f8dfc8936c0ef..a986e03e67a88 100644 --- a/polkadot/parachain/test-parachains/undying/Cargo.toml +++ b/polkadot/parachain/test-parachains/undying/Cargo.toml @@ -16,14 +16,14 @@ codec = { features = ["derive"], workspace = true } dlmalloc = { features = ["global"], workspace = true } log = { workspace = true } polkadot-parachain-primitives = { features = ["wasm-api"], workspace = true } -polkadot-primitives = { workspace = true, default-features = false } -tiny-keccak = { features = ["keccak"], workspace = true } - -# We need to make sure the global allocator is disabled until we have support of full substrate externalities +polkadot-primitives.default-features = false +polkadot-primitives.workspace = true sp-io = { features = ["disable_allocator"], workspace = true } +tiny-keccak = { features = ["keccak"], workspace = true } [build-dependencies] -substrate-wasm-builder = { workspace = true, default-features = true } +substrate-wasm-builder.default-features = true +substrate-wasm-builder.workspace = true [features] default = ["std"] diff --git a/polkadot/parachain/test-parachains/undying/collator/Cargo.toml b/polkadot/parachain/test-parachains/undying/collator/Cargo.toml index e26b9f59acd4b..8a3eb635bae6a 100644 --- a/polkadot/parachain/test-parachains/undying/collator/Cargo.toml +++ b/polkadot/parachain/test-parachains/undying/collator/Cargo.toml @@ -20,26 +20,33 @@ codec = { features = ["derive"], workspace = true } futures = { workspace = true } futures-timer = { workspace = true } log = { workspace = true, default-features = true } - -polkadot-cli = { workspace = true, default-features = true } -polkadot-erasure-coding = { workspace = true, default-features = true } -polkadot-node-primitives = { workspace = true, default-features = true } -polkadot-node-subsystem = { workspace = true, default-features = true } -polkadot-primitives = { workspace = true, default-features = true } +polkadot-cli.default-features = true +polkadot-cli.workspace = true +polkadot-erasure-coding.default-features = true +polkadot-erasure-coding.workspace = true +polkadot-node-primitives.default-features = true +polkadot-node-primitives.workspace = true +polkadot-node-subsystem.default-features = true +polkadot-node-subsystem.workspace = true +polkadot-primitives.default-features = true +polkadot-primitives.workspace = true polkadot-service = { features = ["rococo-native"], workspace = true, default-features = true } -test-parachain-undying = { workspace = true } - -sc-cli = { workspace = true, default-features = true } -sc-client-api = { workspace = true, default-features = true } -sc-service = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } +sc-cli.default-features = true +sc-cli.workspace = true +sc-client-api.default-features = true +sc-client-api.workspace = true +sc-service.default-features = true +sc-service.workspace = true +sp-core.default-features = true +sp-core.workspace = true +test-parachain-undying.workspace = true [dev-dependencies] -polkadot-node-core-pvf = { features = ["test-utils"], workspace = true, default-features = true } -polkadot-parachain-primitives = { workspace = true, default-features = true } +polkadot-node-core-pvf = { features = ["test-utils"], default-features = true, workspace = true } +polkadot-parachain-primitives = { default-features = true, workspace = true } polkadot-test-service = { workspace = true } -sc-service = { workspace = true, default-features = true } -sp-keyring = { workspace = true, default-features = true } +sc-service = { default-features = true, workspace = true } +sp-keyring = { default-features = true, workspace = true } tokio = { features = ["macros"], workspace = true, default-features = true } diff --git a/polkadot/primitives/Cargo.toml b/polkadot/primitives/Cargo.toml index a2b90a7ca8f72..adf91b844a491 100644 --- a/polkadot/primitives/Cargo.toml +++ b/polkadot/primitives/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-primitives" -version = "7.0.0" +version = "19.0.0" authors.workspace = true edition.workspace = true license.workspace = true @@ -17,25 +17,23 @@ bounded-collections = { features = ["serde"], workspace = true } codec = { features = ["bit-vec", "derive"], workspace = true } hex-literal = { workspace = true, default-features = true } log = { workspace = true } +polkadot-core-primitives.workspace = true +polkadot-parachain-primitives.workspace = true scale-info = { features = ["bit-vec", "derive", "serde"], workspace = true } serde = { features = ["alloc", "derive"], workspace = true } -thiserror = { workspace = true, optional = true } - -sp-api = { workspace = true } +sp-api.workspace = true sp-application-crypto = { features = ["serde"], workspace = true } sp-arithmetic = { features = ["serde"], workspace = true } sp-authority-discovery = { features = ["serde"], workspace = true } sp-consensus-slots = { features = ["serde"], workspace = true } -sp-core = { workspace = true } -sp-inherents = { workspace = true } -sp-io = { workspace = true } +sp-core.workspace = true +sp-inherents.workspace = true +sp-io.workspace = true sp-keystore = { optional = true, workspace = true } -sp-runtime = { workspace = true } +sp-runtime.workspace = true sp-staking = { features = ["serde"], workspace = true } sp-std = { workspace = true, optional = true } - -polkadot-core-primitives = { workspace = true } -polkadot-parachain-primitives = { workspace = true } +thiserror = { workspace = true, optional = true } [features] default = ["std"] diff --git a/polkadot/primitives/test-helpers/Cargo.toml b/polkadot/primitives/test-helpers/Cargo.toml index 962b210848c89..fcae310442634 100644 --- a/polkadot/primitives/test-helpers/Cargo.toml +++ b/polkadot/primitives/test-helpers/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "polkadot-primitives-test-helpers" publish = false -version = "1.0.0" +version = "0.1.0" authors.workspace = true edition.workspace = true license.workspace = true @@ -12,7 +12,9 @@ workspace = true [dependencies] polkadot-primitives = { features = ["test"], workspace = true, default-features = true } rand = { workspace = true, default-features = true } -sp-application-crypto = { workspace = true } +sp-application-crypto.workspace = true sp-core = { features = ["std"], workspace = true, default-features = true } -sp-keyring = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } +sp-keyring.default-features = true +sp-keyring.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true diff --git a/polkadot/rpc/Cargo.toml b/polkadot/rpc/Cargo.toml index 75177303ddfed..afd7db9a598ba 100644 --- a/polkadot/rpc/Cargo.toml +++ b/polkadot/rpc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-rpc" -version = "7.0.0" +version = "25.0.0" authors.workspace = true edition.workspace = true license.workspace = true @@ -13,28 +13,53 @@ workspace = true [dependencies] jsonrpsee = { features = ["server"], workspace = true } -mmr-rpc = { workspace = true, default-features = true } -pallet-transaction-payment-rpc = { workspace = true, default-features = true } -polkadot-primitives = { workspace = true, default-features = true } -sc-chain-spec = { workspace = true, default-features = true } -sc-client-api = { workspace = true, default-features = true } -sc-consensus-babe = { workspace = true, default-features = true } -sc-consensus-babe-rpc = { workspace = true, default-features = true } -sc-consensus-beefy = { workspace = true, default-features = true } -sc-consensus-beefy-rpc = { workspace = true, default-features = true } -sc-consensus-grandpa = { workspace = true, default-features = true } -sc-consensus-grandpa-rpc = { workspace = true, default-features = true } -sc-rpc = { workspace = true, default-features = true } -sc-sync-state-rpc = { workspace = true, default-features = true } -sc-transaction-pool-api = { workspace = true, default-features = true } -sp-api = { workspace = true, default-features = true } -sp-application-crypto = { workspace = true, default-features = true } -sp-block-builder = { workspace = true, default-features = true } -sp-blockchain = { workspace = true, default-features = true } -sp-consensus = { workspace = true, default-features = true } -sp-consensus-babe = { workspace = true, default-features = true } -sp-consensus-beefy = { workspace = true, default-features = true } -sp-keystore = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } -substrate-frame-rpc-system = { workspace = true, default-features = true } -substrate-state-trie-migration-rpc = { workspace = true, default-features = true } +mmr-rpc.default-features = true +mmr-rpc.workspace = true +pallet-transaction-payment-rpc.default-features = true +pallet-transaction-payment-rpc.workspace = true +polkadot-primitives.default-features = true +polkadot-primitives.workspace = true +sc-chain-spec.default-features = true +sc-chain-spec.workspace = true +sc-client-api.default-features = true +sc-client-api.workspace = true +sc-consensus-babe-rpc.default-features = true +sc-consensus-babe-rpc.workspace = true +sc-consensus-babe.default-features = true +sc-consensus-babe.workspace = true +sc-consensus-beefy-rpc.default-features = true +sc-consensus-beefy-rpc.workspace = true +sc-consensus-beefy.default-features = true +sc-consensus-beefy.workspace = true +sc-consensus-grandpa-rpc.default-features = true +sc-consensus-grandpa-rpc.workspace = true +sc-consensus-grandpa.default-features = true +sc-consensus-grandpa.workspace = true +sc-rpc.default-features = true +sc-rpc.workspace = true +sc-sync-state-rpc.default-features = true +sc-sync-state-rpc.workspace = true +sc-transaction-pool-api.default-features = true +sc-transaction-pool-api.workspace = true +sp-api.default-features = true +sp-api.workspace = true +sp-application-crypto.default-features = true +sp-application-crypto.workspace = true +sp-block-builder.default-features = true +sp-block-builder.workspace = true +sp-blockchain.default-features = true +sp-blockchain.workspace = true +sp-consensus-babe.default-features = true +sp-consensus-babe.workspace = true +sp-consensus-beefy.default-features = true +sp-consensus-beefy.workspace = true +sp-consensus.default-features = true +sp-consensus.workspace = true +sp-keystore.default-features = true +sp-keystore.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true +substrate-frame-rpc-system.default-features = true +substrate-frame-rpc-system.workspace = true +substrate-state-trie-migration-rpc.default-features = true +substrate-state-trie-migration-rpc.workspace = true diff --git a/polkadot/runtime/common/Cargo.toml b/polkadot/runtime/common/Cargo.toml index c4c43f2102639..5cf73f156bca0 100644 --- a/polkadot/runtime/common/Cargo.toml +++ b/polkadot/runtime/common/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-runtime-common" -version = "7.0.0" +version = "20.0.0" description = "Pallets and constants used in Relay Chain networks." authors.workspace = true edition.workspace = true @@ -14,63 +14,59 @@ workspace = true [dependencies] bitvec = { features = ["alloc"], workspace = true } codec = { features = ["derive"], workspace = true } +frame-benchmarking = { optional = true, workspace = true } +frame-election-provider-support.workspace = true +frame-support.workspace = true +frame-system.workspace = true impl-trait-for-tuples = { workspace = true } log = { workspace = true } +pallet-asset-rate = { optional = true, workspace = true } +pallet-authorship.workspace = true +pallet-babe = { optional = true, workspace = true } +pallet-balances.workspace = true +pallet-broker.workspace = true +pallet-election-provider-multi-phase.workspace = true +pallet-fast-unstake.workspace = true +pallet-identity.workspace = true +pallet-session.workspace = true +pallet-staking-reward-fn.workspace = true +pallet-staking.workspace = true +pallet-timestamp.workspace = true +pallet-transaction-payment.workspace = true +pallet-treasury.workspace = true +pallet-vesting.workspace = true rustc-hex = { workspace = true } scale-info = { features = ["derive"], workspace = true } serde = { features = ["alloc"], workspace = true } -static_assertions = { workspace = true, default-features = true } - -sp-api = { workspace = true } +sp-api.workspace = true sp-core = { features = ["serde"], workspace = true } -sp-inherents = { workspace = true } -sp-io = { workspace = true } -sp-keyring = { workspace = true } +sp-inherents.workspace = true +sp-io.workspace = true +sp-keyring.workspace = true sp-npos-elections = { features = ["serde"], workspace = true } sp-runtime = { features = ["serde"], workspace = true } -sp-session = { workspace = true } +sp-session.workspace = true sp-staking = { features = ["serde"], workspace = true } - -frame-election-provider-support = { workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } -pallet-asset-rate = { optional = true, workspace = true } -pallet-authorship = { workspace = true } -pallet-balances = { workspace = true } -pallet-broker = { workspace = true } -pallet-election-provider-multi-phase = { workspace = true } -pallet-fast-unstake = { workspace = true } -pallet-identity = { workspace = true } -pallet-session = { workspace = true } -pallet-staking = { workspace = true } -pallet-staking-reward-fn = { workspace = true } -pallet-timestamp = { workspace = true } -pallet-transaction-payment = { workspace = true } -pallet-treasury = { workspace = true } -pallet-vesting = { workspace = true } - -frame-benchmarking = { optional = true, workspace = true } -pallet-babe = { optional = true, workspace = true } +static_assertions = { workspace = true, default-features = true } libsecp256k1 = { workspace = true } -polkadot-primitives = { workspace = true } -polkadot-runtime-parachains = { workspace = true } - -slot-range-helper = { workspace = true } -xcm = { workspace = true } -xcm-builder = { workspace = true } +polkadot-primitives.workspace = true +polkadot-runtime-parachains.workspace = true +slot-range-helper.workspace = true +xcm-builder.workspace = true xcm-executor = { optional = true, workspace = true } +xcm.workspace = true [dev-dependencies] frame-support-test = { workspace = true } hex-literal = { workspace = true, default-features = true } libsecp256k1 = { workspace = true, default-features = true } -pallet-babe = { workspace = true, default-features = true } -pallet-treasury = { workspace = true, default-features = true } +pallet-babe = { default-features = true, workspace = true } +pallet-treasury = { default-features = true, workspace = true } polkadot-primitives-test-helpers = { workspace = true } serde_json = { workspace = true, default-features = true } -sp-keyring = { workspace = true, default-features = true } -sp-keystore = { workspace = true, default-features = true } +sp-keyring = { default-features = true, workspace = true } +sp-keystore = { default-features = true, workspace = true } [features] default = ["std"] diff --git a/polkadot/runtime/common/slot_range_helper/Cargo.toml b/polkadot/runtime/common/slot_range_helper/Cargo.toml index 684cdcd01e144..eb0f266277307 100644 --- a/polkadot/runtime/common/slot_range_helper/Cargo.toml +++ b/polkadot/runtime/common/slot_range_helper/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "slot-range-helper" -version = "7.0.0" +version = "18.0.0" authors.workspace = true edition.workspace = true license.workspace = true @@ -15,7 +15,7 @@ workspace = true codec = { features = ["derive"], workspace = true } enumn = { workspace = true } paste = { workspace = true, default-features = true } -sp-runtime = { workspace = true } +sp-runtime.workspace = true [features] default = ["std"] diff --git a/polkadot/runtime/metrics/Cargo.toml b/polkadot/runtime/metrics/Cargo.toml index beb7e3236d5a8..00b3447637848 100644 --- a/polkadot/runtime/metrics/Cargo.toml +++ b/polkadot/runtime/metrics/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-runtime-metrics" -version = "7.0.0" +version = "21.0.0" authors.workspace = true edition.workspace = true license.workspace = true @@ -14,8 +14,8 @@ workspace = true [dependencies] codec = { workspace = true } frame-benchmarking = { optional = true, workspace = true } -polkadot-primitives = { workspace = true } -sp-tracing = { workspace = true } +polkadot-primitives.workspace = true +sp-tracing.workspace = true bs58 = { features = ["alloc"], workspace = true } diff --git a/polkadot/runtime/parachains/Cargo.toml b/polkadot/runtime/parachains/Cargo.toml index 5cf22bbd38c38..f781a7798e853 100644 --- a/polkadot/runtime/parachains/Cargo.toml +++ b/polkadot/runtime/parachains/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-runtime-parachains" -version = "7.0.0" +version = "20.0.1" description = "Relay Chain runtime code responsible for Parachains." authors.workspace = true edition.workspace = true @@ -15,65 +15,59 @@ workspace = true bitflags = { workspace = true } bitvec = { features = ["alloc"], workspace = true } codec = { features = ["derive", "max-encoded-len"], workspace = true } +frame-benchmarking = { optional = true, workspace = true } +frame-election-provider-support = { workspace = true, optional = true } +frame-support.workspace = true +frame-system.workspace = true impl-trait-for-tuples = { workspace = true } log = { workspace = true } +pallet-authority-discovery.workspace = true +pallet-authorship.workspace = true +pallet-babe.workspace = true +pallet-balances.workspace = true +pallet-broker.workspace = true +pallet-message-queue.workspace = true +pallet-mmr = { workspace = true, optional = true } +pallet-session.workspace = true +pallet-staking.workspace = true +pallet-timestamp.workspace = true +polkadot-core-primitives.workspace = true +polkadot-parachain-primitives.workspace = true +polkadot-primitives.workspace = true +polkadot-runtime-metrics.workspace = true +rand = { workspace = true } +rand_chacha = { workspace = true } scale-info = { features = ["derive"], workspace = true } serde = { features = ["alloc", "derive"], workspace = true } - -sp-api = { workspace = true } +sp-api.workspace = true sp-application-crypto = { optional = true, workspace = true } -sp-arithmetic = { workspace = true } +sp-arithmetic.workspace = true sp-core = { features = ["serde"], workspace = true } -sp-inherents = { workspace = true } -sp-io = { workspace = true } +sp-inherents.workspace = true +sp-io.workspace = true sp-keystore = { optional = true, workspace = true } sp-runtime = { features = ["serde"], workspace = true } -sp-session = { workspace = true } +sp-session.workspace = true sp-staking = { features = ["serde"], workspace = true } sp-std = { workspace = true, optional = true } sp-tracing = { optional = true, workspace = true } - -frame-benchmarking = { optional = true, workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } -pallet-authority-discovery = { workspace = true } -pallet-authorship = { workspace = true } -pallet-babe = { workspace = true } -pallet-balances = { workspace = true } -pallet-broker = { workspace = true } -pallet-message-queue = { workspace = true } -pallet-mmr = { workspace = true, optional = true } -pallet-session = { workspace = true } -pallet-staking = { workspace = true } -pallet-timestamp = { workspace = true } - -# only used in benchmarking -frame-election-provider-support = { workspace = true, optional = true } - -polkadot-primitives = { workspace = true } -xcm = { workspace = true } -xcm-executor = { workspace = true } - -polkadot-core-primitives = { workspace = true } -polkadot-parachain-primitives = { workspace = true } -polkadot-runtime-metrics = { workspace = true } -rand = { workspace = true } -rand_chacha = { workspace = true } static_assertions = { optional = true, workspace = true, default-features = true } +xcm-executor.workspace = true +xcm.workspace = true [dev-dependencies] -polkadot-primitives = { workspace = true, features = ["test"] } +polkadot-primitives = { features = ["test"], default-features = false, workspace = true } assert_matches = { workspace = true } frame-support-test = { workspace = true } hex-literal = { workspace = true, default-features = true } polkadot-primitives-test-helpers = { workspace = true } rstest = { workspace = true } -sc-keystore = { workspace = true, default-features = true } +sc-keystore = { default-features = true, workspace = true } serde_json = { workspace = true, default-features = true } -sp-crypto-hashing = { workspace = true, default-features = true } -sp-keyring = { workspace = true, default-features = true } -sp-tracing = { workspace = true, default-features = true } +sp-crypto-hashing = { default-features = true, workspace = true } +sp-keyring = { default-features = true, workspace = true } +sp-tracing = { default-features = true, workspace = true } thousands = { workspace = true } [features] diff --git a/polkadot/runtime/rococo/Cargo.toml b/polkadot/runtime/rococo/Cargo.toml index 96c613014e94a..50ce0d2321da5 100644 --- a/polkadot/runtime/rococo/Cargo.toml +++ b/polkadot/runtime/rococo/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "rococo-runtime" build = "build.rs" -version = "7.0.0" +version = "24.0.0" description = "Rococo testnet Relay Chain runtime." authors.workspace = true edition.workspace = true @@ -13,107 +13,102 @@ repository.workspace = true workspace = true [dependencies] +binary-merkle-tree.workspace = true bitvec = { features = ["alloc"], workspace = true } codec = { features = ["derive", "max-encoded-len"], workspace = true } +frame-benchmarking = { optional = true, workspace = true } +frame-executive.workspace = true +frame-metadata-hash-extension.workspace = true +frame-support = { features = ["tuples-96"], workspace = true } +frame-system-benchmarking = { optional = true, workspace = true } +frame-system-rpc-runtime-api.workspace = true +frame-system.workspace = true +frame-try-runtime = { optional = true, workspace = true } +hex-literal = { workspace = true, default-features = true } log = { workspace = true } +pallet-asset-rate.workspace = true +pallet-authority-discovery.workspace = true +pallet-authorship.workspace = true +pallet-babe.workspace = true +pallet-balances.workspace = true +pallet-beefy-mmr.workspace = true +pallet-beefy.workspace = true +pallet-bounties.workspace = true +pallet-child-bounties.workspace = true +pallet-conviction-voting.workspace = true +pallet-democracy.workspace = true +pallet-elections-phragmen.workspace = true +pallet-grandpa.workspace = true +pallet-identity.workspace = true +pallet-indices.workspace = true +pallet-message-queue.workspace = true +pallet-migrations.workspace = true +pallet-mmr.workspace = true +pallet-multisig.workspace = true +pallet-nis.workspace = true +pallet-offences.workspace = true +pallet-parameters.workspace = true +pallet-preimage.workspace = true +pallet-proxy.workspace = true +pallet-ranked-collective.workspace = true +pallet-recovery.workspace = true +pallet-referenda.workspace = true +pallet-root-testing.workspace = true +pallet-scheduler.workspace = true +pallet-session.workspace = true +pallet-society.workspace = true +pallet-staking.workspace = true +pallet-state-trie-migration.workspace = true +pallet-sudo.workspace = true +pallet-timestamp.workspace = true +pallet-tips.workspace = true +pallet-transaction-payment-rpc-runtime-api.workspace = true +pallet-transaction-payment.workspace = true +pallet-treasury.workspace = true +pallet-utility.workspace = true +pallet-vesting.workspace = true +pallet-whitelist.workspace = true +pallet-xcm-benchmarks = { optional = true, workspace = true } +pallet-xcm.workspace = true +polkadot-parachain-primitives.workspace = true +polkadot-primitives.workspace = true +polkadot-runtime-common.workspace = true +polkadot-runtime-parachains.workspace = true +rococo-runtime-constants.workspace = true scale-info = { features = ["derive"], workspace = true } serde = { workspace = true } serde_derive = { optional = true, workspace = true } serde_json = { features = ["alloc"], workspace = true } - -binary-merkle-tree = { workspace = true } -rococo-runtime-constants = { workspace = true } -sp-api = { workspace = true } -sp-arithmetic = { workspace = true } -sp-authority-discovery = { workspace = true } -sp-block-builder = { workspace = true } -sp-consensus-babe = { workspace = true } -sp-consensus-beefy = { workspace = true } -sp-consensus-grandpa = { workspace = true } -sp-core = { workspace = true } -sp-genesis-builder = { workspace = true } -sp-inherents = { workspace = true } -sp-io = { workspace = true } -sp-keyring = { workspace = true } -sp-mmr-primitives = { workspace = true } -sp-offchain = { workspace = true } -sp-runtime = { workspace = true } -sp-session = { workspace = true } -sp-staking = { workspace = true } -sp-storage = { workspace = true } -sp-transaction-pool = { workspace = true } -sp-version = { workspace = true } - -frame-executive = { workspace = true } -frame-support = { features = ["tuples-96"], workspace = true } -frame-system = { workspace = true } -frame-system-rpc-runtime-api = { workspace = true } -pallet-asset-rate = { workspace = true } -pallet-authority-discovery = { workspace = true } -pallet-authorship = { workspace = true } -pallet-babe = { workspace = true } -pallet-balances = { workspace = true } -pallet-beefy = { workspace = true } -pallet-beefy-mmr = { workspace = true } -pallet-bounties = { workspace = true } -pallet-child-bounties = { workspace = true } -pallet-conviction-voting = { workspace = true } -pallet-democracy = { workspace = true } -pallet-elections-phragmen = { workspace = true } -pallet-grandpa = { workspace = true } -pallet-identity = { workspace = true } -pallet-indices = { workspace = true } -pallet-message-queue = { workspace = true } -pallet-migrations = { workspace = true } -pallet-mmr = { workspace = true } -pallet-multisig = { workspace = true } -pallet-nis = { workspace = true } -pallet-offences = { workspace = true } -pallet-parameters = { workspace = true } -pallet-preimage = { workspace = true } -pallet-proxy = { workspace = true } -pallet-ranked-collective = { workspace = true } -pallet-recovery = { workspace = true } -pallet-referenda = { workspace = true } -pallet-root-testing = { workspace = true } -pallet-scheduler = { workspace = true } -pallet-session = { workspace = true } -pallet-society = { workspace = true } -pallet-staking = { workspace = true } -pallet-state-trie-migration = { workspace = true } -pallet-sudo = { workspace = true } -pallet-timestamp = { workspace = true } -pallet-tips = { workspace = true } -pallet-transaction-payment = { workspace = true } -pallet-transaction-payment-rpc-runtime-api = { workspace = true } -pallet-treasury = { workspace = true } -pallet-utility = { workspace = true } -pallet-vesting = { workspace = true } -pallet-whitelist = { workspace = true } -pallet-xcm = { workspace = true } -pallet-xcm-benchmarks = { optional = true, workspace = true } - -frame-benchmarking = { optional = true, workspace = true } -frame-metadata-hash-extension = { workspace = true } -frame-system-benchmarking = { optional = true, workspace = true } -frame-try-runtime = { optional = true, workspace = true } -hex-literal = { workspace = true, default-features = true } - -polkadot-parachain-primitives = { workspace = true } -polkadot-primitives = { workspace = true } -polkadot-runtime-common = { workspace = true } -polkadot-runtime-parachains = { workspace = true } - -xcm = { workspace = true } -xcm-builder = { workspace = true } -xcm-executor = { workspace = true } -xcm-runtime-apis = { workspace = true } +sp-api.workspace = true +sp-arithmetic.workspace = true +sp-authority-discovery.workspace = true +sp-block-builder.workspace = true +sp-consensus-babe.workspace = true +sp-consensus-beefy.workspace = true +sp-consensus-grandpa.workspace = true +sp-core.workspace = true +sp-genesis-builder.workspace = true +sp-inherents.workspace = true +sp-io.workspace = true +sp-keyring.workspace = true +sp-mmr-primitives.workspace = true +sp-offchain.workspace = true +sp-runtime.workspace = true +sp-session.workspace = true +sp-staking.workspace = true +sp-storage.workspace = true +sp-transaction-pool.workspace = true +sp-version.workspace = true +xcm-builder.workspace = true +xcm-executor.workspace = true +xcm-runtime-apis.workspace = true +xcm.workspace = true [dev-dependencies] -remote-externalities = { workspace = true, default-features = true } +remote-externalities = { default-features = true, workspace = true } serde_json = { workspace = true, default-features = true } -sp-keyring = { workspace = true, default-features = true } -sp-tracing = { workspace = true } +sp-keyring = { default-features = true, workspace = true } +sp-tracing = { workspace = true, default-features = false } tokio = { features = ["macros"], workspace = true, default-features = true } [build-dependencies] diff --git a/polkadot/runtime/rococo/bridge-primitives/Cargo.toml b/polkadot/runtime/rococo/bridge-primitives/Cargo.toml index d14061a382eb3..46574e302fa8b 100644 --- a/polkadot/runtime/rococo/bridge-primitives/Cargo.toml +++ b/polkadot/runtime/rococo/bridge-primitives/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "bp-rococo" description = "Primitives of Rococo runtime." -version = "0.6.0" +version = "0.20.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -14,15 +14,12 @@ exclude-from-umbrella = true workspace = true [dependencies] -# Bridge Dependencies -bp-header-chain = { workspace = true } -bp-polkadot-core = { workspace = true } -bp-runtime = { workspace = true } - -# Substrate Based Dependencies -frame-support = { workspace = true } -sp-api = { workspace = true } -sp-std = { workspace = true } +bp-header-chain.workspace = true +bp-polkadot-core.workspace = true +bp-runtime.workspace = true +frame-support.workspace = true +sp-api.workspace = true +sp-std.workspace = true [features] default = ["std"] diff --git a/polkadot/runtime/rococo/constants/Cargo.toml b/polkadot/runtime/rococo/constants/Cargo.toml index cc62d230d2c01..a4d49ae7ae3b2 100644 --- a/polkadot/runtime/rococo/constants/Cargo.toml +++ b/polkadot/runtime/rococo/constants/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rococo-runtime-constants" -version = "7.0.0" +version = "21.0.0" description = "Constants used throughout the Rococo network." authors.workspace = true edition.workspace = true @@ -15,17 +15,15 @@ exclude-from-umbrella = true workspace = true [dependencies] +frame-support.workspace = true +polkadot-primitives.workspace = true +polkadot-runtime-common.workspace = true smallvec = { workspace = true, default-features = true } - -frame-support = { workspace = true } -polkadot-primitives = { workspace = true } -polkadot-runtime-common = { workspace = true } -sp-core = { workspace = true } -sp-runtime = { workspace = true } -sp-weights = { workspace = true } - -xcm = { workspace = true } -xcm-builder = { workspace = true } +sp-core.workspace = true +sp-runtime.workspace = true +sp-weights.workspace = true +xcm-builder.workspace = true +xcm.workspace = true [features] default = ["std"] diff --git a/polkadot/runtime/rococo/src/lib.rs b/polkadot/runtime/rococo/src/lib.rs index 47386cabd5487..5e5a48a42bd91 100644 --- a/polkadot/runtime/rococo/src/lib.rs +++ b/polkadot/runtime/rococo/src/lib.rs @@ -184,7 +184,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: alloc::borrow::Cow::Borrowed("rococo"), impl_name: alloc::borrow::Cow::Borrowed("parity-rococo-v2.0"), authoring_version: 0, - spec_version: 1_019_001, + spec_version: 1_019_002, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 26, diff --git a/polkadot/runtime/test-runtime/Cargo.toml b/polkadot/runtime/test-runtime/Cargo.toml index 73d060067798e..559ceaa22c99b 100644 --- a/polkadot/runtime/test-runtime/Cargo.toml +++ b/polkadot/runtime/test-runtime/Cargo.toml @@ -12,59 +12,58 @@ workspace = true [dependencies] codec = { features = ["derive"], workspace = true } +frame-election-provider-support.workspace = true +frame-executive.workspace = true +frame-support.workspace = true +frame-system-rpc-runtime-api.workspace = true +frame-system.workspace = true log = { workspace = true } +pallet-authority-discovery.workspace = true +pallet-authorship.workspace = true +pallet-babe.workspace = true +pallet-balances.workspace = true +pallet-grandpa.workspace = true +pallet-indices.workspace = true +pallet-offences.workspace = true +pallet-session.workspace = true +pallet-staking-reward-curve.default-features = true +pallet-staking-reward-curve.workspace = true +pallet-staking.workspace = true +pallet-sudo.workspace = true +pallet-timestamp.workspace = true +pallet-transaction-payment-rpc-runtime-api.workspace = true +pallet-transaction-payment.workspace = true +pallet-vesting.workspace = true +pallet-xcm.workspace = true +polkadot-primitives.workspace = true +polkadot-runtime-common.workspace = true +polkadot-runtime-parachains.workspace = true scale-info = { features = ["derive"], workspace = true } serde = { workspace = true } - -frame-election-provider-support = { workspace = true } -sp-api = { workspace = true } -sp-authority-discovery = { workspace = true } -sp-block-builder = { workspace = true } -sp-consensus-babe = { workspace = true } -sp-consensus-beefy = { workspace = true } -sp-core = { workspace = true } -sp-genesis-builder = { workspace = true } -sp-inherents = { workspace = true } -sp-io = { workspace = true } -sp-mmr-primitives = { workspace = true } -sp-offchain = { workspace = true } -sp-runtime = { workspace = true } -sp-session = { workspace = true } -sp-staking = { workspace = true } -sp-transaction-pool = { workspace = true } -sp-version = { workspace = true } - -frame-executive = { workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } -frame-system-rpc-runtime-api = { workspace = true } -pallet-authority-discovery = { workspace = true } -pallet-authorship = { workspace = true } -pallet-babe = { workspace = true } -pallet-balances = { workspace = true } -pallet-grandpa = { workspace = true } -pallet-indices = { workspace = true } -pallet-offences = { workspace = true } -pallet-session = { workspace = true } -pallet-staking = { workspace = true } -pallet-staking-reward-curve = { workspace = true, default-features = true } -pallet-sudo = { workspace = true } -pallet-timestamp = { workspace = true } -pallet-transaction-payment = { workspace = true } -pallet-transaction-payment-rpc-runtime-api = { workspace = true } -pallet-vesting = { workspace = true } -test-runtime-constants = { workspace = true } - -pallet-xcm = { workspace = true } -polkadot-primitives = { workspace = true } -polkadot-runtime-common = { workspace = true } -polkadot-runtime-parachains = { workspace = true } -xcm = { workspace = true } -xcm-builder = { workspace = true } -xcm-executor = { workspace = true } +sp-api.workspace = true +sp-authority-discovery.workspace = true +sp-block-builder.workspace = true +sp-consensus-babe.workspace = true +sp-consensus-beefy.workspace = true +sp-core.workspace = true +sp-genesis-builder.workspace = true +sp-inherents.workspace = true +sp-io.workspace = true +sp-mmr-primitives.workspace = true +sp-offchain.workspace = true +sp-runtime.workspace = true +sp-session.workspace = true +sp-staking.workspace = true +sp-transaction-pool.workspace = true +sp-version.workspace = true +test-runtime-constants.workspace = true +xcm-builder.workspace = true +xcm-executor.workspace = true +xcm.workspace = true [build-dependencies] -substrate-wasm-builder = { workspace = true, default-features = true } +substrate-wasm-builder.default-features = true +substrate-wasm-builder.workspace = true [features] default = ["std"] diff --git a/polkadot/runtime/test-runtime/constants/Cargo.toml b/polkadot/runtime/test-runtime/constants/Cargo.toml index 807774be71369..0e7c0f6411bb6 100644 --- a/polkadot/runtime/test-runtime/constants/Cargo.toml +++ b/polkadot/runtime/test-runtime/constants/Cargo.toml @@ -10,11 +10,10 @@ license.workspace = true workspace = true [dependencies] +frame-support.workspace = true +polkadot-primitives.workspace = true smallvec = { workspace = true, default-features = true } - -frame-support = { workspace = true } -polkadot-primitives = { workspace = true } -sp-runtime = { workspace = true } +sp-runtime.workspace = true [features] default = ["std"] diff --git a/polkadot/runtime/westend/Cargo.toml b/polkadot/runtime/westend/Cargo.toml index 7c532db80d557..fc20c2bb94523 100644 --- a/polkadot/runtime/westend/Cargo.toml +++ b/polkadot/runtime/westend/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "westend-runtime" build = "build.rs" -version = "7.0.0" +version = "24.0.0" description = "Westend testnet Relay Chain runtime." authors.workspace = true edition.workspace = true @@ -13,121 +13,117 @@ repository.workspace = true workspace = true [dependencies] +binary-merkle-tree.workspace = true bitvec = { features = ["alloc"], workspace = true } codec = { features = ["derive", "max-encoded-len"], workspace = true } -log = { workspace = true } -scale-info = { features = ["derive"], workspace = true } -serde = { workspace = true } -serde_derive = { optional = true, workspace = true } -serde_json = { features = ["alloc"], workspace = true } - -binary-merkle-tree = { workspace = true } -sp-api = { workspace = true } -sp-application-crypto = { workspace = true } -sp-arithmetic = { workspace = true } -sp-authority-discovery = { workspace = true } -sp-block-builder = { workspace = true } -sp-consensus-babe = { workspace = true } -sp-consensus-beefy = { workspace = true } -sp-consensus-grandpa = { workspace = true } -sp-core = { workspace = true } -sp-genesis-builder = { workspace = true } -sp-inherents = { workspace = true } -sp-io = { workspace = true } -sp-keyring = { workspace = true } -sp-mmr-primitives = { workspace = true } -sp-npos-elections = { workspace = true } -sp-offchain = { workspace = true } -sp-runtime = { workspace = true } -sp-session = { workspace = true } -sp-staking = { workspace = true } -sp-storage = { workspace = true } -sp-transaction-pool = { workspace = true } -sp-version = { workspace = true } - -frame-election-provider-support = { workspace = true } -frame-executive = { workspace = true } -frame-metadata-hash-extension = { workspace = true } -frame-support = { features = ["experimental", "tuples-96"], workspace = true } -frame-system = { workspace = true } -frame-system-rpc-runtime-api = { workspace = true } -pallet-asset-rate = { workspace = true } -pallet-authority-discovery = { workspace = true } -pallet-authorship = { workspace = true } -pallet-babe = { workspace = true } -pallet-bags-list = { workspace = true } -pallet-balances = { workspace = true } -pallet-beefy = { workspace = true } -pallet-beefy-mmr = { workspace = true } -pallet-conviction-voting = { workspace = true } -pallet-delegated-staking = { workspace = true } -pallet-election-provider-multi-phase = { workspace = true } -pallet-fast-unstake = { workspace = true } -pallet-grandpa = { workspace = true } -pallet-identity = { workspace = true } -pallet-indices = { workspace = true } -pallet-message-queue = { workspace = true } -pallet-meta-tx = { workspace = true } -pallet-migrations = { workspace = true } -pallet-mmr = { workspace = true } -pallet-multisig = { workspace = true } -pallet-nomination-pools = { workspace = true } -pallet-nomination-pools-runtime-api = { workspace = true } -pallet-offences = { workspace = true } -pallet-parameters = { workspace = true } -pallet-preimage = { workspace = true } -pallet-proxy = { workspace = true } -pallet-recovery = { workspace = true } -pallet-referenda = { workspace = true } -pallet-root-testing = { workspace = true } -pallet-scheduler = { workspace = true } -pallet-session = { workspace = true } -pallet-staking = { workspace = true } -pallet-staking-async-ah-client = { workspace = true } -pallet-staking-async-rc-client = { workspace = true } -pallet-staking-runtime-api = { workspace = true } -pallet-sudo = { workspace = true } -pallet-timestamp = { workspace = true } -pallet-transaction-payment = { workspace = true } -pallet-transaction-payment-rpc-runtime-api = { workspace = true } -pallet-treasury = { workspace = true } -pallet-utility = { workspace = true } -pallet-verify-signature = { workspace = true } -pallet-vesting = { workspace = true } -pallet-whitelist = { workspace = true } -pallet-xcm = { workspace = true } -pallet-xcm-benchmarks = { optional = true, workspace = true } -westend-runtime-constants = { workspace = true } - frame-benchmarking = { optional = true, workspace = true } +frame-election-provider-support.workspace = true +frame-executive.workspace = true +frame-metadata-hash-extension.workspace = true +frame-support = { features = ["experimental", "tuples-96"], workspace = true } frame-system-benchmarking = { optional = true, workspace = true } +frame-system-rpc-runtime-api.workspace = true +frame-system.workspace = true frame-try-runtime = { optional = true, workspace = true } hex-literal = { workspace = true, default-features = true } +log = { workspace = true } +pallet-asset-rate.workspace = true +pallet-authority-discovery.workspace = true +pallet-authorship.workspace = true +pallet-babe.workspace = true +pallet-bags-list.workspace = true +pallet-balances.workspace = true +pallet-beefy-mmr.workspace = true +pallet-beefy.workspace = true +pallet-conviction-voting.workspace = true +pallet-delegated-staking.workspace = true +pallet-election-provider-multi-phase.workspace = true pallet-election-provider-support-benchmarking = { optional = true, workspace = true } +pallet-fast-unstake.workspace = true +pallet-grandpa.workspace = true +pallet-identity.workspace = true +pallet-indices.workspace = true +pallet-message-queue.workspace = true +pallet-meta-tx.workspace = true +pallet-migrations.workspace = true +pallet-mmr.workspace = true +pallet-multisig.workspace = true pallet-nomination-pools-benchmarking = { optional = true, workspace = true } +pallet-nomination-pools-runtime-api.workspace = true +pallet-nomination-pools.workspace = true pallet-offences-benchmarking = { optional = true, workspace = true } +pallet-offences.workspace = true +pallet-parameters.workspace = true +pallet-preimage.workspace = true +pallet-proxy.workspace = true +pallet-recovery.workspace = true +pallet-referenda.workspace = true +pallet-root-testing.workspace = true +pallet-scheduler.workspace = true pallet-session-benchmarking = { optional = true, workspace = true } - -polkadot-parachain-primitives = { workspace = true } -polkadot-primitives = { workspace = true } -polkadot-runtime-common = { workspace = true } -polkadot-runtime-parachains = { workspace = true } - -xcm = { workspace = true } -xcm-builder = { workspace = true } -xcm-executor = { workspace = true } -xcm-runtime-apis = { workspace = true } +pallet-session.workspace = true +pallet-staking-async-ah-client.workspace = true +pallet-staking-async-rc-client.workspace = true +pallet-staking-runtime-api.workspace = true +pallet-staking.workspace = true +pallet-sudo.workspace = true +pallet-timestamp.workspace = true +pallet-transaction-payment-rpc-runtime-api.workspace = true +pallet-transaction-payment.workspace = true +pallet-treasury.workspace = true +pallet-utility.workspace = true +pallet-verify-signature.workspace = true +pallet-vesting.workspace = true +pallet-whitelist.workspace = true +pallet-xcm-benchmarks = { optional = true, workspace = true } +pallet-xcm.workspace = true +polkadot-parachain-primitives.workspace = true +polkadot-primitives.workspace = true +polkadot-runtime-common.workspace = true +polkadot-runtime-parachains.workspace = true +scale-info = { features = ["derive"], workspace = true } +serde = { workspace = true } +serde_derive = { optional = true, workspace = true } +serde_json = { features = ["alloc"], workspace = true } +sp-api.workspace = true +sp-application-crypto.workspace = true +sp-arithmetic.workspace = true +sp-authority-discovery.workspace = true +sp-block-builder.workspace = true +sp-consensus-babe.workspace = true +sp-consensus-beefy.workspace = true +sp-consensus-grandpa.workspace = true +sp-core.workspace = true +sp-genesis-builder.workspace = true +sp-inherents.workspace = true +sp-io.workspace = true +sp-keyring.workspace = true +sp-mmr-primitives.workspace = true +sp-npos-elections.workspace = true +sp-offchain.workspace = true +sp-runtime.workspace = true +sp-session.workspace = true +sp-staking.workspace = true +sp-storage.workspace = true +sp-transaction-pool.workspace = true +sp-version.workspace = true +westend-runtime-constants.workspace = true +xcm-builder.workspace = true +xcm-executor.workspace = true +xcm-runtime-apis.workspace = true +xcm.workspace = true [dev-dependencies] approx = { workspace = true } -remote-externalities = { workspace = true, default-features = true } +remote-externalities = { default-features = true, workspace = true } serde_json = { workspace = true, default-features = true } -sp-keyring = { workspace = true, default-features = true } -sp-tracing = { workspace = true } +sp-keyring = { default-features = true, workspace = true } +sp-tracing = { workspace = true, default-features = false } tokio = { features = ["macros"], workspace = true, default-features = true } [build-dependencies] -substrate-wasm-builder = { workspace = true, default-features = true } +substrate-wasm-builder.default-features = true +substrate-wasm-builder.workspace = true [features] default = ["std"] diff --git a/polkadot/runtime/westend/bridge-primitives/Cargo.toml b/polkadot/runtime/westend/bridge-primitives/Cargo.toml index 90411af2c4b20..b0cab8f85a5fe 100644 --- a/polkadot/runtime/westend/bridge-primitives/Cargo.toml +++ b/polkadot/runtime/westend/bridge-primitives/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "bp-westend" description = "Primitives of Westend runtime." -version = "0.3.0" +version = "0.17.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -14,15 +14,12 @@ exclude-from-umbrella = true workspace = true [dependencies] -# Bridge Dependencies -bp-header-chain = { workspace = true } -bp-polkadot-core = { workspace = true } -bp-runtime = { workspace = true } - -# Substrate Based Dependencies -frame-support = { workspace = true } -sp-api = { workspace = true } -sp-std = { workspace = true } +bp-header-chain.workspace = true +bp-polkadot-core.workspace = true +bp-runtime.workspace = true +frame-support.workspace = true +sp-api.workspace = true +sp-std.workspace = true [features] default = ["std"] diff --git a/polkadot/runtime/westend/constants/Cargo.toml b/polkadot/runtime/westend/constants/Cargo.toml index f3dbcc309ee1e..95c316c4de6bf 100644 --- a/polkadot/runtime/westend/constants/Cargo.toml +++ b/polkadot/runtime/westend/constants/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "westend-runtime-constants" -version = "7.0.0" +version = "21.0.0" description = "Constants used throughout the Westend network." authors.workspace = true edition.workspace = true @@ -15,17 +15,15 @@ exclude-from-umbrella = true workspace = true [dependencies] +frame-support.workspace = true +polkadot-primitives.workspace = true +polkadot-runtime-common.workspace = true smallvec = { workspace = true, default-features = true } - -frame-support = { workspace = true } -polkadot-primitives = { workspace = true } -polkadot-runtime-common = { workspace = true } -sp-core = { workspace = true } -sp-runtime = { workspace = true } -sp-weights = { workspace = true } - -xcm = { workspace = true } -xcm-builder = { workspace = true } +sp-core.workspace = true +sp-runtime.workspace = true +sp-weights.workspace = true +xcm-builder.workspace = true +xcm.workspace = true [features] default = ["std"] diff --git a/polkadot/runtime/westend/src/lib.rs b/polkadot/runtime/westend/src/lib.rs index 11b41a07e4de6..186ad7e7a5e23 100644 --- a/polkadot/runtime/westend/src/lib.rs +++ b/polkadot/runtime/westend/src/lib.rs @@ -178,7 +178,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: alloc::borrow::Cow::Borrowed("westend"), impl_name: alloc::borrow::Cow::Borrowed("parity-westend"), authoring_version: 2, - spec_version: 1_019_001, + spec_version: 1_019_002, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 27, diff --git a/polkadot/statement-table/Cargo.toml b/polkadot/statement-table/Cargo.toml index f6adec58c0dee..0be4d9e48c80e 100644 --- a/polkadot/statement-table/Cargo.toml +++ b/polkadot/statement-table/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-statement-table" -version = "7.0.0" +version = "20.0.0" authors.workspace = true edition.workspace = true license.workspace = true @@ -13,5 +13,7 @@ workspace = true [dependencies] codec = { features = ["derive"], workspace = true } -gum = { workspace = true, default-features = true } -polkadot-primitives = { workspace = true, default-features = true } +gum.default-features = true +gum.workspace = true +polkadot-primitives.default-features = true +polkadot-primitives.workspace = true diff --git a/polkadot/utils/generate-bags/Cargo.toml b/polkadot/utils/generate-bags/Cargo.toml index ded8bedc95f2a..df83d328f0a99 100644 --- a/polkadot/utils/generate-bags/Cargo.toml +++ b/polkadot/utils/generate-bags/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-voter-bags" -version = "7.0.0" +version = "24.0.0" authors.workspace = true edition.workspace = true license.workspace = true @@ -13,7 +13,6 @@ workspace = true [dependencies] clap = { features = ["derive"], workspace = true } - -generate-bags = { workspace = true, default-features = true } - -westend-runtime = { workspace = true } +generate-bags.default-features = true +generate-bags.workspace = true +westend-runtime.workspace = true diff --git a/polkadot/utils/remote-ext-tests/bags-list/Cargo.toml b/polkadot/utils/remote-ext-tests/bags-list/Cargo.toml index 1a6c23e0518eb..7559b50c4dca5 100644 --- a/polkadot/utils/remote-ext-tests/bags-list/Cargo.toml +++ b/polkadot/utils/remote-ext-tests/bags-list/Cargo.toml @@ -10,13 +10,16 @@ license.workspace = true workspace = true [dependencies] -westend-runtime = { workspace = true } -westend-runtime-constants = { workspace = true, default-features = true } - -frame-system = { workspace = true, default-features = true } -pallet-bags-list-remote-tests = { workspace = true } -sp-core = { workspace = true, default-features = true } -sp-tracing = { workspace = true, default-features = true } +frame-system.default-features = true +frame-system.workspace = true +pallet-bags-list-remote-tests.workspace = true +sp-core.default-features = true +sp-core.workspace = true +sp-tracing.default-features = true +sp-tracing.workspace = true +westend-runtime-constants.default-features = true +westend-runtime-constants.workspace = true +westend-runtime.workspace = true clap = { features = ["derive"], workspace = true } log = { workspace = true, default-features = true } diff --git a/polkadot/xcm/Cargo.toml b/polkadot/xcm/Cargo.toml index cb6dc2db82fb4..9cbc549c7a950 100644 --- a/polkadot/xcm/Cargo.toml +++ b/polkadot/xcm/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "staging-xcm" description = "The basic XCM datastructures." -version = "7.0.1" +version = "17.0.0" authors.workspace = true edition.workspace = true license.workspace = true @@ -17,19 +17,20 @@ bounded-collections = { features = ["serde"], workspace = true } codec = { features = ["derive", "max-encoded-len"], workspace = true } derive-where = { workspace = true } environmental = { workspace = true } -frame-support = { workspace = true } +frame-support.workspace = true hex-literal = { workspace = true, default-features = true } impl-trait-for-tuples = { workspace = true } log = { workspace = true } scale-info = { features = ["derive", "serde"], workspace = true } schemars = { default-features = true, optional = true, workspace = true } serde = { features = ["alloc", "derive", "rc"], workspace = true } -sp-runtime = { workspace = true } +sp-runtime.workspace = true sp-weights = { features = ["serde"], workspace = true } -xcm-procedural = { workspace = true, default-features = true } +xcm-procedural.default-features = true +xcm-procedural.workspace = true [dev-dependencies] -sp-io = { workspace = true, default-features = true } +sp-io = { default-features = true, workspace = true } [features] default = ["std"] diff --git a/polkadot/xcm/docs/Cargo.toml b/polkadot/xcm/docs/Cargo.toml index a7a9b8aaaf099..14eec3ca18dc8 100644 --- a/polkadot/xcm/docs/Cargo.toml +++ b/polkadot/xcm/docs/Cargo.toml @@ -9,24 +9,31 @@ edition.workspace = true publish = false [dependencies] -# For XCM stuff -pallet-xcm = { workspace = true, default-features = true } -xcm = { workspace = true, default-features = true } -xcm-builder = { workspace = true, default-features = true } -xcm-executor = { workspace = true, default-features = true } -xcm-simulator = { workspace = true, default-features = true } +pallet-xcm.default-features = true +pallet-xcm.workspace = true +xcm-builder.default-features = true +xcm-builder.workspace = true +xcm-executor.default-features = true +xcm-executor.workspace = true +xcm-simulator.default-features = true +xcm-simulator.workspace = true +xcm.default-features = true +xcm.workspace = true # For building FRAME runtimes codec = { workspace = true, default-features = true } frame = { features = ["runtime"], workspace = true, default-features = true } -polkadot-runtime-parachains = { workspace = true, default-features = true } +pallet-balances.default-features = true +pallet-balances.workspace = true +pallet-message-queue.default-features = true +pallet-message-queue.workspace = true +polkadot-runtime-parachains.default-features = true +polkadot-runtime-parachains.workspace = true scale-info = { workspace = true } -sp-io = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } - -# Some pallets -pallet-balances = { workspace = true, default-features = true } -pallet-message-queue = { workspace = true, default-features = true } +sp-io.default-features = true +sp-io.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true # For building docs docify = { workspace = true } diff --git a/polkadot/xcm/pallet-xcm-benchmarks/Cargo.toml b/polkadot/xcm/pallet-xcm-benchmarks/Cargo.toml index f463053326778..b197ef48112ef 100644 --- a/polkadot/xcm/pallet-xcm-benchmarks/Cargo.toml +++ b/polkadot/xcm/pallet-xcm-benchmarks/Cargo.toml @@ -3,7 +3,7 @@ name = "pallet-xcm-benchmarks" authors.workspace = true edition.workspace = true license.workspace = true -version = "7.0.0" +version = "21.0.0" description = "Benchmarks for the XCM pallet" homepage.workspace = true repository.workspace = true @@ -16,20 +16,20 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { workspace = true } -frame-benchmarking = { workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-benchmarking.workspace = true +frame-support.workspace = true +frame-system.workspace = true scale-info = { features = ["derive"], workspace = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } -xcm = { workspace = true } -xcm-builder = { workspace = true } -xcm-executor = { workspace = true } +sp-io.workspace = true +sp-runtime.workspace = true +xcm-builder.workspace = true +xcm-executor.workspace = true +xcm.workspace = true [dev-dependencies] -pallet-balances = { workspace = true, default-features = true } -sp-tracing = { workspace = true, default-features = true } -xcm = { workspace = true, default-features = true } +pallet-balances = { default-features = true, workspace = true } +sp-tracing = { default-features = true, workspace = true } +xcm = { default-features = true, workspace = true } [features] default = ["std"] diff --git a/polkadot/xcm/pallet-xcm/Cargo.toml b/polkadot/xcm/pallet-xcm/Cargo.toml index feadac8afeaf5..25561fd9f5338 100644 --- a/polkadot/xcm/pallet-xcm/Cargo.toml +++ b/polkadot/xcm/pallet-xcm/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-xcm" -version = "7.0.0" +version = "20.1.0" description = "A pallet for handling XCM programs." authors.workspace = true edition.workspace = true @@ -14,32 +14,30 @@ workspace = true [dependencies] bounded-collections = { workspace = true } codec = { features = ["derive"], workspace = true } -scale-info = { features = ["derive"], workspace = true } -serde = { optional = true, features = ["derive"], workspace = true, default-features = true } -tracing = { workspace = true } - -frame-support = { workspace = true } -frame-system = { workspace = true } -sp-core = { workspace = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } - -xcm = { workspace = true } -xcm-builder = { workspace = true } -xcm-executor = { workspace = true } -xcm-runtime-apis = { workspace = true } - -# marked optional, used in benchmarking frame-benchmarking = { optional = true, workspace = true } +frame-support.workspace = true +frame-system.workspace = true hex-literal = { workspace = true, default-features = false } pallet-balances = { optional = true, workspace = true } +pallet-revive.workspace = true +pallet-timestamp.workspace = true +scale-info = { features = ["derive"], workspace = true } +serde = { optional = true, features = ["derive"], workspace = true, default-features = true } +sp-core.workspace = true +sp-io.workspace = true +sp-runtime.workspace = true +tracing = { workspace = true } +xcm-builder.workspace = true +xcm-executor.workspace = true +xcm-runtime-apis.workspace = true +xcm.workspace = true [dev-dependencies] -pallet-assets = { workspace = true, default-features = true } -polkadot-parachain-primitives = { workspace = true, default-features = true } -polkadot-runtime-parachains = { workspace = true, default-features = true } -sp-tracing = { features = ["test-utils"], workspace = true, default-features = true } -xcm-simulator = { workspace = true, default-features = true } +pallet-assets = { default-features = true, workspace = true } +polkadot-parachain-primitives = { default-features = true, workspace = true } +polkadot-runtime-parachains = { default-features = true, workspace = true } +sp-tracing = { default-features = true, workspace = true } +xcm-simulator = { default-features = true, workspace = true } [features] default = ["std"] @@ -50,6 +48,8 @@ std = [ "frame-support/std", "frame-system/std", "pallet-balances/std", + "pallet-revive/std", + "pallet-timestamp/std", "scale-info/std", "serde", "sp-core/std", @@ -67,6 +67,8 @@ runtime-benchmarks = [ "frame-system/runtime-benchmarks", "pallet-assets/runtime-benchmarks", "pallet-balances/runtime-benchmarks", + "pallet-revive/runtime-benchmarks", + "pallet-timestamp/runtime-benchmarks", "polkadot-parachain-primitives/runtime-benchmarks", "polkadot-runtime-parachains/runtime-benchmarks", "sp-runtime/runtime-benchmarks", @@ -81,6 +83,8 @@ try-runtime = [ "frame-system/try-runtime", "pallet-assets/try-runtime", "pallet-balances/try-runtime", + "pallet-revive/try-runtime", + "pallet-timestamp/try-runtime", "polkadot-runtime-parachains/try-runtime", "sp-runtime/try-runtime", ] diff --git a/polkadot/xcm/procedural/Cargo.toml b/polkadot/xcm/procedural/Cargo.toml index 0843da86f038b..6aac7d3753074 100644 --- a/polkadot/xcm/procedural/Cargo.toml +++ b/polkadot/xcm/procedural/Cargo.toml @@ -4,7 +4,7 @@ description = "Procedural macros for XCM" authors.workspace = true edition.workspace = true license.workspace = true -version = "7.0.0" +version = "11.0.2" publish = true homepage.workspace = true repository.workspace = true @@ -25,6 +25,6 @@ syn = { workspace = true } trybuild = { features = ["diff"], workspace = true } # NOTE: we have to explicitly specify `std` because of trybuild # https://github.com/paritytech/polkadot-sdk/pull/5167 -xcm = { workspace = true, default-features = true, features = ["std"] } +xcm = { default-features = true, features = ["std"], workspace = true } # For testing macros. -frame-support = { workspace = true } +frame-support = { workspace = true, default-features = false } diff --git a/polkadot/xcm/xcm-builder/Cargo.toml b/polkadot/xcm/xcm-builder/Cargo.toml index 85b9c9c77ec4e..dc6620e3fd841 100644 --- a/polkadot/xcm/xcm-builder/Cargo.toml +++ b/polkadot/xcm/xcm-builder/Cargo.toml @@ -4,7 +4,7 @@ description = "Tools & types for building with XCM and its executor." authors.workspace = true edition.workspace = true license.workspace = true -version = "7.0.0" +version = "21.0.0" homepage.workspace = true repository.workspace = true @@ -14,35 +14,33 @@ workspace = true [dependencies] codec = { features = ["derive"], workspace = true } environmental = { workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true impl-trait-for-tuples = { workspace = true } -pallet-asset-conversion = { workspace = true } -pallet-transaction-payment = { workspace = true } +pallet-asset-conversion.workspace = true +pallet-transaction-payment.workspace = true +polkadot-parachain-primitives.workspace = true scale-info = { features = ["derive"], workspace = true } -sp-arithmetic = { workspace = true } -sp-core = { workspace = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } -sp-weights = { workspace = true } +sp-arithmetic.workspace = true +sp-core.workspace = true +sp-io.workspace = true +sp-runtime.workspace = true +sp-weights.workspace = true tracing = { workspace = true } -xcm = { workspace = true } -xcm-executor = { workspace = true } - -# Polkadot dependencies -polkadot-parachain-primitives = { workspace = true } +xcm-executor.workspace = true +xcm.workspace = true [dev-dependencies] -pallet-assets = { workspace = true, default-features = true } -pallet-balances = { workspace = true, default-features = true } -pallet-salary = { workspace = true, default-features = true } -pallet-xcm = { workspace = true, default-features = true } -polkadot-primitives = { workspace = true, default-features = true } -polkadot-runtime-parachains = { workspace = true, default-features = true } +pallet-assets = { default-features = true, workspace = true } +pallet-balances = { default-features = true, workspace = true } +pallet-salary = { default-features = true, workspace = true } +pallet-xcm = { default-features = true, workspace = true } +polkadot-primitives = { default-features = true, workspace = true } +polkadot-runtime-parachains = { default-features = true, workspace = true } polkadot-test-runtime = { workspace = true } primitive-types = { features = ["codec", "num-traits", "scale-info"], workspace = true } -sp-tracing = { features = ["test-utils"], workspace = true, default-features = true } -xcm-simulator = { workspace = true, default-features = true } +sp-tracing = { features = ["test-utils"], default-features = true, workspace = true } +xcm-simulator = { default-features = true, workspace = true } [features] default = ["std"] diff --git a/polkadot/xcm/xcm-executor/Cargo.toml b/polkadot/xcm/xcm-executor/Cargo.toml index 381dca54a5fba..cf24853365d5d 100644 --- a/polkadot/xcm/xcm-executor/Cargo.toml +++ b/polkadot/xcm/xcm-executor/Cargo.toml @@ -4,7 +4,7 @@ description = "An abstract and configurable XCM message executor." authors.workspace = true edition.workspace = true license.workspace = true -version = "7.0.0" +version = "20.0.0" homepage.workspace = true repository.workspace = true @@ -15,16 +15,16 @@ workspace = true codec = { features = ["derive"], workspace = true } environmental = { workspace = true } frame-benchmarking = { optional = true, workspace = true } -frame-support = { workspace = true } +frame-support.workspace = true impl-trait-for-tuples = { workspace = true } scale-info = { features = ["derive", "serde"], workspace = true } -sp-arithmetic = { workspace = true } -sp-core = { workspace = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } -sp-weights = { workspace = true } +sp-arithmetic.workspace = true +sp-core.workspace = true +sp-io.workspace = true +sp-runtime.workspace = true +sp-weights.workspace = true tracing = { workspace = true } -xcm = { workspace = true } +xcm.workspace = true [features] default = ["std"] diff --git a/polkadot/xcm/xcm-executor/integration-tests/Cargo.toml b/polkadot/xcm/xcm-executor/integration-tests/Cargo.toml index 9891132c25459..ddff6cdc65349 100644 --- a/polkadot/xcm/xcm-executor/integration-tests/Cargo.toml +++ b/polkadot/xcm/xcm-executor/integration-tests/Cargo.toml @@ -12,23 +12,33 @@ workspace = true [dependencies] codec = { workspace = true, default-features = true } -frame-support = { workspace = true } -frame-system = { workspace = true, default-features = true } +frame-support.workspace = true +frame-system.default-features = true +frame-system.workspace = true futures = { workspace = true } -pallet-sudo = { workspace = true, default-features = true } -pallet-transaction-payment = { workspace = true, default-features = true } -pallet-xcm = { workspace = true, default-features = true } -polkadot-runtime-parachains = { workspace = true, default-features = true } -polkadot-test-client = { workspace = true } -polkadot-test-runtime = { workspace = true } -polkadot-test-service = { workspace = true } -sp-consensus = { workspace = true, default-features = true } -sp-keyring = { workspace = true, default-features = true } -sp-runtime = { workspace = true } -sp-state-machine = { workspace = true, default-features = true } -sp-tracing = { workspace = true, default-features = true } -xcm = { workspace = true } -xcm-executor = { workspace = true, default-features = true } +pallet-sudo.default-features = true +pallet-sudo.workspace = true +pallet-transaction-payment.default-features = true +pallet-transaction-payment.workspace = true +pallet-xcm.default-features = true +pallet-xcm.workspace = true +polkadot-runtime-parachains.default-features = true +polkadot-runtime-parachains.workspace = true +polkadot-test-client.workspace = true +polkadot-test-runtime.workspace = true +polkadot-test-service.workspace = true +sp-consensus.default-features = true +sp-consensus.workspace = true +sp-keyring.default-features = true +sp-keyring.workspace = true +sp-runtime.workspace = true +sp-state-machine.default-features = true +sp-state-machine.workspace = true +sp-tracing.default-features = true +sp-tracing.workspace = true +xcm-executor.default-features = true +xcm-executor.workspace = true +xcm.workspace = true [features] default = ["std"] diff --git a/polkadot/xcm/xcm-runtime-apis/Cargo.toml b/polkadot/xcm/xcm-runtime-apis/Cargo.toml index abfc833b745b5..bb7273a5ac679 100644 --- a/polkadot/xcm/xcm-runtime-apis/Cargo.toml +++ b/polkadot/xcm/xcm-runtime-apis/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xcm-runtime-apis" -version = "0.1.1" +version = "0.8.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -12,26 +12,25 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { features = ["derive"], workspace = true } +frame-support.workspace = true scale-info = { features = ["derive", "serde"], workspace = true } - -frame-support = { workspace = true } -sp-api = { workspace = true } -sp-weights = { workspace = true } -xcm = { workspace = true } -xcm-executor = { workspace = true } +sp-api.workspace = true +sp-weights.workspace = true +xcm-executor.workspace = true +xcm.workspace = true [dev-dependencies] -frame-system = { workspace = true } +frame-system = { workspace = true, default-features = false } hex-literal = { workspace = true } log = { workspace = true } -pallet-assets = { workspace = true } -pallet-balances = { workspace = true } -pallet-xcm = { workspace = true } -sp-io = { workspace = true } -sp-tracing = { workspace = true, default-features = true } -xcm-builder = { workspace = true } -xcm-executor = { workspace = true } -xcm-simulator = { workspace = true, default-features = true } +pallet-assets = { workspace = true, default-features = false } +pallet-balances = { workspace = true, default-features = false } +pallet-xcm = { workspace = true, default-features = false } +sp-io = { workspace = true, default-features = false } +sp-tracing = { default-features = true, workspace = true } +xcm-builder = { workspace = true, default-features = false } +xcm-executor = { workspace = true, default-features = false } +xcm-simulator = { default-features = true, workspace = true } [features] default = ["std"] diff --git a/polkadot/xcm/xcm-simulator/Cargo.toml b/polkadot/xcm/xcm-simulator/Cargo.toml index 52d94f7374a39..720b7d25affec 100644 --- a/polkadot/xcm/xcm-simulator/Cargo.toml +++ b/polkadot/xcm/xcm-simulator/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "xcm-simulator" description = "Test kit to simulate cross-chain message passing and XCM execution" -version = "7.0.0" +version = "21.0.0" authors.workspace = true edition.workspace = true license.workspace = true @@ -13,18 +13,27 @@ workspace = true [dependencies] codec = { workspace = true, default-features = true } +frame-support.default-features = true +frame-support.workspace = true +frame-system.default-features = true +frame-system.workspace = true paste = { workspace = true, default-features = true } +polkadot-core-primitives.default-features = true +polkadot-core-primitives.workspace = true +polkadot-parachain-primitives.default-features = true +polkadot-parachain-primitives.workspace = true +polkadot-primitives.default-features = true +polkadot-primitives.workspace = true +polkadot-runtime-parachains.default-features = true +polkadot-runtime-parachains.workspace = true scale-info = { workspace = true } - -frame-support = { workspace = true, default-features = true } -frame-system = { workspace = true, default-features = true } -sp-io = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } - -polkadot-core-primitives = { workspace = true, default-features = true } -polkadot-parachain-primitives = { workspace = true, default-features = true } -polkadot-primitives = { workspace = true, default-features = true } -polkadot-runtime-parachains = { workspace = true, default-features = true } -xcm = { workspace = true, default-features = true } -xcm-builder = { workspace = true, default-features = true } -xcm-executor = { workspace = true, default-features = true } +sp-io.default-features = true +sp-io.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true +xcm-builder.default-features = true +xcm-builder.workspace = true +xcm-executor.default-features = true +xcm-executor.workspace = true +xcm.default-features = true +xcm.workspace = true diff --git a/polkadot/xcm/xcm-simulator/example/Cargo.toml b/polkadot/xcm/xcm-simulator/example/Cargo.toml index c6751d0cd23d7..0dfc57b851ffa 100644 --- a/polkadot/xcm/xcm-simulator/example/Cargo.toml +++ b/polkadot/xcm/xcm-simulator/example/Cargo.toml @@ -4,7 +4,7 @@ description = "Examples of xcm-simulator usage." authors.workspace = true edition.workspace = true license.workspace = true -version = "7.0.0" +version = "21.0.0" homepage.workspace = true repository.workspace = true @@ -13,29 +13,43 @@ workspace = true [dependencies] codec = { workspace = true, default-features = true } +frame-support.default-features = true +frame-support.workspace = true +frame-system.default-features = true +frame-system.workspace = true log = { workspace = true } +pallet-balances.default-features = true +pallet-balances.workspace = true +pallet-message-queue.default-features = true +pallet-message-queue.workspace = true +pallet-uniques.default-features = true +pallet-uniques.workspace = true +pallet-xcm.default-features = true +pallet-xcm.workspace = true +polkadot-parachain-primitives.default-features = true +polkadot-parachain-primitives.workspace = true +polkadot-runtime-parachains.default-features = true +polkadot-runtime-parachains.workspace = true scale-info = { features = ["derive"], workspace = true, default-features = true } - -frame-support = { workspace = true, default-features = true } -frame-system = { workspace = true, default-features = true } -pallet-balances = { workspace = true, default-features = true } -pallet-message-queue = { workspace = true, default-features = true } -pallet-uniques = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-io = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } -sp-tracing = { workspace = true, default-features = true } - -pallet-xcm = { workspace = true, default-features = true } -polkadot-parachain-primitives = { workspace = true, default-features = true } -polkadot-runtime-parachains = { workspace = true, default-features = true } -xcm = { workspace = true, default-features = true } -xcm-builder = { workspace = true, default-features = true } -xcm-executor = { workspace = true, default-features = true } -xcm-simulator = { workspace = true, default-features = true } +sp-core.default-features = true +sp-core.workspace = true +sp-io.default-features = true +sp-io.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true +sp-tracing.default-features = true +sp-tracing.workspace = true +xcm-builder.default-features = true +xcm-builder.workspace = true +xcm-executor.default-features = true +xcm-executor.workspace = true +xcm-simulator.default-features = true +xcm-simulator.workspace = true +xcm.default-features = true +xcm.workspace = true [dev-dependencies] -sp-tracing = { features = ["test-utils"], workspace = true } +sp-tracing = { features = ["test-utils"], workspace = true, default-features = false } [features] default = [] diff --git a/polkadot/xcm/xcm-simulator/fuzzer/Cargo.toml b/polkadot/xcm/xcm-simulator/fuzzer/Cargo.toml index 4c29251445a3f..39e7b86ba8ace 100644 --- a/polkadot/xcm/xcm-simulator/fuzzer/Cargo.toml +++ b/polkadot/xcm/xcm-simulator/fuzzer/Cargo.toml @@ -17,27 +17,42 @@ name = "xcm-fuzzer" [dependencies] arbitrary = { workspace = true } codec = { workspace = true, default-features = true } +frame-executive.default-features = true +frame-executive.workspace = true +frame-support.default-features = true +frame-support.workspace = true +frame-system.default-features = true +frame-system.workspace = true +frame-try-runtime.default-features = true +frame-try-runtime.workspace = true honggfuzz = { workspace = true } +pallet-balances.default-features = true +pallet-balances.workspace = true +pallet-message-queue.default-features = true +pallet-message-queue.workspace = true +pallet-xcm.default-features = true +pallet-xcm.workspace = true +polkadot-core-primitives.default-features = true +polkadot-core-primitives.workspace = true +polkadot-parachain-primitives.default-features = true +polkadot-parachain-primitives.workspace = true +polkadot-runtime-parachains.default-features = true +polkadot-runtime-parachains.workspace = true scale-info = { features = ["derive"], workspace = true, default-features = true } - -frame-executive = { workspace = true, default-features = true } -frame-support = { workspace = true, default-features = true } -frame-system = { workspace = true, default-features = true } -frame-try-runtime = { workspace = true, default-features = true } -pallet-balances = { workspace = true, default-features = true } -pallet-message-queue = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-io = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } - -pallet-xcm = { workspace = true, default-features = true } -polkadot-core-primitives = { workspace = true, default-features = true } -polkadot-parachain-primitives = { workspace = true, default-features = true } -polkadot-runtime-parachains = { workspace = true, default-features = true } -xcm = { workspace = true, default-features = true } -xcm-builder = { workspace = true, default-features = true } -xcm-executor = { workspace = true, default-features = true } -xcm-simulator = { workspace = true, default-features = true } +sp-core.default-features = true +sp-core.workspace = true +sp-io.default-features = true +sp-io.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true +xcm-builder.default-features = true +xcm-builder.workspace = true +xcm-executor.default-features = true +xcm-executor.workspace = true +xcm-simulator.default-features = true +xcm-simulator.workspace = true +xcm.default-features = true +xcm.workspace = true [features] try-runtime = [ diff --git a/polkadot/zombienet-sdk-tests/Cargo.toml b/polkadot/zombienet-sdk-tests/Cargo.toml index 2a7c76f824682..6bc8ec6d641f0 100644 --- a/polkadot/zombienet-sdk-tests/Cargo.toml +++ b/polkadot/zombienet-sdk-tests/Cargo.toml @@ -10,10 +10,11 @@ publish = false [dependencies] anyhow = { workspace = true } codec = { workspace = true, features = ["derive"] } -cumulus-zombienet-sdk-helpers = { workspace = true } +cumulus-zombienet-sdk-helpers.workspace = true env_logger = { workspace = true } log = { workspace = true } -polkadot-primitives = { workspace = true, default-features = true } +polkadot-primitives.default-features = true +polkadot-primitives.workspace = true serde = { workspace = true } serde_json = { workspace = true } subxt = { version = "0.38.1", default-features = false } @@ -27,5 +28,6 @@ zombie-metadata = [] zombie-ci = [] [build-dependencies] -substrate-build-script-utils = { workspace = true, default-features = true } +substrate-build-script-utils.default-features = true +substrate-build-script-utils.workspace = true subwasmlib = { git = "https://github.com/chevdor/subwasm", rev = "v0.21.3" } diff --git a/prdoc/stable2506/pr_8461.prdoc b/prdoc/stable2503-6/pr_8461.prdoc similarity index 100% rename from prdoc/stable2506/pr_8461.prdoc rename to prdoc/stable2503-6/pr_8461.prdoc diff --git a/prdoc/stable2506/pr_8473.prdoc b/prdoc/stable2503-6/pr_8473.prdoc similarity index 100% rename from prdoc/stable2506/pr_8473.prdoc rename to prdoc/stable2503-6/pr_8473.prdoc diff --git a/prdoc/stable2506/pr_8630.prdoc b/prdoc/stable2503-6/pr_8630.prdoc similarity index 100% rename from prdoc/stable2506/pr_8630.prdoc rename to prdoc/stable2503-6/pr_8630.prdoc diff --git a/prdoc/stable2506/pr_8650.prdoc b/prdoc/stable2503-6/pr_8650.prdoc similarity index 100% rename from prdoc/stable2506/pr_8650.prdoc rename to prdoc/stable2503-6/pr_8650.prdoc diff --git a/prdoc/stable2506/pr_8669.prdoc b/prdoc/stable2503-6/pr_8669.prdoc similarity index 100% rename from prdoc/stable2506/pr_8669.prdoc rename to prdoc/stable2503-6/pr_8669.prdoc diff --git a/prdoc/stable2503-7/pr_6827.prdoc b/prdoc/stable2503-7/pr_6827.prdoc new file mode 100644 index 0000000000000..689ac56aac783 --- /dev/null +++ b/prdoc/stable2503-7/pr_6827.prdoc @@ -0,0 +1,17 @@ +title: 'Introduction of Approval Slashes' +doc: +- audience: [Node Operator, Runtime Dev] + description: |- + Introduces a more aggressive slashing scheme. + Lazy or spammy validators will from now on be slashable in disputes. + Even if your validator is not a backer but it approves an invalid block + it will be slashed 2%. + If your validator raises or supports fake alarms (disputes against + valid blocks) you will be slashed (0%) and disabled for the remainder + of the era, which will potentially reduce era point gains. + +crates: +- name: polkadot-primitives + bump: minor +- name: polkadot-runtime-parachains + bump: major diff --git a/prdoc/stable2503-7/pr_8345.prdoc b/prdoc/stable2503-7/pr_8345.prdoc new file mode 100644 index 0000000000000..886e8b17cd123 --- /dev/null +++ b/prdoc/stable2503-7/pr_8345.prdoc @@ -0,0 +1,26 @@ +title: 'tx/metrics: Add metrics for the RPC v2 `transactionWatch_v1_submitAndWatch`' +doc: +- audience: Node Operator + description: |- + This PR adds metrics for the following RPC subscription: [transactionWatch_v1_submitAndWatch](https://paritytech.github.io/json-rpc-interface-spec/api/transactionWatch_v1_submitAndWatch.html) + + Metrics are exposed in two ways: + - simple counters of how many events we've seen globally + - a histogram vector of execution times, which is labeled by `initial event` -> `final event` + - This helps us identify how long it takes the transaction pool to advance the state of the events, and further debug issues + + Part of: https://github.com/paritytech/polkadot-sdk/issues/8336 + + ### (outdated) PoC Dashboards + + ![Screenshot 2025-04-28 at 17 50 48](https://github.com/user-attachments/assets/9fd0bf30-a321-4362-a10b-dfc3de1eb474) + + + ### Next steps + - [x] initial dashboards with a live node + - [x] adjust testing +crates: +- name: sc-service + bump: major +- name: sc-rpc-spec-v2 + bump: major diff --git a/prdoc/stable2503-7/pr_8725.prdoc b/prdoc/stable2503-7/pr_8725.prdoc new file mode 100644 index 0000000000000..0d1ecdef17d3e --- /dev/null +++ b/prdoc/stable2503-7/pr_8725.prdoc @@ -0,0 +1,15 @@ +title: 'Snowbridge: register polkadot native asset with fee' +doc: +- audience: Runtime Dev + description: To enforce a fee for PNA registration. +crates: +- name: snowbridge-pallet-system-frontend + bump: patch + validate: false +- name: snowbridge-pallet-system-v2 + bump: patch + validate: false +- name: asset-hub-westend-runtime + bump: patch +- name: bridge-hub-westend-integration-tests + bump: none diff --git a/prdoc/stable2503-7/pr_8787.prdoc b/prdoc/stable2503-7/pr_8787.prdoc new file mode 100644 index 0000000000000..e0a30183a0114 --- /dev/null +++ b/prdoc/stable2503-7/pr_8787.prdoc @@ -0,0 +1,13 @@ +title: Westend governance authorize_upgrade integration tests +doc: +- audience: Runtime Dev + description: |- + Integration tests covering `authorize_upgrade` with whitelisting via Collectives for Westend network + +crates: +- name: emulated-integration-tests-common + bump: minor +- name: frame-system + bump: minor +- name: frame-system-benchmarking + bump: patch \ No newline at end of file diff --git a/prdoc/stable2503-7/pr_8831.prdoc b/prdoc/stable2503-7/pr_8831.prdoc new file mode 100644 index 0000000000000..d82ebc1690c28 --- /dev/null +++ b/prdoc/stable2503-7/pr_8831.prdoc @@ -0,0 +1,12 @@ +title: 'dispute-coordinator: increase lru_observed_blocks_capacity' +doc: +- audience: Node Dev + description: |- + Under increase load with finality lagging behind there is a risk for blocks to arrive late or out of sequence in that case we will end up scrapping from the received block un till last finalized block and then process all the dispute in-between. + + This couple with other inefficiencies like https://github.com/paritytech/polkadot-sdk/issues/8823 will increase unnecessarily the load on dispute-coordinator. + + Decided to make this super large to err on the cautious side, the Hash size is only 32 bytes, so this will make the LRU grow up to 65k, which I don't think is a significant increase. +crates: +- name: polkadot-node-core-dispute-coordinator + bump: patch diff --git a/prdoc/stable2503-7/pr_8832.prdoc b/prdoc/stable2503-7/pr_8832.prdoc new file mode 100644 index 0000000000000..7f8d6eb231dd8 --- /dev/null +++ b/prdoc/stable2503-7/pr_8832.prdoc @@ -0,0 +1,10 @@ +title: increase session index cache +doc: +- audience: Node Dev + description: |- + A 10 session index cache is not enough when you run under intense pressure and finality is lagg since you will end requesting the session index for blocks older than that. So let's make this cache larger to achieve its purpose even under intense load when it actually matters more to be faster. + + The session_index_cache keeps a Hash and a u32, so that's about 36 bytes per entry, with this increase it can grow up to 65k which is not that big in my book. +crates: +- name: polkadot-node-subsystem-util + bump: patch diff --git a/prdoc/stable2503-7/pr_8834.prdoc b/prdoc/stable2503-7/pr_8834.prdoc new file mode 100644 index 0000000000000..414d8e89280bb --- /dev/null +++ b/prdoc/stable2503-7/pr_8834.prdoc @@ -0,0 +1,15 @@ +title: extend overseer to send priority messages +doc: +- audience: Node Dev + description: |- + Extend overseer to send priority messages, the new functionality is used for sending messages + on the grandpa call path when we call dispute-coordinator and approval-voting in + finality_target_with_longest_chain to make sure we don't block unnecessarily. + +crates: +- name: polkadot-node-core-approval-voting-parallel + bump: patch +- name: polkadot-overseer + bump: patch +- name: polkadot-service + bump: patch diff --git a/prdoc/stable2503-7/pr_8837.prdoc b/prdoc/stable2503-7/pr_8837.prdoc new file mode 100644 index 0000000000000..9be69f542d4ae --- /dev/null +++ b/prdoc/stable2503-7/pr_8837.prdoc @@ -0,0 +1,14 @@ +title: Cache locally controlled validator indices in dispute-coordinator +doc: + - audience: Node Dev + description: | + `dispute-coordinator` uses `keystore.key_pair()` to obtain the set of locally controlled + validator IDs. This operation happens on each import and is expensive because it involves key + generation from a seed phrase. This patch lazily determines the set of locally controlled + validator IDs and caches the result for each session. + +crates: +- name: polkadot-node-core-dispute-coordinator + bump: minor +- name: polkadot-node-subsystem-util + bump: minor \ No newline at end of file diff --git a/prdoc/stable2503-7/pr_8932.prdoc b/prdoc/stable2503-7/pr_8932.prdoc new file mode 100644 index 0000000000000..771a8d603cef4 --- /dev/null +++ b/prdoc/stable2503-7/pr_8932.prdoc @@ -0,0 +1,11 @@ +title: 'pallet-balances: Do not create account in benchmarking' +doc: +- audience: Runtime Dev + description: |- + This particular benchmark is about benchmarking the account creation, so we should not create it before :) + + + Closes: https://github.com/paritytech/polkadot-sdk/issues/8927 +crates: +- name: pallet-balances + bump: patch diff --git a/prdoc/stable2503-7/pr_8948.prdoc b/prdoc/stable2503-7/pr_8948.prdoc new file mode 100644 index 0000000000000..423167b64a1f3 --- /dev/null +++ b/prdoc/stable2503-7/pr_8948.prdoc @@ -0,0 +1,16 @@ +title: make sure dispute_coordinator/approval-voting parallel can receive priority messages +doc: +- audience: Node Dev + description: |- + https://github.com/paritytech/polkadot-sdk/pull/8834, changed relay_chain_selection to send priority messages, but did not configured + the subsystems to tell they can receive priority messages, with `can_receive_priority_messages` flag. + + If `can_receive_priority_messages` is not specified orchestra falls back when sending a priority message to the normal queue, + so this resulted in the messages not being processed ahead of the others in the queue. + + Fix this configuration mistake and add a test to make sure priority messages are consumed ahead of normal ones by the subsystems. +crates: +- name: polkadot-overseer + bump: patch +- name: polkadot-service + bump: patch diff --git a/prdoc/stable2503-7/pr_8973.prdoc b/prdoc/stable2503-7/pr_8973.prdoc new file mode 100644 index 0000000000000..5e43d3b464e79 --- /dev/null +++ b/prdoc/stable2503-7/pr_8973.prdoc @@ -0,0 +1,9 @@ +title: Add polkadot_parachain_peer_connectivity metric +doc: +- audience: Node Dev + description: |- + Adds `polkadot_parachain_peer_connectivity` histogram metric to better understand connectivity patterns. + +crates: +- name: polkadot-network-bridge + bump: patch diff --git a/prdoc/stable2503-7/pr_8980.prdoc b/prdoc/stable2503-7/pr_8980.prdoc new file mode 100644 index 0000000000000..7e88958b9337e --- /dev/null +++ b/prdoc/stable2503-7/pr_8980.prdoc @@ -0,0 +1,8 @@ +title: Fix revive-fixtures build script +doc: +- audience: Runtime Dev + description: |- + Fix compilation issue with pallet-revive-fixtures build.rs script. +crates: +- name: pallet-revive-fixtures + bump: patch diff --git a/prdoc/stable2503-7/pr_9050.prdoc b/prdoc/stable2503-7/pr_9050.prdoc new file mode 100644 index 0000000000000..be7ad45cdbaba --- /dev/null +++ b/prdoc/stable2503-7/pr_9050.prdoc @@ -0,0 +1,10 @@ +title: "dispute-coordinator: handle race with offchain disabling" + +doc: + - audience: Node Dev + description: | + Fixes a potential race with off-chain disabling when we learned about disablement after importing a dispute from that validator. + +crates: +- name: polkadot-node-core-dispute-coordinator + bump: patch diff --git a/prdoc/pr_9102.prdoc b/prdoc/stable2503-7/pr_9102.prdoc similarity index 100% rename from prdoc/pr_9102.prdoc rename to prdoc/stable2503-7/pr_9102.prdoc diff --git a/prdoc/stable2506/pr_8839.prdoc b/prdoc/stable2506/pr_8839.prdoc index 55218f7bce5c3..d28a441907f92 100644 --- a/prdoc/stable2506/pr_8839.prdoc +++ b/prdoc/stable2506/pr_8839.prdoc @@ -14,7 +14,7 @@ crates: - name: sc-authority-discovery bump: major - name: sc-network-types - bump: minor + bump: major - name: cumulus-relay-chain-minimal-node bump: patch - name: polkadot-service diff --git a/prdoc/pr_8860.prdoc b/prdoc/stable2506/pr_8860.prdoc similarity index 100% rename from prdoc/pr_8860.prdoc rename to prdoc/stable2506/pr_8860.prdoc diff --git a/prdoc/pr_8891.prdoc b/prdoc/stable2506/pr_8891.prdoc similarity index 100% rename from prdoc/pr_8891.prdoc rename to prdoc/stable2506/pr_8891.prdoc diff --git a/prdoc/pr_9094.prdoc b/prdoc/stable2506/pr_9094.prdoc similarity index 100% rename from prdoc/pr_9094.prdoc rename to prdoc/stable2506/pr_9094.prdoc diff --git a/prdoc/stable2506/pr_9102.prdoc b/prdoc/stable2506/pr_9102.prdoc new file mode 100644 index 0000000000000..67d1c25abb5c2 --- /dev/null +++ b/prdoc/stable2506/pr_9102.prdoc @@ -0,0 +1,12 @@ +title: '`polkadot-omni-node`: pass timestamp inherent data for block import' +doc: +- audience: [ Runtime Dev, Node Dev ] + description: |- + This should allow aura runtimes to check timestamp inherent data when syncing/importing blocks + that include timestamp inherent data. + + Runtime developers can check timestamp inherent data while using `polkadot-omni-node-lib`/`polkadot-omni-node`/`polkadot-parachain` binaries. + This change is backwards compatible and doesn't require runtimes to check the timestamp inherent, but they are able to do it now if needed. +crates: +- name: polkadot-omni-node-lib + bump: minor diff --git a/prdoc/pr_9127.prdoc b/prdoc/stable2506/pr_9127.prdoc similarity index 100% rename from prdoc/pr_9127.prdoc rename to prdoc/stable2506/pr_9127.prdoc diff --git a/prdoc/pr_9137.prdoc b/prdoc/stable2506/pr_9137.prdoc similarity index 100% rename from prdoc/pr_9137.prdoc rename to prdoc/stable2506/pr_9137.prdoc diff --git a/prdoc/pr_9139.prdoc b/prdoc/stable2506/pr_9139.prdoc similarity index 100% rename from prdoc/pr_9139.prdoc rename to prdoc/stable2506/pr_9139.prdoc diff --git a/prdoc/pr_9202.prdoc b/prdoc/stable2506/pr_9202.prdoc similarity index 100% rename from prdoc/pr_9202.prdoc rename to prdoc/stable2506/pr_9202.prdoc diff --git a/prdoc/pr_9264.prdoc b/prdoc/stable2506/pr_9264.prdoc similarity index 100% rename from prdoc/pr_9264.prdoc rename to prdoc/stable2506/pr_9264.prdoc diff --git a/scripts/release/delete-versions-if-path-is-present.sh b/scripts/release/delete-versions-if-path-is-present.sh old mode 100644 new mode 100755 diff --git a/substrate/bin/node/bench/Cargo.toml b/substrate/bin/node/bench/Cargo.toml index 83f7b82cd2b51..333f99ea8726e 100644 --- a/substrate/bin/node/bench/Cargo.toml +++ b/substrate/bin/node/bench/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "node-bench" -version = "0.9.0-dev" +version = "0.9.0" authors.workspace = true description = "Substrate node integration benchmarks." edition.workspace = true @@ -22,26 +22,38 @@ derive_more = { features = ["display"], workspace = true } fs_extra = { workspace = true } futures = { features = ["thread-pool"], workspace = true } hash-db = { workspace = true, default-features = true } -kitchensink-runtime = { workspace = true } +kitchensink-runtime.workspace = true kvdb = { workspace = true } kvdb-rocksdb = { workspace = true } log = { workspace = true, default-features = true } -node-primitives = { workspace = true, default-features = true } -node-testing = { workspace = true } +node-primitives.default-features = true +node-primitives.workspace = true +node-testing.workspace = true parity-db = { workspace = true } rand = { features = ["small_rng"], workspace = true, default-features = true } -sc-basic-authorship = { workspace = true, default-features = true } -sc-client-api = { workspace = true, default-features = true } -sc-transaction-pool = { workspace = true, default-features = true } -sc-transaction-pool-api = { workspace = true, default-features = true } +sc-basic-authorship.default-features = true +sc-basic-authorship.workspace = true +sc-client-api.default-features = true +sc-client-api.workspace = true +sc-transaction-pool-api.default-features = true +sc-transaction-pool-api.workspace = true +sc-transaction-pool.default-features = true +sc-transaction-pool.workspace = true serde = { workspace = true, default-features = true } serde_json = { workspace = true, default-features = true } -sp-consensus = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-inherents = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } -sp-state-machine = { workspace = true, default-features = true } -sp-timestamp = { workspace = true } -sp-tracing = { workspace = true, default-features = true } -sp-trie = { workspace = true, default-features = true } +sp-consensus.default-features = true +sp-consensus.workspace = true +sp-core.default-features = true +sp-core.workspace = true +sp-inherents.default-features = true +sp-inherents.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true +sp-state-machine.default-features = true +sp-state-machine.workspace = true +sp-timestamp.workspace = true +sp-tracing.default-features = true +sp-tracing.workspace = true +sp-trie.default-features = true +sp-trie.workspace = true tempfile = { workspace = true } diff --git a/substrate/bin/node/cli/Cargo.toml b/substrate/bin/node/cli/Cargo.toml index f817f0b3d4d26..9be18a5580dfd 100644 --- a/substrate/bin/node/cli/Cargo.toml +++ b/substrate/bin/node/cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "staging-node-cli" -version = "3.0.0-dev" +version = "3.0.0" authors.workspace = true description = "Generic Substrate node implementation in Rust." build = "build.rs" @@ -54,103 +54,18 @@ clap = { features = ["derive"], optional = true, workspace = true } codec = { workspace = true, default-features = true } futures = { workspace = true } jsonrpsee = { features = ["server"], workspace = true } +kitchensink-runtime.workspace = true log = { workspace = true, default-features = true } +node-inspect = { optional = true, workspace = true, default-features = true } +node-primitives.default-features = true +node-primitives.workspace = true +node-rpc.workspace = true +polkadot-sdk = { features = ["fork-tree", "frame-benchmarking-cli", "frame-remote-externalities", "frame-support-procedural-tools", "generate-bags", "mmr-gadget", "mmr-rpc", "pallet-transaction-payment-rpc", "sc-allocator", "sc-authority-discovery", "sc-basic-authorship", "sc-block-builder", "sc-chain-spec", "sc-cli", "sc-client-api", "sc-client-db", "sc-consensus", "sc-consensus-aura", "sc-consensus-babe", "sc-consensus-babe-rpc", "sc-consensus-beefy", "sc-consensus-beefy-rpc", "sc-consensus-epochs", "sc-consensus-grandpa", "sc-consensus-grandpa-rpc", "sc-consensus-manual-seal", "sc-consensus-pow", "sc-consensus-slots", "sc-executor", "sc-executor-common", "sc-executor-polkavm", "sc-executor-wasmtime", "sc-informant", "sc-keystore", "sc-mixnet", "sc-network", "sc-network-common", "sc-network-gossip", "sc-network-light", "sc-network-statement", "sc-network-sync", "sc-network-transactions", "sc-network-types", "sc-offchain", "sc-proposer-metrics", "sc-rpc", "sc-rpc-api", "sc-rpc-server", "sc-rpc-spec-v2", "sc-service", "sc-state-db", "sc-statement-store", "sc-storage-monitor", "sc-sync-state-rpc", "sc-sysinfo", "sc-telemetry", "sc-tracing", "sc-transaction-pool", "sc-transaction-pool-api", "sc-utils", "sp-blockchain", "sp-consensus", "sp-core-hashing", "sp-core-hashing-proc-macro", "sp-database", "sp-maybe-compressed-blob", "sp-panic-handler", "sp-rpc", "staging-chain-spec-builder", "staging-node-inspect", "staging-tracking-allocator", "std", "subkey", "substrate-build-script-utils", "substrate-frame-rpc-support", "substrate-frame-rpc-system", "substrate-prometheus-endpoint", "substrate-rpc-client", "substrate-state-trie-migration-rpc", "substrate-wasm-builder", "tracing-gum"], workspace = true, default-features = true } rand = { workspace = true, default-features = true } serde = { features = ["derive"], workspace = true, default-features = true } serde_json = { workspace = true, default-features = true } subxt-signer = { workspace = true, features = ["unstable-eth"] } -# The Polkadot-SDK: -polkadot-sdk = { features = [ - "fork-tree", - "frame-benchmarking-cli", - "frame-remote-externalities", - "frame-support-procedural-tools", - "generate-bags", - "mmr-gadget", - "mmr-rpc", - "pallet-transaction-payment-rpc", - "sc-allocator", - "sc-authority-discovery", - "sc-basic-authorship", - "sc-block-builder", - "sc-chain-spec", - "sc-cli", - "sc-client-api", - "sc-client-db", - "sc-consensus", - "sc-consensus-aura", - "sc-consensus-babe", - "sc-consensus-babe-rpc", - "sc-consensus-beefy", - "sc-consensus-beefy-rpc", - "sc-consensus-epochs", - "sc-consensus-grandpa", - "sc-consensus-grandpa-rpc", - "sc-consensus-manual-seal", - "sc-consensus-pow", - "sc-consensus-slots", - "sc-executor", - "sc-executor-common", - "sc-executor-polkavm", - "sc-executor-wasmtime", - "sc-informant", - "sc-keystore", - "sc-mixnet", - "sc-network", - "sc-network-common", - "sc-network-gossip", - "sc-network-light", - "sc-network-statement", - "sc-network-sync", - "sc-network-transactions", - "sc-network-types", - "sc-offchain", - "sc-proposer-metrics", - "sc-rpc", - "sc-rpc-api", - "sc-rpc-server", - "sc-rpc-spec-v2", - "sc-service", - "sc-state-db", - "sc-statement-store", - "sc-storage-monitor", - "sc-sync-state-rpc", - "sc-sysinfo", - "sc-telemetry", - "sc-tracing", - "sc-transaction-pool", - "sc-transaction-pool-api", - "sc-utils", - "sp-blockchain", - "sp-consensus", - "sp-core-hashing", - "sp-core-hashing-proc-macro", - "sp-database", - "sp-maybe-compressed-blob", - "sp-panic-handler", - "sp-rpc", - "staging-chain-spec-builder", - "staging-node-inspect", - "staging-tracking-allocator", - "std", - "subkey", - "substrate-build-script-utils", - "substrate-frame-rpc-support", - "substrate-frame-rpc-system", - "substrate-prometheus-endpoint", - "substrate-rpc-client", - "substrate-state-trie-migration-rpc", - "substrate-wasm-builder", - "tracing-gum", -], workspace = true, default-features = true } - -# Shared code between the staging node and kitchensink runtime: -kitchensink-runtime = { workspace = true } -node-inspect = { optional = true, workspace = true, default-features = true } -node-primitives = { workspace = true, default-features = true } -node-rpc = { workspace = true } - [dev-dependencies] assert_cmd = { workspace = true } criterion = { features = ["async_tokio"], workspace = true, default-features = true } @@ -161,7 +76,7 @@ regex = { workspace = true } scale-info = { features = ["derive", "serde"], workspace = true, default-features = true } serde_json = { workspace = true, default-features = true } soketto = { workspace = true } -sp-keyring = { workspace = true } +sp-keyring = { workspace = true, default-features = false } tempfile = { workspace = true } tokio = { features = ["macros", "parking_lot", "time"], workspace = true, default-features = true } tokio-util = { features = ["compat"], workspace = true } @@ -175,15 +90,8 @@ substrate-cli-test-utils = { workspace = true } [build-dependencies] clap = { optional = true, workspace = true } clap_complete = { optional = true, workspace = true } - node-inspect = { optional = true, workspace = true, default-features = true } - -polkadot-sdk = { features = [ - "frame-benchmarking-cli", - "sc-cli", - "sc-storage-monitor", - "substrate-build-script-utils", -], optional = true, workspace = true, default-features = true } +polkadot-sdk = { features = ["frame-benchmarking-cli", "sc-cli", "sc-storage-monitor", "substrate-build-script-utils"], optional = true, workspace = true, default-features = true } [features] default = ["cli"] diff --git a/substrate/bin/node/inspect/Cargo.toml b/substrate/bin/node/inspect/Cargo.toml index 0cf13bef71f16..a757d70225534 100644 --- a/substrate/bin/node/inspect/Cargo.toml +++ b/substrate/bin/node/inspect/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "staging-node-inspect" -version = "0.12.0" +version = "0.29.0" authors.workspace = true description = "Substrate node block inspection tool." edition.workspace = true @@ -17,14 +17,20 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] clap = { features = ["derive"], workspace = true } codec = { workspace = true, default-features = true } -sc-cli = { workspace = true } -sc-client-api = { workspace = true, default-features = true } -sc-service = { workspace = true } -sp-blockchain = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-io = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } -sp-statement-store = { workspace = true, default-features = true } +sc-cli.workspace = true +sc-client-api.default-features = true +sc-client-api.workspace = true +sc-service.workspace = true +sp-blockchain.default-features = true +sp-blockchain.workspace = true +sp-core.default-features = true +sp-core.workspace = true +sp-io.default-features = true +sp-io.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true +sp-statement-store.default-features = true +sp-statement-store.workspace = true thiserror = { workspace = true } [features] diff --git a/substrate/bin/node/primitives/Cargo.toml b/substrate/bin/node/primitives/Cargo.toml index 87271439921a0..740eed15751d0 100644 --- a/substrate/bin/node/primitives/Cargo.toml +++ b/substrate/bin/node/primitives/Cargo.toml @@ -16,8 +16,8 @@ workspace = true targets = ["x86_64-unknown-linux-gnu"] [dependencies] -sp-core = { workspace = true } -sp-runtime = { workspace = true } +sp-core.workspace = true +sp-runtime.workspace = true [features] default = ["std"] diff --git a/substrate/bin/node/rpc/Cargo.toml b/substrate/bin/node/rpc/Cargo.toml index c8b20287650bd..fe18facb9bdb9 100644 --- a/substrate/bin/node/rpc/Cargo.toml +++ b/substrate/bin/node/rpc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "node-rpc" -version = "3.0.0-dev" +version = "3.0.0" authors.workspace = true description = "Substrate node rpc methods." edition.workspace = true @@ -17,30 +17,57 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] jsonrpsee = { features = ["server"], workspace = true } -mmr-rpc = { workspace = true, default-features = true } -node-primitives = { workspace = true, default-features = true } -pallet-transaction-payment-rpc = { workspace = true, default-features = true } -sc-chain-spec = { workspace = true, default-features = true } -sc-client-api = { workspace = true, default-features = true } -sc-consensus-babe = { workspace = true, default-features = true } -sc-consensus-babe-rpc = { workspace = true, default-features = true } -sc-consensus-beefy = { workspace = true, default-features = true } -sc-consensus-beefy-rpc = { workspace = true, default-features = true } -sc-consensus-grandpa = { workspace = true, default-features = true } -sc-consensus-grandpa-rpc = { workspace = true, default-features = true } -sc-mixnet = { workspace = true, default-features = true } -sc-rpc = { workspace = true, default-features = true } -sc-sync-state-rpc = { workspace = true, default-features = true } -sc-transaction-pool-api = { workspace = true, default-features = true } -sp-api = { workspace = true, default-features = true } -sp-application-crypto = { workspace = true, default-features = true } -sp-block-builder = { workspace = true, default-features = true } -sp-blockchain = { workspace = true, default-features = true } -sp-consensus = { workspace = true, default-features = true } -sp-consensus-babe = { workspace = true, default-features = true } -sp-consensus-beefy = { workspace = true, default-features = true } -sp-keystore = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } -sp-statement-store = { workspace = true, default-features = true } -substrate-frame-rpc-system = { workspace = true, default-features = true } -substrate-state-trie-migration-rpc = { workspace = true, default-features = true } +mmr-rpc.default-features = true +mmr-rpc.workspace = true +node-primitives.default-features = true +node-primitives.workspace = true +pallet-transaction-payment-rpc.default-features = true +pallet-transaction-payment-rpc.workspace = true +sc-chain-spec.default-features = true +sc-chain-spec.workspace = true +sc-client-api.default-features = true +sc-client-api.workspace = true +sc-consensus-babe-rpc.default-features = true +sc-consensus-babe-rpc.workspace = true +sc-consensus-babe.default-features = true +sc-consensus-babe.workspace = true +sc-consensus-beefy-rpc.default-features = true +sc-consensus-beefy-rpc.workspace = true +sc-consensus-beefy.default-features = true +sc-consensus-beefy.workspace = true +sc-consensus-grandpa-rpc.default-features = true +sc-consensus-grandpa-rpc.workspace = true +sc-consensus-grandpa.default-features = true +sc-consensus-grandpa.workspace = true +sc-mixnet.default-features = true +sc-mixnet.workspace = true +sc-rpc.default-features = true +sc-rpc.workspace = true +sc-sync-state-rpc.default-features = true +sc-sync-state-rpc.workspace = true +sc-transaction-pool-api.default-features = true +sc-transaction-pool-api.workspace = true +sp-api.default-features = true +sp-api.workspace = true +sp-application-crypto.default-features = true +sp-application-crypto.workspace = true +sp-block-builder.default-features = true +sp-block-builder.workspace = true +sp-blockchain.default-features = true +sp-blockchain.workspace = true +sp-consensus-babe.default-features = true +sp-consensus-babe.workspace = true +sp-consensus-beefy.default-features = true +sp-consensus-beefy.workspace = true +sp-consensus.default-features = true +sp-consensus.workspace = true +sp-keystore.default-features = true +sp-keystore.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true +sp-statement-store.default-features = true +sp-statement-store.workspace = true +substrate-frame-rpc-system.default-features = true +substrate-frame-rpc-system.workspace = true +substrate-state-trie-migration-rpc.default-features = true +substrate-state-trie-migration-rpc.workspace = true diff --git a/substrate/bin/node/runtime/Cargo.toml b/substrate/bin/node/runtime/Cargo.toml index 542b78cbf25ee..e9753b2f4f9ed 100644 --- a/substrate/bin/node/runtime/Cargo.toml +++ b/substrate/bin/node/runtime/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "kitchensink-runtime" -version = "3.0.0-dev" +version = "3.0.0" authors.workspace = true description = "Substrate node kitchensink runtime." edition.workspace = true @@ -27,16 +27,11 @@ sp-debug-derive = { workspace = true, features = ["force-debug"] } static_assertions = { workspace = true, default-features = true } # pallet-asset-conversion: turn on "num-traits" feature -primitive-types = { features = ["codec", "num-traits", "scale-info"], workspace = true } - +node-primitives.workspace = true +pallet-example-mbm.workspace = true +pallet-example-tasks.workspace = true polkadot-sdk = { features = ["runtime-full", "tuples-96"], workspace = true } - -# shared code between runtime and node -node-primitives = { workspace = true } - -# Example pallets that are not published: -pallet-example-mbm = { workspace = true } -pallet-example-tasks = { workspace = true } +primitive-types = { features = ["codec", "num-traits", "scale-info"], workspace = true } [build-dependencies] substrate-wasm-builder = { optional = true, workspace = true, default-features = true } diff --git a/substrate/bin/node/testing/Cargo.toml b/substrate/bin/node/testing/Cargo.toml index a958a7da80612..3fc10831dff36 100644 --- a/substrate/bin/node/testing/Cargo.toml +++ b/substrate/bin/node/testing/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "node-testing" -version = "3.0.0-dev" +version = "3.0.0" authors.workspace = true description = "Test utilities for Substrate node." edition.workspace = true @@ -17,32 +17,51 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { workspace = true, default-features = true } -frame-metadata-hash-extension = { workspace = true, default-features = true } -frame-system = { workspace = true, default-features = true } +frame-metadata-hash-extension.default-features = true +frame-metadata-hash-extension.workspace = true +frame-system.default-features = true +frame-system.workspace = true fs_extra = { workspace = true } futures = { workspace = true } -kitchensink-runtime = { workspace = true } +kitchensink-runtime.workspace = true log = { workspace = true, default-features = true } -node-cli = { workspace = true } -node-primitives = { workspace = true, default-features = true } -pallet-asset-conversion = { workspace = true, default-features = true } -pallet-asset-conversion-tx-payment = { workspace = true, default-features = true } -pallet-skip-feeless-payment = { workspace = true, default-features = true } -sc-block-builder = { workspace = true, default-features = true } -sc-client-api = { workspace = true, default-features = true } +node-cli.workspace = true +node-primitives.default-features = true +node-primitives.workspace = true +pallet-asset-conversion-tx-payment.default-features = true +pallet-asset-conversion-tx-payment.workspace = true +pallet-asset-conversion.default-features = true +pallet-asset-conversion.workspace = true +pallet-skip-feeless-payment.default-features = true +pallet-skip-feeless-payment.workspace = true +sc-block-builder.default-features = true +sc-block-builder.workspace = true +sc-client-api.default-features = true +sc-client-api.workspace = true sc-client-db = { features = ["rocksdb"], workspace = true, default-features = true } -sc-consensus = { workspace = true, default-features = true } -sc-executor = { workspace = true, default-features = true } +sc-consensus.default-features = true +sc-consensus.workspace = true +sc-executor.default-features = true +sc-executor.workspace = true sc-service = { features = ["rocksdb"], workspace = true, default-features = true } -sp-api = { workspace = true, default-features = true } -sp-block-builder = { workspace = true, default-features = true } -sp-blockchain = { workspace = true, default-features = true } -sp-consensus = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-crypto-hashing = { workspace = true, default-features = true } -sp-inherents = { workspace = true, default-features = true } -sp-keyring = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } -sp-timestamp = { workspace = true } -substrate-test-client = { workspace = true } +sp-api.default-features = true +sp-api.workspace = true +sp-block-builder.default-features = true +sp-block-builder.workspace = true +sp-blockchain.default-features = true +sp-blockchain.workspace = true +sp-consensus.default-features = true +sp-consensus.workspace = true +sp-core.default-features = true +sp-core.workspace = true +sp-crypto-hashing.default-features = true +sp-crypto-hashing.workspace = true +sp-inherents.default-features = true +sp-inherents.workspace = true +sp-keyring.default-features = true +sp-keyring.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true +sp-timestamp.workspace = true +substrate-test-client.workspace = true tempfile = { workspace = true } diff --git a/substrate/bin/utils/chain-spec-builder/Cargo.toml b/substrate/bin/utils/chain-spec-builder/Cargo.toml index 71661f91c0bf7..98565a537c268 100644 --- a/substrate/bin/utils/chain-spec-builder/Cargo.toml +++ b/substrate/bin/utils/chain-spec-builder/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "staging-chain-spec-builder" -version = "1.6.1" +version = "12.0.0" authors.workspace = true edition.workspace = true build = "build.rs" @@ -33,7 +33,8 @@ docify = { workspace = true } sc-chain-spec = { features = ["clap"], workspace = true, default-features = true } serde = { workspace = true, default-features = true } serde_json = { workspace = true, default-features = true } -sp-tracing = { workspace = true, default-features = true } +sp-tracing.default-features = true +sp-tracing.workspace = true [dev-dependencies] cmd_lib = { workspace = true } diff --git a/substrate/bin/utils/subkey/Cargo.toml b/substrate/bin/utils/subkey/Cargo.toml index 72677a2bd43df..082c0e40797e0 100644 --- a/substrate/bin/utils/subkey/Cargo.toml +++ b/substrate/bin/utils/subkey/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "subkey" -version = "9.0.0" +version = "26.0.0" authors.workspace = true description = "Generate and restore keys for Substrate based chains such as Polkadot, Kusama and a growing number of parachains and Substrate based projects." edition.workspace = true @@ -21,4 +21,5 @@ name = "subkey" [dependencies] clap = { features = ["derive"], workspace = true } -sc-cli = { workspace = true, default-features = true } +sc-cli.default-features = true +sc-cli.workspace = true diff --git a/substrate/client/allocator/Cargo.toml b/substrate/client/allocator/Cargo.toml index c0ce640566b07..29a66ad6c2fdf 100644 --- a/substrate/client/allocator/Cargo.toml +++ b/substrate/client/allocator/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-allocator" -version = "23.0.0" +version = "32.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -18,6 +18,8 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] log = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-wasm-interface = { workspace = true, default-features = true } +sp-core.default-features = true +sp-core.workspace = true +sp-wasm-interface.default-features = true +sp-wasm-interface.workspace = true thiserror = { workspace = true } diff --git a/substrate/client/api/Cargo.toml b/substrate/client/api/Cargo.toml index a692fbfd76e4a..af309254ee7de 100644 --- a/substrate/client/api/Cargo.toml +++ b/substrate/client/api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-client-api" -version = "28.0.0" +version = "40.0.0" authors.workspace = true edition.workspace = true license = "GPL-3.0-or-later WITH Classpath-exception-2.0" @@ -22,20 +22,32 @@ fnv = { workspace = true } futures = { workspace = true } log = { workspace = true, default-features = true } parking_lot = { workspace = true, default-features = true } -prometheus-endpoint = { workspace = true, default-features = true } -sc-executor = { workspace = true, default-features = true } -sc-transaction-pool-api = { workspace = true, default-features = true } -sc-utils = { workspace = true, default-features = true } -sp-api = { workspace = true, default-features = true } -sp-blockchain = { workspace = true, default-features = true } -sp-consensus = { workspace = true, default-features = true } -sp-core = { workspace = true } -sp-database = { workspace = true, default-features = true } -sp-externalities = { workspace = true, default-features = true } -sp-runtime = { workspace = true } -sp-state-machine = { workspace = true, default-features = true } -sp-storage = { workspace = true, default-features = true } -sp-trie = { workspace = true, default-features = true } +prometheus-endpoint.default-features = true +prometheus-endpoint.workspace = true +sc-executor.default-features = true +sc-executor.workspace = true +sc-transaction-pool-api.default-features = true +sc-transaction-pool-api.workspace = true +sc-utils.default-features = true +sc-utils.workspace = true +sp-api.default-features = true +sp-api.workspace = true +sp-blockchain.default-features = true +sp-blockchain.workspace = true +sp-consensus.default-features = true +sp-consensus.workspace = true +sp-core.workspace = true +sp-database.default-features = true +sp-database.workspace = true +sp-externalities.default-features = true +sp-externalities.workspace = true +sp-runtime.workspace = true +sp-state-machine.default-features = true +sp-state-machine.workspace = true +sp-storage.default-features = true +sp-storage.workspace = true +sp-trie.default-features = true +sp-trie.workspace = true [dev-dependencies] substrate-test-runtime = { workspace = true } diff --git a/substrate/client/authority-discovery/Cargo.toml b/substrate/client/authority-discovery/Cargo.toml index f1dd0855d435b..81b666787c076 100644 --- a/substrate/client/authority-discovery/Cargo.toml +++ b/substrate/client/authority-discovery/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-authority-discovery" -version = "0.34.0" +version = "0.51.0" authors.workspace = true edition.workspace = true build = "build.rs" @@ -24,27 +24,37 @@ futures-timer = { workspace = true } ip_network = { workspace = true } linked_hash_set = { workspace = true } log = { workspace = true, default-features = true } -prometheus-endpoint = { workspace = true, default-features = true } +prometheus-endpoint.default-features = true +prometheus-endpoint.workspace = true prost = { workspace = true } rand = { workspace = true, default-features = true } -sc-client-api = { workspace = true, default-features = true } -sc-network = { workspace = true, default-features = true } -sc-network-types = { workspace = true, default-features = true } +sc-client-api.default-features = true +sc-client-api.workspace = true +sc-network-types.default-features = true +sc-network-types.workspace = true +sc-network.default-features = true +sc-network.workspace = true serde.workspace = true serde_json.workspace = true -sp-api = { workspace = true, default-features = true } -sp-authority-discovery = { workspace = true, default-features = true } -sp-blockchain = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-keystore = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } +sp-api.default-features = true +sp-api.workspace = true +sp-authority-discovery.default-features = true +sp-authority-discovery.workspace = true +sp-blockchain.default-features = true +sp-blockchain.workspace = true +sp-core.default-features = true +sp-core.workspace = true +sp-keystore.default-features = true +sp-keystore.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true thiserror = { workspace = true } tokio.workspace = true [dev-dependencies] hex.workspace = true quickcheck = { workspace = true } -sp-tracing = { workspace = true, default-features = true } +sp-tracing = { default-features = true, workspace = true } substrate-test-runtime-client = { workspace = true } tempfile.workspace = true diff --git a/substrate/client/basic-authorship/Cargo.toml b/substrate/client/basic-authorship/Cargo.toml index 5595f345e9039..c1b5da322bc96 100644 --- a/substrate/client/basic-authorship/Cargo.toml +++ b/substrate/client/basic-authorship/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-basic-authorship" -version = "0.34.0" +version = "0.50.0" authors.workspace = true edition.workspace = true license = "GPL-3.0-or-later WITH Classpath-exception-2.0" @@ -19,20 +19,31 @@ targets = ["x86_64-unknown-linux-gnu"] codec = { workspace = true, default-features = true } futures = { workspace = true } log = { workspace = true, default-features = true } -prometheus-endpoint = { workspace = true, default-features = true } -sc-block-builder = { workspace = true, default-features = true } -sc-proposer-metrics = { workspace = true, default-features = true } -sc-telemetry = { workspace = true, default-features = true } -sc-transaction-pool-api = { workspace = true, default-features = true } -sp-api = { workspace = true, default-features = true } -sp-blockchain = { workspace = true, default-features = true } -sp-consensus = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-inherents = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } +prometheus-endpoint.default-features = true +prometheus-endpoint.workspace = true +sc-block-builder.default-features = true +sc-block-builder.workspace = true +sc-proposer-metrics.default-features = true +sc-proposer-metrics.workspace = true +sc-telemetry.default-features = true +sc-telemetry.workspace = true +sc-transaction-pool-api.default-features = true +sc-transaction-pool-api.workspace = true +sp-api.default-features = true +sp-api.workspace = true +sp-blockchain.default-features = true +sp-blockchain.workspace = true +sp-consensus.default-features = true +sp-consensus.workspace = true +sp-core.default-features = true +sp-core.workspace = true +sp-inherents.default-features = true +sp-inherents.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true [dev-dependencies] parking_lot = { workspace = true, default-features = true } -sc-client-api = { workspace = true, default-features = true } -sc-transaction-pool = { workspace = true, default-features = true } +sc-client-api = { default-features = true, workspace = true } +sc-transaction-pool = { default-features = true, workspace = true } substrate-test-runtime-client = { workspace = true } diff --git a/substrate/client/block-builder/Cargo.toml b/substrate/client/block-builder/Cargo.toml index 85bc395179e59..068ff6794c54b 100644 --- a/substrate/client/block-builder/Cargo.toml +++ b/substrate/client/block-builder/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-block-builder" -version = "0.33.0" +version = "0.45.0" authors.workspace = true edition.workspace = true license = "GPL-3.0-or-later WITH Classpath-exception-2.0" @@ -17,14 +17,21 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { features = ["derive"], workspace = true, default-features = true } -sp-api = { workspace = true, default-features = true } -sp-block-builder = { workspace = true, default-features = true } -sp-blockchain = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-inherents = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } -sp-trie = { workspace = true, default-features = true } +sp-api.default-features = true +sp-api.workspace = true +sp-block-builder.default-features = true +sp-block-builder.workspace = true +sp-blockchain.default-features = true +sp-blockchain.workspace = true +sp-core.default-features = true +sp-core.workspace = true +sp-inherents.default-features = true +sp-inherents.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true +sp-trie.default-features = true +sp-trie.workspace = true [dev-dependencies] -sp-state-machine = { workspace = true, default-features = true } +sp-state-machine = { default-features = true, workspace = true } substrate-test-runtime-client = { workspace = true } diff --git a/substrate/client/chain-spec/Cargo.toml b/substrate/client/chain-spec/Cargo.toml index cd3b2882b6a45..e1c4d694985df 100644 --- a/substrate/client/chain-spec/Cargo.toml +++ b/substrate/client/chain-spec/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-chain-spec" -version = "28.0.0" +version = "44.0.0" authors.workspace = true edition.workspace = true license = "GPL-3.0-or-later WITH Classpath-exception-2.0" @@ -21,26 +21,38 @@ clap = { features = ["derive"], optional = true, workspace = true } codec = { features = ["derive"], workspace = true } docify = { workspace = true } memmap2 = { workspace = true } -sc-chain-spec-derive = { workspace = true, default-features = true } -sc-client-api = { workspace = true, default-features = true } -sc-executor = { workspace = true, default-features = true } -sc-network = { workspace = true, default-features = true } -sc-telemetry = { workspace = true, default-features = true } +sc-chain-spec-derive.default-features = true +sc-chain-spec-derive.workspace = true +sc-client-api.default-features = true +sc-client-api.workspace = true +sc-executor.default-features = true +sc-executor.workspace = true +sc-network.default-features = true +sc-network.workspace = true +sc-telemetry.default-features = true +sc-telemetry.workspace = true serde = { features = ["derive"], workspace = true, default-features = true } serde_json = { workspace = true, default-features = true } -sp-blockchain = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-crypto-hashing = { workspace = true, default-features = true } -sp-genesis-builder = { workspace = true, default-features = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true, default-features = true } -sp-state-machine = { workspace = true, default-features = true } -sp-tracing = { workspace = true, default-features = true } +sp-blockchain.default-features = true +sp-blockchain.workspace = true +sp-core.default-features = true +sp-core.workspace = true +sp-crypto-hashing.default-features = true +sp-crypto-hashing.workspace = true +sp-genesis-builder.default-features = true +sp-genesis-builder.workspace = true +sp-io.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true +sp-state-machine.default-features = true +sp-state-machine.workspace = true +sp-tracing.default-features = true +sp-tracing.workspace = true [dev-dependencies] pretty_assertions = { workspace = true } regex = { workspace = true } -sp-application-crypto = { features = ["serde"], workspace = true } -sp-consensus-babe = { features = ["serde"], workspace = true } -sp-keyring = { workspace = true, default-features = true } +sp-application-crypto = { features = ["serde"], workspace = true, default-features = false } +sp-consensus-babe = { features = ["serde"], workspace = true, default-features = false } +sp-keyring = { default-features = true, workspace = true } substrate-test-runtime = { workspace = true } diff --git a/substrate/client/chain-spec/derive/Cargo.toml b/substrate/client/chain-spec/derive/Cargo.toml index ccd898447beac..821efc95e8cd4 100644 --- a/substrate/client/chain-spec/derive/Cargo.toml +++ b/substrate/client/chain-spec/derive/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-chain-spec-derive" -version = "11.0.0" +version = "12.0.0" authors.workspace = true edition.workspace = true license = "GPL-3.0-or-later WITH Classpath-exception-2.0" diff --git a/substrate/client/cli/Cargo.toml b/substrate/client/cli/Cargo.toml index 91317965af729..1ed4443047c33 100644 --- a/substrate/client/cli/Cargo.toml +++ b/substrate/client/cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-cli" -version = "0.36.0" +version = "0.53.0" authors.workspace = true description = "Substrate CLI interface." edition.workspace = true @@ -30,31 +30,48 @@ names = { workspace = true } rand = { workspace = true, default-features = true } regex = { workspace = true } rpassword = { workspace = true } -sc-client-api = { workspace = true, default-features = true } -sc-client-db = { workspace = true, default-features = false } -sc-keystore = { workspace = true, default-features = true } -sc-mixnet = { workspace = true, default-features = true } -sc-network = { workspace = true, default-features = true } -sc-service = { workspace = true, default-features = false } -sc-telemetry = { workspace = true, default-features = true } -sc-tracing = { workspace = true, default-features = true } -sc-transaction-pool = { workspace = true, default-features = true } -sc-utils = { workspace = true, default-features = true } +sc-client-api.default-features = true +sc-client-api.workspace = true +sc-client-db.default-features = false +sc-client-db.workspace = true +sc-keystore.default-features = true +sc-keystore.workspace = true +sc-mixnet.default-features = true +sc-mixnet.workspace = true +sc-network.default-features = true +sc-network.workspace = true +sc-service.default-features = false +sc-service.workspace = true +sc-telemetry.default-features = true +sc-telemetry.workspace = true +sc-tracing.default-features = true +sc-tracing.workspace = true +sc-transaction-pool.default-features = true +sc-transaction-pool.workspace = true +sc-utils.default-features = true +sc-utils.workspace = true serde = { workspace = true, default-features = true } serde_json = { workspace = true, default-features = true } -sp-blockchain = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-keyring = { workspace = true, default-features = true } -sp-keystore = { workspace = true, default-features = true } -sp-panic-handler = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } -sp-version = { workspace = true, default-features = true } +sp-blockchain.default-features = true +sp-blockchain.workspace = true +sp-core.default-features = true +sp-core.workspace = true +sp-keyring.default-features = true +sp-keyring.workspace = true +sp-keystore.default-features = true +sp-keystore.workspace = true +sp-panic-handler.default-features = true +sp-panic-handler.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true +sp-version.default-features = true +sp-version.workspace = true thiserror = { workspace = true } tokio = { features = ["parking_lot", "rt-multi-thread", "signal"], workspace = true, default-features = true } [dev-dependencies] futures-timer = { workspace = true } -sp-tracing = { workspace = true, default-features = true } +sp-tracing = { default-features = true, workspace = true } tempfile = { workspace = true } [features] diff --git a/substrate/client/consensus/aura/Cargo.toml b/substrate/client/consensus/aura/Cargo.toml index 6af6736171182..5fbfc56e168b2 100644 --- a/substrate/client/consensus/aura/Cargo.toml +++ b/substrate/client/consensus/aura/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-consensus-aura" -version = "0.34.0" +version = "0.51.0" authors.workspace = true description = "Aura consensus algorithm for substrate" edition.workspace = true @@ -20,33 +20,50 @@ async-trait = { workspace = true } codec = { workspace = true, default-features = true } futures = { workspace = true } log = { workspace = true, default-features = true } -prometheus-endpoint = { workspace = true, default-features = true } -sc-block-builder = { workspace = true, default-features = true } -sc-client-api = { workspace = true, default-features = true } -sc-consensus = { workspace = true, default-features = true } -sc-consensus-slots = { workspace = true, default-features = true } -sc-telemetry = { workspace = true, default-features = true } -sp-api = { workspace = true, default-features = true } -sp-application-crypto = { workspace = true, default-features = true } -sp-block-builder = { workspace = true, default-features = true } -sp-blockchain = { workspace = true, default-features = true } -sp-consensus = { workspace = true, default-features = true } -sp-consensus-aura = { workspace = true, default-features = true } -sp-consensus-slots = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-inherents = { workspace = true, default-features = true } -sp-keystore = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } +prometheus-endpoint.default-features = true +prometheus-endpoint.workspace = true +sc-block-builder.default-features = true +sc-block-builder.workspace = true +sc-client-api.default-features = true +sc-client-api.workspace = true +sc-consensus-slots.default-features = true +sc-consensus-slots.workspace = true +sc-consensus.default-features = true +sc-consensus.workspace = true +sc-telemetry.default-features = true +sc-telemetry.workspace = true +sp-api.default-features = true +sp-api.workspace = true +sp-application-crypto.default-features = true +sp-application-crypto.workspace = true +sp-block-builder.default-features = true +sp-block-builder.workspace = true +sp-blockchain.default-features = true +sp-blockchain.workspace = true +sp-consensus-aura.default-features = true +sp-consensus-aura.workspace = true +sp-consensus-slots.default-features = true +sp-consensus-slots.workspace = true +sp-consensus.default-features = true +sp-consensus.workspace = true +sp-core.default-features = true +sp-core.workspace = true +sp-inherents.default-features = true +sp-inherents.workspace = true +sp-keystore.default-features = true +sp-keystore.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true thiserror = { workspace = true } [dev-dependencies] parking_lot = { workspace = true, default-features = true } -sc-keystore = { workspace = true, default-features = true } -sc-network = { workspace = true, default-features = true } +sc-keystore = { default-features = true, workspace = true } +sc-network = { default-features = true, workspace = true } sc-network-test = { workspace = true } -sp-keyring = { workspace = true, default-features = true } -sp-timestamp = { workspace = true, default-features = true } -sp-tracing = { workspace = true, default-features = true } +sp-keyring = { default-features = true, workspace = true } +sp-timestamp = { default-features = true, workspace = true } +sp-tracing = { default-features = true, workspace = true } substrate-test-runtime-client = { workspace = true } tempfile = { workspace = true } tokio = { workspace = true, default-features = true } diff --git a/substrate/client/consensus/babe/Cargo.toml b/substrate/client/consensus/babe/Cargo.toml index 305409b80c787..aaed364398d1c 100644 --- a/substrate/client/consensus/babe/Cargo.toml +++ b/substrate/client/consensus/babe/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-consensus-babe" -version = "0.34.0" +version = "0.51.0" authors.workspace = true description = "BABE consensus algorithm for substrate" edition.workspace = true @@ -19,39 +19,59 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] async-trait = { workspace = true } codec = { features = ["derive"], workspace = true, default-features = true } -fork-tree = { workspace = true, default-features = true } +fork-tree.default-features = true +fork-tree.workspace = true futures = { workspace = true } log = { workspace = true, default-features = true } num-bigint = { workspace = true } num-rational = { workspace = true } num-traits = { workspace = true, default-features = true } parking_lot = { workspace = true, default-features = true } -prometheus-endpoint = { workspace = true, default-features = true } -sc-client-api = { workspace = true, default-features = true } -sc-consensus = { workspace = true, default-features = true } -sc-consensus-epochs = { workspace = true, default-features = true } -sc-consensus-slots = { workspace = true, default-features = true } -sc-telemetry = { workspace = true, default-features = true } -sc-transaction-pool-api = { workspace = true, default-features = true } -sp-api = { workspace = true, default-features = true } -sp-application-crypto = { workspace = true, default-features = true } -sp-block-builder = { workspace = true, default-features = true } -sp-blockchain = { workspace = true, default-features = true } -sp-consensus = { workspace = true, default-features = true } -sp-consensus-babe = { workspace = true, default-features = true } -sp-consensus-slots = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-crypto-hashing = { workspace = true, default-features = true } -sp-inherents = { workspace = true, default-features = true } -sp-keystore = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } +prometheus-endpoint.default-features = true +prometheus-endpoint.workspace = true +sc-client-api.default-features = true +sc-client-api.workspace = true +sc-consensus-epochs.default-features = true +sc-consensus-epochs.workspace = true +sc-consensus-slots.default-features = true +sc-consensus-slots.workspace = true +sc-consensus.default-features = true +sc-consensus.workspace = true +sc-telemetry.default-features = true +sc-telemetry.workspace = true +sc-transaction-pool-api.default-features = true +sc-transaction-pool-api.workspace = true +sp-api.default-features = true +sp-api.workspace = true +sp-application-crypto.default-features = true +sp-application-crypto.workspace = true +sp-block-builder.default-features = true +sp-block-builder.workspace = true +sp-blockchain.default-features = true +sp-blockchain.workspace = true +sp-consensus-babe.default-features = true +sp-consensus-babe.workspace = true +sp-consensus-slots.default-features = true +sp-consensus-slots.workspace = true +sp-consensus.default-features = true +sp-consensus.workspace = true +sp-core.default-features = true +sp-core.workspace = true +sp-crypto-hashing.default-features = true +sp-crypto-hashing.workspace = true +sp-inherents.default-features = true +sp-inherents.workspace = true +sp-keystore.default-features = true +sp-keystore.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true thiserror = { workspace = true } [dev-dependencies] -sc-block-builder = { workspace = true, default-features = true } +sc-block-builder = { default-features = true, workspace = true } sc-network-test = { workspace = true } -sp-keyring = { workspace = true, default-features = true } -sp-timestamp = { workspace = true, default-features = true } -sp-tracing = { workspace = true, default-features = true } +sp-keyring = { default-features = true, workspace = true } +sp-timestamp = { default-features = true, workspace = true } +sp-tracing = { default-features = true, workspace = true } substrate-test-runtime-client = { workspace = true } tokio = { workspace = true, default-features = true } diff --git a/substrate/client/consensus/babe/rpc/Cargo.toml b/substrate/client/consensus/babe/rpc/Cargo.toml index c99eba0175319..58e70d51cdf9c 100644 --- a/substrate/client/consensus/babe/rpc/Cargo.toml +++ b/substrate/client/consensus/babe/rpc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-consensus-babe-rpc" -version = "0.34.0" +version = "0.51.0" authors.workspace = true description = "RPC extensions for the BABE consensus algorithm" edition.workspace = true @@ -18,23 +18,34 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] futures = { workspace = true } jsonrpsee = { features = ["client-core", "macros", "server-core"], workspace = true } -sc-consensus-babe = { workspace = true, default-features = true } -sc-consensus-epochs = { workspace = true, default-features = true } -sc-rpc-api = { workspace = true, default-features = true } +sc-consensus-babe.default-features = true +sc-consensus-babe.workspace = true +sc-consensus-epochs.default-features = true +sc-consensus-epochs.workspace = true +sc-rpc-api.default-features = true +sc-rpc-api.workspace = true serde = { features = ["derive"], workspace = true, default-features = true } -sp-api = { workspace = true, default-features = true } -sp-application-crypto = { workspace = true, default-features = true } -sp-blockchain = { workspace = true, default-features = true } -sp-consensus = { workspace = true, default-features = true } -sp-consensus-babe = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-keystore = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } +sp-api.default-features = true +sp-api.workspace = true +sp-application-crypto.default-features = true +sp-application-crypto.workspace = true +sp-blockchain.default-features = true +sp-blockchain.workspace = true +sp-consensus-babe.default-features = true +sp-consensus-babe.workspace = true +sp-consensus.default-features = true +sp-consensus.workspace = true +sp-core.default-features = true +sp-core.workspace = true +sp-keystore.default-features = true +sp-keystore.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true thiserror = { workspace = true } [dev-dependencies] -sc-consensus = { workspace = true, default-features = true } -sc-transaction-pool-api = { workspace = true, default-features = true } -sp-keyring = { workspace = true, default-features = true } +sc-consensus = { default-features = true, workspace = true } +sc-transaction-pool-api = { default-features = true, workspace = true } +sp-keyring = { default-features = true, workspace = true } substrate-test-runtime-client = { workspace = true } tokio = { workspace = true, default-features = true } diff --git a/substrate/client/consensus/beefy/Cargo.toml b/substrate/client/consensus/beefy/Cargo.toml index ad43a541b00d9..42469f2b9a743 100644 --- a/substrate/client/consensus/beefy/Cargo.toml +++ b/substrate/client/consensus/beefy/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-consensus-beefy" -version = "13.0.0" +version = "30.0.0" authors.workspace = true edition.workspace = true license = "GPL-3.0-or-later WITH Classpath-exception-2.0" @@ -19,33 +19,50 @@ codec = { features = ["derive"], workspace = true, default-features = true } futures = { workspace = true } log = { workspace = true, default-features = true } parking_lot = { workspace = true, default-features = true } -prometheus-endpoint = { workspace = true, default-features = true } -sc-client-api = { workspace = true, default-features = true } -sc-consensus = { workspace = true, default-features = true } -sc-network = { workspace = true, default-features = true } -sc-network-gossip = { workspace = true, default-features = true } -sc-network-sync = { workspace = true, default-features = true } -sc-network-types = { workspace = true, default-features = true } -sc-utils = { workspace = true, default-features = true } -sp-api = { workspace = true, default-features = true } -sp-application-crypto = { workspace = true, default-features = true } -sp-arithmetic = { workspace = true, default-features = true } -sp-blockchain = { workspace = true, default-features = true } -sp-consensus = { workspace = true, default-features = true } -sp-consensus-beefy = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-keystore = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } +prometheus-endpoint.default-features = true +prometheus-endpoint.workspace = true +sc-client-api.default-features = true +sc-client-api.workspace = true +sc-consensus.default-features = true +sc-consensus.workspace = true +sc-network-gossip.default-features = true +sc-network-gossip.workspace = true +sc-network-sync.default-features = true +sc-network-sync.workspace = true +sc-network-types.default-features = true +sc-network-types.workspace = true +sc-network.default-features = true +sc-network.workspace = true +sc-utils.default-features = true +sc-utils.workspace = true +sp-api.default-features = true +sp-api.workspace = true +sp-application-crypto.default-features = true +sp-application-crypto.workspace = true +sp-arithmetic.default-features = true +sp-arithmetic.workspace = true +sp-blockchain.default-features = true +sp-blockchain.workspace = true +sp-consensus-beefy.default-features = true +sp-consensus-beefy.workspace = true +sp-consensus.default-features = true +sp-consensus.workspace = true +sp-core.default-features = true +sp-core.workspace = true +sp-keystore.default-features = true +sp-keystore.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true thiserror = { workspace = true } tokio = { workspace = true, default-features = true } wasm-timer = { workspace = true } [dev-dependencies] -sc-block-builder = { workspace = true, default-features = true } +sc-block-builder = { default-features = true, workspace = true } sc-network-test = { workspace = true } serde = { workspace = true, default-features = true } -sp-mmr-primitives = { workspace = true, default-features = true } -sp-tracing = { workspace = true, default-features = true } +sp-mmr-primitives = { default-features = true, workspace = true } +sp-tracing = { default-features = true, workspace = true } substrate-test-runtime-client = { workspace = true } [features] diff --git a/substrate/client/consensus/beefy/rpc/Cargo.toml b/substrate/client/consensus/beefy/rpc/Cargo.toml index aedbef64f2d6b..d6af0e2cf574a 100644 --- a/substrate/client/consensus/beefy/rpc/Cargo.toml +++ b/substrate/client/consensus/beefy/rpc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-consensus-beefy-rpc" -version = "13.0.0" +version = "30.0.0" authors.workspace = true edition.workspace = true license = "GPL-3.0-or-later WITH Classpath-exception-2.0" @@ -17,16 +17,22 @@ futures = { workspace = true } jsonrpsee = { features = ["client-core", "macros", "server-core"], workspace = true } log = { workspace = true, default-features = true } parking_lot = { workspace = true, default-features = true } -sc-consensus-beefy = { workspace = true, default-features = true } -sc-rpc = { workspace = true, default-features = true } +sc-consensus-beefy.default-features = true +sc-consensus-beefy.workspace = true +sc-rpc.default-features = true +sc-rpc.workspace = true serde = { features = ["derive"], workspace = true, default-features = true } -sp-application-crypto = { workspace = true, default-features = true } -sp-consensus-beefy = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } +sp-application-crypto.default-features = true +sp-application-crypto.workspace = true +sp-consensus-beefy.default-features = true +sp-consensus-beefy.workspace = true +sp-core.default-features = true +sp-core.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true thiserror = { workspace = true } [dev-dependencies] -sc-rpc = { features = ["test-helpers"], workspace = true, default-features = true } +sc-rpc = { features = ["test-helpers"], default-features = true, workspace = true } substrate-test-runtime-client = { workspace = true } tokio = { features = ["macros"], workspace = true, default-features = true } diff --git a/substrate/client/consensus/common/Cargo.toml b/substrate/client/consensus/common/Cargo.toml index d860dc332e46b..33e2d6cfebe43 100644 --- a/substrate/client/consensus/common/Cargo.toml +++ b/substrate/client/consensus/common/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-consensus" -version = "0.33.0" +version = "0.50.0" authors.workspace = true edition.workspace = true license = "GPL-3.0-or-later WITH Classpath-exception-2.0" @@ -21,16 +21,25 @@ futures = { features = ["thread-pool"], workspace = true } log = { workspace = true, default-features = true } mockall = { workspace = true } parking_lot = { workspace = true, default-features = true } -prometheus-endpoint = { workspace = true, default-features = true } -sc-client-api = { workspace = true, default-features = true } -sc-network-types = { workspace = true, default-features = true } -sc-utils = { workspace = true, default-features = true } +prometheus-endpoint.default-features = true +prometheus-endpoint.workspace = true +sc-client-api.default-features = true +sc-client-api.workspace = true +sc-network-types.default-features = true +sc-network-types.workspace = true +sc-utils.default-features = true +sc-utils.workspace = true serde = { features = ["derive"], workspace = true, default-features = true } -sp-blockchain = { workspace = true, default-features = true } -sp-consensus = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } -sp-state-machine = { workspace = true, default-features = true } +sp-blockchain.default-features = true +sp-blockchain.workspace = true +sp-consensus.default-features = true +sp-consensus.workspace = true +sp-core.default-features = true +sp-core.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true +sp-state-machine.default-features = true +sp-state-machine.workspace = true thiserror = { workspace = true } [dev-dependencies] diff --git a/substrate/client/consensus/epochs/Cargo.toml b/substrate/client/consensus/epochs/Cargo.toml index c51671d6d75d8..8a9c26df08837 100644 --- a/substrate/client/consensus/epochs/Cargo.toml +++ b/substrate/client/consensus/epochs/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-consensus-epochs" -version = "0.33.0" +version = "0.50.0" authors.workspace = true description = "Generic epochs-based utilities for consensus" edition.workspace = true @@ -17,8 +17,13 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { features = ["derive"], workspace = true, default-features = true } -fork-tree = { workspace = true, default-features = true } -sc-client-api = { workspace = true, default-features = true } -sc-consensus = { workspace = true, default-features = true } -sp-blockchain = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } +fork-tree.default-features = true +fork-tree.workspace = true +sc-client-api.default-features = true +sc-client-api.workspace = true +sc-consensus.default-features = true +sc-consensus.workspace = true +sp-blockchain.default-features = true +sp-blockchain.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true diff --git a/substrate/client/consensus/grandpa/Cargo.toml b/substrate/client/consensus/grandpa/Cargo.toml index a5c1f0c819cdc..700aa9424da5f 100644 --- a/substrate/client/consensus/grandpa/Cargo.toml +++ b/substrate/client/consensus/grandpa/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-consensus-grandpa" -version = "0.19.0" +version = "0.36.0" authors.workspace = true edition.workspace = true license = "GPL-3.0-or-later WITH Classpath-exception-2.0" @@ -23,44 +23,68 @@ async-trait = { workspace = true } codec = { features = ["derive"], workspace = true, default-features = true } dyn-clone = { workspace = true } finality-grandpa = { features = ["derive-codec"], workspace = true, default-features = true } -fork-tree = { workspace = true, default-features = true } +fork-tree.default-features = true +fork-tree.workspace = true futures = { workspace = true } futures-timer = { workspace = true } log = { workspace = true, default-features = true } parking_lot = { workspace = true, default-features = true } -prometheus-endpoint = { workspace = true, default-features = true } +prometheus-endpoint.default-features = true +prometheus-endpoint.workspace = true rand = { workspace = true, default-features = true } -sc-block-builder = { workspace = true, default-features = true } -sc-chain-spec = { workspace = true, default-features = true } -sc-client-api = { workspace = true, default-features = true } -sc-consensus = { workspace = true, default-features = true } -sc-network = { workspace = true, default-features = true } -sc-network-common = { workspace = true, default-features = true } -sc-network-gossip = { workspace = true, default-features = true } -sc-network-sync = { workspace = true, default-features = true } -sc-network-types = { workspace = true, default-features = true } -sc-telemetry = { workspace = true, default-features = true } -sc-transaction-pool-api = { workspace = true, default-features = true } -sc-utils = { workspace = true, default-features = true } +sc-block-builder.default-features = true +sc-block-builder.workspace = true +sc-chain-spec.default-features = true +sc-chain-spec.workspace = true +sc-client-api.default-features = true +sc-client-api.workspace = true +sc-consensus.default-features = true +sc-consensus.workspace = true +sc-network-common.default-features = true +sc-network-common.workspace = true +sc-network-gossip.default-features = true +sc-network-gossip.workspace = true +sc-network-sync.default-features = true +sc-network-sync.workspace = true +sc-network-types.default-features = true +sc-network-types.workspace = true +sc-network.default-features = true +sc-network.workspace = true +sc-telemetry.default-features = true +sc-telemetry.workspace = true +sc-transaction-pool-api.default-features = true +sc-transaction-pool-api.workspace = true +sc-utils.default-features = true +sc-utils.workspace = true serde_json = { workspace = true, default-features = true } -sp-api = { workspace = true, default-features = true } -sp-application-crypto = { workspace = true, default-features = true } -sp-arithmetic = { workspace = true, default-features = true } -sp-blockchain = { workspace = true, default-features = true } -sp-consensus = { workspace = true, default-features = true } -sp-consensus-grandpa = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-crypto-hashing = { workspace = true, default-features = true } -sp-keystore = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } +sp-api.default-features = true +sp-api.workspace = true +sp-application-crypto.default-features = true +sp-application-crypto.workspace = true +sp-arithmetic.default-features = true +sp-arithmetic.workspace = true +sp-blockchain.default-features = true +sp-blockchain.workspace = true +sp-consensus-grandpa.default-features = true +sp-consensus-grandpa.workspace = true +sp-consensus.default-features = true +sp-consensus.workspace = true +sp-core.default-features = true +sp-core.workspace = true +sp-crypto-hashing.default-features = true +sp-crypto-hashing.workspace = true +sp-keystore.default-features = true +sp-keystore.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true thiserror = { workspace = true } [dev-dependencies] assert_matches = { workspace = true } finality-grandpa = { features = ["derive-codec", "test-helpers"], workspace = true, default-features = true } -sc-network = { workspace = true, default-features = true } +sc-network = { default-features = true, workspace = true } sc-network-test = { workspace = true } -sp-keyring = { workspace = true, default-features = true } -sp-tracing = { workspace = true, default-features = true } +sp-keyring = { default-features = true, workspace = true } +sp-tracing = { default-features = true, workspace = true } substrate-test-runtime-client = { workspace = true } tokio = { workspace = true, default-features = true } diff --git a/substrate/client/consensus/grandpa/rpc/Cargo.toml b/substrate/client/consensus/grandpa/rpc/Cargo.toml index 1fb8bd9367c4f..06d7fdbb18527 100644 --- a/substrate/client/consensus/grandpa/rpc/Cargo.toml +++ b/substrate/client/consensus/grandpa/rpc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-consensus-grandpa-rpc" -version = "0.19.0" +version = "0.36.0" authors.workspace = true description = "RPC extensions for the GRANDPA finality gadget" repository.workspace = true @@ -18,20 +18,26 @@ finality-grandpa = { features = ["derive-codec"], workspace = true, default-feat futures = { workspace = true } jsonrpsee = { features = ["client-core", "macros", "server-core"], workspace = true } log = { workspace = true, default-features = true } -sc-client-api = { workspace = true, default-features = true } -sc-consensus-grandpa = { workspace = true, default-features = true } -sc-rpc = { workspace = true, default-features = true } +sc-client-api.default-features = true +sc-client-api.workspace = true +sc-consensus-grandpa.default-features = true +sc-consensus-grandpa.workspace = true +sc-rpc.default-features = true +sc-rpc.workspace = true serde = { features = ["derive"], workspace = true, default-features = true } -sp-blockchain = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } +sp-blockchain.default-features = true +sp-blockchain.workspace = true +sp-core.default-features = true +sp-core.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true thiserror = { workspace = true } [dev-dependencies] -sc-block-builder = { workspace = true, default-features = true } -sc-rpc = { features = ["test-helpers"], workspace = true, default-features = true } -sp-consensus-grandpa = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-keyring = { workspace = true, default-features = true } +sc-block-builder = { default-features = true, workspace = true } +sc-rpc = { features = ["test-helpers"], default-features = true, workspace = true } +sp-consensus-grandpa = { default-features = true, workspace = true } +sp-core = { default-features = true, workspace = true } +sp-keyring = { default-features = true, workspace = true } substrate-test-runtime-client = { workspace = true } tokio = { features = ["macros"], workspace = true, default-features = true } diff --git a/substrate/client/consensus/manual-seal/Cargo.toml b/substrate/client/consensus/manual-seal/Cargo.toml index 4d232f7256cb7..9279f57d7ac93 100644 --- a/substrate/client/consensus/manual-seal/Cargo.toml +++ b/substrate/client/consensus/manual-seal/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-consensus-manual-seal" -version = "0.35.0" +version = "0.52.0" authors.workspace = true description = "Manual sealing engine for Substrate" edition.workspace = true @@ -23,30 +23,49 @@ futures = { workspace = true } futures-timer = { workspace = true } jsonrpsee = { features = ["client-core", "macros", "server-core"], workspace = true } log = { workspace = true, default-features = true } -prometheus-endpoint = { workspace = true, default-features = true } -sc-client-api = { workspace = true, default-features = true } -sc-consensus = { workspace = true, default-features = true } -sc-consensus-aura = { workspace = true, default-features = true } -sc-consensus-babe = { workspace = true, default-features = true } -sc-consensus-epochs = { workspace = true, default-features = true } -sc-transaction-pool = { workspace = true, default-features = true } -sc-transaction-pool-api = { workspace = true, default-features = true } +prometheus-endpoint.default-features = true +prometheus-endpoint.workspace = true +sc-client-api.default-features = true +sc-client-api.workspace = true +sc-consensus-aura.default-features = true +sc-consensus-aura.workspace = true +sc-consensus-babe.default-features = true +sc-consensus-babe.workspace = true +sc-consensus-epochs.default-features = true +sc-consensus-epochs.workspace = true +sc-consensus.default-features = true +sc-consensus.workspace = true +sc-transaction-pool-api.default-features = true +sc-transaction-pool-api.workspace = true +sc-transaction-pool.default-features = true +sc-transaction-pool.workspace = true serde = { features = ["derive"], workspace = true, default-features = true } -sp-api = { workspace = true, default-features = true } -sp-blockchain = { workspace = true, default-features = true } -sp-consensus = { workspace = true, default-features = true } -sp-consensus-aura = { workspace = true, default-features = true } -sp-consensus-babe = { workspace = true, default-features = true } -sp-consensus-slots = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-inherents = { workspace = true, default-features = true } -sp-keystore = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } -sp-timestamp = { workspace = true, default-features = true } +sp-api.default-features = true +sp-api.workspace = true +sp-blockchain.default-features = true +sp-blockchain.workspace = true +sp-consensus-aura.default-features = true +sp-consensus-aura.workspace = true +sp-consensus-babe.default-features = true +sp-consensus-babe.workspace = true +sp-consensus-slots.default-features = true +sp-consensus-slots.workspace = true +sp-consensus.default-features = true +sp-consensus.workspace = true +sp-core.default-features = true +sp-core.workspace = true +sp-inherents.default-features = true +sp-inherents.workspace = true +sp-keystore.default-features = true +sp-keystore.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true +sp-timestamp.default-features = true +sp-timestamp.workspace = true thiserror = { workspace = true } [dev-dependencies] -sc-basic-authorship = { workspace = true, default-features = true } +sc-basic-authorship = { default-features = true, workspace = true } substrate-test-runtime-client = { workspace = true } substrate-test-runtime-transaction-pool = { workspace = true } tokio = { features = ["macros", "rt-multi-thread"], workspace = true, default-features = true } diff --git a/substrate/client/consensus/pow/Cargo.toml b/substrate/client/consensus/pow/Cargo.toml index a051bf3f47794..33e04c3c1f6a2 100644 --- a/substrate/client/consensus/pow/Cargo.toml +++ b/substrate/client/consensus/pow/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-consensus-pow" -version = "0.33.0" +version = "0.50.0" authors.workspace = true description = "PoW consensus algorithm for substrate" edition.workspace = true @@ -22,15 +22,26 @@ futures = { workspace = true } futures-timer = { workspace = true } log = { workspace = true, default-features = true } parking_lot = { workspace = true, default-features = true } -prometheus-endpoint = { workspace = true, default-features = true } -sc-client-api = { workspace = true, default-features = true } -sc-consensus = { workspace = true, default-features = true } -sp-api = { workspace = true, default-features = true } -sp-block-builder = { workspace = true, default-features = true } -sp-blockchain = { workspace = true, default-features = true } -sp-consensus = { workspace = true, default-features = true } -sp-consensus-pow = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-inherents = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } +prometheus-endpoint.default-features = true +prometheus-endpoint.workspace = true +sc-client-api.default-features = true +sc-client-api.workspace = true +sc-consensus.default-features = true +sc-consensus.workspace = true +sp-api.default-features = true +sp-api.workspace = true +sp-block-builder.default-features = true +sp-block-builder.workspace = true +sp-blockchain.default-features = true +sp-blockchain.workspace = true +sp-consensus-pow.default-features = true +sp-consensus-pow.workspace = true +sp-consensus.default-features = true +sp-consensus.workspace = true +sp-core.default-features = true +sp-core.workspace = true +sp-inherents.default-features = true +sp-inherents.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true thiserror = { workspace = true } diff --git a/substrate/client/consensus/slots/Cargo.toml b/substrate/client/consensus/slots/Cargo.toml index cc39575efe828..d9f6a371b683e 100644 --- a/substrate/client/consensus/slots/Cargo.toml +++ b/substrate/client/consensus/slots/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-consensus-slots" -version = "0.33.0" +version = "0.50.0" authors.workspace = true description = "Generic slots-based utilities for consensus" edition.workspace = true @@ -22,17 +22,28 @@ codec = { workspace = true, default-features = true } futures = { workspace = true } futures-timer = { workspace = true } log = { workspace = true, default-features = true } -sc-client-api = { workspace = true, default-features = true } -sc-consensus = { workspace = true, default-features = true } -sc-telemetry = { workspace = true, default-features = true } -sp-arithmetic = { workspace = true, default-features = true } -sp-blockchain = { workspace = true, default-features = true } -sp-consensus = { workspace = true, default-features = true } -sp-consensus-slots = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-inherents = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } -sp-state-machine = { workspace = true, default-features = true } +sc-client-api.default-features = true +sc-client-api.workspace = true +sc-consensus.default-features = true +sc-consensus.workspace = true +sc-telemetry.default-features = true +sc-telemetry.workspace = true +sp-arithmetic.default-features = true +sp-arithmetic.workspace = true +sp-blockchain.default-features = true +sp-blockchain.workspace = true +sp-consensus-slots.default-features = true +sp-consensus-slots.workspace = true +sp-consensus.default-features = true +sp-consensus.workspace = true +sp-core.default-features = true +sp-core.workspace = true +sp-inherents.default-features = true +sp-inherents.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true +sp-state-machine.default-features = true +sp-state-machine.workspace = true [dev-dependencies] substrate-test-runtime-client = { workspace = true } diff --git a/substrate/client/db/Cargo.toml b/substrate/client/db/Cargo.toml index 4c7296032f2b9..ef0f62886aca8 100644 --- a/substrate/client/db/Cargo.toml +++ b/substrate/client/db/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-client-db" -version = "0.35.0" +version = "0.47.0" authors.workspace = true edition.workspace = true license = "GPL-3.0-or-later WITH Classpath-exception-2.0" @@ -32,17 +32,27 @@ linked-hash-map = { workspace = true } log = { workspace = true, default-features = true } parity-db = { workspace = true } parking_lot = { workspace = true, default-features = true } -prometheus-endpoint = { workspace = true, default-features = true } -sc-client-api = { workspace = true, default-features = true } -sc-state-db = { workspace = true, default-features = true } +prometheus-endpoint.default-features = true +prometheus-endpoint.workspace = true +sc-client-api.default-features = true +sc-client-api.workspace = true +sc-state-db.default-features = true +sc-state-db.workspace = true schnellru = { workspace = true } -sp-arithmetic = { workspace = true, default-features = true } -sp-blockchain = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-database = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } -sp-state-machine = { workspace = true, default-features = true } -sp-trie = { workspace = true, default-features = true } +sp-arithmetic.default-features = true +sp-arithmetic.workspace = true +sp-blockchain.default-features = true +sp-blockchain.workspace = true +sp-core.default-features = true +sp-core.workspace = true +sp-database.default-features = true +sp-database.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true +sp-state-machine.default-features = true +sp-state-machine.workspace = true +sp-trie.default-features = true +sp-trie.workspace = true sysinfo = { workspace = true } [dev-dependencies] @@ -51,7 +61,7 @@ criterion = { workspace = true, default-features = true } kitchensink-runtime = { workspace = true } kvdb-rocksdb = { workspace = true } rand = { workspace = true, default-features = true } -sp-tracing = { workspace = true, default-features = true } +sp-tracing = { default-features = true, workspace = true } substrate-test-runtime-client = { workspace = true } tempfile = { workspace = true } diff --git a/substrate/client/executor/Cargo.toml b/substrate/client/executor/Cargo.toml index 0299c4630d931..04132bbdeac85 100644 --- a/substrate/client/executor/Cargo.toml +++ b/substrate/client/executor/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-executor" -version = "0.32.0" +version = "0.43.0" authors.workspace = true edition.workspace = true license = "GPL-3.0-or-later WITH Classpath-exception-2.0" @@ -26,18 +26,30 @@ schnellru = { workspace = true } tracing = { workspace = true, default-features = true } codec = { workspace = true, default-features = true } -sc-executor-common = { workspace = true, default-features = true } -sc-executor-polkavm = { workspace = true, default-features = true } -sc-executor-wasmtime = { workspace = true, default-features = true } -sp-api = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-externalities = { workspace = true, default-features = true } -sp-io = { workspace = true, default-features = true } -sp-panic-handler = { workspace = true, default-features = true } -sp-runtime-interface = { workspace = true, default-features = true } -sp-trie = { workspace = true, default-features = true } -sp-version = { workspace = true, default-features = true } -sp-wasm-interface = { workspace = true, default-features = true } +sc-executor-common.default-features = true +sc-executor-common.workspace = true +sc-executor-polkavm.default-features = true +sc-executor-polkavm.workspace = true +sc-executor-wasmtime.default-features = true +sc-executor-wasmtime.workspace = true +sp-api.default-features = true +sp-api.workspace = true +sp-core.default-features = true +sp-core.workspace = true +sp-externalities.default-features = true +sp-externalities.workspace = true +sp-io.default-features = true +sp-io.workspace = true +sp-panic-handler.default-features = true +sp-panic-handler.workspace = true +sp-runtime-interface.default-features = true +sp-runtime-interface.workspace = true +sp-trie.default-features = true +sp-trie.workspace = true +sp-version.default-features = true +sp-version.workspace = true +sp-wasm-interface.default-features = true +sp-wasm-interface.workspace = true [dev-dependencies] array-bytes = { workspace = true, default-features = true } @@ -46,12 +58,12 @@ criterion = { workspace = true, default-features = true } num_cpus = { workspace = true } paste = { workspace = true, default-features = true } sc-runtime-test = { workspace = true } -sc-tracing = { workspace = true, default-features = true } -sp-crypto-hashing = { workspace = true, default-features = true } -sp-maybe-compressed-blob = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } -sp-state-machine = { workspace = true, default-features = true } -sp-tracing = { workspace = true, default-features = true } +sc-tracing = { default-features = true, workspace = true } +sp-crypto-hashing = { default-features = true, workspace = true } +sp-maybe-compressed-blob = { default-features = true, workspace = true } +sp-runtime = { default-features = true, workspace = true } +sp-state-machine = { default-features = true, workspace = true } +sp-tracing = { default-features = true, workspace = true } substrate-test-runtime = { workspace = true } tempfile = { workspace = true } tracing-subscriber = { workspace = true } @@ -61,18 +73,13 @@ wat = { workspace = true } default = ["std"] # This crate does not have `no_std` support, we just require this for tests std = [ - "sc-runtime-test/std", "sp-api/std", "sp-core/std", "sp-externalities/std", "sp-io/std", "sp-runtime-interface/std", - "sp-runtime/std", - "sp-state-machine/std", - "sp-tracing/std", "sp-trie/std", "sp-version/std", "sp-wasm-interface/std", - "substrate-test-runtime/std", ] wasm-extern-trace = [] diff --git a/substrate/client/executor/common/Cargo.toml b/substrate/client/executor/common/Cargo.toml index aaf13a8ae7688..b6776ba2a98b6 100644 --- a/substrate/client/executor/common/Cargo.toml +++ b/substrate/client/executor/common/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-executor-common" -version = "0.29.0" +version = "0.39.0" authors.workspace = true edition.workspace = true license = "GPL-3.0-or-later WITH Classpath-exception-2.0" @@ -18,9 +18,12 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] polkavm = { workspace = true } -sc-allocator = { workspace = true, default-features = true } -sp-maybe-compressed-blob = { workspace = true, default-features = true } -sp-wasm-interface = { workspace = true, default-features = true } +sc-allocator.default-features = true +sc-allocator.workspace = true +sp-maybe-compressed-blob.default-features = true +sp-maybe-compressed-blob.workspace = true +sp-wasm-interface.default-features = true +sp-wasm-interface.workspace = true thiserror = { workspace = true } wasm-instrument = { workspace = true, default-features = true } diff --git a/substrate/client/executor/polkavm/Cargo.toml b/substrate/client/executor/polkavm/Cargo.toml index 941c830ba16a2..0f53ec5e3c9b8 100644 --- a/substrate/client/executor/polkavm/Cargo.toml +++ b/substrate/client/executor/polkavm/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-executor-polkavm" -version = "0.29.0" +version = "0.36.0" authors.workspace = true edition.workspace = true license = "GPL-3.0-or-later WITH Classpath-exception-2.0" @@ -18,6 +18,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] log = { workspace = true } polkavm = { workspace = true } - -sc-executor-common = { workspace = true, default-features = true } -sp-wasm-interface = { workspace = true, default-features = true } +sc-executor-common.default-features = true +sc-executor-common.workspace = true +sp-wasm-interface.default-features = true +sp-wasm-interface.workspace = true diff --git a/substrate/client/executor/runtime-test/Cargo.toml b/substrate/client/executor/runtime-test/Cargo.toml index 5ab92cbb9332d..4e22eae7270fc 100644 --- a/substrate/client/executor/runtime-test/Cargo.toml +++ b/substrate/client/executor/runtime-test/Cargo.toml @@ -16,10 +16,10 @@ workspace = true targets = ["x86_64-unknown-linux-gnu"] [dependencies] -sp-core = { workspace = true } +sp-core.workspace = true sp-io = { features = ["improved_panic_error_reporting"], workspace = true } -sp-runtime = { workspace = true } -sp-runtime-interface = { workspace = true } +sp-runtime-interface.workspace = true +sp-runtime.workspace = true [build-dependencies] substrate-wasm-builder = { optional = true, workspace = true, default-features = true } diff --git a/substrate/client/executor/wasmtime/Cargo.toml b/substrate/client/executor/wasmtime/Cargo.toml index 410a5a363adff..34b5fcad00b51 100644 --- a/substrate/client/executor/wasmtime/Cargo.toml +++ b/substrate/client/executor/wasmtime/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-executor-wasmtime" -version = "0.29.0" +version = "0.39.0" authors.workspace = true edition.workspace = true license = "GPL-3.0-or-later WITH Classpath-exception-2.0" @@ -22,9 +22,12 @@ parking_lot = { workspace = true, default-features = true } # When bumping wasmtime do not forget to also bump rustix # to exactly the same version as used by wasmtime! anyhow = { workspace = true } -sc-allocator = { workspace = true, default-features = true } -sc-executor-common = { workspace = true, default-features = true } -sp-runtime-interface = { workspace = true, default-features = true } +sc-allocator.default-features = true +sc-allocator.workspace = true +sc-executor-common.default-features = true +sc-executor-common.workspace = true +sp-runtime-interface.default-features = true +sp-runtime-interface.workspace = true sp-wasm-interface = { features = ["wasmtime"], workspace = true, default-features = true } wasmtime = { features = [ "cache", @@ -47,6 +50,6 @@ cargo_metadata = { workspace = true } codec = { workspace = true, default-features = true } paste = { workspace = true, default-features = true } sc-runtime-test = { workspace = true } -sp-io = { workspace = true, default-features = true } +sp-io = { default-features = true, workspace = true } tempfile = { workspace = true } wat = { workspace = true } diff --git a/substrate/client/informant/Cargo.toml b/substrate/client/informant/Cargo.toml index 641fc8a72d0d9..121dfb9b13edb 100644 --- a/substrate/client/informant/Cargo.toml +++ b/substrate/client/informant/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-informant" -version = "0.33.0" +version = "0.50.0" authors.workspace = true description = "Substrate informant." edition.workspace = true @@ -20,8 +20,13 @@ console = { workspace = true } futures = { workspace = true } futures-timer = { workspace = true } log = { workspace = true, default-features = true } -sc-client-api = { workspace = true, default-features = true } -sc-network = { workspace = true, default-features = true } -sc-network-sync = { workspace = true, default-features = true } -sp-blockchain = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } +sc-client-api.default-features = true +sc-client-api.workspace = true +sc-network-sync.default-features = true +sc-network-sync.workspace = true +sc-network.default-features = true +sc-network.workspace = true +sp-blockchain.default-features = true +sp-blockchain.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true diff --git a/substrate/client/keystore/Cargo.toml b/substrate/client/keystore/Cargo.toml index 8a5fa29c5485d..c88e07a328106 100644 --- a/substrate/client/keystore/Cargo.toml +++ b/substrate/client/keystore/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-keystore" -version = "25.0.0" +version = "36.0.0" authors.workspace = true edition.workspace = true license = "GPL-3.0-or-later WITH Classpath-exception-2.0" @@ -20,9 +20,12 @@ targets = ["x86_64-unknown-linux-gnu"] array-bytes = { workspace = true, default-features = true } parking_lot = { workspace = true, default-features = true } serde_json = { workspace = true, default-features = true } -sp-application-crypto = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-keystore = { workspace = true, default-features = true } +sp-application-crypto.default-features = true +sp-application-crypto.workspace = true +sp-core.default-features = true +sp-core.workspace = true +sp-keystore.default-features = true +sp-keystore.workspace = true thiserror = { workspace = true } [dev-dependencies] diff --git a/substrate/client/merkle-mountain-range/Cargo.toml b/substrate/client/merkle-mountain-range/Cargo.toml index 7849eac5f5167..726668c197115 100644 --- a/substrate/client/merkle-mountain-range/Cargo.toml +++ b/substrate/client/merkle-mountain-range/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "mmr-gadget" -version = "29.0.0" +version = "46.0.0" authors.workspace = true edition.workspace = true license = "GPL-3.0-or-later WITH Classpath-exception-2.0" @@ -17,19 +17,28 @@ workspace = true codec = { workspace = true, default-features = true } futures = { workspace = true } log = { workspace = true, default-features = true } -sc-client-api = { workspace = true, default-features = true } -sc-offchain = { workspace = true, default-features = true } -sp-api = { workspace = true, default-features = true } -sp-blockchain = { workspace = true, default-features = true } -sp-consensus = { workspace = true, default-features = true } -sp-consensus-beefy = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-mmr-primitives = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } +sc-client-api.default-features = true +sc-client-api.workspace = true +sc-offchain.default-features = true +sc-offchain.workspace = true +sp-api.default-features = true +sp-api.workspace = true +sp-blockchain.default-features = true +sp-blockchain.workspace = true +sp-consensus-beefy.default-features = true +sp-consensus-beefy.workspace = true +sp-consensus.default-features = true +sp-consensus.workspace = true +sp-core.default-features = true +sp-core.workspace = true +sp-mmr-primitives.default-features = true +sp-mmr-primitives.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true [dev-dependencies] parking_lot = { workspace = true, default-features = true } -sc-block-builder = { workspace = true, default-features = true } -sp-tracing = { workspace = true, default-features = true } +sc-block-builder = { default-features = true, workspace = true } +sp-tracing = { default-features = true, workspace = true } substrate-test-runtime-client = { workspace = true } tokio = { workspace = true, default-features = true } diff --git a/substrate/client/merkle-mountain-range/rpc/Cargo.toml b/substrate/client/merkle-mountain-range/rpc/Cargo.toml index c2b29aca46016..a0e1f8b704962 100644 --- a/substrate/client/merkle-mountain-range/rpc/Cargo.toml +++ b/substrate/client/merkle-mountain-range/rpc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "mmr-rpc" -version = "28.0.0" +version = "41.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -18,11 +18,16 @@ targets = ["x86_64-unknown-linux-gnu"] codec = { workspace = true, default-features = true } jsonrpsee = { features = ["client-core", "macros", "server-core"], workspace = true } serde = { features = ["derive"], workspace = true, default-features = true } -sp-api = { workspace = true, default-features = true } -sp-blockchain = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-mmr-primitives = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } +sp-api.default-features = true +sp-api.workspace = true +sp-blockchain.default-features = true +sp-blockchain.workspace = true +sp-core.default-features = true +sp-core.workspace = true +sp-mmr-primitives.default-features = true +sp-mmr-primitives.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true [dev-dependencies] serde_json = { workspace = true, default-features = true } diff --git a/substrate/client/mixnet/Cargo.toml b/substrate/client/mixnet/Cargo.toml index 0ac407a173495..bccc0658dfe2d 100644 --- a/substrate/client/mixnet/Cargo.toml +++ b/substrate/client/mixnet/Cargo.toml @@ -1,7 +1,7 @@ [package] description = "Substrate mixnet service" name = "sc-mixnet" -version = "0.4.0" +version = "0.21.0" license = "GPL-3.0-or-later WITH Classpath-exception-2.0" authors = ["Parity Technologies "] edition.workspace = true @@ -26,14 +26,24 @@ futures-timer = { workspace = true } log = { workspace = true, default-features = true } mixnet = { workspace = true } parking_lot = { workspace = true, default-features = true } -sc-client-api = { workspace = true, default-features = true } -sc-network = { workspace = true, default-features = true } -sc-network-types = { workspace = true, default-features = true } -sc-transaction-pool-api = { workspace = true, default-features = true } -sp-api = { workspace = true, default-features = true } -sp-consensus = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-keystore = { workspace = true, default-features = true } -sp-mixnet = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } +sc-client-api.default-features = true +sc-client-api.workspace = true +sc-network-types.default-features = true +sc-network-types.workspace = true +sc-network.default-features = true +sc-network.workspace = true +sc-transaction-pool-api.default-features = true +sc-transaction-pool-api.workspace = true +sp-api.default-features = true +sp-api.workspace = true +sp-consensus.default-features = true +sp-consensus.workspace = true +sp-core.default-features = true +sp-core.workspace = true +sp-keystore.default-features = true +sp-keystore.workspace = true +sp-mixnet.default-features = true +sp-mixnet.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true thiserror = { workspace = true } diff --git a/substrate/client/network-gossip/Cargo.toml b/substrate/client/network-gossip/Cargo.toml index ea52913aea160..11c1c0ba18fae 100644 --- a/substrate/client/network-gossip/Cargo.toml +++ b/substrate/client/network-gossip/Cargo.toml @@ -1,7 +1,7 @@ [package] description = "Gossiping for the Substrate network protocol" name = "sc-network-gossip" -version = "0.34.0" +version = "0.51.0" license = "GPL-3.0-or-later WITH Classpath-exception-2.0" authors.workspace = true edition.workspace = true @@ -21,13 +21,19 @@ ahash = { workspace = true } futures = { workspace = true } futures-timer = { workspace = true } log = { workspace = true, default-features = true } -prometheus-endpoint = { workspace = true, default-features = true } -sc-network = { workspace = true, default-features = true } -sc-network-common = { workspace = true, default-features = true } -sc-network-sync = { workspace = true, default-features = true } -sc-network-types = { workspace = true, default-features = true } +prometheus-endpoint.default-features = true +prometheus-endpoint.workspace = true +sc-network-common.default-features = true +sc-network-common.workspace = true +sc-network-sync.default-features = true +sc-network-sync.workspace = true +sc-network-types.default-features = true +sc-network-types.workspace = true +sc-network.default-features = true +sc-network.workspace = true schnellru = { workspace = true } -sp-runtime = { workspace = true, default-features = true } +sp-runtime.default-features = true +sp-runtime.workspace = true tracing = { workspace = true, default-features = true } [dev-dependencies] diff --git a/substrate/client/network/Cargo.toml b/substrate/client/network/Cargo.toml index 9a34847ea6385..8f63a050abdb2 100644 --- a/substrate/client/network/Cargo.toml +++ b/substrate/client/network/Cargo.toml @@ -1,7 +1,7 @@ [package] description = "Substrate network protocol" name = "sc-network" -version = "0.34.0" +version = "0.51.0" license = "GPL-3.0-or-later WITH Classpath-exception-2.0" authors.workspace = true edition.workspace = true @@ -45,21 +45,30 @@ mockall = { workspace = true } parking_lot = { workspace = true, default-features = true } partial_sort = { workspace = true } pin-project = { workspace = true } -prometheus-endpoint = { workspace = true, default-features = true } +prometheus-endpoint.default-features = true +prometheus-endpoint.workspace = true prost = { workspace = true } rand = { workspace = true, default-features = true } -sc-client-api = { workspace = true, default-features = true } -sc-network-common = { workspace = true, default-features = true } -sc-network-types = { workspace = true, default-features = true } -sc-utils = { workspace = true, default-features = true } +sc-client-api.default-features = true +sc-client-api.workspace = true +sc-network-common.default-features = true +sc-network-common.workspace = true +sc-network-types.default-features = true +sc-network-types.workspace = true +sc-utils.default-features = true +sc-utils.workspace = true schnellru = { workspace = true } serde = { features = ["derive"], workspace = true, default-features = true } serde_json = { workspace = true, default-features = true } smallvec = { workspace = true, default-features = true } -sp-arithmetic = { workspace = true, default-features = true } -sp-blockchain = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } +sp-arithmetic.default-features = true +sp-arithmetic.workspace = true +sp-blockchain.default-features = true +sp-blockchain.workspace = true +sp-core.default-features = true +sp-core.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true thiserror = { workspace = true } tokio = { features = ["macros", "sync"], workspace = true, default-features = true } tokio-stream = { workspace = true } @@ -73,10 +82,10 @@ assert_matches = { workspace = true } mockall = { workspace = true } multistream-select = { workspace = true } rand = { workspace = true, default-features = true } -sc-block-builder = { workspace = true, default-features = true } -sp-consensus = { workspace = true, default-features = true } -sp-crypto-hashing = { workspace = true, default-features = true } -sp-tracing = { workspace = true, default-features = true } +sc-block-builder = { default-features = true, workspace = true } +sp-consensus = { default-features = true, workspace = true } +sp-crypto-hashing = { default-features = true, workspace = true } +sp-tracing = { default-features = true, workspace = true } substrate-test-runtime = { workspace = true } substrate-test-runtime-client = { workspace = true } tempfile = { workspace = true } diff --git a/substrate/client/network/common/Cargo.toml b/substrate/client/network/common/Cargo.toml index d4ad8f6c67963..151ba2a0866b7 100644 --- a/substrate/client/network/common/Cargo.toml +++ b/substrate/client/network/common/Cargo.toml @@ -1,7 +1,7 @@ [package] description = "Substrate network common" name = "sc-network-common" -version = "0.33.0" +version = "0.49.0" license = "GPL-3.0-or-later WITH Classpath-exception-2.0" authors.workspace = true edition.workspace = true @@ -18,4 +18,5 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] bitflags = { workspace = true } codec = { features = ["derive"], workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } +sp-runtime.default-features = true +sp-runtime.workspace = true diff --git a/substrate/client/network/light/Cargo.toml b/substrate/client/network/light/Cargo.toml index fb8012372281c..1259681ebc836 100644 --- a/substrate/client/network/light/Cargo.toml +++ b/substrate/client/network/light/Cargo.toml @@ -1,7 +1,7 @@ [package] description = "Substrate light network protocol" name = "sc-network-light" -version = "0.33.0" +version = "0.50.0" license = "GPL-3.0-or-later WITH Classpath-exception-2.0" authors.workspace = true edition.workspace = true @@ -22,12 +22,18 @@ codec = { features = ["derive"], workspace = true, default-features = true } futures = { workspace = true } log = { workspace = true, default-features = true } prost = { workspace = true } -sc-client-api = { workspace = true, default-features = true } -sc-network = { workspace = true, default-features = true } -sc-network-types = { workspace = true, default-features = true } -sp-blockchain = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } +sc-client-api.default-features = true +sc-client-api.workspace = true +sc-network-types.default-features = true +sc-network-types.workspace = true +sc-network.default-features = true +sc-network.workspace = true +sp-blockchain.default-features = true +sp-blockchain.workspace = true +sp-core.default-features = true +sp-core.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true thiserror = { workspace = true } [build-dependencies] diff --git a/substrate/client/network/statement/Cargo.toml b/substrate/client/network/statement/Cargo.toml index dd3a8bef8a2f6..448c4aa561697 100644 --- a/substrate/client/network/statement/Cargo.toml +++ b/substrate/client/network/statement/Cargo.toml @@ -1,7 +1,7 @@ [package] description = "Substrate statement protocol" name = "sc-network-statement" -version = "0.16.0" +version = "0.33.0" license = "GPL-3.0-or-later WITH Classpath-exception-2.0" authors.workspace = true edition.workspace = true @@ -21,11 +21,19 @@ async-channel = { workspace = true } codec = { features = ["derive"], workspace = true, default-features = true } futures = { workspace = true } log = { workspace = true, default-features = true } -prometheus-endpoint = { workspace = true, default-features = true } -sc-network = { workspace = true, default-features = true } -sc-network-common = { workspace = true, default-features = true } -sc-network-sync = { workspace = true, default-features = true } -sc-network-types = { workspace = true, default-features = true } -sp-consensus = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } -sp-statement-store = { workspace = true, default-features = true } +prometheus-endpoint.default-features = true +prometheus-endpoint.workspace = true +sc-network-common.default-features = true +sc-network-common.workspace = true +sc-network-sync.default-features = true +sc-network-sync.workspace = true +sc-network-types.default-features = true +sc-network-types.workspace = true +sc-network.default-features = true +sc-network.workspace = true +sp-consensus.default-features = true +sp-consensus.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true +sp-statement-store.default-features = true +sp-statement-store.workspace = true diff --git a/substrate/client/network/sync/Cargo.toml b/substrate/client/network/sync/Cargo.toml index a574d42d2bb7f..be1d6ca7ef572 100644 --- a/substrate/client/network/sync/Cargo.toml +++ b/substrate/client/network/sync/Cargo.toml @@ -1,7 +1,7 @@ [package] description = "Substrate sync network protocol" name = "sc-network-sync" -version = "0.33.0" +version = "0.50.0" license = "GPL-3.0-or-later WITH Classpath-exception-2.0" authors.workspace = true edition.workspace = true @@ -20,26 +20,40 @@ array-bytes = { workspace = true, default-features = true } async-channel = { workspace = true } async-trait = { workspace = true } codec = { features = ["derive"], workspace = true, default-features = true } -fork-tree = { workspace = true, default-features = true } +fork-tree.default-features = true +fork-tree.workspace = true futures = { workspace = true } log = { workspace = true, default-features = true } mockall = { workspace = true } -prometheus-endpoint = { workspace = true, default-features = true } +prometheus-endpoint.default-features = true +prometheus-endpoint.workspace = true prost = { workspace = true } -sc-client-api = { workspace = true, default-features = true } -sc-consensus = { workspace = true, default-features = true } -sc-network = { workspace = true, default-features = true } -sc-network-common = { workspace = true, default-features = true } -sc-network-types = { workspace = true, default-features = true } -sc-utils = { workspace = true, default-features = true } +sc-client-api.default-features = true +sc-client-api.workspace = true +sc-consensus.default-features = true +sc-consensus.workspace = true +sc-network-common.default-features = true +sc-network-common.workspace = true +sc-network-types.default-features = true +sc-network-types.workspace = true +sc-network.default-features = true +sc-network.workspace = true +sc-utils.default-features = true +sc-utils.workspace = true schnellru = { workspace = true } smallvec = { workspace = true, default-features = true } -sp-arithmetic = { workspace = true, default-features = true } -sp-blockchain = { workspace = true, default-features = true } -sp-consensus = { workspace = true, default-features = true } -sp-consensus-grandpa = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } +sp-arithmetic.default-features = true +sp-arithmetic.workspace = true +sp-blockchain.default-features = true +sp-blockchain.workspace = true +sp-consensus-grandpa.default-features = true +sp-consensus-grandpa.workspace = true +sp-consensus.default-features = true +sp-consensus.workspace = true +sp-core.default-features = true +sp-core.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true thiserror = { workspace = true } tokio = { features = ["macros", "time"], workspace = true, default-features = true } tokio-stream = { workspace = true } @@ -47,9 +61,9 @@ tokio-stream = { workspace = true } [dev-dependencies] mockall = { workspace = true } quickcheck = { workspace = true } -sc-block-builder = { workspace = true, default-features = true } +sc-block-builder = { default-features = true, workspace = true } sp-test-primitives = { workspace = true } -sp-tracing = { workspace = true, default-features = true } +sp-tracing = { default-features = true, workspace = true } substrate-test-runtime-client = { workspace = true } [build-dependencies] diff --git a/substrate/client/network/test/Cargo.toml b/substrate/client/network/test/Cargo.toml index c077fb78e24dd..926fbf7550724 100644 --- a/substrate/client/network/test/Cargo.toml +++ b/substrate/client/network/test/Cargo.toml @@ -24,21 +24,35 @@ libp2p = { workspace = true } log = { workspace = true, default-features = true } parking_lot = { workspace = true, default-features = true } rand = { workspace = true, default-features = true } -sc-block-builder = { workspace = true, default-features = true } -sc-client-api = { workspace = true, default-features = true } -sc-consensus = { workspace = true, default-features = true } -sc-network = { workspace = true, default-features = true } -sc-network-common = { workspace = true, default-features = true } -sc-network-light = { workspace = true, default-features = true } -sc-network-sync = { workspace = true, default-features = true } -sc-network-types = { workspace = true, default-features = true } -sc-service = { workspace = true } -sc-utils = { workspace = true, default-features = true } -sp-blockchain = { workspace = true, default-features = true } -sp-consensus = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } -sp-tracing = { workspace = true, default-features = true } -substrate-test-runtime = { workspace = true } -substrate-test-runtime-client = { workspace = true } +sc-block-builder.default-features = true +sc-block-builder.workspace = true +sc-client-api.default-features = true +sc-client-api.workspace = true +sc-consensus.default-features = true +sc-consensus.workspace = true +sc-network-common.default-features = true +sc-network-common.workspace = true +sc-network-light.default-features = true +sc-network-light.workspace = true +sc-network-sync.default-features = true +sc-network-sync.workspace = true +sc-network-types.default-features = true +sc-network-types.workspace = true +sc-network.default-features = true +sc-network.workspace = true +sc-service.workspace = true +sc-utils.default-features = true +sc-utils.workspace = true +sp-blockchain.default-features = true +sp-blockchain.workspace = true +sp-consensus.default-features = true +sp-consensus.workspace = true +sp-core.default-features = true +sp-core.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true +sp-tracing.default-features = true +sp-tracing.workspace = true +substrate-test-runtime-client.workspace = true +substrate-test-runtime.workspace = true tokio = { workspace = true, default-features = true } diff --git a/substrate/client/network/transactions/Cargo.toml b/substrate/client/network/transactions/Cargo.toml index ef9ea1c461970..76ff956dd8b8f 100644 --- a/substrate/client/network/transactions/Cargo.toml +++ b/substrate/client/network/transactions/Cargo.toml @@ -1,7 +1,7 @@ [package] description = "Substrate transaction protocol" name = "sc-network-transactions" -version = "0.33.0" +version = "0.50.0" license = "GPL-3.0-or-later WITH Classpath-exception-2.0" authors.workspace = true edition.workspace = true @@ -20,11 +20,19 @@ array-bytes = { workspace = true, default-features = true } codec = { features = ["derive"], workspace = true, default-features = true } futures = { workspace = true } log = { workspace = true, default-features = true } -prometheus-endpoint = { workspace = true, default-features = true } -sc-network = { workspace = true, default-features = true } -sc-network-common = { workspace = true, default-features = true } -sc-network-sync = { workspace = true, default-features = true } -sc-network-types = { workspace = true, default-features = true } -sc-utils = { workspace = true, default-features = true } -sp-consensus = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } +prometheus-endpoint.default-features = true +prometheus-endpoint.workspace = true +sc-network-common.default-features = true +sc-network-common.workspace = true +sc-network-sync.default-features = true +sc-network-sync.workspace = true +sc-network-types.default-features = true +sc-network-types.workspace = true +sc-network.default-features = true +sc-network.workspace = true +sc-utils.default-features = true +sc-utils.workspace = true +sp-consensus.default-features = true +sp-consensus.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true diff --git a/substrate/client/network/types/Cargo.toml b/substrate/client/network/types/Cargo.toml index 62ab57a5838a7..0247791a2086d 100644 --- a/substrate/client/network/types/Cargo.toml +++ b/substrate/client/network/types/Cargo.toml @@ -1,7 +1,7 @@ [package] description = "Substrate network types" name = "sc-network-types" -version = "0.10.0" +version = "0.17.0" license = "GPL-3.0-or-later WITH Classpath-exception-2.0" authors.workspace = true edition.workspace = true diff --git a/substrate/client/offchain/Cargo.toml b/substrate/client/offchain/Cargo.toml index 3e964718e2b1c..4f1b2b6c71b5a 100644 --- a/substrate/client/offchain/Cargo.toml +++ b/substrate/client/offchain/Cargo.toml @@ -1,7 +1,7 @@ [package] description = "Substrate offchain workers" name = "sc-offchain" -version = "29.0.0" +version = "46.0.0" license = "GPL-3.0-or-later WITH Classpath-exception-2.0" authors.workspace = true edition.workspace = true @@ -30,28 +30,39 @@ once_cell = { workspace = true } parking_lot = { workspace = true, default-features = true } rand = { workspace = true, default-features = true } rustls = { workspace = true } -sc-client-api = { workspace = true, default-features = true } -sc-network = { workspace = true, default-features = true } -sc-network-types = { workspace = true, default-features = true } -sc-transaction-pool-api = { workspace = true, default-features = true } -sc-utils = { workspace = true, default-features = true } -sp-api = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-externalities = { workspace = true, default-features = true } -sp-keystore = { workspace = true, default-features = true } -sp-offchain = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } +sc-client-api.default-features = true +sc-client-api.workspace = true +sc-network-types.default-features = true +sc-network-types.workspace = true +sc-network.default-features = true +sc-network.workspace = true +sc-transaction-pool-api.default-features = true +sc-transaction-pool-api.workspace = true +sc-utils.default-features = true +sc-utils.workspace = true +sp-api.default-features = true +sp-api.workspace = true +sp-core.default-features = true +sp-core.workspace = true +sp-externalities.default-features = true +sp-externalities.workspace = true +sp-keystore.default-features = true +sp-keystore.workspace = true +sp-offchain.default-features = true +sp-offchain.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true threadpool = { workspace = true } tracing = { workspace = true, default-features = true } [dev-dependencies] async-trait = { workspace = true } -sc-block-builder = { workspace = true, default-features = true } +sc-block-builder = { default-features = true, workspace = true } sc-client-db = { default-features = true, workspace = true } -sc-transaction-pool = { workspace = true, default-features = true } -sc-transaction-pool-api = { workspace = true, default-features = true } -sp-consensus = { workspace = true, default-features = true } -sp-tracing = { workspace = true, default-features = true } +sc-transaction-pool = { default-features = true, workspace = true } +sc-transaction-pool-api = { default-features = true, workspace = true } +sp-consensus = { default-features = true, workspace = true } +sp-tracing = { default-features = true, workspace = true } substrate-test-runtime-client = { workspace = true } tokio = { workspace = true, default-features = true } diff --git a/substrate/client/proposer-metrics/Cargo.toml b/substrate/client/proposer-metrics/Cargo.toml index b42e6329f9916..4828fa296f77b 100644 --- a/substrate/client/proposer-metrics/Cargo.toml +++ b/substrate/client/proposer-metrics/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-proposer-metrics" -version = "0.17.0" +version = "0.20.0" authors.workspace = true edition.workspace = true license = "GPL-3.0-or-later WITH Classpath-exception-2.0" @@ -17,4 +17,5 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] log = { workspace = true, default-features = true } -prometheus-endpoint = { workspace = true, default-features = true } +prometheus-endpoint.default-features = true +prometheus-endpoint.workspace = true diff --git a/substrate/client/rpc-api/Cargo.toml b/substrate/client/rpc-api/Cargo.toml index e7bb723d88398..ca18f4cd425c9 100644 --- a/substrate/client/rpc-api/Cargo.toml +++ b/substrate/client/rpc-api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-rpc-api" -version = "0.33.0" +version = "0.50.0" authors.workspace = true edition.workspace = true license = "GPL-3.0-or-later WITH Classpath-exception-2.0" @@ -18,14 +18,21 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { workspace = true, default-features = true } jsonrpsee = { features = ["client-core", "macros", "server-core"], workspace = true } -sc-chain-spec = { workspace = true, default-features = true } -sc-mixnet = { workspace = true, default-features = true } -sc-transaction-pool-api = { workspace = true, default-features = true } +sc-chain-spec.default-features = true +sc-chain-spec.workspace = true +sc-mixnet.default-features = true +sc-mixnet.workspace = true +sc-transaction-pool-api.default-features = true +sc-transaction-pool-api.workspace = true scale-info = { features = ["derive"], workspace = true } serde = { features = ["derive"], workspace = true, default-features = true } serde_json = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-rpc = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } -sp-version = { workspace = true, default-features = true } +sp-core.default-features = true +sp-core.workspace = true +sp-rpc.default-features = true +sp-rpc.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true +sp-version.default-features = true +sp-version.workspace = true thiserror = { workspace = true } diff --git a/substrate/client/rpc-servers/Cargo.toml b/substrate/client/rpc-servers/Cargo.toml index b39c3fdda67c0..f27903160ce93 100644 --- a/substrate/client/rpc-servers/Cargo.toml +++ b/substrate/client/rpc-servers/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-rpc-server" -version = "11.0.0" +version = "23.0.0" authors.workspace = true edition.workspace = true license = "GPL-3.0-or-later WITH Classpath-exception-2.0" @@ -26,8 +26,9 @@ hyper = { workspace = true } ip_network = { workspace = true } jsonrpsee = { features = ["server"], workspace = true } log = { workspace = true, default-features = true } -prometheus-endpoint = { workspace = true, default-features = true } -sc-rpc-api = { workspace = true } +prometheus-endpoint.default-features = true +prometheus-endpoint.workspace = true +sc-rpc-api.workspace = true serde = { workspace = true } serde_json = { workspace = true, default-features = true } tokio = { features = ["parking_lot"], workspace = true, default-features = true } diff --git a/substrate/client/rpc-spec-v2/Cargo.toml b/substrate/client/rpc-spec-v2/Cargo.toml index 150443fe80b92..c4a0318baea2d 100644 --- a/substrate/client/rpc-spec-v2/Cargo.toml +++ b/substrate/client/rpc-spec-v2/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-rpc-spec-v2" -version = "0.34.0" +version = "0.51.0" authors.workspace = true edition.workspace = true license = "GPL-3.0-or-later WITH Classpath-exception-2.0" @@ -17,8 +17,8 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] jsonrpsee = { workspace = true, features = ["client-core", "macros", "server-core"] } -# Internal chain structures for "chain_spec". -sc-chain-spec = { workspace = true, default-features = true } +sc-chain-spec.default-features = true +sc-chain-spec.workspace = true # Pool for submitting extrinsics required by "transaction" array-bytes = { workspace = true, default-features = true } codec = { workspace = true, default-features = true } @@ -28,19 +28,29 @@ hex = { workspace = true, default-features = true } itertools = { workspace = true } log = { workspace = true, default-features = true } parking_lot = { workspace = true, default-features = true } -prometheus-endpoint = { workspace = true, default-features = true } +prometheus-endpoint.default-features = true +prometheus-endpoint.workspace = true rand = { workspace = true, default-features = true } -sc-client-api = { workspace = true, default-features = true } -sc-rpc = { workspace = true, default-features = true } -sc-transaction-pool-api = { workspace = true, default-features = true } +sc-client-api.default-features = true +sc-client-api.workspace = true +sc-rpc.default-features = true +sc-rpc.workspace = true +sc-transaction-pool-api.default-features = true +sc-transaction-pool-api.workspace = true schnellru = { workspace = true } serde = { workspace = true, default-features = true } -sp-api = { workspace = true, default-features = true } -sp-blockchain = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-rpc = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } -sp-version = { workspace = true, default-features = true } +sp-api.default-features = true +sp-api.workspace = true +sp-blockchain.default-features = true +sp-blockchain.workspace = true +sp-core.default-features = true +sp-core.workspace = true +sp-rpc.default-features = true +sp-rpc.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true +sp-version.default-features = true +sp-version.workspace = true thiserror = { workspace = true } tokio = { features = ["sync"], workspace = true, default-features = true } tokio-stream = { features = ["sync"], workspace = true } @@ -50,15 +60,15 @@ assert_matches = { workspace = true } async-trait = { workspace = true } jsonrpsee = { workspace = true, features = ["server", "ws-client"] } pretty_assertions = { workspace = true } -sc-block-builder = { workspace = true, default-features = true } -sc-rpc = { workspace = true, default-features = true, features = ["test-helpers"] } -sc-service = { workspace = true, default-features = true } -sc-transaction-pool = { workspace = true, default-features = true } -sc-utils = { workspace = true, default-features = true } +sc-block-builder = { default-features = true, workspace = true } +sc-rpc = { default-features = true, features = ["test-helpers"], workspace = true } +sc-service = { default-features = true, workspace = true } +sc-transaction-pool = { default-features = true, workspace = true } +sc-utils = { default-features = true, workspace = true } serde_json = { workspace = true, default-features = true } -sp-consensus = { workspace = true, default-features = true } -sp-externalities = { workspace = true, default-features = true } -sp-maybe-compressed-blob = { workspace = true, default-features = true } +sp-consensus = { default-features = true, workspace = true } +sp-externalities = { default-features = true, workspace = true } +sp-maybe-compressed-blob = { default-features = true, workspace = true } substrate-test-runtime = { workspace = true } substrate-test-runtime-client = { workspace = true } substrate-test-runtime-transaction-pool = { workspace = true } diff --git a/substrate/client/rpc/Cargo.toml b/substrate/client/rpc/Cargo.toml index 785a7e48d7d66..24ef524e38718 100644 --- a/substrate/client/rpc/Cargo.toml +++ b/substrate/client/rpc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-rpc" -version = "29.0.0" +version = "46.0.0" authors.workspace = true edition.workspace = true license = "GPL-3.0-or-later WITH Classpath-exception-2.0" @@ -21,35 +21,53 @@ futures = { workspace = true } jsonrpsee = { features = ["server"], workspace = true } log = { workspace = true, default-features = true } parking_lot = { workspace = true, default-features = true } -sc-block-builder = { workspace = true, default-features = true } -sc-chain-spec = { workspace = true, default-features = true } -sc-client-api = { workspace = true, default-features = true } -sc-mixnet = { workspace = true, default-features = true } -sc-rpc-api = { workspace = true, default-features = true } -sc-tracing = { workspace = true, default-features = true } -sc-transaction-pool-api = { workspace = true, default-features = true } -sc-utils = { workspace = true, default-features = true } +sc-block-builder.default-features = true +sc-block-builder.workspace = true +sc-chain-spec.default-features = true +sc-chain-spec.workspace = true +sc-client-api.default-features = true +sc-client-api.workspace = true +sc-mixnet.default-features = true +sc-mixnet.workspace = true +sc-rpc-api.default-features = true +sc-rpc-api.workspace = true +sc-tracing.default-features = true +sc-tracing.workspace = true +sc-transaction-pool-api.default-features = true +sc-transaction-pool-api.workspace = true +sc-utils.default-features = true +sc-utils.workspace = true serde_json = { workspace = true, default-features = true } -sp-api = { workspace = true, default-features = true } -sp-blockchain = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-keystore = { workspace = true, default-features = true } -sp-offchain = { workspace = true, default-features = true } -sp-rpc = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } -sp-session = { workspace = true, default-features = true } -sp-statement-store = { workspace = true, default-features = true } -sp-version = { workspace = true, default-features = true } +sp-api.default-features = true +sp-api.workspace = true +sp-blockchain.default-features = true +sp-blockchain.workspace = true +sp-core.default-features = true +sp-core.workspace = true +sp-keystore.default-features = true +sp-keystore.workspace = true +sp-offchain.default-features = true +sp-offchain.workspace = true +sp-rpc.default-features = true +sp-rpc.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true +sp-session.default-features = true +sp-session.workspace = true +sp-statement-store.default-features = true +sp-statement-store.workspace = true +sp-version.default-features = true +sp-version.workspace = true tokio = { workspace = true, default-features = true } [dev-dependencies] assert_matches = { workspace = true } pretty_assertions = { workspace = true } -sc-block-builder = { workspace = true, default-features = true } -sc-network = { workspace = true, default-features = true } -sc-transaction-pool = { workspace = true, default-features = true } -sp-consensus = { workspace = true, default-features = true } -sp-crypto-hashing = { workspace = true, default-features = true } +sc-block-builder = { default-features = true, workspace = true } +sc-network = { default-features = true, workspace = true } +sc-transaction-pool = { default-features = true, workspace = true } +sp-consensus = { default-features = true, workspace = true } +sp-crypto-hashing = { default-features = true, workspace = true } substrate-test-runtime-client = { workspace = true } tokio = { workspace = true, default-features = true } diff --git a/substrate/client/runtime-utilities/Cargo.toml b/substrate/client/runtime-utilities/Cargo.toml index 5906745047e00..42f4612561ae6 100644 --- a/substrate/client/runtime-utilities/Cargo.toml +++ b/substrate/client/runtime-utilities/Cargo.toml @@ -1,7 +1,7 @@ [package] description = "Substrate client utilities for frame runtime functions calls." name = "sc-runtime-utilities" -version = "0.1.0" +version = "0.3.0" license = "GPL-3.0-or-later WITH Classpath-exception-2.0" authors.workspace = true edition.workspace = true @@ -17,19 +17,24 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { workspace = true, default-features = true } - -sc-executor = { workspace = true, default-features = true } -sc-executor-common = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-crypto-hashing = { workspace = true, default-features = true } -sp-state-machine = { workspace = true, default-features = true } -sp-wasm-interface = { workspace = true, default-features = true } +sc-executor-common.default-features = true +sc-executor-common.workspace = true +sc-executor.default-features = true +sc-executor.workspace = true +sp-core.default-features = true +sp-core.workspace = true +sp-crypto-hashing.default-features = true +sp-crypto-hashing.workspace = true +sp-state-machine.default-features = true +sp-state-machine.workspace = true +sp-wasm-interface.default-features = true +sp-wasm-interface.workspace = true thiserror = { workspace = true } [dev-dependencies] -cumulus-primitives-proof-size-hostfunction = { workspace = true, default-features = true } -cumulus-test-runtime = { workspace = true, default-features = true } -sp-io = { workspace = true, default-features = true } -sp-version = { workspace = true, default-features = true } +cumulus-primitives-proof-size-hostfunction = { default-features = true, workspace = true } +cumulus-test-runtime = { default-features = true, workspace = true } +sp-io = { default-features = true, workspace = true } +sp-version = { default-features = true, workspace = true } subxt = { workspace = true, features = ["native"] } diff --git a/substrate/client/service/Cargo.toml b/substrate/client/service/Cargo.toml index 110810746be02..818aa955056a2 100644 --- a/substrate/client/service/Cargo.toml +++ b/substrate/client/service/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-service" -version = "0.35.0" +version = "0.52.0" authors.workspace = true edition.workspace = true license = "GPL-3.0-or-later WITH Classpath-exception-2.0" @@ -26,47 +26,83 @@ jsonrpsee = { features = ["server"], workspace = true } log = { workspace = true, default-features = true } parking_lot = { workspace = true, default-features = true } pin-project = { workspace = true } -prometheus-endpoint = { workspace = true, default-features = true } +prometheus-endpoint.default-features = true +prometheus-endpoint.workspace = true rand = { workspace = true, default-features = true } -sc-chain-spec = { workspace = true, default-features = true } -sc-client-api = { workspace = true, default-features = true } -sc-client-db = { workspace = true } -sc-consensus = { workspace = true, default-features = true } -sc-executor = { workspace = true, default-features = true } -sc-informant = { workspace = true, default-features = true } -sc-keystore = { workspace = true, default-features = true } -sc-network = { workspace = true, default-features = true } -sc-network-common = { workspace = true, default-features = true } -sc-network-light = { workspace = true, default-features = true } -sc-network-sync = { workspace = true, default-features = true } -sc-network-transactions = { workspace = true, default-features = true } -sc-network-types = { workspace = true, default-features = true } -sc-rpc = { workspace = true, default-features = true } -sc-rpc-server = { workspace = true, default-features = true } -sc-rpc-spec-v2 = { workspace = true, default-features = true } -sc-sysinfo = { workspace = true, default-features = true } -sc-telemetry = { workspace = true, default-features = true } -sc-tracing = { workspace = true, default-features = true } -sc-transaction-pool = { workspace = true, default-features = true } -sc-transaction-pool-api = { workspace = true, default-features = true } -sc-utils = { workspace = true, default-features = true } +sc-chain-spec.default-features = true +sc-chain-spec.workspace = true +sc-client-api.default-features = true +sc-client-api.workspace = true +sc-client-db.workspace = true +sc-consensus.default-features = true +sc-consensus.workspace = true +sc-executor.default-features = true +sc-executor.workspace = true +sc-informant.default-features = true +sc-informant.workspace = true +sc-keystore.default-features = true +sc-keystore.workspace = true +sc-network-common.default-features = true +sc-network-common.workspace = true +sc-network-light.default-features = true +sc-network-light.workspace = true +sc-network-sync.default-features = true +sc-network-sync.workspace = true +sc-network-transactions.default-features = true +sc-network-transactions.workspace = true +sc-network-types.default-features = true +sc-network-types.workspace = true +sc-network.default-features = true +sc-network.workspace = true +sc-rpc-server.default-features = true +sc-rpc-server.workspace = true +sc-rpc-spec-v2.default-features = true +sc-rpc-spec-v2.workspace = true +sc-rpc.default-features = true +sc-rpc.workspace = true +sc-sysinfo.default-features = true +sc-sysinfo.workspace = true +sc-telemetry.default-features = true +sc-telemetry.workspace = true +sc-tracing.default-features = true +sc-tracing.workspace = true +sc-transaction-pool-api.default-features = true +sc-transaction-pool-api.workspace = true +sc-transaction-pool.default-features = true +sc-transaction-pool.workspace = true +sc-utils.default-features = true +sc-utils.workspace = true schnellru = { workspace = true } serde = { workspace = true, default-features = true } serde_json = { workspace = true, default-features = true } -sp-api = { workspace = true, default-features = true } -sp-blockchain = { workspace = true, default-features = true } -sp-consensus = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-externalities = { workspace = true, default-features = true } -sp-keystore = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } -sp-session = { workspace = true, default-features = true } -sp-state-machine = { workspace = true, default-features = true } -sp-storage = { workspace = true, default-features = true } -sp-transaction-pool = { workspace = true, default-features = true } -sp-transaction-storage-proof = { workspace = true, default-features = true } -sp-trie = { workspace = true, default-features = true } -sp-version = { workspace = true, default-features = true } +sp-api.default-features = true +sp-api.workspace = true +sp-blockchain.default-features = true +sp-blockchain.workspace = true +sp-consensus.default-features = true +sp-consensus.workspace = true +sp-core.default-features = true +sp-core.workspace = true +sp-externalities.default-features = true +sp-externalities.workspace = true +sp-keystore.default-features = true +sp-keystore.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true +sp-session.default-features = true +sp-session.workspace = true +sp-state-machine.default-features = true +sp-state-machine.workspace = true +sp-storage.default-features = true +sp-storage.workspace = true +sp-transaction-pool.default-features = true +sp-transaction-pool.workspace = true +sp-transaction-storage-proof.default-features = true +sp-transaction-storage-proof.workspace = true +sp-trie.default-features = true +sp-trie.workspace = true +sp-version.default-features = true +sp-version.workspace = true static_init = { workspace = true } tempfile = { workspace = true } thiserror = { workspace = true } diff --git a/substrate/client/service/test/Cargo.toml b/substrate/client/service/test/Cargo.toml index ab8e4c34ff025..c1213a933fa37 100644 --- a/substrate/client/service/test/Cargo.toml +++ b/substrate/client/service/test/Cargo.toml @@ -22,25 +22,42 @@ fdlimit = { workspace = true } futures = { workspace = true } log = { workspace = true, default-features = true } parking_lot = { workspace = true, default-features = true } -sc-block-builder = { workspace = true, default-features = true } -sc-client-api = { workspace = true, default-features = true } -sc-client-db = { workspace = true } -sc-consensus = { workspace = true, default-features = true } -sc-executor = { workspace = true, default-features = true } -sc-network = { workspace = true, default-features = true } -sc-network-sync = { workspace = true, default-features = true } -sc-service = { workspace = true, default-features = true } -sc-transaction-pool-api = { workspace = true, default-features = true } -sp-api = { workspace = true, default-features = true } -sp-blockchain = { workspace = true, default-features = true } -sp-consensus = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-io = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } -sp-state-machine = { workspace = true, default-features = true } -sp-storage = { workspace = true, default-features = true } -sp-tracing = { workspace = true, default-features = true } -substrate-test-runtime = { workspace = true } -substrate-test-runtime-client = { workspace = true } +sc-block-builder.default-features = true +sc-block-builder.workspace = true +sc-client-api.default-features = true +sc-client-api.workspace = true +sc-client-db.workspace = true +sc-consensus.default-features = true +sc-consensus.workspace = true +sc-executor.default-features = true +sc-executor.workspace = true +sc-network-sync.default-features = true +sc-network-sync.workspace = true +sc-network.default-features = true +sc-network.workspace = true +sc-service.default-features = true +sc-service.workspace = true +sc-transaction-pool-api.default-features = true +sc-transaction-pool-api.workspace = true +sp-api.default-features = true +sp-api.workspace = true +sp-blockchain.default-features = true +sp-blockchain.workspace = true +sp-consensus.default-features = true +sp-consensus.workspace = true +sp-core.default-features = true +sp-core.workspace = true +sp-io.default-features = true +sp-io.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true +sp-state-machine.default-features = true +sp-state-machine.workspace = true +sp-storage.default-features = true +sp-storage.workspace = true +sp-tracing.default-features = true +sp-tracing.workspace = true +substrate-test-runtime-client.workspace = true +substrate-test-runtime.workspace = true tempfile = { workspace = true } tokio = { features = ["time"], workspace = true, default-features = true } diff --git a/substrate/client/state-db/Cargo.toml b/substrate/client/state-db/Cargo.toml index db6944fdbd2c0..3f5488b4cdfc2 100644 --- a/substrate/client/state-db/Cargo.toml +++ b/substrate/client/state-db/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-state-db" -version = "0.30.0" +version = "0.39.0" authors.workspace = true edition.workspace = true license = "GPL-3.0-or-later WITH Classpath-exception-2.0" @@ -19,4 +19,5 @@ targets = ["x86_64-unknown-linux-gnu"] codec = { features = ["derive"], workspace = true, default-features = true } log = { workspace = true, default-features = true } parking_lot = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } +sp-core.default-features = true +sp-core.workspace = true diff --git a/substrate/client/statement-store/Cargo.toml b/substrate/client/statement-store/Cargo.toml index c0219b294cede..7504b28d4e8a8 100644 --- a/substrate/client/statement-store/Cargo.toml +++ b/substrate/client/statement-store/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-statement-store" -version = "10.0.0" +version = "22.0.0" authors.workspace = true edition.workspace = true license = "GPL-3.0-or-later WITH Classpath-exception-2.0" @@ -19,16 +19,24 @@ targets = ["x86_64-unknown-linux-gnu"] log = { workspace = true, default-features = true } parity-db = { workspace = true } parking_lot = { workspace = true, default-features = true } -prometheus-endpoint = { workspace = true, default-features = true } -sc-client-api = { workspace = true, default-features = true } -sc-keystore = { workspace = true, default-features = true } -sp-api = { workspace = true, default-features = true } -sp-blockchain = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } -sp-statement-store = { workspace = true, default-features = true } +prometheus-endpoint.default-features = true +prometheus-endpoint.workspace = true +sc-client-api.default-features = true +sc-client-api.workspace = true +sc-keystore.default-features = true +sc-keystore.workspace = true +sp-api.default-features = true +sp-api.workspace = true +sp-blockchain.default-features = true +sp-blockchain.workspace = true +sp-core.default-features = true +sp-core.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true +sp-statement-store.default-features = true +sp-statement-store.workspace = true tokio = { features = ["time"], workspace = true, default-features = true } [dev-dependencies] -sp-tracing = { workspace = true } +sp-tracing = { workspace = true, default-features = false } tempfile = { workspace = true } diff --git a/substrate/client/storage-monitor/Cargo.toml b/substrate/client/storage-monitor/Cargo.toml index 3d8cb72b1a92a..14511bd3bb795 100644 --- a/substrate/client/storage-monitor/Cargo.toml +++ b/substrate/client/storage-monitor/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-storage-monitor" -version = "0.16.0" +version = "0.25.0" authors.workspace = true edition.workspace = true license = "GPL-3.0-or-later WITH Classpath-exception-2.0" @@ -15,6 +15,7 @@ workspace = true clap = { features = ["derive", "string"], workspace = true } fs4 = { workspace = true } log = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } +sp-core.default-features = true +sp-core.workspace = true thiserror = { workspace = true } tokio = { features = ["time"], workspace = true, default-features = true } diff --git a/substrate/client/sync-state-rpc/Cargo.toml b/substrate/client/sync-state-rpc/Cargo.toml index 91c30f5aa2cc2..6c65f39f6e5ad 100644 --- a/substrate/client/sync-state-rpc/Cargo.toml +++ b/substrate/client/sync-state-rpc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-sync-state-rpc" -version = "0.34.0" +version = "0.51.0" authors.workspace = true description = "A RPC handler to create sync states for light clients." edition.workspace = true @@ -17,13 +17,20 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { workspace = true, default-features = true } jsonrpsee = { features = ["client-core", "macros", "server-core"], workspace = true } -sc-chain-spec = { workspace = true, default-features = true } -sc-client-api = { workspace = true, default-features = true } -sc-consensus-babe = { workspace = true, default-features = true } -sc-consensus-epochs = { workspace = true, default-features = true } -sc-consensus-grandpa = { workspace = true, default-features = true } +sc-chain-spec.default-features = true +sc-chain-spec.workspace = true +sc-client-api.default-features = true +sc-client-api.workspace = true +sc-consensus-babe.default-features = true +sc-consensus-babe.workspace = true +sc-consensus-epochs.default-features = true +sc-consensus-epochs.workspace = true +sc-consensus-grandpa.default-features = true +sc-consensus-grandpa.workspace = true serde = { features = ["derive"], workspace = true, default-features = true } serde_json = { workspace = true, default-features = true } -sp-blockchain = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } +sp-blockchain.default-features = true +sp-blockchain.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true thiserror = { workspace = true } diff --git a/substrate/client/sysinfo/Cargo.toml b/substrate/client/sysinfo/Cargo.toml index afc464c358811..345d1943fa084 100644 --- a/substrate/client/sysinfo/Cargo.toml +++ b/substrate/client/sysinfo/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-sysinfo" -version = "27.0.0" +version = "43.0.0" authors.workspace = true edition.workspace = true license = "GPL-3.0-or-later WITH Classpath-exception-2.0" @@ -24,12 +24,16 @@ log = { workspace = true, default-features = true } rand = { workspace = true, default-features = true } rand_pcg = { workspace = true } regex = { workspace = true } -sc-telemetry = { workspace = true, default-features = true } +sc-telemetry.default-features = true +sc-telemetry.workspace = true serde = { features = ["derive"], workspace = true, default-features = true } serde_json = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-crypto-hashing = { workspace = true, default-features = true } -sp-io = { workspace = true, default-features = true } +sp-core.default-features = true +sp-core.workspace = true +sp-crypto-hashing.default-features = true +sp-crypto-hashing.workspace = true +sp-io.default-features = true +sp-io.workspace = true [dev-dependencies] -sp-runtime = { workspace = true, default-features = true } +sp-runtime = { default-features = true, workspace = true } diff --git a/substrate/client/telemetry/Cargo.toml b/substrate/client/telemetry/Cargo.toml index 1ebff618e0cef..44e194a76d444 100644 --- a/substrate/client/telemetry/Cargo.toml +++ b/substrate/client/telemetry/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-telemetry" -version = "15.0.0" +version = "29.0.0" authors.workspace = true description = "Telemetry utils" edition.workspace = true @@ -24,7 +24,8 @@ log = { workspace = true, default-features = true } parking_lot = { workspace = true, default-features = true } pin-project = { workspace = true } rand = { workspace = true, default-features = true } -sc-utils = { workspace = true, default-features = true } +sc-utils.default-features = true +sc-utils.workspace = true serde = { features = ["derive"], workspace = true, default-features = true } serde_json = { workspace = true, default-features = true } thiserror = { workspace = true } diff --git a/substrate/client/tracing/Cargo.toml b/substrate/client/tracing/Cargo.toml index a0d85c5a98e66..25b848a9348e5 100644 --- a/substrate/client/tracing/Cargo.toml +++ b/substrate/client/tracing/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-tracing" -version = "28.0.0" +version = "40.0.0" license = "GPL-3.0-or-later WITH Classpath-exception-2.0" authors.workspace = true edition.workspace = true @@ -28,15 +28,23 @@ libc = { workspace = true } log = { workspace = true, default-features = true } parking_lot = { workspace = true, default-features = true } rustc-hash = { workspace = true } -sc-client-api = { workspace = true, default-features = true } -sc-tracing-proc-macro = { workspace = true, default-features = true } +sc-client-api.default-features = true +sc-client-api.workspace = true +sc-tracing-proc-macro.default-features = true +sc-tracing-proc-macro.workspace = true serde = { workspace = true, default-features = true } -sp-api = { workspace = true, default-features = true } -sp-blockchain = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-rpc = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } -sp-tracing = { workspace = true, default-features = true } +sp-api.default-features = true +sp-api.workspace = true +sp-blockchain.default-features = true +sp-blockchain.workspace = true +sp-core.default-features = true +sp-core.workspace = true +sp-rpc.default-features = true +sp-rpc.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true +sp-tracing.default-features = true +sp-tracing.workspace = true thiserror = { workspace = true } tracing = { workspace = true, default-features = true } tracing-log = { workspace = true } diff --git a/substrate/client/tracing/proc-macro/Cargo.toml b/substrate/client/tracing/proc-macro/Cargo.toml index 4187235b4e38d..5c77a785e2899 100644 --- a/substrate/client/tracing/proc-macro/Cargo.toml +++ b/substrate/client/tracing/proc-macro/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-tracing-proc-macro" -version = "11.0.0" +version = "11.1.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" diff --git a/substrate/client/transaction-pool/Cargo.toml b/substrate/client/transaction-pool/Cargo.toml index b51ceb45d0986..e2252f1e17060 100644 --- a/substrate/client/transaction-pool/Cargo.toml +++ b/substrate/client/transaction-pool/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-transaction-pool" -version = "28.0.0" +version = "40.0.0" authors.workspace = true edition.workspace = true license = "GPL-3.0-or-later WITH Classpath-exception-2.0" @@ -28,18 +28,29 @@ indexmap = { workspace = true } itertools = { workspace = true } linked-hash-map = { workspace = true } parking_lot = { workspace = true, default-features = true } -prometheus-endpoint = { workspace = true, default-features = true } -sc-client-api = { workspace = true, default-features = true } -sc-transaction-pool-api = { workspace = true, default-features = true } -sc-utils = { workspace = true, default-features = true } +prometheus-endpoint.default-features = true +prometheus-endpoint.workspace = true +sc-client-api.default-features = true +sc-client-api.workspace = true +sc-transaction-pool-api.default-features = true +sc-transaction-pool-api.workspace = true +sc-utils.default-features = true +sc-utils.workspace = true serde = { features = ["derive"], workspace = true, default-features = true } -sp-api = { workspace = true, default-features = true } -sp-blockchain = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-crypto-hashing = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } -sp-tracing = { workspace = true, default-features = true } -sp-transaction-pool = { workspace = true, default-features = true } +sp-api.default-features = true +sp-api.workspace = true +sp-blockchain.default-features = true +sp-blockchain.workspace = true +sp-core.default-features = true +sp-core.workspace = true +sp-crypto-hashing.default-features = true +sp-crypto-hashing.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true +sp-tracing.default-features = true +sp-tracing.workspace = true +sp-transaction-pool.default-features = true +sp-transaction-pool.workspace = true thiserror = { workspace = true } tokio = { workspace = true, default-features = true, features = ["macros", "time"] } tokio-stream = { workspace = true } @@ -50,8 +61,8 @@ anyhow = { workspace = true } assert_matches = { workspace = true } criterion = { workspace = true, default-features = true } rstest = { workspace = true } -sc-block-builder = { workspace = true, default-features = true } -sp-consensus = { workspace = true, default-features = true } +sc-block-builder = { default-features = true, workspace = true } +sp-consensus = { default-features = true, workspace = true } substrate-test-runtime = { workspace = true } substrate-test-runtime-client = { workspace = true } substrate-test-runtime-transaction-pool = { workspace = true } diff --git a/substrate/client/transaction-pool/api/Cargo.toml b/substrate/client/transaction-pool/api/Cargo.toml index d3ea499beec85..d0bd36b760cdf 100644 --- a/substrate/client/transaction-pool/api/Cargo.toml +++ b/substrate/client/transaction-pool/api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-transaction-pool-api" -version = "28.0.0" +version = "40.0.0" authors.workspace = true edition.workspace = true license = "GPL-3.0-or-later WITH Classpath-exception-2.0" @@ -18,9 +18,10 @@ futures = { workspace = true } indexmap = { workspace = true } log = { workspace = true, default-features = true } serde = { features = ["derive"], workspace = true, default-features = true } -sp-blockchain = { workspace = true, default-features = true } -sp-core = { workspace = true } -sp-runtime = { workspace = true } +sp-blockchain.default-features = true +sp-blockchain.workspace = true +sp-core.workspace = true +sp-runtime.workspace = true thiserror = { workspace = true } [dev-dependencies] diff --git a/substrate/client/utils/Cargo.toml b/substrate/client/utils/Cargo.toml index 95daa5eedba94..a2edb8a24b03d 100644 --- a/substrate/client/utils/Cargo.toml +++ b/substrate/client/utils/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-utils" -version = "14.0.0" +version = "19.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -19,7 +19,7 @@ futures-timer = { workspace = true } log = { workspace = true, default-features = true } parking_lot = { workspace = true, default-features = true } prometheus = { workspace = true } -sp-arithmetic = { workspace = true } +sp-arithmetic.workspace = true [dev-dependencies] tokio-test = { workspace = true } diff --git a/substrate/deprecated/hashing/Cargo.toml b/substrate/deprecated/hashing/Cargo.toml index ab7245a5ca2c9..20074a506dcc9 100644 --- a/substrate/deprecated/hashing/Cargo.toml +++ b/substrate/deprecated/hashing/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-core-hashing" -version = "15.0.0" +version = "16.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -16,7 +16,8 @@ maintenance = { status = "deprecated" } targets = ["x86_64-unknown-linux-gnu"] [dependencies] -sp-crypto-hashing = { workspace = true, default-features = true } +sp-crypto-hashing.default-features = true +sp-crypto-hashing.workspace = true [features] default = ["std"] diff --git a/substrate/deprecated/hashing/proc-macro/Cargo.toml b/substrate/deprecated/hashing/proc-macro/Cargo.toml index 99906d07a9c24..66000b0e6103a 100644 --- a/substrate/deprecated/hashing/proc-macro/Cargo.toml +++ b/substrate/deprecated/hashing/proc-macro/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-core-hashing-proc-macro" -version = "15.0.0" +version = "16.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -16,4 +16,5 @@ maintenance = { status = "deprecated" } targets = ["x86_64-unknown-linux-gnu"] [dependencies] -sp-crypto-hashing-proc-macro = { workspace = true, default-features = true } +sp-crypto-hashing-proc-macro.default-features = true +sp-crypto-hashing-proc-macro.workspace = true diff --git a/substrate/frame/Cargo.toml b/substrate/frame/Cargo.toml index b0428dacec984..0f4dd08cccc61 100644 --- a/substrate/frame/Cargo.toml +++ b/substrate/frame/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-sdk-frame" -version = "0.1.0" +version = "0.10.0" authors = ["Parity Technologies "] edition.workspace = true license = "Apache-2.0" @@ -17,43 +17,32 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] # external deps codec = { features = ["derive"], workspace = true } +frame-benchmarking = { optional = true, workspace = true } +frame-executive = { optional = true, workspace = true } +frame-support.workspace = true +frame-system-benchmarking = { optional = true, workspace = true } +frame-system-rpc-runtime-api = { optional = true, workspace = true } +frame-system.workspace = true +frame-try-runtime = { optional = true, workspace = true } scale-info = { features = ["derive"], workspace = true } serde = { workspace = true } - -# primitive deps, used for developing FRAME pallets. -sp-arithmetic = { workspace = true } -sp-core = { workspace = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } - -# frame deps, for developing FRAME pallets. -frame-support = { workspace = true } -frame-system = { workspace = true } - -# primitive types used for developing FRAME runtimes. sp-api = { optional = true, workspace = true } +sp-arithmetic.workspace = true sp-block-builder = { optional = true, workspace = true } sp-consensus-aura = { optional = true, workspace = true } sp-consensus-grandpa = { optional = true, workspace = true } +sp-core.workspace = true sp-genesis-builder = { optional = true, workspace = true } sp-inherents = { optional = true, workspace = true } +sp-io.workspace = true sp-keyring = { optional = true, workspace = true } sp-offchain = { optional = true, workspace = true } +sp-runtime.workspace = true sp-session = { optional = true, workspace = true } sp-storage = { optional = true, workspace = true } sp-transaction-pool = { optional = true, workspace = true } sp-version = { optional = true, workspace = true } -frame-executive = { optional = true, workspace = true } -frame-system-rpc-runtime-api = { optional = true, workspace = true } - -# Used for runtime benchmarking -frame-benchmarking = { optional = true, workspace = true } -frame-system-benchmarking = { optional = true, workspace = true } - -# Used for try-runtime -frame-try-runtime = { optional = true, workspace = true } - docify = { workspace = true } log = { workspace = true } diff --git a/substrate/frame/alliance/Cargo.toml b/substrate/frame/alliance/Cargo.toml index 99eb8ba3a864a..79711551bc59c 100644 --- a/substrate/frame/alliance/Cargo.toml +++ b/substrate/frame/alliance/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-alliance" -version = "27.0.0" +version = "40.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -20,25 +20,22 @@ array-bytes = { optional = true, workspace = true, default-features = true } log = { workspace = true } codec = { features = ["derive"], workspace = true } -scale-info = { features = ["derive"], workspace = true } - -sp-core = { workspace = true } -sp-crypto-hashing = { optional = true, workspace = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } - frame-benchmarking = { optional = true, workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } - +frame-support.workspace = true +frame-system.workspace = true pallet-collective = { optional = true, workspace = true } -pallet-identity = { workspace = true } +pallet-identity.workspace = true +scale-info = { features = ["derive"], workspace = true } +sp-core.workspace = true +sp-crypto-hashing = { optional = true, workspace = true } +sp-io.workspace = true +sp-runtime.workspace = true [dev-dependencies] array-bytes = { workspace = true, default-features = true } -pallet-balances = { workspace = true, default-features = true } -pallet-collective = { workspace = true, default-features = true } -sp-crypto-hashing = { workspace = true } +pallet-balances = { default-features = true, workspace = true } +pallet-collective = { default-features = true, workspace = true } +sp-crypto-hashing = { workspace = true, default-features = false } [features] default = ["std"] @@ -48,7 +45,6 @@ std = [ "frame-support/std", "frame-system/std", "log/std", - "pallet-balances/std", "pallet-collective?/std", "pallet-identity/std", "scale-info/std", diff --git a/substrate/frame/asset-conversion/Cargo.toml b/substrate/frame/asset-conversion/Cargo.toml index 8987e44ee000a..5f4b0267dbefa 100644 --- a/substrate/frame/asset-conversion/Cargo.toml +++ b/substrate/frame/asset-conversion/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-asset-conversion" -version = "10.0.0" +version = "23.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -18,19 +18,19 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { workspace = true } frame-benchmarking = { optional = true, workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true log = { workspace = true } scale-info = { features = ["derive"], workspace = true } -sp-api = { workspace = true } -sp-arithmetic = { workspace = true } -sp-core = { workspace = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } +sp-api.workspace = true +sp-arithmetic.workspace = true +sp-core.workspace = true +sp-io.workspace = true +sp-runtime.workspace = true [dev-dependencies] -pallet-assets = { workspace = true, default-features = true } -pallet-balances = { workspace = true, default-features = true } +pallet-assets = { default-features = true, workspace = true } +pallet-balances = { default-features = true, workspace = true } primitive-types = { features = ["codec", "num-traits", "scale-info"], workspace = true } [features] @@ -41,8 +41,6 @@ std = [ "frame-support/std", "frame-system/std", "log/std", - "pallet-assets/std", - "pallet-balances/std", "primitive-types/std", "scale-info/std", "sp-api/std", diff --git a/substrate/frame/asset-conversion/ops/Cargo.toml b/substrate/frame/asset-conversion/ops/Cargo.toml index ebd31bd296de1..4e2f4a4871982 100644 --- a/substrate/frame/asset-conversion/ops/Cargo.toml +++ b/substrate/frame/asset-conversion/ops/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-asset-conversion-ops" -version = "0.1.0" +version = "0.9.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -17,19 +17,19 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { workspace = true } frame-benchmarking = { optional = true, workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true log = { workspace = true } -pallet-asset-conversion = { workspace = true } +pallet-asset-conversion.workspace = true scale-info = { features = ["derive"], workspace = true } -sp-arithmetic = { workspace = true } -sp-core = { workspace = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } +sp-arithmetic.workspace = true +sp-core.workspace = true +sp-io.workspace = true +sp-runtime.workspace = true [dev-dependencies] -pallet-assets = { workspace = true, default-features = true } -pallet-balances = { workspace = true, default-features = true } +pallet-assets = { default-features = true, workspace = true } +pallet-balances = { default-features = true, workspace = true } primitive-types = { features = ["codec", "num-traits", "scale-info"], workspace = true } [features] @@ -41,8 +41,6 @@ std = [ "frame-system/std", "log/std", "pallet-asset-conversion/std", - "pallet-assets/std", - "pallet-balances/std", "primitive-types/std", "scale-info/std", "sp-arithmetic/std", diff --git a/substrate/frame/asset-rate/Cargo.toml b/substrate/frame/asset-rate/Cargo.toml index 940ece75e742f..66cdcd9b0241d 100644 --- a/substrate/frame/asset-rate/Cargo.toml +++ b/substrate/frame/asset-rate/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-asset-rate" -version = "7.0.0" +version = "20.0.0" description = "Whitelist non-native assets for treasury spending and provide conversion to native balance" authors.workspace = true homepage.workspace = true @@ -17,16 +17,16 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { features = ["derive"], workspace = true } frame-benchmarking = { optional = true, workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true scale-info = { features = ["derive"], workspace = true } sp-core = { optional = true, workspace = true } -sp-runtime = { workspace = true } +sp-runtime.workspace = true [dev-dependencies] -pallet-balances = { workspace = true, default-features = true } -sp-core = { workspace = true } -sp-io = { workspace = true, default-features = true } +pallet-balances = { default-features = true, workspace = true } +sp-core = { workspace = true, default-features = false } +sp-io = { default-features = true, workspace = true } [features] default = ["std"] @@ -35,10 +35,8 @@ std = [ "frame-benchmarking?/std", "frame-support/std", "frame-system/std", - "pallet-balances/std", "scale-info/std", "sp-core?/std", - "sp-io/std", "sp-runtime/std", ] runtime-benchmarks = [ diff --git a/substrate/frame/asset-rewards/Cargo.toml b/substrate/frame/asset-rewards/Cargo.toml index a03fa17cf0dc0..2803f7ea594e4 100644 --- a/substrate/frame/asset-rewards/Cargo.toml +++ b/substrate/frame/asset-rewards/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-asset-rewards" -version = "0.1.0" +version = "0.3.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -18,19 +18,19 @@ targets = ["x86_64-unknown-linux-gnu"] codec = { workspace = true } frame-benchmarking = { workspace = true, optional = true } frame-support = { workspace = true, features = ["experimental"] } -frame-system = { workspace = true } +frame-system.workspace = true scale-info = { workspace = true, features = ["derive"] } -sp-api = { workspace = true } -sp-arithmetic = { workspace = true } -sp-core = { workspace = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } -sp-std = { workspace = true } +sp-api.workspace = true +sp-arithmetic.workspace = true +sp-core.workspace = true +sp-io.workspace = true +sp-runtime.workspace = true +sp-std.workspace = true [dev-dependencies] -pallet-assets = { workspace = true } -pallet-assets-freezer = { workspace = true } -pallet-balances = { workspace = true } +pallet-assets = { workspace = true, default-features = false } +pallet-assets-freezer = { workspace = true, default-features = false } +pallet-balances = { workspace = true, default-features = false } primitive-types = { workspace = true, features = ["codec", "num-traits", "scale-info"] } [features] diff --git a/substrate/frame/assets-freezer/Cargo.toml b/substrate/frame/assets-freezer/Cargo.toml index d8c0ee6e442b2..6145c63eef588 100644 --- a/substrate/frame/assets-freezer/Cargo.toml +++ b/substrate/frame/assets-freezer/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-assets-freezer" -version = "0.1.0" +version = "0.8.0" authors.workspace = true edition.workspace = true license = "MIT-0" @@ -18,11 +18,11 @@ targets = ["x86_64-unknown-linux-gnu"] codec = { workspace = true } frame = { workspace = true, features = ["runtime"] } log = { workspace = true } -pallet-assets = { workspace = true } +pallet-assets.workspace = true scale-info = { features = ["derive"], workspace = true } [dev-dependencies] -pallet-balances = { workspace = true } +pallet-balances = { workspace = true, default-features = false } [features] default = ["std"] diff --git a/substrate/frame/assets-holder/Cargo.toml b/substrate/frame/assets-holder/Cargo.toml index cb0de25f95de8..6eef9a9353b9c 100644 --- a/substrate/frame/assets-holder/Cargo.toml +++ b/substrate/frame/assets-holder/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-assets-holder" -version = "0.1.0" +version = "0.3.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -17,17 +17,17 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { workspace = true } frame-benchmarking = { optional = true, workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true log = { workspace = true } -pallet-assets = { workspace = true } +pallet-assets.workspace = true scale-info = { features = ["derive"], workspace = true } -sp-runtime = { workspace = true } +sp-runtime.workspace = true [dev-dependencies] -pallet-balances = { workspace = true } -sp-core = { workspace = true } -sp-io = { workspace = true } +pallet-balances = { workspace = true, default-features = false } +sp-core = { workspace = true, default-features = false } +sp-io = { workspace = true, default-features = false } [features] default = ["std"] diff --git a/substrate/frame/assets/Cargo.toml b/substrate/frame/assets/Cargo.toml index d893e7ad11fa1..0c2102db0c683 100644 --- a/substrate/frame/assets/Cargo.toml +++ b/substrate/frame/assets/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-assets" -version = "29.1.0" +version = "43.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -17,23 +17,20 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { workspace = true } -ethereum-standards = { workspace = true } +ethereum-standards.workspace = true +frame-benchmarking = { optional = true, workspace = true } +frame-support.workspace = true +frame-system.workspace = true impl-trait-for-tuples = { workspace = true } log = { workspace = true } +pallet-revive.workspace = true scale-info = { features = ["derive"], workspace = true } -# Needed for various traits. In our case, `OnFinalize`. -sp-runtime = { workspace = true } -# Needed for type-safe access to storage DB. -frame-support = { workspace = true } -# `system` module provides us with all sorts of useful stuff and macros depend on it being around. -frame-benchmarking = { optional = true, workspace = true } -frame-system = { workspace = true } -pallet-revive = { workspace = true } -sp-core = { workspace = true } +sp-core.workspace = true +sp-runtime.workspace = true [dev-dependencies] -pallet-balances = { workspace = true, default-features = true } -sp-io = { workspace = true, default-features = true } +pallet-balances = { default-features = true, workspace = true } +sp-io = { default-features = true, workspace = true } [features] default = ["std"] @@ -43,11 +40,9 @@ std = [ "frame-support/std", "frame-system/std", "log/std", - "pallet-balances/std", "pallet-revive/std", "scale-info/std", "sp-core/std", - "sp-io/std", "sp-runtime/std", ] runtime-benchmarks = [ diff --git a/substrate/frame/atomic-swap/Cargo.toml b/substrate/frame/atomic-swap/Cargo.toml index 05a38ded91c51..cccc884689aee 100644 --- a/substrate/frame/atomic-swap/Cargo.toml +++ b/substrate/frame/atomic-swap/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-atomic-swap" -version = "28.0.0" +version = "41.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -21,14 +21,13 @@ frame = { workspace = true, features = ["runtime"] } scale-info = { features = ["derive"], workspace = true } [dev-dependencies] -pallet-balances = { workspace = true, default-features = true } +pallet-balances = { default-features = true, workspace = true } [features] default = ["std"] std = [ "codec/std", "frame/std", - "pallet-balances/std", "scale-info/std", ] try-runtime = [ diff --git a/substrate/frame/aura/Cargo.toml b/substrate/frame/aura/Cargo.toml index 94a47e4d96cd6..7abb5aabc391e 100644 --- a/substrate/frame/aura/Cargo.toml +++ b/substrate/frame/aura/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-aura" -version = "27.0.0" +version = "40.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -17,18 +17,18 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { features = ["derive", "max-encoded-len"], workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true log = { workspace = true } -pallet-timestamp = { workspace = true } +pallet-timestamp.workspace = true scale-info = { features = ["derive"], workspace = true } -sp-application-crypto = { workspace = true } -sp-consensus-aura = { workspace = true } -sp-runtime = { workspace = true } +sp-application-crypto.workspace = true +sp-consensus-aura.workspace = true +sp-runtime.workspace = true [dev-dependencies] -sp-core = { workspace = true } -sp-io = { workspace = true, default-features = true } +sp-core = { workspace = true, default-features = false } +sp-io = { default-features = true, workspace = true } [features] default = ["std"] @@ -42,7 +42,6 @@ std = [ "sp-application-crypto/std", "sp-consensus-aura/std", "sp-core/std", - "sp-io/std", "sp-runtime/std", ] try-runtime = [ diff --git a/substrate/frame/authority-discovery/Cargo.toml b/substrate/frame/authority-discovery/Cargo.toml index 8b48835d07597..8eaf6a81d1cf0 100644 --- a/substrate/frame/authority-discovery/Cargo.toml +++ b/substrate/frame/authority-discovery/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-authority-discovery" -version = "28.0.0" +version = "41.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -17,17 +17,17 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { features = ["derive"], workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true pallet-session = { features = ["historical"], workspace = true } scale-info = { features = ["derive"], workspace = true } -sp-application-crypto = { workspace = true } -sp-authority-discovery = { workspace = true } -sp-runtime = { workspace = true } +sp-application-crypto.workspace = true +sp-authority-discovery.workspace = true +sp-runtime.workspace = true [dev-dependencies] -sp-core = { workspace = true, default-features = true } -sp-io = { workspace = true, default-features = true } +sp-core = { default-features = true, workspace = true } +sp-io = { default-features = true, workspace = true } [features] default = ["std"] @@ -39,8 +39,6 @@ std = [ "scale-info/std", "sp-application-crypto/std", "sp-authority-discovery/std", - "sp-core/std", - "sp-io/std", "sp-runtime/std", ] try-runtime = [ diff --git a/substrate/frame/authorship/Cargo.toml b/substrate/frame/authorship/Cargo.toml index ddc7a052e7233..d277cc534588c 100644 --- a/substrate/frame/authorship/Cargo.toml +++ b/substrate/frame/authorship/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-authorship" -version = "28.0.0" +version = "41.0.0" description = "Block and Uncle Author tracking for the FRAME" authors.workspace = true edition.workspace = true @@ -17,15 +17,15 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { features = ["derive"], workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true impl-trait-for-tuples = { workspace = true } scale-info = { features = ["derive"], workspace = true } -sp-runtime = { workspace = true } +sp-runtime.workspace = true [dev-dependencies] -sp-core = { workspace = true, default-features = true } -sp-io = { workspace = true, default-features = true } +sp-core = { default-features = true, workspace = true } +sp-io = { default-features = true, workspace = true } [features] default = ["std"] @@ -34,8 +34,6 @@ std = [ "frame-support/std", "frame-system/std", "scale-info/std", - "sp-core/std", - "sp-io/std", "sp-runtime/std", ] try-runtime = [ diff --git a/substrate/frame/babe/Cargo.toml b/substrate/frame/babe/Cargo.toml index 0fa83b391145c..c929d940d0e34 100644 --- a/substrate/frame/babe/Cargo.toml +++ b/substrate/frame/babe/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-babe" -version = "28.0.0" +version = "41.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -18,44 +18,40 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { features = ["derive"], workspace = true } frame-benchmarking = { optional = true, workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true log = { workspace = true } -pallet-authorship = { workspace = true } -pallet-session = { workspace = true } -pallet-timestamp = { workspace = true } +pallet-authorship.workspace = true +pallet-session.workspace = true +pallet-timestamp.workspace = true scale-info = { features = ["derive", "serde"], workspace = true } sp-application-crypto = { features = ["serde"], workspace = true } sp-consensus-babe = { features = ["serde"], workspace = true } sp-core = { features = ["serde"], workspace = true } -sp-io = { workspace = true } +sp-io.workspace = true sp-runtime = { features = ["serde"], workspace = true } -sp-session = { workspace = true } +sp-session.workspace = true sp-staking = { features = ["serde"], workspace = true } [dev-dependencies] -frame-election-provider-support = { workspace = true, default-features = true } -pallet-balances = { workspace = true, default-features = true } -pallet-offences = { workspace = true, default-features = true } -pallet-staking = { workspace = true, default-features = true } -pallet-staking-reward-curve = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-tracing = { workspace = true, default-features = true } +frame-election-provider-support = { default-features = true, workspace = true } +pallet-balances = { default-features = true, workspace = true } +pallet-offences = { default-features = true, workspace = true } +pallet-staking = { default-features = true, workspace = true } +pallet-staking-reward-curve = { default-features = true, workspace = true } +sp-core = { default-features = true, workspace = true } +sp-tracing = { default-features = true, workspace = true } [features] default = ["std"] std = [ "codec/std", "frame-benchmarking?/std", - "frame-election-provider-support/std", "frame-support/std", "frame-system/std", "log/std", "pallet-authorship/std", - "pallet-balances/std", - "pallet-offences/std", "pallet-session/std", - "pallet-staking/std", "pallet-timestamp/std", "scale-info/std", "sp-application-crypto/std", diff --git a/substrate/frame/bags-list/Cargo.toml b/substrate/frame/bags-list/Cargo.toml index 24b894f0d4c9f..7fd7e1827572a 100644 --- a/substrate/frame/bags-list/Cargo.toml +++ b/substrate/frame/bags-list/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-bags-list" -version = "27.0.0" +version = "40.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -17,35 +17,29 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] # parity codec = { features = ["derive"], workspace = true } +frame-election-provider-support.workspace = true +frame-support.workspace = true +frame-system.workspace = true scale-info = { features = ["derive"], workspace = true } - -# primitives -sp-runtime = { workspace = true } - -# FRAME -frame-election-provider-support = { workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +sp-runtime.workspace = true # third party aquamarine = { workspace = true } docify = { workspace = true } -log = { workspace = true } - -# Optional imports for benchmarking frame-benchmarking = { optional = true, workspace = true } +log = { workspace = true } pallet-balances = { optional = true, workspace = true } sp-core = { optional = true, workspace = true } sp-io = { optional = true, workspace = true } sp-tracing = { optional = true, workspace = true } [dev-dependencies] -frame-benchmarking = { workspace = true, default-features = true } -frame-election-provider-support = { workspace = true, default-features = true } -pallet-balances = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-io = { workspace = true, default-features = true } -sp-tracing = { workspace = true, default-features = true } +frame-benchmarking = { default-features = true, workspace = true } +frame-election-provider-support = { default-features = true, workspace = true } +pallet-balances = { default-features = true, workspace = true } +sp-core = { default-features = true, workspace = true } +sp-io = { default-features = true, workspace = true } +sp-tracing = { default-features = true, workspace = true } [features] default = ["std"] diff --git a/substrate/frame/bags-list/fuzzer/Cargo.toml b/substrate/frame/bags-list/fuzzer/Cargo.toml index 06a25c6149fdc..274c35c6f093c 100644 --- a/substrate/frame/bags-list/fuzzer/Cargo.toml +++ b/substrate/frame/bags-list/fuzzer/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-bags-list-fuzzer" -version = "4.0.0-dev" +version = "4.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" diff --git a/substrate/frame/bags-list/remote-tests/Cargo.toml b/substrate/frame/bags-list/remote-tests/Cargo.toml index d902a30bac509..307d1df74d520 100644 --- a/substrate/frame/bags-list/remote-tests/Cargo.toml +++ b/substrate/frame/bags-list/remote-tests/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-bags-list-remote-tests" -version = "4.0.0-dev" +version = "4.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -16,19 +16,21 @@ workspace = true targets = ["x86_64-unknown-linux-gnu"] [dependencies] -# frame -frame-election-provider-support = { workspace = true, default-features = true } -frame-support = { workspace = true, default-features = true } -frame-system = { workspace = true, default-features = true } +frame-election-provider-support.default-features = true +frame-election-provider-support.workspace = true +frame-support.default-features = true +frame-support.workspace = true +frame-system.default-features = true +frame-system.workspace = true pallet-bags-list = { features = ["fuzz"], workspace = true, default-features = true } -pallet-staking = { workspace = true, default-features = true } - -# core -sp-core = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } - -# utils -remote-externalities = { workspace = true, default-features = true } +pallet-staking.default-features = true +pallet-staking.workspace = true +remote-externalities.default-features = true +remote-externalities.workspace = true +sp-core.default-features = true +sp-core.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true # others log = { workspace = true, default-features = true } diff --git a/substrate/frame/balances/Cargo.toml b/substrate/frame/balances/Cargo.toml index e50fd985138c1..282b1210c1f90 100644 --- a/substrate/frame/balances/Cargo.toml +++ b/substrate/frame/balances/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-balances" -version = "28.0.0" +version = "42.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -19,18 +19,18 @@ targets = ["x86_64-unknown-linux-gnu"] codec = { features = ["derive", "max-encoded-len"], workspace = true } docify = { workspace = true } frame-benchmarking = { optional = true, workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true log = { workspace = true } scale-info = { features = ["derive"], workspace = true } -sp-core = { workspace = true } -sp-runtime = { workspace = true } +sp-core.workspace = true +sp-runtime.workspace = true [dev-dependencies] -frame-support = { features = ["experimental"], workspace = true, default-features = true } -pallet-transaction-payment = { workspace = true, default-features = true } +frame-support = { features = ["experimental"], default-features = true, workspace = true } +pallet-transaction-payment = { default-features = true, workspace = true } paste = { workspace = true, default-features = true } -sp-io = { workspace = true, default-features = true } +sp-io = { default-features = true, workspace = true } [features] default = ["std"] @@ -40,10 +40,8 @@ std = [ "frame-support/std", "frame-system/std", "log/std", - "pallet-transaction-payment/std", "scale-info/std", "sp-core/std", - "sp-io/std", "sp-runtime/std", ] # Enable support for setting the existential deposit to zero. diff --git a/substrate/frame/beefy-mmr/Cargo.toml b/substrate/frame/beefy-mmr/Cargo.toml index 54343bb9ce51a..8a67c5d3d8e93 100644 --- a/substrate/frame/beefy-mmr/Cargo.toml +++ b/substrate/frame/beefy-mmr/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-beefy-mmr" -version = "28.0.0" +version = "42.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -13,27 +13,27 @@ workspace = true [dependencies] array-bytes = { optional = true, workspace = true, default-features = true } -binary-merkle-tree = { workspace = true } +binary-merkle-tree.workspace = true codec = { features = ["derive"], workspace = true } frame-benchmarking = { optional = true, workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true log = { workspace = true } -pallet-beefy = { workspace = true } -pallet-mmr = { workspace = true } -pallet-session = { workspace = true } +pallet-beefy.workspace = true +pallet-mmr.workspace = true +pallet-session.workspace = true scale-info = { features = ["derive"], workspace = true } serde = { optional = true, workspace = true, default-features = true } -sp-api = { workspace = true } -sp-consensus-beefy = { workspace = true } -sp-core = { workspace = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } -sp-state-machine = { workspace = true } +sp-api.workspace = true +sp-consensus-beefy.workspace = true +sp-core.workspace = true +sp-io.workspace = true +sp-runtime.workspace = true +sp-state-machine.workspace = true [dev-dependencies] array-bytes = { workspace = true, default-features = true } -sp-staking = { workspace = true, default-features = true } +sp-staking = { default-features = true, workspace = true } [features] default = ["std"] @@ -55,7 +55,6 @@ std = [ "sp-core/std", "sp-io/std", "sp-runtime/std", - "sp-staking/std", "sp-state-machine/std", ] try-runtime = [ diff --git a/substrate/frame/beefy/Cargo.toml b/substrate/frame/beefy/Cargo.toml index 1cb4c41f41b09..1ecdb7f893ab6 100644 --- a/substrate/frame/beefy/Cargo.toml +++ b/substrate/frame/beefy/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-beefy" -version = "28.0.0" +version = "42.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -13,50 +13,43 @@ workspace = true [dependencies] codec = { features = ["derive"], workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true log = { workspace = true } -pallet-authorship = { workspace = true } -pallet-session = { workspace = true } +pallet-authorship.workspace = true +pallet-session.workspace = true scale-info = { features = ["derive", "serde"], workspace = true } serde = { optional = true, workspace = true, default-features = true } sp-consensus-beefy = { features = ["serde"], workspace = true } sp-runtime = { features = ["serde"], workspace = true } -sp-session = { workspace = true } +sp-session.workspace = true sp-staking = { features = ["serde"], workspace = true } [dev-dependencies] -frame-election-provider-support = { workspace = true, default-features = true } -pallet-balances = { workspace = true, default-features = true } -pallet-offences = { workspace = true, default-features = true } -pallet-staking = { workspace = true, default-features = true } -pallet-staking-reward-curve = { workspace = true, default-features = true } -pallet-timestamp = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-io = { workspace = true, default-features = true } -sp-staking = { workspace = true, default-features = true } -sp-state-machine = { workspace = true } -sp-tracing = { workspace = true, default-features = true } +frame-election-provider-support = { default-features = true, workspace = true } +pallet-balances = { default-features = true, workspace = true } +pallet-offences = { default-features = true, workspace = true } +pallet-staking = { default-features = true, workspace = true } +pallet-staking-reward-curve = { default-features = true, workspace = true } +pallet-timestamp = { default-features = true, workspace = true } +sp-core = { default-features = true, workspace = true } +sp-io = { default-features = true, workspace = true } +sp-staking = { default-features = true, workspace = true } +sp-state-machine = { workspace = true, default-features = false } +sp-tracing = { default-features = true, workspace = true } [features] default = ["std"] std = [ "codec/std", - "frame-election-provider-support/std", "frame-support/std", "frame-system/std", "log/std", "pallet-authorship/std", - "pallet-balances/std", - "pallet-offences/std", "pallet-session/std", - "pallet-staking/std", - "pallet-timestamp/std", "scale-info/std", "serde/std", "sp-consensus-beefy/std", - "sp-core/std", - "sp-io/std", "sp-runtime/std", "sp-session/std", "sp-staking/std", diff --git a/substrate/frame/benchmarking/Cargo.toml b/substrate/frame/benchmarking/Cargo.toml index fabeb9a03195a..3015907ad836d 100644 --- a/substrate/frame/benchmarking/Cargo.toml +++ b/substrate/frame/benchmarking/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "frame-benchmarking" -version = "28.0.0" +version = "41.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -17,30 +17,30 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { workspace = true } -frame-support = { workspace = true } -frame-support-procedural = { workspace = true } -frame-system = { workspace = true } +frame-support-procedural.workspace = true +frame-support.workspace = true +frame-system.workspace = true linregress = { optional = true, workspace = true } log = { workspace = true } paste = { workspace = true, default-features = true } scale-info = { features = ["derive"], workspace = true } serde = { optional = true, workspace = true, default-features = true } -sp-api = { workspace = true } -sp-application-crypto = { workspace = true } -sp-core = { workspace = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } -sp-runtime-interface = { workspace = true } -sp-storage = { workspace = true } +sp-api.workspace = true +sp-application-crypto.workspace = true +sp-core.workspace = true +sp-io.workspace = true +sp-runtime-interface.workspace = true +sp-runtime.workspace = true +sp-storage.workspace = true static_assertions = { workspace = true, default-features = true } [dev-dependencies] array-bytes = { workspace = true, default-features = true } rusty-fork = { workspace = true } -sc-client-db = { workspace = true } -sp-externalities = { workspace = true } -sp-keystore = { workspace = true, default-features = true } -sp-state-machine = { workspace = true } +sc-client-db = { workspace = true, default-features = false } +sp-externalities = { workspace = true, default-features = false } +sp-keystore = { default-features = true, workspace = true } +sp-state-machine = { workspace = true, default-features = false } [features] default = ["std"] @@ -58,7 +58,6 @@ std = [ "sp-core/std", "sp-externalities/std", "sp-io/std", - "sp-keystore/std", "sp-runtime-interface/std", "sp-runtime/std", "sp-state-machine/std", diff --git a/substrate/frame/benchmarking/pov/Cargo.toml b/substrate/frame/benchmarking/pov/Cargo.toml index 47c6d6e5e4bc8..d8e9dd0ac0cba 100644 --- a/substrate/frame/benchmarking/pov/Cargo.toml +++ b/substrate/frame/benchmarking/pov/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "frame-benchmarking-pallet-pov" -version = "18.0.0" +version = "31.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -16,12 +16,12 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { workspace = true } -frame-benchmarking = { workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-benchmarking.workspace = true +frame-support.workspace = true +frame-system.workspace = true scale-info = { features = ["derive"], workspace = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } +sp-io.workspace = true +sp-runtime.workspace = true [features] default = ["std"] diff --git a/substrate/frame/bounties/Cargo.toml b/substrate/frame/bounties/Cargo.toml index fbeb51099c1f1..c3024b1ff06e9 100644 --- a/substrate/frame/bounties/Cargo.toml +++ b/substrate/frame/bounties/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-bounties" -version = "27.0.0" +version = "40.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -18,17 +18,17 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { features = ["derive"], workspace = true } frame-benchmarking = { optional = true, workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true log = { workspace = true } -pallet-treasury = { workspace = true } +pallet-treasury.workspace = true scale-info = { features = ["derive"], workspace = true } -sp-core = { workspace = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } +sp-core.workspace = true +sp-io.workspace = true +sp-runtime.workspace = true [dev-dependencies] -pallet-balances = { workspace = true, default-features = true } +pallet-balances = { default-features = true, workspace = true } [features] default = ["std"] @@ -38,7 +38,6 @@ std = [ "frame-support/std", "frame-system/std", "log/std", - "pallet-balances/std", "pallet-treasury/std", "scale-info/std", "sp-core/std", diff --git a/substrate/frame/broker/Cargo.toml b/substrate/frame/broker/Cargo.toml index b5d822373d2c4..f6c5fb9101f14 100644 --- a/substrate/frame/broker/Cargo.toml +++ b/substrate/frame/broker/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-broker" -version = "0.6.0" +version = "0.20.0" description = "Brokerage tool for managing Polkadot Core scheduling" authors.workspace = true homepage.workspace = true @@ -18,19 +18,19 @@ targets = ["x86_64-unknown-linux-gnu"] bitvec = { workspace = true } codec = { features = ["derive"], workspace = true } frame-benchmarking = { optional = true, workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true log = { workspace = true } scale-info = { features = ["derive"], workspace = true } -sp-api = { workspace = true } -sp-arithmetic = { workspace = true } -sp-core = { workspace = true } -sp-runtime = { workspace = true } +sp-api.workspace = true +sp-arithmetic.workspace = true +sp-core.workspace = true +sp-runtime.workspace = true [dev-dependencies] pretty_assertions = { workspace = true } -sp-io = { workspace = true, default-features = true } -sp-tracing = { workspace = true, default-features = true } +sp-io = { default-features = true, workspace = true } +sp-tracing = { default-features = true, workspace = true } [features] default = ["std"] @@ -45,7 +45,6 @@ std = [ "sp-api/std", "sp-arithmetic/std", "sp-core/std", - "sp-io/std", "sp-runtime/std", ] runtime-benchmarks = [ diff --git a/substrate/frame/child-bounties/Cargo.toml b/substrate/frame/child-bounties/Cargo.toml index d0bdc1856a5c4..c4036786f5db5 100644 --- a/substrate/frame/child-bounties/Cargo.toml +++ b/substrate/frame/child-bounties/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-child-bounties" -version = "27.0.0" +version = "40.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -18,18 +18,18 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { features = ["derive"], workspace = true } frame-benchmarking = { optional = true, workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true log = { workspace = true } -pallet-bounties = { workspace = true } -pallet-treasury = { workspace = true } +pallet-bounties.workspace = true +pallet-treasury.workspace = true scale-info = { features = ["derive"], workspace = true } -sp-core = { workspace = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } +sp-core.workspace = true +sp-io.workspace = true +sp-runtime.workspace = true [dev-dependencies] -pallet-balances = { workspace = true, default-features = true } +pallet-balances = { default-features = true, workspace = true } [features] default = ["std"] @@ -39,7 +39,6 @@ std = [ "frame-support/std", "frame-system/std", "log/std", - "pallet-balances/std", "pallet-bounties/std", "pallet-treasury/std", "scale-info/std", diff --git a/substrate/frame/collective/Cargo.toml b/substrate/frame/collective/Cargo.toml index 8e53000352aea..dd356931ea6a3 100644 --- a/substrate/frame/collective/Cargo.toml +++ b/substrate/frame/collective/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-collective" -version = "28.0.0" +version = "41.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -20,15 +20,15 @@ codec = { features = ["derive"], workspace = true } docify = { workspace = true } frame-benchmarking = { optional = true, workspace = true } frame-support = { features = ["experimental"], workspace = true } -frame-system = { workspace = true } +frame-system.workspace = true log = { workspace = true } scale-info = { features = ["derive"], workspace = true } -sp-core = { workspace = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } +sp-core.workspace = true +sp-io.workspace = true +sp-runtime.workspace = true [dev-dependencies] -pallet-balances = { workspace = true, default-features = false } +pallet-balances = { default-features = false, workspace = true } [features] default = ["std"] diff --git a/substrate/frame/contracts/Cargo.toml b/substrate/frame/contracts/Cargo.toml index 35906b11c498a..3d5f1b215e85b 100644 --- a/substrate/frame/contracts/Cargo.toml +++ b/substrate/frame/contracts/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-contracts" -version = "27.0.0" +version = "41.0.0" authors.workspace = true edition.workspace = true build = "build.rs" @@ -35,37 +35,38 @@ wasm-instrument = { optional = true, workspace = true } # Substrate Dependencies environmental = { workspace = true } frame-benchmarking = { optional = true, workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true pallet-balances = { optional = true, workspace = true } -pallet-contracts-proc-macro = { workspace = true, default-features = true } -pallet-contracts-uapi = { workspace = true, default-features = true } -sp-api = { workspace = true } -sp-core = { workspace = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } - -xcm = { workspace = true } -xcm-builder = { workspace = true } +pallet-contracts-proc-macro.default-features = true +pallet-contracts-proc-macro.workspace = true +pallet-contracts-uapi.default-features = true +pallet-contracts-uapi.workspace = true +sp-api.workspace = true +sp-core.workspace = true +sp-io.workspace = true +sp-runtime.workspace = true +xcm-builder.workspace = true +xcm.workspace = true [dev-dependencies] array-bytes = { workspace = true, default-features = true } assert_matches = { workspace = true } -pallet-contracts-fixtures = { workspace = true } +pallet-contracts-fixtures = { workspace = true, default-features = false } pretty_assertions = { workspace = true } wat = { workspace = true } # Polkadot Dependencies -xcm-builder = { workspace = true, default-features = true } +xcm-builder = { default-features = true, workspace = true } # Substrate Dependencies -pallet-balances = { workspace = true, default-features = true } -pallet-insecure-randomness-collective-flip = { workspace = true, default-features = true } -pallet-proxy = { workspace = true, default-features = true } -pallet-timestamp = { workspace = true, default-features = true } -pallet-utility = { workspace = true, default-features = true } -sp-keystore = { workspace = true, default-features = true } -sp-tracing = { workspace = true, default-features = true } +pallet-balances = { default-features = true, workspace = true } +pallet-insecure-randomness-collective-flip = { default-features = true, workspace = true } +pallet-proxy = { default-features = true, workspace = true } +pallet-timestamp = { default-features = true, workspace = true } +pallet-utility = { default-features = true, workspace = true } +sp-keystore = { default-features = true, workspace = true } +sp-tracing = { default-features = true, workspace = true } [features] default = ["std"] @@ -77,17 +78,12 @@ std = [ "frame-system/std", "log/std", "pallet-balances?/std", - "pallet-insecure-randomness-collective-flip/std", - "pallet-proxy/std", - "pallet-timestamp/std", - "pallet-utility/std", "rand?/std", "scale-info/std", "serde", "sp-api/std", "sp-core/std", "sp-io/std", - "sp-keystore/std", "sp-runtime/std", "wasm-instrument?/std", "wasmi/std", diff --git a/substrate/frame/contracts/fixtures/Cargo.toml b/substrate/frame/contracts/fixtures/Cargo.toml index cf31f9eccc9c6..090b0b6225e1a 100644 --- a/substrate/frame/contracts/fixtures/Cargo.toml +++ b/substrate/frame/contracts/fixtures/Cargo.toml @@ -12,8 +12,10 @@ workspace = true [dependencies] anyhow = { workspace = true, default-features = true } -frame-system = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } +frame-system.default-features = true +frame-system.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true [build-dependencies] anyhow = { workspace = true, default-features = true } diff --git a/substrate/frame/contracts/mock-network/Cargo.toml b/substrate/frame/contracts/mock-network/Cargo.toml index 8e466789a9562..734d008d71909 100644 --- a/substrate/frame/contracts/mock-network/Cargo.toml +++ b/substrate/frame/contracts/mock-network/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-contracts-mock-network" -version = "3.0.0" +version = "18.0.0" authors.workspace = true edition.workspace = true license.workspace = true @@ -13,33 +13,44 @@ workspace = true [dependencies] codec = { features = ["derive", "max-encoded-len"], workspace = true } - -frame-support = { workspace = true } -frame-system = { workspace = true } -pallet-assets = { workspace = true, default-features = true } -pallet-balances = { workspace = true, default-features = true } -pallet-contracts = { workspace = true, default-features = true } -pallet-contracts-uapi = { workspace = true } -pallet-message-queue = { workspace = true, default-features = true } -pallet-timestamp = { workspace = true, default-features = true } -pallet-xcm = { workspace = true } -polkadot-parachain-primitives = { workspace = true, default-features = true } -polkadot-primitives = { workspace = true, default-features = true } -polkadot-runtime-parachains = { workspace = true, default-features = true } +frame-support.workspace = true +frame-system.workspace = true +pallet-assets.default-features = true +pallet-assets.workspace = true +pallet-balances.default-features = true +pallet-balances.workspace = true +pallet-contracts-uapi.workspace = true +pallet-contracts.default-features = true +pallet-contracts.workspace = true +pallet-message-queue.default-features = true +pallet-message-queue.workspace = true +pallet-timestamp.default-features = true +pallet-timestamp.workspace = true +pallet-xcm.workspace = true +polkadot-parachain-primitives.default-features = true +polkadot-parachain-primitives.workspace = true +polkadot-primitives.default-features = true +polkadot-primitives.workspace = true +polkadot-runtime-parachains.default-features = true +polkadot-runtime-parachains.workspace = true scale-info = { features = ["derive"], workspace = true } -sp-api = { workspace = true } -sp-core = { workspace = true } -sp-io = { workspace = true } -sp-keystore = { workspace = true, default-features = true } -sp-runtime = { workspace = true } -sp-tracing = { workspace = true, default-features = true } -xcm = { workspace = true } -xcm-builder = { workspace = true, default-features = true } -xcm-executor = { workspace = true } -xcm-simulator = { workspace = true, default-features = true } +sp-api.workspace = true +sp-core.workspace = true +sp-io.workspace = true +sp-keystore.default-features = true +sp-keystore.workspace = true +sp-runtime.workspace = true +sp-tracing.default-features = true +sp-tracing.workspace = true +xcm-builder.default-features = true +xcm-builder.workspace = true +xcm-executor.workspace = true +xcm-simulator.default-features = true +xcm-simulator.workspace = true +xcm.workspace = true [dev-dependencies] -pallet-contracts-fixtures = { workspace = true } +pallet-contracts-fixtures = { workspace = true, default-features = false } [features] default = ["std"] diff --git a/substrate/frame/contracts/proc-macro/Cargo.toml b/substrate/frame/contracts/proc-macro/Cargo.toml index b2c5b4deacf7c..1fcdcbb1e8cdf 100644 --- a/substrate/frame/contracts/proc-macro/Cargo.toml +++ b/substrate/frame/contracts/proc-macro/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-contracts-proc-macro" -version = "18.0.0" +version = "23.0.3" authors.workspace = true edition.workspace = true license = "Apache-2.0" diff --git a/substrate/frame/contracts/uapi/Cargo.toml b/substrate/frame/contracts/uapi/Cargo.toml index 682dd5f57852a..7a83708241193 100644 --- a/substrate/frame/contracts/uapi/Cargo.toml +++ b/substrate/frame/contracts/uapi/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-contracts-uapi" -version = "5.0.0" +version = "14.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" diff --git a/substrate/frame/conviction-voting/Cargo.toml b/substrate/frame/conviction-voting/Cargo.toml index 4fdd670a73539..1dcd817b0f6ba 100644 --- a/substrate/frame/conviction-voting/Cargo.toml +++ b/substrate/frame/conviction-voting/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-conviction-voting" -version = "28.0.0" +version = "41.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -19,16 +19,16 @@ targets = ["x86_64-unknown-linux-gnu"] assert_matches = { workspace = true } codec = { features = ["derive", "max-encoded-len"], workspace = true } frame-benchmarking = { optional = true, workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true scale-info = { features = ["derive"], workspace = true } serde = { features = ["derive"], optional = true, workspace = true, default-features = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } +sp-io.workspace = true +sp-runtime.workspace = true [dev-dependencies] -pallet-balances = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } +pallet-balances = { default-features = true, workspace = true } +sp-core = { default-features = true, workspace = true } [features] default = ["std"] @@ -37,10 +37,8 @@ std = [ "frame-benchmarking?/std", "frame-support/std", "frame-system/std", - "pallet-balances/std", "scale-info/std", "serde", - "sp-core/std", "sp-io/std", "sp-runtime/std", ] diff --git a/substrate/frame/core-fellowship/Cargo.toml b/substrate/frame/core-fellowship/Cargo.toml index c0017f4772514..827807e7acb21 100644 --- a/substrate/frame/core-fellowship/Cargo.toml +++ b/substrate/frame/core-fellowship/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-core-fellowship" -version = "12.0.0" +version = "25.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -18,15 +18,15 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { features = ["derive"], workspace = true } frame-benchmarking = { optional = true, workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true log = { workspace = true } pallet-ranked-collective = { optional = true, workspace = true } scale-info = { features = ["derive"], workspace = true } -sp-arithmetic = { workspace = true } -sp-core = { workspace = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } +sp-arithmetic.workspace = true +sp-core.workspace = true +sp-io.workspace = true +sp-runtime.workspace = true [features] default = ["std"] diff --git a/substrate/frame/delegated-staking/Cargo.toml b/substrate/frame/delegated-staking/Cargo.toml index a08caf6034785..3af3ee3275cf8 100644 --- a/substrate/frame/delegated-staking/Cargo.toml +++ b/substrate/frame/delegated-staking/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-delegated-staking" -version = "1.0.0" +version = "8.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -13,23 +13,23 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { features = ["derive"], workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true log = { workspace = true } scale-info = { features = ["derive"], workspace = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } -sp-staking = { workspace = true } +sp-io.workspace = true +sp-runtime.workspace = true +sp-staking.workspace = true [dev-dependencies] -frame-election-provider-support = { workspace = true } -pallet-balances = { workspace = true, default-features = true } -pallet-nomination-pools = { workspace = true, default-features = true } -pallet-staking = { workspace = true, default-features = true } -pallet-staking-reward-curve = { workspace = true, default-features = true } -pallet-timestamp = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-tracing = { workspace = true, default-features = true } +frame-election-provider-support = { workspace = true, default-features = false } +pallet-balances = { default-features = true, workspace = true } +pallet-nomination-pools = { default-features = true, workspace = true } +pallet-staking = { default-features = true, workspace = true } +pallet-staking-reward-curve = { default-features = true, workspace = true } +pallet-timestamp = { default-features = true, workspace = true } +sp-core = { default-features = true, workspace = true } +sp-tracing = { default-features = true, workspace = true } [features] default = ["std"] @@ -39,12 +39,7 @@ std = [ "frame-support/std", "frame-system/std", "log/std", - "pallet-balances/std", - "pallet-nomination-pools/std", - "pallet-staking/std", - "pallet-timestamp/std", "scale-info/std", - "sp-core/std", "sp-io/std", "sp-runtime/std", "sp-staking/std", diff --git a/substrate/frame/democracy/Cargo.toml b/substrate/frame/democracy/Cargo.toml index b8233dc1d2bbe..4905f6627e3d3 100644 --- a/substrate/frame/democracy/Cargo.toml +++ b/substrate/frame/democracy/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-democracy" -version = "28.0.0" +version = "41.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -18,19 +18,19 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { features = ["derive"], workspace = true } frame-benchmarking = { optional = true, workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true log = { workspace = true } scale-info = { features = ["derive"], workspace = true } serde = { features = ["derive"], optional = true, workspace = true, default-features = true } -sp-core = { workspace = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } +sp-core.workspace = true +sp-io.workspace = true +sp-runtime.workspace = true [dev-dependencies] -pallet-balances = { workspace = true, default-features = true } -pallet-preimage = { workspace = true, default-features = true } -pallet-scheduler = { workspace = true, default-features = true } +pallet-balances = { default-features = true, workspace = true } +pallet-preimage = { default-features = true, workspace = true } +pallet-scheduler = { default-features = true, workspace = true } [features] default = ["std"] @@ -40,9 +40,6 @@ std = [ "frame-support/std", "frame-system/std", "log/std", - "pallet-balances/std", - "pallet-preimage/std", - "pallet-scheduler/std", "scale-info/std", "serde", "sp-core/std", diff --git a/substrate/frame/dummy-dim/Cargo.toml b/substrate/frame/dummy-dim/Cargo.toml index 9734dd47505f6..003af3db9593a 100644 --- a/substrate/frame/dummy-dim/Cargo.toml +++ b/substrate/frame/dummy-dim/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-dummy-dim" -version = "1.0.0" +version = "0.2.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -15,18 +15,18 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { workspace = true, features = ["derive"] } frame-benchmarking = { workspace = true, optional = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true log = { workspace = true } scale-info = { workspace = true, features = ["derive"] } -sp-api = { workspace = true } -sp-arithmetic = { workspace = true } -sp-core = { workspace = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } +sp-api.workspace = true +sp-arithmetic.workspace = true +sp-core.workspace = true +sp-io.workspace = true +sp-runtime.workspace = true [dev-dependencies] -pallet-people = { workspace = true } +pallet-people = { workspace = true, default-features = false } verifiable = { workspace = true, features = ["small-ring"] } [features] diff --git a/substrate/frame/election-provider-multi-block/Cargo.toml b/substrate/frame/election-provider-multi-block/Cargo.toml index 907523d288305..85416af2e1d90 100644 --- a/substrate/frame/election-provider-multi-block/Cargo.toml +++ b/substrate/frame/election-provider-multi-block/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-election-provider-multi-block" -version = "0.9.0" +version = "0.2.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -18,33 +18,29 @@ targets = ["x86_64-unknown-linux-gnu"] codec = { features = [ "derive", ], workspace = true } +frame-benchmarking = { optional = true, workspace = true } +frame-election-provider-support.workspace = true +frame-support.workspace = true +frame-system.workspace = true log = { workspace = true } +rand = { features = ["alloc", "small_rng"], optional = true, workspace = true } scale-info = { features = [ "derive", ], workspace = true } - -frame-election-provider-support = { workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } - -sp-arithmetic = { workspace = true } -sp-core = { workspace = true } -sp-io = { workspace = true } -sp-npos-elections = { workspace = true } -sp-runtime = { workspace = true } -sp-std = { workspace = true } - -# Optional imports for benchmarking -frame-benchmarking = { optional = true, workspace = true } -rand = { features = ["alloc", "small_rng"], optional = true, workspace = true } +sp-arithmetic.workspace = true +sp-core.workspace = true +sp-io.workspace = true +sp-npos-elections.workspace = true +sp-runtime.workspace = true +sp-std.workspace = true [dev-dependencies] -frame-benchmarking = { workspace = true, default-features = true } -pallet-balances = { workspace = true, default-features = true } +frame-benchmarking = { default-features = true, workspace = true } +pallet-balances = { default-features = true, workspace = true } parking_lot = { workspace = true, default-features = true } -sp-core = { workspace = true } -sp-io = { workspace = true, default-features = true } -sp-tracing = { workspace = true, default-features = true } +sp-core = { workspace = true, default-features = false } +sp-io = { default-features = true, workspace = true } +sp-tracing = { default-features = true, workspace = true } [features] default = ["std"] @@ -55,7 +51,6 @@ std = [ "frame-support/std", "frame-system/std", "log/std", - "pallet-balances/std", "rand/std", "scale-info/std", "sp-arithmetic/std", @@ -64,7 +59,6 @@ std = [ "sp-npos-elections/std", "sp-runtime/std", "sp-std/std", - "sp-tracing/std", ] runtime-benchmarks = [ "frame-benchmarking/runtime-benchmarks", diff --git a/substrate/frame/election-provider-multi-phase/Cargo.toml b/substrate/frame/election-provider-multi-phase/Cargo.toml index ec8adc28bc6f2..3c7d081826786 100644 --- a/substrate/frame/election-provider-multi-phase/Cargo.toml +++ b/substrate/frame/election-provider-multi-phase/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-election-provider-multi-phase" -version = "27.0.0" +version = "40.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -16,36 +16,32 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { features = ["derive"], workspace = true } -log = { workspace = true } -scale-info = { features = ["derive"], workspace = true } - -frame-support = { workspace = true } -frame-system = { workspace = true } - -frame-election-provider-support = { workspace = true } -sp-arithmetic = { workspace = true } -sp-core = { workspace = true } -sp-io = { workspace = true } -sp-npos-elections = { workspace = true } -sp-runtime = { workspace = true } - -# Optional imports for benchmarking frame-benchmarking = { optional = true, workspace = true } +frame-election-provider-support.workspace = true +frame-support.workspace = true +frame-system.workspace = true +log = { workspace = true } rand = { features = ["alloc", "small_rng"], optional = true, workspace = true } +scale-info = { features = ["derive"], workspace = true } +sp-arithmetic.workspace = true +sp-core.workspace = true +sp-io.workspace = true +sp-npos-elections.workspace = true +sp-runtime.workspace = true strum = { features = ["derive"], optional = true, workspace = true } # optional for remote testing hex = { workspace = true, default-features = true, optional = true } -remote-externalities = { workspace = true, default-features = true, optional = true } +remote-externalities = { workspace = true, optional = true, default-features = true } tokio = { features = ["macros"], workspace = true, default-features = true, optional = true } [dev-dependencies] -frame-benchmarking = { workspace = true, default-features = true } -pallet-balances = { workspace = true, default-features = true } +frame-benchmarking = { default-features = true, workspace = true } +pallet-balances = { default-features = true, workspace = true } parking_lot = { workspace = true, default-features = true } rand = { workspace = true, default-features = true } -sp-npos-elections = { workspace = true } -sp-tracing = { workspace = true, default-features = true } +sp-npos-elections = { workspace = true, default-features = false } +sp-tracing = { default-features = true, workspace = true } [features] @@ -58,7 +54,6 @@ std = [ "frame-support/std", "frame-system/std", "log/std", - "pallet-balances/std", "rand/std", "scale-info/std", "sp-arithmetic/std", @@ -66,7 +61,6 @@ std = [ "sp-io/std", "sp-npos-elections/std", "sp-runtime/std", - "sp-tracing/std", "strum/std", ] runtime-benchmarks = [ diff --git a/substrate/frame/election-provider-multi-phase/test-staking-e2e/Cargo.toml b/substrate/frame/election-provider-multi-phase/test-staking-e2e/Cargo.toml index f11f9c04dbf4a..4593385518e9f 100644 --- a/substrate/frame/election-provider-multi-phase/test-staking-e2e/Cargo.toml +++ b/substrate/frame/election-provider-multi-phase/test-staking-e2e/Cargo.toml @@ -21,25 +21,25 @@ log = { workspace = true } parking_lot = { workspace = true, default-features = true } scale-info = { features = ["derive"], workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-io = { workspace = true, default-features = true } -sp-npos-elections = { workspace = true } -sp-runtime = { workspace = true, default-features = true } -sp-staking = { workspace = true, default-features = true } -sp-tracing = { workspace = true, default-features = true } +sp-core = { default-features = true, workspace = true } +sp-io = { default-features = true, workspace = true } +sp-npos-elections = { workspace = true, default-features = false } +sp-runtime = { default-features = true, workspace = true } +sp-staking = { default-features = true, workspace = true } +sp-tracing = { default-features = true, workspace = true } -frame-election-provider-support = { workspace = true, default-features = true } -frame-support = { workspace = true, default-features = true } -frame-system = { workspace = true, default-features = true } +frame-election-provider-support = { default-features = true, workspace = true } +frame-support = { default-features = true, workspace = true } +frame-system = { default-features = true, workspace = true } -pallet-bags-list = { workspace = true, default-features = true } -pallet-balances = { workspace = true, default-features = true } -pallet-delegated-staking = { workspace = true, default-features = true } -pallet-election-provider-multi-phase = { workspace = true, default-features = true } -pallet-nomination-pools = { workspace = true, default-features = true } -pallet-session = { workspace = true, default-features = true } -pallet-staking = { workspace = true, default-features = true } -pallet-timestamp = { workspace = true, default-features = true } +pallet-bags-list = { default-features = true, workspace = true } +pallet-balances = { default-features = true, workspace = true } +pallet-delegated-staking = { default-features = true, workspace = true } +pallet-election-provider-multi-phase = { default-features = true, workspace = true } +pallet-nomination-pools = { default-features = true, workspace = true } +pallet-session = { default-features = true, workspace = true } +pallet-staking = { default-features = true, workspace = true } +pallet-timestamp = { default-features = true, workspace = true } [features] try-runtime = [ diff --git a/substrate/frame/election-provider-support/Cargo.toml b/substrate/frame/election-provider-support/Cargo.toml index aadf87edb0e6f..0de0e06dc6e0a 100644 --- a/substrate/frame/election-provider-support/Cargo.toml +++ b/substrate/frame/election-provider-support/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "frame-election-provider-support" -version = "28.0.0" +version = "41.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -16,21 +16,22 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { features = ["derive"], workspace = true } -frame-election-provider-solution-type = { workspace = true, default-features = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-election-provider-solution-type.default-features = true +frame-election-provider-solution-type.workspace = true +frame-support.workspace = true +frame-system.workspace = true scale-info = { features = ["derive"], workspace = true } -sp-arithmetic = { workspace = true } -sp-core = { workspace = true } -sp-npos-elections = { workspace = true } -sp-runtime = { workspace = true } -sp-std = { workspace = true } +sp-arithmetic.workspace = true +sp-core.workspace = true +sp-npos-elections.workspace = true +sp-runtime.workspace = true +sp-std.workspace = true [dev-dependencies] rand = { features = ["small_rng"], workspace = true, default-features = true } -sp-io = { workspace = true, default-features = true } -sp-npos-elections = { workspace = true, default-features = true } +sp-io = { default-features = true, workspace = true } +sp-npos-elections = { default-features = true, workspace = true } [features] default = ["std"] @@ -42,7 +43,6 @@ std = [ "scale-info/std", "sp-arithmetic/std", "sp-core/std", - "sp-io/std", "sp-npos-elections/std", "sp-runtime/std", "sp-std/std", diff --git a/substrate/frame/election-provider-support/benchmarking/Cargo.toml b/substrate/frame/election-provider-support/benchmarking/Cargo.toml index 2d459b3a06093..cc70fe813591a 100644 --- a/substrate/frame/election-provider-support/benchmarking/Cargo.toml +++ b/substrate/frame/election-provider-support/benchmarking/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-election-provider-support-benchmarking" -version = "27.0.0" +version = "40.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -17,10 +17,10 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { features = ["derive"], workspace = true } frame-benchmarking = { optional = true, workspace = true } -frame-election-provider-support = { workspace = true } -frame-system = { workspace = true } -sp-npos-elections = { workspace = true } -sp-runtime = { workspace = true } +frame-election-provider-support.workspace = true +frame-system.workspace = true +sp-npos-elections.workspace = true +sp-runtime.workspace = true [features] default = ["std"] diff --git a/substrate/frame/election-provider-support/solution-type/Cargo.toml b/substrate/frame/election-provider-support/solution-type/Cargo.toml index c2f307016f6b9..087e458d13b2a 100644 --- a/substrate/frame/election-provider-support/solution-type/Cargo.toml +++ b/substrate/frame/election-provider-support/solution-type/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "frame-election-provider-solution-type" -version = "13.0.0" +version = "16.1.1" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -26,10 +26,10 @@ syn = { features = ["full", "visit"], workspace = true } [dev-dependencies] codec = { workspace = true, default-features = true } scale-info = { workspace = true, default-features = true } -sp-arithmetic = { workspace = true, default-features = true } +sp-arithmetic = { default-features = true, workspace = true } # used by generate_solution_type: # NOTE: we have to explicitly specify `std` because of trybuild # https://github.com/paritytech/polkadot-sdk/pull/5167 -frame-election-provider-support = { workspace = true, default-features = true, features = ["std"] } -frame-support = { workspace = true, default-features = true } +frame-election-provider-support = { default-features = true, features = ["std"], workspace = true } +frame-support = { default-features = true, workspace = true } trybuild = { workspace = true } diff --git a/substrate/frame/election-provider-support/solution-type/fuzzer/Cargo.toml b/substrate/frame/election-provider-support/solution-type/fuzzer/Cargo.toml index a1b6f135a6980..be26e8bf7b5c5 100644 --- a/substrate/frame/election-provider-support/solution-type/fuzzer/Cargo.toml +++ b/substrate/frame/election-provider-support/solution-type/fuzzer/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "frame-election-solution-type-fuzzer" -version = "2.0.0-alpha.5" +version = "2.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -23,9 +23,13 @@ path = "src/compact.rs" honggfuzz = { workspace = true } codec = { features = ["derive"], workspace = true } -frame-election-provider-solution-type = { workspace = true, default-features = true } -frame-election-provider-support = { workspace = true, default-features = true } -sp-arithmetic = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } -# used by generate_solution_type: -frame-support = { workspace = true, default-features = true } +frame-election-provider-solution-type.default-features = true +frame-election-provider-solution-type.workspace = true +frame-election-provider-support.default-features = true +frame-election-provider-support.workspace = true +frame-support.default-features = true +frame-support.workspace = true +sp-arithmetic.default-features = true +sp-arithmetic.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true diff --git a/substrate/frame/elections-phragmen/Cargo.toml b/substrate/frame/elections-phragmen/Cargo.toml index bf0947f86bd39..a56cceae7d437 100644 --- a/substrate/frame/elections-phragmen/Cargo.toml +++ b/substrate/frame/elections-phragmen/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-elections-phragmen" -version = "29.0.0" +version = "42.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -18,20 +18,20 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { features = ["derive"], workspace = true } frame-benchmarking = { optional = true, workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true log = { workspace = true } scale-info = { features = ["derive"], workspace = true } -sp-core = { workspace = true } -sp-io = { workspace = true } -sp-npos-elections = { workspace = true } -sp-runtime = { workspace = true } -sp-staking = { workspace = true } +sp-core.workspace = true +sp-io.workspace = true +sp-npos-elections.workspace = true +sp-runtime.workspace = true +sp-staking.workspace = true [dev-dependencies] -pallet-balances = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-tracing = { workspace = true, default-features = true } +pallet-balances = { default-features = true, workspace = true } +sp-core = { default-features = true, workspace = true } +sp-tracing = { default-features = true, workspace = true } substrate-test-utils = { workspace = true } [features] @@ -42,14 +42,12 @@ std = [ "frame-support/std", "frame-system/std", "log/std", - "pallet-balances/std", "scale-info/std", "sp-core/std", "sp-io/std", "sp-npos-elections/std", "sp-runtime/std", "sp-staking/std", - "sp-tracing/std", ] runtime-benchmarks = [ "frame-benchmarking/runtime-benchmarks", diff --git a/substrate/frame/examples/Cargo.toml b/substrate/frame/examples/Cargo.toml index 40d6959378b87..f7e64429bca31 100644 --- a/substrate/frame/examples/Cargo.toml +++ b/substrate/frame/examples/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-examples" -version = "4.0.0-dev" +version = "4.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -16,17 +16,17 @@ workspace = true targets = ["x86_64-unknown-linux-gnu"] [dependencies] -pallet-default-config-example = { workspace = true } -pallet-dev-mode = { workspace = true } -pallet-example-authorization-tx-extension = { workspace = true } -pallet-example-basic = { workspace = true } -pallet-example-frame-crate = { workspace = true } -pallet-example-kitchensink = { workspace = true } -pallet-example-offchain-worker = { workspace = true } -pallet-example-single-block-migrations = { workspace = true } -pallet-example-split = { workspace = true } -pallet-example-tasks = { workspace = true } -pallet-example-view-functions = { workspace = true } +pallet-default-config-example.workspace = true +pallet-dev-mode.workspace = true +pallet-example-authorization-tx-extension.workspace = true +pallet-example-basic.workspace = true +pallet-example-frame-crate.workspace = true +pallet-example-kitchensink.workspace = true +pallet-example-offchain-worker.workspace = true +pallet-example-single-block-migrations.workspace = true +pallet-example-split.workspace = true +pallet-example-tasks.workspace = true +pallet-example-view-functions.workspace = true [features] default = ["std"] diff --git a/substrate/frame/examples/authorization-tx-extension/Cargo.toml b/substrate/frame/examples/authorization-tx-extension/Cargo.toml index 9b51fc6c1e636..125c4b7478e30 100644 --- a/substrate/frame/examples/authorization-tx-extension/Cargo.toml +++ b/substrate/frame/examples/authorization-tx-extension/Cargo.toml @@ -18,20 +18,18 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { workspace = true } docify = { workspace = true } -log = { workspace = true } -scale-info = { features = ["derive"], workspace = true } - frame-benchmarking = { optional = true, workspace = true } frame-support = { features = ["experimental"], workspace = true } -frame-system = { workspace = true } - -sp-io = { workspace = true } -sp-runtime = { workspace = true } +frame-system.workspace = true +log = { workspace = true } +scale-info = { features = ["derive"], workspace = true } +sp-io.workspace = true +sp-runtime.workspace = true [dev-dependencies] -pallet-verify-signature = { workspace = true } -sp-core = { workspace = true } -sp-keyring = { workspace = true, default-features = true } +pallet-verify-signature = { workspace = true, default-features = false } +sp-core = { workspace = true, default-features = false } +sp-keyring = { default-features = true, workspace = true } [features] default = ["std"] diff --git a/substrate/frame/examples/basic/Cargo.toml b/substrate/frame/examples/basic/Cargo.toml index 1deb82cc6ea5c..9c40184cd3c19 100644 --- a/substrate/frame/examples/basic/Cargo.toml +++ b/substrate/frame/examples/basic/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-example-basic" -version = "27.0.0" +version = "34.0.0" authors.workspace = true edition.workspace = true license = "MIT-0" @@ -19,16 +19,16 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { workspace = true } frame-benchmarking = { optional = true, workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true log = { workspace = true } -pallet-balances = { workspace = true } +pallet-balances.workspace = true scale-info = { features = ["derive"], workspace = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } +sp-io.workspace = true +sp-runtime.workspace = true [dev-dependencies] -sp-core = { workspace = true } +sp-core = { workspace = true, default-features = false } [features] default = ["std"] diff --git a/substrate/frame/examples/default-config/Cargo.toml b/substrate/frame/examples/default-config/Cargo.toml index 87485aa08ef0e..0bbc3d5e8a08f 100644 --- a/substrate/frame/examples/default-config/Cargo.toml +++ b/substrate/frame/examples/default-config/Cargo.toml @@ -18,13 +18,12 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true log = { workspace = true } scale-info = { features = ["derive"], workspace = true } - -sp-io = { workspace = true } -sp-runtime = { workspace = true } +sp-io.workspace = true +sp-runtime.workspace = true [features] default = ["std"] diff --git a/substrate/frame/examples/dev-mode/Cargo.toml b/substrate/frame/examples/dev-mode/Cargo.toml index 7589abb929d50..0c74753a41dd1 100644 --- a/substrate/frame/examples/dev-mode/Cargo.toml +++ b/substrate/frame/examples/dev-mode/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-dev-mode" -version = "10.0.0" +version = "23.0.0" authors.workspace = true edition.workspace = true license = "MIT-0" @@ -17,16 +17,16 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true log = { workspace = true } -pallet-balances = { workspace = true } +pallet-balances.workspace = true scale-info = { features = ["derive"], workspace = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } +sp-io.workspace = true +sp-runtime.workspace = true [dev-dependencies] -sp-core = { workspace = true } +sp-core = { workspace = true, default-features = false } [features] default = ["std"] diff --git a/substrate/frame/examples/frame-crate/Cargo.toml b/substrate/frame/examples/frame-crate/Cargo.toml index f52ef8a19cb25..a1986b3ea92fc 100644 --- a/substrate/frame/examples/frame-crate/Cargo.toml +++ b/substrate/frame/examples/frame-crate/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-example-frame-crate" -version = "0.0.1" +version = "0.1.0" authors = ["Parity Technologies "] edition.workspace = true license = "MIT-0" @@ -17,9 +17,8 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { workspace = true } -scale-info = { features = ["derive"], workspace = true } - frame = { features = ["runtime"], workspace = true } +scale-info = { features = ["derive"], workspace = true } [features] default = ["std"] diff --git a/substrate/frame/examples/kitchensink/Cargo.toml b/substrate/frame/examples/kitchensink/Cargo.toml index 68d3a31a7ff62..fcf362909f771 100644 --- a/substrate/frame/examples/kitchensink/Cargo.toml +++ b/substrate/frame/examples/kitchensink/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-example-kitchensink" -version = "4.0.0-dev" +version = "4.0.0" authors.workspace = true edition.workspace = true license = "MIT-0" @@ -17,21 +17,17 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { workspace = true } +frame-benchmarking = { optional = true, workspace = true } +frame-support = { features = ["experimental"], workspace = true } +frame-system.workspace = true log = { workspace = true } +pallet-balances.workspace = true scale-info = { features = ["derive"], workspace = true } - -frame-support = { features = ["experimental"], workspace = true } -frame-system = { workspace = true } - -sp-io = { workspace = true } -sp-runtime = { workspace = true } - -frame-benchmarking = { optional = true, workspace = true } - -pallet-balances = { workspace = true } +sp-io.workspace = true +sp-runtime.workspace = true [dev-dependencies] -sp-core = { workspace = true } +sp-core = { workspace = true, default-features = false } [features] default = ["std"] diff --git a/substrate/frame/examples/multi-block-migrations/Cargo.toml b/substrate/frame/examples/multi-block-migrations/Cargo.toml index 6e8e897842665..481bc8e17a897 100644 --- a/substrate/frame/examples/multi-block-migrations/Cargo.toml +++ b/substrate/frame/examples/multi-block-migrations/Cargo.toml @@ -15,12 +15,12 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { workspace = true } frame-benchmarking = { optional = true, workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true log = { workspace = true } -pallet-migrations = { workspace = true } +pallet-migrations.workspace = true scale-info = { workspace = true } -sp-io = { workspace = true } +sp-io.workspace = true [features] default = ["std"] diff --git a/substrate/frame/examples/offchain-worker/Cargo.toml b/substrate/frame/examples/offchain-worker/Cargo.toml index fabdfb0f9e0c3..eacf274f6c54d 100644 --- a/substrate/frame/examples/offchain-worker/Cargo.toml +++ b/substrate/frame/examples/offchain-worker/Cargo.toml @@ -18,15 +18,15 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true lite-json = { workspace = true } log = { workspace = true } scale-info = { features = ["derive"], workspace = true } -sp-core = { workspace = true } -sp-io = { workspace = true } +sp-core.workspace = true +sp-io.workspace = true sp-keystore = { optional = true, workspace = true } -sp-runtime = { workspace = true } +sp-runtime.workspace = true [features] default = ["std"] diff --git a/substrate/frame/examples/single-block-migrations/Cargo.toml b/substrate/frame/examples/single-block-migrations/Cargo.toml index ba24d83c158c4..2eb41d3c3cbbb 100644 --- a/substrate/frame/examples/single-block-migrations/Cargo.toml +++ b/substrate/frame/examples/single-block-migrations/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-example-single-block-migrations" -version = "0.0.1" +version = "0.1.0" authors.workspace = true edition.workspace = true license = "MIT-0" @@ -15,15 +15,15 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { features = ["derive"], workspace = true } docify = { workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true log = { workspace = true } -pallet-balances = { workspace = true } +pallet-balances.workspace = true scale-info = { features = ["derive"], workspace = true } -sp-core = { workspace = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } -sp-version = { workspace = true } +sp-core.workspace = true +sp-io.workspace = true +sp-runtime.workspace = true +sp-version.workspace = true [features] default = ["std"] diff --git a/substrate/frame/examples/split/Cargo.toml b/substrate/frame/examples/split/Cargo.toml index 22cd8116f670c..1860ec744a69d 100644 --- a/substrate/frame/examples/split/Cargo.toml +++ b/substrate/frame/examples/split/Cargo.toml @@ -18,18 +18,15 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { workspace = true } +frame-benchmarking = { optional = true, workspace = true } +frame-support.workspace = true +frame-system.workspace = true log = { workspace = true } scale-info = { features = ["derive"], workspace = true } - -frame-support = { workspace = true } -frame-system = { workspace = true } - -sp-io = { workspace = true } - -frame-benchmarking = { optional = true, workspace = true } +sp-io.workspace = true [dev-dependencies] -sp-core = { workspace = true } +sp-core = { workspace = true, default-features = false } [features] default = ["std"] diff --git a/substrate/frame/examples/tasks/Cargo.toml b/substrate/frame/examples/tasks/Cargo.toml index 48f4d9e66e9c2..8b8c5367d47fe 100644 --- a/substrate/frame/examples/tasks/Cargo.toml +++ b/substrate/frame/examples/tasks/Cargo.toml @@ -16,17 +16,14 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { workspace = true } +frame-benchmarking = { optional = true, workspace = true } +frame-support.workspace = true +frame-system.workspace = true log = { workspace = true } scale-info = { features = ["derive"], workspace = true } - -frame-support = { workspace = true } -frame-system = { workspace = true } - -sp-core = { workspace = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } - -frame-benchmarking = { optional = true, workspace = true } +sp-core.workspace = true +sp-io.workspace = true +sp-runtime.workspace = true [features] default = ["std"] diff --git a/substrate/frame/examples/view-functions/Cargo.toml b/substrate/frame/examples/view-functions/Cargo.toml index 492df9d348c88..0f05fa35a7a5d 100644 --- a/substrate/frame/examples/view-functions/Cargo.toml +++ b/substrate/frame/examples/view-functions/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-example-view-functions" -version = "1.0.0" +version = "0.3.0" authors.workspace = true edition.workspace = true license.workspace = true @@ -17,16 +17,20 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { default-features = false, workspace = true } frame-metadata = { features = ["current"], workspace = true } +frame-support.default-features = false +frame-support.workspace = true +frame-system.default-features = false +frame-system.workspace = true log = { workspace = true } scale-info = { default-features = false, features = ["derive"], workspace = true } - -frame-support = { default-features = false, workspace = true } -frame-system = { default-features = false, workspace = true } - -sp-core = { default-features = false, workspace = true } -sp-io = { default-features = false, workspace = true } -sp-metadata-ir = { default-features = false, workspace = true } -sp-runtime = { default-features = false, workspace = true } +sp-core.default-features = false +sp-core.workspace = true +sp-io.default-features = false +sp-io.workspace = true +sp-metadata-ir.default-features = false +sp-metadata-ir.workspace = true +sp-runtime.default-features = false +sp-runtime.workspace = true [dev-dependencies] pretty_assertions = { workspace = true } diff --git a/substrate/frame/executive/Cargo.toml b/substrate/frame/executive/Cargo.toml index fae4a14f8a530..9fd697e7ea889 100644 --- a/substrate/frame/executive/Cargo.toml +++ b/substrate/frame/executive/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "frame-executive" -version = "28.0.0" +version = "41.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -18,24 +18,24 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] aquamarine = { workspace = true } codec = { features = ["derive"], workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true frame-try-runtime = { optional = true, workspace = true } log = { workspace = true } scale-info = { features = ["derive"], workspace = true } -sp-core = { workspace = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } -sp-tracing = { workspace = true } +sp-core.workspace = true +sp-io.workspace = true +sp-runtime.workspace = true +sp-tracing.workspace = true [dev-dependencies] array-bytes = { workspace = true, default-features = true } -pallet-balances = { workspace = true, default-features = true } -pallet-transaction-payment = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-inherents = { workspace = true, default-features = true } -sp-io = { workspace = true, default-features = true } -sp-version = { workspace = true, default-features = true } +pallet-balances = { default-features = true, workspace = true } +pallet-transaction-payment = { default-features = true, workspace = true } +sp-core = { default-features = true, workspace = true } +sp-inherents = { default-features = true, workspace = true } +sp-io = { default-features = true, workspace = true } +sp-version = { default-features = true, workspace = true } substrate-test-runtime-client = { workspace = true } [features] @@ -48,15 +48,11 @@ std = [ "frame-system/std", "frame-try-runtime/std", "log/std", - "pallet-balances/std", - "pallet-transaction-payment/std", "scale-info/std", "sp-core/std", - "sp-inherents/std", "sp-io/std", "sp-runtime/std", "sp-tracing/std", - "sp-version/std", ] try-runtime = [ "frame-support/try-runtime", diff --git a/substrate/frame/fast-unstake/Cargo.toml b/substrate/frame/fast-unstake/Cargo.toml index 209406dc3f99a..bd733d9cb38f2 100644 --- a/substrate/frame/fast-unstake/Cargo.toml +++ b/substrate/frame/fast-unstake/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-fast-unstake" -version = "27.0.0" +version = "40.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -16,28 +16,25 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { workspace = true } +frame-benchmarking = { optional = true, workspace = true } +frame-election-provider-support.workspace = true +frame-support.workspace = true +frame-system.workspace = true log = { workspace = true } scale-info = { features = ["derive"], workspace = true } - -frame-support = { workspace = true } -frame-system = { workspace = true } - -frame-election-provider-support = { workspace = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } -sp-staking = { workspace = true } - -frame-benchmarking = { optional = true, workspace = true } +sp-io.workspace = true +sp-runtime.workspace = true +sp-staking.workspace = true docify = { workspace = true } [dev-dependencies] -pallet-balances = { workspace = true, default-features = true } -pallet-staking = { workspace = true, default-features = true } -pallet-staking-reward-curve = { workspace = true, default-features = true } -pallet-timestamp = { workspace = true, default-features = true } -sp-core = { workspace = true } -sp-tracing = { workspace = true, default-features = true } +pallet-balances = { default-features = true, workspace = true } +pallet-staking = { default-features = true, workspace = true } +pallet-staking-reward-curve = { default-features = true, workspace = true } +pallet-timestamp = { default-features = true, workspace = true } +sp-core = { workspace = true, default-features = false } +sp-tracing = { default-features = true, workspace = true } [features] default = ["std"] @@ -48,15 +45,11 @@ std = [ "frame-support/std", "frame-system/std", "log/std", - "pallet-balances/std", - "pallet-staking/std", - "pallet-timestamp/std", "scale-info/std", "sp-core/std", "sp-io/std", "sp-runtime/std", "sp-staking/std", - "sp-tracing/std", ] runtime-benchmarks = [ "frame-benchmarking/runtime-benchmarks", diff --git a/substrate/frame/glutton/Cargo.toml b/substrate/frame/glutton/Cargo.toml index 7f7b24c12117b..86aaf41f01774 100644 --- a/substrate/frame/glutton/Cargo.toml +++ b/substrate/frame/glutton/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-glutton" -version = "14.0.0" +version = "27.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -19,14 +19,14 @@ targets = ["x86_64-unknown-linux-gnu"] blake2 = { workspace = true } codec = { features = ["derive"], workspace = true } frame-benchmarking = { optional = true, workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true log = { workspace = true } scale-info = { features = ["derive"], workspace = true } -sp-core = { workspace = true } -sp-inherents = { workspace = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } +sp-core.workspace = true +sp-inherents.workspace = true +sp-io.workspace = true +sp-runtime.workspace = true [features] default = ["std"] diff --git a/substrate/frame/grandpa/Cargo.toml b/substrate/frame/grandpa/Cargo.toml index 8fe651de43d99..d08f8cb93fc6a 100644 --- a/substrate/frame/grandpa/Cargo.toml +++ b/substrate/frame/grandpa/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-grandpa" -version = "28.0.0" +version = "41.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -18,47 +18,42 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { features = ["derive"], workspace = true } frame-benchmarking = { optional = true, workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true log = { workspace = true } -pallet-authorship = { workspace = true } -pallet-session = { workspace = true } +pallet-authorship.workspace = true +pallet-session.workspace = true scale-info = { features = ["derive", "serde"], workspace = true } sp-application-crypto = { features = ["serde"], workspace = true } sp-consensus-grandpa = { features = ["serde"], workspace = true } sp-core = { features = ["serde"], workspace = true } -sp-io = { workspace = true } +sp-io.workspace = true sp-runtime = { features = ["serde"], workspace = true } -sp-session = { workspace = true } +sp-session.workspace = true sp-staking = { features = ["serde"], workspace = true } [dev-dependencies] finality-grandpa = { features = ["derive-codec"], workspace = true, default-features = true } -frame-benchmarking = { workspace = true, default-features = true } -frame-election-provider-support = { workspace = true, default-features = true } -pallet-balances = { workspace = true, default-features = true } -pallet-offences = { workspace = true, default-features = true } -pallet-staking = { workspace = true, default-features = true } -pallet-staking-reward-curve = { workspace = true, default-features = true } -pallet-timestamp = { workspace = true, default-features = true } -sp-keyring = { workspace = true, default-features = true } -sp-tracing = { workspace = true, default-features = true } +frame-benchmarking = { default-features = true, workspace = true } +frame-election-provider-support = { default-features = true, workspace = true } +pallet-balances = { default-features = true, workspace = true } +pallet-offences = { default-features = true, workspace = true } +pallet-staking = { default-features = true, workspace = true } +pallet-staking-reward-curve = { default-features = true, workspace = true } +pallet-timestamp = { default-features = true, workspace = true } +sp-keyring = { default-features = true, workspace = true } +sp-tracing = { default-features = true, workspace = true } [features] default = ["std"] std = [ "codec/std", "frame-benchmarking?/std", - "frame-election-provider-support/std", "frame-support/std", "frame-system/std", "log/std", "pallet-authorship/std", - "pallet-balances/std", - "pallet-offences/std", "pallet-session/std", - "pallet-staking/std", - "pallet-timestamp/std", "scale-info/std", "sp-application-crypto/std", "sp-consensus-grandpa/std", diff --git a/substrate/frame/identity/Cargo.toml b/substrate/frame/identity/Cargo.toml index 38379ff90168a..7329666216b61 100644 --- a/substrate/frame/identity/Cargo.toml +++ b/substrate/frame/identity/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-identity" -version = "29.0.0" +version = "41.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -19,17 +19,17 @@ targets = ["x86_64-unknown-linux-gnu"] codec = { features = ["derive", "max-encoded-len"], workspace = true } enumflags2 = { workspace = true } frame-benchmarking = { optional = true, workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true log = { workspace = true } scale-info = { features = ["derive"], workspace = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } +sp-io.workspace = true +sp-runtime.workspace = true [dev-dependencies] -pallet-balances = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-keystore = { workspace = true, default-features = true } +pallet-balances = { default-features = true, workspace = true } +sp-core = { default-features = true, workspace = true } +sp-keystore = { default-features = true, workspace = true } [features] default = ["std"] @@ -40,11 +40,8 @@ std = [ "frame-support/std", "frame-system/std", "log/std", - "pallet-balances/std", "scale-info/std", - "sp-core/std", "sp-io/std", - "sp-keystore/std", "sp-runtime/std", ] runtime-benchmarks = [ diff --git a/substrate/frame/im-online/Cargo.toml b/substrate/frame/im-online/Cargo.toml index 179c4c3ce3b18..8bd0b0052450b 100644 --- a/substrate/frame/im-online/Cargo.toml +++ b/substrate/frame/im-online/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-im-online" -version = "27.0.0" +version = "40.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -18,19 +18,19 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { features = ["derive"], workspace = true } frame-benchmarking = { optional = true, workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true log = { workspace = true } -pallet-authorship = { workspace = true } +pallet-authorship.workspace = true scale-info = { features = ["derive", "serde"], workspace = true } sp-application-crypto = { features = ["serde"], workspace = true } sp-core = { features = ["serde"], workspace = true } -sp-io = { workspace = true } +sp-io.workspace = true sp-runtime = { features = ["serde"], workspace = true } sp-staking = { features = ["serde"], workspace = true } [dev-dependencies] -pallet-session = { workspace = true, default-features = true } +pallet-session = { default-features = true, workspace = true } [features] default = ["std"] @@ -41,7 +41,6 @@ std = [ "frame-system/std", "log/std", "pallet-authorship/std", - "pallet-session/std", "scale-info/std", "sp-application-crypto/std", "sp-core/std", diff --git a/substrate/frame/indices/Cargo.toml b/substrate/frame/indices/Cargo.toml index fdc1753e44fcb..e6b0b673d26ea 100644 --- a/substrate/frame/indices/Cargo.toml +++ b/substrate/frame/indices/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-indices" -version = "28.0.0" +version = "41.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -18,15 +18,15 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { features = ["derive"], workspace = true } frame-benchmarking = { optional = true, workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true scale-info = { features = ["derive"], workspace = true } -sp-core = { workspace = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } +sp-core.workspace = true +sp-io.workspace = true +sp-runtime.workspace = true [dev-dependencies] -pallet-balances = { workspace = true, default-features = true } +pallet-balances = { default-features = true, workspace = true } [features] default = ["std"] @@ -35,7 +35,6 @@ std = [ "frame-benchmarking?/std", "frame-support/std", "frame-system/std", - "pallet-balances/std", "scale-info/std", "sp-core/std", "sp-io/std", diff --git a/substrate/frame/insecure-randomness-collective-flip/Cargo.toml b/substrate/frame/insecure-randomness-collective-flip/Cargo.toml index 789f130423a4b..7611ae60e6cb0 100644 --- a/substrate/frame/insecure-randomness-collective-flip/Cargo.toml +++ b/substrate/frame/insecure-randomness-collective-flip/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-insecure-randomness-collective-flip" -version = "16.0.0" +version = "29.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" diff --git a/substrate/frame/lottery/Cargo.toml b/substrate/frame/lottery/Cargo.toml index 5478b841cd068..3f246a688b3b0 100644 --- a/substrate/frame/lottery/Cargo.toml +++ b/substrate/frame/lottery/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-lottery" -version = "28.0.0" +version = "41.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -17,29 +17,25 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { features = ["derive"], workspace = true } frame-benchmarking = { optional = true, workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true scale-info = { features = ["derive"], workspace = true } -sp-runtime = { workspace = true } +sp-runtime.workspace = true [dev-dependencies] frame-support-test = { workspace = true } -pallet-balances = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-io = { workspace = true, default-features = true } +pallet-balances = { default-features = true, workspace = true } +sp-core = { default-features = true, workspace = true } +sp-io = { default-features = true, workspace = true } [features] default = ["std"] std = [ "codec/std", "frame-benchmarking?/std", - "frame-support-test/std", "frame-support/std", "frame-system/std", - "pallet-balances/std", "scale-info/std", - "sp-core/std", - "sp-io/std", "sp-runtime/std", ] runtime-benchmarks = [ diff --git a/substrate/frame/membership/Cargo.toml b/substrate/frame/membership/Cargo.toml index 738d09b4b354d..6cc7bd62fafc1 100644 --- a/substrate/frame/membership/Cargo.toml +++ b/substrate/frame/membership/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-membership" -version = "28.0.0" +version = "41.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -18,12 +18,12 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { workspace = true } frame-benchmarking = { optional = true, workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true log = { workspace = true } scale-info = { features = ["derive", "serde"], workspace = true } sp-core = { features = ["serde"], workspace = true } -sp-io = { workspace = true } +sp-io.workspace = true sp-runtime = { features = ["serde"], workspace = true } [features] diff --git a/substrate/frame/merkle-mountain-range/Cargo.toml b/substrate/frame/merkle-mountain-range/Cargo.toml index ecbef01a9205c..e2d4566576856 100644 --- a/substrate/frame/merkle-mountain-range/Cargo.toml +++ b/substrate/frame/merkle-mountain-range/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-mmr" -version = "27.0.0" +version = "41.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -19,11 +19,11 @@ codec = { workspace = true } frame = { workspace = true, features = ["runtime"] } log = { workspace = true } scale-info = { features = ["derive"], workspace = true } -sp-mmr-primitives = { workspace = true } +sp-mmr-primitives.workspace = true [dev-dependencies] itertools = { workspace = true } -sp-tracing = { workspace = true, default-features = true } +sp-tracing = { default-features = true, workspace = true } [features] default = ["std"] diff --git a/substrate/frame/message-queue/Cargo.toml b/substrate/frame/message-queue/Cargo.toml index f48fa1a110440..52d339c8a6e45 100644 --- a/substrate/frame/message-queue/Cargo.toml +++ b/substrate/frame/message-queue/Cargo.toml @@ -2,7 +2,7 @@ authors.workspace = true edition.workspace = true name = "pallet-message-queue" -version = "31.0.0" +version = "44.0.0" license = "Apache-2.0" homepage.workspace = true repository.workspace = true @@ -14,26 +14,24 @@ workspace = true [dependencies] codec = { features = ["derive"], workspace = true } environmental = { workspace = true } +frame-benchmarking = { optional = true, workspace = true } +frame-support.workspace = true +frame-system.workspace = true log = { workspace = true } scale-info = { features = ["derive"], workspace = true } serde = { optional = true, features = ["derive"], workspace = true, default-features = true } - -sp-arithmetic = { workspace = true } -sp-core = { workspace = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } -sp-weights = { workspace = true } - -frame-benchmarking = { optional = true, workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +sp-arithmetic.workspace = true +sp-core.workspace = true +sp-io.workspace = true +sp-runtime.workspace = true +sp-weights.workspace = true [dev-dependencies] -frame-support = { workspace = true, features = ["experimental"] } +frame-support = { features = ["experimental"], workspace = true, default-features = false } rand = { workspace = true, default-features = true } rand_distr = { workspace = true } -sp-crypto-hashing = { workspace = true, default-features = true } -sp-tracing = { workspace = true, default-features = true } +sp-crypto-hashing = { default-features = true, workspace = true } +sp-tracing = { default-features = true, workspace = true } [features] default = ["std"] @@ -49,7 +47,6 @@ std = [ "sp-core/std", "sp-io/std", "sp-runtime/std", - "sp-tracing/std", "sp-weights/std", ] runtime-benchmarks = [ diff --git a/substrate/frame/meta-tx/Cargo.toml b/substrate/frame/meta-tx/Cargo.toml index 78c18384d2fd2..9c3db76abc223 100644 --- a/substrate/frame/meta-tx/Cargo.toml +++ b/substrate/frame/meta-tx/Cargo.toml @@ -2,7 +2,7 @@ name = "pallet-meta-tx" description = "FRAME pallet enabling meta transactions." license = "Apache-2.0" -version = "0.1.0" +version = "0.3.0" edition.workspace = true authors.workspace = true homepage.workspace = true @@ -14,23 +14,22 @@ workspace = true [dependencies] codec = { workspace = true, features = ["max-encoded-len"] } docify = { workspace = true } +frame-benchmarking = { workspace = true, optional = true } +frame-support.workspace = true +frame-system.workspace = true scale-info = { workspace = true, features = ["derive"] } serde = { features = ["derive"], optional = true, workspace = true } - -frame-benchmarking = { workspace = true, optional = true } -frame-support = { workspace = true } -frame-system = { workspace = true } -sp-core = { workspace = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } -sp-std = { workspace = true } +sp-core.workspace = true +sp-io.workspace = true +sp-runtime.workspace = true +sp-std.workspace = true [dev-dependencies] -pallet-balances = { workspace = true, default-features = true } -pallet-transaction-payment = { workspace = true, default-features = true } -pallet-verify-signature = { workspace = true, default-features = true } -sp-keyring = { workspace = true, default-features = true } -sp-keystore = { workspace = true, default-features = true } +pallet-balances = { default-features = true, workspace = true } +pallet-transaction-payment = { default-features = true, workspace = true } +pallet-verify-signature = { default-features = true, workspace = true } +sp-keyring = { default-features = true, workspace = true } +sp-keystore = { default-features = true, workspace = true } [features] default = ["std"] diff --git a/substrate/frame/metadata-hash-extension/Cargo.toml b/substrate/frame/metadata-hash-extension/Cargo.toml index c7a417795ffee..2b0d6f7c26c12 100644 --- a/substrate/frame/metadata-hash-extension/Cargo.toml +++ b/substrate/frame/metadata-hash-extension/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "frame-metadata-hash-extension" -version = "0.1.0" +version = "0.9.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -13,8 +13,8 @@ array-bytes = { workspace = true, default-features = true } codec = { features = ["derive"], workspace = true } const-hex = { workspace = true } docify = { workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true log = { workspace = true } scale-info = { features = ["derive", "serde"], workspace = true } sp-runtime = { features = ["serde"], workspace = true } @@ -22,11 +22,11 @@ sp-runtime = { features = ["serde"], workspace = true } [dev-dependencies] frame-metadata = { features = ["current", "unstable"], workspace = true, default-features = true } merkleized-metadata = { workspace = true } -sp-api = { workspace = true, default-features = true } -sp-tracing = { workspace = true, default-features = true } -sp-transaction-pool = { workspace = true, default-features = true } +sp-api = { default-features = true, workspace = true } +sp-tracing = { default-features = true, workspace = true } +sp-transaction-pool = { default-features = true, workspace = true } substrate-test-runtime-client = { workspace = true } -substrate-wasm-builder = { features = ["metadata-hash"], workspace = true, default-features = true } +substrate-wasm-builder = { features = ["metadata-hash"], default-features = true, workspace = true } [features] default = ["std"] diff --git a/substrate/frame/migrations/Cargo.toml b/substrate/frame/migrations/Cargo.toml index 46a651f600415..476371f53e3f1 100644 --- a/substrate/frame/migrations/Cargo.toml +++ b/substrate/frame/migrations/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-migrations" -version = "1.0.0" +version = "11.0.0" description = "FRAME pallet to execute multi-block migrations." authors.workspace = true edition.workspace = true @@ -13,21 +13,20 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { features = ["derive"], workspace = true } docify = { workspace = true } +frame = { workspace = true, features = ["runtime"] } +frame-benchmarking = { optional = true, workspace = true } +frame-support.workspace = true +frame-system.workspace = true impl-trait-for-tuples = { workspace = true } log = { workspace = true, default-features = true } scale-info = { features = ["derive"], workspace = true } - -frame = { workspace = true, features = ["runtime"] } -frame-benchmarking = { optional = true, workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } -sp-core = { workspace = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } +sp-core.workspace = true +sp-io.workspace = true +sp-runtime.workspace = true [dev-dependencies] -frame-executive = { workspace = true, default-features = true } -sp-tracing = { features = ["std"], workspace = true, default-features = true } +frame-executive = { default-features = true, workspace = true } +sp-tracing = { features = ["std"], default-features = true, workspace = true } pretty_assertions = { workspace = true } diff --git a/substrate/frame/mixnet/Cargo.toml b/substrate/frame/mixnet/Cargo.toml index 33bf7146980d5..1efaecebed944 100644 --- a/substrate/frame/mixnet/Cargo.toml +++ b/substrate/frame/mixnet/Cargo.toml @@ -1,7 +1,7 @@ [package] description = "FRAME's mixnet pallet" name = "pallet-mixnet" -version = "0.4.0" +version = "0.17.0" license = "Apache-2.0" authors = ["Parity Technologies "] edition.workspace = true @@ -21,8 +21,8 @@ frame = { workspace = true, features = ["runtime"] } log = { workspace = true } scale-info = { features = ["derive"], workspace = true } serde = { features = ["derive"], workspace = true } -sp-application-crypto = { workspace = true } -sp-mixnet = { workspace = true } +sp-application-crypto.workspace = true +sp-mixnet.workspace = true [features] default = ["std"] diff --git a/substrate/frame/multisig/Cargo.toml b/substrate/frame/multisig/Cargo.toml index e18e14f2626bf..84c6ca1dc00a4 100644 --- a/substrate/frame/multisig/Cargo.toml +++ b/substrate/frame/multisig/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-multisig" -version = "28.0.0" +version = "41.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -24,7 +24,7 @@ scale-info = { features = ["derive"], workspace = true } log = { workspace = true } [dev-dependencies] -pallet-balances = { workspace = true, default-features = true } +pallet-balances = { default-features = true, workspace = true } [features] default = ["std"] diff --git a/substrate/frame/nft-fractionalization/Cargo.toml b/substrate/frame/nft-fractionalization/Cargo.toml index 9593a10cea060..40dfaaf3b91e8 100644 --- a/substrate/frame/nft-fractionalization/Cargo.toml +++ b/substrate/frame/nft-fractionalization/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-nft-fractionalization" -version = "10.0.0" +version = "24.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -19,12 +19,12 @@ targets = ["x86_64-unknown-linux-gnu"] codec = { workspace = true } frame = { workspace = true, features = ["runtime"] } log = { workspace = true } -pallet-assets = { workspace = true } -pallet-nfts = { workspace = true } +pallet-assets.workspace = true +pallet-nfts.workspace = true scale-info = { features = ["derive"], workspace = true } [dev-dependencies] -pallet-balances = { workspace = true, default-features = true } +pallet-balances = { default-features = true, workspace = true } [features] default = ["std"] @@ -33,7 +33,6 @@ std = [ "frame/std", "log/std", "pallet-assets/std", - "pallet-balances/std", "pallet-nfts/std", "scale-info/std", ] diff --git a/substrate/frame/nfts/Cargo.toml b/substrate/frame/nfts/Cargo.toml index 18895018e1c5c..318a30431996a 100644 --- a/substrate/frame/nfts/Cargo.toml +++ b/substrate/frame/nfts/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-nfts" -version = "22.0.0" +version = "35.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -19,17 +19,17 @@ targets = ["x86_64-unknown-linux-gnu"] codec = { workspace = true } enumflags2 = { workspace = true } frame-benchmarking = { optional = true, workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true log = { workspace = true } scale-info = { features = ["derive"], workspace = true } -sp-core = { workspace = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } +sp-core.workspace = true +sp-io.workspace = true +sp-runtime.workspace = true [dev-dependencies] -pallet-balances = { workspace = true, default-features = true } -sp-keystore = { workspace = true, default-features = true } +pallet-balances = { default-features = true, workspace = true } +sp-keystore = { default-features = true, workspace = true } [features] default = ["std"] @@ -40,11 +40,9 @@ std = [ "frame-support/std", "frame-system/std", "log/std", - "pallet-balances/std", "scale-info/std", "sp-core/std", "sp-io/std", - "sp-keystore/std", "sp-runtime/std", ] runtime-benchmarks = [ diff --git a/substrate/frame/nfts/runtime-api/Cargo.toml b/substrate/frame/nfts/runtime-api/Cargo.toml index 36f85fbf61128..818a14a055e3e 100644 --- a/substrate/frame/nfts/runtime-api/Cargo.toml +++ b/substrate/frame/nfts/runtime-api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-nfts-runtime-api" -version = "14.0.0" +version = "27.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -17,7 +17,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { features = ["derive"], workspace = true } -sp-api = { workspace = true } +sp-api.workspace = true [features] default = ["std"] diff --git a/substrate/frame/nis/Cargo.toml b/substrate/frame/nis/Cargo.toml index f1cf7f31fdc80..ad6aed34b11b7 100644 --- a/substrate/frame/nis/Cargo.toml +++ b/substrate/frame/nis/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-nis" -version = "28.0.0" +version = "41.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -21,8 +21,8 @@ frame = { workspace = true, features = ["runtime"] } scale-info = { features = ["derive"], workspace = true } [dev-dependencies] -pallet-balances = { workspace = true, default-features = true } -sp-io = { workspace = true, default-features = true } +pallet-balances = { default-features = true, workspace = true } +sp-io = { default-features = true, workspace = true } [features] default = ["std"] diff --git a/substrate/frame/node-authorization/Cargo.toml b/substrate/frame/node-authorization/Cargo.toml index 86a78e6e36153..6287e1cbe5914 100644 --- a/substrate/frame/node-authorization/Cargo.toml +++ b/substrate/frame/node-authorization/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-node-authorization" -version = "28.0.0" +version = "41.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" diff --git a/substrate/frame/nomination-pools/Cargo.toml b/substrate/frame/nomination-pools/Cargo.toml index ecf7b3dededa7..d0a4533af65c4 100644 --- a/substrate/frame/nomination-pools/Cargo.toml +++ b/substrate/frame/nomination-pools/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-nomination-pools" -version = "25.0.0" +version = "39.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -17,24 +17,20 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] # parity codec = { features = ["derive"], workspace = true } -scale-info = { features = ["derive"], workspace = true } - -# FRAME -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true log = { workspace = true } -sp-core = { workspace = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } -sp-staking = { workspace = true } - -# Optional: use for testing and/or fuzzing pallet-balances = { optional = true, workspace = true } +scale-info = { features = ["derive"], workspace = true } +sp-core.workspace = true +sp-io.workspace = true +sp-runtime.workspace = true +sp-staking.workspace = true sp-tracing = { optional = true, workspace = true } [dev-dependencies] -pallet-balances = { workspace = true, default-features = true } -sp-tracing = { workspace = true, default-features = true } +pallet-balances = { default-features = true, workspace = true } +sp-tracing = { default-features = true, workspace = true } [features] default = ["std"] diff --git a/substrate/frame/nomination-pools/benchmarking/Cargo.toml b/substrate/frame/nomination-pools/benchmarking/Cargo.toml index 68fe98a169c6f..c0a92c1c733aa 100644 --- a/substrate/frame/nomination-pools/benchmarking/Cargo.toml +++ b/substrate/frame/nomination-pools/benchmarking/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-nomination-pools-benchmarking" -version = "26.0.0" +version = "39.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -18,29 +18,25 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] # parity codec = { features = ["derive"], workspace = true } +frame-benchmarking.workspace = true +frame-election-provider-support.workspace = true +frame-support.workspace = true +frame-system.workspace = true +pallet-bags-list.workspace = true +pallet-delegated-staking.workspace = true +pallet-nomination-pools.workspace = true +pallet-staking.workspace = true scale-info = { features = ["derive"], workspace = true } - -# FRAME -frame-benchmarking = { workspace = true } -frame-election-provider-support = { workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } -pallet-bags-list = { workspace = true } -pallet-delegated-staking = { workspace = true } -pallet-nomination-pools = { workspace = true } -pallet-staking = { workspace = true } - -# Substrate Primitives -sp-runtime = { workspace = true } -sp-runtime-interface = { workspace = true } -sp-staking = { workspace = true } +sp-runtime-interface.workspace = true +sp-runtime.workspace = true +sp-staking.workspace = true [dev-dependencies] -pallet-balances = { workspace = true } -pallet-staking-reward-curve = { workspace = true, default-features = true } -pallet-timestamp = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-io = { workspace = true, default-features = true } +pallet-balances = { workspace = true, default-features = false } +pallet-staking-reward-curve = { default-features = true, workspace = true } +pallet-timestamp = { default-features = true, workspace = true } +sp-core = { default-features = true, workspace = true } +sp-io = { default-features = true, workspace = true } [features] default = ["std"] @@ -55,10 +51,7 @@ std = [ "pallet-delegated-staking/std", "pallet-nomination-pools/std", "pallet-staking/std", - "pallet-timestamp/std", "scale-info/std", - "sp-core/std", - "sp-io/std", "sp-runtime-interface/std", "sp-runtime/std", "sp-staking/std", diff --git a/substrate/frame/nomination-pools/fuzzer/Cargo.toml b/substrate/frame/nomination-pools/fuzzer/Cargo.toml index 2954e090c2674..f170f9e9a913d 100644 --- a/substrate/frame/nomination-pools/fuzzer/Cargo.toml +++ b/substrate/frame/nomination-pools/fuzzer/Cargo.toml @@ -21,16 +21,18 @@ name = "call" path = "src/call.rs" [dependencies] +frame-support.default-features = true +frame-support.workspace = true +frame-system.default-features = true +frame-system.workspace = true honggfuzz = { workspace = true } - pallet-nomination-pools = { features = ["fuzzing"], workspace = true, default-features = true } - -frame-support = { workspace = true, default-features = true } -frame-system = { workspace = true, default-features = true } - -sp-io = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } -sp-tracing = { workspace = true, default-features = true } +sp-io.default-features = true +sp-io.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true +sp-tracing.default-features = true +sp-tracing.workspace = true log = { workspace = true, default-features = true } rand = { features = ["small_rng"], workspace = true, default-features = true } diff --git a/substrate/frame/nomination-pools/runtime-api/Cargo.toml b/substrate/frame/nomination-pools/runtime-api/Cargo.toml index 337cc31c7cbb8..0a1e6021da3ce 100644 --- a/substrate/frame/nomination-pools/runtime-api/Cargo.toml +++ b/substrate/frame/nomination-pools/runtime-api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-nomination-pools-runtime-api" -version = "23.0.0" +version = "37.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -17,8 +17,8 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { features = ["derive"], workspace = true } -pallet-nomination-pools = { workspace = true } -sp-api = { workspace = true } +pallet-nomination-pools.workspace = true +sp-api.workspace = true [features] default = ["std"] diff --git a/substrate/frame/nomination-pools/test-delegate-stake/Cargo.toml b/substrate/frame/nomination-pools/test-delegate-stake/Cargo.toml index 62c2fb625fc4f..8a32f105697f5 100644 --- a/substrate/frame/nomination-pools/test-delegate-stake/Cargo.toml +++ b/substrate/frame/nomination-pools/test-delegate-stake/Cargo.toml @@ -19,22 +19,22 @@ targets = ["x86_64-unknown-linux-gnu"] codec = { features = ["derive"], workspace = true, default-features = true } scale-info = { features = ["derive"], workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-io = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } -sp-staking = { workspace = true, default-features = true } +sp-core = { default-features = true, workspace = true } +sp-io = { default-features = true, workspace = true } +sp-runtime = { default-features = true, workspace = true } +sp-staking = { default-features = true, workspace = true } -frame-election-provider-support = { workspace = true, default-features = true } -frame-support = { features = ["experimental"], workspace = true, default-features = true } -frame-system = { workspace = true, default-features = true } +frame-election-provider-support = { default-features = true, workspace = true } +frame-support = { features = ["experimental"], default-features = true, workspace = true } +frame-system = { default-features = true, workspace = true } -pallet-bags-list = { workspace = true, default-features = true } -pallet-balances = { workspace = true, default-features = true } -pallet-delegated-staking = { workspace = true, default-features = true } -pallet-nomination-pools = { workspace = true, default-features = true } -pallet-staking = { workspace = true, default-features = true } -pallet-staking-reward-curve = { workspace = true, default-features = true } -pallet-timestamp = { workspace = true, default-features = true } +pallet-bags-list = { default-features = true, workspace = true } +pallet-balances = { default-features = true, workspace = true } +pallet-delegated-staking = { default-features = true, workspace = true } +pallet-nomination-pools = { default-features = true, workspace = true } +pallet-staking = { default-features = true, workspace = true } +pallet-staking-reward-curve = { default-features = true, workspace = true } +pallet-timestamp = { default-features = true, workspace = true } log = { workspace = true, default-features = true } -sp-tracing = { workspace = true, default-features = true } +sp-tracing = { default-features = true, workspace = true } diff --git a/substrate/frame/offences/Cargo.toml b/substrate/frame/offences/Cargo.toml index 221a4918a511f..48fdee6272db6 100644 --- a/substrate/frame/offences/Cargo.toml +++ b/substrate/frame/offences/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-offences" -version = "27.0.0" +version = "40.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -17,17 +17,17 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { features = ["derive"], workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true log = { workspace = true } scale-info = { features = ["derive"], workspace = true } serde = { optional = true, workspace = true, default-features = true } -sp-runtime = { workspace = true } -sp-staking = { workspace = true } +sp-runtime.workspace = true +sp-staking.workspace = true [dev-dependencies] -sp-core = { workspace = true, default-features = true } -sp-io = { workspace = true, default-features = true } +sp-core = { default-features = true, workspace = true } +sp-io = { default-features = true, workspace = true } [features] default = ["std"] @@ -38,8 +38,6 @@ std = [ "log/std", "scale-info/std", "serde", - "sp-core/std", - "sp-io/std", "sp-runtime/std", "sp-staking/std", ] diff --git a/substrate/frame/offences/benchmarking/Cargo.toml b/substrate/frame/offences/benchmarking/Cargo.toml index 27fc5101eff63..666dc610a2a52 100644 --- a/substrate/frame/offences/benchmarking/Cargo.toml +++ b/substrate/frame/offences/benchmarking/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-offences-benchmarking" -version = "28.0.0" +version = "41.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -17,28 +17,28 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { workspace = true } -frame-benchmarking = { workspace = true } -frame-election-provider-support = { workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-benchmarking.workspace = true +frame-election-provider-support.workspace = true +frame-support.workspace = true +frame-system.workspace = true log = { workspace = true } -pallet-babe = { workspace = true } -pallet-balances = { workspace = true } -pallet-grandpa = { workspace = true } -pallet-im-online = { workspace = true } -pallet-offences = { workspace = true } -pallet-session = { workspace = true } -pallet-staking = { workspace = true } +pallet-babe.workspace = true +pallet-balances.workspace = true +pallet-grandpa.workspace = true +pallet-im-online.workspace = true +pallet-offences.workspace = true +pallet-session.workspace = true +pallet-staking.workspace = true scale-info = { features = ["derive"], workspace = true } -sp-runtime = { workspace = true } -sp-staking = { workspace = true } +sp-runtime.workspace = true +sp-staking.workspace = true [dev-dependencies] -pallet-staking-reward-curve = { workspace = true, default-features = true } -pallet-timestamp = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-io = { workspace = true, default-features = true } -sp-tracing = { workspace = true, default-features = true } +pallet-staking-reward-curve = { default-features = true, workspace = true } +pallet-timestamp = { default-features = true, workspace = true } +sp-core = { default-features = true, workspace = true } +sp-io = { default-features = true, workspace = true } +sp-tracing = { default-features = true, workspace = true } [features] default = ["std"] @@ -56,10 +56,7 @@ std = [ "pallet-offences/std", "pallet-session/std", "pallet-staking/std", - "pallet-timestamp/std", "scale-info/std", - "sp-core/std", - "sp-io/std", "sp-runtime/std", "sp-staking/std", ] diff --git a/substrate/frame/origin-restriction/Cargo.toml b/substrate/frame/origin-restriction/Cargo.toml index 3b50033e6998c..1fa1f6852ece7 100644 --- a/substrate/frame/origin-restriction/Cargo.toml +++ b/substrate/frame/origin-restriction/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-origin-restriction" -version = "1.0.0" +version = "0.2.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -14,15 +14,15 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { workspace = true, features = ["derive"] } frame-benchmarking = { workspace = true, optional = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true log = { workspace = true } -pallet-transaction-payment = { workspace = true } +pallet-transaction-payment.workspace = true scale-info = { workspace = true, features = ["derive"] } -sp-arithmetic = { workspace = true } -sp-core = { workspace = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } +sp-arithmetic.workspace = true +sp-core.workspace = true +sp-io.workspace = true +sp-runtime.workspace = true [features] default = ["std"] diff --git a/substrate/frame/paged-list/Cargo.toml b/substrate/frame/paged-list/Cargo.toml index 4e69e10c15047..121aa619a4031 100644 --- a/substrate/frame/paged-list/Cargo.toml +++ b/substrate/frame/paged-list/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-paged-list" -version = "0.6.0" +version = "0.19.0" description = "FRAME pallet that provides a paged list data structure." authors.workspace = true homepage.workspace = true diff --git a/substrate/frame/parameters/Cargo.toml b/substrate/frame/parameters/Cargo.toml index ade93ef5b4a7d..6c27fe5adaf90 100644 --- a/substrate/frame/parameters/Cargo.toml +++ b/substrate/frame/parameters/Cargo.toml @@ -3,27 +3,26 @@ name = "pallet-parameters" description = "Pallet to store and configure parameters." repository.workspace = true license = "Apache-2.0" -version = "0.1.0" +version = "0.12.0" authors = ["Acala Developers", "Parity Technologies "] edition.workspace = true [dependencies] codec = { features = ["max-encoded-len"], workspace = true } docify = { workspace = true } +frame-benchmarking = { optional = true, workspace = true } +frame-support = { features = ["experimental"], workspace = true } +frame-system.workspace = true paste = { workspace = true } scale-info = { features = ["derive"], workspace = true } serde = { features = ["derive"], optional = true, workspace = true, default-features = true } - -frame-benchmarking = { optional = true, workspace = true } -frame-support = { features = ["experimental"], workspace = true } -frame-system = { workspace = true } -sp-core = { workspace = true } -sp-runtime = { workspace = true } +sp-core.workspace = true +sp-runtime.workspace = true [dev-dependencies] -pallet-balances = { workspace = true, default-features = true } -pallet-example-basic = { workspace = true, default-features = true } -sp-io = { workspace = true, default-features = true } +pallet-balances = { default-features = true, workspace = true } +pallet-example-basic = { default-features = true, workspace = true } +sp-io = { default-features = true, workspace = true } [features] default = ["std"] diff --git a/substrate/frame/people/Cargo.toml b/substrate/frame/people/Cargo.toml index 1e332457f609d..0da62e1ed20aa 100644 --- a/substrate/frame/people/Cargo.toml +++ b/substrate/frame/people/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-people" -version = "1.0.0" +version = "0.2.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -15,14 +15,14 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { workspace = true, features = ["derive"] } frame-benchmarking = { workspace = true, optional = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true log = { workspace = true } scale-info = { workspace = true, features = ["derive"] } -sp-arithmetic = { workspace = true } -sp-core = { workspace = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } +sp-arithmetic.workspace = true +sp-core.workspace = true +sp-io.workspace = true +sp-runtime.workspace = true verifiable = { workspace = true, features = ["small-ring"] } diff --git a/substrate/frame/preimage/Cargo.toml b/substrate/frame/preimage/Cargo.toml index e6a9b68282cc1..d85ac92789235 100644 --- a/substrate/frame/preimage/Cargo.toml +++ b/substrate/frame/preimage/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-preimage" -version = "28.0.0" +version = "41.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -14,17 +14,17 @@ workspace = true [dependencies] codec = { features = ["derive"], workspace = true } frame-benchmarking = { optional = true, workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true log = { workspace = true } scale-info = { features = ["derive"], workspace = true } sp-core = { optional = true, workspace = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } +sp-io.workspace = true +sp-runtime.workspace = true [dev-dependencies] -pallet-balances = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } +pallet-balances = { default-features = true, workspace = true } +sp-core = { default-features = true, workspace = true } [features] default = ["std"] @@ -42,7 +42,6 @@ std = [ "frame-support/std", "frame-system/std", "log/std", - "pallet-balances/std", "scale-info/std", "sp-core/std", "sp-io/std", diff --git a/substrate/frame/proxy/Cargo.toml b/substrate/frame/proxy/Cargo.toml index 3f2565abac88d..e5f0794e95b5f 100644 --- a/substrate/frame/proxy/Cargo.toml +++ b/substrate/frame/proxy/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-proxy" -version = "28.0.0" +version = "41.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -21,8 +21,8 @@ frame = { workspace = true, features = ["runtime"] } scale-info = { features = ["derive"], workspace = true } [dev-dependencies] -pallet-balances = { workspace = true, default-features = true } -pallet-utility = { workspace = true, default-features = true } +pallet-balances = { default-features = true, workspace = true } +pallet-utility = { default-features = true, workspace = true } [features] default = ["std"] diff --git a/substrate/frame/ranked-collective/Cargo.toml b/substrate/frame/ranked-collective/Cargo.toml index 78a02bec8e976..7f32d924c84ab 100644 --- a/substrate/frame/ranked-collective/Cargo.toml +++ b/substrate/frame/ranked-collective/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-ranked-collective" -version = "28.0.0" +version = "41.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -18,15 +18,15 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { features = ["derive"], workspace = true } frame-benchmarking = { optional = true, workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true impl-trait-for-tuples = { workspace = true } log = { workspace = true } scale-info = { features = ["derive"], workspace = true } -sp-arithmetic = { workspace = true } -sp-core = { workspace = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } +sp-arithmetic.workspace = true +sp-core.workspace = true +sp-io.workspace = true +sp-runtime.workspace = true [features] default = ["std"] diff --git a/substrate/frame/recovery/Cargo.toml b/substrate/frame/recovery/Cargo.toml index 64fc8a1ce1b92..596db1b12ff3f 100644 --- a/substrate/frame/recovery/Cargo.toml +++ b/substrate/frame/recovery/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-recovery" -version = "28.0.0" +version = "41.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -21,7 +21,7 @@ frame = { workspace = true, features = ["runtime"] } scale-info = { features = ["derive"], workspace = true } [dev-dependencies] -pallet-balances = { workspace = true, default-features = true } +pallet-balances = { default-features = true, workspace = true } [features] default = ["std"] @@ -32,7 +32,6 @@ runtime-benchmarks = [ std = [ "codec/std", "frame/std", - "pallet-balances/std", "scale-info/std", ] try-runtime = [ diff --git a/substrate/frame/referenda/Cargo.toml b/substrate/frame/referenda/Cargo.toml index 1b0b4199a9e96..7901284406a08 100644 --- a/substrate/frame/referenda/Cargo.toml +++ b/substrate/frame/referenda/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-referenda" -version = "28.0.0" +version = "41.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -19,21 +19,21 @@ targets = ["x86_64-unknown-linux-gnu"] assert_matches = { optional = true, workspace = true } codec = { features = ["derive"], workspace = true } frame-benchmarking = { optional = true, workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true log = { workspace = true } scale-info = { features = ["derive"], workspace = true } serde = { features = ["derive"], optional = true, workspace = true, default-features = true } -sp-arithmetic = { workspace = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } +sp-arithmetic.workspace = true +sp-io.workspace = true +sp-runtime.workspace = true [dev-dependencies] assert_matches = { workspace = true } -pallet-balances = { workspace = true, default-features = true } -pallet-preimage = { workspace = true, default-features = true } -pallet-scheduler = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } +pallet-balances = { default-features = true, workspace = true } +pallet-preimage = { default-features = true, workspace = true } +pallet-scheduler = { default-features = true, workspace = true } +sp-core = { default-features = true, workspace = true } [features] default = ["std"] @@ -43,13 +43,9 @@ std = [ "frame-support/std", "frame-system/std", "log/std", - "pallet-balances/std", - "pallet-preimage/std", - "pallet-scheduler/std", "scale-info/std", "serde", "sp-arithmetic/std", - "sp-core/std", "sp-io/std", "sp-runtime/std", ] diff --git a/substrate/frame/remark/Cargo.toml b/substrate/frame/remark/Cargo.toml index fdf7fe3ce01d4..4f28045aba2b0 100644 --- a/substrate/frame/remark/Cargo.toml +++ b/substrate/frame/remark/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-remark" -version = "28.0.0" +version = "41.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -18,13 +18,13 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { workspace = true } frame-benchmarking = { optional = true, workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true scale-info = { features = ["derive"], workspace = true } serde = { optional = true, workspace = true, default-features = true } -sp-core = { workspace = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } +sp-core.workspace = true +sp-io.workspace = true +sp-runtime.workspace = true [features] default = ["std"] diff --git a/substrate/frame/revive/Cargo.toml b/substrate/frame/revive/Cargo.toml index 0968b84e49210..104295b5ab4a7 100644 --- a/substrate/frame/revive/Cargo.toml +++ b/substrate/frame/revive/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-revive" -version = "0.1.0" +version = "0.7.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -21,7 +21,7 @@ alloy-core = { workspace = true, features = ["sol-types"] } codec = { features = ["derive", "max-encoded-len"], workspace = true } derive_more = { workspace = true, features = ["from", "try_into"] } environmental = { workspace = true } -ethereum-standards = { workspace = true } +ethereum-standards.workspace = true ethereum-types = { workspace = true, features = ["codec", "rlp", "serialize"] } hex-literal = { workspace = true } humantime-serde = { optional = true, workspace = true } @@ -42,21 +42,21 @@ serde = { features = ["alloc", "derive"], workspace = true, default-features = f # Polkadot SDK Dependencies bn = { workspace = true } frame-benchmarking = { optional = true, workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true pallet-revive-fixtures = { workspace = true, optional = true } -pallet-revive-proc-macro = { workspace = true } +pallet-revive-proc-macro.workspace = true pallet-revive-uapi = { workspace = true, features = ["scale"] } -pallet-transaction-payment = { workspace = true } +pallet-transaction-payment.workspace = true ripemd = { workspace = true } -sp-api = { workspace = true } -sp-arithmetic = { workspace = true } +sp-api.workspace = true +sp-arithmetic.workspace = true sp-consensus-aura = { workspace = true, optional = true } sp-consensus-babe = { workspace = true, optional = true } sp-consensus-slots = { workspace = true, optional = true } -sp-core = { workspace = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } +sp-core.workspace = true +sp-io.workspace = true +sp-runtime.workspace = true subxt-signer = { workspace = true, optional = true, features = ["unstable-eth"] } [dev-dependencies] @@ -68,13 +68,13 @@ secp256k1 = { workspace = true, features = ["recovery"] } serde_json = { workspace = true } # Polkadot SDK Dependencies -pallet-balances = { workspace = true, default-features = true } -pallet-proxy = { workspace = true, default-features = true } -pallet-revive-fixtures = { workspace = true, default-features = true } -pallet-timestamp = { workspace = true, default-features = true } -pallet-utility = { workspace = true, default-features = true } -sp-keystore = { workspace = true, default-features = true } -sp-tracing = { workspace = true, default-features = true } +pallet-balances = { default-features = true, workspace = true } +pallet-proxy = { default-features = true, workspace = true } +pallet-revive-fixtures = { default-features = true, workspace = true } +pallet-timestamp = { default-features = true, workspace = true } +pallet-utility = { default-features = true, workspace = true } +sp-keystore = { default-features = true, workspace = true } +sp-tracing = { default-features = true, workspace = true } [features] default = ["std"] @@ -91,11 +91,8 @@ std = [ "num-bigint/std", "num-integer/std", "num-traits/std", - "pallet-proxy/std", "pallet-revive-fixtures?/std", - "pallet-timestamp/std", "pallet-transaction-payment/std", - "pallet-utility/std", "polkavm-common?/std", "polkavm/std", "rand?/std", @@ -112,7 +109,6 @@ std = [ "sp-consensus-slots/std", "sp-core/std", "sp-io/std", - "sp-keystore/std", "sp-runtime/std", "subxt-signer", ] diff --git a/substrate/frame/revive/fixtures/Cargo.toml b/substrate/frame/revive/fixtures/Cargo.toml index 6075d9f8fb0a0..f4624aa59d97d 100644 --- a/substrate/frame/revive/fixtures/Cargo.toml +++ b/substrate/frame/revive/fixtures/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-revive-fixtures" -version = "0.1.0" +version = "0.4.0" authors.workspace = true edition.workspace = true license.workspace = true @@ -17,13 +17,13 @@ workspace = true [dependencies] anyhow = { workspace = true, default-features = true, optional = true } -sp-core = { workspace = true, default-features = true, optional = true } -sp-io = { workspace = true, default-features = true, optional = true } +sp-core = { workspace = true, optional = true, default-features = true } +sp-io = { workspace = true, optional = true, default-features = true } [build-dependencies] anyhow = { workspace = true, default-features = true } cargo_metadata = { workspace = true } -pallet-revive-uapi = { workspace = true } +pallet-revive-uapi.workspace = true polkavm-linker = { version = "0.21.0" } toml = { workspace = true } diff --git a/substrate/frame/revive/proc-macro/Cargo.toml b/substrate/frame/revive/proc-macro/Cargo.toml index 7b47d6053504c..402518292ab9b 100644 --- a/substrate/frame/revive/proc-macro/Cargo.toml +++ b/substrate/frame/revive/proc-macro/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-revive-proc-macro" -version = "0.1.0" +version = "0.3.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" diff --git a/substrate/frame/revive/rpc/Cargo.toml b/substrate/frame/revive/rpc/Cargo.toml index fc26174973d26..1490b13005983 100644 --- a/substrate/frame/revive/rpc/Cargo.toml +++ b/substrate/frame/revive/rpc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-revive-eth-rpc" -version = "0.1.0" +version = "0.7.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -21,20 +21,31 @@ futures = { workspace = true, features = ["thread-pool"] } hex = { workspace = true } jsonrpsee = { workspace = true, features = ["full"] } log = { workspace = true } -pallet-revive = { workspace = true, default-features = true } -prometheus-endpoint = { workspace = true, default-features = true } +pallet-revive.default-features = true +pallet-revive.workspace = true +prometheus-endpoint.default-features = true +prometheus-endpoint.workspace = true rlp = { workspace = true } -sc-cli = { workspace = true, default-features = true } -sc-rpc = { workspace = true, default-features = true } -sc-rpc-api = { workspace = true, default-features = true } -sc-service = { workspace = true, default-features = true } +sc-cli.default-features = true +sc-cli.workspace = true +sc-rpc-api.default-features = true +sc-rpc-api.workspace = true +sc-rpc.default-features = true +sc-rpc.workspace = true +sc-service.default-features = true +sc-service.workspace = true serde_json = { workspace = true } -sp-arithmetic = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-crypto-hashing = { workspace = true } -sp-rpc = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } -sp-weights = { workspace = true, default-features = true } +sp-arithmetic.default-features = true +sp-arithmetic.workspace = true +sp-core.default-features = true +sp-core.workspace = true +sp-crypto-hashing.workspace = true +sp-rpc.default-features = true +sp-rpc.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true +sp-weights.default-features = true +sp-weights.workspace = true sqlx = { workspace = true, features = ["macros", "runtime-tokio", "sqlite"] } subxt = { workspace = true, default-features = true, features = ["reconnecting-rpc-client"] } subxt-signer = { workspace = true, features = ["unstable-eth"] } @@ -43,7 +54,7 @@ tokio = { workspace = true, features = ["full"] } [dev-dependencies] env_logger = { workspace = true } -pallet-revive-fixtures = { workspace = true, default-features = true } +pallet-revive-fixtures = { default-features = true, workspace = true } pretty_assertions = { workspace = true } static_init = { workspace = true } substrate-cli-test-utils = { workspace = true } diff --git a/substrate/frame/revive/src/precompiles/builtin/modexp.rs b/substrate/frame/revive/src/precompiles/builtin/modexp.rs index 5ba239f2dafe7..b5ad402dd227a 100644 --- a/substrate/frame/revive/src/precompiles/builtin/modexp.rs +++ b/substrate/frame/revive/src/precompiles/builtin/modexp.rs @@ -24,7 +24,7 @@ use alloc::{vec, vec::Vec}; use core::{cmp::max, marker::PhantomData, num::NonZero}; use num_bigint::BigUint; use num_integer::Integer; -use num_traits::{One, Zero}; +use num_traits::{One, ToPrimitive, Zero}; use sp_runtime::DispatchError; /// See EIP-2565 @@ -87,9 +87,9 @@ impl PrimitivePrecompile for Modexp { } // bounds check handled above - let base_len: usize = base_len_big.try_into().expect("base_len out of bounds"); - let exp_len: usize = exp_len_big.try_into().expect("exp_len out of bounds"); - let mod_len: usize = mod_len_big.try_into().expect("mod_len out of bounds"); + let base_len: usize = base_len_big.to_usize().expect("base_len out of bounds"); + let exp_len: usize = exp_len_big.to_usize().expect("exp_len out of bounds"); + let mod_len: usize = mod_len_big.to_usize().expect("mod_len out of bounds"); // if mod_len is 0 output must be empty if mod_len == 0 { diff --git a/substrate/frame/revive/uapi/Cargo.toml b/substrate/frame/revive/uapi/Cargo.toml index 170ca9143e5f8..8d4610a81340d 100644 --- a/substrate/frame/revive/uapi/Cargo.toml +++ b/substrate/frame/revive/uapi/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-revive-uapi" -version = "0.1.0" +version = "0.5.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -18,7 +18,7 @@ targets = ["riscv64imac-unknown-none-elf"] [dependencies] bitflags = { workspace = true } codec = { features = ["derive", "max-encoded-len"], optional = true, workspace = true } -pallet-revive-proc-macro = { workspace = true } +pallet-revive-proc-macro.workspace = true scale-info = { features = ["derive"], optional = true, workspace = true } [target.'cfg(target_arch = "riscv64")'.dependencies] diff --git a/substrate/frame/root-offences/Cargo.toml b/substrate/frame/root-offences/Cargo.toml index 5a28ae7b9697e..b41764deb5d5c 100644 --- a/substrate/frame/root-offences/Cargo.toml +++ b/substrate/frame/root-offences/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-root-offences" -version = "25.0.0" +version = "38.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -17,40 +17,34 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { features = ["derive"], workspace = true } -scale-info = { features = ["derive"], workspace = true } - +frame-support.workspace = true +frame-system.workspace = true pallet-session = { features = ["historical"], workspace = true } -pallet-staking = { workspace = true } - -frame-support = { workspace = true } -frame-system = { workspace = true } -sp-core = { workspace = true } -sp-runtime = { workspace = true } -sp-staking = { workspace = true } +pallet-staking.workspace = true +scale-info = { features = ["derive"], workspace = true } +sp-core.workspace = true +sp-runtime.workspace = true +sp-staking.workspace = true [dev-dependencies] -pallet-balances = { workspace = true, default-features = true } -pallet-staking-reward-curve = { workspace = true, default-features = true } -pallet-timestamp = { workspace = true, default-features = true } +pallet-balances = { default-features = true, workspace = true } +pallet-staking-reward-curve = { default-features = true, workspace = true } +pallet-timestamp = { default-features = true, workspace = true } -sp-io = { workspace = true, default-features = true } +sp-io = { default-features = true, workspace = true } -frame-election-provider-support = { workspace = true, default-features = true } +frame-election-provider-support = { default-features = true, workspace = true } [features] default = ["std"] std = [ "codec/std", - "frame-election-provider-support/std", "frame-support/std", "frame-system/std", - "pallet-balances/std", "pallet-session/std", "pallet-staking/std", - "pallet-timestamp/std", "scale-info/std", "sp-core/std", - "sp-io/std", "sp-runtime/std", "sp-staking/std", ] diff --git a/substrate/frame/root-testing/Cargo.toml b/substrate/frame/root-testing/Cargo.toml index 438a3f5ce2a20..6898e36c0b1a2 100644 --- a/substrate/frame/root-testing/Cargo.toml +++ b/substrate/frame/root-testing/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-root-testing" -version = "4.0.0" +version = "17.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -17,11 +17,11 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { features = ["derive"], workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true scale-info = { features = ["derive"], workspace = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } +sp-io.workspace = true +sp-runtime.workspace = true [features] default = ["std"] diff --git a/substrate/frame/safe-mode/Cargo.toml b/substrate/frame/safe-mode/Cargo.toml index 9e13321019110..df7de36712c17 100644 --- a/substrate/frame/safe-mode/Cargo.toml +++ b/substrate/frame/safe-mode/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-safe-mode" -version = "9.0.0" +version = "22.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -24,9 +24,9 @@ pallet-utility = { optional = true, workspace = true } scale-info = { features = ["derive"], workspace = true } [dev-dependencies] -pallet-balances = { workspace = true, default-features = true } -pallet-proxy = { workspace = true, default-features = true } -pallet-utility = { workspace = true, default-features = true } +pallet-balances = { default-features = true, workspace = true } +pallet-proxy = { default-features = true, workspace = true } +pallet-utility = { default-features = true, workspace = true } [features] default = ["std"] diff --git a/substrate/frame/salary/Cargo.toml b/substrate/frame/salary/Cargo.toml index 84c55b110c8c2..ac90afff5152c 100644 --- a/substrate/frame/salary/Cargo.toml +++ b/substrate/frame/salary/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-salary" -version = "13.0.0" +version = "26.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" diff --git a/substrate/frame/sassafras/Cargo.toml b/substrate/frame/sassafras/Cargo.toml index 571ccfcfbd831..10b5f8f1a29fd 100644 --- a/substrate/frame/sassafras/Cargo.toml +++ b/substrate/frame/sassafras/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-sassafras" -version = "0.3.5-dev" +version = "0.3.5" authors = ["Parity Technologies "] edition.workspace = true license = "Apache-2.0" @@ -22,18 +22,18 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { features = ["derive"], workspace = true } frame-benchmarking = { optional = true, workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true log = { workspace = true } scale-info = { features = ["derive"], workspace = true } sp-consensus-sassafras = { features = ["serde"], workspace = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } +sp-io.workspace = true +sp-runtime.workspace = true [dev-dependencies] array-bytes = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-crypto-hashing = { workspace = true, default-features = true } +sp-core = { default-features = true, workspace = true } +sp-crypto-hashing = { default-features = true, workspace = true } [features] default = ["std"] diff --git a/substrate/frame/scheduler/Cargo.toml b/substrate/frame/scheduler/Cargo.toml index 4b05b8fc6cdad..b888efdd426c8 100644 --- a/substrate/frame/scheduler/Cargo.toml +++ b/substrate/frame/scheduler/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-scheduler" -version = "29.0.0" +version = "42.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -16,17 +16,17 @@ workspace = true codec = { features = ["derive"], workspace = true } docify = { workspace = true } frame-benchmarking = { optional = true, workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true log = { workspace = true } scale-info = { features = ["derive"], workspace = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } -sp-weights = { workspace = true } +sp-io.workspace = true +sp-runtime.workspace = true +sp-weights.workspace = true [dev-dependencies] -pallet-preimage = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } +pallet-preimage = { default-features = true, workspace = true } +sp-core = { default-features = true, workspace = true } substrate-test-utils = { workspace = true } [features] @@ -45,9 +45,7 @@ std = [ "frame-support/std", "frame-system/std", "log/std", - "pallet-preimage/std", "scale-info/std", - "sp-core/std", "sp-io/std", "sp-runtime/std", "sp-weights/std", diff --git a/substrate/frame/scored-pool/Cargo.toml b/substrate/frame/scored-pool/Cargo.toml index fb65a85a48283..4d9702d5245bd 100644 --- a/substrate/frame/scored-pool/Cargo.toml +++ b/substrate/frame/scored-pool/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-scored-pool" -version = "28.0.0" +version = "41.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -17,14 +17,14 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { features = ["derive"], workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true scale-info = { features = ["derive"], workspace = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } +sp-io.workspace = true +sp-runtime.workspace = true [dev-dependencies] -pallet-balances = { workspace = true, default-features = true } +pallet-balances = { default-features = true, workspace = true } [features] default = ["std"] @@ -32,7 +32,6 @@ std = [ "codec/std", "frame-support/std", "frame-system/std", - "pallet-balances/std", "scale-info/std", "sp-io/std", "sp-runtime/std", diff --git a/substrate/frame/session/Cargo.toml b/substrate/frame/session/Cargo.toml index 737678bea8a3b..7449d4f034775 100644 --- a/substrate/frame/session/Cargo.toml +++ b/substrate/frame/session/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-session" -version = "28.0.0" +version = "41.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -17,18 +17,18 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { features = ["derive"], workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true impl-trait-for-tuples = { workspace = true } log = { workspace = true } -pallet-timestamp = { workspace = true } +pallet-timestamp.workspace = true scale-info = { features = ["derive", "serde"], workspace = true } sp-core = { features = ["serde"], workspace = true } -sp-io = { workspace = true } +sp-io.workspace = true sp-runtime = { features = ["serde"], workspace = true } -sp-session = { workspace = true } +sp-session.workspace = true sp-staking = { features = ["serde"], workspace = true } -sp-state-machine = { workspace = true } +sp-state-machine.workspace = true sp-trie = { optional = true, workspace = true } [features] diff --git a/substrate/frame/session/benchmarking/Cargo.toml b/substrate/frame/session/benchmarking/Cargo.toml index 1fa7e76bc29b7..d297f35a92d64 100644 --- a/substrate/frame/session/benchmarking/Cargo.toml +++ b/substrate/frame/session/benchmarking/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-session-benchmarking" -version = "28.0.0" +version = "41.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -17,30 +17,29 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { workspace = true } -frame-benchmarking = { workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } -pallet-session = { workspace = true } -pallet-staking = { workspace = true } +frame-benchmarking.workspace = true +frame-support.workspace = true +frame-system.workspace = true +pallet-session.workspace = true +pallet-staking.workspace = true rand = { features = ["std_rng"], workspace = true } -sp-runtime = { workspace = true } -sp-session = { workspace = true } +sp-runtime.workspace = true +sp-session.workspace = true [dev-dependencies] codec = { features = ["derive"], workspace = true, default-features = true } -frame-election-provider-support = { workspace = true, default-features = true } -pallet-balances = { workspace = true, default-features = true } -pallet-staking-reward-curve = { workspace = true, default-features = true } -pallet-timestamp = { workspace = true, default-features = true } +frame-election-provider-support = { default-features = true, workspace = true } +pallet-balances = { default-features = true, workspace = true } +pallet-staking-reward-curve = { default-features = true, workspace = true } +pallet-timestamp = { default-features = true, workspace = true } scale-info = { workspace = true, default-features = true } -sp-io = { workspace = true, default-features = true } -sp-staking = { workspace = true } +sp-io = { default-features = true, workspace = true } +sp-staking = { workspace = true, default-features = false } [features] default = ["std"] std = [ "frame-benchmarking/std", - "frame-election-provider-support/std", "frame-support/std", "frame-system/std", "pallet-session/std", diff --git a/substrate/frame/society/Cargo.toml b/substrate/frame/society/Cargo.toml index 6ac7fe7c6967f..2c8224e5780a1 100644 --- a/substrate/frame/society/Cargo.toml +++ b/substrate/frame/society/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-society" -version = "28.0.0" +version = "41.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -17,32 +17,29 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { features = ["derive"], workspace = true } +frame-benchmarking = { optional = true, workspace = true } +frame-support.workspace = true +frame-system.workspace = true log = { workspace = true } rand_chacha = { workspace = true } scale-info = { features = ["derive"], workspace = true } - -frame-benchmarking = { optional = true, workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } -sp-arithmetic = { workspace = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } +sp-arithmetic.workspace = true +sp-io.workspace = true +sp-runtime.workspace = true [dev-dependencies] frame-support-test = { workspace = true } -pallet-balances = { workspace = true, default-features = true } -sp-crypto-hashing = { workspace = true, default-features = true } +pallet-balances = { default-features = true, workspace = true } +sp-crypto-hashing = { default-features = true, workspace = true } [features] default = ["std"] std = [ "codec/std", "frame-benchmarking?/std", - "frame-support-test/std", "frame-support/std", "frame-system/std", "log/std", - "pallet-balances/std", "rand_chacha/std", "scale-info/std", "sp-arithmetic/std", diff --git a/substrate/frame/staking-async/Cargo.toml b/substrate/frame/staking-async/Cargo.toml index cdd9ca4c3fab8..ca9e500310e73 100644 --- a/substrate/frame/staking-async/Cargo.toml +++ b/substrate/frame/staking-async/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-staking-async" -version = "0.1.0" +version = "0.2.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -16,32 +16,30 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { features = ["derive"], workspace = true } -frame-election-provider-support = { workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-benchmarking = { optional = true, workspace = true } +frame-election-provider-support.workspace = true +frame-support.workspace = true +frame-system.workspace = true log = { workspace = true } -pallet-staking-async-rc-client = { workspace = true } +pallet-staking-async-rc-client.workspace = true rand = { features = ["alloc"], workspace = true } rand_chacha = { workspace = true } scale-info = { features = ["derive", "serde"], workspace = true } serde = { features = ["alloc", "derive"], workspace = true } sp-application-crypto = { features = ["serde"], workspace = true } -sp-core = { workspace = true } -sp-io = { workspace = true } +sp-core.workspace = true +sp-io.workspace = true sp-runtime = { features = ["serde"], workspace = true } sp-staking = { features = ["serde"], workspace = true } -# Optional imports for benchmarking -frame-benchmarking = { optional = true, workspace = true } - [dev-dependencies] -frame-benchmarking = { workspace = true, default-features = true } -frame-support = { features = ["experimental"], workspace = true, default-features = true } -pallet-bags-list = { workspace = true, default-features = true } -pallet-balances = { workspace = true, default-features = true } +frame-benchmarking = { default-features = true, workspace = true } +frame-support = { features = ["experimental"], default-features = true, workspace = true } +pallet-bags-list = { default-features = true, workspace = true } +pallet-balances = { default-features = true, workspace = true } rand_chacha = { workspace = true, default-features = true } -sp-npos-elections = { workspace = true, default-features = true } -sp-tracing = { workspace = true, default-features = true } +sp-npos-elections = { default-features = true, workspace = true } +sp-tracing = { default-features = true, workspace = true } substrate-test-utils = { workspace = true } [features] @@ -53,8 +51,6 @@ std = [ "frame-support/std", "frame-system/std", "log/std", - "pallet-bags-list/std", - "pallet-balances/std", "pallet-staking-async-rc-client/std", "rand/std", "rand_chacha/std", @@ -64,10 +60,8 @@ std = [ "sp-core/std", "sp-core/std", "sp-io/std", - "sp-npos-elections/std", "sp-runtime/std", "sp-staking/std", - "sp-tracing/std", ] runtime-benchmarks = [ "frame-benchmarking/runtime-benchmarks", diff --git a/substrate/frame/staking-async/ah-client/Cargo.toml b/substrate/frame/staking-async/ah-client/Cargo.toml index 2962d76660408..5679d69887838 100644 --- a/substrate/frame/staking-async/ah-client/Cargo.toml +++ b/substrate/frame/staking-async/ah-client/Cargo.toml @@ -2,27 +2,24 @@ name = "pallet-staking-async-ah-client" description = "Pallet handling the communication with staking-rc-client. It's role is to glue the staking pallet (on AssetHub chain) and session pallet (on Relay Chain) in a transparent way." license = "Apache-2.0" -version = "0.1.0" +version = "0.2.0" edition.workspace = true authors.workspace = true repository.workspace = true [dependencies] codec = { workspace = true, features = ["derive"] } +frame-support.workspace = true +frame-system.workspace = true log = { workspace = true } +pallet-authorship.workspace = true +pallet-session = { features = ["historical"], workspace = true } +pallet-staking-async-rc-client.workspace = true scale-info = { workspace = true, features = ["derive"] } serde = { features = ["alloc", "derive"], workspace = true } - -sp-core = { workspace = true } -sp-runtime = { workspace = true } -sp-staking = { workspace = true } - -frame-support = { workspace = true } -frame-system = { workspace = true } - -pallet-authorship = { workspace = true } -pallet-session = { features = ["historical"], workspace = true } -pallet-staking-async-rc-client = { workspace = true } +sp-core.workspace = true +sp-runtime.workspace = true +sp-staking.workspace = true [features] default = ["std"] diff --git a/substrate/frame/staking-async/ahm-test/Cargo.toml b/substrate/frame/staking-async/ahm-test/Cargo.toml index 7c434eb42de9f..d6de7d8e31e63 100644 --- a/substrate/frame/staking-async/ahm-test/Cargo.toml +++ b/substrate/frame/staking-async/ahm-test/Cargo.toml @@ -17,52 +17,49 @@ targets = ["x86_64-unknown-linux-gnu"] [dev-dependencies] codec = { features = ["derive"], workspace = true, default-features = true } -frame = { workspace = true, default-features = true } -frame-support = { workspace = true, default-features = true } +frame = { default-features = true, workspace = true } +frame-support = { default-features = true, workspace = true } log = { workspace = true } scale-info = { features = ["derive"], workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-session = { workspace = true, default-features = true } -sp-staking = { workspace = true, default-features = true } -sp-tracing = { workspace = true, default-features = true } +sp-core = { default-features = true, workspace = true } +sp-session = { default-features = true, workspace = true } +sp-staking = { default-features = true, workspace = true } +sp-tracing = { default-features = true, workspace = true } # pallets we need in both -pallet-balances = { workspace = true, default-features = true } +pallet-balances = { default-features = true, workspace = true } # pallets that we need in AH -frame-election-provider-support = { workspace = true, default-features = true } -pallet-election-provider-multi-block = { workspace = true, default-features = true } -pallet-staking-async = { workspace = true, default-features = true } -pallet-staking-async-rc-client = { workspace = true, default-features = true } +frame-election-provider-support = { default-features = true, workspace = true } +pallet-election-provider-multi-block = { default-features = true, workspace = true } +pallet-staking-async = { default-features = true, workspace = true } +pallet-staking-async-rc-client = { default-features = true, workspace = true } # pallets we need in the RC -pallet-authorship = { workspace = true, default-features = true } -pallet-session = { workspace = true, default-features = true } -pallet-staking-async-ah-client = { workspace = true, default-features = true } -pallet-timestamp = { workspace = true, default-features = true } +pallet-authorship = { default-features = true, workspace = true } +pallet-session = { default-features = true, workspace = true } +pallet-staking-async-ah-client = { default-features = true, workspace = true } +pallet-timestamp = { default-features = true, workspace = true } # staking classic which will be replaced by ah-client -pallet-root-offences = { workspace = true, default-features = true } -pallet-staking = { workspace = true, default-features = true } +pallet-root-offences = { default-features = true, workspace = true } +pallet-staking = { default-features = true, workspace = true } [features] std = [ "log/std", ] try-runtime = [ - "pallet-balances/try-runtime", - - "pallet-staking/try-runtime", - - "pallet-staking-async-rc-client/try-runtime", - "pallet-staking-async/try-runtime", - "frame-election-provider-support/try-runtime", "frame-support/try-runtime", "frame/try-runtime", "pallet-authorship/try-runtime", + "pallet-balances/try-runtime", "pallet-election-provider-multi-block/try-runtime", "pallet-root-offences/try-runtime", "pallet-session/try-runtime", "pallet-staking-async-ah-client/try-runtime", + "pallet-staking-async-rc-client/try-runtime", + "pallet-staking-async/try-runtime", + "pallet-staking/try-runtime", "pallet-timestamp/try-runtime", ] diff --git a/substrate/frame/staking-async/rc-client/Cargo.toml b/substrate/frame/staking-async/rc-client/Cargo.toml index da2bbdf93173e..2efd47d2abf08 100644 --- a/substrate/frame/staking-async/rc-client/Cargo.toml +++ b/substrate/frame/staking-async/rc-client/Cargo.toml @@ -2,22 +2,22 @@ name = "pallet-staking-async-rc-client" description = "Pallet handling the communication with staking-ah-client. It's role is to glue the staking pallet (on AssetHub chain) and session pallet (on Relay Chain) in a transparent way." license = "Apache-2.0" -version = "0.1.0" +version = "0.2.0" edition.workspace = true authors.workspace = true repository.workspace = true [dependencies] codec = { workspace = true, features = ["derive"] } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true impl-trait-for-tuples = "0.2.2" log = { workspace = true } scale-info = { workspace = true, features = ["derive"] } -sp-core = { workspace = true } +sp-core.workspace = true sp-runtime = { features = ["serde"], workspace = true } sp-staking = { features = ["serde"], workspace = true } -xcm = { workspace = true } +xcm.workspace = true [features] default = ["std"] diff --git a/substrate/frame/staking-async/reward-fn/Cargo.toml b/substrate/frame/staking-async/reward-fn/Cargo.toml index e9acca1d312ae..8cb9ddd6133f3 100644 --- a/substrate/frame/staking-async/reward-fn/Cargo.toml +++ b/substrate/frame/staking-async/reward-fn/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-staking-async-reward-fn" -version = "19.0.0" +version = "0.2.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -18,7 +18,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] log = { workspace = true } -sp-arithmetic = { workspace = true } +sp-arithmetic.workspace = true [features] default = ["std"] diff --git a/substrate/frame/staking-async/runtime-api/Cargo.toml b/substrate/frame/staking-async/runtime-api/Cargo.toml index eefb6024378a1..5aee63ed3fc6b 100644 --- a/substrate/frame/staking-async/runtime-api/Cargo.toml +++ b/substrate/frame/staking-async/runtime-api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-staking-async-runtime-api" -version = "14.0.0" +version = "0.2.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -17,8 +17,8 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { features = ["derive"], workspace = true } -sp-api = { workspace = true } -sp-staking = { workspace = true } +sp-api.workspace = true +sp-staking.workspace = true [features] default = ["std"] diff --git a/substrate/frame/staking-async/runtimes/parachain/Cargo.toml b/substrate/frame/staking-async/runtimes/parachain/Cargo.toml index eb1b2c92114c0..52a287c28edab 100644 --- a/substrate/frame/staking-async/runtimes/parachain/Cargo.toml +++ b/substrate/frame/staking-async/runtimes/parachain/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-staking-async-parachain-runtime" -version = "0.15.0" +version = "0.2.0" authors.workspace = true edition.workspace = true description = "A parachain runtime for staking-async" @@ -13,125 +13,116 @@ workspace = true [dependencies] codec = { features = ["derive", "max-encoded-len"], workspace = true } +frame-benchmarking = { optional = true, workspace = true } +frame-election-provider-support.workspace = true +frame-executive.workspace = true +frame-metadata-hash-extension.workspace = true +frame-support.workspace = true +frame-system-benchmarking = { optional = true, workspace = true } +frame-system-rpc-runtime-api.workspace = true +frame-system.workspace = true +frame-try-runtime = { optional = true, workspace = true } hex-literal = { workspace = true, default-features = true } log = { workspace = true } +pallet-asset-conversion-ops.workspace = true +pallet-asset-conversion-tx-payment.workspace = true +pallet-asset-conversion.workspace = true +pallet-asset-rate.workspace = true +pallet-asset-rewards.workspace = true +pallet-assets-freezer.workspace = true +pallet-assets.workspace = true +pallet-aura.workspace = true +pallet-authorship.workspace = true +pallet-bags-list.workspace = true +pallet-balances.workspace = true +pallet-conviction-voting.workspace = true +pallet-delegated-staking.workspace = true +pallet-election-provider-multi-block.workspace = true +pallet-fast-unstake.workspace = true +pallet-migrations.workspace = true +pallet-multisig.workspace = true +pallet-nft-fractionalization.workspace = true +pallet-nfts-runtime-api.workspace = true +pallet-nfts.workspace = true +pallet-nomination-pools-runtime-api.workspace = true +pallet-nomination-pools.workspace = true +pallet-parameters.workspace = true +pallet-preimage.workspace = true +pallet-proxy.workspace = true +pallet-referenda.workspace = true +pallet-scheduler.workspace = true +pallet-session.workspace = true +pallet-staking-async-rc-client.workspace = true +pallet-staking-async-runtime-api.workspace = true +pallet-staking-async.workspace = true +pallet-state-trie-migration.workspace = true +pallet-sudo.workspace = true +pallet-timestamp.workspace = true +pallet-transaction-payment-rpc-runtime-api.workspace = true +pallet-transaction-payment.workspace = true +pallet-treasury.workspace = true +pallet-uniques.workspace = true +pallet-utility.workspace = true +pallet-vesting.workspace = true +pallet-whitelist.workspace = true scale-info = { features = ["derive"], workspace = true } serde_json = { features = ["alloc"], workspace = true } - -# Substrate -frame-benchmarking = { optional = true, workspace = true } -frame-election-provider-support = { workspace = true } -frame-executive = { workspace = true } -frame-metadata-hash-extension = { workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } -frame-system-benchmarking = { optional = true, workspace = true } -frame-system-rpc-runtime-api = { workspace = true } -frame-try-runtime = { optional = true, workspace = true } -pallet-asset-conversion = { workspace = true } -pallet-asset-conversion-ops = { workspace = true } -pallet-asset-conversion-tx-payment = { workspace = true } -pallet-asset-rate = { workspace = true } -pallet-asset-rewards = { workspace = true } -pallet-assets = { workspace = true } -pallet-assets-freezer = { workspace = true } -pallet-aura = { workspace = true } -pallet-authorship = { workspace = true } -pallet-bags-list = { workspace = true } -pallet-balances = { workspace = true } -pallet-conviction-voting = { workspace = true } -pallet-delegated-staking = { workspace = true } -pallet-election-provider-multi-block = { workspace = true } -pallet-fast-unstake = { workspace = true } -pallet-migrations = { workspace = true } -pallet-multisig = { workspace = true } -pallet-nft-fractionalization = { workspace = true } -pallet-nfts = { workspace = true } -pallet-nfts-runtime-api = { workspace = true } -pallet-nomination-pools = { workspace = true } -pallet-nomination-pools-runtime-api = { workspace = true } -pallet-parameters = { workspace = true } -pallet-preimage = { workspace = true } -pallet-proxy = { workspace = true } -pallet-referenda = { workspace = true } -pallet-scheduler = { workspace = true } -pallet-session = { workspace = true } -pallet-staking-async = { workspace = true } -pallet-staking-async-rc-client = { workspace = true } -pallet-staking-async-runtime-api = { workspace = true } -pallet-state-trie-migration = { workspace = true } -pallet-sudo = { workspace = true } -pallet-timestamp = { workspace = true } -pallet-transaction-payment = { workspace = true } -pallet-transaction-payment-rpc-runtime-api = { workspace = true } -pallet-treasury = { workspace = true } -pallet-uniques = { workspace = true } -pallet-utility = { workspace = true } -pallet-vesting = { workspace = true } -pallet-whitelist = { workspace = true } -sp-api = { workspace = true } -sp-arithmetic = { workspace = true } -sp-block-builder = { workspace = true } -sp-consensus-aura = { workspace = true } -sp-core = { workspace = true } -sp-genesis-builder = { workspace = true } -sp-inherents = { workspace = true } -sp-keyring = { workspace = true } -sp-npos-elections = { workspace = true } -sp-offchain = { workspace = true } -sp-runtime = { workspace = true } -sp-session = { workspace = true } -sp-staking = { workspace = true } -sp-std = { workspace = true } -sp-storage = { workspace = true } -sp-transaction-pool = { workspace = true } -sp-version = { workspace = true } +sp-api.workspace = true +sp-arithmetic.workspace = true +sp-block-builder.workspace = true +sp-consensus-aura.workspace = true +sp-core.workspace = true +sp-genesis-builder.workspace = true +sp-inherents.workspace = true +sp-keyring.workspace = true +sp-npos-elections.workspace = true +sp-offchain.workspace = true +sp-runtime.workspace = true +sp-session.workspace = true +sp-staking.workspace = true +sp-std.workspace = true +sp-storage.workspace = true +sp-transaction-pool.workspace = true +sp-version.workspace = true # num-traits feature needed for dex integer sq root: +assets-common.workspace = true +bp-asset-hub-rococo.workspace = true +bp-bridge-hub-rococo.workspace = true +bp-bridge-hub-westend.workspace = true +cumulus-pallet-aura-ext.workspace = true +cumulus-pallet-parachain-system.workspace = true +cumulus-pallet-session-benchmarking.workspace = true +cumulus-pallet-weight-reclaim.workspace = true +cumulus-pallet-xcm.workspace = true +cumulus-pallet-xcmp-queue = { features = ["bridging"], workspace = true } +cumulus-primitives-aura.workspace = true +cumulus-primitives-core.workspace = true +cumulus-primitives-utility.workspace = true +pallet-collator-selection.workspace = true +pallet-message-queue.workspace = true +pallet-xcm-benchmarks = { optional = true, workspace = true } +pallet-xcm-bridge-hub-router.workspace = true +pallet-xcm.workspace = true +parachain-info.workspace = true +parachains-common.workspace = true +polkadot-parachain-primitives.workspace = true +polkadot-runtime-common.workspace = true primitive-types = { features = [ "codec", "num-traits", "scale-info", ], workspace = true } - -# Polkadot -pallet-xcm = { workspace = true } -pallet-xcm-benchmarks = { optional = true, workspace = true } -polkadot-parachain-primitives = { workspace = true } -polkadot-runtime-common = { workspace = true } -westend-runtime-constants = { workspace = true } -xcm = { workspace = true } -xcm-builder = { workspace = true } -xcm-executor = { workspace = true } -xcm-runtime-apis = { workspace = true } - -# Cumulus -assets-common = { workspace = true } -cumulus-pallet-aura-ext = { workspace = true } -cumulus-pallet-parachain-system = { workspace = true } -cumulus-pallet-session-benchmarking = { workspace = true } -cumulus-pallet-weight-reclaim = { workspace = true } -cumulus-pallet-xcm = { workspace = true } -cumulus-pallet-xcmp-queue = { features = ["bridging"], workspace = true } -cumulus-primitives-aura = { workspace = true } -cumulus-primitives-core = { workspace = true } -cumulus-primitives-utility = { workspace = true } -pallet-collator-selection = { workspace = true } -pallet-message-queue = { workspace = true } -parachain-info = { workspace = true } -parachains-common = { workspace = true } testnet-parachains-constants = { features = ["westend"], workspace = true } - -# Bridges -bp-asset-hub-rococo = { workspace = true } -# bp-asset-hub-next-westend = { workspace = true } -bp-bridge-hub-rococo = { workspace = true } -bp-bridge-hub-westend = { workspace = true } -pallet-xcm-bridge-hub-router = { workspace = true } +westend-runtime-constants.workspace = true +xcm-builder.workspace = true +xcm-executor.workspace = true +xcm-runtime-apis.workspace = true +xcm.workspace = true [dev-dependencies] -asset-test-utils = { workspace = true, default-features = true } -parachains-runtimes-test-utils = { workspace = true, default-features = true } +asset-test-utils = { default-features = true, workspace = true } +parachains-runtimes-test-utils = { default-features = true, workspace = true } [build-dependencies] substrate-wasm-builder = { optional = true, workspace = true, default-features = true } diff --git a/substrate/frame/staking-async/runtimes/rc/Cargo.toml b/substrate/frame/staking-async/runtimes/rc/Cargo.toml index 53050bfd22ed8..dc68587123dc8 100644 --- a/substrate/frame/staking-async/runtimes/rc/Cargo.toml +++ b/substrate/frame/staking-async/runtimes/rc/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "pallet-staking-async-rc-runtime" build = "build.rs" -version = "7.0.0" +version = "0.2.0" description = "Staking Async testnet Relay Chain runtime." authors.workspace = true edition.workspace = true @@ -13,124 +13,120 @@ repository.workspace = true workspace = true [dependencies] +binary-merkle-tree.workspace = true bitvec = { features = ["alloc"], workspace = true } codec = { features = ["derive", "max-encoded-len"], workspace = true } -log = { workspace = true } -scale-info = { features = ["derive"], workspace = true } -serde = { workspace = true } -serde_derive = { optional = true, workspace = true } -serde_json = { features = ["alloc"], workspace = true } -smallvec = { workspace = true, default-features = true } - -binary-merkle-tree = { workspace = true } -sp-api = { workspace = true } -sp-application-crypto = { workspace = true } -sp-arithmetic = { workspace = true } -sp-authority-discovery = { workspace = true } -sp-block-builder = { workspace = true } -sp-consensus-babe = { workspace = true } -sp-consensus-beefy = { workspace = true } -sp-consensus-grandpa = { workspace = true } -sp-core = { workspace = true } -sp-genesis-builder = { workspace = true } -sp-inherents = { workspace = true } -sp-io = { workspace = true } -sp-keyring = { workspace = true } -sp-mmr-primitives = { workspace = true } -sp-npos-elections = { workspace = true } -sp-offchain = { workspace = true } -sp-runtime = { workspace = true } -sp-session = { workspace = true } -sp-staking = { workspace = true } -sp-storage = { workspace = true } -sp-transaction-pool = { workspace = true } -sp-version = { workspace = true } - -frame-election-provider-support = { workspace = true } -frame-executive = { workspace = true } -frame-metadata-hash-extension = { workspace = true } -frame-support = { features = ["experimental", "tuples-96"], workspace = true } -frame-system = { workspace = true } -frame-system-rpc-runtime-api = { workspace = true } -pallet-asset-rate = { workspace = true } -pallet-authority-discovery = { workspace = true } -pallet-authorship = { workspace = true } -pallet-babe = { workspace = true } -pallet-bags-list = { workspace = true } -pallet-balances = { workspace = true } -pallet-beefy = { workspace = true } -pallet-beefy-mmr = { workspace = true } -pallet-conviction-voting = { workspace = true } -pallet-delegated-staking = { workspace = true } -pallet-election-provider-multi-phase = { workspace = true } -pallet-elections-phragmen = { workspace = true } -pallet-fast-unstake = { workspace = true } -pallet-grandpa = { workspace = true } -pallet-identity = { workspace = true } -pallet-indices = { workspace = true } -pallet-membership = { workspace = true } -pallet-message-queue = { workspace = true } -pallet-migrations = { workspace = true } -pallet-mmr = { workspace = true } -pallet-multisig = { workspace = true } -pallet-nomination-pools = { workspace = true } -pallet-nomination-pools-runtime-api = { workspace = true } -pallet-offences = { workspace = true } -pallet-parameters = { workspace = true } -pallet-preimage = { workspace = true } -pallet-proxy = { workspace = true } -pallet-recovery = { workspace = true } -pallet-referenda = { workspace = true } -pallet-root-testing = { workspace = true } -pallet-scheduler = { workspace = true } -pallet-session = { workspace = true } -pallet-society = { workspace = true } -pallet-staking = { workspace = true } -pallet-staking-async-ah-client = { workspace = true } -pallet-staking-async-rc-client = { workspace = true } -pallet-staking-async-rc-runtime-constants = { workspace = true } -pallet-state-trie-migration = { workspace = true } -pallet-sudo = { workspace = true } -pallet-timestamp = { workspace = true } -pallet-transaction-payment = { workspace = true } -pallet-transaction-payment-rpc-runtime-api = { workspace = true } -pallet-treasury = { workspace = true } -pallet-utility = { workspace = true } -pallet-vesting = { workspace = true } -pallet-whitelist = { workspace = true } -pallet-xcm = { workspace = true } -pallet-xcm-benchmarks = { optional = true, workspace = true } - frame-benchmarking = { optional = true, workspace = true } +frame-election-provider-support.workspace = true +frame-executive.workspace = true +frame-metadata-hash-extension.workspace = true +frame-support = { features = ["experimental", "tuples-96"], workspace = true } frame-system-benchmarking = { optional = true, workspace = true } +frame-system-rpc-runtime-api.workspace = true +frame-system.workspace = true frame-try-runtime = { optional = true, workspace = true } hex-literal = { workspace = true, default-features = true } +log = { workspace = true } +pallet-asset-rate.workspace = true +pallet-authority-discovery.workspace = true +pallet-authorship.workspace = true +pallet-babe.workspace = true +pallet-bags-list.workspace = true +pallet-balances.workspace = true +pallet-beefy-mmr.workspace = true +pallet-beefy.workspace = true +pallet-conviction-voting.workspace = true +pallet-delegated-staking.workspace = true +pallet-election-provider-multi-phase.workspace = true pallet-election-provider-support-benchmarking = { optional = true, workspace = true } +pallet-elections-phragmen.workspace = true +pallet-fast-unstake.workspace = true +pallet-grandpa.workspace = true +pallet-identity.workspace = true +pallet-indices.workspace = true +pallet-membership.workspace = true +pallet-message-queue.workspace = true +pallet-migrations.workspace = true +pallet-mmr.workspace = true +pallet-multisig.workspace = true pallet-nomination-pools-benchmarking = { optional = true, workspace = true } +pallet-nomination-pools-runtime-api.workspace = true +pallet-nomination-pools.workspace = true pallet-offences-benchmarking = { optional = true, workspace = true } +pallet-offences.workspace = true +pallet-parameters.workspace = true +pallet-preimage.workspace = true +pallet-proxy.workspace = true +pallet-recovery.workspace = true +pallet-referenda.workspace = true +pallet-root-testing.workspace = true +pallet-scheduler.workspace = true pallet-session-benchmarking = { optional = true, workspace = true } - -polkadot-parachain-primitives = { workspace = true } -polkadot-primitives = { workspace = true } -polkadot-runtime-common = { workspace = true } -polkadot-runtime-parachains = { workspace = true } - -xcm = { workspace = true } -xcm-builder = { workspace = true } -xcm-executor = { workspace = true } -xcm-runtime-apis = { workspace = true } +pallet-session.workspace = true +pallet-society.workspace = true +pallet-staking-async-ah-client.workspace = true +pallet-staking-async-rc-client.workspace = true +pallet-staking-async-rc-runtime-constants.workspace = true +pallet-staking.workspace = true +pallet-state-trie-migration.workspace = true +pallet-sudo.workspace = true +pallet-timestamp.workspace = true +pallet-transaction-payment-rpc-runtime-api.workspace = true +pallet-transaction-payment.workspace = true +pallet-treasury.workspace = true +pallet-utility.workspace = true +pallet-vesting.workspace = true +pallet-whitelist.workspace = true +pallet-xcm-benchmarks = { optional = true, workspace = true } +pallet-xcm.workspace = true +polkadot-parachain-primitives.workspace = true +polkadot-primitives.workspace = true +polkadot-runtime-common.workspace = true +polkadot-runtime-parachains.workspace = true +scale-info = { features = ["derive"], workspace = true } +serde = { workspace = true } +serde_derive = { optional = true, workspace = true } +serde_json = { features = ["alloc"], workspace = true } +smallvec = { workspace = true, default-features = true } +sp-api.workspace = true +sp-application-crypto.workspace = true +sp-arithmetic.workspace = true +sp-authority-discovery.workspace = true +sp-block-builder.workspace = true +sp-consensus-babe.workspace = true +sp-consensus-beefy.workspace = true +sp-consensus-grandpa.workspace = true +sp-core.workspace = true +sp-genesis-builder.workspace = true +sp-inherents.workspace = true +sp-io.workspace = true +sp-keyring.workspace = true +sp-mmr-primitives.workspace = true +sp-npos-elections.workspace = true +sp-offchain.workspace = true +sp-runtime.workspace = true +sp-session.workspace = true +sp-staking.workspace = true +sp-storage.workspace = true +sp-transaction-pool.workspace = true +sp-version.workspace = true +xcm-builder.workspace = true +xcm-executor.workspace = true +xcm-runtime-apis.workspace = true +xcm.workspace = true [dev-dependencies] approx = { workspace = true } -remote-externalities = { workspace = true, default-features = true } +remote-externalities = { default-features = true, workspace = true } serde_json = { workspace = true, default-features = true } -sp-keyring = { workspace = true, default-features = true } -sp-tracing = { workspace = true } +sp-keyring = { default-features = true, workspace = true } +sp-tracing = { workspace = true, default-features = false } tiny-keccak = { features = ["keccak"], workspace = true } tokio = { features = ["macros"], workspace = true, default-features = true } [build-dependencies] -substrate-wasm-builder = { workspace = true, default-features = true } +substrate-wasm-builder.default-features = true +substrate-wasm-builder.workspace = true [features] default = ["std"] diff --git a/substrate/frame/staking-async/runtimes/rc/constants/Cargo.toml b/substrate/frame/staking-async/runtimes/rc/constants/Cargo.toml index e865ba4e81fb5..b2527484dc30b 100644 --- a/substrate/frame/staking-async/runtimes/rc/constants/Cargo.toml +++ b/substrate/frame/staking-async/runtimes/rc/constants/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-staking-async-rc-runtime-constants" -version = "7.0.0" +version = "0.2.0" description = "Constants used throughout the Staking Async RC network." authors.workspace = true edition.workspace = true @@ -15,17 +15,15 @@ exclude-from-umbrella = true workspace = true [dependencies] +frame-support.workspace = true +polkadot-primitives.workspace = true +polkadot-runtime-common.workspace = true smallvec = { workspace = true, default-features = true } - -frame-support = { workspace = true } -polkadot-primitives = { workspace = true } -polkadot-runtime-common = { workspace = true } -sp-core = { workspace = true } -sp-runtime = { workspace = true } -sp-weights = { workspace = true } - -xcm = { workspace = true } -xcm-builder = { workspace = true } +sp-core.workspace = true +sp-runtime.workspace = true +sp-weights.workspace = true +xcm-builder.workspace = true +xcm.workspace = true [features] default = ["std"] diff --git a/substrate/frame/staking/Cargo.toml b/substrate/frame/staking/Cargo.toml index 0d2457799e941..03cc92a6a4b0c 100644 --- a/substrate/frame/staking/Cargo.toml +++ b/substrate/frame/staking/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-staking" -version = "28.0.0" +version = "41.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -17,35 +17,33 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { features = ["derive"], workspace = true } -frame-election-provider-support = { workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-benchmarking = { optional = true, workspace = true } +frame-election-provider-support.workspace = true +frame-support.workspace = true +frame-system.workspace = true log = { workspace = true } -pallet-authorship = { workspace = true } +pallet-authorship.workspace = true pallet-session = { features = ["historical"], workspace = true } +rand_chacha = { optional = true, workspace = true } scale-info = { features = ["derive", "serde"], workspace = true } serde = { features = ["alloc", "derive"], workspace = true } sp-application-crypto = { features = ["serde"], workspace = true } -sp-io = { workspace = true } +sp-io.workspace = true sp-runtime = { features = ["serde"], workspace = true } sp-staking = { features = ["serde"], workspace = true } -# Optional imports for benchmarking -frame-benchmarking = { optional = true, workspace = true } -rand_chacha = { optional = true, workspace = true } - [dev-dependencies] -frame-benchmarking = { workspace = true, default-features = true } -frame-election-provider-support = { workspace = true, default-features = true } -frame-support = { features = ["experimental"], workspace = true, default-features = true } -pallet-bags-list = { workspace = true, default-features = true } -pallet-balances = { workspace = true, default-features = true } -pallet-staking-reward-curve = { workspace = true, default-features = true } -pallet-timestamp = { workspace = true, default-features = true } +frame-benchmarking = { default-features = true, workspace = true } +frame-election-provider-support = { default-features = true, workspace = true } +frame-support = { features = ["experimental"], default-features = true, workspace = true } +pallet-bags-list = { default-features = true, workspace = true } +pallet-balances = { default-features = true, workspace = true } +pallet-staking-reward-curve = { default-features = true, workspace = true } +pallet-timestamp = { default-features = true, workspace = true } rand_chacha = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-npos-elections = { workspace = true, default-features = true } -sp-tracing = { workspace = true, default-features = true } +sp-core = { default-features = true, workspace = true } +sp-npos-elections = { default-features = true, workspace = true } +sp-tracing = { default-features = true, workspace = true } substrate-test-utils = { workspace = true } [features] @@ -58,18 +56,13 @@ std = [ "frame-system/std", "log/std", "pallet-authorship/std", - "pallet-bags-list/std", - "pallet-balances/std", "pallet-session/std", - "pallet-timestamp/std", "scale-info/std", "serde/std", "sp-application-crypto/std", "sp-io/std", - "sp-npos-elections/std", "sp-runtime/std", "sp-staking/std", - "sp-tracing/std", ] runtime-benchmarks = [ "frame-benchmarking/runtime-benchmarks", diff --git a/substrate/frame/staking/reward-curve/Cargo.toml b/substrate/frame/staking/reward-curve/Cargo.toml index 8e60b3962a99c..d91022f4d9db4 100644 --- a/substrate/frame/staking/reward-curve/Cargo.toml +++ b/substrate/frame/staking/reward-curve/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-staking-reward-curve" -version = "11.0.0" +version = "12.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -24,4 +24,4 @@ quote = { workspace = true } syn = { features = ["full", "visit"], workspace = true } [dev-dependencies] -sp-runtime = { workspace = true, default-features = true } +sp-runtime = { default-features = true, workspace = true } diff --git a/substrate/frame/staking/reward-fn/Cargo.toml b/substrate/frame/staking/reward-fn/Cargo.toml index 3c238ae09d47f..a406397254dad 100644 --- a/substrate/frame/staking/reward-fn/Cargo.toml +++ b/substrate/frame/staking/reward-fn/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-staking-reward-fn" -version = "19.0.0" +version = "23.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -16,7 +16,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] log = { workspace = true } -sp-arithmetic = { workspace = true } +sp-arithmetic.workspace = true [features] default = ["std"] diff --git a/substrate/frame/staking/runtime-api/Cargo.toml b/substrate/frame/staking/runtime-api/Cargo.toml index d67b1e173b283..18e9bbcb47fee 100644 --- a/substrate/frame/staking/runtime-api/Cargo.toml +++ b/substrate/frame/staking/runtime-api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-staking-runtime-api" -version = "14.0.0" +version = "27.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -17,8 +17,8 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { features = ["derive"], workspace = true } -sp-api = { workspace = true } -sp-staking = { workspace = true } +sp-api.workspace = true +sp-staking.workspace = true [features] default = ["std"] diff --git a/substrate/frame/state-trie-migration/Cargo.toml b/substrate/frame/state-trie-migration/Cargo.toml index 51633c62cdac3..f118d78ab6cd2 100644 --- a/substrate/frame/state-trie-migration/Cargo.toml +++ b/substrate/frame/state-trie-migration/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-state-trie-migration" -version = "29.0.0" +version = "46.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -17,22 +17,22 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { workspace = true } frame-benchmarking = { optional = true, workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true log = { workspace = true } remote-externalities = { optional = true, workspace = true, default-features = true } scale-info = { features = ["derive"], workspace = true } serde = { optional = true, workspace = true, default-features = true } -sp-core = { workspace = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } +sp-core.workspace = true +sp-io.workspace = true +sp-runtime.workspace = true substrate-state-trie-migration-rpc = { optional = true, workspace = true, default-features = true } thousands = { optional = true, workspace = true } zstd = { optional = true, workspace = true } [dev-dependencies] -pallet-balances = { workspace = true, default-features = true } -sp-tracing = { workspace = true, default-features = true } +pallet-balances = { default-features = true, workspace = true } +sp-tracing = { default-features = true, workspace = true } tokio = { features = ["macros"], workspace = true, default-features = true } [features] @@ -43,12 +43,10 @@ std = [ "frame-support/std", "frame-system/std", "log/std", - "pallet-balances/std", "scale-info/std", "sp-core/std", "sp-io/std", "sp-runtime/std", - "sp-tracing/std", ] runtime-benchmarks = [ "frame-benchmarking", diff --git a/substrate/frame/statement/Cargo.toml b/substrate/frame/statement/Cargo.toml index b1449fa244162..21b8462710572 100644 --- a/substrate/frame/statement/Cargo.toml +++ b/substrate/frame/statement/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-statement" -version = "10.0.0" +version = "23.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -16,18 +16,18 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { features = ["derive"], workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true log = { workspace = true } scale-info = { features = ["derive"], workspace = true } -sp-api = { workspace = true } -sp-core = { workspace = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } -sp-statement-store = { workspace = true } +sp-api.workspace = true +sp-core.workspace = true +sp-io.workspace = true +sp-runtime.workspace = true +sp-statement-store.workspace = true [dev-dependencies] -pallet-balances = { workspace = true, default-features = true } +pallet-balances = { default-features = true, workspace = true } [features] default = ["std"] @@ -36,7 +36,6 @@ std = [ "frame-support/std", "frame-system/std", "log/std", - "pallet-balances/std", "scale-info/std", "sp-api/std", "sp-core/std", diff --git a/substrate/frame/sudo/Cargo.toml b/substrate/frame/sudo/Cargo.toml index c3828aa7977e8..095fd56e99f68 100644 --- a/substrate/frame/sudo/Cargo.toml +++ b/substrate/frame/sudo/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-sudo" -version = "28.0.0" +version = "41.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -18,11 +18,11 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { features = ["derive"], workspace = true } frame-benchmarking = { optional = true, workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true scale-info = { features = ["derive"], workspace = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } +sp-io.workspace = true +sp-runtime.workspace = true docify = { workspace = true } diff --git a/substrate/frame/support/Cargo.toml b/substrate/frame/support/Cargo.toml index 8d0d9a8e5759b..9cf11dd953c6d 100644 --- a/substrate/frame/support/Cargo.toml +++ b/substrate/frame/support/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "frame-support" -version = "28.0.0" +version = "41.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -17,13 +17,13 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] array-bytes = { workspace = true } -binary-merkle-tree = { workspace = true } +binary-merkle-tree.workspace = true bitflags = { workspace = true } codec = { features = ["derive", "max-encoded-len"], workspace = true } docify = { workspace = true } environmental = { workspace = true } frame-metadata = { features = ["current", "unstable"], workspace = true } -frame-support-procedural = { workspace = true } +frame-support-procedural.workspace = true impl-trait-for-tuples = { workspace = true } k256 = { features = ["ecdsa"], workspace = true } log = { workspace = true } @@ -33,31 +33,32 @@ scale-info = { features = ["derive"], workspace = true } serde = { features = ["alloc", "derive"], workspace = true } serde_json = { features = ["alloc"], workspace = true } sp-api = { features = ["frame-metadata"], workspace = true } -sp-arithmetic = { workspace = true } -sp-core = { workspace = true } -sp-crypto-hashing-proc-macro = { workspace = true, default-features = true } -sp-debug-derive = { workspace = true } -sp-genesis-builder = { workspace = true } -sp-inherents = { workspace = true } -sp-io = { workspace = true } -sp-metadata-ir = { workspace = true } +sp-arithmetic.workspace = true +sp-core.workspace = true +sp-crypto-hashing-proc-macro.default-features = true +sp-crypto-hashing-proc-macro.workspace = true +sp-debug-derive.workspace = true +sp-genesis-builder.workspace = true +sp-inherents.workspace = true +sp-io.workspace = true +sp-metadata-ir.workspace = true sp-runtime = { features = ["serde"], workspace = true } -sp-staking = { workspace = true } +sp-staking.workspace = true sp-state-machine = { optional = true, workspace = true } -sp-std = { workspace = true } -sp-tracing = { workspace = true } -sp-trie = { workspace = true } -sp-weights = { workspace = true } +sp-std.workspace = true +sp-tracing.workspace = true +sp-trie.workspace = true +sp-weights.workspace = true tt-call = { workspace = true } aquamarine = { workspace = true } [dev-dependencies] Inflector = { workspace = true } -frame-system = { workspace = true, default-features = true } +frame-system = { default-features = true, workspace = true } pretty_assertions = { workspace = true } -sp-crypto-hashing = { workspace = true, default-features = true } -sp-timestamp = { workspace = true, default-features = true } +sp-crypto-hashing = { default-features = true, workspace = true } +sp-timestamp = { default-features = true, workspace = true } [features] default = ["std"] @@ -67,7 +68,6 @@ std = [ "environmental/std", "frame-metadata/std", "frame-support-procedural/std", - "frame-system/std", "k256/std", "log/std", "scale-info/std", diff --git a/substrate/frame/support/procedural/Cargo.toml b/substrate/frame/support/procedural/Cargo.toml index 2063d08eb5165..5ea38d452a060 100644 --- a/substrate/frame/support/procedural/Cargo.toml +++ b/substrate/frame/support/procedural/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "frame-support-procedural" -version = "23.0.0" +version = "34.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -26,38 +26,32 @@ cfg-expr = { workspace = true } derive-syn-parse = { workspace = true } docify = { workspace = true } expander = { workspace = true } -frame-support-procedural-tools = { workspace = true, default-features = true } +frame-support-procedural-tools.default-features = true +frame-support-procedural-tools.workspace = true itertools = { workspace = true } macro_magic = { features = ["proc_support"], workspace = true } proc-macro-warning = { workspace = true } proc-macro2 = { workspace = true } quote = { workspace = true } -sp-crypto-hashing = { workspace = true } +sp-crypto-hashing.workspace = true syn = { features = ["full", "parsing", "visit-mut"], workspace = true } [dev-dependencies] codec = { features = ["derive", "max-encoded-len"], workspace = true, default-features = true } -frame-benchmarking = { workspace = true, default-features = true } -frame-support = { workspace = true, default-features = true } -frame-system = { workspace = true, default-features = true } +frame-benchmarking = { default-features = true, workspace = true } +frame-support = { default-features = true, workspace = true } +frame-system = { default-features = true, workspace = true } pretty_assertions = { workspace = true } regex = { workspace = true } scale-info = { features = ["derive"], workspace = true, default-features = true } -sp-io = { workspace = true, default-features = true } -sp-metadata-ir = { workspace = true, default-features = true } -sp-runtime = { features = ["serde"], workspace = true, default-features = true } +sp-io = { default-features = true, workspace = true } +sp-metadata-ir = { default-features = true, workspace = true } +sp-runtime = { features = ["serde"], default-features = true, workspace = true } [features] default = ["std"] std = [ - "codec/std", - "frame-benchmarking/std", - "frame-support/std", - "frame-system/std", - "scale-info/std", "sp-crypto-hashing/std", - "sp-metadata-ir/std", - "sp-runtime/std", ] no-metadata-docs = [] experimental = [] diff --git a/substrate/frame/support/procedural/tools/Cargo.toml b/substrate/frame/support/procedural/tools/Cargo.toml index cbb2fde9e816a..6991d46d7efbc 100644 --- a/substrate/frame/support/procedural/tools/Cargo.toml +++ b/substrate/frame/support/procedural/tools/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "frame-support-procedural-tools" -version = "10.0.0" +version = "13.0.1" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -15,7 +15,8 @@ workspace = true targets = ["x86_64-unknown-linux-gnu"] [dependencies] -frame-support-procedural-tools-derive = { workspace = true, default-features = true } +frame-support-procedural-tools-derive.default-features = true +frame-support-procedural-tools-derive.workspace = true proc-macro-crate = { workspace = true } proc-macro2 = { workspace = true } quote = { workspace = true } diff --git a/substrate/frame/support/procedural/tools/derive/Cargo.toml b/substrate/frame/support/procedural/tools/derive/Cargo.toml index 80cde38fd5b6c..6039fe5aaeb5b 100644 --- a/substrate/frame/support/procedural/tools/derive/Cargo.toml +++ b/substrate/frame/support/procedural/tools/derive/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "frame-support-procedural-tools-derive" -version = "11.0.0" +version = "12.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" diff --git a/substrate/frame/support/test/Cargo.toml b/substrate/frame/support/test/Cargo.toml index 37287452f319d..5bb084be4ca15 100644 --- a/substrate/frame/support/test/Cargo.toml +++ b/substrate/frame/support/test/Cargo.toml @@ -16,27 +16,26 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { features = ["derive"], workspace = true } -frame-benchmarking = { workspace = true } -frame-executive = { workspace = true } +frame-benchmarking.workspace = true +frame-executive.workspace = true frame-metadata = { features = ["current", "unstable"], workspace = true } frame-support = { features = ["experimental"], workspace = true } -frame-system = { workspace = true } +frame-system.workspace = true pretty_assertions = { workspace = true } rustversion = { workspace = true } scale-info = { features = ["derive"], workspace = true } serde = { features = ["derive"], workspace = true } -sp-api = { workspace = true } -sp-arithmetic = { workspace = true } -sp-core = { workspace = true } -sp-io = { workspace = true } -sp-metadata-ir = { workspace = true } -sp-runtime = { workspace = true } +sp-api.workspace = true +sp-arithmetic.workspace = true +sp-core.workspace = true +sp-io.workspace = true +sp-metadata-ir.workspace = true +sp-runtime.workspace = true sp-state-machine = { optional = true, workspace = true, default-features = true } -sp-version = { workspace = true } +sp-version.workspace = true static_assertions = { workspace = true, default-features = true } +test-pallet.workspace = true trybuild = { features = ["diff"], workspace = true } -# The "std" feature for this pallet is never activated on purpose, in order to test construct_runtime error message -test-pallet = { workspace = true } [features] default = ["std"] diff --git a/substrate/frame/support/test/compile_pass/Cargo.toml b/substrate/frame/support/test/compile_pass/Cargo.toml index 988135d64dbf6..5fb279e862bc1 100644 --- a/substrate/frame/support/test/compile_pass/Cargo.toml +++ b/substrate/frame/support/test/compile_pass/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "frame-support-test-compile-pass" -version = "4.0.0-dev" +version = "4.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -16,12 +16,12 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { features = ["derive"], workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true scale-info = { features = ["derive"], workspace = true } -sp-core = { workspace = true } -sp-runtime = { workspace = true } -sp-version = { workspace = true } +sp-core.workspace = true +sp-runtime.workspace = true +sp-version.workspace = true [features] default = ["std"] diff --git a/substrate/frame/support/test/pallet/Cargo.toml b/substrate/frame/support/test/pallet/Cargo.toml index dc5558b1d4b8e..cdadccd045592 100644 --- a/substrate/frame/support/test/pallet/Cargo.toml +++ b/substrate/frame/support/test/pallet/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "frame-support-test-pallet" -version = "4.0.0-dev" +version = "4.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -16,11 +16,11 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { features = ["derive"], workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true scale-info = { features = ["derive"], workspace = true } serde = { features = ["derive"], workspace = true } -sp-runtime = { workspace = true } +sp-runtime.workspace = true [features] default = ["std"] diff --git a/substrate/frame/system/Cargo.toml b/substrate/frame/system/Cargo.toml index 680fa9ae3814c..bbc72e0ac6bbc 100644 --- a/substrate/frame/system/Cargo.toml +++ b/substrate/frame/system/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "frame-system" -version = "28.0.0" +version = "41.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -23,19 +23,19 @@ harness = false cfg-if = { workspace = true } codec = { features = ["derive"], workspace = true } docify = { workspace = true } -frame-support = { workspace = true } +frame-support.workspace = true log = { workspace = true } scale-info = { features = ["derive", "serde"], workspace = true } serde = { features = ["alloc", "derive"], workspace = true } sp-core = { features = ["serde"], workspace = true } -sp-io = { workspace = true } +sp-io.workspace = true sp-runtime = { features = ["serde"], workspace = true } sp-version = { features = ["serde"], workspace = true } sp-weights = { features = ["serde"], workspace = true } [dev-dependencies] criterion = { workspace = true, default-features = true } -sp-externalities = { workspace = true, default-features = true } +sp-externalities = { default-features = true, workspace = true } substrate-test-runtime-client = { workspace = true } [features] diff --git a/substrate/frame/system/benchmarking/Cargo.toml b/substrate/frame/system/benchmarking/Cargo.toml index f07303dfb9ecc..256148ad266a5 100644 --- a/substrate/frame/system/benchmarking/Cargo.toml +++ b/substrate/frame/system/benchmarking/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "frame-system-benchmarking" -version = "28.0.0" +version = "41.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -17,17 +17,17 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { workspace = true } -frame-benchmarking = { workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-benchmarking.workspace = true +frame-support.workspace = true +frame-system.workspace = true scale-info = { features = ["derive"], workspace = true } -sp-core = { workspace = true } -sp-runtime = { workspace = true } +sp-core.workspace = true +sp-runtime.workspace = true [dev-dependencies] -sp-externalities = { workspace = true, default-features = true } -sp-io = { workspace = true, default-features = true } -sp-version = { workspace = true, default-features = true } +sp-externalities = { default-features = true, workspace = true } +sp-io = { default-features = true, workspace = true } +sp-version = { default-features = true, workspace = true } [features] default = ["std"] diff --git a/substrate/frame/system/rpc/runtime-api/Cargo.toml b/substrate/frame/system/rpc/runtime-api/Cargo.toml index 3fd1985619bd4..a4279652ce46d 100644 --- a/substrate/frame/system/rpc/runtime-api/Cargo.toml +++ b/substrate/frame/system/rpc/runtime-api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "frame-system-rpc-runtime-api" -version = "26.0.0" +version = "37.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -18,7 +18,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { workspace = true } docify = { workspace = true } -sp-api = { workspace = true } +sp-api.workspace = true [features] default = ["std"] diff --git a/substrate/frame/timestamp/Cargo.toml b/substrate/frame/timestamp/Cargo.toml index e835797dfc45b..b47c0ed995f9b 100644 --- a/substrate/frame/timestamp/Cargo.toml +++ b/substrate/frame/timestamp/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-timestamp" -version = "27.0.0" +version = "40.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -19,19 +19,19 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { features = ["derive", "max-encoded-len"], workspace = true } frame-benchmarking = { optional = true, workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true log = { workspace = true } scale-info = { features = ["derive"], workspace = true } -sp-inherents = { workspace = true } -sp-runtime = { workspace = true } -sp-storage = { workspace = true } -sp-timestamp = { workspace = true } +sp-inherents.workspace = true +sp-runtime.workspace = true +sp-storage.workspace = true +sp-timestamp.workspace = true docify = { workspace = true } [dev-dependencies] -sp-io = { workspace = true, default-features = true } +sp-io = { default-features = true, workspace = true } [features] default = ["std"] diff --git a/substrate/frame/tips/Cargo.toml b/substrate/frame/tips/Cargo.toml index e191459934c51..7a33ae5fc6f7a 100644 --- a/substrate/frame/tips/Cargo.toml +++ b/substrate/frame/tips/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-tips" -version = "27.0.0" +version = "40.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -18,19 +18,19 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { features = ["derive"], workspace = true } frame-benchmarking = { optional = true, workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true log = { workspace = true } -pallet-treasury = { workspace = true } +pallet-treasury.workspace = true scale-info = { features = ["derive"], workspace = true } serde = { features = ["derive"], optional = true, workspace = true, default-features = true } -sp-core = { workspace = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } +sp-core.workspace = true +sp-io.workspace = true +sp-runtime.workspace = true [dev-dependencies] -pallet-balances = { workspace = true, default-features = true } -sp-storage = { workspace = true, default-features = true } +pallet-balances = { default-features = true, workspace = true } +sp-storage = { default-features = true, workspace = true } [features] default = ["std"] diff --git a/substrate/frame/transaction-payment/Cargo.toml b/substrate/frame/transaction-payment/Cargo.toml index 3f22e59c86d7e..0239312e8bffe 100644 --- a/substrate/frame/transaction-payment/Cargo.toml +++ b/substrate/frame/transaction-payment/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-transaction-payment" -version = "28.0.0" +version = "41.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -18,15 +18,15 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { features = ["derive"], workspace = true } frame-benchmarking = { optional = true, workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true scale-info = { features = ["derive"], workspace = true } serde = { optional = true, workspace = true, default-features = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } +sp-io.workspace = true +sp-runtime.workspace = true [dev-dependencies] -pallet-balances = { workspace = true, default-features = true } +pallet-balances = { default-features = true, workspace = true } serde_json = { workspace = true, default-features = true } [features] diff --git a/substrate/frame/transaction-payment/asset-conversion-tx-payment/Cargo.toml b/substrate/frame/transaction-payment/asset-conversion-tx-payment/Cargo.toml index b6d881230ecd4..bf0aeec96954f 100644 --- a/substrate/frame/transaction-payment/asset-conversion-tx-payment/Cargo.toml +++ b/substrate/frame/transaction-payment/asset-conversion-tx-payment/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-asset-conversion-tx-payment" -version = "10.0.0" +version = "23.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -19,17 +19,17 @@ targets = ["x86_64-unknown-linux-gnu"] # Substrate dependencies codec = { features = ["derive"], workspace = true } frame-benchmarking = { optional = true, workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } -pallet-asset-conversion = { workspace = true } -pallet-transaction-payment = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true +pallet-asset-conversion.workspace = true +pallet-transaction-payment.workspace = true scale-info = { features = ["derive"], workspace = true } -sp-runtime = { workspace = true } +sp-runtime.workspace = true [dev-dependencies] -pallet-assets = { workspace = true, default-features = true } -pallet-balances = { workspace = true, default-features = true } -sp-io = { workspace = true, default-features = true } +pallet-assets = { default-features = true, workspace = true } +pallet-balances = { default-features = true, workspace = true } +sp-io = { default-features = true, workspace = true } [features] default = ["std"] diff --git a/substrate/frame/transaction-payment/asset-tx-payment/Cargo.toml b/substrate/frame/transaction-payment/asset-tx-payment/Cargo.toml index e2a4eb0c77c86..2c97e1c467def 100644 --- a/substrate/frame/transaction-payment/asset-tx-payment/Cargo.toml +++ b/substrate/frame/transaction-payment/asset-tx-payment/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-asset-tx-payment" -version = "28.0.0" +version = "41.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -16,14 +16,12 @@ workspace = true targets = ["x86_64-unknown-linux-gnu"] [dependencies] -# Substrate dependencies -sp-io = { workspace = true } -sp-runtime = { workspace = true } - frame-benchmarking = { optional = true, workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } -pallet-transaction-payment = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true +pallet-transaction-payment.workspace = true +sp-io.workspace = true +sp-runtime.workspace = true # Other dependencies codec = { features = ["derive"], workspace = true } @@ -31,9 +29,9 @@ scale-info = { features = ["derive"], workspace = true } serde = { optional = true, workspace = true, default-features = true } [dev-dependencies] -pallet-assets = { workspace = true, default-features = true } -pallet-authorship = { workspace = true, default-features = true } -pallet-balances = { workspace = true, default-features = true } +pallet-assets = { default-features = true, workspace = true } +pallet-authorship = { default-features = true, workspace = true } +pallet-balances = { default-features = true, workspace = true } [features] default = ["std"] diff --git a/substrate/frame/transaction-payment/rpc/Cargo.toml b/substrate/frame/transaction-payment/rpc/Cargo.toml index f049e866c0d69..0f014578f3230 100644 --- a/substrate/frame/transaction-payment/rpc/Cargo.toml +++ b/substrate/frame/transaction-payment/rpc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-transaction-payment-rpc" -version = "30.0.0" +version = "44.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -18,10 +18,17 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { workspace = true, default-features = true } jsonrpsee = { features = ["client-core", "macros", "server-core"], workspace = true } -pallet-transaction-payment-rpc-runtime-api = { workspace = true, default-features = true } -sp-api = { workspace = true, default-features = true } -sp-blockchain = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-rpc = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } -sp-weights = { workspace = true, default-features = true } +pallet-transaction-payment-rpc-runtime-api.default-features = true +pallet-transaction-payment-rpc-runtime-api.workspace = true +sp-api.default-features = true +sp-api.workspace = true +sp-blockchain.default-features = true +sp-blockchain.workspace = true +sp-core.default-features = true +sp-core.workspace = true +sp-rpc.default-features = true +sp-rpc.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true +sp-weights.default-features = true +sp-weights.workspace = true diff --git a/substrate/frame/transaction-payment/rpc/runtime-api/Cargo.toml b/substrate/frame/transaction-payment/rpc/runtime-api/Cargo.toml index 4457590545096..00a74ce8faf64 100644 --- a/substrate/frame/transaction-payment/rpc/runtime-api/Cargo.toml +++ b/substrate/frame/transaction-payment/rpc/runtime-api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-transaction-payment-rpc-runtime-api" -version = "28.0.0" +version = "41.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -17,10 +17,10 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { features = ["derive"], workspace = true } -pallet-transaction-payment = { workspace = true } -sp-api = { workspace = true } -sp-runtime = { workspace = true } -sp-weights = { workspace = true } +pallet-transaction-payment.workspace = true +sp-api.workspace = true +sp-runtime.workspace = true +sp-weights.workspace = true [features] default = ["std"] diff --git a/substrate/frame/transaction-payment/skip-feeless-payment/Cargo.toml b/substrate/frame/transaction-payment/skip-feeless-payment/Cargo.toml index b5bc7719def60..97e255ff320ce 100644 --- a/substrate/frame/transaction-payment/skip-feeless-payment/Cargo.toml +++ b/substrate/frame/transaction-payment/skip-feeless-payment/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-skip-feeless-payment" -version = "3.0.0" +version = "16.0.0" authors.workspace = true edition.workspace = true license.workspace = true @@ -14,11 +14,9 @@ workspace = true targets = ["x86_64-unknown-linux-gnu"] [dependencies] -# Substrate dependencies -sp-runtime = { workspace = true } - -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true +sp-runtime.workspace = true # Other dependencies codec = { features = ["derive"], workspace = true } diff --git a/substrate/frame/transaction-storage/Cargo.toml b/substrate/frame/transaction-storage/Cargo.toml index c2784eea952a7..6bfa10daeeb21 100644 --- a/substrate/frame/transaction-storage/Cargo.toml +++ b/substrate/frame/transaction-storage/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-transaction-storage" -version = "27.0.0" +version = "40.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -19,16 +19,16 @@ targets = ["x86_64-unknown-linux-gnu"] array-bytes = { optional = true, workspace = true, default-features = true } codec = { workspace = true } frame-benchmarking = { optional = true, workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true log = { workspace = true } -pallet-balances = { workspace = true } +pallet-balances.workspace = true scale-info = { features = ["derive"], workspace = true } serde = { optional = true, workspace = true, default-features = true } -sp-inherents = { workspace = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } -sp-transaction-storage-proof = { workspace = true } +sp-inherents.workspace = true +sp-io.workspace = true +sp-runtime.workspace = true +sp-transaction-storage-proof.workspace = true [dev-dependencies] sp-transaction-storage-proof = { default-features = true, workspace = true } diff --git a/substrate/frame/treasury/Cargo.toml b/substrate/frame/treasury/Cargo.toml index c52a98b26dcf2..766a8d34b713b 100644 --- a/substrate/frame/treasury/Cargo.toml +++ b/substrate/frame/treasury/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-treasury" -version = "27.0.0" +version = "40.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -19,19 +19,19 @@ targets = ["x86_64-unknown-linux-gnu"] codec = { features = ["derive", "max-encoded-len"], workspace = true } docify = { workspace = true } frame-benchmarking = { optional = true, workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true impl-trait-for-tuples = { workspace = true } log = { workspace = true } -pallet-balances = { workspace = true } +pallet-balances.workspace = true scale-info = { features = ["derive"], workspace = true } serde = { features = ["derive"], optional = true, workspace = true, default-features = true } sp-core = { optional = true, workspace = true } -sp-runtime = { workspace = true } +sp-runtime.workspace = true [dev-dependencies] -pallet-utility = { workspace = true, default-features = true } -sp-io = { workspace = true, default-features = true } +pallet-utility = { default-features = true, workspace = true } +sp-io = { default-features = true, workspace = true } [features] default = ["std"] @@ -42,11 +42,9 @@ std = [ "frame-system/std", "log/std", "pallet-balances/std", - "pallet-utility/std", "scale-info/std", "serde", "sp-core?/std", - "sp-io/std", "sp-runtime/std", ] runtime-benchmarks = [ diff --git a/substrate/frame/try-runtime/Cargo.toml b/substrate/frame/try-runtime/Cargo.toml index 7f7d1f2b50e05..bcf257f767748 100644 --- a/substrate/frame/try-runtime/Cargo.toml +++ b/substrate/frame/try-runtime/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "frame-try-runtime" -version = "0.34.0" +version = "0.47.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -16,9 +16,9 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { features = ["derive"], workspace = true } -frame-support = { workspace = true } -sp-api = { workspace = true } -sp-runtime = { workspace = true } +frame-support.workspace = true +sp-api.workspace = true +sp-runtime.workspace = true [features] default = ["std"] diff --git a/substrate/frame/tx-pause/Cargo.toml b/substrate/frame/tx-pause/Cargo.toml index a3c8b37cbd94c..f5e0420f43205 100644 --- a/substrate/frame/tx-pause/Cargo.toml +++ b/substrate/frame/tx-pause/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-tx-pause" -version = "9.0.0" +version = "22.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -21,9 +21,9 @@ frame = { workspace = true, features = ["runtime"] } scale-info = { features = ["derive"], workspace = true } [dev-dependencies] -pallet-balances = { workspace = true, default-features = true } -pallet-proxy = { workspace = true, default-features = true } -pallet-utility = { workspace = true, default-features = true } +pallet-balances = { default-features = true, workspace = true } +pallet-proxy = { default-features = true, workspace = true } +pallet-utility = { default-features = true, workspace = true } [features] default = ["std"] diff --git a/substrate/frame/uniques/Cargo.toml b/substrate/frame/uniques/Cargo.toml index 3424e2984f0fe..64145dbeccffd 100644 --- a/substrate/frame/uniques/Cargo.toml +++ b/substrate/frame/uniques/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-uniques" -version = "28.0.0" +version = "41.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -18,15 +18,15 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { workspace = true } frame-benchmarking = { optional = true, workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true log = { workspace = true } scale-info = { features = ["derive"], workspace = true } -sp-runtime = { workspace = true } +sp-runtime.workspace = true [dev-dependencies] -pallet-balances = { workspace = true, default-features = true } -sp-io = { workspace = true, default-features = true } +pallet-balances = { default-features = true, workspace = true } +sp-io = { default-features = true, workspace = true } [features] default = ["std"] diff --git a/substrate/frame/utility/Cargo.toml b/substrate/frame/utility/Cargo.toml index 869743bcb033f..7b9a78d68e1f6 100644 --- a/substrate/frame/utility/Cargo.toml +++ b/substrate/frame/utility/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-utility" -version = "28.0.0" +version = "41.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -18,18 +18,18 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { workspace = true } frame-benchmarking = { optional = true, workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true scale-info = { features = ["derive"], workspace = true } -sp-core = { workspace = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } +sp-core.workspace = true +sp-io.workspace = true +sp-runtime.workspace = true [dev-dependencies] -pallet-balances = { workspace = true, default-features = true } -pallet-collective = { workspace = true, default-features = true } -pallet-root-testing = { workspace = true, default-features = true } -pallet-timestamp = { workspace = true, default-features = true } +pallet-balances = { default-features = true, workspace = true } +pallet-collective = { default-features = true, workspace = true } +pallet-root-testing = { default-features = true, workspace = true } +pallet-timestamp = { default-features = true, workspace = true } [features] default = ["std"] diff --git a/substrate/frame/verify-signature/Cargo.toml b/substrate/frame/verify-signature/Cargo.toml index 99c2a7a5ab7c3..11793906c668b 100644 --- a/substrate/frame/verify-signature/Cargo.toml +++ b/substrate/frame/verify-signature/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-verify-signature" -version = "1.0.0" +version = "0.4.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -18,11 +18,11 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { workspace = true } frame-benchmarking = { optional = true, workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true scale-info = { features = ["derive"], workspace = true } -sp-io = { workspace = true } -sp-runtime = { workspace = true } +sp-io.workspace = true +sp-runtime.workspace = true sp-weights = { features = ["serde"], workspace = true } [features] diff --git a/substrate/frame/vesting/Cargo.toml b/substrate/frame/vesting/Cargo.toml index 712ac87c45602..cf5391641cfe0 100644 --- a/substrate/frame/vesting/Cargo.toml +++ b/substrate/frame/vesting/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-vesting" -version = "28.0.0" +version = "41.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -18,15 +18,15 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { features = ["derive"], workspace = true } frame-benchmarking = { optional = true, workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true log = { workspace = true } scale-info = { features = ["derive"], workspace = true } -sp-runtime = { workspace = true } +sp-runtime.workspace = true [dev-dependencies] -pallet-balances = { workspace = true, default-features = true } -sp-io = { workspace = true, default-features = true } +pallet-balances = { default-features = true, workspace = true } +sp-io = { default-features = true, workspace = true } [features] default = ["std"] diff --git a/substrate/frame/whitelist/Cargo.toml b/substrate/frame/whitelist/Cargo.toml index 8a233d8bcf05c..0e9cc19023e8f 100644 --- a/substrate/frame/whitelist/Cargo.toml +++ b/substrate/frame/whitelist/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-whitelist" -version = "27.0.0" +version = "40.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -20,8 +20,8 @@ frame = { workspace = true, features = ["runtime"] } scale-info = { features = ["derive"], workspace = true } [dev-dependencies] -pallet-balances = { workspace = true, default-features = true } -pallet-preimage = { workspace = true, default-features = true } +pallet-balances = { default-features = true, workspace = true } +pallet-preimage = { default-features = true, workspace = true } [features] default = ["std"] diff --git a/substrate/primitives/api/Cargo.toml b/substrate/primitives/api/Cargo.toml index 006bbc059f915..e8ea3b04b93a6 100644 --- a/substrate/primitives/api/Cargo.toml +++ b/substrate/primitives/api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-api" -version = "26.0.0" +version = "37.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -21,15 +21,15 @@ docify = { workspace = true } hash-db = { optional = true, workspace = true, default-features = true } log = { workspace = true } scale-info = { features = ["derive"], workspace = true } -sp-api-proc-macro = { workspace = true } -sp-core = { workspace = true } +sp-api-proc-macro.workspace = true +sp-core.workspace = true sp-externalities = { optional = true, workspace = true } sp-metadata-ir = { optional = true, workspace = true } -sp-runtime = { workspace = true } -sp-runtime-interface = { workspace = true } +sp-runtime-interface.workspace = true +sp-runtime.workspace = true sp-state-machine = { optional = true, workspace = true } sp-trie = { optional = true, workspace = true } -sp-version = { workspace = true } +sp-version.workspace = true thiserror = { optional = true, workspace = true } [dev-dependencies] @@ -50,7 +50,6 @@ std = [ "sp-runtime-interface/std", "sp-runtime/std", "sp-state-machine/std", - "sp-test-primitives/std", "sp-trie/std", "sp-version/std", "thiserror", diff --git a/substrate/primitives/api/proc-macro/Cargo.toml b/substrate/primitives/api/proc-macro/Cargo.toml index 2f414597fb744..99e1dff872465 100644 --- a/substrate/primitives/api/proc-macro/Cargo.toml +++ b/substrate/primitives/api/proc-macro/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-api-proc-macro" -version = "15.0.0" +version = "23.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" diff --git a/substrate/primitives/api/test/Cargo.toml b/substrate/primitives/api/test/Cargo.toml index 23da17c3f55ac..de510ec6b019d 100644 --- a/substrate/primitives/api/test/Cargo.toml +++ b/substrate/primitives/api/test/Cargo.toml @@ -21,23 +21,31 @@ harness = false [dependencies] codec = { workspace = true, default-features = true } rustversion = { workspace = true } -sc-block-builder = { workspace = true, default-features = true } +sc-block-builder.default-features = true +sc-block-builder.workspace = true scale-info = { features = ["derive"], workspace = true } -sp-api = { workspace = true, default-features = true } -sp-consensus = { workspace = true, default-features = true } -sp-metadata-ir = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } -sp-state-machine = { workspace = true, default-features = true } -sp-tracing = { workspace = true, default-features = true } -sp-version = { workspace = true, default-features = true } -substrate-test-runtime-client = { workspace = true } +sp-api.default-features = true +sp-api.workspace = true +sp-consensus.default-features = true +sp-consensus.workspace = true +sp-metadata-ir.default-features = true +sp-metadata-ir.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true +sp-state-machine.default-features = true +sp-state-machine.workspace = true +sp-tracing.default-features = true +sp-tracing.workspace = true +sp-version.default-features = true +sp-version.workspace = true +substrate-test-runtime-client.workspace = true trybuild = { workspace = true } [dev-dependencies] criterion = { workspace = true, default-features = true } futures = { workspace = true } log = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } +sp-core = { default-features = true, workspace = true } static_assertions = { workspace = true, default-features = true } [features] diff --git a/substrate/primitives/application-crypto/Cargo.toml b/substrate/primitives/application-crypto/Cargo.toml index e9f3d47024710..0f939a7afea2e 100644 --- a/substrate/primitives/application-crypto/Cargo.toml +++ b/substrate/primitives/application-crypto/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-application-crypto" -version = "30.0.0" +version = "41.0.0" authors.workspace = true edition.workspace = true description = "Provides facilities for generating application specific crypto wrapper types." @@ -20,8 +20,8 @@ targets = ["x86_64-unknown-linux-gnu"] codec = { features = ["derive"], workspace = true } scale-info = { features = ["derive"], workspace = true } serde = { optional = true, features = ["alloc", "derive"], workspace = true } -sp-core = { workspace = true } -sp-io = { workspace = true } +sp-core.workspace = true +sp-io.workspace = true [features] default = ["std"] diff --git a/substrate/primitives/application-crypto/test/Cargo.toml b/substrate/primitives/application-crypto/test/Cargo.toml index 22f9655a4917b..eeb283aaaa513 100644 --- a/substrate/primitives/application-crypto/test/Cargo.toml +++ b/substrate/primitives/application-crypto/test/Cargo.toml @@ -16,12 +16,15 @@ workspace = true targets = ["x86_64-unknown-linux-gnu"] [dependencies] -sp-api = { workspace = true, default-features = true } -sp-application-crypto = { workspace = true, default-features = true } -sp-core = { workspace = true } -sp-keystore = { workspace = true } -sp-tracing = { workspace = true, default-features = true } -substrate-test-runtime-client = { workspace = true } +sp-api.default-features = true +sp-api.workspace = true +sp-application-crypto.default-features = true +sp-application-crypto.workspace = true +sp-core.workspace = true +sp-keystore.workspace = true +sp-tracing.default-features = true +sp-tracing.workspace = true +substrate-test-runtime-client.workspace = true [features] bls-experimental = ["substrate-test-runtime-client/bls-experimental"] diff --git a/substrate/primitives/arithmetic/Cargo.toml b/substrate/primitives/arithmetic/Cargo.toml index e2276f4c4971d..d764c46aa310d 100644 --- a/substrate/primitives/arithmetic/Cargo.toml +++ b/substrate/primitives/arithmetic/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-arithmetic" -version = "23.0.0" +version = "27.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -33,7 +33,7 @@ static_assertions = { workspace = true, default-features = true } criterion = { workspace = true, default-features = true } primitive-types = { workspace = true, default-features = true } rand = { workspace = true, default-features = true } -sp-crypto-hashing = { workspace = true, default-features = true } +sp-crypto-hashing = { default-features = true, workspace = true } [features] default = ["std"] @@ -42,7 +42,6 @@ std = [ "num-traits/std", "scale-info/std", "serde/std", - "sp-crypto-hashing/std", ] # Serde support without relying on std features. serde = ["dep:serde", "scale-info/serde"] diff --git a/substrate/primitives/arithmetic/fuzzer/Cargo.toml b/substrate/primitives/arithmetic/fuzzer/Cargo.toml index 99b09997f0690..29345fcd77132 100644 --- a/substrate/primitives/arithmetic/fuzzer/Cargo.toml +++ b/substrate/primitives/arithmetic/fuzzer/Cargo.toml @@ -45,4 +45,5 @@ arbitrary = { workspace = true } fraction = { workspace = true } honggfuzz = { workspace = true } num-bigint = { workspace = true } -sp-arithmetic = { workspace = true, default-features = true } +sp-arithmetic.default-features = true +sp-arithmetic.workspace = true diff --git a/substrate/primitives/authority-discovery/Cargo.toml b/substrate/primitives/authority-discovery/Cargo.toml index ccfe199689da3..11f940d524e4f 100644 --- a/substrate/primitives/authority-discovery/Cargo.toml +++ b/substrate/primitives/authority-discovery/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-authority-discovery" -version = "26.0.0" +version = "37.0.0" authors.workspace = true description = "Authority discovery primitives" edition.workspace = true @@ -18,9 +18,9 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { workspace = true } scale-info = { features = ["derive"], workspace = true } -sp-api = { workspace = true } -sp-application-crypto = { workspace = true } -sp-runtime = { workspace = true } +sp-api.workspace = true +sp-application-crypto.workspace = true +sp-runtime.workspace = true [features] default = ["std"] diff --git a/substrate/primitives/block-builder/Cargo.toml b/substrate/primitives/block-builder/Cargo.toml index dcd6ba8a91d71..0d34834d7ee28 100644 --- a/substrate/primitives/block-builder/Cargo.toml +++ b/substrate/primitives/block-builder/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-block-builder" -version = "26.0.0" +version = "37.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -16,9 +16,9 @@ workspace = true targets = ["x86_64-unknown-linux-gnu"] [dependencies] -sp-api = { workspace = true } -sp-inherents = { workspace = true } -sp-runtime = { workspace = true } +sp-api.workspace = true +sp-inherents.workspace = true +sp-runtime.workspace = true [features] default = ["std"] diff --git a/substrate/primitives/blockchain/Cargo.toml b/substrate/primitives/blockchain/Cargo.toml index aed09a684bdae..fe1b73bc03a5c 100644 --- a/substrate/primitives/blockchain/Cargo.toml +++ b/substrate/primitives/blockchain/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-blockchain" -version = "28.0.0" +version = "40.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -21,11 +21,17 @@ codec = { features = ["derive"], workspace = true } futures = { workspace = true } parking_lot = { workspace = true, default-features = true } schnellru = { workspace = true } -sp-api = { workspace = true, default-features = true } -sp-consensus = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-database = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } -sp-state-machine = { workspace = true, default-features = true } +sp-api.default-features = true +sp-api.workspace = true +sp-consensus.default-features = true +sp-consensus.workspace = true +sp-core.default-features = true +sp-core.workspace = true +sp-database.default-features = true +sp-database.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true +sp-state-machine.default-features = true +sp-state-machine.workspace = true thiserror = { workspace = true } tracing = { workspace = true, default-features = true } diff --git a/substrate/primitives/consensus/aura/Cargo.toml b/substrate/primitives/consensus/aura/Cargo.toml index 1d441845d769a..8e046d3670f52 100644 --- a/substrate/primitives/consensus/aura/Cargo.toml +++ b/substrate/primitives/consensus/aura/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-consensus-aura" -version = "0.32.0" +version = "0.43.0" authors.workspace = true description = "Primitives for Aura consensus" edition.workspace = true @@ -19,12 +19,12 @@ targets = ["x86_64-unknown-linux-gnu"] async-trait = { optional = true, workspace = true } codec = { workspace = true } scale-info = { features = ["derive"], workspace = true } -sp-api = { workspace = true } -sp-application-crypto = { workspace = true } -sp-consensus-slots = { workspace = true } -sp-inherents = { workspace = true } -sp-runtime = { workspace = true } -sp-timestamp = { workspace = true } +sp-api.workspace = true +sp-application-crypto.workspace = true +sp-consensus-slots.workspace = true +sp-inherents.workspace = true +sp-runtime.workspace = true +sp-timestamp.workspace = true [features] default = ["std"] diff --git a/substrate/primitives/consensus/babe/Cargo.toml b/substrate/primitives/consensus/babe/Cargo.toml index 4df5c8d46562f..be4140275c411 100644 --- a/substrate/primitives/consensus/babe/Cargo.toml +++ b/substrate/primitives/consensus/babe/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-consensus-babe" -version = "0.32.0" +version = "0.43.0" authors.workspace = true description = "Primitives for BABE consensus" edition.workspace = true @@ -20,12 +20,12 @@ async-trait = { optional = true, workspace = true } codec = { workspace = true } scale-info = { features = ["derive"], workspace = true } serde = { features = ["alloc", "derive"], optional = true, workspace = true } -sp-api = { workspace = true } -sp-application-crypto = { workspace = true } -sp-consensus-slots = { workspace = true } -sp-core = { workspace = true } -sp-inherents = { workspace = true } -sp-runtime = { workspace = true } +sp-api.workspace = true +sp-application-crypto.workspace = true +sp-consensus-slots.workspace = true +sp-core.workspace = true +sp-inherents.workspace = true +sp-runtime.workspace = true sp-timestamp = { optional = true, workspace = true } [features] diff --git a/substrate/primitives/consensus/beefy/Cargo.toml b/substrate/primitives/consensus/beefy/Cargo.toml index 572e46d8de8d8..a06b2a3056ffd 100644 --- a/substrate/primitives/consensus/beefy/Cargo.toml +++ b/substrate/primitives/consensus/beefy/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-consensus-beefy" -version = "13.0.0" +version = "25.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -18,15 +18,15 @@ targets = ["x86_64-unknown-linux-gnu"] codec = { features = ["derive"], workspace = true } scale-info = { features = ["derive"], workspace = true } serde = { optional = true, features = ["alloc", "derive"], workspace = true } -sp-api = { workspace = true } -sp-application-crypto = { workspace = true } -sp-core = { workspace = true } -sp-crypto-hashing = { workspace = true } -sp-io = { workspace = true } -sp-keystore = { workspace = true } -sp-mmr-primitives = { workspace = true } -sp-runtime = { workspace = true } -sp-weights = { workspace = true } +sp-api.workspace = true +sp-application-crypto.workspace = true +sp-core.workspace = true +sp-crypto-hashing.workspace = true +sp-io.workspace = true +sp-keystore.workspace = true +sp-mmr-primitives.workspace = true +sp-runtime.workspace = true +sp-weights.workspace = true strum = { features = ["derive"], workspace = true } [dev-dependencies] diff --git a/substrate/primitives/consensus/common/Cargo.toml b/substrate/primitives/consensus/common/Cargo.toml index 376ef8c04c231..5e88e9c27a3ff 100644 --- a/substrate/primitives/consensus/common/Cargo.toml +++ b/substrate/primitives/consensus/common/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-consensus" -version = "0.32.0" +version = "0.43.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -20,9 +20,12 @@ targets = ["x86_64-unknown-linux-gnu"] async-trait = { workspace = true } futures = { features = ["thread-pool"], workspace = true } log = { workspace = true, default-features = true } -sp-inherents = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } -sp-state-machine = { workspace = true, default-features = true } +sp-inherents.default-features = true +sp-inherents.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true +sp-state-machine.default-features = true +sp-state-machine.workspace = true thiserror = { workspace = true } [dev-dependencies] diff --git a/substrate/primitives/consensus/grandpa/Cargo.toml b/substrate/primitives/consensus/grandpa/Cargo.toml index a3f9d76824d99..4c923edc7e62e 100644 --- a/substrate/primitives/consensus/grandpa/Cargo.toml +++ b/substrate/primitives/consensus/grandpa/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-consensus-grandpa" -version = "13.0.0" +version = "24.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -22,11 +22,11 @@ finality-grandpa = { features = ["derive-codec"], workspace = true } log = { workspace = true } scale-info = { features = ["derive"], workspace = true } serde = { features = ["alloc", "derive"], optional = true, workspace = true } -sp-api = { workspace = true } -sp-application-crypto = { workspace = true } -sp-core = { workspace = true } +sp-api.workspace = true +sp-application-crypto.workspace = true +sp-core.workspace = true sp-keystore = { optional = true, workspace = true } -sp-runtime = { workspace = true } +sp-runtime.workspace = true [features] default = ["std"] diff --git a/substrate/primitives/consensus/pow/Cargo.toml b/substrate/primitives/consensus/pow/Cargo.toml index 171137a1a04e0..1b9c3b268d32b 100644 --- a/substrate/primitives/consensus/pow/Cargo.toml +++ b/substrate/primitives/consensus/pow/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-consensus-pow" -version = "0.32.0" +version = "0.43.0" authors.workspace = true description = "Primitives for Aura consensus" edition.workspace = true @@ -17,9 +17,9 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { features = ["derive"], workspace = true } -sp-api = { workspace = true } -sp-core = { workspace = true } -sp-runtime = { workspace = true } +sp-api.workspace = true +sp-core.workspace = true +sp-runtime.workspace = true [features] default = ["std"] diff --git a/substrate/primitives/consensus/sassafras/Cargo.toml b/substrate/primitives/consensus/sassafras/Cargo.toml index 6e094bfc1edc1..352d139e3c1be 100644 --- a/substrate/primitives/consensus/sassafras/Cargo.toml +++ b/substrate/primitives/consensus/sassafras/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-consensus-sassafras" -version = "0.3.4-dev" +version = "0.3.4" authors.workspace = true description = "Primitives for Sassafras consensus" edition.workspace = true @@ -24,11 +24,11 @@ targets = ["x86_64-unknown-linux-gnu"] codec = { workspace = true } scale-info = { features = ["derive"], workspace = true } serde = { features = ["derive"], optional = true, workspace = true } -sp-api = { workspace = true } +sp-api.workspace = true sp-application-crypto = { features = ["bandersnatch-experimental"], workspace = true } -sp-consensus-slots = { workspace = true } +sp-consensus-slots.workspace = true sp-core = { features = ["bandersnatch-experimental"], workspace = true } -sp-runtime = { workspace = true } +sp-runtime.workspace = true [features] default = ["std"] diff --git a/substrate/primitives/consensus/slots/Cargo.toml b/substrate/primitives/consensus/slots/Cargo.toml index 2f993d3167a15..5f602ee76105f 100644 --- a/substrate/primitives/consensus/slots/Cargo.toml +++ b/substrate/primitives/consensus/slots/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-consensus-slots" -version = "0.32.0" +version = "0.43.0" authors.workspace = true description = "Primitives for slots-based consensus" edition.workspace = true @@ -19,7 +19,7 @@ targets = ["x86_64-unknown-linux-gnu"] codec = { features = ["derive", "max-encoded-len"], workspace = true } scale-info = { features = ["derive"], workspace = true } serde = { features = ["alloc", "derive"], optional = true, workspace = true } -sp-timestamp = { workspace = true } +sp-timestamp.workspace = true [features] default = ["std"] diff --git a/substrate/primitives/core/Cargo.toml b/substrate/primitives/core/Cargo.toml index 4eff3043f8659..484c34d7c3300 100644 --- a/substrate/primitives/core/Cargo.toml +++ b/substrate/primitives/core/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-core" -version = "28.0.0" +version = "37.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -42,12 +42,12 @@ rand = { features = ["small_rng"], optional = true, workspace = true, default-fe scale-info = { features = ["derive"], workspace = true } secrecy = { features = ["alloc"], workspace = true } serde = { optional = true, features = ["alloc", "derive"], workspace = true } -sp-debug-derive = { workspace = true } +sp-debug-derive.workspace = true sp-externalities = { optional = true, workspace = true } -sp-std = { workspace = true } -sp-storage = { workspace = true } +sp-std.workspace = true +sp-storage.workspace = true ss58-registry = { workspace = true } -substrate-bip39 = { workspace = true } +substrate-bip39.workspace = true thiserror = { optional = true, workspace = true } tracing = { optional = true, workspace = true, default-features = true } zeroize = { workspace = true } @@ -59,8 +59,8 @@ ed25519-zebra = { workspace = true } libsecp256k1 = { features = ["static-context"], workspace = true } merlin = { workspace = true } schnorrkel = { features = ["preaudit_deprecated"], workspace = true } -sp-crypto-hashing = { workspace = true } -sp-runtime-interface = { workspace = true } +sp-crypto-hashing.workspace = true +sp-runtime-interface.workspace = true # k256 crate, better portability, intended to be used in substrate-runtimes (no-std) k256 = { features = ["alloc", "ecdsa"], workspace = true } # secp256k1 crate, better performance, intended to be used on host side (std) @@ -74,7 +74,8 @@ w3f-bls = { optional = true, workspace = true } ark-vrf = { optional = true, workspace = true, features = ["bandersnatch", "ring"] } [target.'cfg(not(substrate_runtime))'.dependencies] -sp-externalities = { workspace = true, default-features = false } +sp-externalities.workspace = true +sp-externalities.default-features = false futures = { version = "0.3.30", default-features = false, features = ["alloc"] } dyn-clone = "1.0.17" diff --git a/substrate/primitives/core/fuzz/Cargo.toml b/substrate/primitives/core/fuzz/Cargo.toml index d5cd586133837..4b34f25196460 100644 --- a/substrate/primitives/core/fuzz/Cargo.toml +++ b/substrate/primitives/core/fuzz/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-core-fuzz" -version = "0.0.0" +version = "0.1.0" publish = false edition.workspace = true @@ -19,5 +19,5 @@ doc = false [dependencies] libfuzzer-sys = { workspace = true } regex = { workspace = true } - -sp-core = { workspace = true, default-features = true } +sp-core.default-features = true +sp-core.workspace = true diff --git a/substrate/primitives/crypto/ec-utils/Cargo.toml b/substrate/primitives/crypto/ec-utils/Cargo.toml index 1e5964f855758..ec92af1b7ba49 100644 --- a/substrate/primitives/crypto/ec-utils/Cargo.toml +++ b/substrate/primitives/crypto/ec-utils/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-crypto-ec-utils" -version = "0.10.0" +version = "0.16.0" authors.workspace = true description = "Host functions for common Arkworks elliptic curve operations" edition.workspace = true diff --git a/substrate/primitives/crypto/hashing/Cargo.toml b/substrate/primitives/crypto/hashing/Cargo.toml index 1a4e4b0a8f1d7..c83939e6ff1e5 100644 --- a/substrate/primitives/crypto/hashing/Cargo.toml +++ b/substrate/primitives/crypto/hashing/Cargo.toml @@ -32,7 +32,7 @@ twox-hash = { features = ["digest_0_10"], workspace = true } [dev-dependencies] criterion = { workspace = true, default-features = true } -sp-crypto-hashing-proc-macro = { workspace = true, default-features = true } +sp-crypto-hashing-proc-macro = { default-features = true, workspace = true } [features] default = ["std"] diff --git a/substrate/primitives/crypto/hashing/proc-macro/Cargo.toml b/substrate/primitives/crypto/hashing/proc-macro/Cargo.toml index e09661d41c111..5170841aa498d 100644 --- a/substrate/primitives/crypto/hashing/proc-macro/Cargo.toml +++ b/substrate/primitives/crypto/hashing/proc-macro/Cargo.toml @@ -20,5 +20,5 @@ proc-macro = true [dependencies] quote = { workspace = true } -sp-crypto-hashing = { workspace = true } +sp-crypto-hashing.workspace = true syn = { features = ["full", "parsing"], workspace = true } diff --git a/substrate/primitives/ethereum-standards/Cargo.toml b/substrate/primitives/ethereum-standards/Cargo.toml index e2e4bf4cdf96d..cd97a7ac86711 100644 --- a/substrate/primitives/ethereum-standards/Cargo.toml +++ b/substrate/primitives/ethereum-standards/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ethereum-standards" -version = "0.1.0" +version = "0.1.1" authors.workspace = true edition.workspace = true description = "Interfaces for Ethereum standards" diff --git a/substrate/primitives/externalities/Cargo.toml b/substrate/primitives/externalities/Cargo.toml index 569d4298c50d3..e2ff3bdd12bd3 100644 --- a/substrate/primitives/externalities/Cargo.toml +++ b/substrate/primitives/externalities/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-externalities" -version = "0.25.0" +version = "0.30.0" license = "Apache-2.0" authors.workspace = true edition.workspace = true @@ -19,7 +19,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { workspace = true } environmental = { workspace = true } -sp-storage = { workspace = true } +sp-storage.workspace = true [features] default = ["std"] diff --git a/substrate/primitives/genesis-builder/Cargo.toml b/substrate/primitives/genesis-builder/Cargo.toml index f1fa60d023be4..0791139627321 100644 --- a/substrate/primitives/genesis-builder/Cargo.toml +++ b/substrate/primitives/genesis-builder/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-genesis-builder" -version = "0.8.0" +version = "0.18.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -20,8 +20,8 @@ codec = { features = ["bytes"], workspace = true } scale-info = { features = ["derive"], workspace = true } serde_json = { features = ["alloc", "arbitrary_precision"], workspace = true } -sp-api = { workspace = true } -sp-runtime = { workspace = true } +sp-api.workspace = true +sp-runtime.workspace = true [features] default = ["std"] diff --git a/substrate/primitives/inherents/Cargo.toml b/substrate/primitives/inherents/Cargo.toml index 19966919047f9..9f51e9be5e0d3 100644 --- a/substrate/primitives/inherents/Cargo.toml +++ b/substrate/primitives/inherents/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-inherents" -version = "26.0.0" +version = "37.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" diff --git a/substrate/primitives/io/Cargo.toml b/substrate/primitives/io/Cargo.toml index 38ff09e0cdf09..e440cc1469976 100644 --- a/substrate/primitives/io/Cargo.toml +++ b/substrate/primitives/io/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-io" -version = "30.0.0" +version = "41.0.1" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -21,21 +21,24 @@ targets = ["x86_64-unknown-linux-gnu"] bytes = { workspace = true } codec = { features = ["bytes"], workspace = true } secp256k1 = { features = ["global-context", "recovery"], optional = true, workspace = true, default-features = true } -sp-core = { workspace = true } -sp-crypto-hashing = { workspace = true } -sp-externalities = { workspace = true } +sp-core.workspace = true +sp-crypto-hashing.workspace = true +sp-externalities.workspace = true sp-keystore = { optional = true, workspace = true } -sp-runtime-interface = { workspace = true } +sp-runtime-interface.workspace = true sp-state-machine = { optional = true, workspace = true } -sp-tracing = { workspace = true } +sp-tracing.workspace = true sp-trie = { optional = true, workspace = true } tracing = { workspace = true } tracing-core = { workspace = true } [target.'cfg(not(substrate_runtime))'.dependencies] -sp-keystore = { workspace = true, default-features = false } -sp-trie = { workspace = true, default-features = false } -sp-state-machine = { workspace = true, default-features = false } +sp-keystore.workspace = true +sp-keystore.default-features = false +sp-trie.workspace = true +sp-trie.default-features = false +sp-state-machine.workspace = true +sp-state-machine.default-features = false log = { workspace = true, default-features = true } libsecp256k1 = { workspace = true, default-features = false, features = ["static-context"] } secp256k1 = { workspace = true, default-features = false, features = ["alloc", "recovery"] } diff --git a/substrate/primitives/keyring/Cargo.toml b/substrate/primitives/keyring/Cargo.toml index 9ffcf50c7b455..e37850c81d211 100644 --- a/substrate/primitives/keyring/Cargo.toml +++ b/substrate/primitives/keyring/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-keyring" -version = "31.0.0" +version = "42.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -17,8 +17,8 @@ workspace = true targets = ["x86_64-unknown-linux-gnu"] [dependencies] -sp-core = { workspace = true } -sp-runtime = { workspace = true } +sp-core.workspace = true +sp-runtime.workspace = true strum = { features = ["derive"], workspace = true } [features] diff --git a/substrate/primitives/keystore/Cargo.toml b/substrate/primitives/keystore/Cargo.toml index 3dae5cc2abcbd..3ff1f2824bde3 100644 --- a/substrate/primitives/keystore/Cargo.toml +++ b/substrate/primitives/keystore/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-keystore" -version = "0.34.0" +version = "0.43.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -18,8 +18,8 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { features = ["derive"], workspace = true } parking_lot = { optional = true, workspace = true } -sp-core = { workspace = true } -sp-externalities = { workspace = true } +sp-core.workspace = true +sp-externalities.workspace = true [features] default = ["std"] diff --git a/substrate/primitives/merkle-mountain-range/Cargo.toml b/substrate/primitives/merkle-mountain-range/Cargo.toml index 809ea88c997fa..e03622af5dc40 100644 --- a/substrate/primitives/merkle-mountain-range/Cargo.toml +++ b/substrate/primitives/merkle-mountain-range/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-mmr-primitives" -version = "26.0.0" +version = "37.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -20,10 +20,10 @@ log = { workspace = true } mmr-lib = { workspace = true, default-features = false } scale-info = { features = ["derive"], workspace = true } serde = { features = ["alloc", "derive"], optional = true, workspace = true } -sp-api = { workspace = true } -sp-core = { workspace = true } -sp-debug-derive = { workspace = true } -sp-runtime = { workspace = true } +sp-api.workspace = true +sp-core.workspace = true +sp-debug-derive.workspace = true +sp-runtime.workspace = true thiserror = { optional = true, workspace = true } [dev-dependencies] diff --git a/substrate/primitives/metadata-ir/Cargo.toml b/substrate/primitives/metadata-ir/Cargo.toml index d7786347dd028..9e020dd469c9a 100644 --- a/substrate/primitives/metadata-ir/Cargo.toml +++ b/substrate/primitives/metadata-ir/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-metadata-ir" -version = "0.6.0" +version = "0.11.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" diff --git a/substrate/primitives/mixnet/Cargo.toml b/substrate/primitives/mixnet/Cargo.toml index a6fc3ce857a1a..f85d567cf58eb 100644 --- a/substrate/primitives/mixnet/Cargo.toml +++ b/substrate/primitives/mixnet/Cargo.toml @@ -1,7 +1,7 @@ [package] description = "Substrate mixnet types and runtime interface" name = "sp-mixnet" -version = "0.4.0" +version = "0.15.0" license = "Apache-2.0" authors = ["Parity Technologies "] edition.workspace = true @@ -18,8 +18,8 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { features = ["derive"], workspace = true } scale-info = { features = ["derive"], workspace = true } -sp-api = { workspace = true } -sp-application-crypto = { workspace = true } +sp-api.workspace = true +sp-application-crypto.workspace = true [features] default = ["std"] diff --git a/substrate/primitives/npos-elections/Cargo.toml b/substrate/primitives/npos-elections/Cargo.toml index 7fddf4731ab5a..431de160e47d1 100644 --- a/substrate/primitives/npos-elections/Cargo.toml +++ b/substrate/primitives/npos-elections/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-npos-elections" -version = "26.0.0" +version = "37.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -19,9 +19,9 @@ targets = ["x86_64-unknown-linux-gnu"] codec = { features = ["derive"], workspace = true } scale-info = { features = ["derive"], workspace = true } serde = { features = ["alloc", "derive"], optional = true, workspace = true } -sp-arithmetic = { workspace = true } -sp-core = { workspace = true } -sp-runtime = { workspace = true } +sp-arithmetic.workspace = true +sp-core.workspace = true +sp-runtime.workspace = true [dev-dependencies] substrate-test-utils = { workspace = true } diff --git a/substrate/primitives/npos-elections/fuzzer/Cargo.toml b/substrate/primitives/npos-elections/fuzzer/Cargo.toml index 6e01154936103..efc11f8e111e2 100644 --- a/substrate/primitives/npos-elections/fuzzer/Cargo.toml +++ b/substrate/primitives/npos-elections/fuzzer/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-npos-elections-fuzzer" -version = "2.0.0-alpha.5" +version = "2.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -36,5 +36,7 @@ path = "src/phragmen_pjr.rs" clap = { features = ["derive"], workspace = true } honggfuzz = { workspace = true } rand = { features = ["small_rng", "std"], workspace = true, default-features = true } -sp-npos-elections = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } +sp-npos-elections.default-features = true +sp-npos-elections.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true diff --git a/substrate/primitives/offchain/Cargo.toml b/substrate/primitives/offchain/Cargo.toml index ad35a1b845195..a7ce865fd6639 100644 --- a/substrate/primitives/offchain/Cargo.toml +++ b/substrate/primitives/offchain/Cargo.toml @@ -1,7 +1,7 @@ [package] description = "Substrate offchain workers primitives" name = "sp-offchain" -version = "26.0.0" +version = "37.0.0" license = "Apache-2.0" authors.workspace = true edition.workspace = true @@ -16,9 +16,9 @@ workspace = true targets = ["x86_64-unknown-linux-gnu"] [dependencies] -sp-api = { workspace = true } -sp-core = { workspace = true } -sp-runtime = { workspace = true } +sp-api.workspace = true +sp-core.workspace = true +sp-runtime.workspace = true [features] default = ["std"] diff --git a/substrate/primitives/panic-handler/Cargo.toml b/substrate/primitives/panic-handler/Cargo.toml index 012fe08f7cd53..907ceb0daed67 100644 --- a/substrate/primitives/panic-handler/Cargo.toml +++ b/substrate/primitives/panic-handler/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-panic-handler" -version = "13.0.0" +version = "13.0.2" authors.workspace = true edition.workspace = true license = "Apache-2.0" diff --git a/substrate/primitives/rpc/Cargo.toml b/substrate/primitives/rpc/Cargo.toml index ea795cf07bd97..bc4ee2d4329a5 100644 --- a/substrate/primitives/rpc/Cargo.toml +++ b/substrate/primitives/rpc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-rpc" -version = "26.0.0" +version = "35.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -18,7 +18,8 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] rustc-hash = { workspace = true } serde = { features = ["derive"], workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } +sp-core.default-features = true +sp-core.workspace = true [dev-dependencies] serde_json = { workspace = true, default-features = true } diff --git a/substrate/primitives/runtime-interface/Cargo.toml b/substrate/primitives/runtime-interface/Cargo.toml index 6178feb557f10..592876b42e9b2 100644 --- a/substrate/primitives/runtime-interface/Cargo.toml +++ b/substrate/primitives/runtime-interface/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-runtime-interface" -version = "24.0.0" +version = "30.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -21,12 +21,13 @@ bytes = { workspace = true } codec = { features = ["bytes"], workspace = true } impl-trait-for-tuples = { workspace = true } primitive-types = { workspace = true } -sp-externalities = { workspace = true } -sp-runtime-interface-proc-macro = { workspace = true, default-features = true } -sp-std = { workspace = true } -sp-storage = { workspace = true } -sp-tracing = { workspace = true } -sp-wasm-interface = { workspace = true } +sp-externalities.workspace = true +sp-runtime-interface-proc-macro.default-features = true +sp-runtime-interface-proc-macro.workspace = true +sp-std.workspace = true +sp-storage.workspace = true +sp-tracing.workspace = true +sp-wasm-interface.workspace = true static_assertions = { workspace = true, default-features = true } [target.'cfg(all(any(target_arch = "riscv32", target_arch = "riscv64"), substrate_runtime))'.dependencies] @@ -34,9 +35,9 @@ polkavm-derive = { workspace = true } [dev-dependencies] rustversion = { workspace = true } -sp-io = { workspace = true, default-features = true } +sp-io = { default-features = true, workspace = true } sp-runtime-interface-test-wasm = { workspace = true } -sp-state-machine = { workspace = true, default-features = true } +sp-state-machine = { default-features = true, workspace = true } trybuild = { workspace = true } [features] @@ -46,9 +47,6 @@ std = [ "codec/std", "primitive-types/std", "sp-externalities/std", - "sp-io/std", - "sp-runtime-interface-test-wasm/std", - "sp-state-machine/std", "sp-std/std", "sp-storage/std", "sp-tracing/std", diff --git a/substrate/primitives/runtime-interface/proc-macro/Cargo.toml b/substrate/primitives/runtime-interface/proc-macro/Cargo.toml index 2112d5bc06933..a33041b460729 100644 --- a/substrate/primitives/runtime-interface/proc-macro/Cargo.toml +++ b/substrate/primitives/runtime-interface/proc-macro/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-runtime-interface-proc-macro" -version = "17.0.0" +version = "19.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" diff --git a/substrate/primitives/runtime-interface/test-wasm-deprecated/Cargo.toml b/substrate/primitives/runtime-interface/test-wasm-deprecated/Cargo.toml index 9e456e9bcfa0b..068dfc9c20c37 100644 --- a/substrate/primitives/runtime-interface/test-wasm-deprecated/Cargo.toml +++ b/substrate/primitives/runtime-interface/test-wasm-deprecated/Cargo.toml @@ -16,9 +16,9 @@ workspace = true targets = ["x86_64-unknown-linux-gnu"] [dependencies] -sp-core = { workspace = true } -sp-io = { workspace = true } -sp-runtime-interface = { workspace = true } +sp-core.workspace = true +sp-io.workspace = true +sp-runtime-interface.workspace = true [build-dependencies] substrate-wasm-builder = { optional = true, workspace = true, default-features = true } diff --git a/substrate/primitives/runtime-interface/test-wasm/Cargo.toml b/substrate/primitives/runtime-interface/test-wasm/Cargo.toml index 9392930174d01..cba1c98f27f48 100644 --- a/substrate/primitives/runtime-interface/test-wasm/Cargo.toml +++ b/substrate/primitives/runtime-interface/test-wasm/Cargo.toml @@ -17,9 +17,9 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] bytes = { workspace = true } -sp-core = { workspace = true } -sp-io = { workspace = true } -sp-runtime-interface = { workspace = true } +sp-core.workspace = true +sp-io.workspace = true +sp-runtime-interface.workspace = true [build-dependencies] substrate-wasm-builder = { optional = true, workspace = true, default-features = true } diff --git a/substrate/primitives/runtime-interface/test/Cargo.toml b/substrate/primitives/runtime-interface/test/Cargo.toml index ebcf4222bda39..4a8d74cd81d13 100644 --- a/substrate/primitives/runtime-interface/test/Cargo.toml +++ b/substrate/primitives/runtime-interface/test/Cargo.toml @@ -15,13 +15,19 @@ workspace = true targets = ["x86_64-unknown-linux-gnu"] [dependencies] -sc-executor = { workspace = true, default-features = true } -sc-executor-common = { workspace = true, default-features = true } -sp-io = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } -sp-runtime-interface = { workspace = true, default-features = true } -sp-runtime-interface-test-wasm = { workspace = true } -sp-runtime-interface-test-wasm-deprecated = { workspace = true } -sp-state-machine = { workspace = true, default-features = true } +sc-executor-common.default-features = true +sc-executor-common.workspace = true +sc-executor.default-features = true +sc-executor.workspace = true +sp-io.default-features = true +sp-io.workspace = true +sp-runtime-interface-test-wasm-deprecated.workspace = true +sp-runtime-interface-test-wasm.workspace = true +sp-runtime-interface.default-features = true +sp-runtime-interface.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true +sp-state-machine.default-features = true +sp-state-machine.workspace = true tracing = { workspace = true, default-features = true } tracing-core = { workspace = true, default-features = true } diff --git a/substrate/primitives/runtime/Cargo.toml b/substrate/primitives/runtime/Cargo.toml index 10f9ab7daec3b..4e4d5cab29eb0 100644 --- a/substrate/primitives/runtime/Cargo.toml +++ b/substrate/primitives/runtime/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-runtime" -version = "31.0.1" +version = "42.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -17,7 +17,7 @@ workspace = true targets = ["x86_64-unknown-linux-gnu"] [dependencies] -binary-merkle-tree = { workspace = true } +binary-merkle-tree.workspace = true codec = { features = ["derive", "max-encoded-len"], workspace = true } docify = { workspace = true } either = { workspace = true } @@ -29,13 +29,13 @@ paste = { workspace = true, default-features = true } rand = { optional = true, workspace = true, default-features = true } scale-info = { features = ["derive"], workspace = true } serde = { features = ["alloc", "derive"], optional = true, workspace = true } -sp-application-crypto = { workspace = true } -sp-arithmetic = { workspace = true } -sp-core = { workspace = true } -sp-io = { workspace = true } -sp-std = { workspace = true } -sp-trie = { workspace = true } -sp-weights = { workspace = true } +sp-application-crypto.workspace = true +sp-arithmetic.workspace = true +sp-core.workspace = true +sp-io.workspace = true +sp-std.workspace = true +sp-trie.workspace = true +sp-weights.workspace = true tracing = { workspace = true, features = ["log"], default-features = false } simple-mermaid = { workspace = true, optional = true } @@ -44,9 +44,9 @@ tuplex = { workspace = true, default-features = false } [dev-dependencies] rand = { workspace = true, default-features = true } serde_json = { workspace = true, default-features = true } -sp-api = { workspace = true, default-features = true } -sp-state-machine = { workspace = true, default-features = true } -sp-tracing = { workspace = true, default-features = true } +sp-api = { default-features = true, workspace = true } +sp-state-machine = { default-features = true, workspace = true } +sp-tracing = { default-features = true, workspace = true } substrate-test-runtime-client = { workspace = true } zstd = { workspace = true } @@ -65,14 +65,11 @@ std = [ "scale-info/std", "serde/std", "simple-mermaid", - "sp-api/std", "sp-application-crypto/std", "sp-arithmetic/std", "sp-core/std", "sp-io/std", - "sp-state-machine/std", "sp-std/std", - "sp-tracing/std", "sp-trie/std", "sp-weights/std", "tracing/std", diff --git a/substrate/primitives/session/Cargo.toml b/substrate/primitives/session/Cargo.toml index 72be81c1222ef..55e91c7cbac22 100644 --- a/substrate/primitives/session/Cargo.toml +++ b/substrate/primitives/session/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-session" -version = "27.0.0" +version = "39.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -18,11 +18,11 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { features = ["derive"], workspace = true } scale-info = { features = ["derive"], workspace = true } -sp-api = { workspace = true } -sp-core = { workspace = true } +sp-api.workspace = true +sp-core.workspace = true sp-keystore = { optional = true, workspace = true } sp-runtime = { optional = true, workspace = true } -sp-staking = { workspace = true } +sp-staking.workspace = true [features] default = ["std"] diff --git a/substrate/primitives/staking/Cargo.toml b/substrate/primitives/staking/Cargo.toml index 42694cdbb6743..bdecc5f7882a2 100644 --- a/substrate/primitives/staking/Cargo.toml +++ b/substrate/primitives/staking/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-staking" -version = "26.0.0" +version = "39.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -20,9 +20,8 @@ codec = { features = ["derive"], workspace = true } impl-trait-for-tuples = { workspace = true } scale-info = { features = ["derive"], workspace = true } serde = { features = ["alloc", "derive"], optional = true, workspace = true } - -sp-core = { workspace = true } -sp-runtime = { workspace = true } +sp-core.workspace = true +sp-runtime.workspace = true [features] default = ["std"] diff --git a/substrate/primitives/state-machine/Cargo.toml b/substrate/primitives/state-machine/Cargo.toml index 5bc06b8cb509a..ae16e778754bd 100644 --- a/substrate/primitives/state-machine/Cargo.toml +++ b/substrate/primitives/state-machine/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-state-machine" -version = "0.35.0" +version = "0.46.0" authors.workspace = true description = "Substrate State Machine" edition.workspace = true @@ -24,10 +24,10 @@ log = { workspace = true } parking_lot = { optional = true, workspace = true, default-features = true } rand = { optional = true, workspace = true, default-features = true } smallvec = { workspace = true, default-features = true } -sp-core = { workspace = true } -sp-externalities = { workspace = true } +sp-core.workspace = true +sp-externalities.workspace = true sp-panic-handler = { optional = true, workspace = true, default-features = true } -sp-trie = { workspace = true } +sp-trie.workspace = true thiserror = { optional = true, workspace = true } tracing = { optional = true, workspace = true, default-features = true } trie-db = { workspace = true } @@ -38,7 +38,7 @@ array-bytes = { workspace = true, default-features = true } assert_matches = { workspace = true } pretty_assertions = { workspace = true } rand = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } +sp-runtime = { default-features = true, workspace = true } [features] default = ["std"] @@ -52,7 +52,6 @@ std = [ "sp-core/std", "sp-externalities/std", "sp-panic-handler", - "sp-runtime/std", "sp-trie/std", "thiserror", "tracing", diff --git a/substrate/primitives/state-machine/fuzz/Cargo.toml b/substrate/primitives/state-machine/fuzz/Cargo.toml index 16bf5b92025f0..4942d9c618b8e 100644 --- a/substrate/primitives/state-machine/fuzz/Cargo.toml +++ b/substrate/primitives/state-machine/fuzz/Cargo.toml @@ -10,7 +10,7 @@ cargo-fuzz = true [dependencies] libfuzzer-sys = "0.4" -sp-runtime = { path = "../../runtime" } +sp-runtime = { workspace = true } [dependencies.sp-state-machine] features = ["fuzzing"] diff --git a/substrate/primitives/statement-store/Cargo.toml b/substrate/primitives/statement-store/Cargo.toml index df66cfcfc2e65..81af83f8c9442 100644 --- a/substrate/primitives/statement-store/Cargo.toml +++ b/substrate/primitives/statement-store/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-statement-store" -version = "10.0.0" +version = "21.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -18,13 +18,13 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { features = ["derive"], workspace = true } scale-info = { features = ["derive"], workspace = true } -sp-api = { workspace = true } -sp-application-crypto = { workspace = true } -sp-core = { workspace = true } -sp-crypto-hashing = { workspace = true } -sp-externalities = { workspace = true } -sp-runtime = { workspace = true } -sp-runtime-interface = { workspace = true } +sp-api.workspace = true +sp-application-crypto.workspace = true +sp-core.workspace = true +sp-crypto-hashing.workspace = true +sp-externalities.workspace = true +sp-runtime-interface.workspace = true +sp-runtime.workspace = true thiserror = { optional = true, workspace = true } # ECIES dependencies diff --git a/substrate/primitives/storage/Cargo.toml b/substrate/primitives/storage/Cargo.toml index e441ddae52efe..c4eee3d32ca78 100644 --- a/substrate/primitives/storage/Cargo.toml +++ b/substrate/primitives/storage/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-storage" -version = "19.0.0" +version = "22.0.0" authors.workspace = true edition.workspace = true description = "Storage related primitives" @@ -21,7 +21,7 @@ codec = { features = ["derive"], workspace = true } impl-serde = { optional = true, workspace = true } ref-cast = { workspace = true } serde = { features = ["alloc", "derive"], optional = true, workspace = true } -sp-debug-derive = { workspace = true } +sp-debug-derive.workspace = true [features] default = ["std"] diff --git a/substrate/primitives/test-primitives/Cargo.toml b/substrate/primitives/test-primitives/Cargo.toml index cffdf9801615e..e6fbdb9f59e4d 100644 --- a/substrate/primitives/test-primitives/Cargo.toml +++ b/substrate/primitives/test-primitives/Cargo.toml @@ -18,9 +18,9 @@ targets = ["x86_64-unknown-linux-gnu"] codec = { features = ["derive"], workspace = true } scale-info = { features = ["derive"], workspace = true } serde = { features = ["derive"], optional = true, workspace = true } -sp-application-crypto = { workspace = true } -sp-core = { workspace = true } -sp-runtime = { workspace = true } +sp-application-crypto.workspace = true +sp-core.workspace = true +sp-runtime.workspace = true [features] default = ["std"] diff --git a/substrate/primitives/timestamp/Cargo.toml b/substrate/primitives/timestamp/Cargo.toml index 619f1eaa142b8..7175b1c501e71 100644 --- a/substrate/primitives/timestamp/Cargo.toml +++ b/substrate/primitives/timestamp/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-timestamp" -version = "26.0.0" +version = "37.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -18,8 +18,8 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] async-trait = { optional = true, workspace = true } codec = { features = ["derive"], workspace = true } -sp-inherents = { workspace = true } -sp-runtime = { workspace = true } +sp-inherents.workspace = true +sp-runtime.workspace = true thiserror = { optional = true, workspace = true } [features] diff --git a/substrate/primitives/tracing/Cargo.toml b/substrate/primitives/tracing/Cargo.toml index 3b5cb982b0d19..97e3e23955237 100644 --- a/substrate/primitives/tracing/Cargo.toml +++ b/substrate/primitives/tracing/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-tracing" -version = "16.0.0" +version = "17.1.0" license = "Apache-2.0" authors.workspace = true edition.workspace = true diff --git a/substrate/primitives/transaction-pool/Cargo.toml b/substrate/primitives/transaction-pool/Cargo.toml index 09d57be54ade5..e20b1dbfa97b5 100644 --- a/substrate/primitives/transaction-pool/Cargo.toml +++ b/substrate/primitives/transaction-pool/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-transaction-pool" -version = "26.0.0" +version = "37.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -17,8 +17,8 @@ workspace = true targets = ["x86_64-unknown-linux-gnu"] [dependencies] -sp-api = { workspace = true } -sp-runtime = { workspace = true } +sp-api.workspace = true +sp-runtime.workspace = true [features] default = ["std"] diff --git a/substrate/primitives/transaction-storage-proof/Cargo.toml b/substrate/primitives/transaction-storage-proof/Cargo.toml index a9040c1249a15..0f9568bbe6f67 100644 --- a/substrate/primitives/transaction-storage-proof/Cargo.toml +++ b/substrate/primitives/transaction-storage-proof/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-transaction-storage-proof" -version = "26.0.0" +version = "37.0.0" authors.workspace = true description = "Transaction storage proof primitives" edition.workspace = true @@ -20,8 +20,8 @@ async-trait = { optional = true, workspace = true } codec = { features = ["derive"], workspace = true } scale-info = { features = ["derive"], workspace = true } sp-core = { optional = true, workspace = true } -sp-inherents = { workspace = true } -sp-runtime = { workspace = true } +sp-inherents.workspace = true +sp-runtime.workspace = true sp-trie = { optional = true, workspace = true } [features] diff --git a/substrate/primitives/trie/Cargo.toml b/substrate/primitives/trie/Cargo.toml index 1d34f0fce0329..f55570fda47af 100644 --- a/substrate/primitives/trie/Cargo.toml +++ b/substrate/primitives/trie/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-trie" -version = "29.0.0" +version = "40.0.0" authors.workspace = true description = "Patricia trie stuff using a parity-scale-codec node format" repository.workspace = true @@ -33,8 +33,8 @@ prometheus-endpoint = { optional = true, workspace = true, default-features = tr rand = { optional = true, workspace = true, default-features = true } scale-info = { features = ["derive"], workspace = true } schnellru = { optional = true, workspace = true } -sp-core = { workspace = true } -sp-externalities = { workspace = true } +sp-core.workspace = true +sp-externalities.workspace = true thiserror = { optional = true, workspace = true } tracing = { optional = true, workspace = true, default-features = true } trie-db = { workspace = true } @@ -43,7 +43,7 @@ trie-root = { workspace = true } [dev-dependencies] array-bytes = { workspace = true, default-features = true } criterion = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } +sp-runtime = { default-features = true, workspace = true } trie-bench = { workspace = true } trie-standardmap = { workspace = true } @@ -63,7 +63,6 @@ std = [ "schnellru", "sp-core/std", "sp-externalities/std", - "sp-runtime/std", "thiserror", "tracing", "trie-db/std", diff --git a/substrate/primitives/version/Cargo.toml b/substrate/primitives/version/Cargo.toml index 7fa983d028238..0002ee996e19f 100644 --- a/substrate/primitives/version/Cargo.toml +++ b/substrate/primitives/version/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-version" -version = "29.0.0" +version = "40.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -22,10 +22,11 @@ impl-serde = { optional = true, workspace = true } parity-wasm = { optional = true, workspace = true } scale-info = { features = ["derive"], workspace = true } serde = { features = ["alloc", "derive"], optional = true, workspace = true } -sp-crypto-hashing-proc-macro = { workspace = true, default-features = true } -sp-runtime = { workspace = true } -sp-std = { workspace = true } -sp-version-proc-macro = { workspace = true } +sp-crypto-hashing-proc-macro.default-features = true +sp-crypto-hashing-proc-macro.workspace = true +sp-runtime.workspace = true +sp-std.workspace = true +sp-version-proc-macro.workspace = true thiserror = { optional = true, workspace = true } [features] diff --git a/substrate/primitives/version/proc-macro/Cargo.toml b/substrate/primitives/version/proc-macro/Cargo.toml index a3be654547d90..1b46be30496d8 100644 --- a/substrate/primitives/version/proc-macro/Cargo.toml +++ b/substrate/primitives/version/proc-macro/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-version-proc-macro" -version = "13.0.0" +version = "15.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -26,4 +26,4 @@ quote = { workspace = true } syn = { features = ["extra-traits", "fold", "full", "visit"], workspace = true } [dev-dependencies] -sp-version = { workspace = true, default-features = true } +sp-version = { default-features = true, workspace = true } diff --git a/substrate/primitives/wasm-interface/Cargo.toml b/substrate/primitives/wasm-interface/Cargo.toml index 9f8eea5102d63..bdf36d9b122a1 100644 --- a/substrate/primitives/wasm-interface/Cargo.toml +++ b/substrate/primitives/wasm-interface/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-wasm-interface" -version = "20.0.0" +version = "22.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" diff --git a/substrate/primitives/weights/Cargo.toml b/substrate/primitives/weights/Cargo.toml index 9cd0d9ac2e206..1dcfc148ea383 100644 --- a/substrate/primitives/weights/Cargo.toml +++ b/substrate/primitives/weights/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp-weights" -version = "27.0.0" +version = "32.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -22,8 +22,8 @@ scale-info = { features = ["derive"], workspace = true } schemars = { optional = true, workspace = true } serde = { optional = true, features = ["alloc", "derive"], workspace = true } smallvec = { workspace = true, default-features = true } -sp-arithmetic = { workspace = true } -sp-debug-derive = { workspace = true } +sp-arithmetic.workspace = true +sp-debug-derive.workspace = true [features] default = ["std"] diff --git a/substrate/test-utils/Cargo.toml b/substrate/test-utils/Cargo.toml index 75eab46cb217a..660636a8fbd7a 100644 --- a/substrate/test-utils/Cargo.toml +++ b/substrate/test-utils/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "substrate-test-utils" -version = "4.0.0-dev" +version = "3.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" diff --git a/substrate/test-utils/cli/Cargo.toml b/substrate/test-utils/cli/Cargo.toml index 1c860e8d42997..2feb9a179debd 100644 --- a/substrate/test-utils/cli/Cargo.toml +++ b/substrate/test-utils/cli/Cargo.toml @@ -19,13 +19,18 @@ targets = ["x86_64-unknown-linux-gnu"] assert_cmd = { workspace = true } futures = { workspace = true } nix = { features = ["signal"], workspace = true } -node-cli = { workspace = true } -node-primitives = { workspace = true, default-features = true } +node-cli.workspace = true +node-primitives.default-features = true +node-primitives.workspace = true regex = { workspace = true } -sc-cli = { workspace = true, default-features = false } -sc-service = { workspace = true, default-features = false } -sp-rpc = { workspace = true, default-features = true } -substrate-rpc-client = { workspace = true, default-features = true } +sc-cli.default-features = false +sc-cli.workspace = true +sc-service.default-features = false +sc-service.workspace = true +sp-rpc.default-features = true +sp-rpc.workspace = true +substrate-rpc-client.default-features = true +substrate-rpc-client.workspace = true tokio = { features = ["full"], workspace = true, default-features = true } [features] diff --git a/substrate/test-utils/client/Cargo.toml b/substrate/test-utils/client/Cargo.toml index 3d48e9f5d93d9..45bf0256b5a21 100644 --- a/substrate/test-utils/client/Cargo.toml +++ b/substrate/test-utils/client/Cargo.toml @@ -20,17 +20,27 @@ array-bytes = { workspace = true, default-features = true } async-trait = { workspace = true } codec = { workspace = true, default-features = true } futures = { workspace = true } -sc-client-api = { workspace = true, default-features = true } +sc-client-api.default-features = true +sc-client-api.workspace = true sc-client-db = { features = ["test-helpers"], workspace = true, default-features = false } -sc-consensus = { workspace = true, default-features = true } -sc-executor = { workspace = true, default-features = true } -sc-service = { workspace = true, default-features = false } +sc-consensus.default-features = true +sc-consensus.workspace = true +sc-executor.default-features = true +sc-executor.workspace = true +sc-service.default-features = false +sc-service.workspace = true serde = { workspace = true, default-features = true } serde_json = { workspace = true, default-features = true } -sp-blockchain = { workspace = true, default-features = true } -sp-consensus = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-keyring = { workspace = true, default-features = true } -sp-keystore = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } +sp-blockchain.default-features = true +sp-blockchain.workspace = true +sp-consensus.default-features = true +sp-consensus.workspace = true +sp-core.default-features = true +sp-core.workspace = true +sp-keyring.default-features = true +sp-keyring.workspace = true +sp-keystore.default-features = true +sp-keystore.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true tokio = { features = ["sync"], workspace = true, default-features = true } diff --git a/substrate/test-utils/runtime/Cargo.toml b/substrate/test-utils/runtime/Cargo.toml index 36ad87df5c4d6..acbd9f3b90164 100644 --- a/substrate/test-utils/runtime/Cargo.toml +++ b/substrate/test-utils/runtime/Cargo.toml @@ -17,38 +17,38 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { features = ["derive"], workspace = true } -frame-executive = { workspace = true } -frame-metadata-hash-extension = { workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } -frame-system-rpc-runtime-api = { workspace = true } -pallet-babe = { workspace = true } -pallet-balances = { workspace = true } -pallet-timestamp = { workspace = true } -pallet-utility = { workspace = true } +frame-executive.workspace = true +frame-metadata-hash-extension.workspace = true +frame-support.workspace = true +frame-system-rpc-runtime-api.workspace = true +frame-system.workspace = true +pallet-babe.workspace = true +pallet-balances.workspace = true +pallet-timestamp.workspace = true +pallet-utility.workspace = true sc-service = { optional = true, workspace = true } scale-info = { features = ["derive"], workspace = true } -sp-api = { workspace = true } +sp-api.workspace = true sp-application-crypto = { features = ["serde"], workspace = true } -sp-block-builder = { workspace = true } +sp-block-builder.workspace = true sp-consensus-aura = { features = ["serde"], workspace = true } sp-consensus-babe = { features = ["serde"], workspace = true } sp-consensus-grandpa = { features = ["serde"], workspace = true } sp-core = { features = ["serde"], workspace = true } -sp-crypto-hashing = { workspace = true } -sp-debug-derive = { workspace = true, default-features = false, features = ["force-debug"] } -sp-externalities = { workspace = true } -sp-genesis-builder = { workspace = true } -sp-inherents = { workspace = true } -sp-io = { workspace = true } -sp-keyring = { workspace = true } -sp-offchain = { workspace = true } +sp-crypto-hashing.workspace = true +sp-debug-derive = { workspace = true, features = ["force-debug"], default-features = false } +sp-externalities.workspace = true +sp-genesis-builder.workspace = true +sp-inherents.workspace = true +sp-io.workspace = true +sp-keyring.workspace = true +sp-offchain.workspace = true sp-runtime = { features = ["serde"], workspace = true } -sp-session = { workspace = true } -sp-state-machine = { workspace = true } -sp-transaction-pool = { workspace = true } -sp-trie = { workspace = true } -sp-version = { workspace = true } +sp-session.workspace = true +sp-state-machine.workspace = true +sp-transaction-pool.workspace = true +sp-trie.workspace = true +sp-version.workspace = true trie-db = { workspace = true } # 3rd party @@ -60,14 +60,14 @@ tracing = { workspace = true, default-features = false } [dev-dependencies] futures = { workspace = true } pretty_assertions = { workspace = true } -sc-block-builder = { workspace = true, default-features = true } -sc-chain-spec = { workspace = true, default-features = true } -sc-executor = { workspace = true, default-features = true } -sc-executor-common = { workspace = true, default-features = true } +sc-block-builder = { default-features = true, workspace = true } +sc-chain-spec = { default-features = true, workspace = true } +sc-executor = { default-features = true, workspace = true } +sc-executor-common = { default-features = true, workspace = true } serde = { features = ["alloc", "derive"], workspace = true } serde_json = { features = ["alloc"], workspace = true } -sp-consensus = { workspace = true, default-features = true } -sp-tracing = { workspace = true, default-features = true } +sp-consensus = { default-features = true, workspace = true } +sp-tracing = { default-features = true, workspace = true } substrate-test-runtime-client = { workspace = true } [build-dependencies] @@ -89,7 +89,6 @@ std = [ "pallet-balances/std", "pallet-timestamp/std", "pallet-utility/std", - "sc-executor/std", "sc-service", "scale-info/std", "serde/std", @@ -112,7 +111,6 @@ std = [ "sp-runtime/std", "sp-session/std", "sp-state-machine/std", - "sp-tracing/std", "sp-transaction-pool/std", "sp-trie/std", "sp-version/std", diff --git a/substrate/test-utils/runtime/client/Cargo.toml b/substrate/test-utils/runtime/client/Cargo.toml index 8aa87aad2859b..4f2b7c1e4f7d9 100644 --- a/substrate/test-utils/runtime/client/Cargo.toml +++ b/substrate/test-utils/runtime/client/Cargo.toml @@ -16,16 +16,24 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] futures = { workspace = true } -sc-block-builder = { workspace = true, default-features = true } -sc-client-api = { workspace = true, default-features = true } -sc-consensus = { workspace = true, default-features = true } -sp-api = { workspace = true, default-features = true } -sp-blockchain = { workspace = true, default-features = true } -sp-consensus = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } -substrate-test-client = { workspace = true } -substrate-test-runtime = { workspace = true } +sc-block-builder.default-features = true +sc-block-builder.workspace = true +sc-client-api.default-features = true +sc-client-api.workspace = true +sc-consensus.default-features = true +sc-consensus.workspace = true +sp-api.default-features = true +sp-api.workspace = true +sp-blockchain.default-features = true +sp-blockchain.workspace = true +sp-consensus.default-features = true +sp-consensus.workspace = true +sp-core.default-features = true +sp-core.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true +substrate-test-client.workspace = true +substrate-test-runtime.workspace = true [features] bls-experimental = ["substrate-test-runtime/bls-experimental"] diff --git a/substrate/test-utils/runtime/transaction-pool/Cargo.toml b/substrate/test-utils/runtime/transaction-pool/Cargo.toml index 501c9f99ebf11..778f5b5a35076 100644 --- a/substrate/test-utils/runtime/transaction-pool/Cargo.toml +++ b/substrate/test-utils/runtime/transaction-pool/Cargo.toml @@ -19,9 +19,13 @@ codec = { workspace = true, default-features = true } futures = { workspace = true } log = { workspace = true } parking_lot = { workspace = true, default-features = true } -sc-transaction-pool = { workspace = true, default-features = true } -sc-transaction-pool-api = { workspace = true, default-features = true } -sp-blockchain = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } -substrate-test-runtime-client = { workspace = true } +sc-transaction-pool-api.default-features = true +sc-transaction-pool-api.workspace = true +sc-transaction-pool.default-features = true +sc-transaction-pool.workspace = true +sp-blockchain.default-features = true +sp-blockchain.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true +substrate-test-runtime-client.workspace = true thiserror = { workspace = true } diff --git a/substrate/utils/binary-merkle-tree/Cargo.toml b/substrate/utils/binary-merkle-tree/Cargo.toml index eefdc3ff61761..b8dde519716fb 100644 --- a/substrate/utils/binary-merkle-tree/Cargo.toml +++ b/substrate/utils/binary-merkle-tree/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "binary-merkle-tree" -version = "13.0.0" +version = "16.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -19,8 +19,8 @@ log = { optional = true, workspace = true } [dev-dependencies] array-bytes = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } +sp-core = { default-features = true, workspace = true } +sp-runtime = { default-features = true, workspace = true } [features] debug = ["array-bytes", "log"] @@ -29,6 +29,4 @@ std = [ "codec/std", "hash-db/std", "log/std", - "sp-core/std", - "sp-runtime/std", ] diff --git a/substrate/utils/fork-tree/Cargo.toml b/substrate/utils/fork-tree/Cargo.toml index c8569a75ac3c8..28105cce2bf2e 100644 --- a/substrate/utils/fork-tree/Cargo.toml +++ b/substrate/utils/fork-tree/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "fork-tree" -version = "12.0.0" +version = "13.0.1" authors.workspace = true edition.workspace = true license = "Apache-2.0" diff --git a/substrate/utils/frame/benchmarking-cli/Cargo.toml b/substrate/utils/frame/benchmarking-cli/Cargo.toml index b903175a38149..eee4931091c7e 100644 --- a/substrate/utils/frame/benchmarking-cli/Cargo.toml +++ b/substrate/utils/frame/benchmarking-cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "frame-benchmarking-cli" -version = "32.0.0" +version = "49.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -22,61 +22,95 @@ chrono = { workspace = true } clap = { features = ["derive"], workspace = true } codec = { workspace = true, default-features = true } comfy-table = { workspace = true } -cumulus-client-parachain-inherent = { workspace = true, default-features = true } -cumulus-primitives-proof-size-hostfunction = { workspace = true, default-features = true } -frame-benchmarking = { workspace = true, default-features = true } -frame-storage-access-test-runtime = { workspace = true, default-features = true } -frame-support = { workspace = true, default-features = true } -frame-system = { workspace = true, default-features = true } +cumulus-client-parachain-inherent.default-features = true +cumulus-client-parachain-inherent.workspace = true +cumulus-primitives-proof-size-hostfunction.default-features = true +cumulus-primitives-proof-size-hostfunction.workspace = true +frame-benchmarking.default-features = true +frame-benchmarking.workspace = true +frame-storage-access-test-runtime.default-features = true +frame-storage-access-test-runtime.workspace = true +frame-support.default-features = true +frame-support.workspace = true +frame-system.default-features = true +frame-system.workspace = true gethostname = { workspace = true } handlebars = { workspace = true } itertools = { workspace = true } linked-hash-map = { workspace = true } log = { workspace = true, default-features = true } -polkadot-parachain-primitives = { workspace = true, default-features = true } -polkadot-primitives = { workspace = true, default-features = true } +polkadot-parachain-primitives.default-features = true +polkadot-parachain-primitives.workspace = true +polkadot-primitives.default-features = true +polkadot-primitives.workspace = true rand = { features = ["small_rng"], workspace = true, default-features = true } rand_pcg = { workspace = true } -sc-block-builder = { workspace = true, default-features = true } -sc-chain-spec = { workspace = true } -sc-cli = { workspace = true, default-features = false } -sc-client-api = { workspace = true, default-features = true } -sc-client-db = { workspace = true, default-features = false } -sc-executor = { workspace = true, default-features = true } -sc-executor-common = { workspace = true } -sc-executor-wasmtime = { workspace = true } -sc-runtime-utilities = { workspace = true, default-features = true } -sc-service = { workspace = true, default-features = false } -sc-sysinfo = { workspace = true, default-features = true } +sc-block-builder.default-features = true +sc-block-builder.workspace = true +sc-chain-spec.workspace = true +sc-cli.default-features = false +sc-cli.workspace = true +sc-client-api.default-features = true +sc-client-api.workspace = true +sc-client-db.default-features = false +sc-client-db.workspace = true +sc-executor-common.workspace = true +sc-executor-wasmtime.workspace = true +sc-executor.default-features = true +sc-executor.workspace = true +sc-runtime-utilities.default-features = true +sc-runtime-utilities.workspace = true +sc-service.default-features = false +sc-service.workspace = true +sc-sysinfo.default-features = true +sc-sysinfo.workspace = true serde = { workspace = true, default-features = true } serde_json = { workspace = true, default-features = true } -sp-api = { workspace = true, default-features = true } -sp-block-builder = { workspace = true, default-features = true } -sp-blockchain = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-database = { workspace = true, default-features = true } -sp-externalities = { workspace = true, default-features = true } -sp-genesis-builder = { workspace = true, default-features = true } -sp-inherents = { workspace = true, default-features = true } -sp-io = { workspace = true, default-features = true } -sp-keystore = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } -sp-state-machine = { workspace = true, default-features = true } -sp-storage = { workspace = true, default-features = true } -sp-timestamp = { workspace = true, default-features = true } -sp-transaction-pool = { workspace = true, default-features = true } -sp-trie = { workspace = true, default-features = true } -sp-version = { workspace = true, default-features = true } -sp-wasm-interface = { workspace = true, default-features = true } +sp-api.default-features = true +sp-api.workspace = true +sp-block-builder.default-features = true +sp-block-builder.workspace = true +sp-blockchain.default-features = true +sp-blockchain.workspace = true +sp-core.default-features = true +sp-core.workspace = true +sp-database.default-features = true +sp-database.workspace = true +sp-externalities.default-features = true +sp-externalities.workspace = true +sp-genesis-builder.default-features = true +sp-genesis-builder.workspace = true +sp-inherents.default-features = true +sp-inherents.workspace = true +sp-io.default-features = true +sp-io.workspace = true +sp-keystore.default-features = true +sp-keystore.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true +sp-state-machine.default-features = true +sp-state-machine.workspace = true +sp-storage.default-features = true +sp-storage.workspace = true +sp-timestamp.default-features = true +sp-timestamp.workspace = true +sp-transaction-pool.default-features = true +sp-transaction-pool.workspace = true +sp-trie.default-features = true +sp-trie.workspace = true +sp-version.default-features = true +sp-version.workspace = true +sp-wasm-interface.default-features = true +sp-wasm-interface.workspace = true subxt = { workspace = true, features = ["native"] } subxt-signer = { workspace = true, features = ["unstable-eth"] } thiserror = { workspace = true } thousands = { workspace = true } [dev-dependencies] -cumulus-test-runtime = { workspace = true, default-features = true } -substrate-test-runtime = { workspace = true, default-features = true } -westend-runtime = { workspace = true, default-features = true } +cumulus-test-runtime = { default-features = true, workspace = true } +substrate-test-runtime = { default-features = true, workspace = true } +westend-runtime = { default-features = true, workspace = true } [features] default = [] diff --git a/substrate/utils/frame/generate-bags/Cargo.toml b/substrate/utils/frame/generate-bags/Cargo.toml index c03f85ece05d8..2fc727f76a9d3 100644 --- a/substrate/utils/frame/generate-bags/Cargo.toml +++ b/substrate/utils/frame/generate-bags/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "generate-bags" -version = "28.0.0" +version = "41.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -12,12 +12,16 @@ description = "Bag threshold generation script for pallet-bag-list" workspace = true [dependencies] -# FRAME -frame-election-provider-support = { workspace = true, default-features = true } -frame-support = { workspace = true, default-features = true } -frame-system = { workspace = true, default-features = true } -pallet-staking = { workspace = true, default-features = true } -sp-staking = { workspace = true, default-features = true } +frame-election-provider-support.default-features = true +frame-election-provider-support.workspace = true +frame-support.default-features = true +frame-support.workspace = true +frame-system.default-features = true +frame-system.workspace = true +pallet-staking.default-features = true +pallet-staking.workspace = true +sp-staking.default-features = true +sp-staking.workspace = true # third party chrono = { workspace = true } diff --git a/substrate/utils/frame/generate-bags/node-runtime/Cargo.toml b/substrate/utils/frame/generate-bags/node-runtime/Cargo.toml index aace0f4ad23f1..2cf299e0899f6 100644 --- a/substrate/utils/frame/generate-bags/node-runtime/Cargo.toml +++ b/substrate/utils/frame/generate-bags/node-runtime/Cargo.toml @@ -13,8 +13,9 @@ publish = false workspace = true [dependencies] -generate-bags = { workspace = true, default-features = true } -kitchensink-runtime = { workspace = true } +generate-bags.default-features = true +generate-bags.workspace = true +kitchensink-runtime.workspace = true # third-party clap = { features = ["derive"], workspace = true } diff --git a/substrate/utils/frame/omni-bencher/Cargo.toml b/substrate/utils/frame/omni-bencher/Cargo.toml index 5d9cf766b3286..9c5b6564e2434 100644 --- a/substrate/utils/frame/omni-bencher/Cargo.toml +++ b/substrate/utils/frame/omni-bencher/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "frame-omni-bencher" -version = "0.1.0" +version = "0.13.0" description = "Freestanding benchmark runner for any Polkadot runtime." authors.workspace = true edition.workspace = true @@ -13,16 +13,20 @@ workspace = true [dependencies] clap = { features = ["derive"], workspace = true } -cumulus-primitives-proof-size-hostfunction = { workspace = true, default-features = true } -frame-benchmarking-cli = { workspace = true } -sc-cli = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } -sp-statement-store = { workspace = true, default-features = true } +cumulus-primitives-proof-size-hostfunction.default-features = true +cumulus-primitives-proof-size-hostfunction.workspace = true +frame-benchmarking-cli.workspace = true +sc-cli.default-features = true +sc-cli.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true +sp-statement-store.default-features = true +sp-statement-store.workspace = true tracing-subscriber = { workspace = true } [dev-dependencies] assert_cmd = { workspace = true } cumulus-test-runtime = { workspace = true } -sc-chain-spec = { workspace = true } -sp-genesis-builder = { workspace = true, default-features = true } +sc-chain-spec = { workspace = true, default-features = false } +sp-genesis-builder = { default-features = true, workspace = true } tempfile = { workspace = true } diff --git a/substrate/utils/frame/remote-externalities/Cargo.toml b/substrate/utils/frame/remote-externalities/Cargo.toml index 4ed0e1edf3e4e..39260acbe5c6f 100644 --- a/substrate/utils/frame/remote-externalities/Cargo.toml +++ b/substrate/utils/frame/remote-externalities/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "frame-remote-externalities" -version = "0.35.0" +version = "0.52.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -21,18 +21,24 @@ indicatif = { workspace = true } jsonrpsee = { features = ["http-client"], workspace = true } log = { workspace = true, default-features = true } serde = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-crypto-hashing = { workspace = true, default-features = true } -sp-io = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } -sp-state-machine = { workspace = true, default-features = true } +sp-core.default-features = true +sp-core.workspace = true +sp-crypto-hashing.default-features = true +sp-crypto-hashing.workspace = true +sp-io.default-features = true +sp-io.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true +sp-state-machine.default-features = true +sp-state-machine.workspace = true spinners = { workspace = true } -substrate-rpc-client = { workspace = true, default-features = true } +substrate-rpc-client.default-features = true +substrate-rpc-client.workspace = true tokio = { features = ["macros", "rt-multi-thread"], workspace = true, default-features = true } tokio-retry = { workspace = true } [dev-dependencies] -sp-tracing = { workspace = true, default-features = true } +sp-tracing = { default-features = true, workspace = true } [features] remote-test = [] diff --git a/substrate/utils/frame/rpc/client/Cargo.toml b/substrate/utils/frame/rpc/client/Cargo.toml index 6282621e1c750..85dcacf679297 100644 --- a/substrate/utils/frame/rpc/client/Cargo.toml +++ b/substrate/utils/frame/rpc/client/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "substrate-rpc-client" -version = "0.33.0" +version = "0.50.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -18,10 +18,12 @@ targets = ["x86_64-unknown-linux-gnu"] async-trait = { workspace = true } jsonrpsee = { features = ["ws-client"], workspace = true } log = { workspace = true, default-features = true } -sc-rpc-api = { workspace = true, default-features = true } +sc-rpc-api.default-features = true +sc-rpc-api.workspace = true serde = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } +sp-runtime.default-features = true +sp-runtime.workspace = true [dev-dependencies] -sp-core = { workspace = true, default-features = true } +sp-core = { default-features = true, workspace = true } tokio = { features = ["macros", "rt-multi-thread", "sync"], workspace = true, default-features = true } diff --git a/substrate/utils/frame/rpc/state-trie-migration-rpc/Cargo.toml b/substrate/utils/frame/rpc/state-trie-migration-rpc/Cargo.toml index e26af6b5a0d24..bcecf07e0e53c 100644 --- a/substrate/utils/frame/rpc/state-trie-migration-rpc/Cargo.toml +++ b/substrate/utils/frame/rpc/state-trie-migration-rpc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "substrate-state-trie-migration-rpc" -version = "27.0.0" +version = "44.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -18,15 +18,18 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { workspace = true } serde = { features = ["derive"], workspace = true, default-features = true } - -sp-core = { workspace = true, default-features = true } -sp-state-machine = { workspace = true, default-features = true } -sp-trie = { workspace = true, default-features = true } +sp-core.default-features = true +sp-core.workspace = true +sp-state-machine.default-features = true +sp-state-machine.workspace = true +sp-trie.default-features = true +sp-trie.workspace = true trie-db = { workspace = true, default-features = true } jsonrpsee = { features = ["client-core", "macros", "server-core"], workspace = true } - -# Substrate Dependencies -sc-client-api = { workspace = true, default-features = true } -sc-rpc-api = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } +sc-client-api.default-features = true +sc-client-api.workspace = true +sc-rpc-api.default-features = true +sc-rpc-api.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true diff --git a/substrate/utils/frame/rpc/support/Cargo.toml b/substrate/utils/frame/rpc/support/Cargo.toml index ac1255627aacc..6333cca68fa06 100644 --- a/substrate/utils/frame/rpc/support/Cargo.toml +++ b/substrate/utils/frame/rpc/support/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "substrate-frame-rpc-support" -version = "29.0.0" +version = "46.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -16,16 +16,19 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { workspace = true, default-features = true } -frame-support = { workspace = true, default-features = true } +frame-support.default-features = true +frame-support.workspace = true jsonrpsee = { features = ["jsonrpsee-types"], workspace = true } -sc-rpc-api = { workspace = true, default-features = true } +sc-rpc-api.default-features = true +sc-rpc-api.workspace = true scale-info = { workspace = true, default-features = true } serde = { workspace = true, default-features = true } -sp-storage = { workspace = true, default-features = true } +sp-storage.default-features = true +sp-storage.workspace = true [dev-dependencies] -frame-system = { workspace = true, default-features = true } +frame-system = { default-features = true, workspace = true } jsonrpsee = { features = ["jsonrpsee-types", "ws-client"], workspace = true } -sp-core = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } +sp-core = { default-features = true, workspace = true } +sp-runtime = { default-features = true, workspace = true } tokio = { workspace = true, default-features = true } diff --git a/substrate/utils/frame/rpc/system/Cargo.toml b/substrate/utils/frame/rpc/system/Cargo.toml index 9fbc4c93afc52..9912701e32751 100644 --- a/substrate/utils/frame/rpc/system/Cargo.toml +++ b/substrate/utils/frame/rpc/system/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "substrate-frame-rpc-system" -version = "28.0.0" +version = "45.0.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -18,21 +18,29 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { workspace = true, default-features = true } docify = { workspace = true } -frame-system-rpc-runtime-api = { workspace = true, default-features = true } +frame-system-rpc-runtime-api.default-features = true +frame-system-rpc-runtime-api.workspace = true futures = { workspace = true } jsonrpsee = { features = ["client-core", "macros", "server-core"], workspace = true } log = { workspace = true, default-features = true } -sc-rpc-api = { workspace = true, default-features = true } -sc-transaction-pool-api = { workspace = true, default-features = true } -sp-api = { workspace = true, default-features = true } -sp-block-builder = { workspace = true, default-features = true } -sp-blockchain = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } +sc-rpc-api.default-features = true +sc-rpc-api.workspace = true +sc-transaction-pool-api.default-features = true +sc-transaction-pool-api.workspace = true +sp-api.default-features = true +sp-api.workspace = true +sp-block-builder.default-features = true +sp-block-builder.workspace = true +sp-blockchain.default-features = true +sp-blockchain.workspace = true +sp-core.default-features = true +sp-core.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true [dev-dependencies] assert_matches = { workspace = true } -sc-transaction-pool = { workspace = true, default-features = true } -sp-tracing = { workspace = true, default-features = true } +sc-transaction-pool = { default-features = true, workspace = true } +sp-tracing = { default-features = true, workspace = true } substrate-test-runtime-client = { workspace = true } tokio = { workspace = true, default-features = true } diff --git a/substrate/utils/frame/storage-access-test-runtime/Cargo.toml b/substrate/utils/frame/storage-access-test-runtime/Cargo.toml index 5093653d2dc83..1ac62aeecc71b 100644 --- a/substrate/utils/frame/storage-access-test-runtime/Cargo.toml +++ b/substrate/utils/frame/storage-access-test-runtime/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "frame-storage-access-test-runtime" description = "A runtime for testing storage access on block validation" -version = "0.1.0" +version = "0.2.0" authors.workspace = true edition.workspace = true build = "build.rs" @@ -16,10 +16,10 @@ workspace = true [dependencies] codec = { features = ["derive"], workspace = true } cumulus-pallet-parachain-system = { workspace = true, optional = true } -sp-core = { workspace = true } -sp-runtime = { workspace = true } -sp-state-machine = { workspace = true } -sp-trie = { workspace = true } +sp-core.workspace = true +sp-runtime.workspace = true +sp-state-machine.workspace = true +sp-trie.workspace = true [build-dependencies] substrate-wasm-builder = { optional = true, workspace = true, default-features = true } diff --git a/substrate/utils/prometheus/Cargo.toml b/substrate/utils/prometheus/Cargo.toml index b8dfd6fb2beee..7161388855409 100644 --- a/substrate/utils/prometheus/Cargo.toml +++ b/substrate/utils/prometheus/Cargo.toml @@ -1,7 +1,7 @@ [package] description = "Endpoint to expose Prometheus metrics" name = "substrate-prometheus-endpoint" -version = "0.17.0" +version = "0.17.2" license = "Apache-2.0" authors.workspace = true edition.workspace = true diff --git a/substrate/utils/substrate-bip39/Cargo.toml b/substrate/utils/substrate-bip39/Cargo.toml index 0a4e84c833eff..66f362e8c920f 100644 --- a/substrate/utils/substrate-bip39/Cargo.toml +++ b/substrate/utils/substrate-bip39/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "substrate-bip39" -version = "0.4.7" +version = "0.6.0" license = "Apache-2.0" description = "Converting BIP39 entropy to valid Substrate (sr25519) SecretKeys" documentation = "https://docs.rs/substrate-bip39" diff --git a/substrate/utils/wasm-builder/Cargo.toml b/substrate/utils/wasm-builder/Cargo.toml index 6645dd1803bfa..cf03e6eb3d7e7 100644 --- a/substrate/utils/wasm-builder/Cargo.toml +++ b/substrate/utils/wasm-builder/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "substrate-wasm-builder" -version = "17.0.0" +version = "27.0.0" authors.workspace = true description = "Utility for building WASM binaries" edition.workspace = true @@ -22,7 +22,8 @@ filetime = { workspace = true } jobserver = { workspace = true } parity-wasm = { workspace = true } polkavm-linker = { workspace = true } -sp-maybe-compressed-blob = { workspace = true, default-features = true } +sp-maybe-compressed-blob.default-features = true +sp-maybe-compressed-blob.workspace = true strum = { features = ["derive"], workspace = true, default-features = true } tempfile = { workspace = true } toml = { workspace = true } diff --git a/templates/minimal/node/Cargo.toml b/templates/minimal/node/Cargo.toml index 8e6c27a00dcc4..d80e94e61ff47 100644 --- a/templates/minimal/node/Cargo.toml +++ b/templates/minimal/node/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "minimal-template-node" description = "A minimal Substrate-based Substrate node, ready for hacking." -version = "0.0.0" +version = "0.1.0" license = "Unlicense" authors.workspace = true homepage.workspace = true @@ -19,8 +19,7 @@ docify = { workspace = true } futures = { features = ["thread-pool"], workspace = true } futures-timer = { workspace = true } jsonrpsee = { features = ["server"], workspace = true } - -minimal-template-runtime = { workspace = true } +minimal-template-runtime.workspace = true polkadot-sdk = { workspace = true, features = ["experimental", "node"] } [build-dependencies] diff --git a/templates/minimal/pallets/template/Cargo.toml b/templates/minimal/pallets/template/Cargo.toml index dfcc0e4f0d464..5f46b0c0f33c4 100644 --- a/templates/minimal/pallets/template/Cargo.toml +++ b/templates/minimal/pallets/template/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "pallet-minimal-template" description = "A minimal pallet built with FRAME, part of Polkadot Sdk." -version = "0.0.0" +version = "0.1.0" license = "Unlicense" authors.workspace = true homepage.workspace = true @@ -14,7 +14,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { features = ["derive"], workspace = true } -polkadot-sdk = { workspace = true, default-features = false, features = ["experimental", "runtime"] } +polkadot-sdk = { workspace = true, features = ["experimental", "runtime"], default-features = false } scale-info = { features = ["derive"], workspace = true } [features] diff --git a/templates/minimal/runtime/Cargo.toml b/templates/minimal/runtime/Cargo.toml index c9bb09de9f1a1..8555448506a2c 100644 --- a/templates/minimal/runtime/Cargo.toml +++ b/templates/minimal/runtime/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "minimal-template-runtime" description = "A solochain runtime template built with Substrate, part of Polkadot Sdk." -version = "0.0.0" +version = "0.1.0" license = "Unlicense" authors.workspace = true homepage.workspace = true @@ -11,20 +11,11 @@ publish = false [dependencies] codec = { workspace = true } -polkadot-sdk = { workspace = true, features = [ - "pallet-balances", - "pallet-sudo", - "pallet-timestamp", - "pallet-transaction-payment", - "pallet-transaction-payment-rpc-runtime-api", - "runtime", -] } +pallet-minimal-template.workspace = true +polkadot-sdk = { workspace = true, features = ["pallet-balances", "pallet-sudo", "pallet-timestamp", "pallet-transaction-payment", "pallet-transaction-payment-rpc-runtime-api", "runtime"] } scale-info = { workspace = true } serde_json = { workspace = true, default-features = false, features = ["alloc"] } -# local pallet templates -pallet-minimal-template = { workspace = true } - [build-dependencies] polkadot-sdk = { optional = true, workspace = true, features = ["substrate-wasm-builder"] } diff --git a/templates/parachain/Cargo.toml b/templates/parachain/Cargo.toml index eaab7734297a3..d91eb9e1951df 100644 --- a/templates/parachain/Cargo.toml +++ b/templates/parachain/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "parachain-template" description = "A parachain-template helper crate to keep documentation in sync with the template's components." -version = "0.0.0" +version = "0.1.0" license = "Unlicense" authors.workspace = true homepage.workspace = true diff --git a/templates/parachain/node/Cargo.toml b/templates/parachain/node/Cargo.toml index e7da1b8d60728..e6c623dcdf0de 100644 --- a/templates/parachain/node/Cargo.toml +++ b/templates/parachain/node/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "parachain-template-node" description = "A parachain node template built with Substrate and Cumulus, part of Polkadot Sdk." -version = "0.0.0" +version = "0.1.0" license = "Unlicense" authors.workspace = true homepage.workspace = true @@ -17,14 +17,11 @@ docify = { workspace = true } futures = { workspace = true } jsonrpsee = { features = ["server"], workspace = true } log = { workspace = true, default-features = true } -serde = { features = ["derive"], workspace = true, default-features = true } - +parachain-template-runtime.workspace = true polkadot-sdk = { workspace = true, features = ["node"] } - -parachain-template-runtime = { workspace = true } - -# Substrate -prometheus-endpoint = { workspace = true, default-features = true } +prometheus-endpoint.default-features = true +prometheus-endpoint.workspace = true +serde = { features = ["derive"], workspace = true, default-features = true } [build-dependencies] polkadot-sdk = { workspace = true, features = ["substrate-build-script-utils"] } diff --git a/templates/parachain/pallets/template/Cargo.toml b/templates/parachain/pallets/template/Cargo.toml index dc1088cb33fe6..9c5a0831ff255 100644 --- a/templates/parachain/pallets/template/Cargo.toml +++ b/templates/parachain/pallets/template/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "pallet-parachain-template" description = "FRAME pallet template for defining custom runtime logic." -version = "0.0.0" +version = "0.1.0" license = "Unlicense" authors.workspace = true homepage.workspace = true @@ -14,13 +14,9 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { features = ["derive"], workspace = true } +frame = { workspace = true, features = ["experimental", "runtime"], default-features = false } scale-info = { features = ["derive"], workspace = true } -frame = { workspace = true, default-features = false, features = [ - "experimental", - "runtime", -] } - [features] default = ["std"] runtime-benchmarks = ["frame/runtime-benchmarks"] diff --git a/templates/parachain/runtime/Cargo.toml b/templates/parachain/runtime/Cargo.toml index f55d640244ed5..ce63d3ed3201e 100644 --- a/templates/parachain/runtime/Cargo.toml +++ b/templates/parachain/runtime/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "parachain-template-runtime" description = "A parachain runtime template built with Substrate and Cumulus, part of Polkadot Sdk." -version = "0.0.0" +version = "0.1.0" license = "Unlicense" authors.workspace = true homepage.workspace = true @@ -14,52 +14,16 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { features = ["derive"], workspace = true } +cumulus-pallet-parachain-system.workspace = true docify = { workspace = true } hex-literal = { optional = true, workspace = true, default-features = true } log = { workspace = true } +pallet-parachain-template.workspace = true +polkadot-sdk = { workspace = true, features = ["cumulus-pallet-aura-ext", "cumulus-pallet-session-benchmarking", "cumulus-pallet-weight-reclaim", "cumulus-pallet-xcm", "cumulus-pallet-xcmp-queue", "cumulus-primitives-aura", "cumulus-primitives-core", "cumulus-primitives-utility", "pallet-aura", "pallet-authorship", "pallet-balances", "pallet-collator-selection", "pallet-message-queue", "pallet-session", "pallet-sudo", "pallet-timestamp", "pallet-transaction-payment", "pallet-transaction-payment-rpc-runtime-api", "pallet-xcm", "parachains-common", "polkadot-parachain-primitives", "polkadot-runtime-common", "runtime", "staging-parachain-info", "staging-xcm", "staging-xcm-builder", "staging-xcm-executor"], default-features = false } scale-info = { features = ["derive"], workspace = true } serde_json = { workspace = true, default-features = false, features = ["alloc"] } smallvec = { workspace = true, default-features = true } -# Local -pallet-parachain-template = { workspace = true } - -polkadot-sdk = { workspace = true, default-features = false, features = [ - "pallet-aura", - "pallet-authorship", - "pallet-balances", - "pallet-message-queue", - "pallet-session", - "pallet-sudo", - "pallet-timestamp", - "pallet-transaction-payment", - "pallet-transaction-payment-rpc-runtime-api", - - "pallet-xcm", - "polkadot-parachain-primitives", - "polkadot-runtime-common", - "staging-xcm", - "staging-xcm-builder", - "staging-xcm-executor", - - "cumulus-pallet-aura-ext", - "cumulus-pallet-session-benchmarking", - "cumulus-pallet-weight-reclaim", - "cumulus-pallet-xcm", - "cumulus-pallet-xcmp-queue", - "cumulus-primitives-aura", - "cumulus-primitives-core", - "cumulus-primitives-utility", - "pallet-collator-selection", - "parachains-common", - "staging-parachain-info", - - "runtime", -] } - -# Cumulus -cumulus-pallet-parachain-system = { workspace = true } - [build-dependencies] docify = { workspace = true } substrate-wasm-builder = { optional = true, workspace = true, default-features = true } diff --git a/templates/solochain/node/Cargo.toml b/templates/solochain/node/Cargo.toml index 64268fb94afd6..3428b24b33099 100644 --- a/templates/solochain/node/Cargo.toml +++ b/templates/solochain/node/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "solochain-template-node" description = "A solochain node template built with Substrate, part of Polkadot Sdk." -version = "0.0.0" +version = "0.1.0" license = "Unlicense" authors.workspace = true homepage.workspace = true @@ -16,52 +16,73 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] clap = { features = ["derive"], workspace = true } +frame-benchmarking-cli.default-features = true +frame-benchmarking-cli.workspace = true +frame-metadata-hash-extension.default-features = true +frame-metadata-hash-extension.workspace = true +frame-system.default-features = true +frame-system.workspace = true futures = { features = ["thread-pool"], workspace = true } jsonrpsee = { features = ["server"], workspace = true } - -# substrate client -sc-basic-authorship = { workspace = true, default-features = true } -sc-cli = { workspace = true, default-features = true } -sc-client-api = { workspace = true, default-features = true } -sc-consensus = { workspace = true, default-features = true } -sc-consensus-aura = { workspace = true, default-features = true } -sc-consensus-grandpa = { workspace = true, default-features = true } -sc-executor = { workspace = true, default-features = true } -sc-network = { workspace = true, default-features = true } -sc-offchain = { workspace = true, default-features = true } -sc-service = { workspace = true, default-features = true } -sc-telemetry = { workspace = true, default-features = true } -sc-transaction-pool = { workspace = true, default-features = true } -sc-transaction-pool-api = { workspace = true, default-features = true } -sp-consensus-aura = { workspace = true, default-features = true } -sp-core = { workspace = true, default-features = true } -sp-genesis-builder = { workspace = true, default-features = true } - -# substrate primitives -sp-api = { workspace = true, default-features = true } -sp-block-builder = { workspace = true, default-features = true } -sp-blockchain = { workspace = true, default-features = true } -sp-inherents = { workspace = true, default-features = true } -sp-io = { workspace = true, default-features = true } -sp-keyring = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } -sp-timestamp = { workspace = true, default-features = true } - -# frame and pallets -frame-metadata-hash-extension = { workspace = true, default-features = true } -frame-system = { workspace = true, default-features = true } -pallet-transaction-payment = { workspace = true, default-features = true } -pallet-transaction-payment-rpc = { workspace = true, default-features = true } -substrate-frame-rpc-system = { workspace = true, default-features = true } - -# These dependencies are used for runtime benchmarking -frame-benchmarking-cli = { workspace = true, default-features = true } - -# Local Dependencies -solochain-template-runtime = { workspace = true } +pallet-transaction-payment-rpc.default-features = true +pallet-transaction-payment-rpc.workspace = true +pallet-transaction-payment.default-features = true +pallet-transaction-payment.workspace = true +sc-basic-authorship.default-features = true +sc-basic-authorship.workspace = true +sc-cli.default-features = true +sc-cli.workspace = true +sc-client-api.default-features = true +sc-client-api.workspace = true +sc-consensus-aura.default-features = true +sc-consensus-aura.workspace = true +sc-consensus-grandpa.default-features = true +sc-consensus-grandpa.workspace = true +sc-consensus.default-features = true +sc-consensus.workspace = true +sc-executor.default-features = true +sc-executor.workspace = true +sc-network.default-features = true +sc-network.workspace = true +sc-offchain.default-features = true +sc-offchain.workspace = true +sc-service.default-features = true +sc-service.workspace = true +sc-telemetry.default-features = true +sc-telemetry.workspace = true +sc-transaction-pool-api.default-features = true +sc-transaction-pool-api.workspace = true +sc-transaction-pool.default-features = true +sc-transaction-pool.workspace = true +solochain-template-runtime.workspace = true +sp-api.default-features = true +sp-api.workspace = true +sp-block-builder.default-features = true +sp-block-builder.workspace = true +sp-blockchain.default-features = true +sp-blockchain.workspace = true +sp-consensus-aura.default-features = true +sp-consensus-aura.workspace = true +sp-core.default-features = true +sp-core.workspace = true +sp-genesis-builder.default-features = true +sp-genesis-builder.workspace = true +sp-inherents.default-features = true +sp-inherents.workspace = true +sp-io.default-features = true +sp-io.workspace = true +sp-keyring.default-features = true +sp-keyring.workspace = true +sp-runtime.default-features = true +sp-runtime.workspace = true +sp-timestamp.default-features = true +sp-timestamp.workspace = true +substrate-frame-rpc-system.default-features = true +substrate-frame-rpc-system.workspace = true [build-dependencies] -substrate-build-script-utils = { workspace = true, default-features = true } +substrate-build-script-utils.default-features = true +substrate-build-script-utils.workspace = true [features] default = ["std"] diff --git a/templates/solochain/pallets/template/Cargo.toml b/templates/solochain/pallets/template/Cargo.toml index 756e64dd98faf..78906cf017074 100644 --- a/templates/solochain/pallets/template/Cargo.toml +++ b/templates/solochain/pallets/template/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "pallet-template" description = "FRAME pallet template for defining custom runtime logic." -version = "0.0.0" +version = "0.1.0" license = "Unlicense" authors.workspace = true homepage.workspace = true @@ -14,17 +14,15 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { features = ["derive"], workspace = true } -scale-info = { features = ["derive"], workspace = true } - -# frame deps frame-benchmarking = { optional = true, workspace = true } -frame-support = { workspace = true } -frame-system = { workspace = true } +frame-support.workspace = true +frame-system.workspace = true +scale-info = { features = ["derive"], workspace = true } [dev-dependencies] -sp-core = { workspace = true, default-features = true } -sp-io = { workspace = true, default-features = true } -sp-runtime = { workspace = true, default-features = true } +sp-core = { default-features = true, workspace = true } +sp-io = { default-features = true, workspace = true } +sp-runtime = { default-features = true, workspace = true } [features] default = ["std"] @@ -34,9 +32,6 @@ std = [ "frame-support/std", "frame-system/std", "scale-info/std", - "sp-core/std", - "sp-io/std", - "sp-runtime/std", ] runtime-benchmarks = [ "frame-benchmarking/runtime-benchmarks", diff --git a/templates/solochain/runtime/Cargo.toml b/templates/solochain/runtime/Cargo.toml index 17ff6bb5207db..f53c861640c41 100644 --- a/templates/solochain/runtime/Cargo.toml +++ b/templates/solochain/runtime/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "solochain-template-runtime" description = "A solochain runtime template built with Substrate, part of Polkadot Sdk." -version = "0.0.0" +version = "0.1.0" license = "Unlicense" authors.workspace = true homepage.workspace = true @@ -14,51 +14,39 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { features = ["derive"], workspace = true } -scale-info = { features = ["derive", "serde"], workspace = true } -serde_json = { workspace = true, default-features = false, features = ["alloc"] } - -# frame -frame-executive = { workspace = true } -frame-metadata-hash-extension = { workspace = true } +frame-benchmarking = { optional = true, workspace = true } +frame-executive.workspace = true +frame-metadata-hash-extension.workspace = true frame-support = { features = ["experimental"], workspace = true } -frame-system = { workspace = true } +frame-system-benchmarking = { optional = true, workspace = true } +frame-system-rpc-runtime-api.workspace = true +frame-system.workspace = true frame-try-runtime = { optional = true, workspace = true } - -# frame pallets -pallet-aura = { workspace = true } -pallet-balances = { workspace = true } -pallet-grandpa = { workspace = true } -pallet-sudo = { workspace = true } -pallet-timestamp = { workspace = true } -pallet-transaction-payment = { workspace = true } - -# primitives -sp-api = { workspace = true } -sp-block-builder = { workspace = true } +pallet-aura.workspace = true +pallet-balances.workspace = true +pallet-grandpa.workspace = true +pallet-sudo.workspace = true +pallet-template.workspace = true +pallet-timestamp.workspace = true +pallet-transaction-payment-rpc-runtime-api.workspace = true +pallet-transaction-payment.workspace = true +scale-info = { features = ["derive", "serde"], workspace = true } +serde_json = { workspace = true, default-features = false, features = ["alloc"] } +sp-api.workspace = true +sp-block-builder.workspace = true sp-consensus-aura = { features = ["serde"], workspace = true } sp-consensus-grandpa = { features = ["serde"], workspace = true } sp-core = { features = ["serde"], workspace = true } -sp-genesis-builder = { workspace = true } -sp-inherents = { workspace = true } -sp-keyring = { workspace = true } -sp-offchain = { workspace = true } +sp-genesis-builder.workspace = true +sp-inherents.workspace = true +sp-keyring.workspace = true +sp-offchain.workspace = true sp-runtime = { features = ["serde"], workspace = true } -sp-session = { workspace = true } -sp-storage = { workspace = true } -sp-transaction-pool = { workspace = true } +sp-session.workspace = true +sp-storage.workspace = true +sp-transaction-pool.workspace = true sp-version = { features = ["serde"], workspace = true } -# RPC related -frame-system-rpc-runtime-api = { workspace = true } -pallet-transaction-payment-rpc-runtime-api = { workspace = true } - -# Used for runtime benchmarking -frame-benchmarking = { optional = true, workspace = true } -frame-system-benchmarking = { optional = true, workspace = true } - -# The pallet in this template. -pallet-template = { workspace = true } - [build-dependencies] substrate-wasm-builder = { optional = true, workspace = true, default-features = true } diff --git a/templates/zombienet/Cargo.toml b/templates/zombienet/Cargo.toml index 1abe93f8a9516..717dc7b914e42 100644 --- a/templates/zombienet/Cargo.toml +++ b/templates/zombienet/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "template-zombienet-tests" description = "Zombienet test for templates." -version = "0.0.0" +version = "0.1.0" license = "Unlicense" authors.workspace = true homepage.workspace = true diff --git a/umbrella/Cargo.toml b/umbrella/Cargo.toml index 663e0181be157..2f44475ea0bba 100644 --- a/umbrella/Cargo.toml +++ b/umbrella/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-sdk" -version = "0.1.0" +version = "2506.0.0" description = "Polkadot SDK umbrella crate." license = "Apache-2.0" From bcf4010745afcf4e56393033426adf3fb41665ee Mon Sep 17 00:00:00 2001 From: "paritytech-release-backport-bot[bot]" <191369287+paritytech-release-backport-bot[bot]@users.noreply.github.com> Date: Wed, 30 Jul 2025 07:12:31 +0000 Subject: [PATCH 044/128] [stable2506] Backport #9179 (#9304) Backport #9179 into `stable2506` from karolk91. See the [documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md) on how to use this bot. Co-authored-by: Karol Kokoszka Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Branislav Kontur --- polkadot/xcm/xcm-executor/src/assets.rs | 210 ++++++++++++++++++++---- prdoc/pr_9179.prdoc | 10 ++ 2 files changed, 185 insertions(+), 35 deletions(-) create mode 100644 prdoc/pr_9179.prdoc diff --git a/polkadot/xcm/xcm-executor/src/assets.rs b/polkadot/xcm/xcm-executor/src/assets.rs index 8704c7d04c05d..e9425f2944bfc 100644 --- a/polkadot/xcm/xcm-executor/src/assets.rs +++ b/polkadot/xcm/xcm-executor/src/assets.rs @@ -132,34 +132,21 @@ impl AssetsInHolding { /// Mutate `self` to contain all given `assets`, saturating if necessary. /// - /// NOTE: [`AssetsInHolding`] are always sorted, allowing us to optimize this function from - /// `O(n^2)` to `O(n)`. + /// NOTE: [`AssetsInHolding`] are always sorted pub fn subsume_assets(&mut self, mut assets: AssetsInHolding) { - let mut f_iter = assets.fungible.iter_mut(); - let mut g_iter = self.fungible.iter_mut(); - if let (Some(mut f), Some(mut g)) = (f_iter.next(), g_iter.next()) { - loop { - if f.0 == g.0 { - // keys are equal. in this case, we add `self`'s balance for the asset onto - // `assets`, balance, knowing that the `append` operation which follows will - // clobber `self`'s value and only use `assets`'s. - (*f.1).saturating_accrue(*g.1); - } - if f.0 <= g.0 { - f = match f_iter.next() { - Some(x) => x, - None => break, - }; - } - if f.0 >= g.0 { - g = match g_iter.next() { - Some(x) => x, - None => break, - }; - } - } + // for fungibles, find matching fungibles and sum their amounts so we end-up having just + // single such fungible but with increased amount inside + for (asset_id, asset_amount) in assets.fungible { + self.fungible + .entry(asset_id) + .and_modify(|current_asset_amount| { + current_asset_amount.saturating_accrue(asset_amount) + }) + .or_insert(asset_amount); } - self.fungible.append(&mut assets.fungible); + // for non-fungibles, every entry is unique so there is no notion of amount to sum-up + // together if there is the same non-fungible in both holdings (same instance_id) these + // will be collapsed into just single one self.non_fungible.append(&mut assets.non_fungible); } @@ -530,6 +517,21 @@ mod tests { (Here, amount).into() } #[allow(non_snake_case)] + /// Concrete fungible constructor with index for GeneralIndex + fn CFG(index: u128, amount: u128) -> Asset { + (GeneralIndex(index), amount).into() + } + #[allow(non_snake_case)] + /// Concrete fungible constructor (parent=1) + fn CFP(amount: u128) -> Asset { + (Parent, amount).into() + } + #[allow(non_snake_case)] + /// Concrete fungible constructor (parent=2) + fn CFPP(amount: u128) -> Asset { + ((Parent, Parent), amount).into() + } + #[allow(non_snake_case)] /// Concrete non-fungible constructor fn CNF(instance_id: u8) -> Asset { (Here, [instance_id; 4]).into() @@ -543,18 +545,156 @@ mod tests { } #[test] - fn subsume_assets_works() { - let t1 = test_assets(); + fn assets_in_holding_order_works() { + // populate assets in non-ordered fashion + let mut assets = AssetsInHolding::new(); + assets.subsume(CFPP(300)); + assets.subsume(CFP(200)); + assets.subsume(CNF(2)); + assets.subsume(CF(100)); + assets.subsume(CNF(1)); + assets.subsume(CFG(10, 400)); + assets.subsume(CFG(15, 500)); + + // following is the order we expect from AssetsInHolding + // - fungibles before non-fungibles + // - for fungibles, sort by parent first, if parents match, then by other components like + // general index + // - for non-fungibles, sort by instance_id + let mut iter = assets.clone().into_assets_iter(); + // fungible, order by parent, parent=0 + assert_eq!(Some(CF(100)), iter.next()); + // fungible, order by parent then by general index, parent=0, general index=10 + assert_eq!(Some(CFG(10, 400)), iter.next()); + // fungible, order by parent then by general index, parent=0, general index=15 + assert_eq!(Some(CFG(15, 500)), iter.next()); + // fungible, order by parent, parent=1 + assert_eq!(Some(CFP(200)), iter.next()); + // fungible, order by parent, parent=2 + assert_eq!(Some(CFPP(300)), iter.next()); + // non-fungible, after fungibles, order by instance id, id=1 + assert_eq!(Some(CNF(1)), iter.next()); + // non-fungible, after fungibles, order by instance id, id=2 + assert_eq!(Some(CNF(2)), iter.next()); + // nothing else in the assets + assert_eq!(None, iter.next()); + + // lets add copy of the assets to the assets itself, just to check if order stays the same + // we also expect 2x amount for every fungible and collapsed non-fungibles + let assets_same = assets.clone(); + assets.subsume_assets(assets_same); + + let mut iter = assets.into_assets_iter(); + assert_eq!(Some(CF(200)), iter.next()); + assert_eq!(Some(CFG(10, 800)), iter.next()); + assert_eq!(Some(CFG(15, 1000)), iter.next()); + assert_eq!(Some(CFP(400)), iter.next()); + assert_eq!(Some(CFPP(600)), iter.next()); + assert_eq!(Some(CNF(1)), iter.next()); + assert_eq!(Some(CNF(2)), iter.next()); + assert_eq!(None, iter.next()); + } + + #[test] + fn subsume_assets_equal_length_holdings() { + let mut t1 = test_assets(); let mut t2 = AssetsInHolding::new(); t2.subsume(CF(300)); t2.subsume(CNF(50)); - let mut r1 = t1.clone(); - r1.subsume_assets(t2.clone()); - let mut r2 = t1.clone(); - for a in t2.assets_iter() { - r2.subsume(a) - } - assert_eq!(r1, r2); + + let t1_clone = t1.clone(); + let mut t2_clone = t2.clone(); + + // ensure values for same fungibles are summed up together + // and order is also ok (see assets_in_holding_order_works()) + t1.subsume_assets(t2.clone()); + let mut iter = t1.into_assets_iter(); + assert_eq!(Some(CF(600)), iter.next()); + assert_eq!(Some(CNF(40)), iter.next()); + assert_eq!(Some(CNF(50)), iter.next()); + assert_eq!(None, iter.next()); + + // try the same initial holdings but other way around + // expecting same exact result as above + t2_clone.subsume_assets(t1_clone.clone()); + let mut iter = t2_clone.into_assets_iter(); + assert_eq!(Some(CF(600)), iter.next()); + assert_eq!(Some(CNF(40)), iter.next()); + assert_eq!(Some(CNF(50)), iter.next()); + assert_eq!(None, iter.next()); + } + + #[test] + fn subsume_assets_different_length_holdings() { + let mut t1 = AssetsInHolding::new(); + t1.subsume(CFP(400)); + t1.subsume(CFPP(100)); + + let mut t2 = AssetsInHolding::new(); + t2.subsume(CF(100)); + t2.subsume(CNF(50)); + t2.subsume(CNF(40)); + t2.subsume(CFP(100)); + t2.subsume(CFPP(100)); + + let t1_clone = t1.clone(); + let mut t2_clone = t2.clone(); + + // ensure values for same fungibles are summed up together + // and order is also ok (see assets_in_holding_order_works()) + t1.subsume_assets(t2); + let mut iter = t1.into_assets_iter(); + assert_eq!(Some(CF(100)), iter.next()); + assert_eq!(Some(CFP(500)), iter.next()); + assert_eq!(Some(CFPP(200)), iter.next()); + assert_eq!(Some(CNF(40)), iter.next()); + assert_eq!(Some(CNF(50)), iter.next()); + assert_eq!(None, iter.next()); + + // try the same initial holdings but other way around + // expecting same exact result as above + t2_clone.subsume_assets(t1_clone); + let mut iter = t2_clone.into_assets_iter(); + assert_eq!(Some(CF(100)), iter.next()); + assert_eq!(Some(CFP(500)), iter.next()); + assert_eq!(Some(CFPP(200)), iter.next()); + assert_eq!(Some(CNF(40)), iter.next()); + assert_eq!(Some(CNF(50)), iter.next()); + assert_eq!(None, iter.next()); + } + + #[test] + fn subsume_assets_empty_holding() { + let mut t1 = AssetsInHolding::new(); + let t2 = AssetsInHolding::new(); + t1.subsume_assets(t2.clone()); + let mut iter = t1.clone().into_assets_iter(); + assert_eq!(None, iter.next()); + + t1.subsume(CFP(400)); + t1.subsume(CNF(40)); + t1.subsume(CFPP(100)); + + let t1_clone = t1.clone(); + let mut t2_clone = t2.clone(); + + // ensure values for same fungibles are summed up together + // and order is also ok (see assets_in_holding_order_works()) + t1.subsume_assets(t2.clone()); + let mut iter = t1.into_assets_iter(); + assert_eq!(Some(CFP(400)), iter.next()); + assert_eq!(Some(CFPP(100)), iter.next()); + assert_eq!(Some(CNF(40)), iter.next()); + assert_eq!(None, iter.next()); + + // try the same initial holdings but other way around + // expecting same exact result as above + t2_clone.subsume_assets(t1_clone.clone()); + let mut iter = t2_clone.into_assets_iter(); + assert_eq!(Some(CFP(400)), iter.next()); + assert_eq!(Some(CFPP(100)), iter.next()); + assert_eq!(Some(CNF(40)), iter.next()); + assert_eq!(None, iter.next()); } #[test] diff --git a/prdoc/pr_9179.prdoc b/prdoc/pr_9179.prdoc new file mode 100644 index 0000000000000..f0c3eb9b11ae1 --- /dev/null +++ b/prdoc/pr_9179.prdoc @@ -0,0 +1,10 @@ +title: 'Fix subsume_assets incorrectly merging two AssetsInHolding' +doc: +- audience: Runtime Dev + description: | + Fix subsume_assets incorrectly merging two AssetsInHolding instances under certain conditions, + which caused asset values to be overridden rather than summed. + +crates: +- name: staging-xcm-executor + bump: patch From 1e4e9531eebc71e8674164f3040e189f1381d2bc Mon Sep 17 00:00:00 2001 From: Raymond Cheung <178801527+raymondkfcheung@users.noreply.github.com> Date: Wed, 30 Jul 2025 15:11:26 +0100 Subject: [PATCH 045/128] [stable2506] Fix `pallet-xcm` tests with `test_log_capture` (#9382) Fix `pallet-xcm` tests with `test_log_capture` --- polkadot/xcm/pallet-xcm/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/polkadot/xcm/pallet-xcm/Cargo.toml b/polkadot/xcm/pallet-xcm/Cargo.toml index 25561fd9f5338..2f90b52b2ee23 100644 --- a/polkadot/xcm/pallet-xcm/Cargo.toml +++ b/polkadot/xcm/pallet-xcm/Cargo.toml @@ -36,7 +36,7 @@ xcm.workspace = true pallet-assets = { default-features = true, workspace = true } polkadot-parachain-primitives = { default-features = true, workspace = true } polkadot-runtime-parachains = { default-features = true, workspace = true } -sp-tracing = { default-features = true, workspace = true } +sp-tracing = { features = ["test-utils"], default-features = true, workspace = true } xcm-simulator = { default-features = true, workspace = true } [features] From 8f68ad159110b19819695e6fdbc2ffa1595c314a Mon Sep 17 00:00:00 2001 From: "paritytech-release-backport-bot[bot]" <191369287+paritytech-release-backport-bot[bot]@users.noreply.github.com> Date: Thu, 31 Jul 2025 08:52:37 +0000 Subject: [PATCH 046/128] [stable2506] Backport #9354 (#9375) Backport #9354 into `stable2506` from karolk91. See the [documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md) on how to use this bot. Co-authored-by: Karol Kokoszka Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- prdoc/pr_9354.prdoc | 8 ++++++++ substrate/frame/benchmarking/src/v1.rs | 20 ++++++++++---------- 2 files changed, 18 insertions(+), 10 deletions(-) create mode 100644 prdoc/pr_9354.prdoc diff --git a/prdoc/pr_9354.prdoc b/prdoc/pr_9354.prdoc new file mode 100644 index 0000000000000..d699bbef14551 --- /dev/null +++ b/prdoc/pr_9354.prdoc @@ -0,0 +1,8 @@ +title: Remove whitespaces added by macros due to token re-parsing +doc: +- audience: Runtime Dev + description: |- + Normalize result of `stringify` in scenarios when used inside nested macros to stringify token streams for benchmarking framework +crates: +- name: frame-benchmarking + bump: patch diff --git a/substrate/frame/benchmarking/src/v1.rs b/substrate/frame/benchmarking/src/v1.rs index 8f516f4e17524..c6075e447fe77 100644 --- a/substrate/frame/benchmarking/src/v1.rs +++ b/substrate/frame/benchmarking/src/v1.rs @@ -1818,8 +1818,8 @@ pub fn show_benchmark_debug_info( #[macro_export] macro_rules! add_benchmark { ( $params:ident, $batches:ident, $name:path, $location:ty ) => { - let name_string = stringify!($name).as_bytes(); - let instance_string = stringify!($location).as_bytes(); + let pallet_string = stringify!($name).replace(" ", "").into_bytes(); + let instance_string = stringify!($location).replace(" ", "").into_bytes(); let (config, whitelist) = $params; let $crate::BenchmarkConfig { pallet, @@ -1829,7 +1829,7 @@ macro_rules! add_benchmark { verify, internal_repeats, } = config; - if &pallet[..] == &name_string[..] && &instance[..] == &instance_string[..] { + if &pallet[..] == &pallet_string[..] && &instance[..] == &instance_string[..] { let benchmark_result = <$location as $crate::Benchmarking>::run_benchmark( &benchmark[..], &selected_components[..], @@ -1852,7 +1852,7 @@ macro_rules! add_benchmark { }, Err($crate::BenchmarkError::Stop(e)) => { $crate::show_benchmark_debug_info( - instance_string, + &instance_string, benchmark, selected_components, verify, @@ -1883,8 +1883,8 @@ macro_rules! add_benchmark { if let Some(final_results) = final_results { $batches.push($crate::BenchmarkBatch { - pallet: name_string.to_vec(), - instance: instance_string.to_vec(), + pallet: pallet_string, + instance: instance_string, benchmark: benchmark.clone(), results: final_results, }); @@ -1915,12 +1915,12 @@ macro_rules! add_benchmark { #[macro_export] macro_rules! list_benchmark { ( $list:ident, $extra:ident, $name:path, $location:ty ) => { - let pallet_string = stringify!($name).as_bytes(); - let instance_string = stringify!($location).as_bytes(); + let pallet_string = stringify!($name).replace(" ", "").into_bytes(); + let instance_string = stringify!($location).replace(" ", "").into_bytes(); let benchmarks = <$location as $crate::Benchmarking>::benchmarks($extra); let pallet_benchmarks = $crate::BenchmarkList { - pallet: pallet_string.to_vec(), - instance: instance_string.to_vec(), + pallet: pallet_string, + instance: instance_string, benchmarks: benchmarks.to_vec(), }; $list.push(pallet_benchmarks) From c55944d7be37d91031f3c9463fdd3a249fb96331 Mon Sep 17 00:00:00 2001 From: "paritytech-release-backport-bot[bot]" <191369287+paritytech-release-backport-bot[bot]@users.noreply.github.com> Date: Thu, 31 Jul 2025 16:31:40 +0300 Subject: [PATCH 047/128] [stable2506] Backport #9195 (#9405) Backport #9195 into `stable2506` from karolk91. See the [documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md) on how to use this bot. Co-authored-by: Karol Kokoszka Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Adrian Catangiu --- .../tests/assets/asset-hub-westend/src/lib.rs | 4 +- .../src/tests/exchange_asset.rs | 172 ++++++- .../assets/asset-hub-westend/src/tests/mod.rs | 14 +- .../asset-hub-westend/src/tests/transact.rs | 433 +++++++++++++++++- polkadot/xcm/xcm-executor/src/lib.rs | 4 + prdoc/pr_9195.prdoc | 9 + 6 files changed, 632 insertions(+), 4 deletions(-) create mode 100644 prdoc/pr_9195.prdoc diff --git a/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/src/lib.rs b/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/src/lib.rs index ab8c1114a7efa..eb48eea31f446 100644 --- a/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/src/lib.rs +++ b/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/src/lib.rs @@ -44,8 +44,10 @@ mod imports { TestArgs, TestContext, TestExt, }, xcm_helpers::{ - fee_asset, get_amount_from_versioned_assets, non_fee_asset, xcm_transact_paid_execution, + fee_asset, find_mq_processed_id, find_xcm_sent_message_id, + get_amount_from_versioned_assets, non_fee_asset, xcm_transact_paid_execution, }, + xcm_simulator::helpers::TopicIdTracker, PenpalATeleportableAssetLocation, ASSETS_PALLET_ID, RESERVABLE_ASSET_ID, USDT_ID, XCM_V3, }; pub(crate) use parachains_common::{AccountId, Balance}; diff --git a/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/src/tests/exchange_asset.rs b/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/src/tests/exchange_asset.rs index 695ecff9f63a3..800fa967aa475 100644 --- a/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/src/tests/exchange_asset.rs +++ b/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/src/tests/exchange_asset.rs @@ -14,7 +14,7 @@ // limitations under the License. use crate::{ - create_pool_with_wnd_on, + assets_balance_on, create_pool_with_wnd_on, foreign_balance_on, imports::{ asset_hub_westend_runtime::{ExistentialDeposit, Runtime}, *, @@ -156,3 +156,173 @@ fn test_exchange_asset( } }); } + +#[test] +fn exchange_asset_from_penpal_via_asset_hub_back_to_penpal() { + let sender = PenpalASender::get(); + let sov_of_penpal_on_asset_hub = AssetHubWestend::sovereign_account_id_of( + AssetHubWestend::sibling_location_of(PenpalA::para_id()), + ); + let wnd_from_parachain_pov: Location = RelayLocation::get(); + let usdt_asset_hub_pov = + Location::new(0, [PalletInstance(ASSETS_PALLET_ID), GeneralIndex(USDT_ID.into())]); + let usdt_penpal_pov = PenpalUsdtFromAssetHub::get(); + let amount_of_wnd_to_transfer_to_ah = WESTEND_ED * 1_000_000_000; + let amount_of_usdt_we_want_from_exchange = 1_000_000_000; + + let mut topic_id_tracker = TopicIdTracker::new(); + + // SA-of-Penpal-on-AHW should contain WND amount equal at least the amount that will be + // transferred-in to AH Since AH is the reserve for WND + AssetHubWestend::fund_accounts(vec![( + sov_of_penpal_on_asset_hub.clone().into(), + ASSET_HUB_WESTEND_ED + amount_of_wnd_to_transfer_to_ah, + )]); + // Give the sender enough WND + PenpalA::mint_foreign_asset( + ::RuntimeOrigin::signed(PenpalAssetOwner::get()), + wnd_from_parachain_pov.clone(), + sender.clone(), + amount_of_wnd_to_transfer_to_ah, + ); + + // We create a pool between WND and USDT in AssetHub so we can do the exchange + create_pool_with_wnd_on!( + AssetHubWestend, + usdt_asset_hub_pov.clone(), + false, + AssetHubWestendSender::get(), + 1_000_000_000_000, + 20_000_000_000 + ); + + // Query initial balances + let sender_usdt_on_penpal_before = + foreign_balance_on!(PenpalA, usdt_penpal_pov.clone(), &sender); + let sender_usdt_on_ah_before = assets_balance_on!(AssetHubWestend, USDT_ID, &sender); + + let asset_hub_location_penpal_pov = PenpalA::sibling_location_of(AssetHubWestend::para_id()); + let penpal_location_ah_pov = AssetHubWestend::sibling_location_of(PenpalA::para_id()); + + PenpalA::execute_with(|| { + let sender_signed_origin = ::RuntimeOrigin::signed(sender.clone()); + + let local_fees_amount = 80_000_000_000_000u128; + let remote_fees_amount = 200_000_000_000_000u128; + + let penpal_local_fees: Asset = (wnd_from_parachain_pov.clone(), local_fees_amount).into(); + let ah_remote_fees: Asset = (wnd_from_parachain_pov.clone(), remote_fees_amount).into(); + let penpal_remote_fees: Asset = (wnd_from_parachain_pov.clone(), remote_fees_amount).into(); + let wnd_to_withdraw: Asset = + (wnd_from_parachain_pov.clone(), amount_of_wnd_to_transfer_to_ah).into(); + + // xcm to be executed by penpal, sent by ah + let xcm_back_on_penpal = Xcm(vec![ + RefundSurplus, + DepositAsset { assets: Wild(All), beneficiary: sender.clone().into() }, + ]); + // xcm to be executed by ah, sent by penpal + let xcm_on_ah = Xcm(vec![ + ExchangeAsset { + give: Definite((wnd_from_parachain_pov.clone(), 100_000_000_000u128).into()), + want: (usdt_asset_hub_pov.clone(), amount_of_usdt_we_want_from_exchange).into(), + maximal: false, + }, + InitiateTransfer { + destination: penpal_location_ah_pov, + remote_fees: Some(AssetTransferFilter::ReserveDeposit( + penpal_remote_fees.clone().into(), + )), + preserve_origin: false, + assets: BoundedVec::truncate_from(vec![AssetTransferFilter::ReserveDeposit(Wild( + All, + ))]), + remote_xcm: xcm_back_on_penpal, + }, + RefundSurplus, + DepositAsset { assets: Wild(All), beneficiary: sender.clone().into() }, + ]); + // xcm to be executed locally on penpal as starting point + let xcm = Xcm::<()>(vec![ + WithdrawAsset(wnd_to_withdraw.into()), + PayFees { asset: penpal_local_fees }, + InitiateTransfer { + destination: asset_hub_location_penpal_pov, + remote_fees: Some(AssetTransferFilter::ReserveWithdraw( + ah_remote_fees.clone().into(), + )), + preserve_origin: false, + assets: BoundedVec::truncate_from(vec![AssetTransferFilter::ReserveWithdraw( + Wild(All), + )]), + remote_xcm: xcm_on_ah, + }, + RefundSurplus, + DepositAsset { assets: Wild(All), beneficiary: sender.clone().into() }, + ]); + // initiate transaction + ::PolkadotXcm::execute( + sender_signed_origin, + bx!(xcm::VersionedXcm::from(xcm.into())), + Weight::MAX, + ) + .unwrap(); + + // verify expected events; + PenpalA::assert_xcm_pallet_attempted_complete(None); + + let msg_sent_id = find_xcm_sent_message_id::().expect("Missing Sent Event"); + topic_id_tracker.insert("PenpalA_sent", msg_sent_id.into()); + }); + AssetHubWestend::execute_with(|| { + type RuntimeEvent = ::RuntimeEvent; + assert_expected_events!( + AssetHubWestend, + vec![ + RuntimeEvent::MessageQueue( + pallet_message_queue::Event::Processed { success: true, .. } + ) => {}, + RuntimeEvent::AssetConversion( + pallet_asset_conversion::Event::SwapCreditExecuted { amount_out, ..} + ) => { amount_out: *amount_out == amount_of_usdt_we_want_from_exchange, }, + ] + ); + + let mq_prc_id = find_mq_processed_id::().expect("Missing Processed Event"); + topic_id_tracker.insert("AssetHubWestend_received", mq_prc_id); + let msg_sent_id = + find_xcm_sent_message_id::().expect("Missing Sent Event"); + topic_id_tracker.insert("AssetHubWestend_sent", msg_sent_id.into()); + }); + + PenpalA::execute_with(|| { + type RuntimeEvent = ::RuntimeEvent; + assert_expected_events!( + PenpalA, + vec![ + RuntimeEvent::MessageQueue( + pallet_message_queue::Event::Processed { success: true, .. } + ) => {}, + ] + ); + + let mq_prc_id = find_mq_processed_id::().expect("Missing Processed Event"); + topic_id_tracker.insert("PenpalA_received", mq_prc_id); + }); + + topic_id_tracker.assert_unique(); + + // Query final balances + let sender_usdt_on_ah_after = assets_balance_on!(AssetHubWestend, USDT_ID, &sender); + let sender_usdt_on_penpal_after = + foreign_balance_on!(PenpalA, usdt_penpal_pov.clone(), &sender); + + // Receiver's balance is increased by usdt amount we got from exchange + assert_eq!( + sender_usdt_on_penpal_after, + sender_usdt_on_penpal_before + amount_of_usdt_we_want_from_exchange + ); + // Usdt amount on senders account AH side should stay the same i.e. all usdt came from exchange + // not free balance + assert_eq!(sender_usdt_on_ah_before, sender_usdt_on_ah_after); +} diff --git a/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/src/tests/mod.rs b/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/src/tests/mod.rs index 22bfebddefee2..111c3ddf4b0cd 100644 --- a/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/src/tests/mod.rs +++ b/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/src/tests/mod.rs @@ -36,7 +36,19 @@ macro_rules! foreign_balance_on { emulated_integration_tests_common::impls::paste::paste! { <$chain>::execute_with(|| { type ForeignAssets = <$chain as [<$chain Pallet>]>::ForeignAssets; - >::balance($id, $who) + >::balance($id, $who) + }) + } + }; +} + +#[macro_export] +macro_rules! assets_balance_on { + ( $chain:ident, $id:expr, $who:expr ) => { + emulated_integration_tests_common::impls::paste::paste! { + <$chain>::execute_with(|| { + type Assets = <$chain as [<$chain Pallet>]>::Assets; + >::balance($id, $who) }) } }; diff --git a/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/src/tests/transact.rs b/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/src/tests/transact.rs index ad886dbe5e24d..6ebcb621f0687 100644 --- a/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/src/tests/transact.rs +++ b/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/src/tests/transact.rs @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use crate::{create_pool_with_wnd_on, foreign_balance_on, imports::*}; +use crate::{assets_balance_on, create_pool_with_wnd_on, foreign_balance_on, imports::*}; use frame_support::traits::tokens::fungibles::Mutate; use xcm_builder::{DescribeAllTerminal, DescribeFamily, HashedDescription}; use xcm_executor::traits::ConvertLocation; @@ -201,6 +201,437 @@ fn transact_from_para_to_para_through_asset_hub() { assert!(receiver_assets_after > receiver_assets_before); } +#[test] +fn transact_using_authorized_alias_from_para_to_asset_hub_and_back_to_para() { + let sender = PenpalASender::get(); + let sov_of_penpal_on_asset_hub = AssetHubWestend::sovereign_account_id_of( + AssetHubWestend::sibling_location_of(PenpalA::para_id()), + ); + let wnd_from_parachain_pov: Location = RelayLocation::get(); + let usdt_asset_hub_pov = + Location::new(0, [PalletInstance(ASSETS_PALLET_ID), GeneralIndex(USDT_ID.into())]); + let usdt_penpal_pov = PenpalUsdtFromAssetHub::get(); + let amount_of_wnd_to_transfer_to_ah = WESTEND_ED * 1_000_000_000u128; + let amount_of_usdt_we_want_from_exchange = 1_000_000_000u128; + let max_amount_of_wnd_we_allow_for_exchange = 1_000_000_000_000u128; + let sender_as_seen_from_ah = Location::new( + 1, + [ + Parachain(2000), + AccountId32 { + network: Some(NetworkId::ByGenesis(ROCOCO_GENESIS_HASH)), + id: sender.clone().into(), + }, + ], + ); + + let mut topic_id_tracker = TopicIdTracker::new(); + + // SA-of-Penpal-on-AHW should contain WND amount equal at least the amount that will be + // transferred-in to AH Since AH is the reserve for WND + AssetHubWestend::fund_accounts(vec![( + sov_of_penpal_on_asset_hub.clone().into(), + ASSET_HUB_WESTEND_ED + amount_of_wnd_to_transfer_to_ah, + )]); + // Give the sender enough WND + PenpalA::mint_foreign_asset( + ::RuntimeOrigin::signed(PenpalAssetOwner::get()), + wnd_from_parachain_pov.clone(), + sender.clone(), + amount_of_wnd_to_transfer_to_ah, + ); + + // We create a pool between WND and USDT in AssetHub so we can do the exchange + create_pool_with_wnd_on!( + AssetHubWestend, + usdt_asset_hub_pov.clone(), + false, + AssetHubWestendSender::get(), + 1_000_000_000_000, + 20_000_000_000 + ); + + // We add auhtorized alias on AH so sender from Penpal can AliasOrigin into itself on AH + // (instead of aliasing into Sovereign Account of sender) + AssetHubWestend::execute_with(|| { + assert_ok!(::PolkadotXcm::add_authorized_alias( + ::RuntimeOrigin::signed(sender.clone()), + Box::new(sender_as_seen_from_ah.into()), + None + )); + }); + + // Query initial balances + let sender_usdt_on_penpal_before = + foreign_balance_on!(PenpalA, usdt_penpal_pov.clone(), &sender); + let sender_usdt_on_ah_before = assets_balance_on!(AssetHubWestend, USDT_ID, &sender); + + // Encoded `swap_tokens_for_exact_tokens` call to be executed in AH + let call = ::RuntimeCall::AssetConversion( + pallet_asset_conversion::Call::swap_tokens_for_exact_tokens { + path: vec![ + Box::new(wnd_from_parachain_pov.clone()), + Box::new(usdt_asset_hub_pov.clone()), + ], + amount_out: amount_of_usdt_we_want_from_exchange, + amount_in_max: max_amount_of_wnd_we_allow_for_exchange, + send_to: sender.clone(), + keep_alive: true, + }, + ) + .encode() + .into(); + + let asset_hub_location_penpal_pov = PenpalA::sibling_location_of(AssetHubWestend::para_id()); + let penpal_location_ah_pov = AssetHubWestend::sibling_location_of(PenpalA::para_id()); + + PenpalA::execute_with(|| { + let sender_signed_origin = ::RuntimeOrigin::signed(sender.clone()); + + let local_fees_amount = 80_000_000_000_000u128; + let remote_fees_amount = 90_000_000_000_000u128; + + let penpal_local_fees: Asset = (wnd_from_parachain_pov.clone(), local_fees_amount).into(); + let ah_remote_fees: Asset = (wnd_from_parachain_pov.clone(), remote_fees_amount).into(); + let penpal_remote_fees: Asset = (wnd_from_parachain_pov.clone(), remote_fees_amount).into(); + let wnd_to_withdraw: Asset = + (wnd_from_parachain_pov.clone(), amount_of_wnd_to_transfer_to_ah).into(); + + // xcm to be executed by penpal, sent by ah + let xcm_back_on_penpal = Xcm(vec![ + RefundSurplus, + DepositAsset { assets: Wild(All), beneficiary: sender.clone().into() }, + ]); + // xcm to be executed by ah, sent by penpal + let xcm_on_ah = Xcm(vec![ + // aliasing into sender itself, as opposed to sender's sovereign account + // its possible due to add_authorized_alias above + AliasOrigin(Location::new( + 0, + [AccountId32 { network: None, id: sender.clone().into() }], + )), + DepositAsset { + assets: Definite( + (wnd_from_parachain_pov.clone(), max_amount_of_wnd_we_allow_for_exchange) + .into(), + ), + beneficiary: sender.clone().into(), + }, + Transact { origin_kind: OriginKind::SovereignAccount, call, fallback_max_weight: None }, + ExpectTransactStatus(MaybeErrorCode::Success), + WithdrawAsset( + (usdt_asset_hub_pov.clone(), amount_of_usdt_we_want_from_exchange).into(), + ), + InitiateTransfer { + destination: penpal_location_ah_pov, + remote_fees: Some(AssetTransferFilter::ReserveDeposit( + penpal_remote_fees.clone().into(), + )), + preserve_origin: false, + assets: BoundedVec::truncate_from(vec![AssetTransferFilter::ReserveDeposit(Wild( + All, + ))]), + remote_xcm: xcm_back_on_penpal, + }, + RefundSurplus, + DepositAsset { assets: Wild(All), beneficiary: sender.clone().into() }, + ]); + // xcm to be executed locally on penpal as starting point + let xcm = Xcm::<()>(vec![ + WithdrawAsset(wnd_to_withdraw.into()), + PayFees { asset: penpal_local_fees }, + InitiateTransfer { + destination: asset_hub_location_penpal_pov, + remote_fees: Some(AssetTransferFilter::ReserveWithdraw( + ah_remote_fees.clone().into(), + )), + preserve_origin: true, + assets: BoundedVec::truncate_from(vec![AssetTransferFilter::ReserveWithdraw( + Wild(All), + )]), + remote_xcm: xcm_on_ah, + }, + RefundSurplus, + DepositAsset { assets: Wild(All), beneficiary: sender.clone().into() }, + ]); + // initiate transaction + ::PolkadotXcm::execute( + sender_signed_origin, + bx!(xcm::VersionedXcm::from(xcm.into())), + Weight::MAX, + ) + .unwrap(); + + // verify expected events; + PenpalA::assert_xcm_pallet_attempted_complete(None); + + let msg_sent_id = find_xcm_sent_message_id::().expect("Missing Sent Event"); + topic_id_tracker.insert("PenpalA_sent", msg_sent_id.into()); + }); + AssetHubWestend::execute_with(|| { + type RuntimeEvent = ::RuntimeEvent; + assert_expected_events!( + AssetHubWestend, + vec![ + RuntimeEvent::MessageQueue( + pallet_message_queue::Event::Processed { success: true, .. } + ) => {}, + RuntimeEvent::AssetConversion( + pallet_asset_conversion::Event::SwapExecuted { amount_out, ..} + ) => { amount_out: *amount_out == amount_of_usdt_we_want_from_exchange, }, + ] + ); + + let mq_prc_id = find_mq_processed_id::().expect("Missing Processed Event"); + topic_id_tracker.insert("AssetHubWestend_received", mq_prc_id); + let msg_sent_id = + find_xcm_sent_message_id::().expect("Missing Sent Event"); + topic_id_tracker.insert("AssetHubWestend_sent", msg_sent_id.into()); + }); + + PenpalA::execute_with(|| { + type RuntimeEvent = ::RuntimeEvent; + assert_expected_events!( + PenpalA, + vec![ + RuntimeEvent::MessageQueue( + pallet_message_queue::Event::Processed { success: true, .. } + ) => {}, + ] + ); + + let mq_prc_id = find_mq_processed_id::().expect("Missing Processed Event"); + topic_id_tracker.insert("PenpalA_received", mq_prc_id); + }); + + topic_id_tracker.assert_unique(); + + // Query final balances + let sender_usdt_on_ah_after = assets_balance_on!(AssetHubWestend, USDT_ID, &sender); + let sender_usdt_on_penpal_after = + foreign_balance_on!(PenpalA, usdt_penpal_pov.clone(), &sender); + + // Receiver's balance is increased by usdt amount we got from exchange + assert_eq!( + sender_usdt_on_penpal_after, + sender_usdt_on_penpal_before + amount_of_usdt_we_want_from_exchange + ); + // Usdt amount on senders account AH side should stay the same i.e. all usdt came from exchange + // not free balance + assert_eq!(sender_usdt_on_ah_before, sender_usdt_on_ah_after); +} + +#[test] +fn transact_using_sov_account_from_para_to_asset_hub_and_back_to_para() { + let sender = PenpalASender::get(); + let sov_of_penpal_on_asset_hub = AssetHubWestend::sovereign_account_id_of( + AssetHubWestend::sibling_location_of(PenpalA::para_id()), + ); + let wnd_from_parachain_pov: Location = RelayLocation::get(); + let usdt_asset_hub_pov = + Location::new(0, [PalletInstance(ASSETS_PALLET_ID), GeneralIndex(USDT_ID.into())]); + let usdt_penpal_pov = PenpalUsdtFromAssetHub::get(); + let amount_of_wnd_to_transfer_to_ah = WESTEND_ED * 1_000_000_000u128; + let amount_of_usdt_we_want_from_exchange = 1_000_000_000u128; + let max_amount_of_wnd_we_allow_for_exchange = 1_000_000_000_000u128; + let sender_as_seen_from_ah = Location::new( + 1, + [ + Parachain(2000), + AccountId32 { + network: Some(NetworkId::ByGenesis(ROCOCO_GENESIS_HASH)), + id: sender.clone().into(), + }, + ], + ); + let sov_of_sender_on_asset_hub = + AssetHubWestend::sovereign_account_id_of(sender_as_seen_from_ah.clone()); + + let mut topic_id_tracker = TopicIdTracker::new(); + + // SA-of-Penpal-on-AHW should contain WND amount equal at least the amount that will be + // transferred-in to AH Since AH is the reserve for WND + AssetHubWestend::fund_accounts(vec![( + sov_of_penpal_on_asset_hub.clone().into(), + ASSET_HUB_WESTEND_ED + amount_of_wnd_to_transfer_to_ah, + )]); + // Give the sender enough WND + PenpalA::mint_foreign_asset( + ::RuntimeOrigin::signed(PenpalAssetOwner::get()), + wnd_from_parachain_pov.clone(), + sender.clone(), + amount_of_wnd_to_transfer_to_ah, + ); + + // We create a pool between WND and USDT in AssetHub so we can do the exchange + create_pool_with_wnd_on!( + AssetHubWestend, + usdt_asset_hub_pov.clone(), + false, + AssetHubWestendSender::get(), + 1_000_000_000_000, + 20_000_000_000 + ); + + // Query initial balances + let sender_usdt_on_penpal_before = + foreign_balance_on!(PenpalA, usdt_penpal_pov.clone(), &sender); + let sender_usdt_on_ah_before = + assets_balance_on!(AssetHubWestend, USDT_ID, &sov_of_sender_on_asset_hub); + + // Encoded `swap_tokens_for_exact_tokens` call to be executed in AH + let call = ::RuntimeCall::AssetConversion( + pallet_asset_conversion::Call::swap_tokens_for_exact_tokens { + path: vec![ + Box::new(wnd_from_parachain_pov.clone()), + Box::new(usdt_asset_hub_pov.clone()), + ], + amount_out: amount_of_usdt_we_want_from_exchange, + amount_in_max: max_amount_of_wnd_we_allow_for_exchange, + send_to: sov_of_sender_on_asset_hub.clone(), + keep_alive: false, + }, + ) + .encode() + .into(); + + let asset_hub_location_penpal_pov = PenpalA::sibling_location_of(AssetHubWestend::para_id()); + let penpal_location_ah_pov = AssetHubWestend::sibling_location_of(PenpalA::para_id()); + + PenpalA::execute_with(|| { + let sender_signed_origin = ::RuntimeOrigin::signed(sender.clone()); + + let local_fees_amount = 80_000_000_000_000u128; + let remote_fees_amount = 90_000_000_000_000u128; + + let penpal_local_fees: Asset = (wnd_from_parachain_pov.clone(), local_fees_amount).into(); + let ah_remote_fees: Asset = (wnd_from_parachain_pov.clone(), remote_fees_amount).into(); + let penpal_remote_fees: Asset = (wnd_from_parachain_pov.clone(), remote_fees_amount).into(); + let wnd_to_withdraw: Asset = + (wnd_from_parachain_pov.clone(), amount_of_wnd_to_transfer_to_ah).into(); + + // xcm to be executed by penpal, sent by ah + let xcm_back_on_penpal = Xcm(vec![ + RefundSurplus, + DepositAsset { assets: Wild(All), beneficiary: sender.clone().into() }, + ]); + // xcm to be executed by ah, sent by penpal + let xcm_on_ah = Xcm(vec![ + DepositAsset { + assets: Definite( + (wnd_from_parachain_pov.clone(), max_amount_of_wnd_we_allow_for_exchange) + .into(), + ), + beneficiary: sov_of_sender_on_asset_hub.clone().into(), + }, + Transact { origin_kind: OriginKind::SovereignAccount, call, fallback_max_weight: None }, + ExpectTransactStatus(MaybeErrorCode::Success), + WithdrawAsset( + (usdt_asset_hub_pov.clone(), amount_of_usdt_we_want_from_exchange).into(), + ), + InitiateTransfer { + destination: penpal_location_ah_pov, + remote_fees: Some(AssetTransferFilter::ReserveDeposit( + penpal_remote_fees.clone().into(), + )), + preserve_origin: false, + assets: BoundedVec::truncate_from(vec![AssetTransferFilter::ReserveDeposit(Wild( + All, + ))]), + remote_xcm: xcm_back_on_penpal, + }, + RefundSurplus, + DepositAsset { + assets: Wild(All), + beneficiary: sov_of_sender_on_asset_hub.clone().into(), + }, + ]); + // xcm to be executed locally on penpal as starting point + let xcm = Xcm::<()>(vec![ + WithdrawAsset(wnd_to_withdraw.into()), + PayFees { asset: penpal_local_fees }, + InitiateTransfer { + destination: asset_hub_location_penpal_pov, + remote_fees: Some(AssetTransferFilter::ReserveWithdraw( + ah_remote_fees.clone().into(), + )), + preserve_origin: true, + assets: BoundedVec::truncate_from(vec![AssetTransferFilter::ReserveWithdraw( + Wild(All), + )]), + remote_xcm: xcm_on_ah, + }, + RefundSurplus, + DepositAsset { assets: Wild(All), beneficiary: sender.clone().into() }, + ]); + // initiate transaction + ::PolkadotXcm::execute( + sender_signed_origin, + bx!(xcm::VersionedXcm::from(xcm.into())), + Weight::MAX, + ) + .unwrap(); + + // verify expected events; + PenpalA::assert_xcm_pallet_attempted_complete(None); + + let msg_sent_id = find_xcm_sent_message_id::().expect("Missing Sent Event"); + topic_id_tracker.insert("PenpalA_sent", msg_sent_id.into()); + }); + AssetHubWestend::execute_with(|| { + type RuntimeEvent = ::RuntimeEvent; + assert_expected_events!( + AssetHubWestend, + vec![ + RuntimeEvent::MessageQueue( + pallet_message_queue::Event::Processed { success: true, .. } + ) => {}, + RuntimeEvent::AssetConversion( + pallet_asset_conversion::Event::SwapExecuted { amount_out, ..} + ) => { amount_out: *amount_out == amount_of_usdt_we_want_from_exchange, }, + ] + ); + + let mq_prc_id = find_mq_processed_id::().expect("Missing Processed Event"); + topic_id_tracker.insert("AssetHubWestend_received", mq_prc_id); + let msg_sent_id = + find_xcm_sent_message_id::().expect("Missing Sent Event"); + topic_id_tracker.insert("AssetHubWestend_sent", msg_sent_id.into()); + }); + + PenpalA::execute_with(|| { + type RuntimeEvent = ::RuntimeEvent; + assert_expected_events!( + PenpalA, + vec![ + RuntimeEvent::MessageQueue( + pallet_message_queue::Event::Processed { success: true, .. } + ) => {}, + ] + ); + + let mq_prc_id = find_mq_processed_id::().expect("Missing Processed Event"); + topic_id_tracker.insert("PenpalA_received", mq_prc_id); + }); + + topic_id_tracker.assert_unique(); + + // Query final balances + let sender_usdt_on_ah_after = + assets_balance_on!(AssetHubWestend, USDT_ID, &sov_of_sender_on_asset_hub); + let sender_usdt_on_penpal_after = + foreign_balance_on!(PenpalA, usdt_penpal_pov.clone(), &sender); + + // Receiver's balance is increased by usdt amount we got from exchange + assert_eq!( + sender_usdt_on_penpal_after, + sender_usdt_on_penpal_before + amount_of_usdt_we_want_from_exchange + ); + // Usdt amount on senders account AH side should stay the same i.e. all usdt came from exchange + // not free balance + assert_eq!(sender_usdt_on_ah_before, sender_usdt_on_ah_after); +} + fn asset_hub_hop_assertions(sender_sa: AccountId) { type RuntimeEvent = ::RuntimeEvent; assert_expected_events!( diff --git a/polkadot/xcm/xcm-executor/src/lib.rs b/polkadot/xcm/xcm-executor/src/lib.rs index 6b9837d627e0f..b4efab9349a4b 100644 --- a/polkadot/xcm/xcm-executor/src/lib.rs +++ b/polkadot/xcm/xcm-executor/src/lib.rs @@ -562,6 +562,10 @@ impl XcmExecutor { // If there are any leftover `fees`, merge them with `holding`. if !self.fees.is_empty() { let leftover_fees = self.fees.saturating_take(Wild(All)); + tracing::trace!( + target: "xcm::refund_surplus", + ?leftover_fees, + ); self.holding.subsume_assets(leftover_fees); } tracing::trace!( diff --git a/prdoc/pr_9195.prdoc b/prdoc/pr_9195.prdoc new file mode 100644 index 0000000000000..582804c5dd5cf --- /dev/null +++ b/prdoc/pr_9195.prdoc @@ -0,0 +1,9 @@ +title: XCMv5 asset exchange test scenarios +doc: +- audience: Runtime Dev + description: |- + Emulated test scenarios added to cover asset exchanging via Transact or ExchangeAsset instruction using XCMv5 capabilities + +crates: +- name: staging-xcm-executor + bump: patch From b13724f71f63b330c01395e17a08b57dbce3af5d Mon Sep 17 00:00:00 2001 From: "paritytech-release-backport-bot[bot]" <191369287+paritytech-release-backport-bot[bot]@users.noreply.github.com> Date: Thu, 31 Jul 2025 14:38:03 +0000 Subject: [PATCH 048/128] [stable2506] Backport #9348 (#9351) Backport #9348 into `stable2506` from EgorPopelyaev. See the [documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md) on how to use this bot. Co-authored-by: Egor_P --- .../workflows/release-99_notif-published.yml | 21 ++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release-99_notif-published.yml b/.github/workflows/release-99_notif-published.yml index b5b2ed38e845e..f609c30a4e0d8 100644 --- a/.github/workflows/release-99_notif-published.yml +++ b/.github/workflows/release-99_notif-published.yml @@ -12,7 +12,7 @@ jobs: strategy: matrix: channel: - # Internal + # Internal - name: "RelEng: Polkadot Release Coordination" room: '!cqAmzdIcbOFwrdrubV:parity.io' pre-release: true @@ -22,7 +22,7 @@ jobs: room: '!EoIhaKfGPmFOBrNSHT:web3.foundation' pre-release: true - # Public + # Public - name: '#polkadotvalidatorlounge:web3.foundation' room: '!NZrbtteFeqYKCUGQtr:matrix.parity.io' pre-releases: false @@ -34,6 +34,20 @@ jobs: pre-releases: false steps: + - name: Checkout + uses: actions/checkout@v4 + with: + ref: ${{ github.event.release.tag_name }} + + - name: Extract node version + id: extract_version + run: | + . ./.github/scripts/common/lib.sh + + version=v$(get_polkadot_node_version_from_code) + echo "Extracted node version: $version" + echo "node_version=$version" >> $GITHUB_OUTPUT + - name: Matrix notification to ${{ matrix.channel.name }} if: github.event.release.prerelease == false || matrix.channel.pre-release uses: s3krit/matrix-message-action@70ad3fb812ee0e45ff8999d6af11cafad11a6ecf # v0.0.3 @@ -45,6 +59,7 @@ jobs: @room A new node release has been ${{github.event.action}} in **${{github.event.repository.full_name}}:**
- Release version: [${{github.event.release.tag_name}}](${{github.event.release.html_url}}) + Release version: [${{github.event.release.tag_name}}](${{github.event.release.html_url}})
+ Node version: ${{ steps.extract_version.outputs.node_version }} ----- From f15a4245e9ad7ef3f31d4daad125125bb8664726 Mon Sep 17 00:00:00 2001 From: "paritytech-release-backport-bot[bot]" <191369287+paritytech-release-backport-bot[bot]@users.noreply.github.com> Date: Thu, 31 Jul 2025 16:25:24 +0000 Subject: [PATCH 049/128] [stable2506] Backport #9250 (#9359) Backport #9250 into `stable2506` from acatangiu. See the [documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md) on how to use this bot. --------- Co-authored-by: Adrian Catangiu Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- polkadot/xcm/xcm-builder/src/universal_exports.rs | 12 ++++++++++++ prdoc/pr_9250.prdoc | 7 +++++++ 2 files changed, 19 insertions(+) create mode 100644 prdoc/pr_9250.prdoc diff --git a/polkadot/xcm/xcm-builder/src/universal_exports.rs b/polkadot/xcm/xcm-builder/src/universal_exports.rs index abdd7e956bdd3..cb80f52a00410 100644 --- a/polkadot/xcm/xcm-builder/src/universal_exports.rs +++ b/polkadot/xcm/xcm-builder/src/universal_exports.rs @@ -331,6 +331,18 @@ impl InspectMessageQueues + for UnpaidRemoteExporter +{ + fn clear_messages() {} + + /// This router needs to implement `InspectMessageQueues` but doesn't have to + /// return any messages, since it just reuses the `XcmpQueue` router. + fn get_messages() -> Vec<(VersionedLocation, Vec>)> { + Vec::new() + } +} + /// Implementation of `SendXcm` which wraps the message inside an `ExportMessage` instruction /// and sends it to a destination known to be able to handle it. /// diff --git a/prdoc/pr_9250.prdoc b/prdoc/pr_9250.prdoc new file mode 100644 index 0000000000000..49f78e46b1f1c --- /dev/null +++ b/prdoc/pr_9250.prdoc @@ -0,0 +1,7 @@ +title: implement InspectMessageQueues for UnpaidRemoteExporter +doc: +- audience: Runtime Dev + description: Add missing implementation of `InspectMessageQueues` for `UnpaidRemoteExporter` +crates: +- name: staging-xcm-builder + bump: minor From b2950c27317b58b844f545998a4ce2eff0128af9 Mon Sep 17 00:00:00 2001 From: "paritytech-release-backport-bot[bot]" <191369287+paritytech-release-backport-bot[bot]@users.noreply.github.com> Date: Thu, 31 Jul 2025 20:13:02 +0000 Subject: [PATCH 050/128] [stable2506] Backport #9281 (#9329) Backport #9281 into `stable2506` from lexnv. See the [documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md) on how to use this bot. Signed-off-by: Alexandru Vasile Co-authored-by: Alexandru Vasile <60601340+lexnv@users.noreply.github.com> Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Egor_P --- prdoc/pr_9281.prdoc | 16 ++++++++++++++++ .../client/network/src/litep2p/discovery.rs | 9 +++++++++ 2 files changed, 25 insertions(+) create mode 100644 prdoc/pr_9281.prdoc diff --git a/prdoc/pr_9281.prdoc b/prdoc/pr_9281.prdoc new file mode 100644 index 0000000000000..49e997203c915 --- /dev/null +++ b/prdoc/pr_9281.prdoc @@ -0,0 +1,16 @@ +title: 'litep2p/discovery: Ensure non-global addresses are not reported as external' +doc: +- audience: Node Dev + description: "This PR ensures that external addresses discovered by the identify\ + \ protocol are not propagated to the litep2p backend if they are not global. This\ + \ leads to a healthier DHT over time, since nodes will not advertise loopback\ + \ / non-global addresses.\n\nWe have seen various cases were loopback addresses\ + \ were reported as external:\n\n```\n2025-07-16 16:18:39.765 TRACE tokio-runtime-worker\ + \ sub-libp2p::discovery: verify new external address: /ip4/127.0.0.1/tcp/30310/p2p/12D3KooWNw19ScMjzNGLnYYLQxWcM9EK9VYPbCq241araUGgbdLM\n\ + \n2025-07-16 16:18:39.765 INFO tokio-runtime-worker sub-libp2p: \U0001F50D Discovered\ + \ new external address for our node: /ip4/127.0.0.1/tcp/30310/p2p/12D3KooWNw19ScMjzNGLnYYLQxWcM9EK9VYPbCq241araUGgbdLM\n\ + ```\n\nThis PR takes into account the network config for `allow_non_global_addresses`.\n\ + \nCloses: https://github.com/paritytech/polkadot-sdk/issues/9261\n\ncc @paritytech/networking" +crates: +- name: sc-network + bump: patch diff --git a/substrate/client/network/src/litep2p/discovery.rs b/substrate/client/network/src/litep2p/discovery.rs index a9f9db79c3933..0db4b5d623b22 100644 --- a/substrate/client/network/src/litep2p/discovery.rs +++ b/substrate/client/network/src/litep2p/discovery.rs @@ -493,6 +493,15 @@ impl Discovery { ) -> (bool, Option) { log::trace!(target: LOG_TARGET, "verify new external address: {address}"); + if !self.allow_non_global_addresses && !Discovery::can_add_to_dht(&address) { + log::trace!( + target: LOG_TARGET, + "ignoring externally reported non-global address {address} from {peer}." + ); + + return (false, None); + } + // is the address one of our known addresses if self .listen_addresses From 03e07b69039c399ddc6f5e32f9477e186d0f9779 Mon Sep 17 00:00:00 2001 From: "paritytech-release-backport-bot[bot]" <191369287+paritytech-release-backport-bot[bot]@users.noreply.github.com> Date: Fri, 1 Aug 2025 11:23:02 +0000 Subject: [PATCH 051/128] [stable2506] Backport #9355 (#9370) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Backport #9355 into `stable2506` from gui1117. See the [documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md) on how to use this bot. --------- Co-authored-by: Guillaume Thiolliere Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Bastian Köcher Co-authored-by: EgorPopelyaev --- prdoc/pr_9355.prdoc | 11 +++++++++++ substrate/utils/prometheus/Cargo.toml | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 prdoc/pr_9355.prdoc diff --git a/prdoc/pr_9355.prdoc b/prdoc/pr_9355.prdoc new file mode 100644 index 0000000000000..ed4a2086e2cca --- /dev/null +++ b/prdoc/pr_9355.prdoc @@ -0,0 +1,11 @@ +title: 'substrate-prometheus-endpoint: directly require the feature "tokio/net"' +doc: +- audience: Node Dev + description: |- + The crate `substrate-prometheus-endpoint` use tokio items given by the feature "net" but it doesn't explictly requires it in the `Cargo.toml`. It compiles on master because `hyper-util` enables the feature "tokio/net". But upgrading `hyper-util` break this indirect enabling. + + This fix the issue by directly setting "net" feature as required, as it is used. + We should also backport this ideally. It is not a breaking change given the code doesn't compile without the feature and only compiles if indirectly enabled by another crate. +crates: +- name: substrate-prometheus-endpoint + bump: minor diff --git a/substrate/utils/prometheus/Cargo.toml b/substrate/utils/prometheus/Cargo.toml index 7161388855409..3611d00c094c1 100644 --- a/substrate/utils/prometheus/Cargo.toml +++ b/substrate/utils/prometheus/Cargo.toml @@ -22,7 +22,7 @@ hyper-util = { features = ["server-auto", "server-graceful", "tokio"], workspace log = { workspace = true, default-features = true } prometheus = { workspace = true } thiserror = { workspace = true } -tokio = { features = ["parking_lot"], workspace = true, default-features = true } +tokio = { features = ["net", "parking_lot"], workspace = true, default-features = true } [dev-dependencies] hyper-util = { features = ["client-legacy", "tokio"], workspace = true, default-features = true } From ab7c86bf140f403f6ce16631b0f23e39ab445400 Mon Sep 17 00:00:00 2001 From: "paritytech-release-backport-bot[bot]" <191369287+paritytech-release-backport-bot[bot]@users.noreply.github.com> Date: Mon, 11 Aug 2025 08:45:40 +0000 Subject: [PATCH 052/128] [stable2506] Backport #9338 (#9438) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Backport #9338 into `stable2506` from michalkucharczyk. See the [documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md) on how to use this bot. Co-authored-by: Michal Kucharczyk <1728078+michalkucharczyk@users.noreply.github.com> Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Bastian Köcher --- prdoc/pr_9338.prdoc | 8 ++ .../fork_aware_txpool/fork_aware_txpool.rs | 73 +++++++--- .../src/fork_aware_txpool/view_store.rs | 36 +++-- .../client/transaction-pool/tests/fatp.rs | 135 +++++++++++++++--- .../transaction-pool/tests/fatp_common/mod.rs | 14 ++ .../transaction-pool/tests/fatp_invalid.rs | 28 +--- 6 files changed, 221 insertions(+), 73 deletions(-) create mode 100644 prdoc/pr_9338.prdoc diff --git a/prdoc/pr_9338.prdoc b/prdoc/pr_9338.prdoc new file mode 100644 index 0000000000000..53ad086b1c944 --- /dev/null +++ b/prdoc/pr_9338.prdoc @@ -0,0 +1,8 @@ +title: 'fatxpool: instant seal support' +doc: +- audience: Node Dev + description: |- + This PR introduces creation of view for known best block during instantiation of `fatxpool`. This is intended to fix an instant-seal nodes, where block building is triggered via transaction import. +crates: +- name: sc-transaction-pool + bump: patch diff --git a/substrate/client/transaction-pool/src/fork_aware_txpool/fork_aware_txpool.rs b/substrate/client/transaction-pool/src/fork_aware_txpool/fork_aware_txpool.rs index 04a6cd4365ad3..9757fc17f63fa 100644 --- a/substrate/client/transaction-pool/src/fork_aware_txpool/fork_aware_txpool.rs +++ b/substrate/client/transaction-pool/src/fork_aware_txpool/fork_aware_txpool.rs @@ -208,6 +208,23 @@ where ChainApi: graph::ChainApi + 'static, ::Hash: Unpin, { + // Injects a view for the given block to self. + // + // Helper for the pool new methods. + fn inject_initial_view(self, initial_view_hash: Block::Hash) -> Self { + if let Some(block_number) = + self.api.block_id_to_number(&BlockId::Hash(initial_view_hash)).ok().flatten() + { + let at_best = HashAndNumber { number: block_number, hash: initial_view_hash }; + let tree_route = + &TreeRoute::new(vec![at_best.clone()], 0).expect("tree route is correct; qed"); + let view = self.build_and_plug_view(None, &at_best, &tree_route); + self.view_store.insert_new_view_sync(view.into(), &tree_route); + trace!(target: LOG_TARGET, ?block_number, ?initial_view_hash, "fatp::injected initial view"); + }; + self + } + /// Create new fork aware transaction pool with provided shared instance of `ChainApi` intended /// for tests. pub fn new_test( @@ -304,7 +321,8 @@ where submit_and_watch_stats: DurationSlidingStats::new(Duration::from_secs( STAT_SLIDING_WINDOW, )), - }, + } + .inject_initial_view(best_block_hash), [combined_tasks, mempool_task], ) } @@ -461,6 +479,7 @@ where STAT_SLIDING_WINDOW, )), } + .inject_initial_view(best_block_hash) } /// Get access to the underlying api @@ -1207,7 +1226,7 @@ where } let best_view = self.view_store.find_best_view(tree_route); - let new_view = self.build_new_view(best_view, hash_and_number, tree_route).await; + let new_view = self.build_and_update_view(best_view, hash_and_number, tree_route).await; if let Some(view) = new_view { { @@ -1298,26 +1317,17 @@ where /// If `origin_view` is provided, the new view will be cloned from it. Otherwise an empty view /// will be created. /// - /// The new view will be updated with transactions from the tree_route and the mempool, all - /// required events will be triggered, it will be inserted to the view store. - /// /// This method will also update multi-view listeners with newly created view. - async fn build_new_view( + /// + /// The new view will not be inserted into the view store. + fn build_and_plug_view( &self, origin_view: Option>>, at: &HashAndNumber, tree_route: &TreeRoute, - ) -> Option>> { + ) -> View { let enter = Instant::now(); - debug!( - target: LOG_TARGET, - ?at, - origin_view_at = ?origin_view.as_ref().map(|v| v.at.clone()), - ?tree_route, - "build_new_view" - ); - - let (mut view, view_dropped_stream, view_aggregated_stream) = + let (view, view_dropped_stream, view_aggregated_stream) = if let Some(origin_view) = origin_view { let (mut view, view_dropped_stream, view_aggragated_stream) = View::new_from_other(&origin_view, at); @@ -1346,7 +1356,6 @@ where "build_new_view::clone_view" ); - let start = Instant::now(); // 1. Capture all import notification from the very beginning, so first register all //the listeners. self.import_notification_sink.add_view( @@ -1361,6 +1370,34 @@ where self.view_store .listener .add_view_aggregated_stream(view.at.hash, view_aggregated_stream.boxed()); + + view + } + + /// Builds and updates a new view. + /// + /// This functio uses [`Self::build_new_view`] to create or clone new view. + /// + /// The new view will be updated with transactions from the tree_route and the mempool, all + /// required events will be triggered, it will be inserted to the view store (respecting all + /// pre-insertion actions). + async fn build_and_update_view( + &self, + origin_view: Option>>, + at: &HashAndNumber, + tree_route: &TreeRoute, + ) -> Option>> { + let start = Instant::now(); + debug!( + target: LOG_TARGET, + ?at, + origin_view_at = ?origin_view.as_ref().map(|v| v.at.clone()), + ?tree_route, + "build_new_view" + ); + + let mut view = self.build_and_plug_view(origin_view, at, tree_route); + // sync the transactions statuses and referencing views in all the listeners with newly // cloned view. view.pool.validated_pool().retrigger_notifications(); @@ -1396,7 +1433,7 @@ where debug!( target: LOG_TARGET, - duration = ?enter.elapsed(), + duration = ?start.elapsed(), ?at, "build_new_view" ); diff --git a/substrate/client/transaction-pool/src/fork_aware_txpool/view_store.rs b/substrate/client/transaction-pool/src/fork_aware_txpool/view_store.rs index c392bd80d38d7..0034a7804d834 100644 --- a/substrate/client/transaction-pool/src/fork_aware_txpool/view_store.rs +++ b/substrate/client/transaction-pool/src/fork_aware_txpool/view_store.rs @@ -526,13 +526,7 @@ where /// Inserts new view into the view store. /// - /// All the views associated with the blocks which are on enacted path (including common - /// ancestor) will be: - /// - moved to the inactive views set (`inactive_views`), - /// - removed from the multi view listeners. - /// - /// The `most_recent_view` is updated with the reference to the newly inserted view. - /// + /// Refer to [`Self::insert_new_view_sync`] more details. /// If there are any pending tx replacments, they are applied to the new view. #[instrument(level = Level::TRACE, skip_all, target = "txpool", name = "view_store::insert_new_view")] pub(super) async fn insert_new_view( @@ -543,7 +537,29 @@ where self.apply_pending_tx_replacements(view.clone()).await; let start = Instant::now(); + self.insert_new_view_sync(view, tree_route); + debug!( + target: LOG_TARGET, + inactive_views = ?self.inactive_views.read().keys(), + duration = ?start.elapsed(), + "insert_new_view" + ); + } + + /// Inserts new view into the view store. + /// + /// All the views associated with the blocks which are on enacted path (including common + /// ancestor) will be: + /// - moved to the inactive views set (`inactive_views`), + /// - removed from the multi view listeners. + /// + /// The `most_recent_view` is updated with the reference to the newly inserted view. + pub(super) fn insert_new_view_sync( + &self, + view: Arc>, + tree_route: &TreeRoute, + ) { //note: most_recent_view must be synced with changes in in/active_views. { let mut most_recent_view_lock = self.most_recent_view.write(); @@ -561,12 +577,6 @@ where active_views.insert(view.at.hash, view.clone()); most_recent_view_lock.replace(view.clone()); }; - debug!( - target: LOG_TARGET, - inactive_views = ?self.inactive_views.read().keys(), - duration = ?start.elapsed(), - "insert_new_view" - ); } /// Returns an optional reference to the view at given hash. diff --git a/substrate/client/transaction-pool/tests/fatp.rs b/substrate/client/transaction-pool/tests/fatp.rs index 49adc9ccc9639..174b621d58240 100644 --- a/substrate/client/transaction-pool/tests/fatp.rs +++ b/substrate/client/transaction-pool/tests/fatp.rs @@ -1185,6 +1185,7 @@ fn fatp_no_view_pool_watcher_two_finalized_in_different_block() { assert_eq!( xt1_status, vec![ + TransactionStatus::Ready, TransactionStatus::InBlock((header03.hash(), 0)), TransactionStatus::Finalized((header03.hash(), 0)) ] @@ -1197,6 +1198,7 @@ fn fatp_no_view_pool_watcher_two_finalized_in_different_block() { assert_eq!( xt0_status, vec![ + TransactionStatus::Ready, TransactionStatus::InBlock((header02.hash(), 2)), TransactionStatus::Finalized((header02.hash(), 2)) ] @@ -1208,6 +1210,7 @@ fn fatp_no_view_pool_watcher_two_finalized_in_different_block() { assert_eq!( xt2_status, vec![ + TransactionStatus::Ready, TransactionStatus::InBlock((header02.hash(), 1)), TransactionStatus::Finalized((header02.hash(), 1)) ] @@ -1240,7 +1243,7 @@ fn fatp_watcher_in_block_across_many_blocks() { let _ = block_on(pool.submit_and_watch(invalid_hash(), SOURCE, xt2.clone())).unwrap(); //note 1: transaction is not submitted to views that are not at the tip of the fork assert_eq!(pool.active_views_count(), 1); - assert_eq!(pool.inactive_views_count(), 1); + assert_eq!(pool.inactive_views_count(), 2); //gensis + 01 assert_pool_status!(header02.hash(), &pool, 3, 0); let header03 = api.push_block(3, vec![xt0.clone()], true); @@ -1284,7 +1287,7 @@ fn fatp_watcher_in_block_across_many_blocks2() { let _ = block_on(pool.submit_and_watch(invalid_hash(), SOURCE, xt2.clone())).unwrap(); //note 1: transaction is not submitted to views that are not at the tip of the fork assert_eq!(pool.active_views_count(), 1); - assert_eq!(pool.inactive_views_count(), 1); + assert_eq!(pool.inactive_views_count(), 2); //genesis + 01 assert_pool_status!(header02.hash(), &pool, 3, 0); let header03 = api.push_block(3, vec![xt0.clone()], true); @@ -1457,6 +1460,7 @@ fn fatp_watcher_finalizing_forks() { assert_eq!( xt0_status, vec![ + TransactionStatus::Ready, TransactionStatus::InBlock((header01.hash(), 0)), TransactionStatus::Finalized((header01.hash(), 0)), ] @@ -1551,6 +1555,7 @@ fn fatp_watcher_best_block_after_finalized2() { assert_eq!( xt0_events, vec![ + TransactionStatus::Ready, TransactionStatus::InBlock((header01.hash(), 0)), TransactionStatus::Finalized((header01.hash(), 0)), ] @@ -1594,6 +1599,7 @@ fn fatp_watcher_switching_fork_multiple_times_works() { assert_eq!( xt0_status, vec![ + TransactionStatus::Ready, TransactionStatus::InBlock((header01a.hash(), 0)), TransactionStatus::InBlock((header01b.hash(), 0)), TransactionStatus::Finalized((header01b.hash(), 0)), @@ -1708,6 +1714,7 @@ fn fatp_watcher_delayed_finalization_does_not_retract() { assert_eq!( xt0_status, vec![ + TransactionStatus::Ready, TransactionStatus::InBlock((header02.hash(), 0)), TransactionStatus::Finalized((header02.hash(), 0)), ] @@ -2339,6 +2346,50 @@ fn fatp_ready_light_long_fork_works() { assert!(ready_iterator.next().is_none()); } +#[test] +fn fatp_ready_light_most_recent_view_long_fork_retracted_works() { + sp_tracing::try_init_simple(); + + let (pool, api, _) = pool(); + api.set_nonce(api.genesis_hash(), Bob.into(), 200); + api.set_nonce(api.genesis_hash(), Charlie.into(), 200); + api.set_nonce(api.genesis_hash(), Dave.into(), 200); + api.set_nonce(api.genesis_hash(), Eve.into(), 200); + + let genesis = api.genesis_hash(); + + let xt0 = uxt(Alice, 200); + let xt1 = uxt(Bob, 200); + let xt2 = uxt(Charlie, 200); + let xt3 = uxt(Dave, 200); + let xt4 = uxt(Eve, 200); + + let submissions = vec![pool.submit_at( + genesis, + SOURCE, + vec![xt0.clone(), xt1.clone(), xt2.clone(), xt3.clone()], + )]; + let results = block_on(futures::future::join_all(submissions)); + assert!(results.iter().all(|r| { r.is_ok() })); + + // dirty hack to remove genesis view, so we can check fallback to most-recent-view at header03b. + let header01a = api.push_block_with_parent(genesis, vec![], true); + let event = finalized_block_event(&pool, genesis, header01a.hash()); + block_on(pool.maintain(event)); + + let header02a = api.push_block_with_parent(header01a.hash(), vec![xt4.clone()], true); + let event = new_best_block_event(&pool, Some(genesis), header02a.hash()); + block_on(pool.maintain(event)); + + let header01b = api.push_block_with_parent(genesis, vec![xt0.clone()], true); + let header02b = api.push_block_with_parent(header01b.hash(), vec![xt1.clone()], true); + let header03b = api.push_block_with_parent(header02b.hash(), vec![xt2.clone()], true); + + // Returns the most recent view (`header02a`) ready transactions set. + let ready_iterator = pool.ready_at_light(header03b.hash()).now_or_never().unwrap(); + assert_eq!(ready_iterator.count(), 4); +} + #[test] fn fatp_ready_light_long_fork_retracted_works() { sp_tracing::try_init_simple(); @@ -2373,9 +2424,9 @@ fn fatp_ready_light_long_fork_retracted_works() { let header02b = api.push_block_with_parent(header01b.hash(), vec![xt1.clone()], true); let header03b = api.push_block_with_parent(header02b.hash(), vec![xt2.clone()], true); - // Returns the most recent view (`header01a`) ready transactions set. + // Returns the genesis view ready transactions set with fork txs removed. let ready_iterator = pool.ready_at_light(header03b.hash()).now_or_never().unwrap(); - assert_eq!(ready_iterator.count(), 4); + assert_eq!(ready_iterator.count(), 1); let event = new_best_block_event(&pool, Some(header01a.hash()), header01b.hash()); block_on(pool.maintain(event)); @@ -2389,7 +2440,7 @@ fn fatp_ready_light_long_fork_retracted_works() { } #[test] -fn fatp_ready_light_fallback_gets_triggered() { +fn fatp_ready_light_fallback_for_most_recent_view_gets_triggered() { sp_tracing::try_init_simple(); let (pool, api, _) = pool(); @@ -2410,8 +2461,13 @@ fn fatp_ready_light_fallback_gets_triggered() { let results = block_on(futures::future::join_all(submissions)); assert!(results.iter().all(|r| { r.is_ok() })); - let header01a = api.push_block_with_parent(genesis, vec![xt4.clone()], true); - let event = new_best_block_event(&pool, Some(genesis), header01a.hash()); + // dirty hack to remove genesis view, so we can check fallback to most-recent-view at header01b. + let header01a = api.push_block_with_parent(genesis, vec![], true); + let event = finalized_block_event(&pool, genesis, header01a.hash()); + block_on(pool.maintain(event)); + + let header02a = api.push_block_with_parent(header01a.hash(), vec![xt4.clone()], true); + let event = new_best_block_event(&pool, Some(genesis), header02a.hash()); block_on(pool.maintain(event)); let header01b = api.push_block_with_parent(genesis, vec![xt0.clone()], true); @@ -2424,7 +2480,7 @@ fn fatp_ready_light_fallback_gets_triggered() { let header02b = api.push_block_with_parent(header01b.hash(), vec![xt1.clone()], true); let header03b = api.push_block_with_parent(header02b.hash(), vec![xt2.clone()], true); - // Submit a few more txs to the pool. + // Submit a few more tx to the pool. let submissions = vec![pool.submit_at( // `at` is ignored. genesis, @@ -2437,22 +2493,63 @@ fn fatp_ready_light_fallback_gets_triggered() { // Calling `ready_at_light` now on the last block of a fork, with no block notified as best. // We should still get the ready txs from the most recent view processed by the txpool, // but now with a few more txs which were submitted previously. - let ready_iterator = pool.ready_at_light(header03b.hash()).now_or_never().unwrap(); - assert_eq!(ready_iterator.count(), 4); + assert_ready_at_light_iterator!(header03b.hash(), pool, [xt0, xt1, xt2, xt3]); +} - let event = new_best_block_event(&pool, Some(header01a.hash()), header01b.hash()); +#[test] +fn fatp_ready_light_fallback_gets_triggered() { + sp_tracing::try_init_simple(); + + let (pool, api, _) = pool(); + api.set_nonce(api.genesis_hash(), Bob.into(), 200); + api.set_nonce(api.genesis_hash(), Charlie.into(), 200); + api.set_nonce(api.genesis_hash(), Dave.into(), 200); + api.set_nonce(api.genesis_hash(), Eve.into(), 200); + + let genesis = api.genesis_hash(); + + let xt0 = uxt(Alice, 200); + let xt1 = uxt(Bob, 200); + let xt2 = uxt(Charlie, 200); + let xt3 = uxt(Dave, 200); + let xt4 = uxt(Eve, 200); + + let submissions = vec![pool.submit_at(genesis, SOURCE, vec![xt0.clone(), xt1.clone()])]; + let results = block_on(futures::future::join_all(submissions)); + assert!(results.iter().all(|r| { r.is_ok() })); + + let header01a = api.push_block_with_parent(genesis, vec![xt4.clone()], true); + let event = new_best_block_event(&pool, Some(genesis), header01a.hash()); + block_on(pool.maintain(event)); + + let header01b = api.push_block_with_parent(genesis, vec![xt0.clone()], true); + // Call `ready_at_light` at genesis direct descendent, even if not notified as best or + // finalized. Should still return ready txs based on the view for genesis, taking into account + // transactions from 01b block. + let ready_iterator = pool.ready_at_light(header01b.hash()).now_or_never().unwrap(); + assert_eq!(ready_iterator.count(), 1); + + let header02b = api.push_block_with_parent(header01b.hash(), vec![xt1.clone()], true); + let header03b = api.push_block_with_parent(header02b.hash(), vec![xt2.clone()], true); + + // Submit a few more tx to the pool. + let submissions = vec![pool.submit_at( + // `at` is ignored. + genesis, + SOURCE, + vec![xt2.clone(), xt3.clone()], + )]; + let results = block_on(futures::future::join_all(submissions)); + assert!(results.iter().all(|r| { r.is_ok() })); + + let event = finalized_block_event(&pool, header01a.hash(), header01b.hash()); block_on(pool.maintain(event)); - // Calling `ready_at_light` on the new best block (`header03b`) should consider its fork up to + // Calling `ready_at_light` on the new block (`header03b`) should consider its fork up to // the finalized block for the search of the best view, and coincidentaly, that's the only view - // of the tree route, being the view created for NBB `header03b`. The returned ready txs are the + // of the tree route, being the view created for NBB `header01b`. The returned ready txs are the // ones left in the best view's pool after prunning the txs. - let mut ready_iterator = pool.ready_at_light(header03b.hash()).now_or_never().unwrap(); - let ready01 = ready_iterator.next(); - assert_eq!(ready01.unwrap().hash, api.hash_and_length(&xt3).0); - let ready02 = ready_iterator.next(); - assert_eq!(ready02.unwrap().hash, api.hash_and_length(&xt4).0); - assert!(ready_iterator.next().is_none()); + assert_ready_at_light_iterator!(header03b.hash(), pool, [xt3, xt4]); } #[test] diff --git a/substrate/client/transaction-pool/tests/fatp_common/mod.rs b/substrate/client/transaction-pool/tests/fatp_common/mod.rs index f41c009a46712..e3b554f5efd86 100644 --- a/substrate/client/transaction-pool/tests/fatp_common/mod.rs +++ b/substrate/client/transaction-pool/tests/fatp_common/mod.rs @@ -198,6 +198,20 @@ macro_rules! assert_pool_status { } } +#[macro_export] +macro_rules! assert_ready_at_light_iterator { + ($hash:expr, $pool:expr, [$( $xt:expr ),*]) => {{ + let ready_iterator = $pool.ready_at_light($hash).now_or_never().unwrap(); + let expected = vec![ $($pool.api().hash_and_length(&$xt).0),*]; + let output: Vec<_> = ready_iterator.collect(); + tracing::debug!(target: LOG_TARGET, ?expected, "expected"); + tracing::debug!(target: LOG_TARGET, ?output, "output"); + let output = output.into_iter().map(|t|t.hash).collect::>(); + assert_eq!(expected.len(), output.len()); + assert_eq!(output,expected); + }}; +} + #[macro_export] macro_rules! assert_ready_iterator { ($hash:expr, $pool:expr, [$( $xt:expr ),*]) => {{ diff --git a/substrate/client/transaction-pool/tests/fatp_invalid.rs b/substrate/client/transaction-pool/tests/fatp_invalid.rs index 332308fa66e11..803387156ac7f 100644 --- a/substrate/client/transaction-pool/tests/fatp_invalid.rs +++ b/substrate/client/transaction-pool/tests/fatp_invalid.rs @@ -373,33 +373,15 @@ fn fatp_watcher_invalid_single_revalidation2() { let xt0 = uxt(Alice, 200); let xt0_watcher = block_on(pool.submit_and_watch(invalid_hash(), SOURCE, xt0.clone())).unwrap(); assert_eq!(block_on(pool.mempool_len()), (0, 1)); - api.add_invalid(&xt0); - - let header01 = api.push_block(1, vec![], true); - let event = new_best_block_event(&pool, None, header01.hash()); - block_on(pool.maintain(event)); - - let xt0_events = futures::executor::block_on_stream(xt0_watcher).collect::>(); - debug!(target: LOG_TARGET, ?xt0_events, "xt0_events"); - assert_eq!(xt0_events, vec![TransactionStatus::Invalid]); - assert_eq!(block_on(pool.mempool_len()), (0, 0)); -} - -#[test] -fn fatp_watcher_invalid_single_revalidation3() { - sp_tracing::try_init_simple(); - - let (pool, api, _) = pool(); - - let xt0 = uxt(Alice, 150); - let xt0_watcher = block_on(pool.submit_and_watch(invalid_hash(), SOURCE, xt0.clone())).unwrap(); - assert_eq!(block_on(pool.mempool_len()), (0, 1)); let header01 = api.push_block(1, vec![], true); let event = finalized_block_event(&pool, api.genesis_hash(), header01.hash()); block_on(pool.maintain(event)); + api.add_invalid(&xt0); - // wait 10 blocks for revalidation + // note: the tx will be revalidated in view::revalidation, not in mempool revalidation (which + // would require waiting 10 blocks). + // waiting 10 blocks is excessive, but we may want to keep it. let mut prev_header = header01; for n in 2..=11 { let header = api.push_block(n, vec![], true); @@ -410,7 +392,7 @@ fn fatp_watcher_invalid_single_revalidation3() { let xt0_events = futures::executor::block_on_stream(xt0_watcher).collect::>(); debug!(target: LOG_TARGET, ?xt0_events, "xt0_events"); - assert_eq!(xt0_events, vec![TransactionStatus::Invalid]); + assert_eq!(xt0_events, vec![TransactionStatus::Ready, TransactionStatus::Invalid]); assert_eq!(block_on(pool.mempool_len()), (0, 0)); } From 1acf051eadc64845b211629f90dd7cb5544e1241 Mon Sep 17 00:00:00 2001 From: Egor_P Date: Wed, 13 Aug 2025 15:08:13 +0200 Subject: [PATCH 053/128] [stable2506] Use stable2506 branch instead of master to check benches (#9478) This PR adjusts `cargo-check-benches` job so that it uses `stable` branch as reference instead of `master` for the benches comparison --- .github/workflows/tests-misc.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/tests-misc.yml b/.github/workflows/tests-misc.yml index 88cc25b5d3c48..7f42f2651c000 100644 --- a/.github/workflows/tests-misc.yml +++ b/.github/workflows/tests-misc.yml @@ -3,7 +3,7 @@ name: tests misc on: push: branches: - - master + - stable2506 pull_request: types: [opened, synchronize, reopened, ready_for_review] merge_group: @@ -127,7 +127,7 @@ jobs: timeout-minutes: 60 strategy: matrix: - branch: [master, current] + branch: [stable2506, current] runs-on: ${{ needs.preflight.outputs.RUNNER }} container: image: ${{ needs.preflight.outputs.IMAGE }} @@ -135,9 +135,9 @@ jobs: - name: Checkout uses: actions/checkout@v4 with: - # if branch is master, use the branch, otherwise set empty string, so it uses the current context + # if branch is stable2506, use the branch, otherwise set empty string, so it uses the current context # either PR (including forks) or merge group (main repo) - ref: ${{ matrix.branch == 'master' && matrix.branch || '' }} + ref: ${{ matrix.branch == 'stable2506' && matrix.branch || '' }} - name: script run: | @@ -166,12 +166,12 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Download artifact (master run) + - name: Download artifact (stable2506 run) uses: actions/download-artifact@v4.1.8 continue-on-error: true with: - name: cargo-check-benches-master-${{ github.sha }} - path: ./artifacts/master + name: cargo-check-benches-stable2506-${{ github.sha }} + path: ./artifacts/stable2506 - name: Download artifact (current run) uses: actions/download-artifact@v4.1.8 @@ -183,22 +183,22 @@ jobs: - name: script id: compare run: | - if [ "${{ github.ref_name }}" = "master" ]; then - echo -e "Exiting on master branch" + if [ "${{ github.ref_name }}" = "stable2506" ]; then + echo -e "Exiting on stabel branch" exit 0 fi # fail if no artifacts - if [ ! -d ./artifacts/master ] || [ ! -d ./artifacts/current ]; then + if [ ! -d ./artifacts/stable2506 ] || [ ! -d ./artifacts/current ]; then echo "No artifacts found" exit 1 fi docker run --rm \ - -v $PWD/artifacts/master:/artifacts/master \ + -v $PWD/artifacts/stable2506:/artifacts/stable2506 \ -v $PWD/artifacts/current:/artifacts/current \ paritytech/node-bench-regression-guard:latest \ - node-bench-regression-guard --reference /artifacts/master --compare-with /artifacts/current + node-bench-regression-guard --reference /artifacts/stable2506 --compare-with /artifacts/current if [ $? -ne 0 ]; then FAILED_MSG='### node-bench-regression-guard failed ❌, check the regression in *cargo-check-benches* job' From 0d40573de0c3361eb83bf7b36d33a6314db471fc Mon Sep 17 00:00:00 2001 From: "paritytech-release-backport-bot[bot]" <191369287+paritytech-release-backport-bot[bot]@users.noreply.github.com> Date: Wed, 13 Aug 2025 15:40:11 +0000 Subject: [PATCH 054/128] [stable2506] Backport #8857 (#9390) Backport #8857 into `stable2506` from ggwpez. See the [documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md) on how to use this bot. --------- Co-authored-by: Oliver Tale-Yazdi Co-authored-by: Branislav Kontur --- Cargo.lock | 6 +- Cargo.toml | 1 + prdoc/pr_8857.prdoc | 12 +++ .../utils/frame/benchmarking-cli/Cargo.toml | 3 + .../benchmarking-cli/src/pallet/command.rs | 19 ++-- .../benchmarking-cli/src/pallet/logging.rs | 89 +++++++++++++++++++ .../frame/benchmarking-cli/src/pallet/mod.rs | 11 +++ .../benchmarking-cli/src/pallet/writer.rs | 5 +- 8 files changed, 135 insertions(+), 11 deletions(-) create mode 100644 prdoc/pr_8857.prdoc create mode 100644 substrate/utils/frame/benchmarking-cli/src/pallet/logging.rs diff --git a/Cargo.lock b/Cargo.lock index ff0cba72ccbc9..f50d6765063fb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5985,9 +5985,9 @@ dependencies = [ [[package]] name = "env_filter" -version = "0.1.0" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a009aa4810eb158359dda09d0c87378e4bbb89b5a801f016885a4707ba24f7ea" +checksum = "186e05a59d4c50738528153b83b0b0194d3a29507dfec16eccd4b342903397d0" dependencies = [ "log", "regex", @@ -6582,6 +6582,7 @@ dependencies = [ "cumulus-client-parachain-inherent", "cumulus-primitives-proof-size-hostfunction", "cumulus-test-runtime", + "env_filter", "frame-benchmarking", "frame-storage-access-test-runtime", "frame-support", @@ -6620,6 +6621,7 @@ dependencies = [ "sp-io 41.0.1", "sp-keystore 0.43.0", "sp-runtime 42.0.0", + "sp-runtime-interface 30.0.0", "sp-state-machine 0.46.0", "sp-storage 22.0.0", "sp-timestamp", diff --git a/Cargo.toml b/Cargo.toml index 46b32616c91e2..5bbccd58af1b5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -783,6 +783,7 @@ either = { version = "1.8.1", default-features = false } emulated-integration-tests-common = { path = "cumulus/parachains/integration-tests/emulated/common", default-features = false } enumflags2 = { version = "0.7.11" } enumn = { version = "0.1.13" } +env_filter = { version = "0.1.3" } env_logger = { version = "0.11.2" } environmental = { version = "1.1.4", default-features = false } equivocation-detector = { path = "bridges/relays/equivocation" } diff --git a/prdoc/pr_8857.prdoc b/prdoc/pr_8857.prdoc new file mode 100644 index 0000000000000..b6f57c1cd2e8d --- /dev/null +++ b/prdoc/pr_8857.prdoc @@ -0,0 +1,12 @@ +title: "[FRAME] Custom log level for the runtime benchmarks" +doc: +- audience: Runtime Dev + description: |- + Changes: + - Add `--runtime-log` option to omni-bencher CLI + - Read env var `RUNTIME_LOG` as fallback to the `--runtime-log` option + - Set custom log level for runtime benchmarks that can be different form CLI level + - Fix issue where old runtimes have a space in the pallet or instance name from breaking change in `quote` macro +crates: +- name: frame-benchmarking-cli + bump: minor diff --git a/substrate/utils/frame/benchmarking-cli/Cargo.toml b/substrate/utils/frame/benchmarking-cli/Cargo.toml index eee4931091c7e..0301089e9449e 100644 --- a/substrate/utils/frame/benchmarking-cli/Cargo.toml +++ b/substrate/utils/frame/benchmarking-cli/Cargo.toml @@ -26,6 +26,7 @@ cumulus-client-parachain-inherent.default-features = true cumulus-client-parachain-inherent.workspace = true cumulus-primitives-proof-size-hostfunction.default-features = true cumulus-primitives-proof-size-hostfunction.workspace = true +env_filter = { workspace = true } frame-benchmarking.default-features = true frame-benchmarking.workspace = true frame-storage-access-test-runtime.default-features = true @@ -86,6 +87,8 @@ sp-io.default-features = true sp-io.workspace = true sp-keystore.default-features = true sp-keystore.workspace = true +sp-runtime-interface.default-features = true +sp-runtime-interface.workspace = true sp-runtime.default-features = true sp-runtime.workspace = true sp-state-machine.default-features = true diff --git a/substrate/utils/frame/benchmarking-cli/src/pallet/command.rs b/substrate/utils/frame/benchmarking-cli/src/pallet/command.rs index 50d7432a634d6..a0327ba69402e 100644 --- a/substrate/utils/frame/benchmarking-cli/src/pallet/command.rs +++ b/substrate/utils/frame/benchmarking-cli/src/pallet/command.rs @@ -17,7 +17,7 @@ use super::{ types::{ComponentRange, ComponentRangeMap}, - writer, ListOutput, PalletCmd, + writer, ListOutput, PalletCmd, LOG_TARGET, }; use crate::{ pallet::{types::FetchedCode, GenesisBuilderPolicy}, @@ -50,7 +50,7 @@ use sp_keystore::{testing::MemoryKeystore, KeystoreExt}; use sp_runtime::traits::Hash; use sp_state_machine::StateMachine; use sp_trie::{proof_size_extension::ProofSizeExt, recorder::Recorder}; -use sp_wasm_interface::HostFunctions; +use sp_wasm_interface::{ExtendedHostFunctions, HostFunctions}; use std::{ borrow::Cow, collections::{BTreeMap, BTreeSet, HashMap}, @@ -60,11 +60,13 @@ use std::{ time, }; -/// Logging target -const LOG_TARGET: &'static str = "polkadot_sdk_frame::benchmark::pallet"; - -type SubstrateAndExtraHF = - (sp_io::SubstrateHostFunctions, frame_benchmarking::benchmarking::HostFunctions, T); +type SubstrateAndExtraHF = ( + ExtendedHostFunctions< + (sp_io::SubstrateHostFunctions, frame_benchmarking::benchmarking::HostFunctions), + super::logging::logging::HostFunctions, + >, + T, +); /// How the PoV size of a storage item should be estimated. #[derive(clap::ValueEnum, Debug, Eq, PartialEq, Clone, Copy)] pub enum PovEstimationMode { @@ -252,6 +254,7 @@ impl PalletCmd { }; return self.output_from_results(&batches) } + super::logging::init(self.runtime_log.clone()); let state_handler = self.state_handler_from_cli::>(chain_spec)?; @@ -715,7 +718,7 @@ impl PalletCmd { state: &'a BenchmarkingState, ) -> Result, H>> { if let Some(runtime) = self.runtime.as_ref() { - log::info!(target: LOG_TARGET, "Loading WASM from file"); + log::debug!(target: LOG_TARGET, "Loading WASM from file {}", runtime.display()); let code = fs::read(runtime).map_err(|e| { format!( "Could not load runtime file from path: {}, error: {}", diff --git a/substrate/utils/frame/benchmarking-cli/src/pallet/logging.rs b/substrate/utils/frame/benchmarking-cli/src/pallet/logging.rs new file mode 100644 index 0000000000000..f6a3c82d49dbb --- /dev/null +++ b/substrate/utils/frame/benchmarking-cli/src/pallet/logging.rs @@ -0,0 +1,89 @@ +// This file is part of Substrate. + +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +use super::LOG_TARGET; +use sp_core::{LogLevelFilter, RuntimeInterfaceLogLevel}; +use sp_runtime_interface::{ + pass_by::{PassAs, PassFatPointerAndRead, ReturnAs}, + runtime_interface, +}; +use std::cell::OnceCell; + +thread_local! { + /// Log level filter that the runtime will use. + /// + /// Must be initialized by the host before invoking the runtime executor. You may use `init` for + /// this or set it manually. The that can be set are either levels directly or filter like + // `warn,runtime=info`. + pub static RUNTIME_LOG: OnceCell = OnceCell::new(); +} + +/// Init runtime logger with the following priority (high to low): +/// - CLI argument +/// - Environment variable +/// - Default logger settings +pub fn init(arg: Option) { + let filter_str = arg.unwrap_or_else(|| { + if let Ok(env) = std::env::var("RUNTIME_LOG") { + env + } else { + log::max_level().to_string() + } + }); + + let filter = env_filter::Builder::new() + .try_parse(&filter_str) + .expect("Invalid runtime log filter") + .build(); + + RUNTIME_LOG.with(|cell| { + cell.set(filter).expect("Can be set by host"); + log::info!(target: LOG_TARGET, "Initialized runtime log filter to '{}'", filter_str); + }); +} + +/// Alternative implementation to `sp_runtime_interface::logging::HostFunctions` for benchmarking. +#[runtime_interface] +pub trait Logging { + #[allow(dead_code)] + fn log( + level: PassAs, + target: PassFatPointerAndRead<&str>, + message: PassFatPointerAndRead<&[u8]>, + ) { + let Ok(message) = core::str::from_utf8(message) else { + log::error!(target: LOG_TARGET, "Runtime tried to log invalid UTF-8 data"); + return; + }; + + let level = log::Level::from(level); + let metadata = log::MetadataBuilder::new().level(level).target(target).build(); + + if RUNTIME_LOG.with(|filter| filter.get().expect("Must be set by host").enabled(&metadata)) + { + log::log!(target: target, level, "{}", message); + } + } + + #[allow(dead_code)] + fn max_level() -> ReturnAs { + RUNTIME_LOG + // .filter() gives us the max level of this filter + .with(|filter| filter.get().expect("Must be set by host").filter()) + .into() + } +} diff --git a/substrate/utils/frame/benchmarking-cli/src/pallet/mod.rs b/substrate/utils/frame/benchmarking-cli/src/pallet/mod.rs index 5cb353059988c..7ac5c4436837a 100644 --- a/substrate/utils/frame/benchmarking-cli/src/pallet/mod.rs +++ b/substrate/utils/frame/benchmarking-cli/src/pallet/mod.rs @@ -16,6 +16,7 @@ // limitations under the License. mod command; +mod logging; mod types; mod writer; @@ -28,6 +29,9 @@ use sc_cli::{ }; use std::{fmt::Debug, path::PathBuf}; +/// Logging target +const LOG_TARGET: &'static str = "frame::benchmark::pallet"; + // Add a more relaxed parsing for pallet names by allowing pallet directory names with `-` to be // used like crate names with `_` fn parse_pallet_name(pallet: &str) -> std::result::Result { @@ -187,6 +191,13 @@ pub struct PalletCmd { #[arg(long, conflicts_with = "chain", required_if_eq("genesis_builder", "runtime"))] pub runtime: Option, + /// Set the runtime log level. + /// + /// This will overwrite the `RUNTIME_LOG` environment variable. If neither is set, the CLI + /// default set by `RUST_LOG` setting is used. + #[arg(long)] + pub runtime_log: Option, + /// Do not fail if there are unknown but also unused host functions in the runtime. #[arg(long)] pub allow_missing_host_functions: bool, diff --git a/substrate/utils/frame/benchmarking-cli/src/pallet/writer.rs b/substrate/utils/frame/benchmarking-cli/src/pallet/writer.rs index 28918dd4e6a39..e9312023611b9 100644 --- a/substrate/utils/frame/benchmarking-cli/src/pallet/writer.rs +++ b/substrate/utils/frame/benchmarking-cli/src/pallet/writer.rs @@ -467,7 +467,10 @@ pub(crate) fn write_results( file_name = format!("{}_{}", file_name, instance.to_snake_case()); } // "mod::pallet_name.rs" becomes "mod_pallet_name.rs". - file_path.push(file_name.replace("::", "_")); + file_name = file_name.replace("::", "_"); + // Some old runtimes have a bug with the pallet and instance name containing a space + file_name = file_name.replace(" ", ""); + file_path.push(file_name); file_path.set_extension("rs"); } From 15a0c8b583d7d1d79b2fe69c7b7c90bbfba80ba6 Mon Sep 17 00:00:00 2001 From: "paritytech-release-backport-bot[bot]" <191369287+paritytech-release-backport-bot[bot]@users.noreply.github.com> Date: Wed, 13 Aug 2025 17:37:01 +0000 Subject: [PATCH 055/128] [stable2506] Backport #8838 (#9439) Backport #8838 into `stable2506` from michalkucharczyk. See the [documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md) on how to use this bot. --------- Co-authored-by: Michal Kucharczyk <1728078+michalkucharczyk@users.noreply.github.com> Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Egor_P --- prdoc/pr_8838.prdoc | 7 +++++++ substrate/client/cli/src/params/transaction_pool_params.rs | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 prdoc/pr_8838.prdoc diff --git a/prdoc/pr_8838.prdoc b/prdoc/pr_8838.prdoc new file mode 100644 index 0000000000000..9f709e1fd7591 --- /dev/null +++ b/prdoc/pr_8838.prdoc @@ -0,0 +1,7 @@ +title: '`fatxpool`: fork aware transaction pool is now default' +doc: +- audience: Node Operator + description: This PR changes the default transaction pool to the fork aware implementation. The old implementation can be still used with `--pool-type=single-state` command line argument. +crates: +- name: sc-cli + bump: minor diff --git a/substrate/client/cli/src/params/transaction_pool_params.rs b/substrate/client/cli/src/params/transaction_pool_params.rs index 9cf738f58b6b9..b4dc17f13b0dc 100644 --- a/substrate/client/cli/src/params/transaction_pool_params.rs +++ b/substrate/client/cli/src/params/transaction_pool_params.rs @@ -57,7 +57,7 @@ pub struct TransactionPoolParams { pub tx_ban_seconds: Option, /// The type of transaction pool to be instantiated. - #[arg(long, value_enum, default_value_t = TransactionPoolType::SingleState)] + #[arg(long, value_enum, default_value_t = TransactionPoolType::ForkAware)] pub pool_type: TransactionPoolType, } From 411c50236beef7262015aee2f0cabc490b942e3a Mon Sep 17 00:00:00 2001 From: "paritytech-release-backport-bot[bot]" <191369287+paritytech-release-backport-bot[bot]@users.noreply.github.com> Date: Wed, 13 Aug 2025 19:52:20 +0000 Subject: [PATCH 056/128] [stable2506] Backport #9445 (#9449) Backport #9445 into `stable2506` from acatangiu. See the [documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md) on how to use this bot. Signed-off-by: Adrian Catangiu Co-authored-by: Adrian Catangiu Co-authored-by: Karol Kokoszka Co-authored-by: Egor_P --- polkadot/xcm/pallet-xcm/src/benchmarking.rs | 57 +++++++++++++++++---- prdoc/pr_9445.prdoc | 10 ++++ 2 files changed, 58 insertions(+), 9 deletions(-) create mode 100644 prdoc/pr_9445.prdoc diff --git a/polkadot/xcm/pallet-xcm/src/benchmarking.rs b/polkadot/xcm/pallet-xcm/src/benchmarking.rs index e3a3b610ac032..28acdc6c78e60 100644 --- a/polkadot/xcm/pallet-xcm/src/benchmarking.rs +++ b/polkadot/xcm/pallet-xcm/src/benchmarking.rs @@ -603,11 +603,18 @@ mod benchmarks { let origin = RawOrigin::Signed(who.clone()); let origin_location: VersionedLocation = T::ExecuteXcmOrigin::try_origin(origin.clone().into()) - .map_err(|_| BenchmarkError::Override(BenchmarkResult::from_weight(Weight::MAX)))? + .map_err(|_| { + tracing::error!( + target: "xcm::benchmarking::pallet_xcm::add_authorized_alias", + ?origin, + "try_origin failed", + ); + BenchmarkError::Override(BenchmarkResult::from_weight(Weight::MAX)) + })? .into(); // Give some multiple of ED - let balance = T::ExistentialDeposit::get() * 1000u32.into(); + let balance = T::ExistentialDeposit::get() * 1000000u32.into(); let _ = as frame_support::traits::Currency<_>>::make_free_balance_be(&who, balance); @@ -620,8 +627,17 @@ mod benchmarks { let aliaser = OriginAliaser { location: alias, expiry: None }; existing_aliases.try_push(aliaser).unwrap() } - let ticket = TicketOf::::new(&who, aliasers_footprint(existing_aliases.len())) - .map_err(|_| BenchmarkError::Override(BenchmarkResult::from_weight(Weight::MAX)))?; + let footprint = aliasers_footprint(existing_aliases.len()); + let ticket = TicketOf::::new(&who, footprint).map_err(|e| { + tracing::error!( + target: "xcm::benchmarking::pallet_xcm::add_authorized_alias", + ?who, + ?footprint, + error=?e, + "could not create ticket", + ); + BenchmarkError::Override(BenchmarkResult::from_weight(Weight::MAX)) + })?; let entry = AuthorizedAliasesEntry { aliasers: existing_aliases, ticket }; AuthorizedAliases::::insert(&origin_location, entry); @@ -642,17 +658,31 @@ mod benchmarks { let origin = RawOrigin::Signed(who.clone()); let error = BenchmarkError::Override(BenchmarkResult::from_weight(Weight::MAX)); let origin_location = - T::ExecuteXcmOrigin::try_origin(origin.clone().into()).map_err(|_| error.clone())?; + T::ExecuteXcmOrigin::try_origin(origin.clone().into()).map_err(|_| { + tracing::error!( + target: "xcm::benchmarking::pallet_xcm::remove_authorized_alias", + ?origin, + "try_origin failed", + ); + error.clone() + })?; // remove `network` from inner `AccountId32` for easier matching of automatic AccountId -> // Location conversions. let origin_location: VersionedLocation = match origin_location.unpack() { (0, [AccountId32 { network: _, id }]) => Location::new(0, [AccountId32 { network: None, id: *id }]).into(), - _ => return Err(error.clone()), + _ => { + tracing::error!( + target: "xcm::benchmarking::pallet_xcm::remove_authorized_alias", + ?origin_location, + "unexpected origin failed", + ); + return Err(error.clone()) + }, }; // Give some multiple of ED - let balance = T::ExistentialDeposit::get() * 1000u32.into(); + let balance = T::ExistentialDeposit::get() * 1000000u32.into(); let _ = as frame_support::traits::Currency<_>>::make_free_balance_be(&who, balance); @@ -665,8 +695,17 @@ mod benchmarks { let aliaser = OriginAliaser { location: alias, expiry: None }; existing_aliases.try_push(aliaser).unwrap() } - let ticket = TicketOf::::new(&who, aliasers_footprint(existing_aliases.len())) - .map_err(|_| error)?; + let footprint = aliasers_footprint(existing_aliases.len()); + let ticket = TicketOf::::new(&who, footprint).map_err(|e| { + tracing::error!( + target: "xcm::benchmarking::pallet_xcm::remove_authorized_alias", + ?who, + ?footprint, + error=?e, + "could not create ticket", + ); + error + })?; let entry = AuthorizedAliasesEntry { aliasers: existing_aliases, ticket }; AuthorizedAliases::::insert(&origin_location, entry); diff --git a/prdoc/pr_9445.prdoc b/prdoc/pr_9445.prdoc new file mode 100644 index 0000000000000..a9ec7fb419b70 --- /dev/null +++ b/prdoc/pr_9445.prdoc @@ -0,0 +1,10 @@ +title: "pallet-xcm: fix authorized_alias benchmarks" + +doc: + - audience: Runtime Dev + description: |- + Depending on runtime configuration of ED and storage deposits, the old benchmark code did not set up enough funds to cover authorized aliases storage deposits. Fix it by adding more funds as part of benchmark setup. + +crates: +- name: pallet-xcm + bump: patch From 723158048d4deef06635cfaecc639d55a49f4851 Mon Sep 17 00:00:00 2001 From: "paritytech-release-backport-bot[bot]" <191369287+paritytech-release-backport-bot[bot]@users.noreply.github.com> Date: Wed, 13 Aug 2025 21:48:36 +0000 Subject: [PATCH 057/128] [stable2506] Backport #9189 (#9464) Backport #9189 into `stable2506` from michalkucharczyk. See the [documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md) on how to use this bot. --------- Co-authored-by: Michal Kucharczyk <1728078+michalkucharczyk@users.noreply.github.com> Co-authored-by: Egor_P --- prdoc/pr_9189.prdoc | 8 ++ .../fork_aware_txpool/fork_aware_txpool.rs | 70 ++++++--- .../src/fork_aware_txpool/tx_mem_pool.rs | 135 +++++++++++------- .../client/transaction-pool/tests/fatp.rs | 87 +++++++++++ 4 files changed, 232 insertions(+), 68 deletions(-) create mode 100644 prdoc/pr_9189.prdoc diff --git a/prdoc/pr_9189.prdoc b/prdoc/pr_9189.prdoc new file mode 100644 index 0000000000000..79d4e07f838c6 --- /dev/null +++ b/prdoc/pr_9189.prdoc @@ -0,0 +1,8 @@ +title: '`fatxpool`: avoid premature revalidation of transactions' +doc: +- audience: Node Dev + description: |- + After this PR transactions will be revalidated in mempool on finalized blocks only if height of finalized block is greater then the height of the block at which transactions was originally submitted. +crates: +- name: sc-transaction-pool + bump: minor diff --git a/substrate/client/transaction-pool/src/fork_aware_txpool/fork_aware_txpool.rs b/substrate/client/transaction-pool/src/fork_aware_txpool/fork_aware_txpool.rs index 9757fc17f63fa..35d0a878d030c 100644 --- a/substrate/client/transaction-pool/src/fork_aware_txpool/fork_aware_txpool.rs +++ b/substrate/client/transaction-pool/src/fork_aware_txpool/fork_aware_txpool.rs @@ -737,10 +737,20 @@ where ) -> Result>>, ChainApi::Error> { let xt = Arc::from(xt); - let insertion = match self.mempool.push_watched(source, xt.clone()).await { + let at_number = self + .api + .block_id_to_number(&BlockId::Hash(at)) + .ok() + .flatten() + .unwrap_or_default() + .into() + .as_u64(); + + let insertion = match self.mempool.push_watched(source, at_number, xt.clone()).await { Ok(result) => result, Err(TxPoolApiError::ImmediatelyDropped) => - self.attempt_transaction_replacement(source, true, xt.clone()).await?, + self.attempt_transaction_replacement(source, at_number, true, xt.clone()) + .await?, Err(e) => return Err(e.into()), }; @@ -764,9 +774,18 @@ where /// Refer to [`Self::submit_at`] async fn submit_at_inner( &self, + at: Block::Hash, source: TransactionSource, xts: Vec>, ) -> Result, ChainApi::Error>>, ChainApi::Error> { + let at_number = self + .api + .block_id_to_number(&BlockId::Hash(at)) + .ok() + .flatten() + .unwrap_or_default() + .into() + .as_u64(); let view_store = self.view_store.clone(); trace!( target: LOG_TARGET, @@ -776,7 +795,7 @@ where ); log_xt_trace!(target: LOG_TARGET, xts.iter().map(|xt| self.tx_hash(xt)), "fatp::submit_at"); let xts = xts.into_iter().map(Arc::from).collect::>(); - let mempool_results = self.mempool.extend_unwatched(source, &xts).await; + let mempool_results = self.mempool.extend_unwatched(source, at_number, &xts).await; if view_store.is_empty() { return Ok(mempool_results @@ -792,7 +811,7 @@ where .map(|(result, xt)| async move { match result { Err(TxPoolApiError::ImmediatelyDropped) => - self.attempt_transaction_replacement(source, false, xt).await, + self.attempt_transaction_replacement(source, at_number, false, xt).await, _ => result, } }) @@ -940,7 +959,7 @@ where /// are reduced to single result. Refer to `reduce_multiview_result` for more details. async fn submit_at( &self, - _: ::Hash, + at: ::Hash, source: TransactionSource, xts: Vec>, ) -> Result, Self::Error>>, Self::Error> { @@ -952,9 +971,7 @@ where "fatp::submit_at" ); log_xt_trace!(target: LOG_TARGET, xts.iter().map(|xt| self.tx_hash(xt)), "fatp::submit_at"); - - let result = self.submit_at_inner(source, xts).await; - + let result = self.submit_at_inner(at, source, xts).await; insert_and_log_throttled!( Level::DEBUG, target:LOG_TARGET_STAT, @@ -1148,7 +1165,7 @@ where fn submit_local( &self, - _at: Block::Hash, + at: Block::Hash, xt: sc_transaction_pool_api::LocalTransactionFor, ) -> Result { trace!( @@ -1157,12 +1174,20 @@ where "fatp::submit_local" ); let xt = Arc::from(xt); + let at_number = self + .api + .block_id_to_number(&BlockId::Hash(at)) + .ok() + .flatten() + .unwrap_or_default() + .into() + .as_u64(); // note: would be nice to get rid of sync methods one day. See: #8912 let result = self .mempool .clone() - .extend_unwatched_sync(TransactionSource::Local, vec![xt.clone()]) + .extend_unwatched_sync(TransactionSource::Local, at_number, vec![xt.clone()]) .remove(0); let insertion = match result { @@ -1847,6 +1872,7 @@ where async fn attempt_transaction_replacement( &self, source: TransactionSource, + at_number: u64, watched: bool, xt: ExtrinsicFor, ) -> Result>, TxPoolApiError> { @@ -1874,8 +1900,10 @@ where return Err(TxPoolApiError::ImmediatelyDropped) }; - let insertion_info = - self.mempool.try_insert_with_replacement(xt, priority, source, watched).await?; + let insertion_info = self + .mempool + .try_insert_with_replacement(xt, priority, source, at_number, watched) + .await?; self.post_attempt_transaction_replacement(xt_hash, insertion_info) } @@ -1886,18 +1914,17 @@ where watched: bool, xt: ExtrinsicFor, ) -> Result>, TxPoolApiError> { - let at = self + let HashAndNumber { number: at_number, hash: at_hash } = self .view_store .most_recent_view .read() .as_ref() .ok_or(TxPoolApiError::ImmediatelyDropped)? - .at - .hash; + .at; let ValidTransaction { priority, .. } = self .api - .validate_transaction_blocking(at, TransactionSource::Local, Arc::from(xt.clone())) + .validate_transaction_blocking(at_hash, TransactionSource::Local, Arc::from(xt.clone())) .map_err(|_| TxPoolApiError::ImmediatelyDropped)? .map_err(|e| match e { TransactionValidityError::Invalid(i) => TxPoolApiError::InvalidTransaction(i), @@ -1905,10 +1932,13 @@ where })?; let xt_hash = self.hash_of(&xt); - let insertion_info = self - .mempool - .clone() - .try_insert_with_replacement_sync(xt, priority, source, watched)?; + let insertion_info = self.mempool.clone().try_insert_with_replacement_sync( + xt, + priority, + source, + at_number.into().as_u64(), + watched, + )?; self.post_attempt_transaction_replacement(xt_hash, insertion_info) } diff --git a/substrate/client/transaction-pool/src/fork_aware_txpool/tx_mem_pool.rs b/substrate/client/transaction-pool/src/fork_aware_txpool/tx_mem_pool.rs index 0c9273256b045..bc7c73b4c73e9 100644 --- a/substrate/client/transaction-pool/src/fork_aware_txpool/tx_mem_pool.rs +++ b/substrate/client/transaction-pool/src/fork_aware_txpool/tx_mem_pool.rs @@ -115,13 +115,23 @@ where } /// Creates a new instance of wrapper for unwatched transaction. - fn new_unwatched(source: TransactionSource, tx: ExtrinsicFor, bytes: usize) -> Self { - Self::new(false, source, tx, bytes) + fn new_unwatched( + source: TransactionSource, + tx: ExtrinsicFor, + bytes: usize, + validated_at: u64, + ) -> Self { + Self::new(false, source, tx, bytes, validated_at) } /// Creates a new instance of wrapper for watched transaction. - fn new_watched(source: TransactionSource, tx: ExtrinsicFor, bytes: usize) -> Self { - Self::new(true, source, tx, bytes) + fn new_watched( + source: TransactionSource, + tx: ExtrinsicFor, + bytes: usize, + validated_at: u64, + ) -> Self { + Self::new(true, source, tx, bytes, validated_at) } /// Creates a new instance of wrapper for a transaction with no priority. @@ -130,8 +140,9 @@ where source: TransactionSource, tx: ExtrinsicFor, bytes: usize, + validated_at: u64, ) -> Self { - Self::new_with_optional_priority(watched, source, tx, bytes, None) + Self::new_with_optional_priority(watched, source, tx, bytes, None, validated_at) } /// Creates a new instance of wrapper for a transaction with given priority. @@ -141,8 +152,9 @@ where tx: ExtrinsicFor, bytes: usize, priority: TransactionPriority, + validated_at: u64, ) -> Self { - Self::new_with_optional_priority(watched, source, tx, bytes, Some(priority)) + Self::new_with_optional_priority(watched, source, tx, bytes, Some(priority), validated_at) } /// Creates a new instance of wrapper for a transaction with optional priority. @@ -152,12 +164,13 @@ where tx: ExtrinsicFor, bytes: usize, priority: Option, + validated_at: u64, ) -> Self { Self { watched, tx, source: TimedTransactionSource::from_transaction_source(source, true), - validated_at: AtomicU64::new(0), + validated_at: AtomicU64::new(validated_at), bytes, priority: priority.into(), } @@ -468,10 +481,12 @@ where new_tx: ExtrinsicFor, priority: TransactionPriority, source: TransactionSource, + validated_at: u64, watched: bool, ) -> Result>, sc_transaction_pool_api::error::Error> { let (hash, length) = self.api.hash_and_length(&new_tx); - let new_tx = TxInMemPool::new_with_priority(watched, source, new_tx, length, priority); + let new_tx = + TxInMemPool::new_with_priority(watched, source, new_tx, length, priority, validated_at); if new_tx.bytes > self.max_transactions_total_bytes { return Err(sc_transaction_pool_api::error::Error::ImmediatelyDropped); } @@ -508,6 +523,7 @@ where pub(super) async fn extend_unwatched( &self, source: TransactionSource, + validated_at: u64, xts: &[ExtrinsicFor], ) -> Vec>, sc_transaction_pool_api::error::Error>> { @@ -516,7 +532,8 @@ where let xt = xt.clone(); async move { let (hash, length) = api.hash_and_length(&xt); - self.try_insert(hash, TxInMemPool::new_unwatched(source, xt, length)).await + self.try_insert(hash, TxInMemPool::new_unwatched(source, xt, length, validated_at)) + .await } }); @@ -528,10 +545,11 @@ where pub(super) async fn push_watched( &self, source: TransactionSource, + validated_at: u64, xt: ExtrinsicFor, ) -> Result>, sc_transaction_pool_api::error::Error> { let (hash, length) = self.api.hash_and_length(&xt); - self.try_insert(hash, TxInMemPool::new_watched(source, xt.clone(), length)) + self.try_insert(hash, TxInMemPool::new_watched(source, xt.clone(), length, validated_at)) .await } @@ -574,7 +592,7 @@ where ); let start = Instant::now(); - let (count, input) = { + let (total_count, to_be_validated) = { ( self.transactions.len(), self.with_transactions(|iter| { @@ -593,7 +611,7 @@ where ) }; - let validations_futures = input.into_iter().map(|(xt_hash, xt)| { + let validations_futures = to_be_validated.into_iter().map(|(xt_hash, xt)| { self.api .validate_transaction( finalized_block.hash, @@ -608,7 +626,7 @@ where }) }); let validation_results = futures::future::join_all(validations_futures).await; - let input_len = validation_results.len(); + let validated_count = validation_results.len(); let duration = start.elapsed(); @@ -634,8 +652,8 @@ where debug!( target: LOG_TARGET, ?finalized_block, - input_len, - count, + validated_count, + total_count, invalid_hashes = invalid_hashes.len(), ?duration, "mempool::revalidate_inner" @@ -719,8 +737,7 @@ where ); } - /// Updates the priority of transaction stored in mempool using provided view_store submission - /// outcome. + /// Updates the priority of transaction stored in mempool using provided priority. pub(super) async fn update_transaction_priority( &self, hash: ExtrinsicHash, @@ -768,6 +785,7 @@ where ExtendUnwatched( Arc>, TransactionSource, + u64, Vec>, SyncBridgeSender>, ), @@ -782,6 +800,7 @@ where ExtrinsicFor, TransactionPriority, TransactionSource, + u64, bool, SyncBridgeSender>, ), @@ -803,10 +822,11 @@ where fn extend_unwatched( mempool: Arc>, source: TransactionSource, + validated_at: u64, xts: Vec>, ) -> (SyncBridgeReceiver>, Self) { let (tx, rx) = sync_bridge_channel(); - (rx, Self::ExtendUnwatched(mempool, source, xts, tx)) + (rx, Self::ExtendUnwatched(mempool, source, validated_at, xts, tx)) } fn update_transaction_priority( @@ -823,10 +843,22 @@ where new_tx: ExtrinsicFor, priority: TransactionPriority, source: TransactionSource, + validated_at: u64, watched: bool, ) -> (SyncBridgeReceiver>, Self) { let (tx, rx) = sync_bridge_channel(); - (rx, Self::TryInsertWithReplacement(mempool, new_tx, priority, source, watched, tx)) + ( + rx, + Self::TryInsertWithReplacement( + mempool, + new_tx, + priority, + source, + validated_at, + watched, + tx, + ), + ) } } @@ -850,8 +882,8 @@ where debug!(target: LOG_TARGET, ?error, "RemoveTransaction: sending response failed"); } }, - TxMemPoolSyncRequest::ExtendUnwatched(mempool, source, txs, tx) => { - let result = mempool.extend_unwatched(source, &txs).await; + TxMemPoolSyncRequest::ExtendUnwatched(mempool, source, validated_at, txs, tx) => { + let result = mempool.extend_unwatched(source, validated_at, &txs).await; if let Err(error) = tx.send(result) { debug!(target: LOG_TARGET, ?error, "ExtendUnwatched: sending response failed"); } @@ -867,11 +899,13 @@ where new_tx, priority, source, + validated_at, watched, tx, ) => { - let result = - mempool.try_insert_with_replacement(new_tx, priority, source, watched).await; + let result = mempool + .try_insert_with_replacement(new_tx, priority, source, validated_at, watched) + .await; if let Err(error) = tx.send(result) { debug!(target: LOG_TARGET, ?error, "TryInsertWithReplacementSync: sending response failed"); } @@ -884,6 +918,7 @@ where new_tx: ExtrinsicFor, priority: TransactionPriority, source: TransactionSource, + validated_at: u64, watched: bool, ) -> Result>, sc_transaction_pool_api::error::Error> { let (response, request) = TxMemPoolSyncRequest::try_insert_with_replacement( @@ -891,6 +926,7 @@ where new_tx, priority, source, + validated_at, watched, ); let _ = self.sync_channel.send(request); @@ -900,10 +936,12 @@ where pub(super) fn extend_unwatched_sync( self: Arc, source: TransactionSource, + validated_at: u64, xts: Vec>, ) -> Vec>, sc_transaction_pool_api::error::Error>> { - let (response, request) = TxMemPoolSyncRequest::extend_unwatched(self.clone(), source, xts); + let (response, request) = + TxMemPoolSyncRequest::extend_unwatched(self.clone(), source, validated_at, xts); let _ = self.sync_channel.send(request); response.recv().expect(SYNC_BRIDGE_EXPECT) } @@ -960,7 +998,7 @@ mod tx_mem_pool_tests { let xts = (0..max + 1).map(|x| Arc::from(uxt(x as _))).collect::>(); - let results = mempool.extend_unwatched(TransactionSource::External, &xts).await; + let results = mempool.extend_unwatched(TransactionSource::External, 0, &xts).await; assert!(results.iter().take(max).all(Result::is_ok)); assert!(matches!( results.into_iter().last().unwrap().unwrap_err(), @@ -978,7 +1016,7 @@ mod tx_mem_pool_tests { let mut xts = (0..max - 1).map(|x| Arc::from(uxt(x as _))).collect::>(); xts.push(xts.iter().last().unwrap().clone()); - let results = mempool.extend_unwatched(TransactionSource::External, &xts).await; + let results = mempool.extend_unwatched(TransactionSource::External, 0, &xts).await; assert!(results.iter().take(max - 1).all(Result::is_ok)); assert!(matches!( results.into_iter().last().unwrap().unwrap_err(), @@ -994,17 +1032,17 @@ mod tx_mem_pool_tests { let xts = (0..max).map(|x| Arc::from(uxt(x as _))).collect::>(); - let results = mempool.extend_unwatched(TransactionSource::External, &xts).await; + let results = mempool.extend_unwatched(TransactionSource::External, 0, &xts).await; assert!(results.iter().all(Result::is_ok)); let xt = Arc::from(uxt(98)); - let result = mempool.push_watched(TransactionSource::External, xt).await; + let result = mempool.push_watched(TransactionSource::External, 0, xt).await; assert!(matches!( result.unwrap_err(), sc_transaction_pool_api::error::Error::ImmediatelyDropped )); let xt = Arc::from(uxt(99)); - let mut result = mempool.extend_unwatched(TransactionSource::External, &[xt]).await; + let mut result = mempool.extend_unwatched(TransactionSource::External, 0, &[xt]).await; assert!(matches!( result.pop().unwrap().unwrap_err(), sc_transaction_pool_api::error::Error::ImmediatelyDropped @@ -1021,15 +1059,15 @@ mod tx_mem_pool_tests { let xt0 = xts.iter().last().unwrap().clone(); let xt1 = xts.iter().next().unwrap().clone(); - let results = mempool.extend_unwatched(TransactionSource::External, &xts).await; + let results = mempool.extend_unwatched(TransactionSource::External, 0, &xts).await; assert!(results.iter().all(Result::is_ok)); - let result = mempool.push_watched(TransactionSource::External, xt0).await; + let result = mempool.push_watched(TransactionSource::External, 0, xt0).await; assert!(matches!( result.unwrap_err(), sc_transaction_pool_api::error::Error::AlreadyImported(_) )); - let mut result = mempool.extend_unwatched(TransactionSource::External, &[xt1]).await; + let mut result = mempool.extend_unwatched(TransactionSource::External, 0, &[xt1]).await; assert!(matches!( result.pop().unwrap().unwrap_err(), sc_transaction_pool_api::error::Error::AlreadyImported(_) @@ -1049,15 +1087,16 @@ mod tx_mem_pool_tests { let xts0 = (0..10).map(|x| Arc::from(uxt(x as _))).collect::>(); trace!(target:LOG_TARGET,line=line!(),"xxx"); - let results = mempool.extend_unwatched(TransactionSource::External, &xts0).await; + let results = mempool.extend_unwatched(TransactionSource::External, 0, &xts0).await; trace!(target:LOG_TARGET,line=line!(),"xxx"); assert!(results.iter().all(Result::is_ok)); trace!(target:LOG_TARGET,line=line!(),"xxx"); let xts1 = (0..5).map(|x| Arc::from(uxt(2 * x))).collect::>(); trace!(target:LOG_TARGET,line=line!(),"xxx"); - let results = - xts1.into_iter().map(|t| mempool.push_watched(TransactionSource::External, t)); + let results = xts1 + .into_iter() + .map(|t| mempool.push_watched(TransactionSource::External, 0, t)); trace!(target:LOG_TARGET,line=line!(),"xxx"); let results = join_all(results).await; trace!(target:LOG_TARGET,line=line!(),"xxx"); @@ -1083,19 +1122,19 @@ mod tx_mem_pool_tests { let total_xts_bytes = xts.iter().fold(0, |r, x| r + api.hash_and_length(&x).1); - let results = mempool.extend_unwatched(TransactionSource::External, &xts).await; + let results = mempool.extend_unwatched(TransactionSource::External, 0, &xts).await; assert!(results.iter().all(Result::is_ok)); assert_eq!(mempool.bytes(), total_xts_bytes); let xt = Arc::from(large_uxt(98)); - let result = mempool.push_watched(TransactionSource::External, xt).await; + let result = mempool.push_watched(TransactionSource::External, 0, xt).await; assert!(matches!( result.unwrap_err(), sc_transaction_pool_api::error::Error::ImmediatelyDropped )); let xt = Arc::from(large_uxt(99)); - let mut result = mempool.extend_unwatched(TransactionSource::External, &[xt]).await; + let mut result = mempool.extend_unwatched(TransactionSource::External, 0, &[xt]).await; assert!(matches!( result.pop().unwrap().unwrap_err(), sc_transaction_pool_api::error::Error::ImmediatelyDropped @@ -1123,7 +1162,7 @@ mod tx_mem_pool_tests { }) .unzip(); - let results = mempool.extend_unwatched(TransactionSource::External, &xts).await; + let results = mempool.extend_unwatched(TransactionSource::External, 0, &xts).await; assert!(results.iter().all(Result::is_ok)); assert_eq!(mempool.bytes(), total_xts_bytes); @@ -1134,7 +1173,7 @@ mod tx_mem_pool_tests { let xt = Arc::from(large_uxt(98)); let hash = api.hash_and_length(&xt).0; let result = mempool - .try_insert_with_replacement(xt, hi_prio, TransactionSource::External, false) + .try_insert_with_replacement(xt, hi_prio, TransactionSource::External, 0, false) .await .unwrap(); @@ -1163,7 +1202,7 @@ mod tx_mem_pool_tests { }) .unzip(); - let results = mempool.extend_unwatched(TransactionSource::External, &xts).await; + let results = mempool.extend_unwatched(TransactionSource::External, 0, &xts).await; assert!(results.iter().all(Result::is_ok)); assert_eq!(mempool.bytes(), total_xts_bytes); assert_eq!(total_xts_bytes, max * LARGE_XT_SIZE); @@ -1177,7 +1216,7 @@ mod tx_mem_pool_tests { let (hash, length) = api.hash_and_length(&xt); assert_eq!(length, 1130); let result = mempool - .try_insert_with_replacement(xt, hi_prio, TransactionSource::External, false) + .try_insert_with_replacement(xt, hi_prio, TransactionSource::External, 0, false) .await .unwrap(); @@ -1206,7 +1245,7 @@ mod tx_mem_pool_tests { }) .unzip(); - let results = mempool.extend_unwatched(TransactionSource::External, &xts).await; + let results = mempool.extend_unwatched(TransactionSource::External, 0, &xts).await; assert!(results.iter().all(Result::is_ok)); assert_eq!(mempool.bytes(), total_xts_bytes); @@ -1220,7 +1259,7 @@ mod tx_mem_pool_tests { // overhead is 105, thus length: 105 + 2154 assert_eq!(length, 2 * LARGE_XT_SIZE + 1); let result = mempool - .try_insert_with_replacement(xt, hi_prio, TransactionSource::External, false) + .try_insert_with_replacement(xt, hi_prio, TransactionSource::External, 0, false) .await .unwrap(); @@ -1249,7 +1288,7 @@ mod tx_mem_pool_tests { }) .collect::>(); - let results = mempool.extend_unwatched(TransactionSource::External, &xts).await; + let results = mempool.extend_unwatched(TransactionSource::External, 0, &xts).await; assert!(results.iter().all(Result::is_ok)); assert_eq!(mempool.bytes(), total_xts_bytes); @@ -1259,7 +1298,7 @@ mod tx_mem_pool_tests { let xt = Arc::from(large_uxt(98)); let result = mempool - .try_insert_with_replacement(xt, low_prio, TransactionSource::External, false) + .try_insert_with_replacement(xt, low_prio, TransactionSource::External, 0, false) .await; // lower prio tx is rejected immediately @@ -1282,7 +1321,7 @@ mod tx_mem_pool_tests { let total_xts_bytes = xts.iter().fold(0, |r, x| r + api.hash_and_length(&x).1); - let results = mempool.extend_unwatched(TransactionSource::External, &xts).await; + let results = mempool.extend_unwatched(TransactionSource::External, 0, &xts).await; assert!(results.iter().all(Result::is_ok)); assert_eq!(mempool.bytes(), total_xts_bytes); @@ -1293,7 +1332,7 @@ mod tx_mem_pool_tests { assert_eq!(length, 2 * LARGE_XT_SIZE + 1); let result = mempool - .try_insert_with_replacement(xt, hi_prio, TransactionSource::External, false) + .try_insert_with_replacement(xt, hi_prio, TransactionSource::External, 0, false) .await; // we did not update priorities (update_transaction_priority was not called): diff --git a/substrate/client/transaction-pool/tests/fatp.rs b/substrate/client/transaction-pool/tests/fatp.rs index 174b621d58240..1fd115966ef85 100644 --- a/substrate/client/transaction-pool/tests/fatp.rs +++ b/substrate/client/transaction-pool/tests/fatp.rs @@ -2598,3 +2598,90 @@ fn fatp_ready_at_with_timeout_works_for_misc_scenarios() { assert_eq!(ready_at2.next().unwrap().hash, api.hash_and_length(&xt2).0); assert!(ready_at2.next().is_none()); } + +#[test] +fn fatp_tx_is_not_prematurely_revalidated() { + sp_tracing::try_init_simple(); + + let (pool, api, _) = pool(); + let genesis = api.genesis_hash(); + + let mut hashes = vec![]; + let mut prev_hash = genesis; + hashes.push(genesis); + for n in 1..=40 { + let header = api.push_block_with_parent(prev_hash, vec![], true); + if n <= 21 { + api.set_nonce(header.hash(), Alice.into(), 199); + block_on(pool.maintain(new_best_block_event(&pool, Some(prev_hash), header.hash()))); + } else { + // not realistic, we only want tx to be invalid, stale is currently the only way in + // TestApi + api.set_nonce(header.hash(), Alice.into(), 199); + } + hashes.push(header.hash()); + prev_hash = header.hash(); + } + + let xt0 = uxt(Alice, 199); + + //note: tx is validated at block 20 (recent best block): + let xt0_watcher = block_on(pool.submit_and_watch(hashes[21], SOURCE, xt0.clone())).unwrap(); + + let header41 = api.push_block_with_parent(hashes[40], vec![xt0.clone()], true); + + //note: tx is still valid at block 21 + block_on(pool.maintain(finalized_block_event(&pool, api.genesis_hash(), hashes[5]))); + block_on(pool.maintain(finalized_block_event(&pool, hashes[5], hashes[10]))); + block_on(pool.maintain(finalized_block_event(&pool, hashes[10], hashes[19]))); + block_on(pool.maintain(finalized_block_event(&pool, hashes[19], header41.hash()))); + + let xt0_events = block_on(xt0_watcher.collect::>()); + assert_eq!( + xt0_events, + vec![ + TransactionStatus::Ready, + TransactionStatus::InBlock((header41.hash(), 0)), + TransactionStatus::Finalized((header41.hash(), 0)), + ] + ); +} + +#[test] +fn fatp_tx_is_revalidated_by_mempool_revalidation() { + sp_tracing::try_init_simple(); + + let (pool, api, _) = pool(); + let genesis = api.genesis_hash(); + + let mut hashes = vec![]; + let mut prev_hash = genesis; + hashes.push(genesis); + for n in 1..=40 { + let header = api.push_block_with_parent(prev_hash, vec![], true); + if n >= 22 { + // not realistic, we only want tx to be invalid, stale is currently the only way in + // TestApi + api.set_nonce(header.hash(), Alice.into(), 210); + } else { + api.set_nonce(header.hash(), Alice.into(), 199); + let event = new_best_block_event(&pool, Some(prev_hash), header.hash()); + block_on(pool.maintain(event)); + } + hashes.push(header.hash()); + prev_hash = header.hash(); + } + + let xt0 = uxt(Alice, 199); + + //note: tx is validated at block 20 (recent best block): + let xt0_watcher = block_on(pool.submit_and_watch(hashes[21], SOURCE, xt0.clone())).unwrap(); + + //note: tx is still valid at block 21 + block_on(pool.maintain(finalized_block_event(&pool, api.genesis_hash(), hashes[21]))); + //note: TXMEMPOOL_REVALIDATION_PERIOD passed, tx is stale on block 32: + block_on(pool.maintain(finalized_block_event(&pool, hashes[21], hashes[32]))); + + let xt0_events = block_on(xt0_watcher.collect::>()); + assert_eq!(xt0_events, vec![TransactionStatus::Ready, TransactionStatus::Invalid,]); +} From e79afab5d12cc816b6359a9fd6e661f93ac31052 Mon Sep 17 00:00:00 2001 From: "paritytech-release-backport-bot[bot]" <191369287+paritytech-release-backport-bot[bot]@users.noreply.github.com> Date: Fri, 15 Aug 2025 08:01:57 +0000 Subject: [PATCH 058/128] [stable2506] Backport #9489 (#9492) Backport #9489 into `stable2506` from raymondkfcheung. See the [documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md) on how to use this bot. Co-authored-by: Raymond Cheung <178801527+raymondkfcheung@users.noreply.github.com> --- polkadot/xcm/pallet-xcm/src/lib.rs | 1 - prdoc/pr_9489.prdoc | 8 ++++++++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 prdoc/pr_9489.prdoc diff --git a/polkadot/xcm/pallet-xcm/src/lib.rs b/polkadot/xcm/pallet-xcm/src/lib.rs index d4b32dd12d012..f2ccfa63e6ac1 100644 --- a/polkadot/xcm/pallet-xcm/src/lib.rs +++ b/polkadot/xcm/pallet-xcm/src/lib.rs @@ -3712,7 +3712,6 @@ impl xcm_executor::traits::AssetLock for Pallet { use xcm_executor::traits::LockError::*; let sovereign_account = T::SovereignAccountOf::convert_location(&owner).ok_or(BadOwner)?; let amount = T::CurrencyMatcher::matches_fungible(&asset).ok_or(UnknownAsset)?; - ensure!(T::Currency::free_balance(&sovereign_account) >= amount, AssetNotOwned); let locks = LockedFungibles::::get(&sovereign_account).unwrap_or_default(); let item_index = locks.iter().position(|x| x.1.try_as::<_>() == Ok(&unlocker)).ok_or(NotLocked)?; diff --git a/prdoc/pr_9489.prdoc b/prdoc/pr_9489.prdoc new file mode 100644 index 0000000000000..d62552b28db7c --- /dev/null +++ b/prdoc/pr_9489.prdoc @@ -0,0 +1,8 @@ +title: Remove free balance check in prepare_unlock +doc: +- audience: Runtime Dev + description: The free balance check during unlocking is unnecessary since a lock can cover both free and reserved + balances. Removing it allows locks to be cleared even if part of the locked funds is reserved or already slashed. +crates: +- name: pallet-xcm + bump: patch From 4129017154556084d44e2a7a01d26e89d0bd265b Mon Sep 17 00:00:00 2001 From: Egor_P Date: Mon, 18 Aug 2025 19:45:57 +0200 Subject: [PATCH 059/128] [stable2506] Post crates release changes (#9505) This PR contains regular post crates release changes: - crates version bumps - node version bumps - spec_version bumps - prdocs reordering - formatting to pass CI checks --- Cargo.lock | 18 +++---- Plan.toml | 54 ++++++++++--------- .../assets/asset-hub-rococo/src/lib.rs | 2 +- .../assets/asset-hub-westend/src/lib.rs | 2 +- .../bridge-hubs/bridge-hub-rococo/src/lib.rs | 2 +- .../bridge-hubs/bridge-hub-westend/src/lib.rs | 2 +- .../collectives-westend/src/lib.rs | 2 +- .../coretime/coretime-rococo/src/lib.rs | 2 +- .../coretime/coretime-westend/src/lib.rs | 2 +- .../glutton/glutton-westend/src/lib.rs | 2 +- .../runtimes/people/people-rococo/src/lib.rs | 2 +- .../runtimes/people/people-westend/src/lib.rs | 2 +- .../polkadot-omni-node/lib/src/nodes/mod.rs | 2 +- polkadot/node/primitives/src/lib.rs | 2 +- polkadot/runtime/rococo/src/lib.rs | 2 +- polkadot/runtime/westend/src/lib.rs | 2 +- polkadot/xcm/pallet-xcm/Cargo.toml | 2 +- polkadot/xcm/xcm-builder/Cargo.toml | 2 +- polkadot/xcm/xcm-executor/Cargo.toml | 2 +- prdoc/{ => stable2506-1}/pr_8838.prdoc | 0 prdoc/{ => stable2506-1}/pr_8857.prdoc | 0 prdoc/{ => stable2506-1}/pr_9179.prdoc | 0 prdoc/{ => stable2506-1}/pr_9189.prdoc | 0 prdoc/{ => stable2506-1}/pr_9195.prdoc | 0 prdoc/{ => stable2506-1}/pr_9250.prdoc | 0 prdoc/{ => stable2506-1}/pr_9281.prdoc | 0 prdoc/{ => stable2506-1}/pr_9338.prdoc | 0 prdoc/{ => stable2506-1}/pr_9354.prdoc | 0 prdoc/{ => stable2506-1}/pr_9355.prdoc | 0 prdoc/{ => stable2506-1}/pr_9445.prdoc | 0 substrate/client/cli/Cargo.toml | 2 +- substrate/client/network/Cargo.toml | 2 +- substrate/client/transaction-pool/Cargo.toml | 2 +- substrate/frame/benchmarking/Cargo.toml | 8 +-- .../utils/frame/benchmarking-cli/Cargo.toml | 2 +- substrate/utils/prometheus/Cargo.toml | 2 +- 36 files changed, 63 insertions(+), 61 deletions(-) rename prdoc/{ => stable2506-1}/pr_8838.prdoc (100%) rename prdoc/{ => stable2506-1}/pr_8857.prdoc (100%) rename prdoc/{ => stable2506-1}/pr_9179.prdoc (100%) rename prdoc/{ => stable2506-1}/pr_9189.prdoc (100%) rename prdoc/{ => stable2506-1}/pr_9195.prdoc (100%) rename prdoc/{ => stable2506-1}/pr_9250.prdoc (100%) rename prdoc/{ => stable2506-1}/pr_9281.prdoc (100%) rename prdoc/{ => stable2506-1}/pr_9338.prdoc (100%) rename prdoc/{ => stable2506-1}/pr_9354.prdoc (100%) rename prdoc/{ => stable2506-1}/pr_9355.prdoc (100%) rename prdoc/{ => stable2506-1}/pr_9445.prdoc (100%) diff --git a/Cargo.lock b/Cargo.lock index f50d6765063fb..fc85e6a3b420d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6543,7 +6543,7 @@ checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" [[package]] name = "frame-benchmarking" -version = "41.0.0" +version = "41.0.1" dependencies = [ "array-bytes 6.2.2", "frame-support", @@ -6572,7 +6572,7 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" -version = "49.0.0" +version = "49.1.0" dependencies = [ "Inflector", "array-bytes 6.2.2", @@ -13964,7 +13964,7 @@ dependencies = [ [[package]] name = "pallet-xcm" -version = "20.1.0" +version = "20.1.2" dependencies = [ "bounded-collections 0.2.3", "frame-benchmarking", @@ -19316,7 +19316,7 @@ dependencies = [ [[package]] name = "sc-cli" -version = "0.53.0" +version = "0.53.1" dependencies = [ "array-bytes 6.2.2", "chrono", @@ -19986,7 +19986,7 @@ dependencies = [ [[package]] name = "sc-network" -version = "0.51.0" +version = "0.51.1" dependencies = [ "array-bytes 6.2.2", "assert_matches", @@ -20669,7 +20669,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool" -version = "40.0.0" +version = "40.1.0" dependencies = [ "anyhow", "assert_matches", @@ -24519,7 +24519,7 @@ dependencies = [ [[package]] name = "staging-xcm-builder" -version = "21.0.0" +version = "21.1.0" dependencies = [ "environmental", "frame-support", @@ -24552,7 +24552,7 @@ dependencies = [ [[package]] name = "staging-xcm-executor" -version = "20.0.0" +version = "20.0.1" dependencies = [ "environmental", "frame-benchmarking", @@ -24814,7 +24814,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" -version = "0.17.2" +version = "0.17.6" dependencies = [ "http-body-util", "hyper 1.6.0", diff --git a/Plan.toml b/Plan.toml index 463eddb6ef934..8c37258ba26ee 100644 --- a/Plan.toml +++ b/Plan.toml @@ -1,4 +1,4 @@ -# generated by parity-publish v0.10.4 +# generated by parity-publish v0.10.5 # command: parity-publish plan --prdoc prdoc [options] @@ -225,7 +225,9 @@ to = "11.0.0" # substrate/utils/prometheus name = "substrate-prometheus-endpoint" from = "0.17.2" -to = "0.17.2" +to = "0.17.6" +bump = "minor" +reason = "changed" [[crate]] # substrate/test-utils @@ -1052,9 +1054,9 @@ reason = "changed" [[crate]] # substrate/frame/benchmarking name = "frame-benchmarking" -from = "40.2.0" -to = "41.0.0" -bump = "major" +from = "41.0.0" +to = "41.0.1" +bump = "patch" reason = "changed" [[crate]] @@ -1226,9 +1228,9 @@ reason = "changed" [[crate]] # substrate/client/network name = "sc-network" -from = "0.50.0" -to = "0.51.0" -bump = "major" +from = "0.51.0" +to = "0.51.1" +bump = "patch" reason = "changed" [[crate]] @@ -1250,9 +1252,9 @@ reason = "changed" [[crate]] # substrate/client/transaction-pool name = "sc-transaction-pool" -from = "39.0.0" -to = "40.0.0" -bump = "major" +from = "40.0.0" +to = "40.1.0" +bump = "minor" reason = "changed" [[crate]] @@ -1834,9 +1836,9 @@ reason = "changed" [[crate]] # polkadot/xcm/xcm-executor name = "staging-xcm-executor" -from = "19.1.2" -to = "20.0.0" -bump = "major" +from = "20.0.0" +to = "20.0.1" +bump = "patch" reason = "changed" [[crate]] @@ -2118,9 +2120,9 @@ reason = "changed" [[crate]] # polkadot/xcm/xcm-builder name = "staging-xcm-builder" -from = "20.1.1" -to = "21.0.0" -bump = "major" +from = "21.0.0" +to = "21.1.0" +bump = "minor" reason = "changed" [[crate]] @@ -2430,9 +2432,9 @@ reason = "changed" [[crate]] # polkadot/xcm/pallet-xcm name = "pallet-xcm" -from = "20.0.0" -to = "20.1.0" -bump = "minor" +from = "20.1.1" +to = "20.1.2" +bump = "patch" reason = "changed" [[crate]] @@ -2902,9 +2904,9 @@ reason = "changed" [[crate]] # substrate/client/cli name = "sc-cli" -from = "0.52.0" -to = "0.53.0" -bump = "major" +from = "0.53.0" +to = "0.53.1" +bump = "minor" reason = "changed" [[crate]] @@ -3626,9 +3628,9 @@ reason = "changed" [[crate]] # substrate/utils/frame/benchmarking-cli name = "frame-benchmarking-cli" -from = "48.0.0" -to = "49.0.0" -bump = "major" +from = "49.0.0" +to = "49.1.0" +bump = "minor" reason = "changed" [[crate]] diff --git a/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs b/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs index 05f7a699531e5..4160324404910 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs @@ -129,7 +129,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: alloc::borrow::Cow::Borrowed("statemine"), impl_name: alloc::borrow::Cow::Borrowed("statemine"), authoring_version: 1, - spec_version: 1_019_002, + spec_version: 1_019_003, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 16, diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs index 7705d95cd7523..5d7e2c953aecb 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs @@ -133,7 +133,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: alloc::borrow::Cow::Borrowed("westmint"), impl_name: alloc::borrow::Cow::Borrowed("westmint"), authoring_version: 1, - spec_version: 1_019_002, + spec_version: 1_019_003, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 16, diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs index dab96d503d85f..4993825c61fed 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs @@ -253,7 +253,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: alloc::borrow::Cow::Borrowed("bridge-hub-rococo"), impl_name: alloc::borrow::Cow::Borrowed("bridge-hub-rococo"), authoring_version: 1, - spec_version: 1_019_002, + spec_version: 1_019_003, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 6, diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/lib.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/lib.rs index 426aea9fe4c29..c8fc1b816b9e0 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/lib.rs @@ -243,7 +243,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: alloc::borrow::Cow::Borrowed("bridge-hub-westend"), impl_name: alloc::borrow::Cow::Borrowed("bridge-hub-westend"), authoring_version: 1, - spec_version: 1_019_002, + spec_version: 1_019_003, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 6, diff --git a/cumulus/parachains/runtimes/collectives/collectives-westend/src/lib.rs b/cumulus/parachains/runtimes/collectives/collectives-westend/src/lib.rs index dc4c8d60250e6..f978390daaf19 100644 --- a/cumulus/parachains/runtimes/collectives/collectives-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/collectives/collectives-westend/src/lib.rs @@ -126,7 +126,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: alloc::borrow::Cow::Borrowed("collectives-westend"), impl_name: alloc::borrow::Cow::Borrowed("collectives-westend"), authoring_version: 1, - spec_version: 1_019_002, + spec_version: 1_019_003, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 6, diff --git a/cumulus/parachains/runtimes/coretime/coretime-rococo/src/lib.rs b/cumulus/parachains/runtimes/coretime/coretime-rococo/src/lib.rs index 9d6ba40fec724..ab8a23d4ebe0e 100644 --- a/cumulus/parachains/runtimes/coretime/coretime-rococo/src/lib.rs +++ b/cumulus/parachains/runtimes/coretime/coretime-rococo/src/lib.rs @@ -159,7 +159,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: alloc::borrow::Cow::Borrowed("coretime-rococo"), impl_name: alloc::borrow::Cow::Borrowed("coretime-rococo"), authoring_version: 1, - spec_version: 1_019_002, + spec_version: 1_019_003, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 2, diff --git a/cumulus/parachains/runtimes/coretime/coretime-westend/src/lib.rs b/cumulus/parachains/runtimes/coretime/coretime-westend/src/lib.rs index 98af506d39eed..9911b1c87dff5 100644 --- a/cumulus/parachains/runtimes/coretime/coretime-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/coretime/coretime-westend/src/lib.rs @@ -159,7 +159,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: alloc::borrow::Cow::Borrowed("coretime-westend"), impl_name: alloc::borrow::Cow::Borrowed("coretime-westend"), authoring_version: 1, - spec_version: 1_019_002, + spec_version: 1_019_003, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 2, diff --git a/cumulus/parachains/runtimes/glutton/glutton-westend/src/lib.rs b/cumulus/parachains/runtimes/glutton/glutton-westend/src/lib.rs index 40545f2af75d2..ff25e928a3cc2 100644 --- a/cumulus/parachains/runtimes/glutton/glutton-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/glutton/glutton-westend/src/lib.rs @@ -103,7 +103,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: alloc::borrow::Cow::Borrowed("glutton-westend"), impl_name: alloc::borrow::Cow::Borrowed("glutton-westend"), authoring_version: 1, - spec_version: 1_019_002, + spec_version: 1_019_003, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 1, diff --git a/cumulus/parachains/runtimes/people/people-rococo/src/lib.rs b/cumulus/parachains/runtimes/people/people-rococo/src/lib.rs index 67d1c87e05d60..103081808e219 100644 --- a/cumulus/parachains/runtimes/people/people-rococo/src/lib.rs +++ b/cumulus/parachains/runtimes/people/people-rococo/src/lib.rs @@ -146,7 +146,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: alloc::borrow::Cow::Borrowed("people-rococo"), impl_name: alloc::borrow::Cow::Borrowed("people-rococo"), authoring_version: 1, - spec_version: 1_019_002, + spec_version: 1_019_003, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 1, diff --git a/cumulus/parachains/runtimes/people/people-westend/src/lib.rs b/cumulus/parachains/runtimes/people/people-westend/src/lib.rs index 2e864470e80dd..a89433ac86f52 100644 --- a/cumulus/parachains/runtimes/people/people-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/people/people-westend/src/lib.rs @@ -149,7 +149,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: alloc::borrow::Cow::Borrowed("people-westend"), impl_name: alloc::borrow::Cow::Borrowed("people-westend"), authoring_version: 1, - spec_version: 1_019_002, + spec_version: 1_019_003, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 2, diff --git a/cumulus/polkadot-omni-node/lib/src/nodes/mod.rs b/cumulus/polkadot-omni-node/lib/src/nodes/mod.rs index a227175dbc119..4909eaf9d0d76 100644 --- a/cumulus/polkadot-omni-node/lib/src/nodes/mod.rs +++ b/cumulus/polkadot-omni-node/lib/src/nodes/mod.rs @@ -25,7 +25,7 @@ use sc_service::{Configuration, TaskManager}; /// The current node version for cumulus official binaries, which takes the basic /// SemVer form `..`. It should correspond to the latest /// `polkadot` version of a stable release. -pub const NODE_VERSION: &'static str = "1.19.0"; +pub const NODE_VERSION: &'static str = "1.19.1"; /// Trait that extends the `DynNodeSpec` trait with manual seal related logic. /// diff --git a/polkadot/node/primitives/src/lib.rs b/polkadot/node/primitives/src/lib.rs index 3a187ce5e03b2..10791dc283daf 100644 --- a/polkadot/node/primitives/src/lib.rs +++ b/polkadot/node/primitives/src/lib.rs @@ -62,7 +62,7 @@ pub use disputes::{ /// relatively rare. /// /// The associated worker binaries should use the same version as the node that spawns them. -pub const NODE_VERSION: &'static str = "1.19.0"; +pub const NODE_VERSION: &'static str = "1.19.1"; // For a 16-ary Merkle Prefix Trie, we can expect at most 16 32-byte hashes per node // plus some overhead: diff --git a/polkadot/runtime/rococo/src/lib.rs b/polkadot/runtime/rococo/src/lib.rs index 5e5a48a42bd91..b07296f0615fa 100644 --- a/polkadot/runtime/rococo/src/lib.rs +++ b/polkadot/runtime/rococo/src/lib.rs @@ -184,7 +184,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: alloc::borrow::Cow::Borrowed("rococo"), impl_name: alloc::borrow::Cow::Borrowed("parity-rococo-v2.0"), authoring_version: 0, - spec_version: 1_019_002, + spec_version: 1_019_003, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 26, diff --git a/polkadot/runtime/westend/src/lib.rs b/polkadot/runtime/westend/src/lib.rs index 186ad7e7a5e23..2f73a3711f11f 100644 --- a/polkadot/runtime/westend/src/lib.rs +++ b/polkadot/runtime/westend/src/lib.rs @@ -178,7 +178,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: alloc::borrow::Cow::Borrowed("westend"), impl_name: alloc::borrow::Cow::Borrowed("parity-westend"), authoring_version: 2, - spec_version: 1_019_002, + spec_version: 1_019_003, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 27, diff --git a/polkadot/xcm/pallet-xcm/Cargo.toml b/polkadot/xcm/pallet-xcm/Cargo.toml index 2f90b52b2ee23..01d4fb7727341 100644 --- a/polkadot/xcm/pallet-xcm/Cargo.toml +++ b/polkadot/xcm/pallet-xcm/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-xcm" -version = "20.1.0" +version = "20.1.2" description = "A pallet for handling XCM programs." authors.workspace = true edition.workspace = true diff --git a/polkadot/xcm/xcm-builder/Cargo.toml b/polkadot/xcm/xcm-builder/Cargo.toml index dc6620e3fd841..c508bf609a75b 100644 --- a/polkadot/xcm/xcm-builder/Cargo.toml +++ b/polkadot/xcm/xcm-builder/Cargo.toml @@ -4,7 +4,7 @@ description = "Tools & types for building with XCM and its executor." authors.workspace = true edition.workspace = true license.workspace = true -version = "21.0.0" +version = "21.1.0" homepage.workspace = true repository.workspace = true diff --git a/polkadot/xcm/xcm-executor/Cargo.toml b/polkadot/xcm/xcm-executor/Cargo.toml index cf24853365d5d..911ab58538b7c 100644 --- a/polkadot/xcm/xcm-executor/Cargo.toml +++ b/polkadot/xcm/xcm-executor/Cargo.toml @@ -4,7 +4,7 @@ description = "An abstract and configurable XCM message executor." authors.workspace = true edition.workspace = true license.workspace = true -version = "20.0.0" +version = "20.0.1" homepage.workspace = true repository.workspace = true diff --git a/prdoc/pr_8838.prdoc b/prdoc/stable2506-1/pr_8838.prdoc similarity index 100% rename from prdoc/pr_8838.prdoc rename to prdoc/stable2506-1/pr_8838.prdoc diff --git a/prdoc/pr_8857.prdoc b/prdoc/stable2506-1/pr_8857.prdoc similarity index 100% rename from prdoc/pr_8857.prdoc rename to prdoc/stable2506-1/pr_8857.prdoc diff --git a/prdoc/pr_9179.prdoc b/prdoc/stable2506-1/pr_9179.prdoc similarity index 100% rename from prdoc/pr_9179.prdoc rename to prdoc/stable2506-1/pr_9179.prdoc diff --git a/prdoc/pr_9189.prdoc b/prdoc/stable2506-1/pr_9189.prdoc similarity index 100% rename from prdoc/pr_9189.prdoc rename to prdoc/stable2506-1/pr_9189.prdoc diff --git a/prdoc/pr_9195.prdoc b/prdoc/stable2506-1/pr_9195.prdoc similarity index 100% rename from prdoc/pr_9195.prdoc rename to prdoc/stable2506-1/pr_9195.prdoc diff --git a/prdoc/pr_9250.prdoc b/prdoc/stable2506-1/pr_9250.prdoc similarity index 100% rename from prdoc/pr_9250.prdoc rename to prdoc/stable2506-1/pr_9250.prdoc diff --git a/prdoc/pr_9281.prdoc b/prdoc/stable2506-1/pr_9281.prdoc similarity index 100% rename from prdoc/pr_9281.prdoc rename to prdoc/stable2506-1/pr_9281.prdoc diff --git a/prdoc/pr_9338.prdoc b/prdoc/stable2506-1/pr_9338.prdoc similarity index 100% rename from prdoc/pr_9338.prdoc rename to prdoc/stable2506-1/pr_9338.prdoc diff --git a/prdoc/pr_9354.prdoc b/prdoc/stable2506-1/pr_9354.prdoc similarity index 100% rename from prdoc/pr_9354.prdoc rename to prdoc/stable2506-1/pr_9354.prdoc diff --git a/prdoc/pr_9355.prdoc b/prdoc/stable2506-1/pr_9355.prdoc similarity index 100% rename from prdoc/pr_9355.prdoc rename to prdoc/stable2506-1/pr_9355.prdoc diff --git a/prdoc/pr_9445.prdoc b/prdoc/stable2506-1/pr_9445.prdoc similarity index 100% rename from prdoc/pr_9445.prdoc rename to prdoc/stable2506-1/pr_9445.prdoc diff --git a/substrate/client/cli/Cargo.toml b/substrate/client/cli/Cargo.toml index 1ed4443047c33..1a3c24aa20d4c 100644 --- a/substrate/client/cli/Cargo.toml +++ b/substrate/client/cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-cli" -version = "0.53.0" +version = "0.53.1" authors.workspace = true description = "Substrate CLI interface." edition.workspace = true diff --git a/substrate/client/network/Cargo.toml b/substrate/client/network/Cargo.toml index 8f63a050abdb2..ffe07804c9540 100644 --- a/substrate/client/network/Cargo.toml +++ b/substrate/client/network/Cargo.toml @@ -1,7 +1,7 @@ [package] description = "Substrate network protocol" name = "sc-network" -version = "0.51.0" +version = "0.51.1" license = "GPL-3.0-or-later WITH Classpath-exception-2.0" authors.workspace = true edition.workspace = true diff --git a/substrate/client/transaction-pool/Cargo.toml b/substrate/client/transaction-pool/Cargo.toml index e2252f1e17060..f67d6eea94f3b 100644 --- a/substrate/client/transaction-pool/Cargo.toml +++ b/substrate/client/transaction-pool/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sc-transaction-pool" -version = "40.0.0" +version = "40.1.0" authors.workspace = true edition.workspace = true license = "GPL-3.0-or-later WITH Classpath-exception-2.0" diff --git a/substrate/frame/benchmarking/Cargo.toml b/substrate/frame/benchmarking/Cargo.toml index 3015907ad836d..a8265e65d9143 100644 --- a/substrate/frame/benchmarking/Cargo.toml +++ b/substrate/frame/benchmarking/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "frame-benchmarking" -version = "41.0.0" +version = "41.0.1" authors.workspace = true edition.workspace = true license = "Apache-2.0" @@ -37,10 +37,10 @@ static_assertions = { workspace = true, default-features = true } [dev-dependencies] array-bytes = { workspace = true, default-features = true } rusty-fork = { workspace = true } -sc-client-db = { workspace = true, default-features = false } -sp-externalities = { workspace = true, default-features = false } +sc-client-db = { default-features = false, workspace = true } +sp-externalities = { default-features = false, workspace = true } sp-keystore = { default-features = true, workspace = true } -sp-state-machine = { workspace = true, default-features = false } +sp-state-machine = { default-features = false, workspace = true } [features] default = ["std"] diff --git a/substrate/utils/frame/benchmarking-cli/Cargo.toml b/substrate/utils/frame/benchmarking-cli/Cargo.toml index 0301089e9449e..c9644e857116a 100644 --- a/substrate/utils/frame/benchmarking-cli/Cargo.toml +++ b/substrate/utils/frame/benchmarking-cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "frame-benchmarking-cli" -version = "49.0.0" +version = "49.1.0" authors.workspace = true edition.workspace = true license = "Apache-2.0" diff --git a/substrate/utils/prometheus/Cargo.toml b/substrate/utils/prometheus/Cargo.toml index 3611d00c094c1..7a237b809a83d 100644 --- a/substrate/utils/prometheus/Cargo.toml +++ b/substrate/utils/prometheus/Cargo.toml @@ -1,7 +1,7 @@ [package] description = "Endpoint to expose Prometheus metrics" name = "substrate-prometheus-endpoint" -version = "0.17.2" +version = "0.17.6" license = "Apache-2.0" authors.workspace = true edition.workspace = true From f3969c7ddd34985e6e709ed458bcc519f651682a Mon Sep 17 00:00:00 2001 From: Egor_P Date: Mon, 18 Aug 2025 21:04:11 +0200 Subject: [PATCH 060/128] [stable2506] Move prdoc to release folder (#9508) --- prdoc/{ => stable2506-1}/pr_9489.prdoc | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename prdoc/{ => stable2506-1}/pr_9489.prdoc (100%) diff --git a/prdoc/pr_9489.prdoc b/prdoc/stable2506-1/pr_9489.prdoc similarity index 100% rename from prdoc/pr_9489.prdoc rename to prdoc/stable2506-1/pr_9489.prdoc From bb71a6970a26f5727e615cb6a40d5950a0d0cbb7 Mon Sep 17 00:00:00 2001 From: "paritytech-release-backport-bot[bot]" <191369287+paritytech-release-backport-bot[bot]@users.noreply.github.com> Date: Wed, 20 Aug 2025 09:59:33 +0200 Subject: [PATCH 061/128] [stable2506] Backport #9516 (#9519) Backport #9516 into `stable2506` from bkontur. See the [documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md) on how to use this bot. Co-authored-by: Branislav Kontur Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .../pallet_core_fellowship_ambassador_core.rs | 66 +++++++++---------- .../pallet_core_fellowship_fellowship_core.rs | 66 +++++++++---------- prdoc/pr_9516.prdoc | 9 +++ .../frame/core-fellowship/src/benchmarking.rs | 2 +- substrate/frame/core-fellowship/src/lib.rs | 2 +- .../frame/core-fellowship/src/weights.rs | 6 +- 6 files changed, 80 insertions(+), 71 deletions(-) create mode 100644 prdoc/pr_9516.prdoc diff --git a/cumulus/parachains/runtimes/collectives/collectives-westend/src/weights/pallet_core_fellowship_ambassador_core.rs b/cumulus/parachains/runtimes/collectives/collectives-westend/src/weights/pallet_core_fellowship_ambassador_core.rs index 4f24def3ec505..deef132293e59 100644 --- a/cumulus/parachains/runtimes/collectives/collectives-westend/src/weights/pallet_core_fellowship_ambassador_core.rs +++ b/cumulus/parachains/runtimes/collectives/collectives-westend/src/weights/pallet_core_fellowship_ambassador_core.rs @@ -16,9 +16,9 @@ //! Autogenerated weights for `pallet_core_fellowship` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2025-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2025-08-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `e0f303704c84`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! HOSTNAME: `84c341e0cc82`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` //! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 // Executed Command: @@ -56,8 +56,8 @@ impl pallet_core_fellowship::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 7_440_000 picoseconds. - Weight::from_parts(7_680_000, 0) + // Minimum execution time: 7_554_000 picoseconds. + Weight::from_parts(7_864_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -67,8 +67,8 @@ impl pallet_core_fellowship::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `471` // Estimated: `1853` - // Minimum execution time: 13_394_000 picoseconds. - Weight::from_parts(13_901_000, 0) + // Minimum execution time: 13_535_000 picoseconds. + Weight::from_parts(14_145_000, 0) .saturating_add(Weight::from_parts(0, 1853)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -91,8 +91,8 @@ impl pallet_core_fellowship::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `66402` // Estimated: `69046` - // Minimum execution time: 153_853_000 picoseconds. - Weight::from_parts(156_514_000, 0) + // Minimum execution time: 135_970_000 picoseconds. + Weight::from_parts(140_241_000, 0) .saturating_add(Weight::from_parts(0, 69046)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(6)) @@ -113,10 +113,10 @@ impl pallet_core_fellowship::WeightInfo for WeightInfo< /// Proof: `AmbassadorCollective::IndexToId` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`) fn bump_demote() -> Weight { // Proof Size summary in bytes: - // Measured: `66512` + // Measured: `66794` // Estimated: `69046` - // Minimum execution time: 160_754_000 picoseconds. - Weight::from_parts(163_413_000, 0) + // Minimum execution time: 144_523_000 picoseconds. + Weight::from_parts(148_624_000, 0) .saturating_add(Weight::from_parts(0, 69046)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(6)) @@ -129,8 +129,8 @@ impl pallet_core_fellowship::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `360` // Estimated: `3514` - // Minimum execution time: 18_700_000 picoseconds. - Weight::from_parts(19_547_000, 0) + // Minimum execution time: 18_809_000 picoseconds. + Weight::from_parts(19_532_000, 0) .saturating_add(Weight::from_parts(0, 3514)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -149,8 +149,8 @@ impl pallet_core_fellowship::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `118` // Estimated: `3514` - // Minimum execution time: 26_627_000 picoseconds. - Weight::from_parts(27_508_000, 0) + // Minimum execution time: 27_052_000 picoseconds. + Weight::from_parts(27_750_000, 0) .saturating_add(Weight::from_parts(0, 3514)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(5)) @@ -171,10 +171,10 @@ impl pallet_core_fellowship::WeightInfo for WeightInfo< /// Proof: `AmbassadorCollective::IdToIndex` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`) fn promote() -> Weight { // Proof Size summary in bytes: - // Measured: `66055` + // Measured: `66034` // Estimated: `69046` - // Minimum execution time: 152_255_000 picoseconds. - Weight::from_parts(156_279_000, 0) + // Minimum execution time: 130_553_000 picoseconds. + Weight::from_parts(134_895_000, 0) .saturating_add(Weight::from_parts(0, 69046)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(6)) @@ -193,15 +193,15 @@ impl pallet_core_fellowship::WeightInfo for WeightInfo< /// Proof: `AmbassadorCollective::IdToIndex` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`) /// The range of component `r` is `[1, 9]`. /// The range of component `r` is `[1, 9]`. - fn promote_fast(r: u16, ) -> Weight { + fn promote_fast(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `65968` // Estimated: `69046 + r * (2489 ±0)` - // Minimum execution time: 139_374_000 picoseconds. - Weight::from_parts(127_034_613, 0) + // Minimum execution time: 125_739_000 picoseconds. + Weight::from_parts(113_300_436, 0) .saturating_add(Weight::from_parts(0, 69046)) - // Standard Error: 69_443 - .saturating_add(Weight::from_parts(17_266_639, 0).saturating_mul(r.into())) + // Standard Error: 56_138 + .saturating_add(Weight::from_parts(17_588_278, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3)) @@ -218,8 +218,8 @@ impl pallet_core_fellowship::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `265` // Estimated: `3514` - // Minimum execution time: 20_162_000 picoseconds. - Weight::from_parts(21_252_000, 0) + // Minimum execution time: 20_086_000 picoseconds. + Weight::from_parts(21_944_000, 0) .saturating_add(Weight::from_parts(0, 3514)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -232,8 +232,8 @@ impl pallet_core_fellowship::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `285` // Estimated: `3514` - // Minimum execution time: 17_440_000 picoseconds. - Weight::from_parts(18_338_000, 0) + // Minimum execution time: 17_667_000 picoseconds. + Weight::from_parts(18_528_000, 0) .saturating_add(Weight::from_parts(0, 3514)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -246,8 +246,8 @@ impl pallet_core_fellowship::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `285` // Estimated: `3514` - // Minimum execution time: 17_493_000 picoseconds. - Weight::from_parts(18_180_000, 0) + // Minimum execution time: 17_270_000 picoseconds. + Weight::from_parts(18_034_000, 0) .saturating_add(Weight::from_parts(0, 3514)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -262,8 +262,8 @@ impl pallet_core_fellowship::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `65967` // Estimated: `69046` - // Minimum execution time: 136_105_000 picoseconds. - Weight::from_parts(140_663_000, 0) + // Minimum execution time: 114_446_000 picoseconds. + Weight::from_parts(116_637_000, 0) .saturating_add(Weight::from_parts(0, 69046)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -276,8 +276,8 @@ impl pallet_core_fellowship::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `151` // Estimated: `69046` - // Minimum execution time: 109_134_000 picoseconds. - Weight::from_parts(116_891_000, 0) + // Minimum execution time: 93_223_000 picoseconds. + Weight::from_parts(94_688_000, 0) .saturating_add(Weight::from_parts(0, 69046)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/cumulus/parachains/runtimes/collectives/collectives-westend/src/weights/pallet_core_fellowship_fellowship_core.rs b/cumulus/parachains/runtimes/collectives/collectives-westend/src/weights/pallet_core_fellowship_fellowship_core.rs index db9254d5a6d7e..3d522b73e45d2 100644 --- a/cumulus/parachains/runtimes/collectives/collectives-westend/src/weights/pallet_core_fellowship_fellowship_core.rs +++ b/cumulus/parachains/runtimes/collectives/collectives-westend/src/weights/pallet_core_fellowship_fellowship_core.rs @@ -16,9 +16,9 @@ //! Autogenerated weights for `pallet_core_fellowship` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2025-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2025-08-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `e0f303704c84`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! HOSTNAME: `84c341e0cc82`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` //! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 // Executed Command: @@ -56,8 +56,8 @@ impl pallet_core_fellowship::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 7_297_000 picoseconds. - Weight::from_parts(7_627_000, 0) + // Minimum execution time: 7_455_000 picoseconds. + Weight::from_parts(8_021_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -67,8 +67,8 @@ impl pallet_core_fellowship::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `399` // Estimated: `1853` - // Minimum execution time: 12_682_000 picoseconds. - Weight::from_parts(13_216_000, 0) + // Minimum execution time: 12_844_000 picoseconds. + Weight::from_parts(13_388_000, 0) .saturating_add(Weight::from_parts(0, 1853)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -91,8 +91,8 @@ impl pallet_core_fellowship::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `66430` // Estimated: `69046` - // Minimum execution time: 152_458_000 picoseconds. - Weight::from_parts(157_010_000, 0) + // Minimum execution time: 136_300_000 picoseconds. + Weight::from_parts(139_333_000, 0) .saturating_add(Weight::from_parts(0, 69046)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(6)) @@ -113,10 +113,10 @@ impl pallet_core_fellowship::WeightInfo for WeightInfo< /// Proof: `FellowshipCollective::IndexToId` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`) fn bump_demote() -> Weight { // Proof Size summary in bytes: - // Measured: `66540` + // Measured: `66822` // Estimated: `69046` - // Minimum execution time: 158_587_000 picoseconds. - Weight::from_parts(161_550_000, 0) + // Minimum execution time: 146_172_000 picoseconds. + Weight::from_parts(149_061_000, 0) .saturating_add(Weight::from_parts(0, 69046)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(6)) @@ -129,8 +129,8 @@ impl pallet_core_fellowship::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `388` // Estimated: `3514` - // Minimum execution time: 18_716_000 picoseconds. - Weight::from_parts(19_932_000, 0) + // Minimum execution time: 18_312_000 picoseconds. + Weight::from_parts(18_790_000, 0) .saturating_add(Weight::from_parts(0, 3514)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -149,8 +149,8 @@ impl pallet_core_fellowship::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `146` // Estimated: `3514` - // Minimum execution time: 26_497_000 picoseconds. - Weight::from_parts(27_206_000, 0) + // Minimum execution time: 26_303_000 picoseconds. + Weight::from_parts(27_122_000, 0) .saturating_add(Weight::from_parts(0, 3514)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(5)) @@ -171,10 +171,10 @@ impl pallet_core_fellowship::WeightInfo for WeightInfo< /// Proof: `FellowshipCollective::IdToIndex` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`) fn promote() -> Weight { // Proof Size summary in bytes: - // Measured: `66083` + // Measured: `66062` // Estimated: `69046` - // Minimum execution time: 151_518_000 picoseconds. - Weight::from_parts(157_727_000, 0) + // Minimum execution time: 131_037_000 picoseconds. + Weight::from_parts(133_767_000, 0) .saturating_add(Weight::from_parts(0, 69046)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(6)) @@ -193,15 +193,15 @@ impl pallet_core_fellowship::WeightInfo for WeightInfo< /// Proof: `FellowshipCollective::IdToIndex` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`) /// The range of component `r` is `[1, 9]`. /// The range of component `r` is `[1, 9]`. - fn promote_fast(r: u16, ) -> Weight { + fn promote_fast(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `65996` // Estimated: `69046 + r * (2489 ±0)` - // Minimum execution time: 136_170_000 picoseconds. - Weight::from_parts(128_244_484, 0) + // Minimum execution time: 124_574_000 picoseconds. + Weight::from_parts(114_614_991, 0) .saturating_add(Weight::from_parts(0, 69046)) - // Standard Error: 57_831 - .saturating_add(Weight::from_parts(15_803_547, 0).saturating_mul(r.into())) + // Standard Error: 64_534 + .saturating_add(Weight::from_parts(17_415_815, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(3)) @@ -218,8 +218,8 @@ impl pallet_core_fellowship::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `293` // Estimated: `3514` - // Minimum execution time: 19_527_000 picoseconds. - Weight::from_parts(20_252_000, 0) + // Minimum execution time: 19_710_000 picoseconds. + Weight::from_parts(20_542_000, 0) .saturating_add(Weight::from_parts(0, 3514)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -232,8 +232,8 @@ impl pallet_core_fellowship::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `313` // Estimated: `3514` - // Minimum execution time: 16_904_000 picoseconds. - Weight::from_parts(17_395_000, 0) + // Minimum execution time: 16_592_000 picoseconds. + Weight::from_parts(17_755_000, 0) .saturating_add(Weight::from_parts(0, 3514)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -246,8 +246,8 @@ impl pallet_core_fellowship::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `313` // Estimated: `3514` - // Minimum execution time: 16_951_000 picoseconds. - Weight::from_parts(17_461_000, 0) + // Minimum execution time: 16_967_000 picoseconds. + Weight::from_parts(17_431_000, 0) .saturating_add(Weight::from_parts(0, 3514)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -262,8 +262,8 @@ impl pallet_core_fellowship::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `65995` // Estimated: `69046` - // Minimum execution time: 131_499_000 picoseconds. - Weight::from_parts(134_233_000, 0) + // Minimum execution time: 113_258_000 picoseconds. + Weight::from_parts(115_605_000, 0) .saturating_add(Weight::from_parts(0, 69046)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -276,8 +276,8 @@ impl pallet_core_fellowship::WeightInfo for WeightInfo< // Proof Size summary in bytes: // Measured: `79` // Estimated: `69046` - // Minimum execution time: 103_987_000 picoseconds. - Weight::from_parts(106_231_000, 0) + // Minimum execution time: 93_773_000 picoseconds. + Weight::from_parts(95_088_000, 0) .saturating_add(Weight::from_parts(0, 69046)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/prdoc/pr_9516.prdoc b/prdoc/pr_9516.prdoc new file mode 100644 index 0000000000000..0ef4dff270c1e --- /dev/null +++ b/prdoc/pr_9516.prdoc @@ -0,0 +1,9 @@ +title: Fix for `promote_fast` benchmark +doc: +- audience: Runtime Dev + description: Fixed benchmark generation/compilation for `promote_fast` `MaxRank` change from `u32` to `u16`. +crates: +- name: collectives-westend-runtime + bump: patch +- name: pallet-core-fellowship + bump: patch diff --git a/substrate/frame/core-fellowship/src/benchmarking.rs b/substrate/frame/core-fellowship/src/benchmarking.rs index 7fdec9748516f..fe1a34ba91b71 100644 --- a/substrate/frame/core-fellowship/src/benchmarking.rs +++ b/substrate/frame/core-fellowship/src/benchmarking.rs @@ -229,7 +229,7 @@ mod benchmarks { fn promote_fast( r: Linear<1, { ConvertU16ToU32::::get() }>, ) -> Result<(), BenchmarkError> { - // Get target rank for promotion. + // Get a target rank for promotion. let max_rank = T::MaxRank::get(); let target_rank = (r as u16).min(max_rank); diff --git a/substrate/frame/core-fellowship/src/lib.rs b/substrate/frame/core-fellowship/src/lib.rs index c4c542271df10..2192ec61ceba4 100644 --- a/substrate/frame/core-fellowship/src/lib.rs +++ b/substrate/frame/core-fellowship/src/lib.rs @@ -534,7 +534,7 @@ pub mod pallet { /// This is useful for out-of-band promotions, hence it has its own `FastPromoteOrigin` to /// be (possibly) more restrictive than `PromoteOrigin`. Note that the member must already /// be inducted. - #[pallet::weight(T::WeightInfo::promote_fast(*to_rank))] + #[pallet::weight(T::WeightInfo::promote_fast(*to_rank as u32))] #[pallet::call_index(10)] pub fn promote_fast( origin: OriginFor, diff --git a/substrate/frame/core-fellowship/src/weights.rs b/substrate/frame/core-fellowship/src/weights.rs index 25f6310addc92..9c0fffd3d05ec 100644 --- a/substrate/frame/core-fellowship/src/weights.rs +++ b/substrate/frame/core-fellowship/src/weights.rs @@ -79,7 +79,7 @@ pub trait WeightInfo { fn set_active() -> Weight; fn induct() -> Weight; fn promote() -> Weight; - fn promote_fast(r: u16, ) -> Weight; + fn promote_fast(r: u32, ) -> Weight; fn offboard() -> Weight; fn import() -> Weight; fn import_member() -> Weight; @@ -225,7 +225,7 @@ impl WeightInfo for SubstrateWeight { /// Storage: `RankedCollective::IdToIndex` (r:0 w:9) /// Proof: `RankedCollective::IdToIndex` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`) /// The range of component `r` is `[1, 9]`. - fn promote_fast(r: u16, ) -> Weight { + fn promote_fast(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `16665` // Estimated: `19894 + r * (2489 ±0)` @@ -447,7 +447,7 @@ impl WeightInfo for () { /// Storage: `RankedCollective::IdToIndex` (r:0 w:9) /// Proof: `RankedCollective::IdToIndex` (`max_values`: None, `max_size`: Some(54), added: 2529, mode: `MaxEncodedLen`) /// The range of component `r` is `[1, 9]`. - fn promote_fast(r: u16, ) -> Weight { + fn promote_fast(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `16665` // Estimated: `19894 + r * (2489 ±0)` From f8cb94c99bca3eae4f6504e21e6976fa5004c370 Mon Sep 17 00:00:00 2001 From: "paritytech-release-backport-bot[bot]" <191369287+paritytech-release-backport-bot[bot]@users.noreply.github.com> Date: Wed, 20 Aug 2025 08:37:55 +0000 Subject: [PATCH 062/128] [stable2506] Backport #9514 (#9522) Backport #9514 into `stable2506` from bkontur. See the [documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md) on how to use this bot. Co-authored-by: Branislav Kontur Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .../parachains/src/paras/benchmarking.rs | 1 + polkadot/runtime/parachains/src/paras/mod.rs | 7 +- .../runtime/parachains/src/paras/tests.rs | 36 +++++- .../polkadot_runtime_parachains_paras.rs | 116 ++++++++++-------- prdoc/pr_9514.prdoc | 10 ++ 5 files changed, 113 insertions(+), 57 deletions(-) create mode 100644 prdoc/pr_9514.prdoc diff --git a/polkadot/runtime/parachains/src/paras/benchmarking.rs b/polkadot/runtime/parachains/src/paras/benchmarking.rs index 252d5eac21fb3..16892aad3d467 100644 --- a/polkadot/runtime/parachains/src/paras/benchmarking.rs +++ b/polkadot/runtime/parachains/src/paras/benchmarking.rs @@ -288,6 +288,7 @@ mod benchmarks { let code = ValidationCode(vec![0; 32]); let new_code_hash = code.hash(); let valid_period = BlockNumberFor::::from(1_000_000_u32); + ParaLifecycles::::insert(¶_id, ParaLifecycle::Parachain); #[extrinsic_call] _(RawOrigin::Root, para_id, new_code_hash, valid_period); diff --git a/polkadot/runtime/parachains/src/paras/mod.rs b/polkadot/runtime/parachains/src/paras/mod.rs index a7b8ee669e229..877a5d0d0244f 100644 --- a/polkadot/runtime/parachains/src/paras/mod.rs +++ b/polkadot/runtime/parachains/src/paras/mod.rs @@ -1297,11 +1297,13 @@ pub mod pallet { valid_period: BlockNumberFor, ) -> DispatchResult { T::AuthorizeCurrentCodeOrigin::ensure_origin(origin, ¶)?; + // The requested para must be a valid para (neither onboarding nor offboarding). + ensure!(Self::is_valid_para(para), Error::::NotRegistered); let now = frame_system::Pallet::::block_number(); let expire_at = now.saturating_add(valid_period); - // insert authorized code hash and make sure to overwrite existing one for a para. + // Insert the authorized code hash and ensure it overwrites the existing one for a para. AuthorizedCodeHash::::insert( ¶, AuthorizedCodeHashAndExpiry::from((new_code_hash, expire_at)), @@ -1324,7 +1326,7 @@ pub mod pallet { para: ParaId, new_code: ValidationCode, ) -> DispatchResultWithPostInfo { - // no need to ensure, anybody can do this + // no need to ensure anybody can do this // Ensure `new_code` is authorized let _ = Self::validate_code_is_authorized(&new_code, ¶)?; @@ -1586,6 +1588,7 @@ impl Pallet { UpgradeGoAheadSignal::::remove(¶); UpgradeRestrictionSignal::::remove(¶); ParaLifecycles::::remove(¶); + AuthorizedCodeHash::::remove(¶); let removed_future_code_hash = FutureCodeHash::::take(¶); if let Some(removed_future_code_hash) = removed_future_code_hash { Self::decrease_code_ref(&removed_future_code_hash); diff --git a/polkadot/runtime/parachains/src/paras/tests.rs b/polkadot/runtime/parachains/src/paras/tests.rs index a1e51974f389e..1d4550a2381fa 100644 --- a/polkadot/runtime/parachains/src/paras/tests.rs +++ b/polkadot/runtime/parachains/src/paras/tests.rs @@ -945,6 +945,11 @@ fn full_parachain_cleanup_storage() { run_to_block(7, None); assert_eq!(frame_system::Pallet::::block_number(), 7); Paras::note_new_head(para_id, Default::default(), expected_at); + AuthorizedCodeHash::::insert( + ¶_id, + AuthorizedCodeHashAndExpiry::from((ValidationCode(vec![7]).hash(), 1000)), + ); + assert!(AuthorizedCodeHash::::get(¶_id).is_some()); assert_ok!(Paras::schedule_para_cleanup(para_id)); @@ -968,6 +973,7 @@ fn full_parachain_cleanup_storage() { assert!(FutureCodeUpgrades::::get(¶_id).is_none()); assert!(FutureCodeHash::::get(¶_id).is_none()); assert!(Paras::current_code(¶_id).is_none()); + assert!(AuthorizedCodeHash::::get(¶_id).is_none()); // run to do the final cleanup let cleaned_up_at = 8 + code_retention_period + 1; @@ -2173,7 +2179,33 @@ fn authorize_force_set_current_code_hash_works() { DispatchError::BadOrigin, ); - // root can authorize + // para not registered + ParaLifecycles::::insert(¶_a, ParaLifecycle::Onboarding); + assert!(!Paras::is_valid_para(para_a)); + assert_err!( + Paras::authorize_force_set_current_code_hash( + RuntimeOrigin::root(), + para_a, + code_1_hash, + valid_period + ), + Error::::NotRegistered, + ); + ParaLifecycles::::insert(¶_a, ParaLifecycle::OffboardingParachain); + assert!(!Paras::is_valid_para(para_a)); + assert_err!( + Paras::authorize_force_set_current_code_hash( + RuntimeOrigin::root(), + para_a, + code_1_hash, + valid_period + ), + Error::::NotRegistered, + ); + + // root can authorize for registered para + ParaLifecycles::::insert(¶_a, ParaLifecycle::Parachain); + assert!(Paras::is_valid_para(para_a)); System::set_block_number(1); assert_ok!(Paras::authorize_force_set_current_code_hash( RuntimeOrigin::root(), @@ -2185,6 +2217,8 @@ fn authorize_force_set_current_code_hash_works() { AuthorizedCodeHash::::get(¶_a), Some((code_1_hash, 1 + valid_period).into()) ); + ParaLifecycles::::insert(¶_b, ParaLifecycle::Parachain); + assert!(Paras::is_valid_para(para_b)); System::set_block_number(5); assert_ok!(Paras::authorize_force_set_current_code_hash( RuntimeOrigin::root(), diff --git a/polkadot/runtime/westend/src/weights/polkadot_runtime_parachains_paras.rs b/polkadot/runtime/westend/src/weights/polkadot_runtime_parachains_paras.rs index 91fb426933b7c..653705c907320 100644 --- a/polkadot/runtime/westend/src/weights/polkadot_runtime_parachains_paras.rs +++ b/polkadot/runtime/westend/src/weights/polkadot_runtime_parachains_paras.rs @@ -17,9 +17,9 @@ //! Autogenerated weights for `polkadot_runtime_parachains::paras` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2025-03-04, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2025-08-19, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `299f3957073a`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` +//! HOSTNAME: `1d17579cdeaf`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` //! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024 // Executed Command: @@ -68,11 +68,11 @@ impl polkadot_runtime_parachains::paras::WeightInfo for // Proof Size summary in bytes: // Measured: `8309` // Estimated: `11774` - // Minimum execution time: 38_137_000 picoseconds. - Weight::from_parts(38_981_000, 0) + // Minimum execution time: 36_757_000 picoseconds. + Weight::from_parts(37_351_000, 0) .saturating_add(Weight::from_parts(0, 11774)) - // Standard Error: 129 - .saturating_add(Weight::from_parts(13_542, 0).saturating_mul(c.into())) + // Standard Error: 5 + .saturating_add(Weight::from_parts(2_469, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(6)) } @@ -83,11 +83,11 @@ impl polkadot_runtime_parachains::paras::WeightInfo for // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_970_000 picoseconds. - Weight::from_parts(7_230_000, 0) + // Minimum execution time: 7_337_000 picoseconds. + Weight::from_parts(21_463_534, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 42 - .saturating_add(Weight::from_parts(4_548, 0).saturating_mul(s.into())) + // Standard Error: 2 + .saturating_add(Weight::from_parts(929, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Paras::MostRecentContext` (r:0 w:1) @@ -96,8 +96,8 @@ impl polkadot_runtime_parachains::paras::WeightInfo for // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_539_000 picoseconds. - Weight::from_parts(3_836_000, 0) + // Minimum execution time: 3_744_000 picoseconds. + Weight::from_parts(3_970_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -124,11 +124,11 @@ impl polkadot_runtime_parachains::paras::WeightInfo for // Proof Size summary in bytes: // Measured: `8452` // Estimated: `11917` - // Minimum execution time: 52_993_000 picoseconds. - Weight::from_parts(53_656_000, 0) + // Minimum execution time: 52_945_000 picoseconds. + Weight::from_parts(53_953_000, 0) .saturating_add(Weight::from_parts(0, 11917)) - // Standard Error: 132 - .saturating_add(Weight::from_parts(13_454, 0).saturating_mul(c.into())) + // Standard Error: 3 + .saturating_add(Weight::from_parts(2_449, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(7)) } @@ -145,11 +145,11 @@ impl polkadot_runtime_parachains::paras::WeightInfo for // Proof Size summary in bytes: // Measured: `268` // Estimated: `3733` - // Minimum execution time: 14_784_000 picoseconds. - Weight::from_parts(15_216_000, 0) + // Minimum execution time: 15_247_000 picoseconds. + Weight::from_parts(35_253_573, 0) .saturating_add(Weight::from_parts(0, 3733)) - // Standard Error: 42 - .saturating_add(Weight::from_parts(4_570, 0).saturating_mul(s.into())) + // Standard Error: 2 + .saturating_add(Weight::from_parts(935, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -161,8 +161,8 @@ impl polkadot_runtime_parachains::paras::WeightInfo for // Proof Size summary in bytes: // Measured: `4312` // Estimated: `7777` - // Minimum execution time: 24_300_000 picoseconds. - Weight::from_parts(25_154_000, 0) + // Minimum execution time: 22_007_000 picoseconds. + Weight::from_parts(22_746_000, 0) .saturating_add(Weight::from_parts(0, 7777)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -180,11 +180,11 @@ impl polkadot_runtime_parachains::paras::WeightInfo for // Proof Size summary in bytes: // Measured: `683` // Estimated: `4148` - // Minimum execution time: 91_676_000 picoseconds. - Weight::from_parts(93_066_000, 0) + // Minimum execution time: 91_762_000 picoseconds. + Weight::from_parts(92_492_215, 0) .saturating_add(Weight::from_parts(0, 4148)) - // Standard Error: 127 - .saturating_add(Weight::from_parts(12_834, 0).saturating_mul(c.into())) + // Standard Error: 5 + .saturating_add(Weight::from_parts(1_951, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -196,8 +196,8 @@ impl polkadot_runtime_parachains::paras::WeightInfo for // Proof Size summary in bytes: // Measured: `28` // Estimated: `3493` - // Minimum execution time: 6_886_000 picoseconds. - Weight::from_parts(7_123_000, 0) + // Minimum execution time: 7_076_000 picoseconds. + Weight::from_parts(7_394_000, 0) .saturating_add(Weight::from_parts(0, 3493)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -212,8 +212,8 @@ impl polkadot_runtime_parachains::paras::WeightInfo for // Proof Size summary in bytes: // Measured: `26706` // Estimated: `30171` - // Minimum execution time: 114_157_000 picoseconds. - Weight::from_parts(120_289_000, 0) + // Minimum execution time: 112_839_000 picoseconds. + Weight::from_parts(116_733_000, 0) .saturating_add(Weight::from_parts(0, 30171)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) @@ -234,8 +234,8 @@ impl polkadot_runtime_parachains::paras::WeightInfo for // Proof Size summary in bytes: // Measured: `27360` // Estimated: `30825` - // Minimum execution time: 727_795_000 picoseconds. - Weight::from_parts(754_623_000, 0) + // Minimum execution time: 753_885_000 picoseconds. + Weight::from_parts(780_076_000, 0) .saturating_add(Weight::from_parts(0, 30825)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(103)) @@ -250,8 +250,8 @@ impl polkadot_runtime_parachains::paras::WeightInfo for // Proof Size summary in bytes: // Measured: `27338` // Estimated: `30803` - // Minimum execution time: 110_002_000 picoseconds. - Weight::from_parts(117_296_000, 0) + // Minimum execution time: 109_551_000 picoseconds. + Weight::from_parts(115_723_000, 0) .saturating_add(Weight::from_parts(0, 30803)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) @@ -270,8 +270,8 @@ impl polkadot_runtime_parachains::paras::WeightInfo for // Proof Size summary in bytes: // Measured: `26728` // Estimated: `30193` - // Minimum execution time: 585_996_000 picoseconds. - Weight::from_parts(609_200_000, 0) + // Minimum execution time: 617_998_000 picoseconds. + Weight::from_parts(637_103_000, 0) .saturating_add(Weight::from_parts(0, 30193)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(3)) @@ -286,30 +286,38 @@ impl polkadot_runtime_parachains::paras::WeightInfo for // Proof Size summary in bytes: // Measured: `26706` // Estimated: `30171` - // Minimum execution time: 106_306_000 picoseconds. - Weight::from_parts(113_807_000, 0) + // Minimum execution time: 108_309_000 picoseconds. + Weight::from_parts(112_880_000, 0) .saturating_add(Weight::from_parts(0, 30171)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } - + /// Storage: `Paras::UpgradeCooldowns` (r:1 w:1) + /// Proof: `Paras::UpgradeCooldowns` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `Paras::UpgradeRestrictionSignal` (r:0 w:1) + /// Proof: `Paras::UpgradeRestrictionSignal` (`max_values`: None, `max_size`: None, mode: `Measured`) fn remove_upgrade_cooldown() -> Weight { - // JUST COPIED AND WILL BE UPDATED NEXT TIME - Weight::from_parts(107_759_000, 0) - .saturating_add(Weight::from_parts(0, 30171)) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(1)) + // Proof Size summary in bytes: + // Measured: `267` + // Estimated: `1752` + // Minimum execution time: 33_402_000 picoseconds. + Weight::from_parts(34_573_000, 0) + .saturating_add(Weight::from_parts(0, 1752)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) } - + /// Storage: `Paras::ParaLifecycles` (r:1 w:0) + /// Proof: `Paras::ParaLifecycles` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `Paras::AuthorizedCodeHash` (r:0 w:1) /// Proof: `Paras::AuthorizedCodeHash` (`max_values`: None, `max_size`: None, mode: `Measured`) fn authorize_force_set_current_code_hash() -> Weight { // Proof Size summary in bytes: - // Measured: `0` - // Estimated: `0` - // Minimum execution time: 8_112_000 picoseconds. - Weight::from_parts(8_401_000, 0) - .saturating_add(Weight::from_parts(0, 0)) + // Measured: `61` + // Estimated: `3526` + // Minimum execution time: 13_133_000 picoseconds. + Weight::from_parts(13_801_000, 0) + .saturating_add(Weight::from_parts(0, 3526)) + .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Paras::AuthorizedCodeHash` (r:1 w:1) @@ -325,11 +333,11 @@ impl polkadot_runtime_parachains::paras::WeightInfo for // Proof Size summary in bytes: // Measured: `132` // Estimated: `3597` - // Minimum execution time: 32_733_000 picoseconds. - Weight::from_parts(33_172_000, 0) + // Minimum execution time: 32_802_000 picoseconds. + Weight::from_parts(33_769_000, 0) .saturating_add(Weight::from_parts(0, 3597)) - // Standard Error: 133 - .saturating_add(Weight::from_parts(14_731, 0).saturating_mul(c.into())) + // Standard Error: 10 + .saturating_add(Weight::from_parts(3_966, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(4)) } diff --git a/prdoc/pr_9514.prdoc b/prdoc/pr_9514.prdoc new file mode 100644 index 0000000000000..c1b4e7f39d865 --- /dev/null +++ b/prdoc/pr_9514.prdoc @@ -0,0 +1,10 @@ +title: 'Paras: Clean up `AuthorizedCodeHash` when offboarding' +doc: +- audience: Runtime Dev + description: This PR updates the `Paras` pallet to clear entries in `AuthorizedCodeHash` + as part of the offboarding process. +crates: +- name: polkadot-runtime-parachains + bump: patch +- name: westend-runtime + bump: patch From 43425df3690582ba9150460a4f4ca2cacdd14161 Mon Sep 17 00:00:00 2001 From: "paritytech-release-backport-bot[bot]" <191369287+paritytech-release-backport-bot[bot]@users.noreply.github.com> Date: Mon, 1 Sep 2025 08:15:54 +0200 Subject: [PATCH 063/128] [stable2506] Backport #9544 (#9599) Backport #9544 into `stable2506` from franciscoaguirre. See the [documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md) on how to use this bot. Co-authored-by: Francisco Aguirre Co-authored-by: Karol Kokoszka --- .../src/tests/reserve_transfer.rs | 117 +++++++++++++++--- .../src/tests/reserve_transfer.rs | 117 +++++++++++++++--- .../src/tests/asset_transfers.rs | 6 +- .../bridge-hub-rococo/src/tests/mod.rs | 23 +++- .../bridge-hub-rococo/src/tests/send_xcm.rs | 5 +- .../src/tests/asset_transfers.rs | 6 +- .../bridge-hub-westend/src/tests/mod.rs | 23 +++- .../bridge-hub-westend/src/tests/send_xcm.rs | 9 +- .../src/tests/snowbridge.rs | 32 +++-- .../assets/asset-hub-rococo/src/lib.rs | 25 +++- .../assets/asset-hub-westend/src/lib.rs | 25 +++- .../assets/test-utils/src/test_cases.rs | 19 ++- .../test-utils/src/test_cases_over_bridge.rs | 21 +++- polkadot/runtime/rococo/src/lib.rs | 9 +- .../runtime/rococo/src/weights/pallet_xcm.rs | 28 ++--- polkadot/runtime/westend/src/lib.rs | 9 +- .../runtime/westend/src/weights/pallet_xcm.rs | 28 ++--- .../cookbook/relay_token_transactor/tests.rs | 22 ++-- polkadot/xcm/pallet-xcm/src/lib.rs | 10 ++ .../src/transfer_assets_validation.rs | 2 +- prdoc/pr_9544.prdoc | 35 ++++++ 21 files changed, 430 insertions(+), 141 deletions(-) create mode 100644 prdoc/pr_9544.prdoc diff --git a/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/src/tests/reserve_transfer.rs b/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/src/tests/reserve_transfer.rs index 7c5dc8570cab3..d349fb459678a 100644 --- a/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/src/tests/reserve_transfer.rs +++ b/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/src/tests/reserve_transfer.rs @@ -515,35 +515,86 @@ fn relay_to_para_reserve_transfer_assets(t: RelayToParaTest) -> DispatchResult { unimplemented!("Destination is not a parachain?") }; + type Runtime = ::Runtime; + let remote_fee_id: AssetId = t + .args + .assets + .clone() + .into_inner() + .get(t.args.fee_asset_item as usize) + .ok_or(pallet_xcm::Error::::Empty)? + .clone() + .id; + Dmp::make_parachain_reachable(para_id); - ::XcmPallet::limited_reserve_transfer_assets( + ::XcmPallet::transfer_assets_using_type_and_then( t.signed_origin, bx!(t.args.dest.into()), - bx!(t.args.beneficiary.into()), bx!(t.args.assets.into()), - t.args.fee_asset_item, + bx!(TransferType::LocalReserve), + bx!(remote_fee_id.into()), + bx!(TransferType::LocalReserve), + bx!(VersionedXcm::from( + Xcm::<()>::builder_unsafe() + .deposit_asset(AllCounted(1), t.args.beneficiary) + .build() + )), t.args.weight_limit, ) } fn para_to_relay_reserve_transfer_assets(t: ParaToRelayTest) -> DispatchResult { - ::PolkadotXcm::limited_reserve_transfer_assets( + type Runtime = ::Runtime; + let remote_fee_id: AssetId = t + .args + .assets + .clone() + .into_inner() + .get(t.args.fee_asset_item as usize) + .ok_or(pallet_xcm::Error::::Empty)? + .clone() + .id; + + ::PolkadotXcm::transfer_assets_using_type_and_then( t.signed_origin, bx!(t.args.dest.into()), - bx!(t.args.beneficiary.into()), bx!(t.args.assets.into()), - t.args.fee_asset_item, + bx!(TransferType::DestinationReserve), + bx!(remote_fee_id.into()), + bx!(TransferType::DestinationReserve), + bx!(VersionedXcm::from( + Xcm::<()>::builder_unsafe() + .deposit_asset(AllCounted(1), t.args.beneficiary) + .build() + )), t.args.weight_limit, ) } fn system_para_to_para_reserve_transfer_assets(t: SystemParaToParaTest) -> DispatchResult { - ::PolkadotXcm::limited_reserve_transfer_assets( + type Runtime = ::Runtime; + let remote_fee_id: AssetId = t + .args + .assets + .clone() + .into_inner() + .get(t.args.fee_asset_item as usize) + .ok_or(pallet_xcm::Error::::Empty)? + .clone() + .id; + + ::PolkadotXcm::transfer_assets_using_type_and_then( t.signed_origin, bx!(t.args.dest.into()), - bx!(t.args.beneficiary.into()), bx!(t.args.assets.into()), - t.args.fee_asset_item, + bx!(TransferType::LocalReserve), + bx!(remote_fee_id.into()), + bx!(TransferType::LocalReserve), + bx!(VersionedXcm::from( + Xcm::<()>::builder_unsafe() + .deposit_asset(AllCounted(2), t.args.beneficiary) + .build() + )), t.args.weight_limit, ) } @@ -562,12 +613,29 @@ fn para_to_para_through_asset_hub_limited_reserve_transfer_assets( } fn para_to_system_para_reserve_transfer_assets(t: ParaToSystemParaTest) -> DispatchResult { - ::PolkadotXcm::limited_reserve_transfer_assets( + type Runtime = ::Runtime; + let remote_fee_id: AssetId = t + .args + .assets + .clone() + .into_inner() + .get(t.args.fee_asset_item as usize) + .ok_or(pallet_xcm::Error::::Empty)? + .clone() + .id; + + ::PolkadotXcm::transfer_assets_using_type_and_then( t.signed_origin, bx!(t.args.dest.into()), - bx!(t.args.beneficiary.into()), bx!(t.args.assets.into()), - t.args.fee_asset_item, + bx!(TransferType::DestinationReserve), + bx!(remote_fee_id.into()), + bx!(TransferType::DestinationReserve), + bx!(VersionedXcm::from( + Xcm::<()>::builder_unsafe() + .deposit_asset(AllCounted(2), t.args.beneficiary) + .build() + )), t.args.weight_limit, ) } @@ -579,15 +647,34 @@ fn para_to_para_through_relay_limited_reserve_transfer_assets( unimplemented!("Destination is not a parachain?") }; + type Runtime = ::Runtime; + let remote_fee_id: AssetId = t + .args + .assets + .clone() + .into_inner() + .get(t.args.fee_asset_item as usize) + .ok_or(pallet_xcm::Error::::Empty)? + .clone() + .id; + + let relay_location = VersionedLocation::from(Location::parent()); + Rococo::ext_wrapper(|| { Dmp::make_parachain_reachable(para_id); }); - ::PolkadotXcm::limited_reserve_transfer_assets( + ::PolkadotXcm::transfer_assets_using_type_and_then( t.signed_origin, bx!(t.args.dest.into()), - bx!(t.args.beneficiary.into()), bx!(t.args.assets.into()), - t.args.fee_asset_item, + bx!(TransferType::RemoteReserve(relay_location.clone())), + bx!(remote_fee_id.into()), + bx!(TransferType::RemoteReserve(relay_location)), + bx!(VersionedXcm::from( + Xcm::<()>::builder_unsafe() + .deposit_asset(AllCounted(1), t.args.beneficiary) + .build() + )), t.args.weight_limit, ) } diff --git a/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/src/tests/reserve_transfer.rs b/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/src/tests/reserve_transfer.rs index 666ca83bf47a3..7738e36e5d728 100644 --- a/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/src/tests/reserve_transfer.rs +++ b/cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/src/tests/reserve_transfer.rs @@ -526,46 +526,114 @@ fn relay_to_para_reserve_transfer_assets(t: RelayToParaTest) -> DispatchResult { unimplemented!("Destination is not a parachain?") }; + type Runtime = ::Runtime; + let remote_fee_id: AssetId = t + .args + .assets + .clone() + .into_inner() + .get(t.args.fee_asset_item as usize) + .ok_or(pallet_xcm::Error::::Empty)? + .clone() + .id; + Dmp::make_parachain_reachable(para_id); - ::XcmPallet::limited_reserve_transfer_assets( + ::XcmPallet::transfer_assets_using_type_and_then( t.signed_origin, bx!(t.args.dest.into()), - bx!(t.args.beneficiary.into()), bx!(t.args.assets.into()), - t.args.fee_asset_item, + bx!(TransferType::LocalReserve), + bx!(remote_fee_id.into()), + bx!(TransferType::LocalReserve), + bx!(VersionedXcm::from( + Xcm::<()>::builder_unsafe() + .deposit_asset(AllCounted(1), t.args.beneficiary) + .build() + )), t.args.weight_limit, ) } fn para_to_relay_reserve_transfer_assets(t: ParaToRelayTest) -> DispatchResult { - ::PolkadotXcm::limited_reserve_transfer_assets( + type Runtime = ::Runtime; + let remote_fee_id: AssetId = t + .args + .assets + .clone() + .into_inner() + .get(t.args.fee_asset_item as usize) + .ok_or(pallet_xcm::Error::::Empty)? + .clone() + .id; + + ::PolkadotXcm::transfer_assets_using_type_and_then( t.signed_origin, bx!(t.args.dest.into()), - bx!(t.args.beneficiary.into()), bx!(t.args.assets.into()), - t.args.fee_asset_item, + bx!(TransferType::DestinationReserve), + bx!(remote_fee_id.into()), + bx!(TransferType::DestinationReserve), + bx!(VersionedXcm::from( + Xcm::<()>::builder_unsafe() + .deposit_asset(AllCounted(1), t.args.beneficiary) + .build() + )), t.args.weight_limit, ) } fn system_para_to_para_reserve_transfer_assets(t: SystemParaToParaTest) -> DispatchResult { - ::PolkadotXcm::limited_reserve_transfer_assets( + type Runtime = ::Runtime; + let remote_fee_id: AssetId = t + .args + .assets + .clone() + .into_inner() + .get(t.args.fee_asset_item as usize) + .ok_or(pallet_xcm::Error::::Empty)? + .clone() + .id; + + ::PolkadotXcm::transfer_assets_using_type_and_then( t.signed_origin, bx!(t.args.dest.into()), - bx!(t.args.beneficiary.into()), bx!(t.args.assets.into()), - t.args.fee_asset_item, + bx!(TransferType::LocalReserve), + bx!(remote_fee_id.into()), + bx!(TransferType::LocalReserve), + bx!(VersionedXcm::from( + Xcm::<()>::builder_unsafe() + .deposit_asset(AllCounted(2), t.args.beneficiary) + .build() + )), t.args.weight_limit, ) } fn para_to_system_para_reserve_transfer_assets(t: ParaToSystemParaTest) -> DispatchResult { - ::PolkadotXcm::limited_reserve_transfer_assets( + type Runtime = ::Runtime; + let remote_fee_id: AssetId = t + .args + .assets + .clone() + .into_inner() + .get(t.args.fee_asset_item as usize) + .ok_or(pallet_xcm::Error::::Empty)? + .clone() + .id; + + ::PolkadotXcm::transfer_assets_using_type_and_then( t.signed_origin, bx!(t.args.dest.into()), - bx!(t.args.beneficiary.into()), bx!(t.args.assets.into()), - t.args.fee_asset_item, + bx!(TransferType::DestinationReserve), + bx!(remote_fee_id.into()), + bx!(TransferType::DestinationReserve), + bx!(VersionedXcm::from( + Xcm::<()>::builder_unsafe() + .deposit_asset(AllCounted(2), t.args.beneficiary) + .build() + )), t.args.weight_limit, ) } @@ -577,15 +645,34 @@ fn para_to_para_through_relay_limited_reserve_transfer_assets( unimplemented!("Destination is not a parachain?") }; + type Runtime = ::Runtime; + let remote_fee_id: AssetId = t + .args + .assets + .clone() + .into_inner() + .get(t.args.fee_asset_item as usize) + .ok_or(pallet_xcm::Error::::Empty)? + .clone() + .id; + + let relay_location = VersionedLocation::from(Location::parent()); + Westend::ext_wrapper(|| { Dmp::make_parachain_reachable(para_id); }); - ::PolkadotXcm::limited_reserve_transfer_assets( + ::PolkadotXcm::transfer_assets_using_type_and_then( t.signed_origin, bx!(t.args.dest.into()), - bx!(t.args.beneficiary.into()), bx!(t.args.assets.into()), - t.args.fee_asset_item, + bx!(TransferType::RemoteReserve(relay_location.clone())), + bx!(remote_fee_id.into()), + bx!(TransferType::RemoteReserve(relay_location)), + bx!(VersionedXcm::from( + Xcm::<()>::builder_unsafe() + .deposit_asset(AllCounted(1), t.args.beneficiary) + .build() + )), t.args.weight_limit, ) } diff --git a/cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-rococo/src/tests/asset_transfers.rs b/cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-rococo/src/tests/asset_transfers.rs index 20ba9e4801379..b07492d6a89dc 100644 --- a/cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-rococo/src/tests/asset_transfers.rs +++ b/cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-rococo/src/tests/asset_transfers.rs @@ -131,7 +131,8 @@ fn send_roc_from_asset_hub_rococo_to_asset_hub_westend() { let destination = asset_hub_westend_location(); let assets: Assets = (roc_at_asset_hub_rococo.clone(), amount).into(); let fee_idx = 0; - assert_ok!(send_assets_from_asset_hub_rococo(destination, assets, fee_idx)); + let transfer_type = TransferType::LocalReserve; + assert_ok!(send_assets_from_asset_hub_rococo(destination, assets, fee_idx, transfer_type)); }); // verify expected events on final destination @@ -210,7 +211,8 @@ fn send_back_wnds_usdt_and_weth_from_asset_hub_rococo_to_asset_hub_westend() { let destination = asset_hub_westend_location(); let assets: Assets = (wnd_at_asset_hub_rococo.clone(), amount_to_send).into(); let fee_idx = 0; - assert_ok!(send_assets_from_asset_hub_rococo(destination, assets, fee_idx)); + let transfer_type = TransferType::DestinationReserve; + assert_ok!(send_assets_from_asset_hub_rococo(destination, assets, fee_idx, transfer_type)); }); AssetHubWestend::execute_with(|| { diff --git a/cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-rococo/src/tests/mod.rs b/cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-rococo/src/tests/mod.rs index 890a0d4b0b97c..6e67372fb9f35 100644 --- a/cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-rococo/src/tests/mod.rs +++ b/cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-rococo/src/tests/mod.rs @@ -173,19 +173,36 @@ pub(crate) fn send_assets_from_asset_hub_rococo( destination: Location, assets: Assets, fee_idx: u32, + // For knowing what reserve to pick. + // We only allow using the same transfer type for assets and fees right now. + // And only `LocalReserve` or `DestinationReserve`. + transfer_type: TransferType, ) -> DispatchResult { let signed_origin = ::RuntimeOrigin::signed(AssetHubRococoSender::get()); let beneficiary: Location = AccountId32Junction { network: None, id: AssetHubWestendReceiver::get().into() }.into(); + type Runtime = ::Runtime; + let remote_fee_id: AssetId = assets + .clone() + .into_inner() + .get(fee_idx as usize) + .ok_or(pallet_xcm::Error::::Empty)? + .clone() + .id; + AssetHubRococo::execute_with(|| { - ::PolkadotXcm::limited_reserve_transfer_assets( + ::PolkadotXcm::transfer_assets_using_type_and_then( signed_origin, bx!(destination.into()), - bx!(beneficiary.into()), bx!(assets.into()), - fee_idx, + bx!(transfer_type.clone()), + bx!(remote_fee_id.into()), + bx!(transfer_type), + bx!(VersionedXcm::from( + Xcm::<()>::builder_unsafe().deposit_asset(AllCounted(1), beneficiary).build() + )), WeightLimit::Unlimited, ) }) diff --git a/cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-rococo/src/tests/send_xcm.rs b/cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-rococo/src/tests/send_xcm.rs index 799af03786975..64f02ef4baead 100644 --- a/cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-rococo/src/tests/send_xcm.rs +++ b/cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-rococo/src/tests/send_xcm.rs @@ -87,7 +87,8 @@ fn send_xcm_through_opened_lane_with_different_xcm_version_on_hops_works() { send_assets_from_asset_hub_rococo( destination.clone(), (native_token.clone(), amount).into(), - 0 + 0, + TransferType::LocalReserve ), DispatchError::Module(sp_runtime::ModuleError { index: 31, @@ -109,6 +110,7 @@ fn send_xcm_through_opened_lane_with_different_xcm_version_on_hops_works() { destination.clone(), (native_token.clone(), amount).into(), 0, + TransferType::LocalReserve )); // `ExportMessage` on local BridgeHub - fails - remote BridgeHub version not known @@ -127,6 +129,7 @@ fn send_xcm_through_opened_lane_with_different_xcm_version_on_hops_works() { destination.clone(), (native_token.clone(), amount).into(), 0, + TransferType::LocalReserve )); assert_bridge_hub_rococo_message_accepted(true); assert_bridge_hub_westend_message_received(); diff --git a/cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-westend/src/tests/asset_transfers.rs b/cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-westend/src/tests/asset_transfers.rs index fe4ed3d662107..a9d3b11b37ff8 100644 --- a/cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-westend/src/tests/asset_transfers.rs +++ b/cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-westend/src/tests/asset_transfers.rs @@ -157,7 +157,8 @@ fn send_wnds_usdt_and_weth_from_asset_hub_westend_to_asset_hub_rococo() { let destination = asset_hub_rococo_location(); let assets: Assets = (wnd_at_asset_hub_westend, amount).into(); let fee_idx = 0; - assert_ok!(send_assets_from_asset_hub_westend(destination, assets, fee_idx)); + let transfer_type = TransferType::LocalReserve; + assert_ok!(send_assets_from_asset_hub_westend(destination, assets, fee_idx, transfer_type)); }); // verify expected events on final destination @@ -302,7 +303,8 @@ fn send_back_rocs_from_asset_hub_westend_to_asset_hub_rococo() { let destination = asset_hub_rococo_location(); let assets: Assets = (bridged_roc_at_asset_hub_westend.clone(), amount_to_send).into(); let fee_idx = 0; - assert_ok!(send_assets_from_asset_hub_westend(destination, assets, fee_idx)); + let transfer_type = TransferType::DestinationReserve; + assert_ok!(send_assets_from_asset_hub_westend(destination, assets, fee_idx, transfer_type)); }); AssetHubRococo::execute_with(|| { diff --git a/cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-westend/src/tests/mod.rs b/cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-westend/src/tests/mod.rs index 8545984038182..332bfc0f0feb6 100644 --- a/cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-westend/src/tests/mod.rs +++ b/cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-westend/src/tests/mod.rs @@ -136,19 +136,36 @@ pub(crate) fn send_assets_from_asset_hub_westend( destination: Location, assets: Assets, fee_idx: u32, + // For knowing what reserve to pick. + // We only allow using the same transfer type for assets and fees right now. + // And only `LocalReserve` or `DestinationReserve`. + transfer_type: TransferType, ) -> DispatchResult { let signed_origin = ::RuntimeOrigin::signed(AssetHubWestendSender::get().into()); let beneficiary: Location = AccountId32Junction { network: None, id: AssetHubRococoReceiver::get().into() }.into(); + type Runtime = ::Runtime; + let remote_fee_id: AssetId = assets + .clone() + .into_inner() + .get(fee_idx as usize) + .ok_or(pallet_xcm::Error::::Empty)? + .clone() + .id; + AssetHubWestend::execute_with(|| { - ::PolkadotXcm::limited_reserve_transfer_assets( + ::PolkadotXcm::transfer_assets_using_type_and_then( signed_origin, bx!(destination.into()), - bx!(beneficiary.into()), bx!(assets.into()), - fee_idx, + bx!(transfer_type.clone()), + bx!(remote_fee_id.into()), + bx!(transfer_type), + bx!(VersionedXcm::from( + Xcm::<()>::builder_unsafe().deposit_asset(AllCounted(1), beneficiary).build() + )), WeightLimit::Unlimited, ) }) diff --git a/cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-westend/src/tests/send_xcm.rs b/cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-westend/src/tests/send_xcm.rs index 512ab4e1c6d76..7c5bb0d4adb0a 100644 --- a/cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-westend/src/tests/send_xcm.rs +++ b/cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-westend/src/tests/send_xcm.rs @@ -91,7 +91,8 @@ fn send_xcm_through_opened_lane_with_different_xcm_version_on_hops_works() { send_assets_from_asset_hub_westend( destination.clone(), (native_token.clone(), amount).into(), - 0 + 0, + TransferType::LocalReserve ), DispatchError::Module(sp_runtime::ModuleError { index: 31, @@ -112,7 +113,8 @@ fn send_xcm_through_opened_lane_with_different_xcm_version_on_hops_works() { assert_ok!(send_assets_from_asset_hub_westend( destination.clone(), (native_token.clone(), amount).into(), - 0 + 0, + TransferType::LocalReserve )); // `ExportMessage` on local BridgeHub - fails - remote BridgeHub version not known @@ -130,7 +132,8 @@ fn send_xcm_through_opened_lane_with_different_xcm_version_on_hops_works() { assert_ok!(send_assets_from_asset_hub_westend( destination.clone(), (native_token.clone(), amount).into(), - 0 + 0, + TransferType::LocalReserve )); assert_bridge_hub_westend_message_accepted(true); assert_bridge_hub_rococo_message_received(); diff --git a/cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-westend/src/tests/snowbridge.rs b/cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-westend/src/tests/snowbridge.rs index 09920ed00f2cd..994b4566569ac 100644 --- a/cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-westend/src/tests/snowbridge.rs +++ b/cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-westend/src/tests/snowbridge.rs @@ -873,17 +873,23 @@ fn transfer_relay_token() { [GlobalConsensus(Ethereum { chain_id: SEPOLIA_ID })], )); - let beneficiary = VersionedLocation::from(Location::new( + let beneficiary = Location::new( 0, [AccountKey20 { network: None, key: ETHEREUM_DESTINATION_ADDRESS.into() }], - )); + ); - assert_ok!(::PolkadotXcm::limited_reserve_transfer_assets( + assert_ok!(::PolkadotXcm::transfer_assets_using_type_and_then( RuntimeOrigin::signed(AssetHubWestendSender::get()), Box::new(destination), - Box::new(beneficiary), Box::new(versioned_assets), - 0, + Box::new(TransferType::LocalReserve), + Box::new(VersionedAssetId::from(AssetId(Location::parent()))), + Box::new(TransferType::LocalReserve), + Box::new(VersionedXcm::from( + Xcm::<()>::builder_unsafe() + .deposit_asset(AllCounted(1), beneficiary) + .build() + )), Unlimited, )); @@ -2229,17 +2235,23 @@ fn register_pna_in_v5_while_transfer_in_v4_should_work() { [GlobalConsensus(Ethereum { chain_id: SEPOLIA_ID })], )); - let beneficiary = VersionedLocation::V4(Location::new( + let beneficiary = Location::new( 0, [AccountKey20 { network: None, key: ETHEREUM_DESTINATION_ADDRESS.into() }], - )); + ); - assert_ok!(::PolkadotXcm::limited_reserve_transfer_assets( + assert_ok!(::PolkadotXcm::transfer_assets_using_type_and_then( RuntimeOrigin::signed(AssetHubWestendSender::get()), Box::new(destination), - Box::new(beneficiary), Box::new(versioned_assets), - 0, + Box::new(TransferType::LocalReserve), + Box::new(VersionedAssetId::V4(AssetId(Location::parent()))), + Box::new(TransferType::LocalReserve), + Box::new(VersionedXcm::V4( + Xcm::<()>::builder_unsafe() + .deposit_asset(WildAsset::AllCounted(1), beneficiary) + .build() + )), Unlimited, )); diff --git a/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs b/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs index 4160324404910..972aca44f513f 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs @@ -1745,12 +1745,27 @@ impl_runtime_apis! { } fn reserve_transferable_asset_and_dest() -> Option<(Asset, Location)> { + // We get an account to create USDT and give it enough WND to exist. + let account = frame_benchmarking::whitelisted_caller(); + assert_ok!(>::mint_into( + &account, + ExistentialDeposit::get() + (1_000 * UNITS) + )); + + // We then create USDT. + let usdt_id = 1984u32; + let usdt_location = Location::new(0, [PalletInstance(50), GeneralIndex(usdt_id.into())]); + assert_ok!(Assets::force_create( + RuntimeOrigin::root(), + usdt_id.into(), + account.clone().into(), + true, + 1 + )); + + // And return USDT as the reserve transferable asset. Some(( - Asset { - fun: Fungible(ExistentialDeposit::get()), - id: AssetId(Parent.into()) - }, - // AH can reserve transfer native token to some random parachain. + Asset { fun: Fungible(ExistentialDeposit::get()), id: AssetId(usdt_location) }, ParentThen(Parachain(RandomParaId::get().into()).into()).into(), )) } diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs index 5d7e2c953aecb..5358e6a1a3c99 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs @@ -1958,12 +1958,27 @@ pallet_revive::impl_runtime_apis_plus_revive!( } fn reserve_transferable_asset_and_dest() -> Option<(Asset, Location)> { + // We get an account to create USDT and give it enough WND to exist. + let account = frame_benchmarking::whitelisted_caller(); + assert_ok!(>::mint_into( + &account, + ExistentialDeposit::get() + (1_000 * UNITS) + )); + + // We then create USDT. + let usdt_id = 1984u32; + let usdt_location = Location::new(0, [PalletInstance(50), GeneralIndex(usdt_id.into())]); + assert_ok!(Assets::force_create( + RuntimeOrigin::root(), + usdt_id.into(), + account.clone().into(), + true, + 1 + )); + + // And return USDT as the reserve transferable asset. Some(( - Asset { - fun: Fungible(ExistentialDeposit::get()), - id: AssetId(Parent.into()) - }, - // AH can reserve transfer native token to some random parachain. + Asset { fun: Fungible(ExistentialDeposit::get()), id: AssetId(usdt_location) }, ParentThen(Parachain(RandomParaId::get().into()).into()).into(), )) } diff --git a/cumulus/parachains/runtimes/assets/test-utils/src/test_cases.rs b/cumulus/parachains/runtimes/assets/test-utils/src/test_cases.rs index 36494098edd87..422caa99da5eb 100644 --- a/cumulus/parachains/runtimes/assets/test-utils/src/test_cases.rs +++ b/cumulus/parachains/runtimes/assets/test-utils/src/test_cases.rs @@ -38,8 +38,11 @@ use sp_runtime::{ traits::{Block as BlockT, MaybeEquivalence, StaticLookup, Zero}, DispatchError, SaturatedConversion, Saturating, }; -use xcm::{latest::prelude::*, VersionedAssets}; -use xcm_executor::{traits::ConvertLocation, XcmExecutor}; +use xcm::{latest::prelude::*, VersionedAssetId, VersionedAssets, VersionedXcm}; +use xcm_executor::{ + traits::{ConvertLocation, TransferType}, + XcmExecutor, +}; use xcm_runtime_apis::fees::{ runtime_decl_for_xcm_payment_api::XcmPaymentApiV1, Error as XcmPaymentApiError, }; @@ -1529,12 +1532,18 @@ pub fn reserve_transfer_native_asset_to_non_teleport_para_works< Asset { fun: Fungible(balance_to_transfer.into()), id: AssetId(native_asset) }; // pallet_xcm call reserve transfer - assert_ok!(>::limited_reserve_transfer_assets( + assert_ok!(>::transfer_assets_using_type_and_then( RuntimeHelper::::origin_of(alice_account.clone()), Box::new(dest.clone().into_versioned()), - Box::new(dest_beneficiary.clone().into_versioned()), Box::new(VersionedAssets::from(Assets::from(asset_to_transfer))), - 0, + Box::new(TransferType::LocalReserve), + Box::new(VersionedAssetId::from(AssetId(Location::parent()))), + Box::new(TransferType::LocalReserve), + Box::new(VersionedXcm::from( + Xcm::<()>::builder_unsafe() + .deposit_asset(AllCounted(1), dest_beneficiary.clone()) + .build() + )), weight_limit, )); diff --git a/cumulus/parachains/runtimes/assets/test-utils/src/test_cases_over_bridge.rs b/cumulus/parachains/runtimes/assets/test-utils/src/test_cases_over_bridge.rs index 9b05f2d46dfb5..6c6549390a293 100644 --- a/cumulus/parachains/runtimes/assets/test-utils/src/test_cases_over_bridge.rs +++ b/cumulus/parachains/runtimes/assets/test-utils/src/test_cases_over_bridge.rs @@ -30,9 +30,12 @@ use parachains_runtimes_test_utils::{ SlotDurations, ValidatorIdOf, XcmReceivedFrom, }; use sp_runtime::{traits::StaticLookup, Saturating}; -use xcm::{latest::prelude::*, VersionedAssets}; +use xcm::{latest::prelude::*, VersionedAssetId, VersionedAssets, VersionedXcm}; use xcm_builder::{CreateMatcher, MatchXcm}; -use xcm_executor::{traits::ConvertLocation, XcmExecutor}; +use xcm_executor::{ + traits::{ConvertLocation, TransferType}, + XcmExecutor, +}; pub struct TestBridgingConfig { pub bridged_network: NetworkId, @@ -186,13 +189,19 @@ pub fn limited_reserve_transfer_assets_for_native_asset_works< let expected_beneficiary = target_destination_account.clone(); - // do pallet_xcm call reserve transfer - assert_ok!(>::limited_reserve_transfer_assets( + // do cross-chain transfer + assert_ok!(>::transfer_assets_using_type_and_then( RuntimeHelper::::origin_of(alice_account.clone()), Box::new(target_location_from_different_consensus.clone().into_versioned()), - Box::new(target_destination_account.into_versioned()), Box::new(VersionedAssets::from(assets_to_transfer)), - 0, + Box::new(TransferType::LocalReserve), + Box::new(VersionedAssetId::from(AssetId(Location::parent()))), + Box::new(TransferType::LocalReserve), + Box::new(VersionedXcm::from( + Xcm::<()>::builder_unsafe() + .deposit_asset(AllCounted(1), target_destination_account) + .build() + )), weight_limit, )); diff --git a/polkadot/runtime/rococo/src/lib.rs b/polkadot/runtime/rococo/src/lib.rs index b07296f0615fa..07644bd0a69b4 100644 --- a/polkadot/runtime/rococo/src/lib.rs +++ b/polkadot/runtime/rococo/src/lib.rs @@ -2556,14 +2556,7 @@ sp_api::impl_runtime_apis! { } fn reserve_transferable_asset_and_dest() -> Option<(Asset, Location)> { - // Relay can reserve transfer native token to some random parachain. - Some(( - Asset { - fun: Fungible(ExistentialDeposit::get()), - id: AssetId(Here.into()) - }, - Parachain(RandomParaId::get().into()).into(), - )) + None } fn set_up_complex_asset_transfer( diff --git a/polkadot/runtime/rococo/src/weights/pallet_xcm.rs b/polkadot/runtime/rococo/src/weights/pallet_xcm.rs index 846e812ac68fe..57e6ea2689d50 100644 --- a/polkadot/runtime/rococo/src/weights/pallet_xcm.rs +++ b/polkadot/runtime/rococo/src/weights/pallet_xcm.rs @@ -95,29 +95,15 @@ impl pallet_xcm::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(3)) } - /// Storage: `XcmPallet::ShouldRecordXcm` (r:1 w:0) - /// Proof: `XcmPallet::ShouldRecordXcm` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `System::Account` (r:1 w:1) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - /// Storage: `Dmp::DeliveryFeeFactor` (r:1 w:0) - /// Proof: `Dmp::DeliveryFeeFactor` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `XcmPallet::SupportedVersion` (r:1 w:0) - /// Proof: `XcmPallet::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `Dmp::DownwardMessageQueues` (r:1 w:1) - /// Proof: `Dmp::DownwardMessageQueues` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `Paras::Heads` (r:1 w:0) - /// Proof: `Paras::Heads` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `Dmp::DownwardMessageQueueHeads` (r:1 w:1) - /// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Benchmark::Override` (r:0 w:0) + /// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) fn reserve_transfer_assets() -> Weight { // Proof Size summary in bytes: - // Measured: `297` - // Estimated: `3762` - // Minimum execution time: 137_851_000 picoseconds. - Weight::from_parts(141_308_000, 0) - .saturating_add(Weight::from_parts(0, 3762)) - .saturating_add(T::DbWeight::get().reads(7)) - .saturating_add(T::DbWeight::get().writes(3)) + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 18_446_744_073_709_551_000 picoseconds. + Weight::from_parts(18_446_744_073_709_551_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `System::Account` (r:1 w:1) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) diff --git a/polkadot/runtime/westend/src/lib.rs b/polkadot/runtime/westend/src/lib.rs index 2f73a3711f11f..fa309ef204dc4 100644 --- a/polkadot/runtime/westend/src/lib.rs +++ b/polkadot/runtime/westend/src/lib.rs @@ -2897,14 +2897,7 @@ sp_api::impl_runtime_apis! { } fn reserve_transferable_asset_and_dest() -> Option<(Asset, Location)> { - // Relay can reserve transfer native token to some random parachain. - Some(( - Asset { - fun: Fungible(ExistentialDeposit::get()), - id: AssetId(Here.into()) - }, - crate::Junction::Parachain(RandomParaId::get().into()).into(), - )) + None } fn set_up_complex_asset_transfer( diff --git a/polkadot/runtime/westend/src/weights/pallet_xcm.rs b/polkadot/runtime/westend/src/weights/pallet_xcm.rs index d0c652f79f114..493f4eda652a4 100644 --- a/polkadot/runtime/westend/src/weights/pallet_xcm.rs +++ b/polkadot/runtime/westend/src/weights/pallet_xcm.rs @@ -95,29 +95,15 @@ impl pallet_xcm::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(4)) } - /// Storage: `XcmPallet::ShouldRecordXcm` (r:1 w:0) - /// Proof: `XcmPallet::ShouldRecordXcm` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) - /// Storage: `System::Account` (r:2 w:2) - /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) - /// Storage: `Dmp::DeliveryFeeFactor` (r:1 w:0) - /// Proof: `Dmp::DeliveryFeeFactor` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `XcmPallet::SupportedVersion` (r:1 w:0) - /// Proof: `XcmPallet::SupportedVersion` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `Dmp::DownwardMessageQueues` (r:1 w:1) - /// Proof: `Dmp::DownwardMessageQueues` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `Paras::Heads` (r:1 w:0) - /// Proof: `Paras::Heads` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `Dmp::DownwardMessageQueueHeads` (r:1 w:1) - /// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Benchmark::Override` (r:0 w:0) + /// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) fn reserve_transfer_assets() -> Weight { // Proof Size summary in bytes: - // Measured: `367` - // Estimated: `6196` - // Minimum execution time: 145_601_000 picoseconds. - Weight::from_parts(153_228_000, 0) - .saturating_add(Weight::from_parts(0, 6196)) - .saturating_add(T::DbWeight::get().reads(8)) - .saturating_add(T::DbWeight::get().writes(4)) + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 18_446_744_073_709_551_000 picoseconds. + Weight::from_parts(18_446_744_073_709_551_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `System::Account` (r:2 w:2) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) diff --git a/polkadot/xcm/docs/src/cookbook/relay_token_transactor/tests.rs b/polkadot/xcm/docs/src/cookbook/relay_token_transactor/tests.rs index 93a112689c42a..0010e982cb7dc 100644 --- a/polkadot/xcm/docs/src/cookbook/relay_token_transactor/tests.rs +++ b/polkadot/xcm/docs/src/cookbook/relay_token_transactor/tests.rs @@ -18,7 +18,7 @@ use frame::testing_prelude::*; use test_log::test; use xcm::prelude::*; -use xcm_executor::traits::ConvertLocation; +use xcm_executor::traits::{ConvertLocation, TransferType}; use xcm_simulator::TestExt; use super::{ @@ -64,12 +64,16 @@ fn reserve_asset_transfers_work() { // If we don't specify anything, it will be a `u64`, which the conversion // will turn into a non-fungible token instead of a fungible one. let assets: Assets = (Here, 50u128 * CENTS as u128).into(); - assert_ok!(relay_chain::XcmPallet::limited_reserve_transfer_assets( + assert_ok!(relay_chain::XcmPallet::transfer_assets_using_type_and_then( relay_chain::RuntimeOrigin::signed(ALICE), Box::new(VersionedLocation::from(destination.clone())), - Box::new(VersionedLocation::from(beneficiary)), Box::new(VersionedAssets::from(assets)), - 0, + Box::new(TransferType::LocalReserve), + Box::new(VersionedAssetId::from(AssetId(Location::here()))), + Box::new(TransferType::LocalReserve), + Box::new(VersionedXcm::from( + Xcm::<()>::builder_unsafe().deposit_asset(AllCounted(1), beneficiary).build() + )), WeightLimit::Unlimited, )); @@ -100,12 +104,16 @@ fn reserve_asset_transfers_work() { // This chain doesn't have a token of its own, so we always refer to this token, // and we do so by the Location of the Relay Chain. let assets: Assets = (Parent, 25u128 * CENTS as u128).into(); - assert_ok!(parachain::XcmPallet::limited_reserve_transfer_assets( + assert_ok!(parachain::XcmPallet::transfer_assets_using_type_and_then( parachain::RuntimeOrigin::signed(BOB), Box::new(VersionedLocation::from(destination)), - Box::new(VersionedLocation::from(beneficiary)), Box::new(VersionedAssets::from(assets)), - 0, + Box::new(TransferType::DestinationReserve), + Box::new(VersionedAssetId::from(AssetId(Location::parent()))), + Box::new(TransferType::DestinationReserve), + Box::new(VersionedXcm::from( + Xcm::<()>::builder_unsafe().deposit_asset(AllCounted(1), beneficiary).build() + )), WeightLimit::Unlimited, )); diff --git a/polkadot/xcm/pallet-xcm/src/lib.rs b/polkadot/xcm/pallet-xcm/src/lib.rs index f2ccfa63e6ac1..6552d3cc9acd4 100644 --- a/polkadot/xcm/pallet-xcm/src/lib.rs +++ b/polkadot/xcm/pallet-xcm/src/lib.rs @@ -2070,6 +2070,16 @@ impl Pallet { // Ensure all assets (including fees) have same reserve location. ensure!(assets_transfer_type == fees_transfer_type, Error::::TooManyReserves); + // We check for network native asset reserve transfers in preparation for the Asset Hub + // Migration. This check will be removed after the migration and the determined + // reserve location adjusted accordingly. For more information, see https://github.com/paritytech/polkadot-sdk/issues/9054. + Self::ensure_network_asset_reserve_transfer_allowed( + &assets, + fee_asset_item, + &assets_transfer_type, + &fees_transfer_type, + )?; + let (local_xcm, remote_xcm) = Self::build_xcm_transfer_type( origin.clone(), dest.clone(), diff --git a/polkadot/xcm/pallet-xcm/src/transfer_assets_validation.rs b/polkadot/xcm/pallet-xcm/src/transfer_assets_validation.rs index 75aa91508a539..2be7fffc5965d 100644 --- a/polkadot/xcm/pallet-xcm/src/transfer_assets_validation.rs +++ b/polkadot/xcm/pallet-xcm/src/transfer_assets_validation.rs @@ -94,7 +94,7 @@ impl Pallet { tracing::debug!( target: "xcm::pallet_xcm::transfer_assets", asset_id = ?asset.id, ?transfer_type, - "Network native asset reserve transfer blocked during Asset Hub Migration. Use `limited_reserve_transfer_assets` instead." + "Network native asset reserve transfer blocked in preparation for the Asset Hub Migration. Use `transfer_assets_using_type_and_then` instead and explicitly mention the reserve." ); // It's error-prone to try to determine the reserve in this circumstances. return Err(Error::::InvalidAssetUnknownReserve); diff --git a/prdoc/pr_9544.prdoc b/prdoc/pr_9544.prdoc new file mode 100644 index 0000000000000..8aeda780d3c74 --- /dev/null +++ b/prdoc/pr_9544.prdoc @@ -0,0 +1,35 @@ +# Schema: Polkadot SDK PRDoc Schema (prdoc) v1.0.0 +# See doc at https://raw.githubusercontent.com/paritytech/polkadot-sdk/master/prdoc/schema_user.json + +title: Disable reserve_transfer_assets for DOT|KSM|WND|PAS + +doc: + - audience: Runtime Dev + description: | + The reserve_transfer_assets extrinsic on pallet-xcm is also affected by the same issue as transfer_assets. + These extrinsics have been updated to return an error when dealing with DOT|KSM|WND|PAS, effectively disabling them. + We can't afford these extrinsics to be enabled after the Asset Hub Migration (AHM) and risk trapping assets due + to chain misconfigurations. + All chains need to update and coordinate with their dapps to move to the alternatives, like `transfer_assets_using_type_and_then` + or `execute`. + - audience: Runtime User + description: | + The reserve_transfer_assets extrinsic on pallet-xcm is also affected by the same issue as transfer_assets. + These extrinsics have been updated to return an error when dealing with DOT|KSM|WND|PAS, effectively disabling them. + We can't afford these extrinsics to be enabled after the Asset Hub Migration (AHM) and risk trapping assets due + to chain misconfigurations. + All apps should switch to `transfer_assets_using_type_and_then` or `execute`. + +crates: +- name: pallet-xcm + bump: patch +- name: asset-test-utils + bump: patch +- name: westend-runtime + bump: patch +- name: rococo-runtime + bump: patch +- name: asset-hub-rococo-runtime + bump: patch +- name: asset-hub-westend-runtime + bump: patch From ed5422387ad8c5a4682ca4fc44fcd6f70862dc35 Mon Sep 17 00:00:00 2001 From: "paritytech-release-backport-bot[bot]" <191369287+paritytech-release-backport-bot[bot]@users.noreply.github.com> Date: Tue, 2 Sep 2025 10:49:52 +0000 Subject: [PATCH 064/128] [stable2506] Backport #9564 (#9583) Backport #9564 into `stable2506` from sandreim. See the [documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md) on how to use this bot. Signed-off-by: Andrei Sandu Co-authored-by: Andrei Sandu <54316454+sandreim@users.noreply.github.com> Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Egor_P --- .../parachains/src/paras_inherent/mod.rs | 18 ++- .../parachains/src/paras_inherent/tests.rs | 130 +++++++++++++++--- prdoc/pr_9564.prdoc | 7 + 3 files changed, 133 insertions(+), 22 deletions(-) create mode 100644 prdoc/pr_9564.prdoc diff --git a/polkadot/runtime/parachains/src/paras_inherent/mod.rs b/polkadot/runtime/parachains/src/paras_inherent/mod.rs index 2ba269d20be55..a2fe52955615b 100644 --- a/polkadot/runtime/parachains/src/paras_inherent/mod.rs +++ b/polkadot/runtime/parachains/src/paras_inherent/mod.rs @@ -1328,16 +1328,24 @@ fn filter_backed_statements_from_disabled_validators< // The indices of statements from disabled validators in `BackedCandidate`. We have to drop // these. let indices_to_drop = disabled_indices.clone() & &validator_indices; - // Apply the bitmask to drop the disabled validator from `validator_indices` - validator_indices &= !disabled_indices; - // Update the backed candidate - bc.set_validator_indices_and_core_index(validator_indices, maybe_injected_core_index); // Remove the corresponding votes from `validity_votes` for idx in indices_to_drop.iter_ones().rev() { - bc.validity_votes_mut().remove(idx); + // Map the index in `indices_to_drop` (which is an index into the validator group) + // to the index in the validity votes vector, which might have less number of votes, + // than validators assigned to the group. + // + // For each index `idx` in `indices_to_drop`, the corresponding index in the + // validity votes vector is the number of `1` bits in `validator_indices` before `idx`. + let mapped_idx = validator_indices[..idx].count_ones(); + bc.validity_votes_mut().remove(mapped_idx); } + // Apply the bitmask to drop the disabled validator from `validator_indices` + validator_indices &= !disabled_indices; + // Update the backed candidate + bc.set_validator_indices_and_core_index(validator_indices, maybe_injected_core_index); + // By filtering votes we might render the candidate invalid and cause a failure in // [`process_candidates`]. To avoid this we have to perform a sanity check here. If there // are not enough backing votes after filtering we will remove the whole candidate. diff --git a/polkadot/runtime/parachains/src/paras_inherent/tests.rs b/polkadot/runtime/parachains/src/paras_inherent/tests.rs index 6398b8154413c..d785115403dcd 100644 --- a/polkadot/runtime/parachains/src/paras_inherent/tests.rs +++ b/polkadot/runtime/parachains/src/paras_inherent/tests.rs @@ -2602,7 +2602,7 @@ mod sanitizers { // Generate test data for the candidates and assert that the environment is set as expected // (check the comments for details) - fn get_test_data_one_core_per_para() -> TestData { + fn get_test_data_one_core_per_para(backing_kind: BackingKind) -> TestData { const RELAY_PARENT_NUM: u32 = 3; // Add the relay parent to `shared` pallet. Otherwise some code (e.g. filtering backing @@ -2629,6 +2629,10 @@ mod sanitizers { sp_keyring::Sr25519Keyring::Charlie, sp_keyring::Sr25519Keyring::Dave, sp_keyring::Sr25519Keyring::Eve, + sp_keyring::Sr25519Keyring::Ferdie, + sp_keyring::Sr25519Keyring::One, + sp_keyring::Sr25519Keyring::Two, + sp_keyring::Sr25519Keyring::AliceStash, ]; for validator in validators.iter() { Keystore::sr25519_generate_new( @@ -2657,8 +2661,8 @@ mod sanitizers { // Set the validator groups in `scheduler` scheduler::Pallet::::set_validator_groups(vec![ - vec![ValidatorIndex(0), ValidatorIndex(1)], - vec![ValidatorIndex(2), ValidatorIndex(3)], + vec![ValidatorIndex(0), ValidatorIndex(1), ValidatorIndex(2), ValidatorIndex(3)], + vec![ValidatorIndex(4), ValidatorIndex(5), ValidatorIndex(6), ValidatorIndex(7)], ]); // Update scheduler's claimqueue with the parachains @@ -2713,8 +2717,8 @@ mod sanitizers { // Callback used for backing candidates let group_validators = |group_index: GroupIndex| { match group_index { - group_index if group_index == GroupIndex::from(0) => Some(vec![0, 1]), - group_index if group_index == GroupIndex::from(1) => Some(vec![2, 3]), + group_index if group_index == GroupIndex::from(0) => Some(vec![0, 1, 2, 3]), + group_index if group_index == GroupIndex::from(1) => Some(vec![4, 5, 6, 7]), _ => panic!("Group index out of bounds"), } .map(|m| m.into_iter().map(ValidatorIndex).collect::>()) @@ -2748,7 +2752,7 @@ mod sanitizers { group_validators(GroupIndex::from(idx0 as u32)).unwrap().as_ref(), &keystore, &signing_context, - BackingKind::Threshold, + backing_kind, CoreIndex(idx0 as u32), ); backed @@ -2767,7 +2771,11 @@ mod sanitizers { ValidatorIndex(1), ValidatorIndex(2), ValidatorIndex(3), - ValidatorIndex(4) + ValidatorIndex(4), + ValidatorIndex(5), + ValidatorIndex(6), + ValidatorIndex(7), + ValidatorIndex(8), ] ); @@ -4218,7 +4226,7 @@ mod sanitizers { backed_candidates, expected_backed_candidates_with_core, scheduled_paras: scheduled, - } = get_test_data_one_core_per_para(); + } = get_test_data_one_core_per_para(BackingKind::Threshold); assert_eq!( sanitize_backed_candidates::( @@ -4430,7 +4438,7 @@ mod sanitizers { let TestData { backed_candidates, .. } = if multiple_cores_per_para { get_test_data_multiple_cores_per_para(v2_descriptor) } else { - get_test_data_one_core_per_para() + get_test_data_one_core_per_para(BackingKind::Threshold) }; let scheduled = BTreeMap::new(); @@ -4451,7 +4459,7 @@ mod sanitizers { fn concluded_invalid_are_filtered_out_single_core_per_para() { new_test_ext(default_config()).execute_with(|| { let TestData { backed_candidates, scheduled_paras: scheduled, .. } = - get_test_data_one_core_per_para(); + get_test_data_one_core_per_para(BackingKind::Threshold); // mark every second one as concluded invalid let set = { @@ -4564,15 +4572,15 @@ mod sanitizers { fn disabled_non_signing_validator_doesnt_get_filtered() { new_test_ext(default_config()).execute_with(|| { let TestData { mut expected_backed_candidates_with_core, .. } = - get_test_data_one_core_per_para(); + get_test_data_one_core_per_para(BackingKind::Threshold); - // Disable Eve - set_disabled_validators(vec![4]); + // Disable `AliceStash` + set_disabled_validators(vec![7]); let before = expected_backed_candidates_with_core.clone(); - // Eve is disabled but no backing statement is signed by it so nothing should be - // filtered + // AliceStash is disabled but no backing statement is signed by it so nothing should + // be filtered filter_backed_statements_from_disabled_validators::( &mut expected_backed_candidates_with_core, &shared::AllowedRelayParents::::get(), @@ -4585,7 +4593,7 @@ mod sanitizers { fn drop_statements_from_disabled_without_dropping_candidate() { new_test_ext(default_config()).execute_with(|| { let TestData { mut expected_backed_candidates_with_core, .. } = - get_test_data_one_core_per_para(); + get_test_data_one_core_per_para(BackingKind::Threshold); // Disable Alice set_disabled_validators(vec![0]); @@ -4686,7 +4694,7 @@ mod sanitizers { fn drop_candidate_if_all_statements_are_from_disabled_single_core_per_para() { new_test_ext(default_config()).execute_with(|| { let TestData { mut expected_backed_candidates_with_core, .. } = - get_test_data_one_core_per_para(); + get_test_data_one_core_per_para(BackingKind::Threshold); // Disable Alice and Bob set_disabled_validators(vec![0, 1]); @@ -4776,5 +4784,93 @@ mod sanitizers { }); } } + + // Disable Dave which is 4th validator in group for core 0. + // Para 0 candidate has a single valid vote that is removed + // because Dave is disabled. + // + // This test ensures we remove the right validity vote from the backed candidate. + #[test] + fn drop_right_vote_basic() { + new_test_ext(default_config()).execute_with(|| { + let TestData { mut expected_backed_candidates_with_core, .. } = + get_test_data_one_core_per_para(BackingKind::Unanimous); + + set_disabled_validators(vec![3]); + + let (backed, _) = expected_backed_candidates_with_core + .get_mut(&ParaId::from(1)) + .unwrap() + .first_mut() + .unwrap(); + let (indices, core) = backed.validator_indices_and_core_index(); + let mut indices = BitVec::<_>::from(indices); + + indices.set(0, false); + indices.set(1, false); + backed.validity_votes_mut().remove(0); + backed.validity_votes_mut().remove(1); + + backed.set_validator_indices_and_core_index(indices, core); + + let mut untouched = expected_backed_candidates_with_core.clone(); + + filter_backed_statements_from_disabled_validators::( + &mut expected_backed_candidates_with_core, + &shared::AllowedRelayParents::::get(), + ); + + untouched.remove(&ParaId::from(1)).unwrap(); + + assert_eq!(expected_backed_candidates_with_core, untouched); + }); + } + + // Disable Bob which is second validator in group for core 0. + // + // This test ensures we remove the right validty votes from the backed candidate, + // and calls `process_candidates` that will check the vote signatures. + // Will fail if we remove the wrong vote. + #[test] + fn drop_right_vote_and_process_candidates() { + new_test_ext(default_config()).execute_with(|| { + let TestData { mut expected_backed_candidates_with_core, .. } = + get_test_data_one_core_per_para(BackingKind::Unanimous); + + // Second validator in group is disabled. + set_disabled_validators(vec![1]); + + let (backed, _) = expected_backed_candidates_with_core + .get_mut(&ParaId::from(1)) + .unwrap() + .first_mut() + .unwrap(); + let (indices, core) = backed.validator_indices_and_core_index(); + let mut indices = BitVec::<_>::from(indices); + + // First validator did not provide vote. + indices.set(0, false); + backed.validity_votes_mut().remove(0); + backed.set_validator_indices_and_core_index(indices, core); + + let untouched = expected_backed_candidates_with_core.clone(); + + filter_backed_statements_from_disabled_validators::( + &mut expected_backed_candidates_with_core, + &shared::AllowedRelayParents::::get(), + ); + + let candidate_receipt_with_backing_validator_indices = + inclusion::Pallet::::process_candidates( + &shared::AllowedRelayParents::::get(), + &expected_backed_candidates_with_core, + scheduler::Pallet::::group_validators, + ) + .unwrap(); + + // No candidate was dropped. + assert_eq!(candidate_receipt_with_backing_validator_indices.len(), untouched.len()); + }); + } } } diff --git a/prdoc/pr_9564.prdoc b/prdoc/pr_9564.prdoc new file mode 100644 index 0000000000000..74978db6c6405 --- /dev/null +++ b/prdoc/pr_9564.prdoc @@ -0,0 +1,7 @@ +title: 'Fix disabled validator filtering in the parachains runtime' +doc: +- audience: Runtime Dev + description: Correctly map group indices to vote indices when filtering backing statements. +crates: +- name: polkadot-runtime-parachains + bump: patch From 03d0b0245b13ee858c411abfe5016b5cf2b8121b Mon Sep 17 00:00:00 2001 From: "paritytech-release-backport-bot[bot]" <191369287+paritytech-release-backport-bot[bot]@users.noreply.github.com> Date: Tue, 2 Sep 2025 12:54:24 +0000 Subject: [PATCH 065/128] [stable2506] Backport #9451 (#9623) Backport #9451 into `stable2506` from RomarQ. See the [documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md) on how to use this bot. Co-authored-by: Rodrigo Quelhas <22591718+RomarQ@users.noreply.github.com> --- prdoc/pr_9451.prdoc | 8 +++ substrate/frame/executive/src/lib.rs | 11 +++-- substrate/frame/executive/src/tests.rs | 49 ++++++++++++++++--- .../parachain/runtime/src/configs/mod.rs | 7 +++ templates/parachain/runtime/src/lib.rs | 7 --- .../solochain/runtime/src/configs/mod.rs | 7 +++ templates/solochain/runtime/src/lib.rs | 7 --- 7 files changed, 71 insertions(+), 25 deletions(-) create mode 100644 prdoc/pr_9451.prdoc diff --git a/prdoc/pr_9451.prdoc b/prdoc/pr_9451.prdoc new file mode 100644 index 0000000000000..2e63d8201aee4 --- /dev/null +++ b/prdoc/pr_9451.prdoc @@ -0,0 +1,8 @@ +title: 'Call `SingleBlockMigrations` from `frame_system::Config` on `try_on_runtime_upgrade`.' +doc: +- audience: Runtime Dev + description: |- + Fixes a small bug in `try-runtime` code, where `SingleBlockMigrations` from `frame_system::Config` was not called in `try_on_runtime_upgrade`. +crates: +- name: frame-executive + bump: patch \ No newline at end of file diff --git a/substrate/frame/executive/src/lib.rs b/substrate/frame/executive/src/lib.rs index 3ed026ba5606a..ac25bd573c3eb 100644 --- a/substrate/frame/executive/src/lib.rs +++ b/substrate/frame/executive/src/lib.rs @@ -424,10 +424,15 @@ where pub fn try_runtime_upgrade(checks: UpgradeCheckSelect) -> Result { let before_all_weight = ::before_all_runtime_migrations(); + let try_on_runtime_upgrade_weight = - <(COnRuntimeUpgrade, AllPalletsWithSystem) as OnRuntimeUpgrade>::try_on_runtime_upgrade( - checks.pre_and_post(), - )?; + <( + COnRuntimeUpgrade, + ::SingleBlockMigrations, + // We want to run the migrations before we call into the pallets as they may + // access any state that would then not be migrated. + AllPalletsWithSystem, + ) as OnRuntimeUpgrade>::try_on_runtime_upgrade(checks.pre_and_post())?; frame_system::LastRuntimeUpgrade::::put( frame_system::LastRuntimeUpgradeInfo::from( diff --git a/substrate/frame/executive/src/tests.rs b/substrate/frame/executive/src/tests.rs index 8aa0452905c96..6863aa1a4fc1d 100644 --- a/substrate/frame/executive/src/tests.rs +++ b/substrate/frame/executive/src/tests.rs @@ -42,6 +42,7 @@ use sp_runtime::{ }; const TEST_KEY: &[u8] = b":test:key:"; +const TEST_KEY_2: &[u8] = b":test:key_2:"; #[frame_support::pallet(dev_mode)] mod custom { @@ -354,6 +355,7 @@ impl frame_system::Config for Runtime { type PostTransactions = MockedSystemCallbacks; type MultiBlockMigrator = MockedModeGetter; type ExtensionsWeightInfo = MockExtensionsWeights; + type SingleBlockMigrations = CustomOnRuntimeUpgrade; } #[derive( @@ -479,10 +481,11 @@ type TestBlock = Block; // Will contain `true` when the custom runtime logic was called. const CUSTOM_ON_RUNTIME_KEY: &[u8] = b":custom:on_runtime"; -struct CustomOnRuntimeUpgrade; +pub struct CustomOnRuntimeUpgrade; impl OnRuntimeUpgrade for CustomOnRuntimeUpgrade { fn on_runtime_upgrade() -> Weight { sp_io::storage::set(TEST_KEY, "custom_upgrade".as_bytes()); + sp_io::storage::set(TEST_KEY_2, "try_runtime_upgrade_works".as_bytes()); sp_io::storage::set(CUSTOM_ON_RUNTIME_KEY, &true.encode()); System::deposit_event(frame_system::Event::CodeUpdated); @@ -490,6 +493,12 @@ impl OnRuntimeUpgrade for CustomOnRuntimeUpgrade { Weight::from_parts(100, 0) } + + #[cfg(feature = "try-runtime")] + fn post_upgrade(_state: Vec) -> Result<(), TryRuntimeError> { + assert_eq!(&sp_io::storage::get(TEST_KEY_2).unwrap()[..], *b"try_runtime_upgrade_works"); + Ok(()) + } } type Executive = super::Executive< @@ -1074,9 +1083,7 @@ fn all_weights_are_recorded_correctly() { MockedSystemCallbacks::reset(); // All weights that show up in the `initialize_block_impl` - let custom_runtime_upgrade_weight = CustomOnRuntimeUpgrade::on_runtime_upgrade(); - let runtime_upgrade_weight = - ::on_runtime_upgrade(); + let runtime_upgrade_weight = Executive::execute_on_runtime_upgrade(); let on_initialize_weight = >::on_initialize(block_number); let base_block_weight = ::BlockWeights::get().base_block; @@ -1084,10 +1091,7 @@ fn all_weights_are_recorded_correctly() { // Weights are recorded correctly assert_eq!( frame_system::Pallet::::block_weight().total(), - custom_runtime_upgrade_weight + - runtime_upgrade_weight + - on_initialize_weight + - base_block_weight, + runtime_upgrade_weight + on_initialize_weight + base_block_weight, ); }); } @@ -1294,6 +1298,35 @@ fn try_execute_block_works() { }); } +#[test] +#[cfg(feature = "try-runtime")] +fn try_runtime_upgrade_works() { + use frame_support::traits::OnGenesis; + + sp_tracing::init_for_tests(); + + type ExecutiveWithoutMigrations = super::Executive< + Runtime, + Block, + ChainContext, + Runtime, + AllPalletsWithSystem, + >; + + new_test_ext(1).execute_with(|| { + // Call `on_genesis` to reset the storage version of all pallets. + AllPalletsWithSystem::on_genesis(); + + // Make sure the test storages are un-set + assert!(&sp_io::storage::get(TEST_KEY_2).is_none()); + + ExecutiveWithoutMigrations::try_runtime_upgrade(UpgradeCheckSelect::All).unwrap(); + + // Make sure the test storages were set + assert_eq!(&sp_io::storage::get(TEST_KEY_2).unwrap()[..], *b"try_runtime_upgrade_works"); + }); +} + /// Same as `extrinsic_while_exts_forbidden_errors` but using the try-runtime function. #[test] #[cfg(feature = "try-runtime")] diff --git a/templates/parachain/runtime/src/configs/mod.rs b/templates/parachain/runtime/src/configs/mod.rs index 70f343a23f458..eb840a410b499 100644 --- a/templates/parachain/runtime/src/configs/mod.rs +++ b/templates/parachain/runtime/src/configs/mod.rs @@ -97,6 +97,12 @@ parameter_types! { pub const SS58Prefix: u16 = 42; } +/// All migrations of the runtime, aside from the ones declared in the pallets. +/// +/// This can be a tuple of types, each implementing `OnRuntimeUpgrade`. +#[allow(unused_parens)] +type SingleBlockMigrations = (); + /// The default types are being injected by [`derive_impl`](`frame_support::derive_impl`) from /// [`ParaChainDefaultConfig`](`struct@frame_system::config_preludes::ParaChainDefaultConfig`), /// but overridden as needed. @@ -127,6 +133,7 @@ impl frame_system::Config for Runtime { /// The action to take on a Runtime Upgrade type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode; type MaxConsumers = frame_support::traits::ConstU32<16>; + type SingleBlockMigrations = SingleBlockMigrations; } /// Configure the palelt weight reclaim tx. diff --git a/templates/parachain/runtime/src/lib.rs b/templates/parachain/runtime/src/lib.rs index da6536fd8986a..e70d5cd73c11b 100644 --- a/templates/parachain/runtime/src/lib.rs +++ b/templates/parachain/runtime/src/lib.rs @@ -95,12 +95,6 @@ pub type TxExtension = cumulus_pallet_weight_reclaim::StorageWeightReclaim< pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; -/// All migrations of the runtime, aside from the ones declared in the pallets. -/// -/// This can be a tuple of types, each implementing `OnRuntimeUpgrade`. -#[allow(unused_parens)] -type Migrations = (); - /// Executive: handles dispatch to the various modules. pub type Executive = frame_executive::Executive< Runtime, @@ -108,7 +102,6 @@ pub type Executive = frame_executive::Executive< frame_system::ChainContext, Runtime, AllPalletsWithSystem, - Migrations, >; /// Handles converting a weight scalar to a fee value, based on the scale and granularity of the diff --git a/templates/solochain/runtime/src/configs/mod.rs b/templates/solochain/runtime/src/configs/mod.rs index e34b3cb821589..b8810a068036c 100644 --- a/templates/solochain/runtime/src/configs/mod.rs +++ b/templates/solochain/runtime/src/configs/mod.rs @@ -60,6 +60,12 @@ parameter_types! { pub const SS58Prefix: u8 = 42; } +/// All migrations of the runtime, aside from the ones declared in the pallets. +/// +/// This can be a tuple of types, each implementing `OnRuntimeUpgrade`. +#[allow(unused_parens)] +type SingleBlockMigrations = (); + /// The default types are being injected by [`derive_impl`](`frame_support::derive_impl`) from /// [`SoloChainDefaultConfig`](`struct@frame_system::config_preludes::SolochainDefaultConfig`), /// but overridden as needed. @@ -88,6 +94,7 @@ impl frame_system::Config for Runtime { /// This is used as an identifier of the chain. 42 is the generic substrate prefix. type SS58Prefix = SS58Prefix; type MaxConsumers = frame_support::traits::ConstU32<16>; + type SingleBlockMigrations = SingleBlockMigrations; } impl pallet_aura::Config for Runtime { diff --git a/templates/solochain/runtime/src/lib.rs b/templates/solochain/runtime/src/lib.rs index 3e81638f3f54e..2fe44c7877462 100644 --- a/templates/solochain/runtime/src/lib.rs +++ b/templates/solochain/runtime/src/lib.rs @@ -168,12 +168,6 @@ pub type UncheckedExtrinsic = /// The payload being signed in transactions. pub type SignedPayload = generic::SignedPayload; -/// All migrations of the runtime, aside from the ones declared in the pallets. -/// -/// This can be a tuple of types, each implementing `OnRuntimeUpgrade`. -#[allow(unused_parens)] -type Migrations = (); - /// Executive: handles dispatch to the various modules. pub type Executive = frame_executive::Executive< Runtime, @@ -181,7 +175,6 @@ pub type Executive = frame_executive::Executive< frame_system::ChainContext, Runtime, AllPalletsWithSystem, - Migrations, >; // Create the runtime by composing the FRAME pallets that were previously configured. From 22791554526b3a1da12c93ea809f81569c4422c1 Mon Sep 17 00:00:00 2001 From: "paritytech-release-backport-bot[bot]" <191369287+paritytech-release-backport-bot[bot]@users.noreply.github.com> Date: Thu, 4 Sep 2025 10:18:50 +0200 Subject: [PATCH 066/128] [stable2506] Backport #9581 (#9634) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Backport #9581 into `stable2506` from sistemd. See the [documentation](https://github.com/paritytech/polkadot-sdk/blob/master/docs/BACKPORT.md) on how to use this bot. Co-authored-by: sistemd Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Bastian Köcher --- cumulus/client/service/src/lib.rs | 17 ++++++++++++++--- prdoc/pr_9581.prdoc | 8 ++++++++ 2 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 prdoc/pr_9581.prdoc diff --git a/cumulus/client/service/src/lib.rs b/cumulus/client/service/src/lib.rs index badf22ed68440..e097ebd174b0c 100644 --- a/cumulus/client/service/src/lib.rs +++ b/cumulus/client/service/src/lib.rs @@ -302,6 +302,7 @@ where .spawn("cumulus-pov-recovery", None, pov_recovery.run()); let parachain_informant = parachain_informant::( + para_id, relay_chain_interface.clone(), client.clone(), prometheus_registry.map(ParachainInformantMetrics::new).transpose()?, @@ -609,6 +610,7 @@ where /// Task for logging candidate events and some related metrics. async fn parachain_informant( + para_id: ParaId, relay_chain_interface: impl RelayChainInterface + Clone, client: Arc, metrics: Option, @@ -636,7 +638,10 @@ async fn parachain_informant( let mut timed_out_candidates = Vec::new(); for event in candidate_events { match event { - CandidateEvent::CandidateBacked(_, head, _, _) => { + CandidateEvent::CandidateBacked(receipt, head, _, _) => { + if receipt.descriptor.para_id() != para_id { + continue; + } let backed_block = match Block::Header::decode(&mut &head.0[..]) { Ok(header) => header, Err(e) => { @@ -656,7 +661,10 @@ async fn parachain_informant( last_backed_block_time = Some(backed_block_time); backed_candidates.push(backed_block); }, - CandidateEvent::CandidateIncluded(_, head, _, _) => { + CandidateEvent::CandidateIncluded(receipt, head, _, _) => { + if receipt.descriptor.para_id() != para_id { + continue; + } let included_block = match Block::Header::decode(&mut &head.0[..]) { Ok(header) => header, Err(e) => { @@ -674,7 +682,10 @@ async fn parachain_informant( } included_candidates.push(included_block); }, - CandidateEvent::CandidateTimedOut(_, head, _) => { + CandidateEvent::CandidateTimedOut(receipt, head, _) => { + if receipt.descriptor.para_id() != para_id { + continue; + } let timed_out_block = match Block::Header::decode(&mut &head.0[..]) { Ok(header) => header, Err(e) => { diff --git a/prdoc/pr_9581.prdoc b/prdoc/pr_9581.prdoc new file mode 100644 index 0000000000000..4bdf025a66c39 --- /dev/null +++ b/prdoc/pr_9581.prdoc @@ -0,0 +1,8 @@ +title: 'fix: parachain informant' +doc: +- audience: Node Operator + description: |- + The parachain informant was logging information for all parachains, not just ours. This PR fixes that by filtering the events by parachain ID. +crates: +- name: cumulus-client-service + bump: patch From 2caeef482a437414c6bed2395a16abe08fccbfbb Mon Sep 17 00:00:00 2001 From: Egor_P Date: Thu, 4 Sep 2025 21:10:59 +0200 Subject: [PATCH 067/128] [stable2506] Post crates release stable2506-2 (#9649) This PR contains regular changes after crates release: - crates versions bumps - node version bumps - spec version bumps - prdocs reordering --- Cargo.lock | 22 +++---- Plan.toml | 64 +++++++++---------- cumulus/client/service/Cargo.toml | 2 +- .../assets/asset-hub-rococo/Cargo.toml | 52 ++++++++------- .../assets/asset-hub-rococo/src/lib.rs | 2 +- .../assets/asset-hub-westend/Cargo.toml | 58 ++++++++--------- .../assets/asset-hub-westend/src/lib.rs | 2 +- .../runtimes/assets/test-utils/Cargo.toml | 2 +- .../bridge-hubs/bridge-hub-rococo/src/lib.rs | 2 +- .../bridge-hubs/bridge-hub-westend/src/lib.rs | 2 +- .../collectives-westend/Cargo.toml | 2 +- .../collectives-westend/src/lib.rs | 2 +- .../coretime/coretime-rococo/src/lib.rs | 2 +- .../coretime/coretime-westend/src/lib.rs | 2 +- .../glutton/glutton-westend/src/lib.rs | 2 +- .../runtimes/people/people-rococo/src/lib.rs | 2 +- .../runtimes/people/people-westend/src/lib.rs | 2 +- .../polkadot-omni-node/lib/src/nodes/mod.rs | 2 +- polkadot/node/primitives/src/lib.rs | 2 +- polkadot/runtime/parachains/Cargo.toml | 2 +- polkadot/runtime/rococo/Cargo.toml | 4 +- polkadot/runtime/rococo/src/lib.rs | 2 +- polkadot/runtime/westend/Cargo.toml | 4 +- polkadot/runtime/westend/src/lib.rs | 2 +- polkadot/xcm/pallet-xcm/Cargo.toml | 2 +- prdoc/{ => stable2506-2}/pr_9451.prdoc | 0 prdoc/{ => stable2506-2}/pr_9514.prdoc | 0 prdoc/{ => stable2506-2}/pr_9516.prdoc | 0 prdoc/{ => stable2506-2}/pr_9544.prdoc | 0 prdoc/{ => stable2506-2}/pr_9564.prdoc | 0 prdoc/{ => stable2506-2}/pr_9581.prdoc | 0 substrate/frame/core-fellowship/Cargo.toml | 2 +- substrate/frame/executive/Cargo.toml | 2 +- 33 files changed, 121 insertions(+), 125 deletions(-) rename prdoc/{ => stable2506-2}/pr_9451.prdoc (100%) rename prdoc/{ => stable2506-2}/pr_9514.prdoc (100%) rename prdoc/{ => stable2506-2}/pr_9516.prdoc (100%) rename prdoc/{ => stable2506-2}/pr_9544.prdoc (100%) rename prdoc/{ => stable2506-2}/pr_9564.prdoc (100%) rename prdoc/{ => stable2506-2}/pr_9581.prdoc (100%) diff --git a/Cargo.lock b/Cargo.lock index fc85e6a3b420d..b7ca706c5004d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1073,7 +1073,7 @@ dependencies = [ [[package]] name = "asset-hub-rococo-runtime" -version = "0.26.0" +version = "0.26.1" dependencies = [ "asset-test-utils", "assets-common", @@ -1206,7 +1206,7 @@ dependencies = [ [[package]] name = "asset-hub-westend-runtime" -version = "0.32.0" +version = "0.32.1" dependencies = [ "alloy-core", "asset-test-utils", @@ -1301,7 +1301,7 @@ dependencies = [ [[package]] name = "asset-test-utils" -version = "24.0.0" +version = "24.0.1" dependencies = [ "cumulus-pallet-parachain-system", "cumulus-pallet-xcmp-queue", @@ -3318,7 +3318,7 @@ dependencies = [ [[package]] name = "collectives-westend-runtime" -version = "20.0.0" +version = "20.0.1" dependencies = [ "cumulus-pallet-aura-ext", "cumulus-pallet-parachain-system", @@ -4474,7 +4474,7 @@ dependencies = [ [[package]] name = "cumulus-client-service" -version = "0.25.0" +version = "0.25.1" dependencies = [ "async-channel 1.9.0", "cumulus-client-cli", @@ -6727,7 +6727,7 @@ dependencies = [ [[package]] name = "frame-executive" -version = "41.0.0" +version = "41.0.1" dependencies = [ "aquamarine", "array-bytes 6.2.2", @@ -11992,7 +11992,7 @@ dependencies = [ [[package]] name = "pallet-core-fellowship" -version = "25.0.0" +version = "25.0.1" dependencies = [ "frame-benchmarking", "frame-support", @@ -13964,7 +13964,7 @@ dependencies = [ [[package]] name = "pallet-xcm" -version = "20.1.2" +version = "20.1.3" dependencies = [ "bounded-collections 0.2.3", "frame-benchmarking", @@ -16038,7 +16038,7 @@ dependencies = [ [[package]] name = "polkadot-runtime-parachains" -version = "20.0.1" +version = "20.0.2" dependencies = [ "assert_matches", "bitflags 1.3.2", @@ -18566,7 +18566,7 @@ dependencies = [ [[package]] name = "rococo-runtime" -version = "24.0.0" +version = "24.0.1" dependencies = [ "binary-merkle-tree", "bitvec", @@ -27666,7 +27666,7 @@ dependencies = [ [[package]] name = "westend-runtime" -version = "24.0.0" +version = "24.0.1" dependencies = [ "approx", "binary-merkle-tree", diff --git a/Plan.toml b/Plan.toml index 8c37258ba26ee..059198a40d9f2 100644 --- a/Plan.toml +++ b/Plan.toml @@ -1,4 +1,4 @@ -# generated by parity-publish v0.10.5 +# generated by parity-publish v0.10.6 # command: parity-publish plan --prdoc prdoc [options] @@ -1070,9 +1070,9 @@ reason = "changed" [[crate]] # substrate/frame/executive name = "frame-executive" -from = "40.0.1" -to = "41.0.0" -bump = "major" +from = "41.0.0" +to = "41.0.1" +bump = "patch" reason = "changed" [[crate]] @@ -1944,9 +1944,9 @@ reason = "changed" [[crate]] # substrate/frame/core-fellowship name = "pallet-core-fellowship" -from = "24.1.0" -to = "25.0.0" -bump = "major" +from = "25.0.0" +to = "25.0.1" +bump = "patch" reason = "changed" [[crate]] @@ -2432,8 +2432,8 @@ reason = "changed" [[crate]] # polkadot/xcm/pallet-xcm name = "pallet-xcm" -from = "20.1.1" -to = "20.1.2" +from = "20.1.2" +to = "20.1.3" bump = "patch" reason = "changed" @@ -2696,8 +2696,8 @@ reason = "changed" [[crate]] # polkadot/runtime/parachains name = "polkadot-runtime-parachains" -from = "20.0.0" -to = "20.0.1" +from = "20.0.1" +to = "20.0.2" bump = "patch" reason = "changed" @@ -3146,9 +3146,9 @@ reason = "changed" [[crate]] # polkadot/runtime/rococo name = "rococo-runtime" -from = "23.0.0" -to = "24.0.0" -bump = "major" +from = "24.0.0" +to = "24.0.1" +bump = "patch" reason = "changed" [[crate]] @@ -3262,9 +3262,9 @@ reason = "changed" [[crate]] # polkadot/runtime/westend name = "westend-runtime" -from = "23.0.0" -to = "24.0.0" -bump = "major" +from = "24.0.0" +to = "24.0.1" +bump = "patch" reason = "changed" [[crate]] @@ -3294,9 +3294,9 @@ reason = "changed" [[crate]] # cumulus/parachains/runtimes/collectives/collectives-westend name = "collectives-westend-runtime" -from = "19.0.0" -to = "20.0.0" -bump = "major" +from = "20.0.0" +to = "20.0.1" +bump = "patch" reason = "changed" [[crate]] @@ -3428,9 +3428,9 @@ reason = "changed" [[crate]] # cumulus/parachains/runtimes/assets/test-utils name = "asset-test-utils" -from = "23.0.0" -to = "24.0.0" -bump = "major" +from = "24.0.0" +to = "24.0.1" +bump = "patch" reason = "changed" [[crate]] @@ -3564,17 +3564,17 @@ reason = "changed" [[crate]] # cumulus/parachains/runtimes/assets/asset-hub-rococo name = "asset-hub-rococo-runtime" -from = "0.25.2" -to = "0.26.0" -bump = "major" +from = "0.26.0" +to = "0.26.1" +bump = "patch" reason = "changed" [[crate]] # cumulus/parachains/runtimes/assets/asset-hub-westend name = "asset-hub-westend-runtime" -from = "0.31.0" -to = "0.32.0" -bump = "major" +from = "0.32.0" +to = "0.32.1" +bump = "patch" reason = "changed" [[crate]] @@ -4082,9 +4082,9 @@ to = "1.0.0" [[crate]] # cumulus/client/service name = "cumulus-client-service" -from = "0.24.0" -to = "0.25.0" -bump = "major" +from = "0.25.0" +to = "0.25.1" +bump = "patch" reason = "changed" [[crate]] diff --git a/cumulus/client/service/Cargo.toml b/cumulus/client/service/Cargo.toml index 4764263a8af01..41e6839799ba0 100644 --- a/cumulus/client/service/Cargo.toml +++ b/cumulus/client/service/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cumulus-client-service" -version = "0.25.0" +version = "0.25.1" authors.workspace = true edition.workspace = true description = "Common functions used to assemble the components of a parachain node." diff --git a/cumulus/parachains/runtimes/assets/asset-hub-rococo/Cargo.toml b/cumulus/parachains/runtimes/assets/asset-hub-rococo/Cargo.toml index 25deb4df85648..610390e77402e 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-rococo/Cargo.toml +++ b/cumulus/parachains/runtimes/assets/asset-hub-rococo/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "asset-hub-rococo-runtime" -version = "0.26.0" +version = "0.26.1" authors.workspace = true edition.workspace = true description = "Rococo variant of Asset Hub parachain runtime" @@ -12,7 +12,21 @@ repository.workspace = true workspace = true [dependencies] +assets-common.workspace = true +bp-asset-hub-rococo.workspace = true +bp-asset-hub-westend.workspace = true +bp-bridge-hub-rococo.workspace = true +bp-bridge-hub-westend.workspace = true codec = { features = ["derive", "max-encoded-len"], workspace = true } +cumulus-pallet-aura-ext.workspace = true +cumulus-pallet-parachain-system.workspace = true +cumulus-pallet-session-benchmarking.workspace = true +cumulus-pallet-weight-reclaim.workspace = true +cumulus-pallet-xcm.workspace = true +cumulus-pallet-xcmp-queue = { features = ["bridging"], workspace = true } +cumulus-primitives-aura.workspace = true +cumulus-primitives-core.workspace = true +cumulus-primitives-utility.workspace = true frame-benchmarking = { optional = true, workspace = true } frame-executive.workspace = true frame-metadata-hash-extension.workspace = true @@ -32,6 +46,7 @@ pallet-assets.workspace = true pallet-aura.workspace = true pallet-authorship.workspace = true pallet-balances.workspace = true +pallet-collator-selection.workspace = true pallet-message-queue.workspace = true pallet-multisig.workspace = true pallet-nft-fractionalization.workspace = true @@ -43,6 +58,15 @@ pallet-transaction-payment-rpc-runtime-api.workspace = true pallet-transaction-payment.workspace = true pallet-uniques.workspace = true pallet-utility.workspace = true +pallet-xcm-benchmarks = { optional = true, workspace = true } +pallet-xcm-bridge-hub-router.workspace = true +pallet-xcm.workspace = true +parachain-info.workspace = true +parachains-common.workspace = true +polkadot-parachain-primitives.workspace = true +polkadot-runtime-common.workspace = true +primitive-types = { features = ["codec", "num-traits", "scale-info"], workspace = true } +rococo-runtime-constants.workspace = true scale-info = { features = ["derive"], workspace = true } serde_json = { features = ["alloc"], workspace = true } sp-api.workspace = true @@ -59,32 +83,6 @@ sp-storage.workspace = true sp-transaction-pool.workspace = true sp-version.workspace = true sp-weights.workspace = true - -# num-traits feature needed for dex integer sq root: -assets-common.workspace = true -bp-asset-hub-rococo.workspace = true -bp-asset-hub-westend.workspace = true -bp-bridge-hub-rococo.workspace = true -bp-bridge-hub-westend.workspace = true -cumulus-pallet-aura-ext.workspace = true -cumulus-pallet-parachain-system.workspace = true -cumulus-pallet-session-benchmarking.workspace = true -cumulus-pallet-weight-reclaim.workspace = true -cumulus-pallet-xcm.workspace = true -cumulus-pallet-xcmp-queue = { features = ["bridging"], workspace = true } -cumulus-primitives-aura.workspace = true -cumulus-primitives-core.workspace = true -cumulus-primitives-utility.workspace = true -pallet-collator-selection.workspace = true -pallet-xcm-benchmarks = { optional = true, workspace = true } -pallet-xcm-bridge-hub-router.workspace = true -pallet-xcm.workspace = true -parachain-info.workspace = true -parachains-common.workspace = true -polkadot-parachain-primitives.workspace = true -polkadot-runtime-common.workspace = true -primitive-types = { features = ["codec", "num-traits", "scale-info"], workspace = true } -rococo-runtime-constants.workspace = true testnet-parachains-constants = { features = ["rococo"], workspace = true } xcm-builder.workspace = true xcm-executor.workspace = true diff --git a/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs b/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs index 972aca44f513f..78b92e2054114 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs @@ -129,7 +129,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: alloc::borrow::Cow::Borrowed("statemine"), impl_name: alloc::borrow::Cow::Borrowed("statemine"), authoring_version: 1, - spec_version: 1_019_003, + spec_version: 1_019_004, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 16, diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/Cargo.toml b/cumulus/parachains/runtimes/assets/asset-hub-westend/Cargo.toml index f75d9db43977d..c4221ccb71751 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-westend/Cargo.toml +++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "asset-hub-westend-runtime" -version = "0.32.0" +version = "0.32.1" authors.workspace = true edition.workspace = true description = "Westend variant of Asset Hub parachain runtime" @@ -12,7 +12,21 @@ repository.workspace = true workspace = true [dependencies] +assets-common.workspace = true +bp-asset-hub-rococo.workspace = true +bp-asset-hub-westend.workspace = true +bp-bridge-hub-rococo.workspace = true +bp-bridge-hub-westend.workspace = true codec = { features = ["derive", "max-encoded-len"], workspace = true } +cumulus-pallet-aura-ext.workspace = true +cumulus-pallet-parachain-system.workspace = true +cumulus-pallet-session-benchmarking.workspace = true +cumulus-pallet-weight-reclaim.workspace = true +cumulus-pallet-xcm.workspace = true +cumulus-pallet-xcmp-queue = { features = ["bridging"], workspace = true } +cumulus-primitives-aura.workspace = true +cumulus-primitives-core.workspace = true +cumulus-primitives-utility.workspace = true frame-benchmarking = { optional = true, workspace = true } frame-executive.workspace = true frame-metadata-hash-extension.workspace = true @@ -32,6 +46,8 @@ pallet-assets.workspace = true pallet-aura.workspace = true pallet-authorship.workspace = true pallet-balances.workspace = true +pallet-collator-selection.workspace = true +pallet-message-queue.workspace = true pallet-migrations.workspace = true pallet-multisig.workspace = true pallet-nft-fractionalization.workspace = true @@ -46,8 +62,19 @@ pallet-transaction-payment-rpc-runtime-api.workspace = true pallet-transaction-payment.workspace = true pallet-uniques.workspace = true pallet-utility.workspace = true +pallet-xcm-benchmarks = { optional = true, workspace = true } +pallet-xcm-bridge-hub-router.workspace = true +pallet-xcm.workspace = true +parachain-info.workspace = true +parachains-common.workspace = true +polkadot-parachain-primitives.workspace = true +polkadot-runtime-common.workspace = true +primitive-types = { features = ["codec", "num-traits", "scale-info"], workspace = true } scale-info = { features = ["derive"], workspace = true } serde_json = { features = ["alloc"], workspace = true } +snowbridge-outbound-queue-primitives.workspace = true +snowbridge-pallet-system-frontend.workspace = true +snowbridge-runtime-common.workspace = true sp-api.workspace = true sp-block-builder.workspace = true sp-consensus-aura.workspace = true @@ -63,35 +90,6 @@ sp-std.workspace = true sp-storage.workspace = true sp-transaction-pool.workspace = true sp-version.workspace = true - -# num-traits feature needed for dex integer sq root: -assets-common.workspace = true -bp-asset-hub-rococo.workspace = true -bp-asset-hub-westend.workspace = true -bp-bridge-hub-rococo.workspace = true -bp-bridge-hub-westend.workspace = true -cumulus-pallet-aura-ext.workspace = true -cumulus-pallet-parachain-system.workspace = true -cumulus-pallet-session-benchmarking.workspace = true -cumulus-pallet-weight-reclaim.workspace = true -cumulus-pallet-xcm.workspace = true -cumulus-pallet-xcmp-queue = { features = ["bridging"], workspace = true } -cumulus-primitives-aura.workspace = true -cumulus-primitives-core.workspace = true -cumulus-primitives-utility.workspace = true -pallet-collator-selection.workspace = true -pallet-message-queue.workspace = true -pallet-xcm-benchmarks = { optional = true, workspace = true } -pallet-xcm-bridge-hub-router.workspace = true -pallet-xcm.workspace = true -parachain-info.workspace = true -parachains-common.workspace = true -polkadot-parachain-primitives.workspace = true -polkadot-runtime-common.workspace = true -primitive-types = { features = ["codec", "num-traits", "scale-info"], workspace = true } -snowbridge-outbound-queue-primitives.workspace = true -snowbridge-pallet-system-frontend.workspace = true -snowbridge-runtime-common.workspace = true testnet-parachains-constants = { features = ["westend"], workspace = true } westend-runtime-constants.workspace = true xcm-builder.workspace = true diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs index 5358e6a1a3c99..068c9d39b9245 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs @@ -133,7 +133,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: alloc::borrow::Cow::Borrowed("westmint"), impl_name: alloc::borrow::Cow::Borrowed("westmint"), authoring_version: 1, - spec_version: 1_019_003, + spec_version: 1_019_004, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 16, diff --git a/cumulus/parachains/runtimes/assets/test-utils/Cargo.toml b/cumulus/parachains/runtimes/assets/test-utils/Cargo.toml index 94128f1c72e4e..6777e7439126b 100644 --- a/cumulus/parachains/runtimes/assets/test-utils/Cargo.toml +++ b/cumulus/parachains/runtimes/assets/test-utils/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "asset-test-utils" -version = "24.0.0" +version = "24.0.1" authors.workspace = true edition.workspace = true description = "Test utils for Asset Hub runtimes." diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs index 4993825c61fed..b0afd342b2b1a 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs @@ -253,7 +253,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: alloc::borrow::Cow::Borrowed("bridge-hub-rococo"), impl_name: alloc::borrow::Cow::Borrowed("bridge-hub-rococo"), authoring_version: 1, - spec_version: 1_019_003, + spec_version: 1_019_004, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 6, diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/lib.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/lib.rs index c8fc1b816b9e0..ffc86b7b64d23 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/lib.rs @@ -243,7 +243,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: alloc::borrow::Cow::Borrowed("bridge-hub-westend"), impl_name: alloc::borrow::Cow::Borrowed("bridge-hub-westend"), authoring_version: 1, - spec_version: 1_019_003, + spec_version: 1_019_004, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 6, diff --git a/cumulus/parachains/runtimes/collectives/collectives-westend/Cargo.toml b/cumulus/parachains/runtimes/collectives/collectives-westend/Cargo.toml index 23ee689c0d0d8..f8f37d1426eda 100644 --- a/cumulus/parachains/runtimes/collectives/collectives-westend/Cargo.toml +++ b/cumulus/parachains/runtimes/collectives/collectives-westend/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "collectives-westend-runtime" -version = "20.0.0" +version = "20.0.1" authors.workspace = true edition.workspace = true license = "Apache-2.0" diff --git a/cumulus/parachains/runtimes/collectives/collectives-westend/src/lib.rs b/cumulus/parachains/runtimes/collectives/collectives-westend/src/lib.rs index f978390daaf19..2c2a83b7795f4 100644 --- a/cumulus/parachains/runtimes/collectives/collectives-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/collectives/collectives-westend/src/lib.rs @@ -126,7 +126,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: alloc::borrow::Cow::Borrowed("collectives-westend"), impl_name: alloc::borrow::Cow::Borrowed("collectives-westend"), authoring_version: 1, - spec_version: 1_019_003, + spec_version: 1_019_004, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 6, diff --git a/cumulus/parachains/runtimes/coretime/coretime-rococo/src/lib.rs b/cumulus/parachains/runtimes/coretime/coretime-rococo/src/lib.rs index ab8a23d4ebe0e..f95251d461b65 100644 --- a/cumulus/parachains/runtimes/coretime/coretime-rococo/src/lib.rs +++ b/cumulus/parachains/runtimes/coretime/coretime-rococo/src/lib.rs @@ -159,7 +159,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: alloc::borrow::Cow::Borrowed("coretime-rococo"), impl_name: alloc::borrow::Cow::Borrowed("coretime-rococo"), authoring_version: 1, - spec_version: 1_019_003, + spec_version: 1_019_004, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 2, diff --git a/cumulus/parachains/runtimes/coretime/coretime-westend/src/lib.rs b/cumulus/parachains/runtimes/coretime/coretime-westend/src/lib.rs index 9911b1c87dff5..7af259482645d 100644 --- a/cumulus/parachains/runtimes/coretime/coretime-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/coretime/coretime-westend/src/lib.rs @@ -159,7 +159,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: alloc::borrow::Cow::Borrowed("coretime-westend"), impl_name: alloc::borrow::Cow::Borrowed("coretime-westend"), authoring_version: 1, - spec_version: 1_019_003, + spec_version: 1_019_004, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 2, diff --git a/cumulus/parachains/runtimes/glutton/glutton-westend/src/lib.rs b/cumulus/parachains/runtimes/glutton/glutton-westend/src/lib.rs index ff25e928a3cc2..6c8a93d8a5275 100644 --- a/cumulus/parachains/runtimes/glutton/glutton-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/glutton/glutton-westend/src/lib.rs @@ -103,7 +103,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: alloc::borrow::Cow::Borrowed("glutton-westend"), impl_name: alloc::borrow::Cow::Borrowed("glutton-westend"), authoring_version: 1, - spec_version: 1_019_003, + spec_version: 1_019_004, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 1, diff --git a/cumulus/parachains/runtimes/people/people-rococo/src/lib.rs b/cumulus/parachains/runtimes/people/people-rococo/src/lib.rs index 103081808e219..e87e0213be087 100644 --- a/cumulus/parachains/runtimes/people/people-rococo/src/lib.rs +++ b/cumulus/parachains/runtimes/people/people-rococo/src/lib.rs @@ -146,7 +146,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: alloc::borrow::Cow::Borrowed("people-rococo"), impl_name: alloc::borrow::Cow::Borrowed("people-rococo"), authoring_version: 1, - spec_version: 1_019_003, + spec_version: 1_019_004, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 1, diff --git a/cumulus/parachains/runtimes/people/people-westend/src/lib.rs b/cumulus/parachains/runtimes/people/people-westend/src/lib.rs index a89433ac86f52..274a4d25e63bd 100644 --- a/cumulus/parachains/runtimes/people/people-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/people/people-westend/src/lib.rs @@ -149,7 +149,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: alloc::borrow::Cow::Borrowed("people-westend"), impl_name: alloc::borrow::Cow::Borrowed("people-westend"), authoring_version: 1, - spec_version: 1_019_003, + spec_version: 1_019_004, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 2, diff --git a/cumulus/polkadot-omni-node/lib/src/nodes/mod.rs b/cumulus/polkadot-omni-node/lib/src/nodes/mod.rs index 4909eaf9d0d76..78bdc43f15211 100644 --- a/cumulus/polkadot-omni-node/lib/src/nodes/mod.rs +++ b/cumulus/polkadot-omni-node/lib/src/nodes/mod.rs @@ -25,7 +25,7 @@ use sc_service::{Configuration, TaskManager}; /// The current node version for cumulus official binaries, which takes the basic /// SemVer form `..`. It should correspond to the latest /// `polkadot` version of a stable release. -pub const NODE_VERSION: &'static str = "1.19.1"; +pub const NODE_VERSION: &'static str = "1.19.2"; /// Trait that extends the `DynNodeSpec` trait with manual seal related logic. /// diff --git a/polkadot/node/primitives/src/lib.rs b/polkadot/node/primitives/src/lib.rs index 10791dc283daf..cd2088d7728b1 100644 --- a/polkadot/node/primitives/src/lib.rs +++ b/polkadot/node/primitives/src/lib.rs @@ -62,7 +62,7 @@ pub use disputes::{ /// relatively rare. /// /// The associated worker binaries should use the same version as the node that spawns them. -pub const NODE_VERSION: &'static str = "1.19.1"; +pub const NODE_VERSION: &'static str = "1.19.2"; // For a 16-ary Merkle Prefix Trie, we can expect at most 16 32-byte hashes per node // plus some overhead: diff --git a/polkadot/runtime/parachains/Cargo.toml b/polkadot/runtime/parachains/Cargo.toml index f781a7798e853..72105ed436029 100644 --- a/polkadot/runtime/parachains/Cargo.toml +++ b/polkadot/runtime/parachains/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-runtime-parachains" -version = "20.0.1" +version = "20.0.2" description = "Relay Chain runtime code responsible for Parachains." authors.workspace = true edition.workspace = true diff --git a/polkadot/runtime/rococo/Cargo.toml b/polkadot/runtime/rococo/Cargo.toml index 50ce0d2321da5..0473adde7181c 100644 --- a/polkadot/runtime/rococo/Cargo.toml +++ b/polkadot/runtime/rococo/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "rococo-runtime" build = "build.rs" -version = "24.0.0" +version = "24.0.1" description = "Rococo testnet Relay Chain runtime." authors.workspace = true edition.workspace = true @@ -108,7 +108,7 @@ xcm.workspace = true remote-externalities = { default-features = true, workspace = true } serde_json = { workspace = true, default-features = true } sp-keyring = { default-features = true, workspace = true } -sp-tracing = { workspace = true, default-features = false } +sp-tracing = { default-features = false, workspace = true } tokio = { features = ["macros"], workspace = true, default-features = true } [build-dependencies] diff --git a/polkadot/runtime/rococo/src/lib.rs b/polkadot/runtime/rococo/src/lib.rs index 07644bd0a69b4..0ecc929c7ce8d 100644 --- a/polkadot/runtime/rococo/src/lib.rs +++ b/polkadot/runtime/rococo/src/lib.rs @@ -184,7 +184,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: alloc::borrow::Cow::Borrowed("rococo"), impl_name: alloc::borrow::Cow::Borrowed("parity-rococo-v2.0"), authoring_version: 0, - spec_version: 1_019_003, + spec_version: 1_019_004, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 26, diff --git a/polkadot/runtime/westend/Cargo.toml b/polkadot/runtime/westend/Cargo.toml index fc20c2bb94523..9d3dad7132b56 100644 --- a/polkadot/runtime/westend/Cargo.toml +++ b/polkadot/runtime/westend/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "westend-runtime" build = "build.rs" -version = "24.0.0" +version = "24.0.1" description = "Westend testnet Relay Chain runtime." authors.workspace = true edition.workspace = true @@ -118,7 +118,7 @@ approx = { workspace = true } remote-externalities = { default-features = true, workspace = true } serde_json = { workspace = true, default-features = true } sp-keyring = { default-features = true, workspace = true } -sp-tracing = { workspace = true, default-features = false } +sp-tracing = { default-features = false, workspace = true } tokio = { features = ["macros"], workspace = true, default-features = true } [build-dependencies] diff --git a/polkadot/runtime/westend/src/lib.rs b/polkadot/runtime/westend/src/lib.rs index fa309ef204dc4..2c5e7c75341ad 100644 --- a/polkadot/runtime/westend/src/lib.rs +++ b/polkadot/runtime/westend/src/lib.rs @@ -178,7 +178,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: alloc::borrow::Cow::Borrowed("westend"), impl_name: alloc::borrow::Cow::Borrowed("parity-westend"), authoring_version: 2, - spec_version: 1_019_003, + spec_version: 1_019_004, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 27, diff --git a/polkadot/xcm/pallet-xcm/Cargo.toml b/polkadot/xcm/pallet-xcm/Cargo.toml index 01d4fb7727341..c62dc8ca169c3 100644 --- a/polkadot/xcm/pallet-xcm/Cargo.toml +++ b/polkadot/xcm/pallet-xcm/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-xcm" -version = "20.1.2" +version = "20.1.3" description = "A pallet for handling XCM programs." authors.workspace = true edition.workspace = true diff --git a/prdoc/pr_9451.prdoc b/prdoc/stable2506-2/pr_9451.prdoc similarity index 100% rename from prdoc/pr_9451.prdoc rename to prdoc/stable2506-2/pr_9451.prdoc diff --git a/prdoc/pr_9514.prdoc b/prdoc/stable2506-2/pr_9514.prdoc similarity index 100% rename from prdoc/pr_9514.prdoc rename to prdoc/stable2506-2/pr_9514.prdoc diff --git a/prdoc/pr_9516.prdoc b/prdoc/stable2506-2/pr_9516.prdoc similarity index 100% rename from prdoc/pr_9516.prdoc rename to prdoc/stable2506-2/pr_9516.prdoc diff --git a/prdoc/pr_9544.prdoc b/prdoc/stable2506-2/pr_9544.prdoc similarity index 100% rename from prdoc/pr_9544.prdoc rename to prdoc/stable2506-2/pr_9544.prdoc diff --git a/prdoc/pr_9564.prdoc b/prdoc/stable2506-2/pr_9564.prdoc similarity index 100% rename from prdoc/pr_9564.prdoc rename to prdoc/stable2506-2/pr_9564.prdoc diff --git a/prdoc/pr_9581.prdoc b/prdoc/stable2506-2/pr_9581.prdoc similarity index 100% rename from prdoc/pr_9581.prdoc rename to prdoc/stable2506-2/pr_9581.prdoc diff --git a/substrate/frame/core-fellowship/Cargo.toml b/substrate/frame/core-fellowship/Cargo.toml index 827807e7acb21..3d34be3031400 100644 --- a/substrate/frame/core-fellowship/Cargo.toml +++ b/substrate/frame/core-fellowship/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pallet-core-fellowship" -version = "25.0.0" +version = "25.0.1" authors.workspace = true edition.workspace = true license = "Apache-2.0" diff --git a/substrate/frame/executive/Cargo.toml b/substrate/frame/executive/Cargo.toml index 9fd697e7ea889..a35ebce09f87f 100644 --- a/substrate/frame/executive/Cargo.toml +++ b/substrate/frame/executive/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "frame-executive" -version = "41.0.0" +version = "41.0.1" authors.workspace = true edition.workspace = true license = "Apache-2.0" From e80cde610c8453f8fb98b2b963a0d0b54dd6f219 Mon Sep 17 00:00:00 2001 From: metricaez Date: Fri, 12 Sep 2025 15:10:40 -0300 Subject: [PATCH 068/128] choir: gitignore --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 4fe0701fde684..44c3a1c55e85f 100644 --- a/.gitignore +++ b/.gitignore @@ -42,3 +42,6 @@ target/ *.scale justfile rustc-ice-* +.claude +CLAUDE.md +context/ \ No newline at end of file From 7099ba5f6a6b7148d808077badcbb78191daf774 Mon Sep 17 00:00:00 2001 From: metricaez Date: Fri, 12 Sep 2025 22:37:07 -0300 Subject: [PATCH 069/128] feat: pallet broadcaster starter --- .../runtime/parachains/src/broadcaster/mod.rs | 147 ++++++++++++++++++ .../parachains/src/broadcaster/tests.rs | 22 +++ polkadot/runtime/parachains/src/lib.rs | 1 + polkadot/runtime/parachains/src/mock.rs | 15 +- 4 files changed, 184 insertions(+), 1 deletion(-) create mode 100644 polkadot/runtime/parachains/src/broadcaster/mod.rs create mode 100644 polkadot/runtime/parachains/src/broadcaster/tests.rs diff --git a/polkadot/runtime/parachains/src/broadcaster/mod.rs b/polkadot/runtime/parachains/src/broadcaster/mod.rs new file mode 100644 index 0000000000000..473ce875136e6 --- /dev/null +++ b/polkadot/runtime/parachains/src/broadcaster/mod.rs @@ -0,0 +1,147 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Polkadot. + +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . + +//! A pallet for managing parachain data publishing and subscription. +//! +//! This pallet provides a publish-subscribe mechanism for parachains to share data +//! efficiently through the relay chain storage using child tries per publisher. + +use alloc::vec::Vec; +use frame_support::{ + pallet_prelude::*, + storage::child::ChildInfo, + traits::Get, +}; +use polkadot_primitives::Id as ParaId; + +pub use pallet::*; + +#[cfg(test)] +mod tests; + + +#[frame_support::pallet] +pub mod pallet { + use super::*; + + #[pallet::pallet] + pub struct Pallet(_); + + #[pallet::config] + pub trait Config: frame_system::Config { + /// Maximum number of items that can be published in one operation + #[pallet::constant] + type MaxPublishItems: Get; + + /// Maximum length of a key in bytes + #[pallet::constant] + type MaxKeyLength: Get; + + /// Maximum length of a value in bytes + #[pallet::constant] + type MaxValueLength: Get; + } + + /// Tracks which parachains have published data. + /// + /// Maps parachain ID to a boolean indicating whether they have a child trie. + /// The actual child trie info is derived deterministically from the ParaId. + #[pallet::storage] + pub type PublisherExists = StorageMap< + _, + Blake2_128Concat, + ParaId, + bool, + ValueQuery, + >; + + #[pallet::error] + pub enum Error { + /// Too many items in a single publish operation + TooManyPublishItems, + /// Key length exceeds maximum allowed + KeyTooLong, + /// Value length exceeds maximum allowed + ValueTooLong, + /// Child trie operation failed + ChildTrieError, + } + + impl Pallet { + /// Process a publish operation from a parachain. + /// + /// Stores the provided key-value pairs in the publisher's child trie. + pub fn handle_publish( + origin_para_id: ParaId, + data: Vec<(Vec, Vec)>, + ) -> DispatchResult { + // Validate input limits + ensure!( + data.len() <= T::MaxPublishItems::get() as usize, + Error::::TooManyPublishItems + ); + + // Get or create child trie info for this publisher + let child_info = Self::get_or_create_publisher_child_info(origin_para_id); + + // Store each key-value pair in the child trie + for (key, value) in data { + ensure!( + key.len() <= T::MaxKeyLength::get() as usize, + Error::::KeyTooLong + ); + ensure!( + value.len() <= T::MaxValueLength::get() as usize, + Error::::ValueTooLong + ); + + // Store in child trie + frame_support::storage::child::put(&child_info, &key, &value); + } + + Ok(()) + } + + /// Get the child trie root hash for a specific publisher. + /// + /// This root is always included in PersistedValidationData to prove + /// the current state of the publisher's data. + pub fn get_publisher_child_root(para_id: ParaId) -> Option> { + if PublisherExists::::get(para_id) { + let child_info = Self::derive_child_info(para_id); + Some(frame_support::storage::child::root(&child_info, + sp_runtime::StateVersion::V1)) + } else { + None + } + } + + /// Get or create child trie info for a publisher. + fn get_or_create_publisher_child_info(para_id: ParaId) -> ChildInfo { + let child_info = Self::derive_child_info(para_id); + PublisherExists::::insert(para_id, true); + child_info + } + + /// Derive a deterministic child trie identifier from parachain ID. + pub fn derive_child_info(para_id: ParaId) -> ChildInfo { + let mut key = b"pubsub".to_vec(); + key.extend_from_slice(¶_id.encode()); + + ChildInfo::new_default(&key) + } + } +} \ No newline at end of file diff --git a/polkadot/runtime/parachains/src/broadcaster/tests.rs b/polkadot/runtime/parachains/src/broadcaster/tests.rs new file mode 100644 index 0000000000000..eaa0b840ea057 --- /dev/null +++ b/polkadot/runtime/parachains/src/broadcaster/tests.rs @@ -0,0 +1,22 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Polkadot. + +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . + +use super::*; +use crate::mock::{new_test_ext, Test}; +use frame_support::{assert_err, assert_ok}; +use polkadot_primitives::Id as ParaId; + +// TODO: Add tests \ No newline at end of file diff --git a/polkadot/runtime/parachains/src/lib.rs b/polkadot/runtime/parachains/src/lib.rs index 1cd534257d7f9..0c7be5b0f6834 100644 --- a/polkadot/runtime/parachains/src/lib.rs +++ b/polkadot/runtime/parachains/src/lib.rs @@ -24,6 +24,7 @@ #![cfg_attr(not(feature = "std"), no_std)] pub mod assigner_coretime; +pub mod broadcaster; pub mod configuration; pub mod coretime; pub mod disputes; diff --git a/polkadot/runtime/parachains/src/mock.rs b/polkadot/runtime/parachains/src/mock.rs index cba63ae7b1b04..3a0a6fb568747 100644 --- a/polkadot/runtime/parachains/src/mock.rs +++ b/polkadot/runtime/parachains/src/mock.rs @@ -17,7 +17,7 @@ //! Mocks for all the traits. use crate::{ - assigner_coretime, configuration, coretime, disputes, dmp, hrmp, + assigner_coretime, broadcaster, configuration, coretime, disputes, dmp, hrmp, inclusion::{self, AggregateMessageOrigin, UmpQueueId}, initializer, on_demand, origin, paras, paras::ParaKind, @@ -74,6 +74,7 @@ frame_support::construct_runtime!( Paras: paras, Configuration: configuration, ParasShared: shared, + Broadcaster: broadcaster, ParaInclusion: inclusion, ParaInherent: paras_inherent, Scheduler: scheduler, @@ -482,6 +483,18 @@ impl crate::paras_inherent::Config for Test { type WeightInfo = crate::paras_inherent::TestWeightInfo; } +parameter_types! { + pub const MaxPublishItems: u32 = 10; + pub const MaxKeyLength: u32 = 100; + pub const MaxValueLength: u32 = 1000; +} + +impl crate::broadcaster::Config for Test { + type MaxPublishItems = MaxPublishItems; + type MaxKeyLength = MaxKeyLength; + type MaxValueLength = MaxValueLength; +} + pub struct MockValidatorSet; impl ValidatorSet for MockValidatorSet { From 57675e49699f6cfefa015d85c2198208c2c28fcd Mon Sep 17 00:00:00 2001 From: metricaez Date: Sat, 13 Sep 2025 12:20:23 -0300 Subject: [PATCH 070/128] feat: some tests --- .../runtime/parachains/src/broadcaster/mod.rs | 30 +++-- .../parachains/src/broadcaster/tests.rs | 124 +++++++++++++++++- 2 files changed, 143 insertions(+), 11 deletions(-) diff --git a/polkadot/runtime/parachains/src/broadcaster/mod.rs b/polkadot/runtime/parachains/src/broadcaster/mod.rs index 473ce875136e6..446a032bd389e 100644 --- a/polkadot/runtime/parachains/src/broadcaster/mod.rs +++ b/polkadot/runtime/parachains/src/broadcaster/mod.rs @@ -88,17 +88,14 @@ pub mod pallet { origin_para_id: ParaId, data: Vec<(Vec, Vec)>, ) -> DispatchResult { - // Validate input limits + // Validate input limits first before making any changes ensure!( data.len() <= T::MaxPublishItems::get() as usize, Error::::TooManyPublishItems ); - // Get or create child trie info for this publisher - let child_info = Self::get_or_create_publisher_child_info(origin_para_id); - - // Store each key-value pair in the child trie - for (key, value) in data { + // Validate all keys and values before creating publisher entry + for (key, value) in &data { ensure!( key.len() <= T::MaxKeyLength::get() as usize, Error::::KeyTooLong @@ -107,8 +104,13 @@ pub mod pallet { value.len() <= T::MaxValueLength::get() as usize, Error::::ValueTooLong ); + } - // Store in child trie + // All validation passed, now get or create child trie info for this publisher + let child_info = Self::get_or_create_publisher_child_info(origin_para_id); + + // Store each key-value pair in the child trie + for (key, value) in data { frame_support::storage::child::put(&child_info, &key, &value); } @@ -140,8 +142,20 @@ pub mod pallet { pub fn derive_child_info(para_id: ParaId) -> ChildInfo { let mut key = b"pubsub".to_vec(); key.extend_from_slice(¶_id.encode()); - + ChildInfo::new_default(&key) } + + /// Retrieve a value from a publisher's child trie. + /// + /// Returns None if the publisher doesn't exist or the key is not found. + pub fn get_published_value(para_id: ParaId, key: &[u8]) -> Option> { + if PublisherExists::::get(para_id) { + let child_info = Self::derive_child_info(para_id); + frame_support::storage::child::get(&child_info, key) + } else { + None + } + } } } \ No newline at end of file diff --git a/polkadot/runtime/parachains/src/broadcaster/tests.rs b/polkadot/runtime/parachains/src/broadcaster/tests.rs index eaa0b840ea057..9dc20772f97ee 100644 --- a/polkadot/runtime/parachains/src/broadcaster/tests.rs +++ b/polkadot/runtime/parachains/src/broadcaster/tests.rs @@ -15,8 +15,126 @@ // along with Polkadot. If not, see . use super::*; -use crate::mock::{new_test_ext, Test}; -use frame_support::{assert_err, assert_ok}; +use crate::mock::{new_test_ext, Broadcaster, Test}; use polkadot_primitives::Id as ParaId; -// TODO: Add tests \ No newline at end of file +#[test] +fn publish_store_retrieve_and_update_data() { + new_test_ext(Default::default()).execute_with(|| { + let para_id = ParaId::from(1000); + + // Initial state: publisher doesn't exist, no child root + assert!(!PublisherExists::::get(para_id)); + assert!(Broadcaster::get_publisher_child_root(para_id).is_none()); + + // Publish initial data + let initial_data = vec![ + (b"key1".to_vec(), b"value1".to_vec()), + (b"key2".to_vec(), b"value2".to_vec()), + ]; + Broadcaster::handle_publish(para_id, initial_data.clone()).unwrap(); + + // Verify publisher exists and has a child root + assert!(PublisherExists::::get(para_id)); + let root_after_initial = Broadcaster::get_publisher_child_root(para_id); + assert!(root_after_initial.is_some()); + assert!(!root_after_initial.as_ref().unwrap().is_empty()); + + // Verify the actual stored data matches what was published + assert_eq!( + Broadcaster::get_published_value(para_id, b"key1"), + Some(b"value1".to_vec()) + ); + assert_eq!( + Broadcaster::get_published_value(para_id, b"key2"), + Some(b"value2".to_vec()) + ); + + // Non-existent key should return None + assert_eq!(Broadcaster::get_published_value(para_id, b"key3"), None); + + // Update existing key and add new key + let update_data = vec![ + (b"key1".to_vec(), b"updated_value1".to_vec()), + (b"key3".to_vec(), b"value3".to_vec()), + ]; + Broadcaster::handle_publish(para_id, update_data).unwrap(); + + // Verify child root changed after update + let root_after_update = Broadcaster::get_publisher_child_root(para_id); + assert!(root_after_update.is_some()); + assert_ne!(root_after_initial.unwrap(), root_after_update.unwrap()); + + // Verify the data was correctly updated + assert_eq!( + Broadcaster::get_published_value(para_id, b"key1"), + Some(b"updated_value1".to_vec()) + ); + assert_eq!( + Broadcaster::get_published_value(para_id, b"key2"), + Some(b"value2".to_vec()) // Should remain unchanged + ); + assert_eq!( + Broadcaster::get_published_value(para_id, b"key3"), + Some(b"value3".to_vec()) + ); + }); +} + +#[test] +fn empty_publish_still_creates_publisher() { + new_test_ext(Default::default()).execute_with(|| { + let para_id = ParaId::from(1000); + + let _ = Broadcaster::handle_publish(para_id, vec![]); + + assert!(PublisherExists::::get(para_id)); + }); +} + +#[test] +fn handle_publish_respects_max_items_limit() { + new_test_ext(Default::default()).execute_with(|| { + let para_id = ParaId::from(1000); + + // Create 11 items (exceeds MaxPublishItems=10) + let mut data = Vec::new(); + for i in 0..11 { + data.push((format!("key{}", i).into_bytes(), b"value".to_vec())); + } + + let result = Broadcaster::handle_publish(para_id, data); + assert!(result.is_err()); + assert!(!PublisherExists::::get(para_id)); + }); +} + +#[test] +fn handle_publish_respects_key_length_limit() { + new_test_ext(Default::default()).execute_with(|| { + let para_id = ParaId::from(1000); + + // Create key longer than MaxKeyLength=100 + let long_key = vec![b'a'; 101]; + let data = vec![(long_key, b"value".to_vec())]; + + let result = Broadcaster::handle_publish(para_id, data); + assert!(result.is_err()); + assert!(!PublisherExists::::get(para_id)); + }); +} + +#[test] +fn handle_publish_respects_value_length_limit() { + new_test_ext(Default::default()).execute_with(|| { + let para_id = ParaId::from(1000); + + // Create value longer than MaxValueLength=1000 + let long_value = vec![b'v'; 1001]; + let data = vec![(b"key".to_vec(), long_value)]; + + let result = Broadcaster::handle_publish(para_id, data); + assert!(result.is_err()); + assert!(!PublisherExists::::get(para_id)); + }); +} \ No newline at end of file From 207de16eb30de728c5ede10616d6faf4e8f58b88 Mon Sep 17 00:00:00 2001 From: metricaez Date: Sun, 14 Sep 2025 01:38:42 -0300 Subject: [PATCH 071/128] feat: Publish with stub trait handler --- .../asset-hub-rococo/src/weights/xcm/mod.rs | 6 ++- .../assets/asset-hub-rococo/src/xcm_config.rs | 1 + .../asset-hub-westend/src/weights/xcm/mod.rs | 6 ++- .../asset-hub-westend/src/xcm_config.rs | 1 + .../bridge-hub-rococo/src/weights/xcm/mod.rs | 6 ++- .../bridge-hub-rococo/src/xcm_config.rs | 1 + .../bridge-hub-westend/src/weights/xcm/mod.rs | 6 ++- .../bridge-hub-westend/src/xcm_config.rs | 1 + .../src/weights/xcm/mod.rs | 6 ++- .../collectives-westend/src/xcm_config.rs | 1 + .../coretime-rococo/src/weights/xcm/mod.rs | 6 ++- .../coretime-rococo/src/xcm_config.rs | 1 + .../coretime-westend/src/weights/xcm/mod.rs | 6 ++- .../coretime-westend/src/xcm_config.rs | 1 + .../glutton/glutton-westend/src/xcm_config.rs | 1 + .../people-rococo/src/weights/xcm/mod.rs | 6 ++- .../people/people-rococo/src/xcm_config.rs | 1 + .../people-westend/src/weights/xcm/mod.rs | 6 ++- .../people/people-westend/src/xcm_config.rs | 1 + .../runtimes/testing/penpal/src/xcm_config.rs | 1 + .../testing/rococo-parachain/src/lib.rs | 1 + .../yet-another-parachain/src/xcm_config.rs | 1 + .../runtime/rococo/src/weights/xcm/mod.rs | 5 ++ polkadot/runtime/rococo/src/xcm_config.rs | 1 + .../runtime/westend/src/weights/xcm/mod.rs | 6 ++- polkadot/runtime/westend/src/xcm_config.rs | 1 + polkadot/xcm/src/v4/mod.rs | 4 ++ polkadot/xcm/src/v5/mod.rs | 28 +++++++++- polkadot/xcm/xcm-executor/src/config.rs | 11 ++-- polkadot/xcm/xcm-executor/src/lib.rs | 19 +++++-- .../src/traits/broadcast_handler.rs | 51 +++++++++++++++++++ polkadot/xcm/xcm-executor/src/traits/mod.rs | 12 +++-- 32 files changed, 180 insertions(+), 25 deletions(-) create mode 100644 polkadot/xcm/xcm-executor/src/traits/broadcast_handler.rs diff --git a/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/weights/xcm/mod.rs b/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/weights/xcm/mod.rs index 3dc3e82a62ff9..ca80976a064c8 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/weights/xcm/mod.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/weights/xcm/mod.rs @@ -24,7 +24,7 @@ use pallet_xcm_benchmarks_fungible::WeightInfo as XcmFungibleWeight; use pallet_xcm_benchmarks_generic::WeightInfo as XcmGeneric; use sp_runtime::BoundedVec; use xcm::{ - latest::{prelude::*, AssetTransferFilter}, + latest::{prelude::*, AssetTransferFilter, PublishData}, DoubleEncoded, }; @@ -271,4 +271,8 @@ impl XcmWeightInfo for AssetHubRococoXcmWeight { fn execute_with_origin(_: &Option, _: &Xcm) -> Weight { XcmGeneric::::execute_with_origin() } + fn publish(_: &PublishData) -> Weight { + // TODO: Benchmark + Weight::from_parts(10_000_000, 0) + } } diff --git a/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/xcm_config.rs b/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/xcm_config.rs index 839e58ca9d5fa..f34388c12a904 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/xcm_config.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/xcm_config.rs @@ -411,6 +411,7 @@ impl xcm_executor::Config for XcmConfig { type HrmpChannelAcceptedHandler = (); type HrmpChannelClosingHandler = (); type XcmRecorder = PolkadotXcm; + type BroadcastHandler = (); } /// Converts a local signed origin into an XCM location. Forms the basis for local origins diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/xcm/mod.rs b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/xcm/mod.rs index 27532ac431e7a..d1c256c5affa5 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/xcm/mod.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/xcm/mod.rs @@ -27,7 +27,7 @@ use pallet_xcm_benchmarks_fungible::WeightInfo as XcmFungibleWeight; use pallet_xcm_benchmarks_generic::WeightInfo as XcmGeneric; use sp_runtime::BoundedVec; use xcm::{ - latest::{prelude::*, AssetTransferFilter}, + latest::{prelude::*, AssetTransferFilter, PublishData}, DoubleEncoded, }; @@ -302,4 +302,8 @@ impl XcmWeightInfo for AssetHubWestendXcmWeight { fn execute_with_origin(_: &Option, _: &Xcm) -> Weight { XcmGeneric::::execute_with_origin() } + fn publish(_: &PublishData) -> Weight { + // TODO: Benchmark + Weight::from_parts(10_000_000, 0) + } } diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/xcm_config.rs b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/xcm_config.rs index c1e20eb7675a0..05f8556687b3d 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/xcm_config.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/xcm_config.rs @@ -453,6 +453,7 @@ impl xcm_executor::Config for XcmConfig { type HrmpChannelAcceptedHandler = (); type HrmpChannelClosingHandler = (); type XcmRecorder = PolkadotXcm; + type BroadcastHandler = (); } /// Converts a local signed origin into an XCM location. Forms the basis for local origins diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/xcm/mod.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/xcm/mod.rs index 21708ec743821..8003e414061db 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/xcm/mod.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/xcm/mod.rs @@ -24,7 +24,7 @@ use pallet_xcm_benchmarks_fungible::WeightInfo as XcmFungibleWeight; use pallet_xcm_benchmarks_generic::WeightInfo as XcmGeneric; use sp_runtime::BoundedVec; use xcm::{ - latest::{prelude::*, AssetTransferFilter}, + latest::{prelude::*, AssetTransferFilter, PublishData}, DoubleEncoded, }; @@ -272,4 +272,8 @@ impl XcmWeightInfo for BridgeHubRococoXcmWeight { fn execute_with_origin(_: &Option, _: &Xcm) -> Weight { XcmGeneric::::execute_with_origin() } + fn publish(_: &PublishData) -> Weight { + // TODO: Benchmark + Weight::from_parts(10_000_000, 0) + } } diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs index 8a661ed53236e..f316e7437736c 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs @@ -240,6 +240,7 @@ impl xcm_executor::Config for XcmConfig { type HrmpChannelAcceptedHandler = (); type HrmpChannelClosingHandler = (); type XcmRecorder = PolkadotXcm; + type BroadcastHandler = (); } pub type PriceForParentDelivery = diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/weights/xcm/mod.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/weights/xcm/mod.rs index 3706bfe22a3c8..fbf413548d34c 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/weights/xcm/mod.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/weights/xcm/mod.rs @@ -25,7 +25,7 @@ use pallet_xcm_benchmarks_fungible::WeightInfo as XcmFungibleWeight; use pallet_xcm_benchmarks_generic::WeightInfo as XcmGeneric; use sp_runtime::BoundedVec; use xcm::{ - latest::{prelude::*, AssetTransferFilter}, + latest::{prelude::*, AssetTransferFilter, PublishData}, DoubleEncoded, }; @@ -272,4 +272,8 @@ impl XcmWeightInfo for BridgeHubWestendXcmWeight { fn execute_with_origin(_: &Option, _: &Xcm) -> Weight { XcmGeneric::::execute_with_origin() } + fn publish(_: &PublishData) -> Weight { + // TODO: Benchmark + Weight::from_parts(10_000_000, 0) + } } diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/xcm_config.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/xcm_config.rs index fb9974a608609..a1c9e90f0275c 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/xcm_config.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/xcm_config.rs @@ -244,6 +244,7 @@ impl xcm_executor::Config for XcmConfig { type HrmpChannelAcceptedHandler = (); type HrmpChannelClosingHandler = (); type XcmRecorder = PolkadotXcm; + type BroadcastHandler = (); } pub type PriceForParentDelivery = diff --git a/cumulus/parachains/runtimes/collectives/collectives-westend/src/weights/xcm/mod.rs b/cumulus/parachains/runtimes/collectives/collectives-westend/src/weights/xcm/mod.rs index 7c44ce449383f..c22caf2402a75 100644 --- a/cumulus/parachains/runtimes/collectives/collectives-westend/src/weights/xcm/mod.rs +++ b/cumulus/parachains/runtimes/collectives/collectives-westend/src/weights/xcm/mod.rs @@ -23,7 +23,7 @@ use pallet_xcm_benchmarks_fungible::WeightInfo as XcmFungibleWeight; use pallet_xcm_benchmarks_generic::WeightInfo as XcmGeneric; use sp_runtime::BoundedVec; use xcm::{ - latest::{prelude::*, AssetTransferFilter}, + latest::{prelude::*, AssetTransferFilter, PublishData}, DoubleEncoded, }; @@ -270,4 +270,8 @@ impl XcmWeightInfo for CollectivesWestendXcmWeight { fn execute_with_origin(_: &Option, _: &Xcm) -> Weight { XcmGeneric::::execute_with_origin() } + fn publish(_: &PublishData) -> Weight { + // TODO: Benchmark + Weight::from_parts(10_000_000, 0) + } } diff --git a/cumulus/parachains/runtimes/collectives/collectives-westend/src/xcm_config.rs b/cumulus/parachains/runtimes/collectives/collectives-westend/src/xcm_config.rs index 21d76113eb842..d3c4d8c8014da 100644 --- a/cumulus/parachains/runtimes/collectives/collectives-westend/src/xcm_config.rs +++ b/cumulus/parachains/runtimes/collectives/collectives-westend/src/xcm_config.rs @@ -250,6 +250,7 @@ impl xcm_executor::Config for XcmConfig { type HrmpChannelAcceptedHandler = (); type HrmpChannelClosingHandler = (); type XcmRecorder = PolkadotXcm; + type BroadcastHandler = (); } /// Converts a local signed origin into an XCM location. Forms the basis for local origins diff --git a/cumulus/parachains/runtimes/coretime/coretime-rococo/src/weights/xcm/mod.rs b/cumulus/parachains/runtimes/coretime/coretime-rococo/src/weights/xcm/mod.rs index ce2279e2ba8e8..4744d726dadab 100644 --- a/cumulus/parachains/runtimes/coretime/coretime-rococo/src/weights/xcm/mod.rs +++ b/cumulus/parachains/runtimes/coretime/coretime-rococo/src/weights/xcm/mod.rs @@ -24,7 +24,7 @@ use pallet_xcm_benchmarks_fungible::WeightInfo as XcmFungibleWeight; use pallet_xcm_benchmarks_generic::WeightInfo as XcmGeneric; use sp_runtime::BoundedVec; use xcm::{ - latest::{prelude::*, AssetTransferFilter}, + latest::{prelude::*, AssetTransferFilter, PublishData}, DoubleEncoded, }; @@ -270,4 +270,8 @@ impl XcmWeightInfo for CoretimeRococoXcmWeight { fn execute_with_origin(_: &Option, _: &Xcm) -> Weight { XcmGeneric::::execute_with_origin() } + fn publish(_: &PublishData) -> Weight { + // TODO: Benchmark + Weight::from_parts(10_000_000, 0) + } } diff --git a/cumulus/parachains/runtimes/coretime/coretime-rococo/src/xcm_config.rs b/cumulus/parachains/runtimes/coretime/coretime-rococo/src/xcm_config.rs index 3dcc258abb654..d0cd60e9c5ca8 100644 --- a/cumulus/parachains/runtimes/coretime/coretime-rococo/src/xcm_config.rs +++ b/cumulus/parachains/runtimes/coretime/coretime-rococo/src/xcm_config.rs @@ -236,6 +236,7 @@ impl xcm_executor::Config for XcmConfig { type HrmpChannelAcceptedHandler = (); type HrmpChannelClosingHandler = (); type XcmRecorder = PolkadotXcm; + type BroadcastHandler = (); } /// Converts a local signed origin into an XCM location. Forms the basis for local origins diff --git a/cumulus/parachains/runtimes/coretime/coretime-westend/src/weights/xcm/mod.rs b/cumulus/parachains/runtimes/coretime/coretime-westend/src/weights/xcm/mod.rs index 75e0908cb395d..6bbf81dba3676 100644 --- a/cumulus/parachains/runtimes/coretime/coretime-westend/src/weights/xcm/mod.rs +++ b/cumulus/parachains/runtimes/coretime/coretime-westend/src/weights/xcm/mod.rs @@ -23,7 +23,7 @@ use pallet_xcm_benchmarks_fungible::WeightInfo as XcmFungibleWeight; use pallet_xcm_benchmarks_generic::WeightInfo as XcmGeneric; use sp_runtime::BoundedVec; use xcm::{ - latest::{prelude::*, AssetTransferFilter}, + latest::{prelude::*, AssetTransferFilter, PublishData}, DoubleEncoded, }; @@ -269,4 +269,8 @@ impl XcmWeightInfo for CoretimeWestendXcmWeight { fn execute_with_origin(_: &Option, _: &Xcm) -> Weight { XcmGeneric::::execute_with_origin() } + fn publish(_: &PublishData) -> Weight { + // TODO: Benchmark + Weight::from_parts(10_000_000, 0) + } } diff --git a/cumulus/parachains/runtimes/coretime/coretime-westend/src/xcm_config.rs b/cumulus/parachains/runtimes/coretime/coretime-westend/src/xcm_config.rs index 0c5d1ef47907c..775b2e9b72561 100644 --- a/cumulus/parachains/runtimes/coretime/coretime-westend/src/xcm_config.rs +++ b/cumulus/parachains/runtimes/coretime/coretime-westend/src/xcm_config.rs @@ -264,6 +264,7 @@ impl xcm_executor::Config for XcmConfig { type HrmpChannelAcceptedHandler = (); type HrmpChannelClosingHandler = (); type XcmRecorder = PolkadotXcm; + type BroadcastHandler = (); } /// Converts a local signed origin into an XCM location. Forms the basis for local origins diff --git a/cumulus/parachains/runtimes/glutton/glutton-westend/src/xcm_config.rs b/cumulus/parachains/runtimes/glutton/glutton-westend/src/xcm_config.rs index 8f90d07fc6ee3..158cf1a8a343e 100644 --- a/cumulus/parachains/runtimes/glutton/glutton-westend/src/xcm_config.rs +++ b/cumulus/parachains/runtimes/glutton/glutton-westend/src/xcm_config.rs @@ -93,6 +93,7 @@ impl xcm_executor::Config for XcmConfig { type HrmpChannelAcceptedHandler = (); type HrmpChannelClosingHandler = (); type XcmRecorder = (); + type BroadcastHandler = (); } impl cumulus_pallet_xcm::Config for Runtime { diff --git a/cumulus/parachains/runtimes/people/people-rococo/src/weights/xcm/mod.rs b/cumulus/parachains/runtimes/people/people-rococo/src/weights/xcm/mod.rs index 41c773db7c766..f7b5baa87de52 100644 --- a/cumulus/parachains/runtimes/people/people-rococo/src/weights/xcm/mod.rs +++ b/cumulus/parachains/runtimes/people/people-rococo/src/weights/xcm/mod.rs @@ -23,7 +23,7 @@ use pallet_xcm_benchmarks_fungible::WeightInfo as XcmFungibleWeight; use pallet_xcm_benchmarks_generic::WeightInfo as XcmGeneric; use sp_runtime::BoundedVec; use xcm::{ - latest::{prelude::*, AssetTransferFilter}, + latest::{prelude::*, AssetTransferFilter, PublishData}, DoubleEncoded, }; @@ -269,4 +269,8 @@ impl XcmWeightInfo for PeopleRococoXcmWeight { fn execute_with_origin(_: &Option, _: &Xcm) -> Weight { XcmGeneric::::execute_with_origin() } + fn publish(_: &PublishData) -> Weight { + // TODO: Benchmark + Weight::from_parts(10_000_000, 0) + } } diff --git a/cumulus/parachains/runtimes/people/people-rococo/src/xcm_config.rs b/cumulus/parachains/runtimes/people/people-rococo/src/xcm_config.rs index 4adbf02d9e586..52c0a93c1cebc 100644 --- a/cumulus/parachains/runtimes/people/people-rococo/src/xcm_config.rs +++ b/cumulus/parachains/runtimes/people/people-rococo/src/xcm_config.rs @@ -237,6 +237,7 @@ impl xcm_executor::Config for XcmConfig { type HrmpChannelAcceptedHandler = (); type HrmpChannelClosingHandler = (); type XcmRecorder = PolkadotXcm; + type BroadcastHandler = (); } /// Converts a local signed origin into an XCM location. Forms the basis for local origins diff --git a/cumulus/parachains/runtimes/people/people-westend/src/weights/xcm/mod.rs b/cumulus/parachains/runtimes/people/people-westend/src/weights/xcm/mod.rs index a7d394b603b2f..7f79452e3ed5a 100644 --- a/cumulus/parachains/runtimes/people/people-westend/src/weights/xcm/mod.rs +++ b/cumulus/parachains/runtimes/people/people-westend/src/weights/xcm/mod.rs @@ -23,7 +23,7 @@ use pallet_xcm_benchmarks_fungible::WeightInfo as XcmFungibleWeight; use pallet_xcm_benchmarks_generic::WeightInfo as XcmGeneric; use sp_runtime::BoundedVec; use xcm::{ - latest::{prelude::*, AssetTransferFilter}, + latest::{prelude::*, AssetTransferFilter, PublishData}, DoubleEncoded, }; @@ -268,4 +268,8 @@ impl XcmWeightInfo for PeopleWestendXcmWeight { fn execute_with_origin(_: &Option, _: &Xcm) -> Weight { XcmGeneric::::execute_with_origin() } + fn publish(_: &PublishData) -> Weight { + // TODO: Benchmark + Weight::from_parts(10_000_000, 0) + } } diff --git a/cumulus/parachains/runtimes/people/people-westend/src/xcm_config.rs b/cumulus/parachains/runtimes/people/people-westend/src/xcm_config.rs index 62a84d5f2d858..dff75ed3bd6cc 100644 --- a/cumulus/parachains/runtimes/people/people-westend/src/xcm_config.rs +++ b/cumulus/parachains/runtimes/people/people-westend/src/xcm_config.rs @@ -269,6 +269,7 @@ impl xcm_executor::Config for XcmConfig { type HrmpChannelAcceptedHandler = (); type HrmpChannelClosingHandler = (); type XcmRecorder = PolkadotXcm; + type BroadcastHandler = (); } /// Converts a local signed origin into an XCM location. Forms the basis for local origins diff --git a/cumulus/parachains/runtimes/testing/penpal/src/xcm_config.rs b/cumulus/parachains/runtimes/testing/penpal/src/xcm_config.rs index 02e33a8894dd8..d326e63ee224e 100644 --- a/cumulus/parachains/runtimes/testing/penpal/src/xcm_config.rs +++ b/cumulus/parachains/runtimes/testing/penpal/src/xcm_config.rs @@ -441,6 +441,7 @@ impl xcm_executor::Config for XcmConfig { type HrmpChannelAcceptedHandler = (); type HrmpChannelClosingHandler = (); type XcmRecorder = PolkadotXcm; + type BroadcastHandler = (); } /// Multiplier used for dedicated `TakeFirstAssetTrader` with `ForeignAssets` instance. diff --git a/cumulus/parachains/runtimes/testing/rococo-parachain/src/lib.rs b/cumulus/parachains/runtimes/testing/rococo-parachain/src/lib.rs index 697bf1e011a6f..2a85cc41d2a5b 100644 --- a/cumulus/parachains/runtimes/testing/rococo-parachain/src/lib.rs +++ b/cumulus/parachains/runtimes/testing/rococo-parachain/src/lib.rs @@ -504,6 +504,7 @@ impl xcm_executor::Config for XcmConfig { type HrmpChannelAcceptedHandler = (); type HrmpChannelClosingHandler = (); type XcmRecorder = PolkadotXcm; + type BroadcastHandler = (); } /// Converts a local signed origin into an XCM location. Forms the basis for local origins diff --git a/cumulus/parachains/runtimes/testing/yet-another-parachain/src/xcm_config.rs b/cumulus/parachains/runtimes/testing/yet-another-parachain/src/xcm_config.rs index 00d72083ae62a..4190ae75436d2 100644 --- a/cumulus/parachains/runtimes/testing/yet-another-parachain/src/xcm_config.rs +++ b/cumulus/parachains/runtimes/testing/yet-another-parachain/src/xcm_config.rs @@ -160,6 +160,7 @@ impl xcm_executor::Config for XcmConfig { type HrmpChannelAcceptedHandler = (); type HrmpChannelClosingHandler = (); type XcmRecorder = PolkadotXcm; + type BroadcastHandler = (); } /// No local origins on this chain are allowed to dispatch XCM sends/executions. diff --git a/polkadot/runtime/rococo/src/weights/xcm/mod.rs b/polkadot/runtime/rococo/src/weights/xcm/mod.rs index 36d818a87445d..905415260eff0 100644 --- a/polkadot/runtime/rococo/src/weights/xcm/mod.rs +++ b/polkadot/runtime/rococo/src/weights/xcm/mod.rs @@ -21,6 +21,7 @@ use crate::Runtime; use alloc::vec::Vec; use frame_support::weights::Weight; use xcm::{latest::prelude::*, DoubleEncoded}; +use xcm::latest::PublishData; use pallet_xcm_benchmarks_fungible::WeightInfo as XcmBalancesWeight; use pallet_xcm_benchmarks_generic::WeightInfo as XcmGeneric; @@ -305,6 +306,10 @@ impl XcmWeightInfo for RococoXcmWeight { fn execute_with_origin(_: &Option, _: &Xcm) -> Weight { XcmGeneric::::execute_with_origin() } + fn publish(_: &PublishData) -> Weight { + // TODO: Benchmark + Weight::from_parts(10_000_000, 0) + } } #[test] diff --git a/polkadot/runtime/rococo/src/xcm_config.rs b/polkadot/runtime/rococo/src/xcm_config.rs index 87fc99eb32ad7..5b6654438fa62 100644 --- a/polkadot/runtime/rococo/src/xcm_config.rs +++ b/polkadot/runtime/rococo/src/xcm_config.rs @@ -227,6 +227,7 @@ impl xcm_executor::Config for XcmConfig { type HrmpChannelAcceptedHandler = (); type HrmpChannelClosingHandler = (); type XcmRecorder = XcmPallet; + type BroadcastHandler = (); } parameter_types! { diff --git a/polkadot/runtime/westend/src/weights/xcm/mod.rs b/polkadot/runtime/westend/src/weights/xcm/mod.rs index ba4502e228420..cd3d4c4bf2857 100644 --- a/polkadot/runtime/westend/src/weights/xcm/mod.rs +++ b/polkadot/runtime/westend/src/weights/xcm/mod.rs @@ -21,7 +21,7 @@ use crate::Runtime; use alloc::vec::Vec; use frame_support::weights::Weight; use xcm::{ - latest::{prelude::*, QueryResponseInfo}, + latest::{prelude::*, QueryResponseInfo, PublishData}, DoubleEncoded, }; @@ -307,6 +307,10 @@ impl XcmWeightInfo for WestendXcmWeight { fn execute_with_origin(_: &Option, _: &Xcm) -> Weight { XcmGeneric::::execute_with_origin() } + fn publish(_: &PublishData) -> Weight { + // TODO: Benchmark + Weight::from_parts(10_000_000, 0) + } } #[test] diff --git a/polkadot/runtime/westend/src/xcm_config.rs b/polkadot/runtime/westend/src/xcm_config.rs index 1b639433e0f5f..13d72e43cb7a6 100644 --- a/polkadot/runtime/westend/src/xcm_config.rs +++ b/polkadot/runtime/westend/src/xcm_config.rs @@ -232,6 +232,7 @@ impl xcm_executor::Config for XcmConfig { type HrmpChannelAcceptedHandler = (); type HrmpChannelClosingHandler = (); type XcmRecorder = XcmPallet; + type BroadcastHandler = (); } parameter_types! { diff --git a/polkadot/xcm/src/v4/mod.rs b/polkadot/xcm/src/v4/mod.rs index b6f314a62622c..d586c14c53157 100644 --- a/polkadot/xcm/src/v4/mod.rs +++ b/polkadot/xcm/src/v4/mod.rs @@ -1431,6 +1431,10 @@ impl TryFrom> for Instructi log::debug!(target: "xcm::versions::v5tov4", "`{new_instruction:?}` not supported by v4"); return Err(()); }, + Publish { .. } => { + log::debug!(target: "xcm::versions::v5tov4", "`{new_instruction:?}` not supported by v4"); + return Err(()); + }, }) } } diff --git a/polkadot/xcm/src/v5/mod.rs b/polkadot/xcm/src/v5/mod.rs index 0caf7d0c581fe..807ef557b14a3 100644 --- a/polkadot/xcm/src/v5/mod.rs +++ b/polkadot/xcm/src/v5/mod.rs @@ -186,7 +186,7 @@ pub mod prelude { InstructionError, InstructionIndex, InteriorLocation, Junction::{self, *}, Junctions::{self, Here}, - Location, MaxAssetTransferFilters, MaybeErrorCode, + Location, MaxAssetTransferFilters, MaxPublishItems, MaybeErrorCode, NetworkId::{self, *}, OriginKind, Outcome, PalletInfo, Parent, ParentThen, PreparedMessage, QueryId, QueryResponseInfo, Reanchorable, Response, Result as XcmResult, SendError, SendResult, @@ -211,8 +211,12 @@ parameter_types! { pub MaxPalletNameLen: u32 = 48; pub MaxPalletsInfo: u32 = 64; pub MaxAssetTransferFilters: u32 = 6; + pub MaxPublishItems: u32 = 16; } +/// Type alias for published data to avoid macro issues +pub type PublishData = BoundedVec<(Vec, Vec), MaxPublishItems>; + #[derive( Clone, Eq, PartialEq, Encode, Decode, DecodeWithMemTracking, Debug, TypeInfo, MaxEncodedLen, )] @@ -1139,6 +1143,26 @@ pub enum Instruction { /// - `hints`: A bounded vector of `ExecutionHint`, specifying the different hints that will /// be activated. SetHints { hints: BoundedVec }, + + /// Publish data to the relay chain for other parachains to subscribe to. + /// + /// This instruction allows parachains to publish key-value data pairs to the relay chain + /// which can then be subscribed to by other parachains through the Subscribe instruction. + /// The data is stored in child tries on the relay chain indexed by the publisher's ParaId. + /// + /// - `data`: The key-value pairs to be published, bounded by MaxPublishItems + /// + /// Safety: Origin must be a parachain (Sovereign Account). The relay chain will validate + /// the origin and store data in the appropriate child trie. + /// + /// Kind: *Command* + /// + /// Errors: + /// - BadOrigin: If origin is not a valid parachain + /// - Overflow: If data exceeds bounds + Publish { + data: PublishData + }, } #[derive( @@ -1241,6 +1265,7 @@ impl Instruction { InitiateTransfer { destination, remote_fees, preserve_origin, assets, remote_xcm }, ExecuteWithOrigin { descendant_origin, xcm } => ExecuteWithOrigin { descendant_origin, xcm: xcm.into() }, + Publish { data } => Publish { data }, } } } @@ -1316,6 +1341,7 @@ impl> GetWeight for Instruction { W::initiate_transfer(destination, remote_fees, preserve_origin, assets, remote_xcm), ExecuteWithOrigin { descendant_origin, xcm } => W::execute_with_origin(descendant_origin, xcm), + Publish { data } => W::publish(data), } } } diff --git a/polkadot/xcm/xcm-executor/src/config.rs b/polkadot/xcm/xcm-executor/src/config.rs index 60a5ed63f32ee..4817df98d1b12 100644 --- a/polkadot/xcm/xcm-executor/src/config.rs +++ b/polkadot/xcm/xcm-executor/src/config.rs @@ -15,10 +15,10 @@ // along with Polkadot. If not, see . use crate::traits::{ - AssetExchange, AssetLock, CallDispatcher, ClaimAssets, ConvertOrigin, DropAssets, EventEmitter, - ExportXcm, FeeManager, HandleHrmpChannelAccepted, HandleHrmpChannelClosing, - HandleHrmpNewChannelOpenRequest, OnResponse, ProcessTransaction, RecordXcm, ShouldExecute, - TransactAsset, VersionChangeNotifier, WeightBounds, WeightTrader, + AssetExchange, AssetLock, BroadcastHandler, CallDispatcher, ClaimAssets, ConvertOrigin, + DropAssets, EventEmitter, ExportXcm, FeeManager, HandleHrmpChannelAccepted, + HandleHrmpChannelClosing, HandleHrmpNewChannelOpenRequest, OnResponse, ProcessTransaction, + RecordXcm, ShouldExecute, TransactAsset, VersionChangeNotifier, WeightBounds, WeightTrader, }; use frame_support::{ dispatch::{GetDispatchInfo, Parameter, PostDispatchInfo}, @@ -134,4 +134,7 @@ pub trait Config { type HrmpChannelClosingHandler: HandleHrmpChannelClosing; /// Allows recording the last executed XCM (used by dry-run runtime APIs). type XcmRecorder: RecordXcm; + + /// Handler for publish/subscribe operations on the relay chain. + type BroadcastHandler: BroadcastHandler; } diff --git a/polkadot/xcm/xcm-executor/src/lib.rs b/polkadot/xcm/xcm-executor/src/lib.rs index b4efab9349a4b..bedf48ce305f8 100644 --- a/polkadot/xcm/xcm-executor/src/lib.rs +++ b/polkadot/xcm/xcm-executor/src/lib.rs @@ -33,11 +33,11 @@ use xcm::latest::{prelude::*, AssetTransferFilter}; pub mod traits; use traits::{ - validate_export, AssetExchange, AssetLock, CallDispatcher, ClaimAssets, ConvertOrigin, - DropAssets, Enact, EventEmitter, ExportXcm, FeeManager, FeeReason, HandleHrmpChannelAccepted, - HandleHrmpChannelClosing, HandleHrmpNewChannelOpenRequest, OnResponse, ProcessTransaction, - Properties, ShouldExecute, TransactAsset, VersionChangeNotifier, WeightBounds, WeightTrader, - XcmAssetTransfers, + validate_export, AssetExchange, AssetLock, BroadcastHandler, CallDispatcher, ClaimAssets, + ConvertOrigin, DropAssets, Enact, EventEmitter, ExportXcm, FeeManager, FeeReason, + HandleHrmpChannelAccepted, HandleHrmpChannelClosing, HandleHrmpNewChannelOpenRequest, + OnResponse, ProcessTransaction, Properties, ShouldExecute, TransactAsset, + VersionChangeNotifier, WeightBounds, WeightTrader, XcmAssetTransfers, }; pub use traits::RecordXcm; @@ -1820,6 +1820,15 @@ impl XcmExecutor { Config::TransactionalProcessor::process(|| { Config::HrmpChannelClosingHandler::handle(initiator, sender, recipient) }), + Publish { data } => { + // TODO: Proper origin extraction and verification. + let para_id = 1000; + + // Call into the broadcaster handler to store the data + Config::BroadcastHandler::handle_publish(para_id, data)?; + + Ok(()) + }, } } diff --git a/polkadot/xcm/xcm-executor/src/traits/broadcast_handler.rs b/polkadot/xcm/xcm-executor/src/traits/broadcast_handler.rs new file mode 100644 index 0000000000000..56aabd839fde8 --- /dev/null +++ b/polkadot/xcm/xcm-executor/src/traits/broadcast_handler.rs @@ -0,0 +1,51 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Polkadot. + +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . + +//! Traits for handling publish/subscribe operations in XCM. + +use xcm::latest::{PublishData, Result as XcmResult}; + +/// Trait for handling publish/subscribe operations on the relay chain. +pub trait BroadcastHandler { + /// Handle a publish request from a parachain. + /// + /// This method should: + /// 1. Validate the publisher ParaId + /// 2. Store the data in the appropriate child trie + /// 3. Update subscription registries + /// + /// # Arguments + /// * `publisher` - The ParaId of the publishing parachain + /// * `data` - The key-value pairs to be published + fn handle_publish(publisher: u32, data: PublishData) -> XcmResult; +} + +/// A no-op implementation of `BroadcastHandler` for testing or stub purposes. +pub struct DoNothingBroadcaster; +impl BroadcastHandler for DoNothingBroadcaster { + fn handle_publish(_publisher: u32, _data: PublishData) -> XcmResult { + Ok(()) + } +} + +/// Implementation of `BroadcastHandler` for the unit type `()`. +/// This allows runtimes to use `BroadcastHandler = ()` in their XCM executor config. +impl BroadcastHandler for () { + fn handle_publish(_publisher: u32, _data: PublishData) -> XcmResult { + // No-op implementation for unit type + Ok(()) + } +} \ No newline at end of file diff --git a/polkadot/xcm/xcm-executor/src/traits/mod.rs b/polkadot/xcm/xcm-executor/src/traits/mod.rs index e70d2c2f4f3af..37029bcb20c2c 100644 --- a/polkadot/xcm/xcm-executor/src/traits/mod.rs +++ b/polkadot/xcm/xcm-executor/src/traits/mod.rs @@ -49,6 +49,8 @@ mod hrmp; pub use hrmp::{ HandleHrmpChannelAccepted, HandleHrmpChannelClosing, HandleHrmpNewChannelOpenRequest, }; +mod broadcast_handler; +pub use broadcast_handler::{BroadcastHandler, DoNothingBroadcaster}; mod event_emitter; mod record_xcm; mod weight; @@ -61,11 +63,11 @@ pub use weight::{WeightBounds, WeightTrader}; pub mod prelude { pub use super::{ - export_xcm, validate_export, AssetExchange, AssetLock, ClaimAssets, ConvertOrigin, - DropAssets, Enact, Error, EventEmitter, ExportXcm, FeeManager, FeeReason, LockError, - MatchesFungible, MatchesFungibles, MatchesNonFungible, MatchesNonFungibles, OnResponse, - ProcessTransaction, ShouldExecute, TransactAsset, VersionChangeNotifier, WeightBounds, - WeightTrader, WithOriginFilter, + export_xcm, validate_export, AssetExchange, AssetLock, BroadcastHandler, ClaimAssets, + ConvertOrigin, DoNothingBroadcaster, DropAssets, Enact, Error, EventEmitter, ExportXcm, + FeeManager, FeeReason, LockError, MatchesFungible, MatchesFungibles, MatchesNonFungible, + MatchesNonFungibles, OnResponse, ProcessTransaction, ShouldExecute, TransactAsset, + VersionChangeNotifier, WeightBounds, WeightTrader, WithOriginFilter, }; #[allow(deprecated)] pub use super::{Identity, JustTry}; From 6ed6d0fb03fb6b8aa6908212f135f0f651ffec59 Mon Sep 17 00:00:00 2001 From: metricaez Date: Mon, 15 Sep 2025 15:38:45 -0300 Subject: [PATCH 072/128] feat: broadcast_adapter --- .../xcm/xcm-builder/src/broadcast_adapter.rs | 89 +++++++++++++++++++ polkadot/xcm/xcm-builder/src/lib.rs | 6 ++ polkadot/xcm/xcm-executor/src/lib.rs | 8 +- .../src/traits/broadcast_handler.rs | 27 ++---- polkadot/xcm/xcm-executor/src/traits/mod.rs | 4 +- 5 files changed, 104 insertions(+), 30 deletions(-) create mode 100644 polkadot/xcm/xcm-builder/src/broadcast_adapter.rs diff --git a/polkadot/xcm/xcm-builder/src/broadcast_adapter.rs b/polkadot/xcm/xcm-builder/src/broadcast_adapter.rs new file mode 100644 index 0000000000000..8cafddd493f7c --- /dev/null +++ b/polkadot/xcm/xcm-builder/src/broadcast_adapter.rs @@ -0,0 +1,89 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Polkadot. + +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . + +//! Adapters for broadcast/publish operations in XCM. + +use alloc::vec::Vec; +use core::marker::PhantomData; +use frame_support::traits::Contains; +use xcm::latest::{Junction, Location, PublishData, Result as XcmResult}; +use xcm::latest::prelude::XcmError; +use xcm_executor::traits::BroadcastHandler; + +/// Configurable broadcast adapter that validates parachain origins. +pub struct ParachainBroadcastAdapter(PhantomData<(Filter, Handler)>); + +impl BroadcastHandler for ParachainBroadcastAdapter +where + Filter: Contains, + Handler: HandlePublish, +{ + fn handle_publish(origin: &Location, data: PublishData) -> XcmResult { + // Check if origin is authorized to publish + if !Filter::contains(origin) { + return Err(XcmError::NoPermission); + } + + // Extract parachain ID from authorized origin + let para_id = match origin.unpack() { + (0, [Junction::Parachain(id)]) => *id, // Direct parachain + (1, [Junction::Parachain(id), ..]) => *id, // Sibling parachain + _ => return Err(XcmError::BadOrigin), // Should be caught by filter + }; + + // Call the actual handler + let data_vec = data.into_inner(); + Handler::handle_publish(para_id, data_vec).map_err(|_| XcmError::Unimplemented) + } +} + +/// Trait for the actual publish handling logic. +pub trait HandlePublish { + fn handle_publish(publisher: u32, data: Vec<(Vec, Vec)>) -> Result<(), ()>; +} + +/// Allows only direct parachains (parents=0, interior=[Parachain(_)]). +pub struct DirectParachainsOnly; +impl Contains for DirectParachainsOnly { + fn contains(origin: &Location) -> bool { + matches!(origin.unpack(), (0, [Junction::Parachain(_)])) + } +} + +/// Allows both direct and sibling parachains. +pub struct AllParachains; +impl Contains for AllParachains { + fn contains(origin: &Location) -> bool { + matches!( + origin.unpack(), + (0, [Junction::Parachain(_)]) | (1, [Junction::Parachain(_), ..]) + ) + } +} + +/// Allows specific parachain IDs only. +/// Usage: `SpecificParachains<1000, 2000>` for parachains 1000 and 2000. +pub struct SpecificParachains; +impl Contains for SpecificParachains { + fn contains(origin: &Location) -> bool { + match origin.unpack() { + (0, [Junction::Parachain(id)]) | (1, [Junction::Parachain(id), ..]) => { + *id == PARA1 || (PARA2 != 0 && *id == PARA2) + }, + _ => false, + } + } +} \ No newline at end of file diff --git a/polkadot/xcm/xcm-builder/src/lib.rs b/polkadot/xcm/xcm-builder/src/lib.rs index 27d0efe115508..a59ab9c81a19a 100644 --- a/polkadot/xcm/xcm-builder/src/lib.rs +++ b/polkadot/xcm/xcm-builder/src/lib.rs @@ -48,6 +48,12 @@ pub use barriers::{ TakeWeightCredit, TrailingSetTopicAsId, WithComputedOrigin, }; +mod broadcast_adapter; +pub use broadcast_adapter::{ + AllParachains, DirectParachainsOnly, HandlePublish, ParachainBroadcastAdapter, + SpecificParachains, +}; + mod controller; pub use controller::{ Controller, ExecuteController, ExecuteControllerWeightInfo, QueryController, diff --git a/polkadot/xcm/xcm-executor/src/lib.rs b/polkadot/xcm/xcm-executor/src/lib.rs index bedf48ce305f8..12af093ead6f6 100644 --- a/polkadot/xcm/xcm-executor/src/lib.rs +++ b/polkadot/xcm/xcm-executor/src/lib.rs @@ -1821,12 +1821,8 @@ impl XcmExecutor { Config::HrmpChannelClosingHandler::handle(initiator, sender, recipient) }), Publish { data } => { - // TODO: Proper origin extraction and verification. - let para_id = 1000; - - // Call into the broadcaster handler to store the data - Config::BroadcastHandler::handle_publish(para_id, data)?; - + let origin = self.origin_ref().ok_or(XcmError::BadOrigin)?; + Config::BroadcastHandler::handle_publish(origin, data)?; Ok(()) }, } diff --git a/polkadot/xcm/xcm-executor/src/traits/broadcast_handler.rs b/polkadot/xcm/xcm-executor/src/traits/broadcast_handler.rs index 56aabd839fde8..a2356a2392788 100644 --- a/polkadot/xcm/xcm-executor/src/traits/broadcast_handler.rs +++ b/polkadot/xcm/xcm-executor/src/traits/broadcast_handler.rs @@ -16,35 +16,18 @@ //! Traits for handling publish/subscribe operations in XCM. -use xcm::latest::{PublishData, Result as XcmResult}; +use xcm::latest::{Location, PublishData, Result as XcmResult}; /// Trait for handling publish/subscribe operations on the relay chain. pub trait BroadcastHandler { - /// Handle a publish request from a parachain. - /// - /// This method should: - /// 1. Validate the publisher ParaId - /// 2. Store the data in the appropriate child trie - /// 3. Update subscription registries - /// - /// # Arguments - /// * `publisher` - The ParaId of the publishing parachain - /// * `data` - The key-value pairs to be published - fn handle_publish(publisher: u32, data: PublishData) -> XcmResult; -} - -/// A no-op implementation of `BroadcastHandler` for testing or stub purposes. -pub struct DoNothingBroadcaster; -impl BroadcastHandler for DoNothingBroadcaster { - fn handle_publish(_publisher: u32, _data: PublishData) -> XcmResult { - Ok(()) - } + /// Handle publish operation from the given origin. + /// Should validate origin authorization and extract necessary data. + fn handle_publish(origin: &Location, data: PublishData) -> XcmResult; } /// Implementation of `BroadcastHandler` for the unit type `()`. -/// This allows runtimes to use `BroadcastHandler = ()` in their XCM executor config. impl BroadcastHandler for () { - fn handle_publish(_publisher: u32, _data: PublishData) -> XcmResult { + fn handle_publish(_origin: &Location, _data: PublishData) -> XcmResult { // No-op implementation for unit type Ok(()) } diff --git a/polkadot/xcm/xcm-executor/src/traits/mod.rs b/polkadot/xcm/xcm-executor/src/traits/mod.rs index 37029bcb20c2c..5c3809f966e7f 100644 --- a/polkadot/xcm/xcm-executor/src/traits/mod.rs +++ b/polkadot/xcm/xcm-executor/src/traits/mod.rs @@ -50,7 +50,7 @@ pub use hrmp::{ HandleHrmpChannelAccepted, HandleHrmpChannelClosing, HandleHrmpNewChannelOpenRequest, }; mod broadcast_handler; -pub use broadcast_handler::{BroadcastHandler, DoNothingBroadcaster}; +pub use broadcast_handler::{BroadcastHandler}; mod event_emitter; mod record_xcm; mod weight; @@ -64,7 +64,7 @@ pub use weight::{WeightBounds, WeightTrader}; pub mod prelude { pub use super::{ export_xcm, validate_export, AssetExchange, AssetLock, BroadcastHandler, ClaimAssets, - ConvertOrigin, DoNothingBroadcaster, DropAssets, Enact, Error, EventEmitter, ExportXcm, + ConvertOrigin, DropAssets, Enact, Error, EventEmitter, ExportXcm, FeeManager, FeeReason, LockError, MatchesFungible, MatchesFungibles, MatchesNonFungible, MatchesNonFungibles, OnResponse, ProcessTransaction, ShouldExecute, TransactAsset, VersionChangeNotifier, WeightBounds, WeightTrader, WithOriginFilter, From 711d3e18d22b70318788a40dd3aea4af83ac0d8b Mon Sep 17 00:00:00 2001 From: metricaez Date: Mon, 15 Sep 2025 17:09:54 -0300 Subject: [PATCH 073/128] feat: HandlePublish restructure --- polkadot/runtime/parachains/src/broadcaster/mod.rs | 9 +++++++++ polkadot/xcm/xcm-builder/src/broadcast_adapter.rs | 9 +++------ polkadot/xcm/xcm-builder/src/lib.rs | 3 +-- .../xcm/xcm-executor/src/traits/broadcast_handler.rs | 7 +++++++ polkadot/xcm/xcm-executor/src/traits/mod.rs | 2 +- 5 files changed, 21 insertions(+), 9 deletions(-) diff --git a/polkadot/runtime/parachains/src/broadcaster/mod.rs b/polkadot/runtime/parachains/src/broadcaster/mod.rs index 446a032bd389e..b63fac72b3b51 100644 --- a/polkadot/runtime/parachains/src/broadcaster/mod.rs +++ b/polkadot/runtime/parachains/src/broadcaster/mod.rs @@ -26,6 +26,7 @@ use frame_support::{ traits::Get, }; use polkadot_primitives::Id as ParaId; +use xcm_executor::traits::HandlePublish; pub use pallet::*; @@ -158,4 +159,12 @@ pub mod pallet { } } } +} + +// XCM integration - implement HandlePublish trait for use with ParachainBroadcastAdapter +impl HandlePublish for Pallet { + fn handle_publish(publisher: u32, data: Vec<(Vec, Vec)>) -> Result<(), ()> { + let para_id = polkadot_primitives::Id::from(publisher); + Self::handle_publish(para_id, data).map_err(|_| ()) + } } \ No newline at end of file diff --git a/polkadot/xcm/xcm-builder/src/broadcast_adapter.rs b/polkadot/xcm/xcm-builder/src/broadcast_adapter.rs index 8cafddd493f7c..cddca2479b591 100644 --- a/polkadot/xcm/xcm-builder/src/broadcast_adapter.rs +++ b/polkadot/xcm/xcm-builder/src/broadcast_adapter.rs @@ -16,12 +16,11 @@ //! Adapters for broadcast/publish operations in XCM. -use alloc::vec::Vec; use core::marker::PhantomData; use frame_support::traits::Contains; use xcm::latest::{Junction, Location, PublishData, Result as XcmResult}; use xcm::latest::prelude::XcmError; -use xcm_executor::traits::BroadcastHandler; +use xcm_executor::traits::{BroadcastHandler, HandlePublish}; /// Configurable broadcast adapter that validates parachain origins. pub struct ParachainBroadcastAdapter(PhantomData<(Filter, Handler)>); @@ -50,10 +49,8 @@ where } } -/// Trait for the actual publish handling logic. -pub trait HandlePublish { - fn handle_publish(publisher: u32, data: Vec<(Vec, Vec)>) -> Result<(), ()>; -} +// The HandlePublish trait is re-exported from xcm_executor::traits +// Pallets implement this trait directly (see broadcaster pallet) /// Allows only direct parachains (parents=0, interior=[Parachain(_)]). pub struct DirectParachainsOnly; diff --git a/polkadot/xcm/xcm-builder/src/lib.rs b/polkadot/xcm/xcm-builder/src/lib.rs index a59ab9c81a19a..08332a6542af5 100644 --- a/polkadot/xcm/xcm-builder/src/lib.rs +++ b/polkadot/xcm/xcm-builder/src/lib.rs @@ -50,8 +50,7 @@ pub use barriers::{ mod broadcast_adapter; pub use broadcast_adapter::{ - AllParachains, DirectParachainsOnly, HandlePublish, ParachainBroadcastAdapter, - SpecificParachains, + AllParachains, DirectParachainsOnly, ParachainBroadcastAdapter, SpecificParachains, }; mod controller; diff --git a/polkadot/xcm/xcm-executor/src/traits/broadcast_handler.rs b/polkadot/xcm/xcm-executor/src/traits/broadcast_handler.rs index a2356a2392788..8baf9a641bcdf 100644 --- a/polkadot/xcm/xcm-executor/src/traits/broadcast_handler.rs +++ b/polkadot/xcm/xcm-executor/src/traits/broadcast_handler.rs @@ -16,6 +16,7 @@ //! Traits for handling publish/subscribe operations in XCM. +use alloc::vec::Vec; use xcm::latest::{Location, PublishData, Result as XcmResult}; /// Trait for handling publish/subscribe operations on the relay chain. @@ -25,6 +26,12 @@ pub trait BroadcastHandler { fn handle_publish(origin: &Location, data: PublishData) -> XcmResult; } +/// Trait for the actual publish handling logic. +/// Implemented by pallets that store published data. +pub trait HandlePublish { + fn handle_publish(publisher: u32, data: Vec<(Vec, Vec)>) -> Result<(), ()>; +} + /// Implementation of `BroadcastHandler` for the unit type `()`. impl BroadcastHandler for () { fn handle_publish(_origin: &Location, _data: PublishData) -> XcmResult { diff --git a/polkadot/xcm/xcm-executor/src/traits/mod.rs b/polkadot/xcm/xcm-executor/src/traits/mod.rs index 5c3809f966e7f..380dc04af1a5f 100644 --- a/polkadot/xcm/xcm-executor/src/traits/mod.rs +++ b/polkadot/xcm/xcm-executor/src/traits/mod.rs @@ -50,7 +50,7 @@ pub use hrmp::{ HandleHrmpChannelAccepted, HandleHrmpChannelClosing, HandleHrmpNewChannelOpenRequest, }; mod broadcast_handler; -pub use broadcast_handler::{BroadcastHandler}; +pub use broadcast_handler::{BroadcastHandler, HandlePublish}; mod event_emitter; mod record_xcm; mod weight; From 82f782207b645adc2967b35ad01a3ff6603241da Mon Sep 17 00:00:00 2001 From: metricaez Date: Tue, 16 Sep 2025 09:28:34 -0300 Subject: [PATCH 074/128] feat: move publish creation from xcm to pallet --- .../runtime/parachains/src/broadcaster/mod.rs | 24 ++++++++++++++----- polkadot/xcm/xcm-builder/Cargo.toml | 4 ++++ .../xcm/xcm-builder/src/broadcast_adapter.rs | 14 +++++------ 3 files changed, 29 insertions(+), 13 deletions(-) diff --git a/polkadot/runtime/parachains/src/broadcaster/mod.rs b/polkadot/runtime/parachains/src/broadcaster/mod.rs index b63fac72b3b51..34b382cba4399 100644 --- a/polkadot/runtime/parachains/src/broadcaster/mod.rs +++ b/polkadot/runtime/parachains/src/broadcaster/mod.rs @@ -26,10 +26,23 @@ use frame_support::{ traits::Get, }; use polkadot_primitives::Id as ParaId; -use xcm_executor::traits::HandlePublish; pub use pallet::*; +/// Trait for publishing key-value data. +/// Inspired by fungibles trait. +/// TODO: Check if we need to move out of pallets into a separate crate. +/// TODO: Check if sufficient level of abstraction, for now we will leave ParaId. +pub mod publish { + use super::*; + + /// Trait for publishing key-value data for parachains. + pub trait Publish { + /// Publish key-value data for a specific parachain. + fn publish_data(publisher: ParaId, data: Vec<(Vec, Vec)>) -> DispatchResult; + } +} + #[cfg(test)] mod tests; @@ -161,10 +174,9 @@ pub mod pallet { } } -// XCM integration - implement HandlePublish trait for use with ParachainBroadcastAdapter -impl HandlePublish for Pallet { - fn handle_publish(publisher: u32, data: Vec<(Vec, Vec)>) -> Result<(), ()> { - let para_id = polkadot_primitives::Id::from(publisher); - Self::handle_publish(para_id, data).map_err(|_| ()) +// Implement publish::Publish trait +impl publish::Publish for Pallet { + fn publish_data(publisher: ParaId, data: Vec<(Vec, Vec)>) -> DispatchResult { + Self::handle_publish(publisher, data) } } \ No newline at end of file diff --git a/polkadot/xcm/xcm-builder/Cargo.toml b/polkadot/xcm/xcm-builder/Cargo.toml index c508bf609a75b..296681488bbad 100644 --- a/polkadot/xcm/xcm-builder/Cargo.toml +++ b/polkadot/xcm/xcm-builder/Cargo.toml @@ -20,6 +20,8 @@ impl-trait-for-tuples = { workspace = true } pallet-asset-conversion.workspace = true pallet-transaction-payment.workspace = true polkadot-parachain-primitives.workspace = true +polkadot-primitives.workspace = true +polkadot-runtime-parachains.workspace = true scale-info = { features = ["derive"], workspace = true } sp-arithmetic.workspace = true sp-core.workspace = true @@ -69,6 +71,8 @@ std = [ "pallet-asset-conversion/std", "pallet-transaction-payment/std", "polkadot-parachain-primitives/std", + "polkadot-primitives/std", + "polkadot-runtime-parachains/std", "primitive-types/std", "scale-info/std", "sp-arithmetic/std", diff --git a/polkadot/xcm/xcm-builder/src/broadcast_adapter.rs b/polkadot/xcm/xcm-builder/src/broadcast_adapter.rs index cddca2479b591..c543347c0ba9a 100644 --- a/polkadot/xcm/xcm-builder/src/broadcast_adapter.rs +++ b/polkadot/xcm/xcm-builder/src/broadcast_adapter.rs @@ -18,9 +18,11 @@ use core::marker::PhantomData; use frame_support::traits::Contains; +use polkadot_primitives::Id as ParaId; +use polkadot_runtime_parachains::broadcaster::publish; use xcm::latest::{Junction, Location, PublishData, Result as XcmResult}; use xcm::latest::prelude::XcmError; -use xcm_executor::traits::{BroadcastHandler, HandlePublish}; +use xcm_executor::traits::BroadcastHandler; /// Configurable broadcast adapter that validates parachain origins. pub struct ParachainBroadcastAdapter(PhantomData<(Filter, Handler)>); @@ -28,7 +30,7 @@ pub struct ParachainBroadcastAdapter(PhantomData<(Filter, Handl impl BroadcastHandler for ParachainBroadcastAdapter where Filter: Contains, - Handler: HandlePublish, + Handler: publish::Publish, { fn handle_publish(origin: &Location, data: PublishData) -> XcmResult { // Check if origin is authorized to publish @@ -38,19 +40,17 @@ where // Extract parachain ID from authorized origin let para_id = match origin.unpack() { - (0, [Junction::Parachain(id)]) => *id, // Direct parachain - (1, [Junction::Parachain(id), ..]) => *id, // Sibling parachain + (0, [Junction::Parachain(id)]) => ParaId::from(*id), // Direct parachain + (1, [Junction::Parachain(id), ..]) => ParaId::from(*id), // Sibling parachain _ => return Err(XcmError::BadOrigin), // Should be caught by filter }; // Call the actual handler let data_vec = data.into_inner(); - Handler::handle_publish(para_id, data_vec).map_err(|_| XcmError::Unimplemented) + Handler::publish_data(para_id, data_vec).map_err(|_| XcmError::Unimplemented) } } -// The HandlePublish trait is re-exported from xcm_executor::traits -// Pallets implement this trait directly (see broadcaster pallet) /// Allows only direct parachains (parents=0, interior=[Parachain(_)]). pub struct DirectParachainsOnly; From 70a9a7ab18c3d474ec12ff9c8c5bab12da77a5e9 Mon Sep 17 00:00:00 2001 From: metricaez Date: Tue, 16 Sep 2025 11:13:03 -0300 Subject: [PATCH 075/128] feat: add broadcaster to rococo --- .gitignore | 3 +- polkadot/runtime/rococo/src/lib.rs | 15 +++++++ polkadot/runtime/rococo/src/xcm_config.rs | 16 +++---- pubsub-dev/build.sh | 54 +++++++++++++++++++++++ pubsub-dev/zombienet.toml | 44 ++++++++++++++++++ 5 files changed, 123 insertions(+), 9 deletions(-) create mode 100755 pubsub-dev/build.sh create mode 100644 pubsub-dev/zombienet.toml diff --git a/.gitignore b/.gitignore index 44c3a1c55e85f..e720fe00440fb 100644 --- a/.gitignore +++ b/.gitignore @@ -44,4 +44,5 @@ justfile rustc-ice-* .claude CLAUDE.md -context/ \ No newline at end of file +context/ +bin/ \ No newline at end of file diff --git a/polkadot/runtime/rococo/src/lib.rs b/polkadot/runtime/rococo/src/lib.rs index 0ecc929c7ce8d..eb0f25bb329b0 100644 --- a/polkadot/runtime/rococo/src/lib.rs +++ b/polkadot/runtime/rococo/src/lib.rs @@ -1223,6 +1223,18 @@ impl parachains_slashing::Config for Runtime { type BenchmarkingConfig = parachains_slashing::BenchConfig<200>; } +parameter_types! { + pub const MaxPublishItems: u32 = 100; + pub const MaxKeyLength: u32 = 256; + pub const MaxValueLength: u32 = 1024; +} + +impl polkadot_runtime_parachains::broadcaster::Config for Runtime { + type MaxPublishItems = MaxPublishItems; + type MaxKeyLength = MaxKeyLength; + type MaxValueLength = MaxValueLength; +} + parameter_types! { pub const ParaDeposit: Balance = 40 * UNITS; } @@ -1598,6 +1610,9 @@ construct_runtime! { Crowdloan: crowdloan = 73, Coretime: coretime = 74, + // Broadcaster pallet for pubsub XCM v5 functionality + Broadcaster: polkadot_runtime_parachains::broadcaster = 75, + // Migrations pallet MultiBlockMigrations: pallet_migrations = 98, diff --git a/polkadot/runtime/rococo/src/xcm_config.rs b/polkadot/runtime/rococo/src/xcm_config.rs index 5b6654438fa62..d17b75366bbe7 100644 --- a/polkadot/runtime/rococo/src/xcm_config.rs +++ b/polkadot/runtime/rococo/src/xcm_config.rs @@ -17,9 +17,9 @@ //! XCM configuration for Rococo. use super::{ - parachains_origin, AccountId, AllPalletsWithSystem, Balances, Dmp, Fellows, ParaId, Runtime, - RuntimeCall, RuntimeEvent, RuntimeOrigin, TransactionByteFee, Treasurer, Treasury, WeightToFee, - XcmPallet, + parachains_origin, AccountId, AllPalletsWithSystem, Balances, Broadcaster, Dmp, Fellows, + ParaId, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, TransactionByteFee, Treasurer, + Treasury, WeightToFee, XcmPallet, }; use crate::governance::StakingAdmin; @@ -42,10 +42,10 @@ use xcm_builder::{ AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, ChildParachainAsNative, ChildParachainConvertsVia, DescribeAllTerminal, DescribeFamily, FixedWeightBounds, FrameTransactionalProcessor, FungibleAdapter, HashedDescription, IsChildSystemParachain, - IsConcrete, MintLocation, OriginToPluralityVoice, SendXcmFeeToAccount, - SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, - TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, - XcmFeeManagerFromComponents, + IsConcrete, MintLocation, OriginToPluralityVoice, ParachainBroadcastAdapter, + SendXcmFeeToAccount, SignedAccountId32AsNative, SignedToAccountId32, + SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, + WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, XcmFeeManagerFromComponents, }; use xcm_executor::XcmExecutor; @@ -227,7 +227,7 @@ impl xcm_executor::Config for XcmConfig { type HrmpChannelAcceptedHandler = (); type HrmpChannelClosingHandler = (); type XcmRecorder = XcmPallet; - type BroadcastHandler = (); + type BroadcastHandler = ParachainBroadcastAdapter; } parameter_types! { diff --git a/pubsub-dev/build.sh b/pubsub-dev/build.sh new file mode 100755 index 0000000000000..7a388a9fc2086 --- /dev/null +++ b/pubsub-dev/build.sh @@ -0,0 +1,54 @@ +#!/bin/bash + +echo "🔨 Building Polkadot SDK binaries for pubsub XCM v5 testing..." +echo + +# Build main polkadot binary +echo "📦 Building polkadot relay chain binary..." +cargo build --release -p polkadot --bin polkadot +if [ $? -ne 0 ]; then + echo "❌ Failed to build polkadot binary" + exit 1 +fi +echo "✅ polkadot binary built successfully" +echo + +# Build PVF execute worker +echo "📦 Building polkadot-execute-worker..." +cargo build --release -p polkadot --bin polkadot-execute-worker +if [ $? -ne 0 ]; then + echo "❌ Failed to build polkadot-execute-worker" + exit 1 +fi +echo "✅ polkadot-execute-worker built successfully" +echo + +# Build PVF prepare worker +echo "📦 Building polkadot-prepare-worker..." +cargo build --release -p polkadot --bin polkadot-prepare-worker +if [ $? -ne 0 ]; then + echo "❌ Failed to build polkadot-prepare-worker" + exit 1 +fi +echo "✅ polkadot-prepare-worker built successfully" +echo + +# Build parachain binary +echo "📦 Building polkadot-parachain binary..." +cargo build --release -p polkadot-parachain-bin --bin polkadot-parachain +if [ $? -ne 0 ]; then + echo "❌ Failed to build polkadot-parachain binary" + exit 1 +fi +echo "✅ polkadot-parachain binary built successfully" +echo + +echo "🎉 All binaries built successfully!" +echo +echo "📍 Binary locations:" +echo " - Relay chain: target/release/polkadot" +echo " - Execute worker: target/release/polkadot-execute-worker" +echo " - Prepare worker: target/release/polkadot-prepare-worker" +echo " - Parachain: target/release/polkadot-parachain" +echo +echo "🚀 Ready for zombienet testing!" \ No newline at end of file diff --git a/pubsub-dev/zombienet.toml b/pubsub-dev/zombienet.toml new file mode 100644 index 0000000000000..d42fcbc09159a --- /dev/null +++ b/pubsub-dev/zombienet.toml @@ -0,0 +1,44 @@ +[relaychain] +chain = "rococo-local" +default_command = "./target/release/polkadot" +default_args = [ "-lparachain=debug", "-lxcm=trace" ] + + [[relaychain.nodes]] + name = "alice" + rpc_port = 9900 + validator = true + args = ["--trie-cache-size=0", "--disable-worker-version-check"] + + [[relaychain.nodes]] + name = "bob" + validator = true + args = ["--trie-cache-size=0", "--disable-worker-version-check"] + + [[relaychain.nodes]] + name = "charlie" + validator = true + args = ["--trie-cache-size=0", "--disable-worker-version-check"] + + [[relaychain.nodes]] + name = "dave" + validator = true + args = ["--trie-cache-size=0", "--disable-worker-version-check"] + +[[parachains]] +id = 4000 +addToGenesis = true +cumulus_based = true + + [[parachains.collators]] + name = "para-collator01" + rpc_port = 9920 + chain = "penpal-local" + command = "./target/release/polkadot-parachain" + args = ["-lxcm=trace", "--trie-cache-size=0", "--network-backend=libp2p", "--", "--network-backend=libp2p"] + + [[parachains.collators]] + name = "para-collator02" + chain = "penpal-local" + command = "./target/release/polkadot-parachain" + args = ["-lxcm=trace", "--trie-cache-size=0", "--network-backend=libp2p", "--", "--network-backend=libp2p"] + From 9630418b1da511d691d2c911a266014dbd31b9ca Mon Sep 17 00:00:00 2001 From: metricaez Date: Tue, 16 Sep 2025 13:33:25 -0300 Subject: [PATCH 076/128] feat: runtime api --- .../runtime/parachains/src/broadcaster/mod.rs | 2 + .../parachains/src/broadcaster/runtime_api.rs | 34 ++++ polkadot/runtime/rococo/src/lib.rs | 10 ++ .../runtime/rococo/src/weights/xcm/mod.rs | 8 +- pubsub-dev/test_broadcaster_api.sh | 145 ++++++++++++++++++ pubsub-dev/zombienet.toml | 2 +- 6 files changed, 197 insertions(+), 4 deletions(-) create mode 100644 polkadot/runtime/parachains/src/broadcaster/runtime_api.rs create mode 100755 pubsub-dev/test_broadcaster_api.sh diff --git a/polkadot/runtime/parachains/src/broadcaster/mod.rs b/polkadot/runtime/parachains/src/broadcaster/mod.rs index 34b382cba4399..12c74704600c1 100644 --- a/polkadot/runtime/parachains/src/broadcaster/mod.rs +++ b/polkadot/runtime/parachains/src/broadcaster/mod.rs @@ -29,6 +29,8 @@ use polkadot_primitives::Id as ParaId; pub use pallet::*; +pub mod runtime_api; + /// Trait for publishing key-value data. /// Inspired by fungibles trait. /// TODO: Check if we need to move out of pallets into a separate crate. diff --git a/polkadot/runtime/parachains/src/broadcaster/runtime_api.rs b/polkadot/runtime/parachains/src/broadcaster/runtime_api.rs new file mode 100644 index 0000000000000..f9f7e3b19511c --- /dev/null +++ b/polkadot/runtime/parachains/src/broadcaster/runtime_api.rs @@ -0,0 +1,34 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Polkadot. + +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . + +//! Runtime API definition for the broadcaster pallet. + +use alloc::vec::Vec; +use polkadot_primitives::Id as ParaId; + +sp_api::decl_runtime_apis! { + /// The API for querying published data from parachains. + #[api_version(1)] + pub trait BroadcasterApi { + /// Get published value for a specific parachain and key. + /// Returns None if the parachain hasn't published data or the key doesn't exist. + fn get_published_value(para_id: ParaId, key: Vec) -> Option>; + + /// Get the child trie root hash for a publisher. + /// This can be used to prove the current state of published data. + fn get_publisher_child_root(para_id: ParaId) -> Option>; + } +} \ No newline at end of file diff --git a/polkadot/runtime/rococo/src/lib.rs b/polkadot/runtime/rococo/src/lib.rs index eb0f25bb329b0..4d00d289f4977 100644 --- a/polkadot/runtime/rococo/src/lib.rs +++ b/polkadot/runtime/rococo/src/lib.rs @@ -2732,6 +2732,16 @@ sp_api::impl_runtime_apis! { XcmPallet::is_trusted_teleporter(asset, location) } } + + impl polkadot_runtime_parachains::broadcaster::runtime_api::BroadcasterApi for Runtime { + fn get_published_value(para_id: polkadot_primitives::Id, key: Vec) -> Option> { + Broadcaster::get_published_value(para_id, &key) + } + + fn get_publisher_child_root(para_id: polkadot_primitives::Id) -> Option> { + Broadcaster::get_publisher_child_root(para_id) + } + } } #[cfg(all(test, feature = "try-runtime"))] diff --git a/polkadot/runtime/rococo/src/weights/xcm/mod.rs b/polkadot/runtime/rococo/src/weights/xcm/mod.rs index 905415260eff0..aae653c0eb4c2 100644 --- a/polkadot/runtime/rococo/src/weights/xcm/mod.rs +++ b/polkadot/runtime/rococo/src/weights/xcm/mod.rs @@ -306,9 +306,11 @@ impl XcmWeightInfo for RococoXcmWeight { fn execute_with_origin(_: &Option, _: &Xcm) -> Weight { XcmGeneric::::execute_with_origin() } - fn publish(_: &PublishData) -> Weight { - // TODO: Benchmark - Weight::from_parts(10_000_000, 0) + fn publish(data: &PublishData) -> Weight { + // TODO: Benchmark + let base_weight = Weight::from_parts(1_000_000, 64); + let per_item_weight = Weight::from_parts(100_000, 32); + base_weight.saturating_add(per_item_weight.saturating_mul(data.len() as u64)) } } diff --git a/pubsub-dev/test_broadcaster_api.sh b/pubsub-dev/test_broadcaster_api.sh new file mode 100755 index 0000000000000..0f14c083d9458 --- /dev/null +++ b/pubsub-dev/test_broadcaster_api.sh @@ -0,0 +1,145 @@ +#!/bin/bash + +# Enhanced test script for BroadcasterApi with human-readable output +# Tests with the exact data from your publish: ParaID 1000, key "0x123" + +RPC_URL=${1:-"http://localhost:9900"} + +# Function to decode hex to ASCII if possible +hex_to_ascii() { + local hex=$1 + # Remove 0x prefix if present + hex=${hex#0x} + # Convert hex to ASCII, handling non-printable chars + echo -n "$hex" | xxd -r -p 2>/dev/null | tr -d '\0' | cat -v +} + +# Function to decode SCALE-encoded Option> +decode_option_vec() { + local hex_result=$1 + # Remove 0x prefix + hex_result=${hex_result#0x} + + if [[ -z "$hex_result" ]]; then + echo "❌ None (empty result)" + return + fi + + # Check first byte for Option + local option_byte=${hex_result:0:2} + if [[ "$option_byte" == "00" ]]; then + echo "❌ None" + return + elif [[ "$option_byte" == "01" ]]; then + echo "✅ Some:" + # Remove option byte + hex_result=${hex_result:2} + + # Decode Vec - first get length + local length_hex=${hex_result:0:2} + local length=$((16#$length_hex)) + echo " 📏 Length: $length bytes" + + # Extract data bytes + local data_hex=${hex_result:2:$((length*2))} + echo " 🔢 Raw bytes: [$data_hex]" + + # Convert to decimal array + local decimal_array="" + for ((i=0; i<${#data_hex}; i+=2)); do + local byte_hex=${data_hex:$i:2} + local byte_dec=$((16#$byte_hex)) + decimal_array="$decimal_array$byte_dec, " + done + decimal_array=${decimal_array%, } + echo " 🔢 Decimal: [$decimal_array]" + + # Try to decode as ASCII + local ascii_text=$(hex_to_ascii "$data_hex") + if [[ -n "$ascii_text" ]]; then + echo " 📝 ASCII: \"$ascii_text\"" + fi + else + echo "❓ Unknown format: $hex_result" + fi +} + +echo "🔍 Testing BroadcasterApi with Enhanced Decoding..." +echo " RPC URL: $RPC_URL" +echo " Testing ParaID: 1000" +echo " Testing Key: [48, 120, 49, 50, 51] (\"0x123\")" +echo "" + +# SCALE-encoded parameters for get_published_value(1000, [48, 120, 49, 50, 51]) +# ParaID 1000 = 0xe8030000 (little-endian u32) +# Vec [48, 120, 49, 50, 51] = 0x14307831323 (length prefix + bytes) +ENCODED_PARAMS="0xe8030000143078313233" + +echo "📡 Calling BroadcasterApi_get_published_value..." +echo " Parameters: $ENCODED_PARAMS" +echo "" + +# Make the API call and extract result +RESPONSE=$(curl -s -H "Content-Type: application/json" -d "{ + \"id\": 1, + \"jsonrpc\": \"2.0\", + \"method\": \"state_call\", + \"params\": [ + \"BroadcasterApi_get_published_value\", + \"$ENCODED_PARAMS\" + ] +}" $RPC_URL) + +echo "📊 Raw Response:" +echo "$RESPONSE" | jq '.' +echo "" + +# Extract and decode result +RESULT=$(echo "$RESPONSE" | jq -r '.result // empty') +if [[ -n "$RESULT" && "$RESULT" != "null" ]]; then + echo "🔍 Decoded Result:" + decode_option_vec "$RESULT" +else + echo "❌ No result or error in response" +fi + +echo "" +echo "==================================" +echo "" + +# Also test get_publisher_child_root +echo "📡 Calling BroadcasterApi_get_publisher_child_root..." +PARA_ONLY="0xe8030000" # Just ParaID 1000 + +ROOT_RESPONSE=$(curl -s -H "Content-Type: application/json" -d "{ + \"id\": 2, + \"jsonrpc\": \"2.0\", + \"method\": \"state_call\", + \"params\": [ + \"BroadcasterApi_get_publisher_child_root\", + \"$PARA_ONLY\" + ] +}" $RPC_URL) + +echo "" +echo "📊 Raw Response:" +echo "$ROOT_RESPONSE" | jq '.' +echo "" + +# Extract and decode child root +ROOT_RESULT=$(echo "$ROOT_RESPONSE" | jq -r '.result // empty') +if [[ -n "$ROOT_RESULT" && "$ROOT_RESULT" != "null" ]]; then + echo "🔍 Decoded Child Root:" + if [[ "${ROOT_RESULT:0:4}" == "0x01" ]]; then + echo "✅ Some:" + ROOT_HASH=${ROOT_RESULT:4} + echo " 🌳 Child Trie Root Hash: 0x$ROOT_HASH" + echo " 📏 Hash Length: $((${#ROOT_HASH}/2)) bytes" + else + echo "❌ None (no published data)" + fi +else + echo "❌ No result or error in response" +fi + +echo "" \ No newline at end of file diff --git a/pubsub-dev/zombienet.toml b/pubsub-dev/zombienet.toml index d42fcbc09159a..840e8026c5408 100644 --- a/pubsub-dev/zombienet.toml +++ b/pubsub-dev/zombienet.toml @@ -25,7 +25,7 @@ default_args = [ "-lparachain=debug", "-lxcm=trace" ] args = ["--trie-cache-size=0", "--disable-worker-version-check"] [[parachains]] -id = 4000 +id = 1000 addToGenesis = true cumulus_based = true From 9d1adb34416e95745b6ba783685d16a189628903 Mon Sep 17 00:00:00 2001 From: metricaez Date: Sat, 20 Sep 2025 23:08:04 -0300 Subject: [PATCH 077/128] feat: store keys --- .../runtime/parachains/src/broadcaster/mod.rs | 44 ++++++++++++++++++- 1 file changed, 42 insertions(+), 2 deletions(-) diff --git a/polkadot/runtime/parachains/src/broadcaster/mod.rs b/polkadot/runtime/parachains/src/broadcaster/mod.rs index 12c74704600c1..183d4bc10a153 100644 --- a/polkadot/runtime/parachains/src/broadcaster/mod.rs +++ b/polkadot/runtime/parachains/src/broadcaster/mod.rs @@ -72,7 +72,7 @@ pub mod pallet { } /// Tracks which parachains have published data. - /// + /// /// Maps parachain ID to a boolean indicating whether they have a child trie. /// The actual child trie info is derived deterministically from the ParaId. #[pallet::storage] @@ -84,6 +84,16 @@ pub mod pallet { ValueQuery, >; + /// Tracks all published keys per parachain. + #[pallet::storage] + pub type PublishedKeys = StorageMap< + _, + Blake2_128Concat, + ParaId, + BoundedBTreeSet, T::MaxPublishItems>, + ValueQuery, + >; + #[pallet::error] pub enum Error { /// Too many items in a single publish operation @@ -125,11 +135,22 @@ pub mod pallet { // All validation passed, now get or create child trie info for this publisher let child_info = Self::get_or_create_publisher_child_info(origin_para_id); - // Store each key-value pair in the child trie + // Get current published keys set for tracking + let mut published_keys = PublishedKeys::::get(origin_para_id); + + // Store each key-value pair in the child trie and track the key for (key, value) in data { frame_support::storage::child::put(&child_info, &key, &value); + + // Track the key for enumeration (convert to BoundedVec) + if let Ok(bounded_key) = BoundedVec::try_from(key) { + let _ = published_keys.try_insert(bounded_key); + } } + // Update the published keys storage + PublishedKeys::::insert(origin_para_id, published_keys); + Ok(()) } @@ -173,6 +194,25 @@ pub mod pallet { None } } + + /// Get all published data for a parachain. + pub fn get_all_published_data(para_id: ParaId) -> Vec<(Vec, Vec)> { + if !PublisherExists::::get(para_id) { + return Vec::new(); + } + + let child_info = Self::derive_child_info(para_id); + let published_keys = PublishedKeys::::get(para_id); + + published_keys + .into_iter() + .filter_map(|bounded_key| { + let key: Vec = bounded_key.into(); + frame_support::storage::child::get(&child_info, &key) + .map(|value| (key, value)) + }) + .collect() + } } } From e9ab562d8907158dd6ca1544055c954e23c39484 Mon Sep 17 00:00:00 2001 From: metricaez Date: Mon, 22 Sep 2025 09:47:27 -0300 Subject: [PATCH 078/128] feat: extraction via inherent first impl --- Cargo.lock | 1 + cumulus/client/parachain-inherent/Cargo.toml | 2 + cumulus/client/parachain-inherent/src/lib.rs | 113 +++++++++++++++++- cumulus/client/parachain-inherent/src/mock.rs | 1 + cumulus/pallets/parachain-system/src/lib.rs | 90 ++++++++++++++ .../primitives/parachain-inherent/src/lib.rs | 4 + .../runtime/parachains/src/broadcaster/mod.rs | 65 +++++++++- .../parachains/src/broadcaster/runtime_api.rs | 8 ++ polkadot/runtime/rococo/src/lib.rs | 8 ++ 9 files changed, 288 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b7ca706c5004d..8146be1b8af24 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4428,6 +4428,7 @@ dependencies = [ "cumulus-relay-chain-interface", "cumulus-test-relay-sproof-builder", "parity-scale-codec", + "polkadot-runtime-parachains", "sc-client-api", "sc-consensus-babe", "sp-crypto-hashing 0.1.0", diff --git a/cumulus/client/parachain-inherent/Cargo.toml b/cumulus/client/parachain-inherent/Cargo.toml index 3f5299f29b16e..a5a56c7ae3c3f 100644 --- a/cumulus/client/parachain-inherent/Cargo.toml +++ b/cumulus/client/parachain-inherent/Cargo.toml @@ -19,6 +19,8 @@ cumulus-relay-chain-interface.default-features = true cumulus-relay-chain-interface.workspace = true cumulus-test-relay-sproof-builder.default-features = true cumulus-test-relay-sproof-builder.workspace = true +polkadot-runtime-parachains.default-features = true +polkadot-runtime-parachains.workspace = true sc-client-api.default-features = true sc-client-api.workspace = true sc-consensus-babe.default-features = true diff --git a/cumulus/client/parachain-inherent/src/lib.rs b/cumulus/client/parachain-inherent/src/lib.rs index e366214b8aaa8..5b6fe73d8a1c6 100644 --- a/cumulus/client/parachain-inherent/src/lib.rs +++ b/cumulus/client/parachain-inherent/src/lib.rs @@ -16,12 +16,13 @@ //! Client side code for generating the parachain inherent. -use codec::Decode; +use codec::{Decode, Encode}; use cumulus_primitives_core::{ relay_chain::{self, Block as RelayBlock, Hash as PHash, HrmpChannelId}, ParaId, PersistedValidationData, }; use cumulus_relay_chain_interface::RelayChainInterface; +use std::collections::BTreeMap; mod mock; @@ -147,6 +148,107 @@ async fn collect_relay_storage_proof( .ok() } +/// Collect published data from all publishers in the broadcaster pallet. +async fn collect_published_data( + relay_chain_interface: &impl RelayChainInterface, + relay_parent: PHash, +) -> Option, Vec)>>> { + tracing::info!( + target: LOG_TARGET, + relay_parent = ?relay_parent, + "🔍 Collecting published data from broadcaster pallet" + ); + + // Get all publishers that have published data + let publishers: Vec = cumulus_relay_chain_interface::call_runtime_api( + relay_chain_interface, + "BroadcasterApi_get_all_publishers", + relay_parent, + (), + ) + .await + .map_err(|e| { + tracing::error!( + target: LOG_TARGET, + relay_parent = ?relay_parent, + error = ?e, + "Cannot obtain the list of publishers.", + ); + }) + .ok()?; + + tracing::info!( + target: LOG_TARGET, + relay_parent = ?relay_parent, + publishers = ?publishers, + "📋 Found {} publishers with data", + publishers.len() + ); + + let mut published_data = BTreeMap::new(); + + // Fetch all published data for each publisher + for publisher in publishers { + tracing::debug!( + target: LOG_TARGET, + relay_parent = ?relay_parent, + para_id = ?publisher, + "📦 Fetching published data for parachain {:?}", + publisher + ); + + let data: Vec<(Vec, Vec)> = cumulus_relay_chain_interface::call_runtime_api( + relay_chain_interface, + "BroadcasterApi_get_all_published_data", + relay_parent, + publisher, + ) + .await + .map_err(|e| { + tracing::error!( + target: LOG_TARGET, + relay_parent = ?relay_parent, + para_id = ?publisher, + error = ?e, + "Cannot obtain published data for publisher.", + ); + }) + .ok() + .unwrap_or_default(); + + if !data.is_empty() { + tracing::info!( + target: LOG_TARGET, + relay_parent = ?relay_parent, + para_id = ?publisher, + items = data.len(), + "✅ Collected {} data items from parachain {:?}", + data.len(), + publisher + ); + published_data.insert(publisher, data); + } else { + tracing::debug!( + target: LOG_TARGET, + relay_parent = ?relay_parent, + para_id = ?publisher, + "🕳️ No data found for parachain {:?}", + publisher + ); + } + } + + tracing::info!( + target: LOG_TARGET, + relay_parent = ?relay_parent, + total_publishers = published_data.len(), + "🎯 Collected published data from {} publishers", + published_data.len() + ); + + Some(published_data) +} + pub struct ParachainInherentDataProvider; impl ParachainInherentDataProvider { @@ -202,6 +304,14 @@ impl ParachainInherentDataProvider { }) .ok()?; + // Fetch published data from all publishers via broadcaster pallet + let published_data = collect_published_data( + relay_chain_interface, + relay_parent, + ) + .await + .unwrap_or_default(); + Some(ParachainInherentData { downward_messages, horizontal_messages, @@ -209,6 +319,7 @@ impl ParachainInherentDataProvider { relay_chain_state, relay_parent_descendants, collator_peer_id: None, + published_data, }) } } diff --git a/cumulus/client/parachain-inherent/src/mock.rs b/cumulus/client/parachain-inherent/src/mock.rs index 5f4517f884245..75977a3a5920a 100644 --- a/cumulus/client/parachain-inherent/src/mock.rs +++ b/cumulus/client/parachain-inherent/src/mock.rs @@ -242,6 +242,7 @@ impl> InherentDataProvider relay_chain_state: proof, relay_parent_descendants: Default::default(), collator_peer_id: None, + published_data: Default::default(), }; parachain_inherent_data.provide_inherent_data(inherent_data).await diff --git a/cumulus/pallets/parachain-system/src/lib.rs b/cumulus/pallets/parachain-system/src/lib.rs index 6c697a6c4ce72..3db1354a35788 100644 --- a/cumulus/pallets/parachain-system/src/lib.rs +++ b/cumulus/pallets/parachain-system/src/lib.rs @@ -630,6 +630,7 @@ pub mod pallet { horizontal_messages, relay_parent_descendants, collator_peer_id: _, + published_data, } = data; // Check that the associated relay chain block number is as expected. @@ -735,6 +736,14 @@ pub mod pallet { >::put(relevant_messaging_state.clone()); >::put(host_config); + // Process published data from the broadcaster pallet + log::info!( + target: "parachain_system::inherent", + "📨 Received inherent with published_data containing {} publishers", + published_data.len() + ); + Self::process_published_data(&published_data); + ::on_validation_data(&vfp); total_weight.saturating_accrue(Self::enqueue_inbound_downward_messages( @@ -973,6 +982,30 @@ pub mod pallet { #[pallet::storage] pub type CustomValidationHeadData = StorageValue<_, Vec, OptionQuery>; + /// Published data from parachains available through the broadcaster pallet. + /// Double map: Publisher ParaId -> Key -> Value + #[pallet::storage] + pub type PublishedData = StorageDoubleMap< + _, + Blake2_128Concat, + ParaId, // Publisher + Blake2_128Concat, + Vec, // Key + Vec, // Value + OptionQuery, + >; + + /// Root hash of published data for each publisher. + /// This can be used for efficient verification without reading all data. + #[pallet::storage] + pub type PublishedDataRoot = StorageMap< + _, + Blake2_128Concat, + ParaId, // Publisher + T::Hash, // Root hash of published data + OptionQuery, + >; + #[pallet::inherent] impl ProvideInherent for Pallet { type Call = Call; @@ -1302,6 +1335,63 @@ impl Pallet { weight_used } + /// Process published data from the broadcaster pallet and store it in parachain storage. + fn process_published_data( + published_data: &BTreeMap, Vec)>>, + ) { + log::info!( + target: "parachain_system::published_data", + "📨 Processing published data from {} publishers", + published_data.len() + ); + + if published_data.is_empty() { + log::debug!( + target: "parachain_system::published_data", + "🕳️ No published data to process" + ); + return; + } + + // Store new published data (we'll clear per-publisher rather than all data) + for (publisher, data_entries) in published_data { + log::info!( + target: "parachain_system::published_data", + "📦 Processing {} data items from publisher parachain {:?}", + data_entries.len(), + publisher + ); + + // Clear existing data for this publisher + let _ = PublishedData::::remove_prefix(publisher, None); + + // Store new data for this publisher + for (key, value) in data_entries { + log::debug!( + target: "parachain_system::published_data", + "💾 Storing key {:?} ({}B) -> value ({}B) from publisher {:?}", + key, + key.len(), + value.len(), + publisher + ); + PublishedData::::insert(publisher, key, value); + } + + log::info!( + target: "parachain_system::published_data", + "✅ Successfully stored {} items from publisher {:?}", + data_entries.len(), + publisher + ); + } + + log::info!( + target: "parachain_system::published_data", + "🎯 Finished processing published data from all publishers" + ); + } + /// Drop blocks from the unincluded segment with respect to the latest parachain head. fn maybe_drop_included_ancestors( relay_state_proof: &RelayChainStateProof, diff --git a/cumulus/primitives/parachain-inherent/src/lib.rs b/cumulus/primitives/parachain-inherent/src/lib.rs index 7af2cc09cd6e5..9ac33dda91197 100644 --- a/cumulus/primitives/parachain-inherent/src/lib.rs +++ b/cumulus/primitives/parachain-inherent/src/lib.rs @@ -120,6 +120,9 @@ pub struct ParachainInherentData { /// Contains the collator peer ID, which is later sent by the parachain to the /// relay chain via a UMP signal to promote the reputation of the given peer ID. pub collator_peer_id: Option, + /// Published data from the broadcaster pallet on the relay chain. + /// Key: Publisher ParaId, Value: Vector of (key, value) pairs published by that parachain. + pub published_data: BTreeMap, Vec)>>, } // Upgrades the ParachainInherentData v0 to the newest format. @@ -132,6 +135,7 @@ impl Into for v0::ParachainInherentData { horizontal_messages: self.horizontal_messages, relay_parent_descendants: Vec::new(), collator_peer_id: None, + published_data: BTreeMap::new(), } } } diff --git a/polkadot/runtime/parachains/src/broadcaster/mod.rs b/polkadot/runtime/parachains/src/broadcaster/mod.rs index 183d4bc10a153..6706c9853e38d 100644 --- a/polkadot/runtime/parachains/src/broadcaster/mod.rs +++ b/polkadot/runtime/parachains/src/broadcaster/mod.rs @@ -108,12 +108,19 @@ pub mod pallet { impl Pallet { /// Process a publish operation from a parachain. - /// + /// /// Stores the provided key-value pairs in the publisher's child trie. pub fn handle_publish( origin_para_id: ParaId, data: Vec<(Vec, Vec)>, ) -> DispatchResult { + log::info!( + target: "broadcaster::publish", + "📡 Publishing data from parachain {:?}: {} items", + origin_para_id, + data.len() + ); + // Validate input limits first before making any changes ensure!( data.len() <= T::MaxPublishItems::get() as usize, @@ -140,6 +147,15 @@ pub mod pallet { // Store each key-value pair in the child trie and track the key for (key, value) in data { + log::debug!( + target: "broadcaster::publish", + "📝 Storing key {:?} ({}B) -> value ({}B) for parachain {:?}", + key, + key.len(), + value.len(), + origin_para_id + ); + frame_support::storage::child::put(&child_info, &key, &value); // Track the key for enumeration (convert to BoundedVec) @@ -151,6 +167,13 @@ pub mod pallet { // Update the published keys storage PublishedKeys::::insert(origin_para_id, published_keys); + log::info!( + target: "broadcaster::publish", + "✅ Successfully published data for parachain {:?}, total keys: {}", + origin_para_id, + PublishedKeys::::get(origin_para_id).len() + ); + Ok(()) } @@ -197,21 +220,57 @@ pub mod pallet { /// Get all published data for a parachain. pub fn get_all_published_data(para_id: ParaId) -> Vec<(Vec, Vec)> { + log::debug!( + target: "broadcaster::query", + "🔍 get_all_published_data() called for parachain {:?}", + para_id + ); + if !PublisherExists::::get(para_id) { + log::debug!( + target: "broadcaster::query", + "❌ Parachain {:?} has no published data", + para_id + ); return Vec::new(); } let child_info = Self::derive_child_info(para_id); let published_keys = PublishedKeys::::get(para_id); - published_keys + let data: Vec<(Vec, Vec)> = published_keys .into_iter() .filter_map(|bounded_key| { let key: Vec = bounded_key.into(); frame_support::storage::child::get(&child_info, &key) .map(|value| (key, value)) }) - .collect() + .collect(); + + log::debug!( + target: "broadcaster::query", + "📦 Returning {} data items for parachain {:?}", + data.len(), + para_id + ); + + data + } + + /// Get list of all parachains that have published data. + pub fn get_all_publishers() -> Vec { + let publishers: Vec = PublisherExists::::iter() + .filter_map(|(para_id, exists)| if exists { Some(para_id) } else { None }) + .collect(); + + log::debug!( + target: "broadcaster::query", + "🔍 get_all_publishers() returning {} publishers: {:?}", + publishers.len(), + publishers + ); + + publishers } } } diff --git a/polkadot/runtime/parachains/src/broadcaster/runtime_api.rs b/polkadot/runtime/parachains/src/broadcaster/runtime_api.rs index f9f7e3b19511c..eb378d2bcb292 100644 --- a/polkadot/runtime/parachains/src/broadcaster/runtime_api.rs +++ b/polkadot/runtime/parachains/src/broadcaster/runtime_api.rs @@ -30,5 +30,13 @@ sp_api::decl_runtime_apis! { /// Get the child trie root hash for a publisher. /// This can be used to prove the current state of published data. fn get_publisher_child_root(para_id: ParaId) -> Option>; + + /// Get all published data for a specific parachain. + /// Returns empty vec if the parachain hasn't published any data. + fn get_all_published_data(para_id: ParaId) -> Vec<(Vec, Vec)>; + + /// Get list of all parachains that have published data. + /// Returns empty vec if no parachains have published data. + fn get_all_publishers() -> Vec; } } \ No newline at end of file diff --git a/polkadot/runtime/rococo/src/lib.rs b/polkadot/runtime/rococo/src/lib.rs index 4d00d289f4977..e82863ff000b6 100644 --- a/polkadot/runtime/rococo/src/lib.rs +++ b/polkadot/runtime/rococo/src/lib.rs @@ -2741,6 +2741,14 @@ sp_api::impl_runtime_apis! { fn get_publisher_child_root(para_id: polkadot_primitives::Id) -> Option> { Broadcaster::get_publisher_child_root(para_id) } + + fn get_all_published_data(para_id: polkadot_primitives::Id) -> Vec<(Vec, Vec)> { + Broadcaster::get_all_published_data(para_id) + } + + fn get_all_publishers() -> Vec { + Broadcaster::get_all_publishers() + } } } From d223b133570c21f1dcc1a2f70222bb146da8d58f Mon Sep 17 00:00:00 2001 From: metricaez Date: Mon, 22 Sep 2025 11:22:47 -0300 Subject: [PATCH 079/128] fix: fix tests --- cumulus/pallets/parachain-system/src/mock.rs | 1 + cumulus/pallets/parachain-system/src/tests.rs | 2 ++ cumulus/test/client/src/block_builder.rs | 1 + cumulus/test/service/src/bench_utils.rs | 1 + polkadot/runtime/test-runtime/src/xcm_config.rs | 1 + 5 files changed, 6 insertions(+) diff --git a/cumulus/pallets/parachain-system/src/mock.rs b/cumulus/pallets/parachain-system/src/mock.rs index 76f8ebc602139..df470e54d6723 100644 --- a/cumulus/pallets/parachain-system/src/mock.rs +++ b/cumulus/pallets/parachain-system/src/mock.rs @@ -423,6 +423,7 @@ impl BlockTests { horizontal_messages: Default::default(), relay_parent_descendants: Default::default(), collator_peer_id: None, + published_data: Default::default(), }; if let Some(ref hook) = self.inherent_data_hook { hook(self, relay_parent_number, &mut system_inherent_data); diff --git a/cumulus/pallets/parachain-system/src/tests.rs b/cumulus/pallets/parachain-system/src/tests.rs index 160f9d253e311..b069f47a0cb7f 100755 --- a/cumulus/pallets/parachain-system/src/tests.rs +++ b/cumulus/pallets/parachain-system/src/tests.rs @@ -57,6 +57,7 @@ fn test_inherent_compatibility() { horizontal_messages: Default::default(), relay_parent_descendants: Default::default(), collator_peer_id: None, + published_data: Default::default(), }, ) .expect("Put validation function params failed"); @@ -82,6 +83,7 @@ fn test_inherent_compatibility() { horizontal_messages: Default::default(), relay_parent_descendants: Default::default(), collator_peer_id: None, + published_data: Default::default(), }; let _ = futures::executor::block_on( data.provide_inherent_data(&mut valid_inherent_data_full_compatibility), diff --git a/cumulus/test/client/src/block_builder.rs b/cumulus/test/client/src/block_builder.rs index ee400859f75c8..52e26564da5e0 100644 --- a/cumulus/test/client/src/block_builder.rs +++ b/cumulus/test/client/src/block_builder.rs @@ -124,6 +124,7 @@ fn init_block_builder( horizontal_messages: Default::default(), relay_parent_descendants: Default::default(), collator_peer_id: None, + published_data: Default::default(), }, ) .expect("Put validation function params failed"); diff --git a/cumulus/test/service/src/bench_utils.rs b/cumulus/test/service/src/bench_utils.rs index 5030cd6d95399..8b88cd6690700 100644 --- a/cumulus/test/service/src/bench_utils.rs +++ b/cumulus/test/service/src/bench_utils.rs @@ -100,6 +100,7 @@ pub fn extrinsic_set_validation_data( horizontal_messages: Default::default(), relay_parent_descendants: Default::default(), collator_peer_id: None, + published_data: Default::default(), }; cumulus_test_runtime::UncheckedExtrinsic::new_bare( diff --git a/polkadot/runtime/test-runtime/src/xcm_config.rs b/polkadot/runtime/test-runtime/src/xcm_config.rs index 8d7e351d0d5be..4b43918733c91 100644 --- a/polkadot/runtime/test-runtime/src/xcm_config.rs +++ b/polkadot/runtime/test-runtime/src/xcm_config.rs @@ -158,6 +158,7 @@ impl xcm_executor::Config for XcmConfig { type HrmpChannelAcceptedHandler = (); type HrmpChannelClosingHandler = (); type XcmRecorder = (); + type BroadcastHandler = (); } impl pallet_xcm::Config for crate::Runtime { From a71ad3a32792d02d17883271dc05b414b36d3a78 Mon Sep 17 00:00:00 2001 From: metricaez Date: Tue, 23 Sep 2025 08:07:50 -0300 Subject: [PATCH 080/128] feat: store data roots --- cumulus/client/parachain-inherent/src/lib.rs | 3 + polkadot/primitives/src/v8/mod.rs | 7 +++ .../runtime/parachains/src/broadcaster/mod.rs | 59 ++++++++++++++++++- .../parachains/src/broadcaster/tests.rs | 19 +++++- 4 files changed, 83 insertions(+), 5 deletions(-) diff --git a/cumulus/client/parachain-inherent/src/lib.rs b/cumulus/client/parachain-inherent/src/lib.rs index 5b6fe73d8a1c6..bfbda034b4815 100644 --- a/cumulus/client/parachain-inherent/src/lib.rs +++ b/cumulus/client/parachain-inherent/src/lib.rs @@ -134,6 +134,9 @@ async fn collect_relay_storage_proof( relevant_keys.push(relay_well_known_keys::NEXT_AUTHORITIES.to_vec()); } + // Include broadcaster published data roots + relevant_keys.push(relay_well_known_keys::BROADCASTER_PUBLISHED_DATA_ROOTS.to_vec()); + relay_chain_interface .prove_read(relay_parent, &relevant_keys) .await diff --git a/polkadot/primitives/src/v8/mod.rs b/polkadot/primitives/src/v8/mod.rs index 060c6fe97ca99..d0ae2cc200000 100644 --- a/polkadot/primitives/src/v8/mod.rs +++ b/polkadot/primitives/src/v8/mod.rs @@ -248,6 +248,13 @@ pub mod well_known_keys { pub const AUTHORITIES: &[u8] = &hex!["1cb6f36e027abb2091cfb5110ab5087f5e0621c4869aa60c02be9adcc98a0d1d"]; + /// Published data roots from the broadcaster pallet. + /// + /// The storage entry should be accessed as `Vec<(ParaId, Vec)>` encoded value + /// where Vec is the child trie root hash for each publisher. + pub const BROADCASTER_PUBLISHED_DATA_ROOTS: &[u8] = + &hex!["6aca18c1f7576767ccb238db4ccaedf239166324ac7ea24c870f96ab961f9654"]; + /// The authorities for the next epoch. /// /// The storage entry should be accessed as an `Vec<(AuthorityId, BabeAuthorityWeight)>` encoded diff --git a/polkadot/runtime/parachains/src/broadcaster/mod.rs b/polkadot/runtime/parachains/src/broadcaster/mod.rs index 6706c9853e38d..ee9924d47f447 100644 --- a/polkadot/runtime/parachains/src/broadcaster/mod.rs +++ b/polkadot/runtime/parachains/src/broadcaster/mod.rs @@ -23,8 +23,9 @@ use alloc::vec::Vec; use frame_support::{ pallet_prelude::*, storage::child::ChildInfo, - traits::Get, + traits::{Get, ConstU32}, }; +use frame_system::pallet_prelude::BlockNumberFor; use polkadot_primitives::Id as ParaId; pub use pallet::*; @@ -94,6 +95,17 @@ pub mod pallet { ValueQuery, >; + /// Aggregated child trie roots for all publishers. + /// + /// Contains (ParaId, child_trie_root) pairs for all parachains that have published data. + /// This is used in relay chain storage proofs to efficiently provide all publisher roots. + #[pallet::storage] + pub type PublishedDataRoots = StorageValue< + _, + BoundedVec<(ParaId, BoundedVec>), ConstU32<1000>>, + ValueQuery, + >; + #[pallet::error] pub enum Error { /// Too many items in a single publish operation @@ -106,6 +118,18 @@ pub mod pallet { ChildTrieError, } + #[pallet::hooks] + impl Hooks> for Pallet { + fn integrity_test() { + assert_eq!( + &PublishedDataRoots::::hashed_key(), + polkadot_primitives::well_known_keys::BROADCASTER_PUBLISHED_DATA_ROOTS, + "`well_known_keys::BROADCASTER_PUBLISHED_DATA_ROOTS` doesn't match key of `PublishedDataRoots`! \ + Make sure that the name of the broadcaster pallet is `Broadcaster` in the runtime!", + ); + } + } + impl Pallet { /// Process a publish operation from a parachain. /// @@ -167,11 +191,40 @@ pub mod pallet { // Update the published keys storage PublishedKeys::::insert(origin_para_id, published_keys); + // Calculate and update the child trie root for this publisher + let child_root = frame_support::storage::child::root(&child_info, + sp_runtime::StateVersion::V1); + + // Update the aggregated roots storage + let mut roots = PublishedDataRoots::::get(); + + // Find and update existing entry or add new one + let mut found = false; + for (para_id, root_hash) in roots.iter_mut() { + if *para_id == origin_para_id { + if let Ok(bounded_root) = BoundedVec::try_from(child_root.clone()) { + *root_hash = bounded_root; + } + found = true; + break; + } + } + + // If not found, add new entry + if !found { + if let Ok(bounded_root) = BoundedVec::try_from(child_root.clone()) { + let _ = roots.try_push((origin_para_id, bounded_root)); + } + } + + PublishedDataRoots::::put(roots); + log::info!( target: "broadcaster::publish", - "✅ Successfully published data for parachain {:?}, total keys: {}", + "✅ Successfully published data for parachain {:?}, total keys: {}, root: {:?}", origin_para_id, - PublishedKeys::::get(origin_para_id).len() + PublishedKeys::::get(origin_para_id).len(), + child_root ); Ok(()) diff --git a/polkadot/runtime/parachains/src/broadcaster/tests.rs b/polkadot/runtime/parachains/src/broadcaster/tests.rs index 9dc20772f97ee..9ba64111953e7 100644 --- a/polkadot/runtime/parachains/src/broadcaster/tests.rs +++ b/polkadot/runtime/parachains/src/broadcaster/tests.rs @@ -128,13 +128,28 @@ fn handle_publish_respects_key_length_limit() { fn handle_publish_respects_value_length_limit() { new_test_ext(Default::default()).execute_with(|| { let para_id = ParaId::from(1000); - + // Create value longer than MaxValueLength=1000 let long_value = vec![b'v'; 1001]; let data = vec![(b"key".to_vec(), long_value)]; - + let result = Broadcaster::handle_publish(para_id, data); assert!(result.is_err()); assert!(!PublisherExists::::get(para_id)); }); +} + +#[test] +fn get_storage_key() { + new_test_ext(Default::default()).execute_with(|| { + let key = PublishedDataRoots::::hashed_key(); + println!("PublishedDataRoots storage key (bytes): {:?}", key); + + // Print as hex manually + print!("PublishedDataRoots storage key (hex): "); + for byte in &key { + print!("{:02x}", byte); + } + println!(); + }); } \ No newline at end of file From 8c59d80f852ac7cc8696e18def64402df83c4b04 Mon Sep 17 00:00:00 2001 From: metricaez Date: Tue, 23 Sep 2025 09:14:54 -0300 Subject: [PATCH 081/128] feat: extract roots on parachain-system --- cumulus/pallets/parachain-system/src/lib.rs | 22 +++++++++++++------ .../src/relay_state_snapshot.rs | 14 ++++++++++++ 2 files changed, 29 insertions(+), 7 deletions(-) diff --git a/cumulus/pallets/parachain-system/src/lib.rs b/cumulus/pallets/parachain-system/src/lib.rs index 3db1354a35788..a707d40af4a01 100644 --- a/cumulus/pallets/parachain-system/src/lib.rs +++ b/cumulus/pallets/parachain-system/src/lib.rs @@ -736,6 +736,15 @@ pub mod pallet { >::put(relevant_messaging_state.clone()); >::put(host_config); + // Extract and store published data roots from relay chain state + if let Ok(Some(published_roots)) = relay_state_proof.read_published_data_roots() { + >::put(published_roots); + log::debug!( + target: "parachain_system::inherent", + "Stored published data roots from relay chain state" + ); + } + // Process published data from the broadcaster pallet log::info!( target: "parachain_system::inherent", @@ -995,17 +1004,16 @@ pub mod pallet { OptionQuery, >; - /// Root hash of published data for each publisher. - /// This can be used for efficient verification without reading all data. + /// Data roots of published data from broadcaster pallet on relay chain. + /// Contains (ParaId, root_hash) pairs for all publishers, mirroring the relay chain storage. #[pallet::storage] - pub type PublishedDataRoot = StorageMap< + pub type PublishedDataRoots = StorageValue< _, - Blake2_128Concat, - ParaId, // Publisher - T::Hash, // Root hash of published data - OptionQuery, + Vec<(ParaId, Vec)>, // Vector of (Publisher, Root hash) + ValueQuery, >; + #[pallet::inherent] impl ProvideInherent for Pallet { type Call = Call; diff --git a/cumulus/pallets/parachain-system/src/relay_state_snapshot.rs b/cumulus/pallets/parachain-system/src/relay_state_snapshot.rs index 7138d61edd277..7d7bd761d79f6 100644 --- a/cumulus/pallets/parachain-system/src/relay_state_snapshot.rs +++ b/cumulus/pallets/parachain-system/src/relay_state_snapshot.rs @@ -383,4 +383,18 @@ impl RelayChainStateProof { { read_optional_entry(&self.trie_backend, key).map_err(Error::ReadOptionalEntry) } + + /// Read the published data roots from the broadcaster pallet on the relay chain. + /// + /// Returns `Ok(Some(data))` if the data exists and can be decoded, + /// `Ok(None)` if the data doesn't exist (broadcaster pallet not present), + /// or `Err` if there was a proof/decode error. + pub fn read_published_data_roots(&self) -> Result)>>, Error> { + // Use the well-known key for BROADCASTER_PUBLISHED_DATA_ROOTS + read_optional_entry::)>, _>( + &self.trie_backend, + relay_chain::well_known_keys::BROADCASTER_PUBLISHED_DATA_ROOTS, + ) + .map_err(Error::ReadOptionalEntry) + } } From 0765976aaf4b1cf5abe03ac1cdd338adacd87bf2 Mon Sep 17 00:00:00 2001 From: metricaez Date: Tue, 23 Sep 2025 12:52:30 -0300 Subject: [PATCH 082/128] feat: first sub broadcaster logic --- .../runtime/parachains/src/broadcaster/mod.rs | 72 ++++++++++++++++- .../parachains/src/broadcaster/tests.rs | 78 +++++++++++++++++++ polkadot/runtime/parachains/src/mock.rs | 1 + polkadot/runtime/rococo/src/lib.rs | 2 + 4 files changed, 151 insertions(+), 2 deletions(-) diff --git a/polkadot/runtime/parachains/src/broadcaster/mod.rs b/polkadot/runtime/parachains/src/broadcaster/mod.rs index ee9924d47f447..73077981695b1 100644 --- a/polkadot/runtime/parachains/src/broadcaster/mod.rs +++ b/polkadot/runtime/parachains/src/broadcaster/mod.rs @@ -64,12 +64,16 @@ pub mod pallet { type MaxPublishItems: Get; /// Maximum length of a key in bytes - #[pallet::constant] + #[pallet::constant] type MaxKeyLength: Get; /// Maximum length of a value in bytes #[pallet::constant] type MaxValueLength: Get; + + /// Maximum number of publishers a subscriber can subscribe to + #[pallet::constant] + type MaxSubscriptions: Get; } /// Tracks which parachains have published data. @@ -95,6 +99,19 @@ pub mod pallet { ValueQuery, >; + /// Tracks subscriptions: subscriber -> list of publishers. + /// + /// Maps subscriber ParaId to a bounded vector of publisher ParaIds. + /// Empty vec means no subscriptions. + #[pallet::storage] + pub type Subscriptions = StorageMap< + _, + Blake2_128Concat, + ParaId, // Subscriber + BoundedVec, // List of publishers + ValueQuery, + >; + /// Aggregated child trie roots for all publishers. /// /// Contains (ParaId, child_trie_root) pairs for all parachains that have published data. @@ -112,10 +129,12 @@ pub mod pallet { TooManyPublishItems, /// Key length exceeds maximum allowed KeyTooLong, - /// Value length exceeds maximum allowed + /// Value length exceeds maximum allowed ValueTooLong, /// Child trie operation failed ChildTrieError, + /// Too many subscriptions for this subscriber + TooManySubscriptions, } #[pallet::hooks] @@ -325,6 +344,55 @@ pub mod pallet { publishers } + + /// Toggle subscription: subscribe if not subscribed, unsubscribe if subscribed. + pub fn handle_subscribe_toggle( + subscriber: ParaId, + publisher: ParaId, + ) -> DispatchResult { + log::info!( + target: "broadcaster::subscribe", + "🔄 Toggle subscription for parachain {:?} to publisher {:?}", + subscriber, + publisher + ); + + let mut subscriptions = Subscriptions::::get(subscriber); + + // Check if already subscribed + if let Some(pos) = subscriptions.iter().position(|&p| p == publisher) { + // Already subscribed -> unsubscribe + subscriptions.swap_remove(pos); + log::debug!( + target: "broadcaster::subscribe", + "❌ Unsubscribed: {:?} from {:?}", + subscriber, + publisher + ); + } else { + // Not subscribed -> subscribe + subscriptions.try_push(publisher).map_err(|_| Error::::TooManySubscriptions)?; + log::debug!( + target: "broadcaster::subscribe", + "✅ Subscribed: {:?} to {:?}", + subscriber, + publisher + ); + } + + Subscriptions::::insert(subscriber, subscriptions); + Ok(()) + } + + /// Get all subscriptions for a parachain. + pub fn get_subscriptions(subscriber: ParaId) -> Vec { + Subscriptions::::get(subscriber).into_inner() + } + + /// Check if a parachain is subscribed to a publisher. + pub fn is_subscribed(subscriber: ParaId, publisher: ParaId) -> bool { + Subscriptions::::get(subscriber).contains(&publisher) + } } } diff --git a/polkadot/runtime/parachains/src/broadcaster/tests.rs b/polkadot/runtime/parachains/src/broadcaster/tests.rs index 9ba64111953e7..df1bbd0f99cca 100644 --- a/polkadot/runtime/parachains/src/broadcaster/tests.rs +++ b/polkadot/runtime/parachains/src/broadcaster/tests.rs @@ -16,6 +16,7 @@ use super::*; use crate::mock::{new_test_ext, Broadcaster, Test}; +use frame_support::{assert_ok, assert_err}; use polkadot_primitives::Id as ParaId; #[test] @@ -152,4 +153,81 @@ fn get_storage_key() { } println!(); }); +} + +#[test] +fn subscribe_toggle_works() { + new_test_ext(Default::default()).execute_with(|| { + let subscriber = ParaId::from(1000); + let publisher = ParaId::from(2000); + + // Initially not subscribed + assert!(!Broadcaster::is_subscribed(subscriber, publisher)); + assert_eq!(Broadcaster::get_subscriptions(subscriber), vec![]); + + // First toggle: subscribe + assert_ok!(Broadcaster::handle_subscribe_toggle(subscriber, publisher)); + assert!(Broadcaster::is_subscribed(subscriber, publisher)); + assert_eq!(Broadcaster::get_subscriptions(subscriber), vec![publisher]); + + // Second toggle: unsubscribe + assert_ok!(Broadcaster::handle_subscribe_toggle(subscriber, publisher)); + assert!(!Broadcaster::is_subscribed(subscriber, publisher)); + assert_eq!(Broadcaster::get_subscriptions(subscriber), vec![]); + }); +} + +#[test] +fn multiple_subscriptions_work() { + new_test_ext(Default::default()).execute_with(|| { + let subscriber = ParaId::from(1000); + let publisher1 = ParaId::from(2000); + let publisher2 = ParaId::from(3000); + let publisher3 = ParaId::from(4000); + + // Subscribe to multiple publishers + assert_ok!(Broadcaster::handle_subscribe_toggle(subscriber, publisher1)); + assert_ok!(Broadcaster::handle_subscribe_toggle(subscriber, publisher2)); + assert_ok!(Broadcaster::handle_subscribe_toggle(subscriber, publisher3)); + + let subscriptions = Broadcaster::get_subscriptions(subscriber); + assert_eq!(subscriptions.len(), 3); + assert!(subscriptions.contains(&publisher1)); + assert!(subscriptions.contains(&publisher2)); + assert!(subscriptions.contains(&publisher3)); + + // Unsubscribe from middle one + assert_ok!(Broadcaster::handle_subscribe_toggle(subscriber, publisher2)); + + let subscriptions = Broadcaster::get_subscriptions(subscriber); + assert_eq!(subscriptions.len(), 2); + assert!(subscriptions.contains(&publisher1)); + assert!(!subscriptions.contains(&publisher2)); + assert!(subscriptions.contains(&publisher3)); + }); +} + +#[test] +fn max_subscriptions_limit_enforced() { + new_test_ext(Default::default()).execute_with(|| { + let subscriber = ParaId::from(1000); + + // Subscribe up to MaxSubscriptions (10 in mock) + for i in 0..10 { + let publisher = ParaId::from(2000 + i); + assert_ok!(Broadcaster::handle_subscribe_toggle(subscriber, publisher)); + } + + // Try to add one more subscription - should fail + let publisher = ParaId::from(3000); + assert_err!( + Broadcaster::handle_subscribe_toggle(subscriber, publisher), + Error::::TooManySubscriptions + ); + + // But can still unsubscribe and resubscribe + let existing_publisher = ParaId::from(2000); + assert_ok!(Broadcaster::handle_subscribe_toggle(subscriber, existing_publisher)); // Unsubscribe + assert_ok!(Broadcaster::handle_subscribe_toggle(subscriber, publisher)); // Subscribe to new one + }); } \ No newline at end of file diff --git a/polkadot/runtime/parachains/src/mock.rs b/polkadot/runtime/parachains/src/mock.rs index 3a0a6fb568747..e6d39b02aba21 100644 --- a/polkadot/runtime/parachains/src/mock.rs +++ b/polkadot/runtime/parachains/src/mock.rs @@ -493,6 +493,7 @@ impl crate::broadcaster::Config for Test { type MaxPublishItems = MaxPublishItems; type MaxKeyLength = MaxKeyLength; type MaxValueLength = MaxValueLength; + type MaxSubscriptions = ConstU32<10>; } pub struct MockValidatorSet; diff --git a/polkadot/runtime/rococo/src/lib.rs b/polkadot/runtime/rococo/src/lib.rs index e82863ff000b6..7225238066d2b 100644 --- a/polkadot/runtime/rococo/src/lib.rs +++ b/polkadot/runtime/rococo/src/lib.rs @@ -1227,12 +1227,14 @@ parameter_types! { pub const MaxPublishItems: u32 = 100; pub const MaxKeyLength: u32 = 256; pub const MaxValueLength: u32 = 1024; + pub const MaxSubscriptions: u32 = 100; } impl polkadot_runtime_parachains::broadcaster::Config for Runtime { type MaxPublishItems = MaxPublishItems; type MaxKeyLength = MaxKeyLength; type MaxValueLength = MaxValueLength; + type MaxSubscriptions = MaxSubscriptions; } parameter_types! { From 334fb1b5a62d33cb6c2c0c1473a01368326067ab Mon Sep 17 00:00:00 2001 From: metricaez Date: Tue, 23 Sep 2025 16:02:53 -0300 Subject: [PATCH 083/128] feat: Subscribe instruction --- .../asset-hub-rococo/src/weights/xcm/mod.rs | 6 +++++- .../asset-hub-westend/src/weights/xcm/mod.rs | 6 +++++- .../bridge-hub-rococo/src/weights/xcm/mod.rs | 6 +++++- .../bridge-hub-westend/src/weights/xcm/mod.rs | 6 +++++- .../src/weights/xcm/mod.rs | 6 +++++- .../coretime-rococo/src/weights/xcm/mod.rs | 6 +++++- .../coretime-westend/src/weights/xcm/mod.rs | 6 +++++- .../people-rococo/src/weights/xcm/mod.rs | 6 +++++- .../people-westend/src/weights/xcm/mod.rs | 6 +++++- .../runtime/parachains/src/broadcaster/mod.rs | 7 +++++++ .../runtime/rococo/src/weights/xcm/mod.rs | 6 +++++- .../runtime/westend/src/weights/xcm/mod.rs | 6 +++++- polkadot/xcm/src/v4/mod.rs | 4 ++++ polkadot/xcm/src/v5/mod.rs | 20 +++++++++++++++++++ .../xcm/xcm-builder/src/broadcast_adapter.rs | 19 ++++++++++++++++++ polkadot/xcm/xcm-executor/src/lib.rs | 5 +++++ .../src/traits/broadcast_handler.rs | 9 +++++++++ 17 files changed, 119 insertions(+), 11 deletions(-) diff --git a/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/weights/xcm/mod.rs b/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/weights/xcm/mod.rs index ca80976a064c8..08ca0d1d8d681 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/weights/xcm/mod.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/weights/xcm/mod.rs @@ -272,7 +272,11 @@ impl XcmWeightInfo for AssetHubRococoXcmWeight { XcmGeneric::::execute_with_origin() } fn publish(_: &PublishData) -> Weight { - // TODO: Benchmark + // TODO: Benchmark + Weight::from_parts(10_000_000, 0) + } + fn subscribe(_: &u32) -> Weight { + // TODO: Benchmark Weight::from_parts(10_000_000, 0) } } diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/xcm/mod.rs b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/xcm/mod.rs index d1c256c5affa5..87858cc676343 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/xcm/mod.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/xcm/mod.rs @@ -303,7 +303,11 @@ impl XcmWeightInfo for AssetHubWestendXcmWeight { XcmGeneric::::execute_with_origin() } fn publish(_: &PublishData) -> Weight { - // TODO: Benchmark + // TODO: Benchmark + Weight::from_parts(10_000_000, 0) + } + fn subscribe(_: &u32) -> Weight { + // TODO: Benchmark Weight::from_parts(10_000_000, 0) } } diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/xcm/mod.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/xcm/mod.rs index 8003e414061db..951fd5144532f 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/xcm/mod.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/xcm/mod.rs @@ -273,7 +273,11 @@ impl XcmWeightInfo for BridgeHubRococoXcmWeight { XcmGeneric::::execute_with_origin() } fn publish(_: &PublishData) -> Weight { - // TODO: Benchmark + // TODO: Benchmark + Weight::from_parts(10_000_000, 0) + } + fn subscribe(_: &u32) -> Weight { + // TODO: Benchmark Weight::from_parts(10_000_000, 0) } } diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/weights/xcm/mod.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/weights/xcm/mod.rs index fbf413548d34c..0743b0b60ef52 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/weights/xcm/mod.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/weights/xcm/mod.rs @@ -273,7 +273,11 @@ impl XcmWeightInfo for BridgeHubWestendXcmWeight { XcmGeneric::::execute_with_origin() } fn publish(_: &PublishData) -> Weight { - // TODO: Benchmark + // TODO: Benchmark + Weight::from_parts(10_000_000, 0) + } + fn subscribe(_: &u32) -> Weight { + // TODO: Benchmark Weight::from_parts(10_000_000, 0) } } diff --git a/cumulus/parachains/runtimes/collectives/collectives-westend/src/weights/xcm/mod.rs b/cumulus/parachains/runtimes/collectives/collectives-westend/src/weights/xcm/mod.rs index c22caf2402a75..2f0c910ccab59 100644 --- a/cumulus/parachains/runtimes/collectives/collectives-westend/src/weights/xcm/mod.rs +++ b/cumulus/parachains/runtimes/collectives/collectives-westend/src/weights/xcm/mod.rs @@ -271,7 +271,11 @@ impl XcmWeightInfo for CollectivesWestendXcmWeight { XcmGeneric::::execute_with_origin() } fn publish(_: &PublishData) -> Weight { - // TODO: Benchmark + // TODO: Benchmark + Weight::from_parts(10_000_000, 0) + } + fn subscribe(_: &u32) -> Weight { + // TODO: Benchmark Weight::from_parts(10_000_000, 0) } } diff --git a/cumulus/parachains/runtimes/coretime/coretime-rococo/src/weights/xcm/mod.rs b/cumulus/parachains/runtimes/coretime/coretime-rococo/src/weights/xcm/mod.rs index 4744d726dadab..ff8221a927d0b 100644 --- a/cumulus/parachains/runtimes/coretime/coretime-rococo/src/weights/xcm/mod.rs +++ b/cumulus/parachains/runtimes/coretime/coretime-rococo/src/weights/xcm/mod.rs @@ -271,7 +271,11 @@ impl XcmWeightInfo for CoretimeRococoXcmWeight { XcmGeneric::::execute_with_origin() } fn publish(_: &PublishData) -> Weight { - // TODO: Benchmark + // TODO: Benchmark + Weight::from_parts(10_000_000, 0) + } + fn subscribe(_: &u32) -> Weight { + // TODO: Benchmark Weight::from_parts(10_000_000, 0) } } diff --git a/cumulus/parachains/runtimes/coretime/coretime-westend/src/weights/xcm/mod.rs b/cumulus/parachains/runtimes/coretime/coretime-westend/src/weights/xcm/mod.rs index 6bbf81dba3676..fdb7f1845ea29 100644 --- a/cumulus/parachains/runtimes/coretime/coretime-westend/src/weights/xcm/mod.rs +++ b/cumulus/parachains/runtimes/coretime/coretime-westend/src/weights/xcm/mod.rs @@ -270,7 +270,11 @@ impl XcmWeightInfo for CoretimeWestendXcmWeight { XcmGeneric::::execute_with_origin() } fn publish(_: &PublishData) -> Weight { - // TODO: Benchmark + // TODO: Benchmark + Weight::from_parts(10_000_000, 0) + } + fn subscribe(_: &u32) -> Weight { + // TODO: Benchmark Weight::from_parts(10_000_000, 0) } } diff --git a/cumulus/parachains/runtimes/people/people-rococo/src/weights/xcm/mod.rs b/cumulus/parachains/runtimes/people/people-rococo/src/weights/xcm/mod.rs index f7b5baa87de52..6f99411170729 100644 --- a/cumulus/parachains/runtimes/people/people-rococo/src/weights/xcm/mod.rs +++ b/cumulus/parachains/runtimes/people/people-rococo/src/weights/xcm/mod.rs @@ -270,7 +270,11 @@ impl XcmWeightInfo for PeopleRococoXcmWeight { XcmGeneric::::execute_with_origin() } fn publish(_: &PublishData) -> Weight { - // TODO: Benchmark + // TODO: Benchmark + Weight::from_parts(10_000_000, 0) + } + fn subscribe(_: &u32) -> Weight { + // TODO: Benchmark Weight::from_parts(10_000_000, 0) } } diff --git a/cumulus/parachains/runtimes/people/people-westend/src/weights/xcm/mod.rs b/cumulus/parachains/runtimes/people/people-westend/src/weights/xcm/mod.rs index 7f79452e3ed5a..c5f1a1c0a3151 100644 --- a/cumulus/parachains/runtimes/people/people-westend/src/weights/xcm/mod.rs +++ b/cumulus/parachains/runtimes/people/people-westend/src/weights/xcm/mod.rs @@ -269,7 +269,11 @@ impl XcmWeightInfo for PeopleWestendXcmWeight { XcmGeneric::::execute_with_origin() } fn publish(_: &PublishData) -> Weight { - // TODO: Benchmark + // TODO: Benchmark + Weight::from_parts(10_000_000, 0) + } + fn subscribe(_: &u32) -> Weight { + // TODO: Benchmark Weight::from_parts(10_000_000, 0) } } diff --git a/polkadot/runtime/parachains/src/broadcaster/mod.rs b/polkadot/runtime/parachains/src/broadcaster/mod.rs index 73077981695b1..539b2a28f024e 100644 --- a/polkadot/runtime/parachains/src/broadcaster/mod.rs +++ b/polkadot/runtime/parachains/src/broadcaster/mod.rs @@ -43,6 +43,9 @@ pub mod publish { pub trait Publish { /// Publish key-value data for a specific parachain. fn publish_data(publisher: ParaId, data: Vec<(Vec, Vec)>) -> DispatchResult; + + /// Toggle subscription to a publisher's data. + fn toggle_subscription(subscriber: ParaId, publisher: ParaId) -> DispatchResult; } } @@ -401,4 +404,8 @@ impl publish::Publish for Pallet { fn publish_data(publisher: ParaId, data: Vec<(Vec, Vec)>) -> DispatchResult { Self::handle_publish(publisher, data) } + + fn toggle_subscription(subscriber: ParaId, publisher: ParaId) -> DispatchResult { + Self::handle_subscribe_toggle(subscriber, publisher) + } } \ No newline at end of file diff --git a/polkadot/runtime/rococo/src/weights/xcm/mod.rs b/polkadot/runtime/rococo/src/weights/xcm/mod.rs index aae653c0eb4c2..c5292d6f1092c 100644 --- a/polkadot/runtime/rococo/src/weights/xcm/mod.rs +++ b/polkadot/runtime/rococo/src/weights/xcm/mod.rs @@ -307,11 +307,15 @@ impl XcmWeightInfo for RococoXcmWeight { XcmGeneric::::execute_with_origin() } fn publish(data: &PublishData) -> Weight { - // TODO: Benchmark + // TODO: Benchmark let base_weight = Weight::from_parts(1_000_000, 64); let per_item_weight = Weight::from_parts(100_000, 32); base_weight.saturating_add(per_item_weight.saturating_mul(data.len() as u64)) } + fn subscribe(_: &u32) -> Weight { + // TODO: Benchmark + Weight::from_parts(10_000_000, 0) + } } #[test] diff --git a/polkadot/runtime/westend/src/weights/xcm/mod.rs b/polkadot/runtime/westend/src/weights/xcm/mod.rs index cd3d4c4bf2857..44a3d4572056d 100644 --- a/polkadot/runtime/westend/src/weights/xcm/mod.rs +++ b/polkadot/runtime/westend/src/weights/xcm/mod.rs @@ -308,7 +308,11 @@ impl XcmWeightInfo for WestendXcmWeight { XcmGeneric::::execute_with_origin() } fn publish(_: &PublishData) -> Weight { - // TODO: Benchmark + // TODO: Benchmark + Weight::from_parts(10_000_000, 0) + } + fn subscribe(_: &u32) -> Weight { + // TODO: Benchmark Weight::from_parts(10_000_000, 0) } } diff --git a/polkadot/xcm/src/v4/mod.rs b/polkadot/xcm/src/v4/mod.rs index d586c14c53157..0987871011cf5 100644 --- a/polkadot/xcm/src/v4/mod.rs +++ b/polkadot/xcm/src/v4/mod.rs @@ -1435,6 +1435,10 @@ impl TryFrom> for Instructi log::debug!(target: "xcm::versions::v5tov4", "`{new_instruction:?}` not supported by v4"); return Err(()); }, + Subscribe { .. } => { + log::debug!(target: "xcm::versions::v5tov4", "`{new_instruction:?}` not supported by v4"); + return Err(()); + }, }) } } diff --git a/polkadot/xcm/src/v5/mod.rs b/polkadot/xcm/src/v5/mod.rs index 807ef557b14a3..7725cc02dc7ae 100644 --- a/polkadot/xcm/src/v5/mod.rs +++ b/polkadot/xcm/src/v5/mod.rs @@ -1163,6 +1163,24 @@ pub enum Instruction { Publish { data: PublishData }, + + /// Toggle subscription to a publisher parachain's data. + /// + /// This instruction allows parachains to subscribe/unsubscribe to data published by + /// other parachains through the Publish instruction. If already subscribed, this will + /// unsubscribe. If not subscribed, this will subscribe. + /// + /// - `publisher`: The ID of the publisher parachain to toggle subscription for + /// + /// Safety: Origin must be a parachain. The relay chain will validate the origin and + /// manage the subscription state. + /// + /// Kind: *Command* + /// + /// Errors: + /// - BadOrigin: If origin is not a valid parachain + /// - TooManySubscriptions: If subscriber has reached maximum subscription limit + Subscribe { publisher: u32 }, } #[derive( @@ -1266,6 +1284,7 @@ impl Instruction { ExecuteWithOrigin { descendant_origin, xcm } => ExecuteWithOrigin { descendant_origin, xcm: xcm.into() }, Publish { data } => Publish { data }, + Subscribe { publisher } => Subscribe { publisher }, } } } @@ -1342,6 +1361,7 @@ impl> GetWeight for Instruction { ExecuteWithOrigin { descendant_origin, xcm } => W::execute_with_origin(descendant_origin, xcm), Publish { data } => W::publish(data), + Subscribe { publisher } => W::subscribe(publisher), } } } diff --git a/polkadot/xcm/xcm-builder/src/broadcast_adapter.rs b/polkadot/xcm/xcm-builder/src/broadcast_adapter.rs index c543347c0ba9a..3d80a3e2a0ee2 100644 --- a/polkadot/xcm/xcm-builder/src/broadcast_adapter.rs +++ b/polkadot/xcm/xcm-builder/src/broadcast_adapter.rs @@ -49,6 +49,25 @@ where let data_vec = data.into_inner(); Handler::publish_data(para_id, data_vec).map_err(|_| XcmError::Unimplemented) } + + fn handle_subscribe(origin: &Location, publisher: u32) -> XcmResult { + // Check if origin is authorized to subscribe + if !Filter::contains(origin) { + return Err(XcmError::NoPermission); + } + + // Extract subscriber parachain ID from authorized origin + let subscriber_id = match origin.unpack() { + (0, [Junction::Parachain(id)]) => ParaId::from(*id), // Direct parachain + (1, [Junction::Parachain(id), ..]) => ParaId::from(*id), // Sibling parachain + _ => return Err(XcmError::BadOrigin), // Should be caught by filter + }; + + let publisher_id = ParaId::from(publisher); + + // Call the handler for subscribe toggle + Handler::toggle_subscription(subscriber_id, publisher_id).map_err(|_| XcmError::Unimplemented) + } } diff --git a/polkadot/xcm/xcm-executor/src/lib.rs b/polkadot/xcm/xcm-executor/src/lib.rs index 12af093ead6f6..18adef5893bfc 100644 --- a/polkadot/xcm/xcm-executor/src/lib.rs +++ b/polkadot/xcm/xcm-executor/src/lib.rs @@ -1825,6 +1825,11 @@ impl XcmExecutor { Config::BroadcastHandler::handle_publish(origin, data)?; Ok(()) }, + Subscribe { publisher } => { + let origin = self.origin_ref().ok_or(XcmError::BadOrigin)?; + Config::BroadcastHandler::handle_subscribe(origin, publisher)?; + Ok(()) + }, } } diff --git a/polkadot/xcm/xcm-executor/src/traits/broadcast_handler.rs b/polkadot/xcm/xcm-executor/src/traits/broadcast_handler.rs index 8baf9a641bcdf..3f3d2ed16dd58 100644 --- a/polkadot/xcm/xcm-executor/src/traits/broadcast_handler.rs +++ b/polkadot/xcm/xcm-executor/src/traits/broadcast_handler.rs @@ -24,6 +24,10 @@ pub trait BroadcastHandler { /// Handle publish operation from the given origin. /// Should validate origin authorization and extract necessary data. fn handle_publish(origin: &Location, data: PublishData) -> XcmResult; + + /// Handle subscribe/unsubscribe operation from the given origin. + /// Toggles subscription state for the given publisher. + fn handle_subscribe(origin: &Location, publisher: u32) -> XcmResult; } /// Trait for the actual publish handling logic. @@ -38,4 +42,9 @@ impl BroadcastHandler for () { // No-op implementation for unit type Ok(()) } + + fn handle_subscribe(_origin: &Location, _publisher: u32) -> XcmResult { + // No-op implementation for unit type + Ok(()) + } } \ No newline at end of file From dbd66e5c784411f112a36ac600f856607f8b849b Mon Sep 17 00:00:00 2001 From: metricaez Date: Tue, 23 Sep 2025 17:31:07 -0300 Subject: [PATCH 084/128] feat: filter by subscription --- cumulus/client/parachain-inherent/src/lib.rs | 92 ++++--------------- .../runtime/parachains/src/broadcaster/mod.rs | 52 ++++++++++- .../parachains/src/broadcaster/runtime_api.rs | 7 +- polkadot/runtime/rococo/src/lib.rs | 4 + 4 files changed, 81 insertions(+), 74 deletions(-) diff --git a/cumulus/client/parachain-inherent/src/lib.rs b/cumulus/client/parachain-inherent/src/lib.rs index bfbda034b4815..27a92f45558f9 100644 --- a/cumulus/client/parachain-inherent/src/lib.rs +++ b/cumulus/client/parachain-inherent/src/lib.rs @@ -151,102 +151,49 @@ async fn collect_relay_storage_proof( .ok() } -/// Collect published data from all publishers in the broadcaster pallet. +/// Collect published data from subscribed publishers for a specific parachain. async fn collect_published_data( relay_chain_interface: &impl RelayChainInterface, relay_parent: PHash, + subscriber_para_id: ParaId, ) -> Option, Vec)>>> { tracing::info!( target: LOG_TARGET, relay_parent = ?relay_parent, - "🔍 Collecting published data from broadcaster pallet" + subscriber = ?subscriber_para_id, + "🔍 Collecting subscribed published data from broadcaster pallet" ); - // Get all publishers that have published data - let publishers: Vec = cumulus_relay_chain_interface::call_runtime_api( + // Get all published data that the subscriber is subscribed to + let published_data: BTreeMap, Vec)>> = cumulus_relay_chain_interface::call_runtime_api( relay_chain_interface, - "BroadcasterApi_get_all_publishers", + "BroadcasterApi_get_subscribed_data", relay_parent, - (), + subscriber_para_id, ) .await .map_err(|e| { tracing::error!( target: LOG_TARGET, relay_parent = ?relay_parent, + subscriber = ?subscriber_para_id, error = ?e, - "Cannot obtain the list of publishers.", + "Cannot obtain subscribed published data.", ); }) .ok()?; + let total_items: usize = published_data.values().map(|v| v.len()).sum(); tracing::info!( target: LOG_TARGET, relay_parent = ?relay_parent, - publishers = ?publishers, - "📋 Found {} publishers with data", - publishers.len() - ); - - let mut published_data = BTreeMap::new(); - - // Fetch all published data for each publisher - for publisher in publishers { - tracing::debug!( - target: LOG_TARGET, - relay_parent = ?relay_parent, - para_id = ?publisher, - "📦 Fetching published data for parachain {:?}", - publisher - ); - - let data: Vec<(Vec, Vec)> = cumulus_relay_chain_interface::call_runtime_api( - relay_chain_interface, - "BroadcasterApi_get_all_published_data", - relay_parent, - publisher, - ) - .await - .map_err(|e| { - tracing::error!( - target: LOG_TARGET, - relay_parent = ?relay_parent, - para_id = ?publisher, - error = ?e, - "Cannot obtain published data for publisher.", - ); - }) - .ok() - .unwrap_or_default(); - - if !data.is_empty() { - tracing::info!( - target: LOG_TARGET, - relay_parent = ?relay_parent, - para_id = ?publisher, - items = data.len(), - "✅ Collected {} data items from parachain {:?}", - data.len(), - publisher - ); - published_data.insert(publisher, data); - } else { - tracing::debug!( - target: LOG_TARGET, - relay_parent = ?relay_parent, - para_id = ?publisher, - "🕳️ No data found for parachain {:?}", - publisher - ); - } - } - - tracing::info!( - target: LOG_TARGET, - relay_parent = ?relay_parent, - total_publishers = published_data.len(), - "🎯 Collected published data from {} publishers", - published_data.len() + subscriber = ?subscriber_para_id, + publishers = published_data.len(), + total_items = total_items, + "🎯 Collected {} items from {} subscribed publishers for parachain {:?}", + total_items, + published_data.len(), + subscriber_para_id ); Some(published_data) @@ -307,10 +254,11 @@ impl ParachainInherentDataProvider { }) .ok()?; - // Fetch published data from all publishers via broadcaster pallet + // Fetch published data from subscribed publishers via broadcaster pallet let published_data = collect_published_data( relay_chain_interface, relay_parent, + para_id, ) .await .unwrap_or_default(); diff --git a/polkadot/runtime/parachains/src/broadcaster/mod.rs b/polkadot/runtime/parachains/src/broadcaster/mod.rs index 539b2a28f024e..73aa64d0be93d 100644 --- a/polkadot/runtime/parachains/src/broadcaster/mod.rs +++ b/polkadot/runtime/parachains/src/broadcaster/mod.rs @@ -19,7 +19,7 @@ //! This pallet provides a publish-subscribe mechanism for parachains to share data //! efficiently through the relay chain storage using child tries per publisher. -use alloc::vec::Vec; +use alloc::{collections::BTreeMap, vec::Vec}; use frame_support::{ pallet_prelude::*, storage::child::ChildInfo, @@ -396,6 +396,56 @@ pub mod pallet { pub fn is_subscribed(subscriber: ParaId, publisher: ParaId) -> bool { Subscriptions::::get(subscriber).contains(&publisher) } + + /// Get published data from all parachains that the subscriber is subscribed to. + /// Returns a map of Publisher ParaId -> published data. + /// Only includes publishers that have actual data and are subscribed to. + pub fn get_subscribed_data(subscriber_para_id: ParaId) -> BTreeMap, Vec)>> { + log::debug!( + target: "broadcaster::query", + "🔍 get_subscribed_data() called for subscriber {:?}", + subscriber_para_id + ); + + let subscriptions = Self::get_subscriptions(subscriber_para_id); + let mut result = BTreeMap::new(); + + log::debug!( + target: "broadcaster::query", + "📋 Subscriber {:?} has {} subscriptions: {:?}", + subscriber_para_id, + subscriptions.len(), + subscriptions + ); + + for publisher in subscriptions { + let data = Self::get_all_published_data(publisher); + if !data.is_empty() { + log::debug!( + target: "broadcaster::query", + "📦 Including {} data items from publisher {:?}", + data.len(), + publisher + ); + result.insert(publisher, data); + } else { + log::debug!( + target: "broadcaster::query", + "🕳️ No data found for subscribed publisher {:?}", + publisher + ); + } + } + + log::debug!( + target: "broadcaster::query", + "✅ Returning subscribed data from {} publishers for subscriber {:?}", + result.len(), + subscriber_para_id + ); + + result + } } } diff --git a/polkadot/runtime/parachains/src/broadcaster/runtime_api.rs b/polkadot/runtime/parachains/src/broadcaster/runtime_api.rs index eb378d2bcb292..ad29d60f5f93d 100644 --- a/polkadot/runtime/parachains/src/broadcaster/runtime_api.rs +++ b/polkadot/runtime/parachains/src/broadcaster/runtime_api.rs @@ -16,7 +16,7 @@ //! Runtime API definition for the broadcaster pallet. -use alloc::vec::Vec; +use alloc::{collections::BTreeMap, vec::Vec}; use polkadot_primitives::Id as ParaId; sp_api::decl_runtime_apis! { @@ -38,5 +38,10 @@ sp_api::decl_runtime_apis! { /// Get list of all parachains that have published data. /// Returns empty vec if no parachains have published data. fn get_all_publishers() -> Vec; + + /// Get published data from all parachains that the subscriber is subscribed to. + /// Returns a map of Publisher ParaId -> published data. + /// Only includes publishers that have actual data and are subscribed to. + fn get_subscribed_data(subscriber_para_id: ParaId) -> BTreeMap, Vec)>>; } } \ No newline at end of file diff --git a/polkadot/runtime/rococo/src/lib.rs b/polkadot/runtime/rococo/src/lib.rs index 7225238066d2b..f989e958b5957 100644 --- a/polkadot/runtime/rococo/src/lib.rs +++ b/polkadot/runtime/rococo/src/lib.rs @@ -2751,6 +2751,10 @@ sp_api::impl_runtime_apis! { fn get_all_publishers() -> Vec { Broadcaster::get_all_publishers() } + + fn get_subscribed_data(subscriber_para_id: polkadot_primitives::Id) -> alloc::collections::BTreeMap, Vec)>> { + Broadcaster::get_subscribed_data(subscriber_para_id) + } } } From 54301eeaa053f234fc0ac2196b387d60a0f9836e Mon Sep 17 00:00:00 2001 From: metricaez Date: Mon, 29 Sep 2025 09:12:07 -0300 Subject: [PATCH 085/128] feat: root change detection --- cumulus/pallets/parachain-system/src/lib.rs | 148 +++++++++++++++----- 1 file changed, 113 insertions(+), 35 deletions(-) diff --git a/cumulus/pallets/parachain-system/src/lib.rs b/cumulus/pallets/parachain-system/src/lib.rs index a707d40af4a01..fd6a8fd4d06d8 100644 --- a/cumulus/pallets/parachain-system/src/lib.rs +++ b/cumulus/pallets/parachain-system/src/lib.rs @@ -29,7 +29,7 @@ extern crate alloc; -use alloc::{collections::btree_map::BTreeMap, vec, vec::Vec}; +use alloc::{collections::{btree_map::BTreeMap, btree_set::BTreeSet}, vec, vec::Vec}; use codec::{Decode, DecodeLimit, Encode}; use core::{cmp, marker::PhantomData}; use cumulus_primitives_core::{ @@ -737,13 +737,16 @@ pub mod pallet { >::put(host_config); // Extract and store published data roots from relay chain state - if let Ok(Some(published_roots)) = relay_state_proof.read_published_data_roots() { - >::put(published_roots); + let current_roots = if let Ok(Some(published_roots)) = relay_state_proof.read_published_data_roots() { + >::put(&published_roots); log::debug!( target: "parachain_system::inherent", "Stored published data roots from relay chain state" ); - } + published_roots + } else { + Vec::new() + }; // Process published data from the broadcaster pallet log::info!( @@ -751,7 +754,7 @@ pub mod pallet { "📨 Received inherent with published_data containing {} publishers", published_data.len() ); - Self::process_published_data(&published_data); + Self::process_published_data(&published_data, ¤t_roots); ::on_validation_data(&vfp); @@ -1013,6 +1016,15 @@ pub mod pallet { ValueQuery, >; + /// Previous data roots of published data, used to detect changes. + /// Contains (ParaId, root_hash) pairs from the previous block for comparison. + #[pallet::storage] + pub type PreviousPublishedDataRoots = StorageValue< + _, + Vec<(ParaId, Vec)>, // Vector of (Publisher, Root hash) + ValueQuery, + >; + #[pallet::inherent] impl ProvideInherent for Pallet { @@ -1344,62 +1356,128 @@ impl Pallet { } /// Process published data from the broadcaster pallet and store it in parachain storage. + /// Only processes data for publishers whose trie roots have changed. fn process_published_data( published_data: &BTreeMap, Vec)>>, + current_roots: &Vec<(ParaId, Vec)>, ) { - log::info!( - target: "parachain_system::published_data", - "📨 Processing published data from {} publishers", - published_data.len() - ); + let previous_roots = >::get(); - if published_data.is_empty() { - log::debug!( - target: "parachain_system::published_data", - "🕳️ No published data to process" - ); - return; + // Create maps for easier lookup + let current_roots_map: BTreeMap> = current_roots.iter() + .map(|(para_id, root)| (*para_id, root)) + .collect(); + let previous_roots_map: BTreeMap> = previous_roots.iter() + .map(|(para_id, root)| (*para_id, root)) + .collect(); + + // Determine which publishers have changed roots + let mut changed_publishers = BTreeSet::new(); + + // Check for new or changed publishers + for (para_id, current_root) in ¤t_roots_map { + if let Some(previous_root) = previous_roots_map.get(para_id) { + if current_root != previous_root { + changed_publishers.insert(*para_id); + log::info!( + target: "parachain_system::published_data", + "🔄 Publisher {:?} has changed root: {:?} -> {:?}", + para_id, + sp_core::hexdisplay::HexDisplay::from(&**previous_root), + sp_core::hexdisplay::HexDisplay::from(&**current_root) + ); + } + } else { + // New publisher + changed_publishers.insert(*para_id); + log::info!( + target: "parachain_system::published_data", + "🆕 New publisher {:?} with root: {:?}", + para_id, + sp_core::hexdisplay::HexDisplay::from(&**current_root) + ); + } } - // Store new published data (we'll clear per-publisher rather than all data) - for (publisher, data_entries) in published_data { + // Check for removed publishers + for (para_id, _) in &previous_roots_map { + if !current_roots_map.contains_key(para_id) { + changed_publishers.insert(*para_id); + log::info!( + target: "parachain_system::published_data", + "🗑️ Publisher {:?} removed", + para_id + ); + } + } + + if changed_publishers.is_empty() { log::info!( target: "parachain_system::published_data", - "📦 Processing {} data items from publisher parachain {:?}", - data_entries.len(), - publisher + "⚡ No publishers have changed data roots - skipping processing for optimization" + ); + } else { + log::info!( + target: "parachain_system::published_data", + "📨 Processing published data from {} publishers with changed roots (out of {} total)", + changed_publishers.len(), + published_data.len() ); - // Clear existing data for this publisher - let _ = PublishedData::::remove_prefix(publisher, None); + // Only process data for publishers with changed roots + for (publisher, data_entries) in published_data { + if !changed_publishers.contains(publisher) { + continue; + } - // Store new data for this publisher - for (key, value) in data_entries { - log::debug!( + log::info!( + target: "parachain_system::published_data", + "📦 Processing {} data items from publisher parachain {:?}", + data_entries.len(), + publisher + ); + + // Clear existing data for this publisher + let _ = PublishedData::::clear_prefix(publisher, u32::MAX, None); + + // Store new data for this publisher + for (key, value) in data_entries { + log::debug!( + target: "parachain_system::published_data", + "💾 Storing key {:?} ({}B) -> value ({}B) from publisher {:?}", + key, + key.len(), + value.len(), + publisher + ); + PublishedData::::insert(publisher, key, value); + } + + log::info!( target: "parachain_system::published_data", - "💾 Storing key {:?} ({}B) -> value ({}B) from publisher {:?}", - key, - key.len(), - value.len(), + "✅ Successfully stored {} items from publisher {:?}", + data_entries.len(), publisher ); - PublishedData::::insert(publisher, key, value); } log::info!( target: "parachain_system::published_data", - "✅ Successfully stored {} items from publisher {:?}", - data_entries.len(), - publisher + "🎯 Finished processing published data from all publishers" ); } + // Update previous roots storage for next comparison + >::put(current_roots); + log::info!( target: "parachain_system::published_data", - "🎯 Finished processing published data from all publishers" + "💾 Updated previous published data roots for {} publishers", + current_roots.len() ); } + /// Drop blocks from the unincluded segment with respect to the latest parachain head. fn maybe_drop_included_ancestors( relay_state_proof: &RelayChainStateProof, From 78e13311488f26ac4ddaab3adbf86a049cc673e4 Mon Sep 17 00:00:00 2001 From: metricaez Date: Mon, 29 Sep 2025 12:05:59 -0300 Subject: [PATCH 086/128] feat: pubsub mechanism - initial implementation Work in progress pubsub for cross-chain state monitoring. Quick and dirty approach to validate e2e flow viability. Needs polish: tests, benchmarks, error handling, cleanup. --- .gitignore | 4 + Cargo.lock | 1 + cumulus/client/parachain-inherent/Cargo.toml | 2 + cumulus/client/parachain-inherent/src/lib.rs | 64 ++- cumulus/client/parachain-inherent/src/mock.rs | 1 + cumulus/pallets/parachain-system/src/lib.rs | 178 ++++++- cumulus/pallets/parachain-system/src/mock.rs | 1 + .../src/relay_state_snapshot.rs | 14 + cumulus/pallets/parachain-system/src/tests.rs | 2 + .../asset-hub-rococo/src/weights/xcm/mod.rs | 10 +- .../assets/asset-hub-rococo/src/xcm_config.rs | 1 + .../asset-hub-westend/src/weights/xcm/mod.rs | 10 +- .../asset-hub-westend/src/xcm_config.rs | 1 + .../bridge-hub-rococo/src/weights/xcm/mod.rs | 10 +- .../bridge-hub-rococo/src/xcm_config.rs | 1 + .../bridge-hub-westend/src/weights/xcm/mod.rs | 10 +- .../bridge-hub-westend/src/xcm_config.rs | 1 + .../src/weights/xcm/mod.rs | 10 +- .../collectives-westend/src/xcm_config.rs | 1 + .../coretime-rococo/src/weights/xcm/mod.rs | 10 +- .../coretime-rococo/src/xcm_config.rs | 1 + .../coretime-westend/src/weights/xcm/mod.rs | 10 +- .../coretime-westend/src/xcm_config.rs | 1 + .../glutton/glutton-westend/src/xcm_config.rs | 1 + .../people-rococo/src/weights/xcm/mod.rs | 10 +- .../people/people-rococo/src/xcm_config.rs | 1 + .../people-westend/src/weights/xcm/mod.rs | 10 +- .../people/people-westend/src/xcm_config.rs | 1 + .../runtimes/testing/penpal/src/xcm_config.rs | 1 + .../testing/rococo-parachain/src/lib.rs | 1 + .../yet-another-parachain/src/xcm_config.rs | 1 + .../primitives/parachain-inherent/src/lib.rs | 4 + cumulus/test/client/src/block_builder.rs | 1 + cumulus/test/service/src/bench_utils.rs | 1 + polkadot/primitives/src/v8/mod.rs | 7 + .../runtime/parachains/src/broadcaster/mod.rs | 461 ++++++++++++++++++ .../parachains/src/broadcaster/runtime_api.rs | 47 ++ .../parachains/src/broadcaster/tests.rs | 233 +++++++++ polkadot/runtime/parachains/src/lib.rs | 1 + polkadot/runtime/parachains/src/mock.rs | 16 +- polkadot/runtime/rococo/src/lib.rs | 39 ++ .../runtime/rococo/src/weights/xcm/mod.rs | 11 + polkadot/runtime/rococo/src/xcm_config.rs | 15 +- .../runtime/test-runtime/src/xcm_config.rs | 1 + .../runtime/westend/src/weights/xcm/mod.rs | 10 +- polkadot/runtime/westend/src/xcm_config.rs | 1 + polkadot/xcm/src/v4/mod.rs | 8 + polkadot/xcm/src/v5/mod.rs | 48 +- polkadot/xcm/xcm-builder/Cargo.toml | 4 + .../xcm/xcm-builder/src/broadcast_adapter.rs | 105 ++++ polkadot/xcm/xcm-builder/src/lib.rs | 5 + polkadot/xcm/xcm-executor/src/config.rs | 11 +- polkadot/xcm/xcm-executor/src/lib.rs | 20 +- .../src/traits/broadcast_handler.rs | 50 ++ polkadot/xcm/xcm-executor/src/traits/mod.rs | 12 +- pubsub-dev/build.sh | 54 ++ pubsub-dev/test_broadcaster_api.sh | 145 ++++++ pubsub-dev/zombienet.toml | 44 ++ 58 files changed, 1689 insertions(+), 35 deletions(-) create mode 100644 polkadot/runtime/parachains/src/broadcaster/mod.rs create mode 100644 polkadot/runtime/parachains/src/broadcaster/runtime_api.rs create mode 100644 polkadot/runtime/parachains/src/broadcaster/tests.rs create mode 100644 polkadot/xcm/xcm-builder/src/broadcast_adapter.rs create mode 100644 polkadot/xcm/xcm-executor/src/traits/broadcast_handler.rs create mode 100755 pubsub-dev/build.sh create mode 100755 pubsub-dev/test_broadcaster_api.sh create mode 100644 pubsub-dev/zombienet.toml diff --git a/.gitignore b/.gitignore index 4fe0701fde684..e720fe00440fb 100644 --- a/.gitignore +++ b/.gitignore @@ -42,3 +42,7 @@ target/ *.scale justfile rustc-ice-* +.claude +CLAUDE.md +context/ +bin/ \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock index b7ca706c5004d..8146be1b8af24 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4428,6 +4428,7 @@ dependencies = [ "cumulus-relay-chain-interface", "cumulus-test-relay-sproof-builder", "parity-scale-codec", + "polkadot-runtime-parachains", "sc-client-api", "sc-consensus-babe", "sp-crypto-hashing 0.1.0", diff --git a/cumulus/client/parachain-inherent/Cargo.toml b/cumulus/client/parachain-inherent/Cargo.toml index 3f5299f29b16e..a5a56c7ae3c3f 100644 --- a/cumulus/client/parachain-inherent/Cargo.toml +++ b/cumulus/client/parachain-inherent/Cargo.toml @@ -19,6 +19,8 @@ cumulus-relay-chain-interface.default-features = true cumulus-relay-chain-interface.workspace = true cumulus-test-relay-sproof-builder.default-features = true cumulus-test-relay-sproof-builder.workspace = true +polkadot-runtime-parachains.default-features = true +polkadot-runtime-parachains.workspace = true sc-client-api.default-features = true sc-client-api.workspace = true sc-consensus-babe.default-features = true diff --git a/cumulus/client/parachain-inherent/src/lib.rs b/cumulus/client/parachain-inherent/src/lib.rs index e366214b8aaa8..27a92f45558f9 100644 --- a/cumulus/client/parachain-inherent/src/lib.rs +++ b/cumulus/client/parachain-inherent/src/lib.rs @@ -16,12 +16,13 @@ //! Client side code for generating the parachain inherent. -use codec::Decode; +use codec::{Decode, Encode}; use cumulus_primitives_core::{ relay_chain::{self, Block as RelayBlock, Hash as PHash, HrmpChannelId}, ParaId, PersistedValidationData, }; use cumulus_relay_chain_interface::RelayChainInterface; +use std::collections::BTreeMap; mod mock; @@ -133,6 +134,9 @@ async fn collect_relay_storage_proof( relevant_keys.push(relay_well_known_keys::NEXT_AUTHORITIES.to_vec()); } + // Include broadcaster published data roots + relevant_keys.push(relay_well_known_keys::BROADCASTER_PUBLISHED_DATA_ROOTS.to_vec()); + relay_chain_interface .prove_read(relay_parent, &relevant_keys) .await @@ -147,6 +151,54 @@ async fn collect_relay_storage_proof( .ok() } +/// Collect published data from subscribed publishers for a specific parachain. +async fn collect_published_data( + relay_chain_interface: &impl RelayChainInterface, + relay_parent: PHash, + subscriber_para_id: ParaId, +) -> Option, Vec)>>> { + tracing::info!( + target: LOG_TARGET, + relay_parent = ?relay_parent, + subscriber = ?subscriber_para_id, + "🔍 Collecting subscribed published data from broadcaster pallet" + ); + + // Get all published data that the subscriber is subscribed to + let published_data: BTreeMap, Vec)>> = cumulus_relay_chain_interface::call_runtime_api( + relay_chain_interface, + "BroadcasterApi_get_subscribed_data", + relay_parent, + subscriber_para_id, + ) + .await + .map_err(|e| { + tracing::error!( + target: LOG_TARGET, + relay_parent = ?relay_parent, + subscriber = ?subscriber_para_id, + error = ?e, + "Cannot obtain subscribed published data.", + ); + }) + .ok()?; + + let total_items: usize = published_data.values().map(|v| v.len()).sum(); + tracing::info!( + target: LOG_TARGET, + relay_parent = ?relay_parent, + subscriber = ?subscriber_para_id, + publishers = published_data.len(), + total_items = total_items, + "🎯 Collected {} items from {} subscribed publishers for parachain {:?}", + total_items, + published_data.len(), + subscriber_para_id + ); + + Some(published_data) +} + pub struct ParachainInherentDataProvider; impl ParachainInherentDataProvider { @@ -202,6 +254,15 @@ impl ParachainInherentDataProvider { }) .ok()?; + // Fetch published data from subscribed publishers via broadcaster pallet + let published_data = collect_published_data( + relay_chain_interface, + relay_parent, + para_id, + ) + .await + .unwrap_or_default(); + Some(ParachainInherentData { downward_messages, horizontal_messages, @@ -209,6 +270,7 @@ impl ParachainInherentDataProvider { relay_chain_state, relay_parent_descendants, collator_peer_id: None, + published_data, }) } } diff --git a/cumulus/client/parachain-inherent/src/mock.rs b/cumulus/client/parachain-inherent/src/mock.rs index 5f4517f884245..75977a3a5920a 100644 --- a/cumulus/client/parachain-inherent/src/mock.rs +++ b/cumulus/client/parachain-inherent/src/mock.rs @@ -242,6 +242,7 @@ impl> InherentDataProvider relay_chain_state: proof, relay_parent_descendants: Default::default(), collator_peer_id: None, + published_data: Default::default(), }; parachain_inherent_data.provide_inherent_data(inherent_data).await diff --git a/cumulus/pallets/parachain-system/src/lib.rs b/cumulus/pallets/parachain-system/src/lib.rs index 6c697a6c4ce72..fd6a8fd4d06d8 100644 --- a/cumulus/pallets/parachain-system/src/lib.rs +++ b/cumulus/pallets/parachain-system/src/lib.rs @@ -29,7 +29,7 @@ extern crate alloc; -use alloc::{collections::btree_map::BTreeMap, vec, vec::Vec}; +use alloc::{collections::{btree_map::BTreeMap, btree_set::BTreeSet}, vec, vec::Vec}; use codec::{Decode, DecodeLimit, Encode}; use core::{cmp, marker::PhantomData}; use cumulus_primitives_core::{ @@ -630,6 +630,7 @@ pub mod pallet { horizontal_messages, relay_parent_descendants, collator_peer_id: _, + published_data, } = data; // Check that the associated relay chain block number is as expected. @@ -735,6 +736,26 @@ pub mod pallet { >::put(relevant_messaging_state.clone()); >::put(host_config); + // Extract and store published data roots from relay chain state + let current_roots = if let Ok(Some(published_roots)) = relay_state_proof.read_published_data_roots() { + >::put(&published_roots); + log::debug!( + target: "parachain_system::inherent", + "Stored published data roots from relay chain state" + ); + published_roots + } else { + Vec::new() + }; + + // Process published data from the broadcaster pallet + log::info!( + target: "parachain_system::inherent", + "📨 Received inherent with published_data containing {} publishers", + published_data.len() + ); + Self::process_published_data(&published_data, ¤t_roots); + ::on_validation_data(&vfp); total_weight.saturating_accrue(Self::enqueue_inbound_downward_messages( @@ -973,6 +994,38 @@ pub mod pallet { #[pallet::storage] pub type CustomValidationHeadData = StorageValue<_, Vec, OptionQuery>; + /// Published data from parachains available through the broadcaster pallet. + /// Double map: Publisher ParaId -> Key -> Value + #[pallet::storage] + pub type PublishedData = StorageDoubleMap< + _, + Blake2_128Concat, + ParaId, // Publisher + Blake2_128Concat, + Vec, // Key + Vec, // Value + OptionQuery, + >; + + /// Data roots of published data from broadcaster pallet on relay chain. + /// Contains (ParaId, root_hash) pairs for all publishers, mirroring the relay chain storage. + #[pallet::storage] + pub type PublishedDataRoots = StorageValue< + _, + Vec<(ParaId, Vec)>, // Vector of (Publisher, Root hash) + ValueQuery, + >; + + /// Previous data roots of published data, used to detect changes. + /// Contains (ParaId, root_hash) pairs from the previous block for comparison. + #[pallet::storage] + pub type PreviousPublishedDataRoots = StorageValue< + _, + Vec<(ParaId, Vec)>, // Vector of (Publisher, Root hash) + ValueQuery, + >; + + #[pallet::inherent] impl ProvideInherent for Pallet { type Call = Call; @@ -1302,6 +1355,129 @@ impl Pallet { weight_used } + /// Process published data from the broadcaster pallet and store it in parachain storage. + /// Only processes data for publishers whose trie roots have changed. + fn process_published_data( + published_data: &BTreeMap, Vec)>>, + current_roots: &Vec<(ParaId, Vec)>, + ) { + let previous_roots = >::get(); + + // Create maps for easier lookup + let current_roots_map: BTreeMap> = current_roots.iter() + .map(|(para_id, root)| (*para_id, root)) + .collect(); + let previous_roots_map: BTreeMap> = previous_roots.iter() + .map(|(para_id, root)| (*para_id, root)) + .collect(); + + // Determine which publishers have changed roots + let mut changed_publishers = BTreeSet::new(); + + // Check for new or changed publishers + for (para_id, current_root) in ¤t_roots_map { + if let Some(previous_root) = previous_roots_map.get(para_id) { + if current_root != previous_root { + changed_publishers.insert(*para_id); + log::info!( + target: "parachain_system::published_data", + "🔄 Publisher {:?} has changed root: {:?} -> {:?}", + para_id, + sp_core::hexdisplay::HexDisplay::from(&**previous_root), + sp_core::hexdisplay::HexDisplay::from(&**current_root) + ); + } + } else { + // New publisher + changed_publishers.insert(*para_id); + log::info!( + target: "parachain_system::published_data", + "🆕 New publisher {:?} with root: {:?}", + para_id, + sp_core::hexdisplay::HexDisplay::from(&**current_root) + ); + } + } + + // Check for removed publishers + for (para_id, _) in &previous_roots_map { + if !current_roots_map.contains_key(para_id) { + changed_publishers.insert(*para_id); + log::info!( + target: "parachain_system::published_data", + "🗑️ Publisher {:?} removed", + para_id + ); + } + } + + if changed_publishers.is_empty() { + log::info!( + target: "parachain_system::published_data", + "⚡ No publishers have changed data roots - skipping processing for optimization" + ); + } else { + log::info!( + target: "parachain_system::published_data", + "📨 Processing published data from {} publishers with changed roots (out of {} total)", + changed_publishers.len(), + published_data.len() + ); + + // Only process data for publishers with changed roots + for (publisher, data_entries) in published_data { + if !changed_publishers.contains(publisher) { + continue; + } + + log::info!( + target: "parachain_system::published_data", + "📦 Processing {} data items from publisher parachain {:?}", + data_entries.len(), + publisher + ); + + // Clear existing data for this publisher + let _ = PublishedData::::clear_prefix(publisher, u32::MAX, None); + + // Store new data for this publisher + for (key, value) in data_entries { + log::debug!( + target: "parachain_system::published_data", + "💾 Storing key {:?} ({}B) -> value ({}B) from publisher {:?}", + key, + key.len(), + value.len(), + publisher + ); + PublishedData::::insert(publisher, key, value); + } + + log::info!( + target: "parachain_system::published_data", + "✅ Successfully stored {} items from publisher {:?}", + data_entries.len(), + publisher + ); + } + + log::info!( + target: "parachain_system::published_data", + "🎯 Finished processing published data from all publishers" + ); + } + + // Update previous roots storage for next comparison + >::put(current_roots); + + log::info!( + target: "parachain_system::published_data", + "💾 Updated previous published data roots for {} publishers", + current_roots.len() + ); + } + + /// Drop blocks from the unincluded segment with respect to the latest parachain head. fn maybe_drop_included_ancestors( relay_state_proof: &RelayChainStateProof, diff --git a/cumulus/pallets/parachain-system/src/mock.rs b/cumulus/pallets/parachain-system/src/mock.rs index 76f8ebc602139..df470e54d6723 100644 --- a/cumulus/pallets/parachain-system/src/mock.rs +++ b/cumulus/pallets/parachain-system/src/mock.rs @@ -423,6 +423,7 @@ impl BlockTests { horizontal_messages: Default::default(), relay_parent_descendants: Default::default(), collator_peer_id: None, + published_data: Default::default(), }; if let Some(ref hook) = self.inherent_data_hook { hook(self, relay_parent_number, &mut system_inherent_data); diff --git a/cumulus/pallets/parachain-system/src/relay_state_snapshot.rs b/cumulus/pallets/parachain-system/src/relay_state_snapshot.rs index 7138d61edd277..7d7bd761d79f6 100644 --- a/cumulus/pallets/parachain-system/src/relay_state_snapshot.rs +++ b/cumulus/pallets/parachain-system/src/relay_state_snapshot.rs @@ -383,4 +383,18 @@ impl RelayChainStateProof { { read_optional_entry(&self.trie_backend, key).map_err(Error::ReadOptionalEntry) } + + /// Read the published data roots from the broadcaster pallet on the relay chain. + /// + /// Returns `Ok(Some(data))` if the data exists and can be decoded, + /// `Ok(None)` if the data doesn't exist (broadcaster pallet not present), + /// or `Err` if there was a proof/decode error. + pub fn read_published_data_roots(&self) -> Result)>>, Error> { + // Use the well-known key for BROADCASTER_PUBLISHED_DATA_ROOTS + read_optional_entry::)>, _>( + &self.trie_backend, + relay_chain::well_known_keys::BROADCASTER_PUBLISHED_DATA_ROOTS, + ) + .map_err(Error::ReadOptionalEntry) + } } diff --git a/cumulus/pallets/parachain-system/src/tests.rs b/cumulus/pallets/parachain-system/src/tests.rs index 160f9d253e311..b069f47a0cb7f 100755 --- a/cumulus/pallets/parachain-system/src/tests.rs +++ b/cumulus/pallets/parachain-system/src/tests.rs @@ -57,6 +57,7 @@ fn test_inherent_compatibility() { horizontal_messages: Default::default(), relay_parent_descendants: Default::default(), collator_peer_id: None, + published_data: Default::default(), }, ) .expect("Put validation function params failed"); @@ -82,6 +83,7 @@ fn test_inherent_compatibility() { horizontal_messages: Default::default(), relay_parent_descendants: Default::default(), collator_peer_id: None, + published_data: Default::default(), }; let _ = futures::executor::block_on( data.provide_inherent_data(&mut valid_inherent_data_full_compatibility), diff --git a/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/weights/xcm/mod.rs b/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/weights/xcm/mod.rs index 3dc3e82a62ff9..08ca0d1d8d681 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/weights/xcm/mod.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/weights/xcm/mod.rs @@ -24,7 +24,7 @@ use pallet_xcm_benchmarks_fungible::WeightInfo as XcmFungibleWeight; use pallet_xcm_benchmarks_generic::WeightInfo as XcmGeneric; use sp_runtime::BoundedVec; use xcm::{ - latest::{prelude::*, AssetTransferFilter}, + latest::{prelude::*, AssetTransferFilter, PublishData}, DoubleEncoded, }; @@ -271,4 +271,12 @@ impl XcmWeightInfo for AssetHubRococoXcmWeight { fn execute_with_origin(_: &Option, _: &Xcm) -> Weight { XcmGeneric::::execute_with_origin() } + fn publish(_: &PublishData) -> Weight { + // TODO: Benchmark + Weight::from_parts(10_000_000, 0) + } + fn subscribe(_: &u32) -> Weight { + // TODO: Benchmark + Weight::from_parts(10_000_000, 0) + } } diff --git a/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/xcm_config.rs b/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/xcm_config.rs index 839e58ca9d5fa..f34388c12a904 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/xcm_config.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/xcm_config.rs @@ -411,6 +411,7 @@ impl xcm_executor::Config for XcmConfig { type HrmpChannelAcceptedHandler = (); type HrmpChannelClosingHandler = (); type XcmRecorder = PolkadotXcm; + type BroadcastHandler = (); } /// Converts a local signed origin into an XCM location. Forms the basis for local origins diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/xcm/mod.rs b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/xcm/mod.rs index 27532ac431e7a..87858cc676343 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/xcm/mod.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/xcm/mod.rs @@ -27,7 +27,7 @@ use pallet_xcm_benchmarks_fungible::WeightInfo as XcmFungibleWeight; use pallet_xcm_benchmarks_generic::WeightInfo as XcmGeneric; use sp_runtime::BoundedVec; use xcm::{ - latest::{prelude::*, AssetTransferFilter}, + latest::{prelude::*, AssetTransferFilter, PublishData}, DoubleEncoded, }; @@ -302,4 +302,12 @@ impl XcmWeightInfo for AssetHubWestendXcmWeight { fn execute_with_origin(_: &Option, _: &Xcm) -> Weight { XcmGeneric::::execute_with_origin() } + fn publish(_: &PublishData) -> Weight { + // TODO: Benchmark + Weight::from_parts(10_000_000, 0) + } + fn subscribe(_: &u32) -> Weight { + // TODO: Benchmark + Weight::from_parts(10_000_000, 0) + } } diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/xcm_config.rs b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/xcm_config.rs index c1e20eb7675a0..05f8556687b3d 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/xcm_config.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/xcm_config.rs @@ -453,6 +453,7 @@ impl xcm_executor::Config for XcmConfig { type HrmpChannelAcceptedHandler = (); type HrmpChannelClosingHandler = (); type XcmRecorder = PolkadotXcm; + type BroadcastHandler = (); } /// Converts a local signed origin into an XCM location. Forms the basis for local origins diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/xcm/mod.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/xcm/mod.rs index 21708ec743821..951fd5144532f 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/xcm/mod.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/xcm/mod.rs @@ -24,7 +24,7 @@ use pallet_xcm_benchmarks_fungible::WeightInfo as XcmFungibleWeight; use pallet_xcm_benchmarks_generic::WeightInfo as XcmGeneric; use sp_runtime::BoundedVec; use xcm::{ - latest::{prelude::*, AssetTransferFilter}, + latest::{prelude::*, AssetTransferFilter, PublishData}, DoubleEncoded, }; @@ -272,4 +272,12 @@ impl XcmWeightInfo for BridgeHubRococoXcmWeight { fn execute_with_origin(_: &Option, _: &Xcm) -> Weight { XcmGeneric::::execute_with_origin() } + fn publish(_: &PublishData) -> Weight { + // TODO: Benchmark + Weight::from_parts(10_000_000, 0) + } + fn subscribe(_: &u32) -> Weight { + // TODO: Benchmark + Weight::from_parts(10_000_000, 0) + } } diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs index 8a661ed53236e..f316e7437736c 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs @@ -240,6 +240,7 @@ impl xcm_executor::Config for XcmConfig { type HrmpChannelAcceptedHandler = (); type HrmpChannelClosingHandler = (); type XcmRecorder = PolkadotXcm; + type BroadcastHandler = (); } pub type PriceForParentDelivery = diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/weights/xcm/mod.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/weights/xcm/mod.rs index 3706bfe22a3c8..0743b0b60ef52 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/weights/xcm/mod.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/weights/xcm/mod.rs @@ -25,7 +25,7 @@ use pallet_xcm_benchmarks_fungible::WeightInfo as XcmFungibleWeight; use pallet_xcm_benchmarks_generic::WeightInfo as XcmGeneric; use sp_runtime::BoundedVec; use xcm::{ - latest::{prelude::*, AssetTransferFilter}, + latest::{prelude::*, AssetTransferFilter, PublishData}, DoubleEncoded, }; @@ -272,4 +272,12 @@ impl XcmWeightInfo for BridgeHubWestendXcmWeight { fn execute_with_origin(_: &Option, _: &Xcm) -> Weight { XcmGeneric::::execute_with_origin() } + fn publish(_: &PublishData) -> Weight { + // TODO: Benchmark + Weight::from_parts(10_000_000, 0) + } + fn subscribe(_: &u32) -> Weight { + // TODO: Benchmark + Weight::from_parts(10_000_000, 0) + } } diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/xcm_config.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/xcm_config.rs index fb9974a608609..a1c9e90f0275c 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/xcm_config.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/xcm_config.rs @@ -244,6 +244,7 @@ impl xcm_executor::Config for XcmConfig { type HrmpChannelAcceptedHandler = (); type HrmpChannelClosingHandler = (); type XcmRecorder = PolkadotXcm; + type BroadcastHandler = (); } pub type PriceForParentDelivery = diff --git a/cumulus/parachains/runtimes/collectives/collectives-westend/src/weights/xcm/mod.rs b/cumulus/parachains/runtimes/collectives/collectives-westend/src/weights/xcm/mod.rs index 7c44ce449383f..2f0c910ccab59 100644 --- a/cumulus/parachains/runtimes/collectives/collectives-westend/src/weights/xcm/mod.rs +++ b/cumulus/parachains/runtimes/collectives/collectives-westend/src/weights/xcm/mod.rs @@ -23,7 +23,7 @@ use pallet_xcm_benchmarks_fungible::WeightInfo as XcmFungibleWeight; use pallet_xcm_benchmarks_generic::WeightInfo as XcmGeneric; use sp_runtime::BoundedVec; use xcm::{ - latest::{prelude::*, AssetTransferFilter}, + latest::{prelude::*, AssetTransferFilter, PublishData}, DoubleEncoded, }; @@ -270,4 +270,12 @@ impl XcmWeightInfo for CollectivesWestendXcmWeight { fn execute_with_origin(_: &Option, _: &Xcm) -> Weight { XcmGeneric::::execute_with_origin() } + fn publish(_: &PublishData) -> Weight { + // TODO: Benchmark + Weight::from_parts(10_000_000, 0) + } + fn subscribe(_: &u32) -> Weight { + // TODO: Benchmark + Weight::from_parts(10_000_000, 0) + } } diff --git a/cumulus/parachains/runtimes/collectives/collectives-westend/src/xcm_config.rs b/cumulus/parachains/runtimes/collectives/collectives-westend/src/xcm_config.rs index 21d76113eb842..d3c4d8c8014da 100644 --- a/cumulus/parachains/runtimes/collectives/collectives-westend/src/xcm_config.rs +++ b/cumulus/parachains/runtimes/collectives/collectives-westend/src/xcm_config.rs @@ -250,6 +250,7 @@ impl xcm_executor::Config for XcmConfig { type HrmpChannelAcceptedHandler = (); type HrmpChannelClosingHandler = (); type XcmRecorder = PolkadotXcm; + type BroadcastHandler = (); } /// Converts a local signed origin into an XCM location. Forms the basis for local origins diff --git a/cumulus/parachains/runtimes/coretime/coretime-rococo/src/weights/xcm/mod.rs b/cumulus/parachains/runtimes/coretime/coretime-rococo/src/weights/xcm/mod.rs index ce2279e2ba8e8..ff8221a927d0b 100644 --- a/cumulus/parachains/runtimes/coretime/coretime-rococo/src/weights/xcm/mod.rs +++ b/cumulus/parachains/runtimes/coretime/coretime-rococo/src/weights/xcm/mod.rs @@ -24,7 +24,7 @@ use pallet_xcm_benchmarks_fungible::WeightInfo as XcmFungibleWeight; use pallet_xcm_benchmarks_generic::WeightInfo as XcmGeneric; use sp_runtime::BoundedVec; use xcm::{ - latest::{prelude::*, AssetTransferFilter}, + latest::{prelude::*, AssetTransferFilter, PublishData}, DoubleEncoded, }; @@ -270,4 +270,12 @@ impl XcmWeightInfo for CoretimeRococoXcmWeight { fn execute_with_origin(_: &Option, _: &Xcm) -> Weight { XcmGeneric::::execute_with_origin() } + fn publish(_: &PublishData) -> Weight { + // TODO: Benchmark + Weight::from_parts(10_000_000, 0) + } + fn subscribe(_: &u32) -> Weight { + // TODO: Benchmark + Weight::from_parts(10_000_000, 0) + } } diff --git a/cumulus/parachains/runtimes/coretime/coretime-rococo/src/xcm_config.rs b/cumulus/parachains/runtimes/coretime/coretime-rococo/src/xcm_config.rs index 3dcc258abb654..d0cd60e9c5ca8 100644 --- a/cumulus/parachains/runtimes/coretime/coretime-rococo/src/xcm_config.rs +++ b/cumulus/parachains/runtimes/coretime/coretime-rococo/src/xcm_config.rs @@ -236,6 +236,7 @@ impl xcm_executor::Config for XcmConfig { type HrmpChannelAcceptedHandler = (); type HrmpChannelClosingHandler = (); type XcmRecorder = PolkadotXcm; + type BroadcastHandler = (); } /// Converts a local signed origin into an XCM location. Forms the basis for local origins diff --git a/cumulus/parachains/runtimes/coretime/coretime-westend/src/weights/xcm/mod.rs b/cumulus/parachains/runtimes/coretime/coretime-westend/src/weights/xcm/mod.rs index 75e0908cb395d..fdb7f1845ea29 100644 --- a/cumulus/parachains/runtimes/coretime/coretime-westend/src/weights/xcm/mod.rs +++ b/cumulus/parachains/runtimes/coretime/coretime-westend/src/weights/xcm/mod.rs @@ -23,7 +23,7 @@ use pallet_xcm_benchmarks_fungible::WeightInfo as XcmFungibleWeight; use pallet_xcm_benchmarks_generic::WeightInfo as XcmGeneric; use sp_runtime::BoundedVec; use xcm::{ - latest::{prelude::*, AssetTransferFilter}, + latest::{prelude::*, AssetTransferFilter, PublishData}, DoubleEncoded, }; @@ -269,4 +269,12 @@ impl XcmWeightInfo for CoretimeWestendXcmWeight { fn execute_with_origin(_: &Option, _: &Xcm) -> Weight { XcmGeneric::::execute_with_origin() } + fn publish(_: &PublishData) -> Weight { + // TODO: Benchmark + Weight::from_parts(10_000_000, 0) + } + fn subscribe(_: &u32) -> Weight { + // TODO: Benchmark + Weight::from_parts(10_000_000, 0) + } } diff --git a/cumulus/parachains/runtimes/coretime/coretime-westend/src/xcm_config.rs b/cumulus/parachains/runtimes/coretime/coretime-westend/src/xcm_config.rs index 0c5d1ef47907c..775b2e9b72561 100644 --- a/cumulus/parachains/runtimes/coretime/coretime-westend/src/xcm_config.rs +++ b/cumulus/parachains/runtimes/coretime/coretime-westend/src/xcm_config.rs @@ -264,6 +264,7 @@ impl xcm_executor::Config for XcmConfig { type HrmpChannelAcceptedHandler = (); type HrmpChannelClosingHandler = (); type XcmRecorder = PolkadotXcm; + type BroadcastHandler = (); } /// Converts a local signed origin into an XCM location. Forms the basis for local origins diff --git a/cumulus/parachains/runtimes/glutton/glutton-westend/src/xcm_config.rs b/cumulus/parachains/runtimes/glutton/glutton-westend/src/xcm_config.rs index 8f90d07fc6ee3..158cf1a8a343e 100644 --- a/cumulus/parachains/runtimes/glutton/glutton-westend/src/xcm_config.rs +++ b/cumulus/parachains/runtimes/glutton/glutton-westend/src/xcm_config.rs @@ -93,6 +93,7 @@ impl xcm_executor::Config for XcmConfig { type HrmpChannelAcceptedHandler = (); type HrmpChannelClosingHandler = (); type XcmRecorder = (); + type BroadcastHandler = (); } impl cumulus_pallet_xcm::Config for Runtime { diff --git a/cumulus/parachains/runtimes/people/people-rococo/src/weights/xcm/mod.rs b/cumulus/parachains/runtimes/people/people-rococo/src/weights/xcm/mod.rs index 41c773db7c766..6f99411170729 100644 --- a/cumulus/parachains/runtimes/people/people-rococo/src/weights/xcm/mod.rs +++ b/cumulus/parachains/runtimes/people/people-rococo/src/weights/xcm/mod.rs @@ -23,7 +23,7 @@ use pallet_xcm_benchmarks_fungible::WeightInfo as XcmFungibleWeight; use pallet_xcm_benchmarks_generic::WeightInfo as XcmGeneric; use sp_runtime::BoundedVec; use xcm::{ - latest::{prelude::*, AssetTransferFilter}, + latest::{prelude::*, AssetTransferFilter, PublishData}, DoubleEncoded, }; @@ -269,4 +269,12 @@ impl XcmWeightInfo for PeopleRococoXcmWeight { fn execute_with_origin(_: &Option, _: &Xcm) -> Weight { XcmGeneric::::execute_with_origin() } + fn publish(_: &PublishData) -> Weight { + // TODO: Benchmark + Weight::from_parts(10_000_000, 0) + } + fn subscribe(_: &u32) -> Weight { + // TODO: Benchmark + Weight::from_parts(10_000_000, 0) + } } diff --git a/cumulus/parachains/runtimes/people/people-rococo/src/xcm_config.rs b/cumulus/parachains/runtimes/people/people-rococo/src/xcm_config.rs index 4adbf02d9e586..52c0a93c1cebc 100644 --- a/cumulus/parachains/runtimes/people/people-rococo/src/xcm_config.rs +++ b/cumulus/parachains/runtimes/people/people-rococo/src/xcm_config.rs @@ -237,6 +237,7 @@ impl xcm_executor::Config for XcmConfig { type HrmpChannelAcceptedHandler = (); type HrmpChannelClosingHandler = (); type XcmRecorder = PolkadotXcm; + type BroadcastHandler = (); } /// Converts a local signed origin into an XCM location. Forms the basis for local origins diff --git a/cumulus/parachains/runtimes/people/people-westend/src/weights/xcm/mod.rs b/cumulus/parachains/runtimes/people/people-westend/src/weights/xcm/mod.rs index a7d394b603b2f..c5f1a1c0a3151 100644 --- a/cumulus/parachains/runtimes/people/people-westend/src/weights/xcm/mod.rs +++ b/cumulus/parachains/runtimes/people/people-westend/src/weights/xcm/mod.rs @@ -23,7 +23,7 @@ use pallet_xcm_benchmarks_fungible::WeightInfo as XcmFungibleWeight; use pallet_xcm_benchmarks_generic::WeightInfo as XcmGeneric; use sp_runtime::BoundedVec; use xcm::{ - latest::{prelude::*, AssetTransferFilter}, + latest::{prelude::*, AssetTransferFilter, PublishData}, DoubleEncoded, }; @@ -268,4 +268,12 @@ impl XcmWeightInfo for PeopleWestendXcmWeight { fn execute_with_origin(_: &Option, _: &Xcm) -> Weight { XcmGeneric::::execute_with_origin() } + fn publish(_: &PublishData) -> Weight { + // TODO: Benchmark + Weight::from_parts(10_000_000, 0) + } + fn subscribe(_: &u32) -> Weight { + // TODO: Benchmark + Weight::from_parts(10_000_000, 0) + } } diff --git a/cumulus/parachains/runtimes/people/people-westend/src/xcm_config.rs b/cumulus/parachains/runtimes/people/people-westend/src/xcm_config.rs index 62a84d5f2d858..dff75ed3bd6cc 100644 --- a/cumulus/parachains/runtimes/people/people-westend/src/xcm_config.rs +++ b/cumulus/parachains/runtimes/people/people-westend/src/xcm_config.rs @@ -269,6 +269,7 @@ impl xcm_executor::Config for XcmConfig { type HrmpChannelAcceptedHandler = (); type HrmpChannelClosingHandler = (); type XcmRecorder = PolkadotXcm; + type BroadcastHandler = (); } /// Converts a local signed origin into an XCM location. Forms the basis for local origins diff --git a/cumulus/parachains/runtimes/testing/penpal/src/xcm_config.rs b/cumulus/parachains/runtimes/testing/penpal/src/xcm_config.rs index 02e33a8894dd8..d326e63ee224e 100644 --- a/cumulus/parachains/runtimes/testing/penpal/src/xcm_config.rs +++ b/cumulus/parachains/runtimes/testing/penpal/src/xcm_config.rs @@ -441,6 +441,7 @@ impl xcm_executor::Config for XcmConfig { type HrmpChannelAcceptedHandler = (); type HrmpChannelClosingHandler = (); type XcmRecorder = PolkadotXcm; + type BroadcastHandler = (); } /// Multiplier used for dedicated `TakeFirstAssetTrader` with `ForeignAssets` instance. diff --git a/cumulus/parachains/runtimes/testing/rococo-parachain/src/lib.rs b/cumulus/parachains/runtimes/testing/rococo-parachain/src/lib.rs index 697bf1e011a6f..2a85cc41d2a5b 100644 --- a/cumulus/parachains/runtimes/testing/rococo-parachain/src/lib.rs +++ b/cumulus/parachains/runtimes/testing/rococo-parachain/src/lib.rs @@ -504,6 +504,7 @@ impl xcm_executor::Config for XcmConfig { type HrmpChannelAcceptedHandler = (); type HrmpChannelClosingHandler = (); type XcmRecorder = PolkadotXcm; + type BroadcastHandler = (); } /// Converts a local signed origin into an XCM location. Forms the basis for local origins diff --git a/cumulus/parachains/runtimes/testing/yet-another-parachain/src/xcm_config.rs b/cumulus/parachains/runtimes/testing/yet-another-parachain/src/xcm_config.rs index 00d72083ae62a..4190ae75436d2 100644 --- a/cumulus/parachains/runtimes/testing/yet-another-parachain/src/xcm_config.rs +++ b/cumulus/parachains/runtimes/testing/yet-another-parachain/src/xcm_config.rs @@ -160,6 +160,7 @@ impl xcm_executor::Config for XcmConfig { type HrmpChannelAcceptedHandler = (); type HrmpChannelClosingHandler = (); type XcmRecorder = PolkadotXcm; + type BroadcastHandler = (); } /// No local origins on this chain are allowed to dispatch XCM sends/executions. diff --git a/cumulus/primitives/parachain-inherent/src/lib.rs b/cumulus/primitives/parachain-inherent/src/lib.rs index 7af2cc09cd6e5..9ac33dda91197 100644 --- a/cumulus/primitives/parachain-inherent/src/lib.rs +++ b/cumulus/primitives/parachain-inherent/src/lib.rs @@ -120,6 +120,9 @@ pub struct ParachainInherentData { /// Contains the collator peer ID, which is later sent by the parachain to the /// relay chain via a UMP signal to promote the reputation of the given peer ID. pub collator_peer_id: Option, + /// Published data from the broadcaster pallet on the relay chain. + /// Key: Publisher ParaId, Value: Vector of (key, value) pairs published by that parachain. + pub published_data: BTreeMap, Vec)>>, } // Upgrades the ParachainInherentData v0 to the newest format. @@ -132,6 +135,7 @@ impl Into for v0::ParachainInherentData { horizontal_messages: self.horizontal_messages, relay_parent_descendants: Vec::new(), collator_peer_id: None, + published_data: BTreeMap::new(), } } } diff --git a/cumulus/test/client/src/block_builder.rs b/cumulus/test/client/src/block_builder.rs index ee400859f75c8..52e26564da5e0 100644 --- a/cumulus/test/client/src/block_builder.rs +++ b/cumulus/test/client/src/block_builder.rs @@ -124,6 +124,7 @@ fn init_block_builder( horizontal_messages: Default::default(), relay_parent_descendants: Default::default(), collator_peer_id: None, + published_data: Default::default(), }, ) .expect("Put validation function params failed"); diff --git a/cumulus/test/service/src/bench_utils.rs b/cumulus/test/service/src/bench_utils.rs index 5030cd6d95399..8b88cd6690700 100644 --- a/cumulus/test/service/src/bench_utils.rs +++ b/cumulus/test/service/src/bench_utils.rs @@ -100,6 +100,7 @@ pub fn extrinsic_set_validation_data( horizontal_messages: Default::default(), relay_parent_descendants: Default::default(), collator_peer_id: None, + published_data: Default::default(), }; cumulus_test_runtime::UncheckedExtrinsic::new_bare( diff --git a/polkadot/primitives/src/v8/mod.rs b/polkadot/primitives/src/v8/mod.rs index 060c6fe97ca99..d0ae2cc200000 100644 --- a/polkadot/primitives/src/v8/mod.rs +++ b/polkadot/primitives/src/v8/mod.rs @@ -248,6 +248,13 @@ pub mod well_known_keys { pub const AUTHORITIES: &[u8] = &hex!["1cb6f36e027abb2091cfb5110ab5087f5e0621c4869aa60c02be9adcc98a0d1d"]; + /// Published data roots from the broadcaster pallet. + /// + /// The storage entry should be accessed as `Vec<(ParaId, Vec)>` encoded value + /// where Vec is the child trie root hash for each publisher. + pub const BROADCASTER_PUBLISHED_DATA_ROOTS: &[u8] = + &hex!["6aca18c1f7576767ccb238db4ccaedf239166324ac7ea24c870f96ab961f9654"]; + /// The authorities for the next epoch. /// /// The storage entry should be accessed as an `Vec<(AuthorityId, BabeAuthorityWeight)>` encoded diff --git a/polkadot/runtime/parachains/src/broadcaster/mod.rs b/polkadot/runtime/parachains/src/broadcaster/mod.rs new file mode 100644 index 0000000000000..73aa64d0be93d --- /dev/null +++ b/polkadot/runtime/parachains/src/broadcaster/mod.rs @@ -0,0 +1,461 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Polkadot. + +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . + +//! A pallet for managing parachain data publishing and subscription. +//! +//! This pallet provides a publish-subscribe mechanism for parachains to share data +//! efficiently through the relay chain storage using child tries per publisher. + +use alloc::{collections::BTreeMap, vec::Vec}; +use frame_support::{ + pallet_prelude::*, + storage::child::ChildInfo, + traits::{Get, ConstU32}, +}; +use frame_system::pallet_prelude::BlockNumberFor; +use polkadot_primitives::Id as ParaId; + +pub use pallet::*; + +pub mod runtime_api; + +/// Trait for publishing key-value data. +/// Inspired by fungibles trait. +/// TODO: Check if we need to move out of pallets into a separate crate. +/// TODO: Check if sufficient level of abstraction, for now we will leave ParaId. +pub mod publish { + use super::*; + + /// Trait for publishing key-value data for parachains. + pub trait Publish { + /// Publish key-value data for a specific parachain. + fn publish_data(publisher: ParaId, data: Vec<(Vec, Vec)>) -> DispatchResult; + + /// Toggle subscription to a publisher's data. + fn toggle_subscription(subscriber: ParaId, publisher: ParaId) -> DispatchResult; + } +} + +#[cfg(test)] +mod tests; + + +#[frame_support::pallet] +pub mod pallet { + use super::*; + + #[pallet::pallet] + pub struct Pallet(_); + + #[pallet::config] + pub trait Config: frame_system::Config { + /// Maximum number of items that can be published in one operation + #[pallet::constant] + type MaxPublishItems: Get; + + /// Maximum length of a key in bytes + #[pallet::constant] + type MaxKeyLength: Get; + + /// Maximum length of a value in bytes + #[pallet::constant] + type MaxValueLength: Get; + + /// Maximum number of publishers a subscriber can subscribe to + #[pallet::constant] + type MaxSubscriptions: Get; + } + + /// Tracks which parachains have published data. + /// + /// Maps parachain ID to a boolean indicating whether they have a child trie. + /// The actual child trie info is derived deterministically from the ParaId. + #[pallet::storage] + pub type PublisherExists = StorageMap< + _, + Blake2_128Concat, + ParaId, + bool, + ValueQuery, + >; + + /// Tracks all published keys per parachain. + #[pallet::storage] + pub type PublishedKeys = StorageMap< + _, + Blake2_128Concat, + ParaId, + BoundedBTreeSet, T::MaxPublishItems>, + ValueQuery, + >; + + /// Tracks subscriptions: subscriber -> list of publishers. + /// + /// Maps subscriber ParaId to a bounded vector of publisher ParaIds. + /// Empty vec means no subscriptions. + #[pallet::storage] + pub type Subscriptions = StorageMap< + _, + Blake2_128Concat, + ParaId, // Subscriber + BoundedVec, // List of publishers + ValueQuery, + >; + + /// Aggregated child trie roots for all publishers. + /// + /// Contains (ParaId, child_trie_root) pairs for all parachains that have published data. + /// This is used in relay chain storage proofs to efficiently provide all publisher roots. + #[pallet::storage] + pub type PublishedDataRoots = StorageValue< + _, + BoundedVec<(ParaId, BoundedVec>), ConstU32<1000>>, + ValueQuery, + >; + + #[pallet::error] + pub enum Error { + /// Too many items in a single publish operation + TooManyPublishItems, + /// Key length exceeds maximum allowed + KeyTooLong, + /// Value length exceeds maximum allowed + ValueTooLong, + /// Child trie operation failed + ChildTrieError, + /// Too many subscriptions for this subscriber + TooManySubscriptions, + } + + #[pallet::hooks] + impl Hooks> for Pallet { + fn integrity_test() { + assert_eq!( + &PublishedDataRoots::::hashed_key(), + polkadot_primitives::well_known_keys::BROADCASTER_PUBLISHED_DATA_ROOTS, + "`well_known_keys::BROADCASTER_PUBLISHED_DATA_ROOTS` doesn't match key of `PublishedDataRoots`! \ + Make sure that the name of the broadcaster pallet is `Broadcaster` in the runtime!", + ); + } + } + + impl Pallet { + /// Process a publish operation from a parachain. + /// + /// Stores the provided key-value pairs in the publisher's child trie. + pub fn handle_publish( + origin_para_id: ParaId, + data: Vec<(Vec, Vec)>, + ) -> DispatchResult { + log::info!( + target: "broadcaster::publish", + "📡 Publishing data from parachain {:?}: {} items", + origin_para_id, + data.len() + ); + + // Validate input limits first before making any changes + ensure!( + data.len() <= T::MaxPublishItems::get() as usize, + Error::::TooManyPublishItems + ); + + // Validate all keys and values before creating publisher entry + for (key, value) in &data { + ensure!( + key.len() <= T::MaxKeyLength::get() as usize, + Error::::KeyTooLong + ); + ensure!( + value.len() <= T::MaxValueLength::get() as usize, + Error::::ValueTooLong + ); + } + + // All validation passed, now get or create child trie info for this publisher + let child_info = Self::get_or_create_publisher_child_info(origin_para_id); + + // Get current published keys set for tracking + let mut published_keys = PublishedKeys::::get(origin_para_id); + + // Store each key-value pair in the child trie and track the key + for (key, value) in data { + log::debug!( + target: "broadcaster::publish", + "📝 Storing key {:?} ({}B) -> value ({}B) for parachain {:?}", + key, + key.len(), + value.len(), + origin_para_id + ); + + frame_support::storage::child::put(&child_info, &key, &value); + + // Track the key for enumeration (convert to BoundedVec) + if let Ok(bounded_key) = BoundedVec::try_from(key) { + let _ = published_keys.try_insert(bounded_key); + } + } + + // Update the published keys storage + PublishedKeys::::insert(origin_para_id, published_keys); + + // Calculate and update the child trie root for this publisher + let child_root = frame_support::storage::child::root(&child_info, + sp_runtime::StateVersion::V1); + + // Update the aggregated roots storage + let mut roots = PublishedDataRoots::::get(); + + // Find and update existing entry or add new one + let mut found = false; + for (para_id, root_hash) in roots.iter_mut() { + if *para_id == origin_para_id { + if let Ok(bounded_root) = BoundedVec::try_from(child_root.clone()) { + *root_hash = bounded_root; + } + found = true; + break; + } + } + + // If not found, add new entry + if !found { + if let Ok(bounded_root) = BoundedVec::try_from(child_root.clone()) { + let _ = roots.try_push((origin_para_id, bounded_root)); + } + } + + PublishedDataRoots::::put(roots); + + log::info!( + target: "broadcaster::publish", + "✅ Successfully published data for parachain {:?}, total keys: {}, root: {:?}", + origin_para_id, + PublishedKeys::::get(origin_para_id).len(), + child_root + ); + + Ok(()) + } + + /// Get the child trie root hash for a specific publisher. + /// + /// This root is always included in PersistedValidationData to prove + /// the current state of the publisher's data. + pub fn get_publisher_child_root(para_id: ParaId) -> Option> { + if PublisherExists::::get(para_id) { + let child_info = Self::derive_child_info(para_id); + Some(frame_support::storage::child::root(&child_info, + sp_runtime::StateVersion::V1)) + } else { + None + } + } + + /// Get or create child trie info for a publisher. + fn get_or_create_publisher_child_info(para_id: ParaId) -> ChildInfo { + let child_info = Self::derive_child_info(para_id); + PublisherExists::::insert(para_id, true); + child_info + } + + /// Derive a deterministic child trie identifier from parachain ID. + pub fn derive_child_info(para_id: ParaId) -> ChildInfo { + let mut key = b"pubsub".to_vec(); + key.extend_from_slice(¶_id.encode()); + + ChildInfo::new_default(&key) + } + + /// Retrieve a value from a publisher's child trie. + /// + /// Returns None if the publisher doesn't exist or the key is not found. + pub fn get_published_value(para_id: ParaId, key: &[u8]) -> Option> { + if PublisherExists::::get(para_id) { + let child_info = Self::derive_child_info(para_id); + frame_support::storage::child::get(&child_info, key) + } else { + None + } + } + + /// Get all published data for a parachain. + pub fn get_all_published_data(para_id: ParaId) -> Vec<(Vec, Vec)> { + log::debug!( + target: "broadcaster::query", + "🔍 get_all_published_data() called for parachain {:?}", + para_id + ); + + if !PublisherExists::::get(para_id) { + log::debug!( + target: "broadcaster::query", + "❌ Parachain {:?} has no published data", + para_id + ); + return Vec::new(); + } + + let child_info = Self::derive_child_info(para_id); + let published_keys = PublishedKeys::::get(para_id); + + let data: Vec<(Vec, Vec)> = published_keys + .into_iter() + .filter_map(|bounded_key| { + let key: Vec = bounded_key.into(); + frame_support::storage::child::get(&child_info, &key) + .map(|value| (key, value)) + }) + .collect(); + + log::debug!( + target: "broadcaster::query", + "📦 Returning {} data items for parachain {:?}", + data.len(), + para_id + ); + + data + } + + /// Get list of all parachains that have published data. + pub fn get_all_publishers() -> Vec { + let publishers: Vec = PublisherExists::::iter() + .filter_map(|(para_id, exists)| if exists { Some(para_id) } else { None }) + .collect(); + + log::debug!( + target: "broadcaster::query", + "🔍 get_all_publishers() returning {} publishers: {:?}", + publishers.len(), + publishers + ); + + publishers + } + + /// Toggle subscription: subscribe if not subscribed, unsubscribe if subscribed. + pub fn handle_subscribe_toggle( + subscriber: ParaId, + publisher: ParaId, + ) -> DispatchResult { + log::info!( + target: "broadcaster::subscribe", + "🔄 Toggle subscription for parachain {:?} to publisher {:?}", + subscriber, + publisher + ); + + let mut subscriptions = Subscriptions::::get(subscriber); + + // Check if already subscribed + if let Some(pos) = subscriptions.iter().position(|&p| p == publisher) { + // Already subscribed -> unsubscribe + subscriptions.swap_remove(pos); + log::debug!( + target: "broadcaster::subscribe", + "❌ Unsubscribed: {:?} from {:?}", + subscriber, + publisher + ); + } else { + // Not subscribed -> subscribe + subscriptions.try_push(publisher).map_err(|_| Error::::TooManySubscriptions)?; + log::debug!( + target: "broadcaster::subscribe", + "✅ Subscribed: {:?} to {:?}", + subscriber, + publisher + ); + } + + Subscriptions::::insert(subscriber, subscriptions); + Ok(()) + } + + /// Get all subscriptions for a parachain. + pub fn get_subscriptions(subscriber: ParaId) -> Vec { + Subscriptions::::get(subscriber).into_inner() + } + + /// Check if a parachain is subscribed to a publisher. + pub fn is_subscribed(subscriber: ParaId, publisher: ParaId) -> bool { + Subscriptions::::get(subscriber).contains(&publisher) + } + + /// Get published data from all parachains that the subscriber is subscribed to. + /// Returns a map of Publisher ParaId -> published data. + /// Only includes publishers that have actual data and are subscribed to. + pub fn get_subscribed_data(subscriber_para_id: ParaId) -> BTreeMap, Vec)>> { + log::debug!( + target: "broadcaster::query", + "🔍 get_subscribed_data() called for subscriber {:?}", + subscriber_para_id + ); + + let subscriptions = Self::get_subscriptions(subscriber_para_id); + let mut result = BTreeMap::new(); + + log::debug!( + target: "broadcaster::query", + "📋 Subscriber {:?} has {} subscriptions: {:?}", + subscriber_para_id, + subscriptions.len(), + subscriptions + ); + + for publisher in subscriptions { + let data = Self::get_all_published_data(publisher); + if !data.is_empty() { + log::debug!( + target: "broadcaster::query", + "📦 Including {} data items from publisher {:?}", + data.len(), + publisher + ); + result.insert(publisher, data); + } else { + log::debug!( + target: "broadcaster::query", + "🕳️ No data found for subscribed publisher {:?}", + publisher + ); + } + } + + log::debug!( + target: "broadcaster::query", + "✅ Returning subscribed data from {} publishers for subscriber {:?}", + result.len(), + subscriber_para_id + ); + + result + } + } +} + +// Implement publish::Publish trait +impl publish::Publish for Pallet { + fn publish_data(publisher: ParaId, data: Vec<(Vec, Vec)>) -> DispatchResult { + Self::handle_publish(publisher, data) + } + + fn toggle_subscription(subscriber: ParaId, publisher: ParaId) -> DispatchResult { + Self::handle_subscribe_toggle(subscriber, publisher) + } +} \ No newline at end of file diff --git a/polkadot/runtime/parachains/src/broadcaster/runtime_api.rs b/polkadot/runtime/parachains/src/broadcaster/runtime_api.rs new file mode 100644 index 0000000000000..ad29d60f5f93d --- /dev/null +++ b/polkadot/runtime/parachains/src/broadcaster/runtime_api.rs @@ -0,0 +1,47 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Polkadot. + +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . + +//! Runtime API definition for the broadcaster pallet. + +use alloc::{collections::BTreeMap, vec::Vec}; +use polkadot_primitives::Id as ParaId; + +sp_api::decl_runtime_apis! { + /// The API for querying published data from parachains. + #[api_version(1)] + pub trait BroadcasterApi { + /// Get published value for a specific parachain and key. + /// Returns None if the parachain hasn't published data or the key doesn't exist. + fn get_published_value(para_id: ParaId, key: Vec) -> Option>; + + /// Get the child trie root hash for a publisher. + /// This can be used to prove the current state of published data. + fn get_publisher_child_root(para_id: ParaId) -> Option>; + + /// Get all published data for a specific parachain. + /// Returns empty vec if the parachain hasn't published any data. + fn get_all_published_data(para_id: ParaId) -> Vec<(Vec, Vec)>; + + /// Get list of all parachains that have published data. + /// Returns empty vec if no parachains have published data. + fn get_all_publishers() -> Vec; + + /// Get published data from all parachains that the subscriber is subscribed to. + /// Returns a map of Publisher ParaId -> published data. + /// Only includes publishers that have actual data and are subscribed to. + fn get_subscribed_data(subscriber_para_id: ParaId) -> BTreeMap, Vec)>>; + } +} \ No newline at end of file diff --git a/polkadot/runtime/parachains/src/broadcaster/tests.rs b/polkadot/runtime/parachains/src/broadcaster/tests.rs new file mode 100644 index 0000000000000..df1bbd0f99cca --- /dev/null +++ b/polkadot/runtime/parachains/src/broadcaster/tests.rs @@ -0,0 +1,233 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Polkadot. + +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . + +use super::*; +use crate::mock::{new_test_ext, Broadcaster, Test}; +use frame_support::{assert_ok, assert_err}; +use polkadot_primitives::Id as ParaId; + +#[test] +fn publish_store_retrieve_and_update_data() { + new_test_ext(Default::default()).execute_with(|| { + let para_id = ParaId::from(1000); + + // Initial state: publisher doesn't exist, no child root + assert!(!PublisherExists::::get(para_id)); + assert!(Broadcaster::get_publisher_child_root(para_id).is_none()); + + // Publish initial data + let initial_data = vec![ + (b"key1".to_vec(), b"value1".to_vec()), + (b"key2".to_vec(), b"value2".to_vec()), + ]; + Broadcaster::handle_publish(para_id, initial_data.clone()).unwrap(); + + // Verify publisher exists and has a child root + assert!(PublisherExists::::get(para_id)); + let root_after_initial = Broadcaster::get_publisher_child_root(para_id); + assert!(root_after_initial.is_some()); + assert!(!root_after_initial.as_ref().unwrap().is_empty()); + + // Verify the actual stored data matches what was published + assert_eq!( + Broadcaster::get_published_value(para_id, b"key1"), + Some(b"value1".to_vec()) + ); + assert_eq!( + Broadcaster::get_published_value(para_id, b"key2"), + Some(b"value2".to_vec()) + ); + + // Non-existent key should return None + assert_eq!(Broadcaster::get_published_value(para_id, b"key3"), None); + + // Update existing key and add new key + let update_data = vec![ + (b"key1".to_vec(), b"updated_value1".to_vec()), + (b"key3".to_vec(), b"value3".to_vec()), + ]; + Broadcaster::handle_publish(para_id, update_data).unwrap(); + + // Verify child root changed after update + let root_after_update = Broadcaster::get_publisher_child_root(para_id); + assert!(root_after_update.is_some()); + assert_ne!(root_after_initial.unwrap(), root_after_update.unwrap()); + + // Verify the data was correctly updated + assert_eq!( + Broadcaster::get_published_value(para_id, b"key1"), + Some(b"updated_value1".to_vec()) + ); + assert_eq!( + Broadcaster::get_published_value(para_id, b"key2"), + Some(b"value2".to_vec()) // Should remain unchanged + ); + assert_eq!( + Broadcaster::get_published_value(para_id, b"key3"), + Some(b"value3".to_vec()) + ); + }); +} + +#[test] +fn empty_publish_still_creates_publisher() { + new_test_ext(Default::default()).execute_with(|| { + let para_id = ParaId::from(1000); + + let _ = Broadcaster::handle_publish(para_id, vec![]); + + assert!(PublisherExists::::get(para_id)); + }); +} + +#[test] +fn handle_publish_respects_max_items_limit() { + new_test_ext(Default::default()).execute_with(|| { + let para_id = ParaId::from(1000); + + // Create 11 items (exceeds MaxPublishItems=10) + let mut data = Vec::new(); + for i in 0..11 { + data.push((format!("key{}", i).into_bytes(), b"value".to_vec())); + } + + let result = Broadcaster::handle_publish(para_id, data); + assert!(result.is_err()); + assert!(!PublisherExists::::get(para_id)); + }); +} + +#[test] +fn handle_publish_respects_key_length_limit() { + new_test_ext(Default::default()).execute_with(|| { + let para_id = ParaId::from(1000); + + // Create key longer than MaxKeyLength=100 + let long_key = vec![b'a'; 101]; + let data = vec![(long_key, b"value".to_vec())]; + + let result = Broadcaster::handle_publish(para_id, data); + assert!(result.is_err()); + assert!(!PublisherExists::::get(para_id)); + }); +} + +#[test] +fn handle_publish_respects_value_length_limit() { + new_test_ext(Default::default()).execute_with(|| { + let para_id = ParaId::from(1000); + + // Create value longer than MaxValueLength=1000 + let long_value = vec![b'v'; 1001]; + let data = vec![(b"key".to_vec(), long_value)]; + + let result = Broadcaster::handle_publish(para_id, data); + assert!(result.is_err()); + assert!(!PublisherExists::::get(para_id)); + }); +} + +#[test] +fn get_storage_key() { + new_test_ext(Default::default()).execute_with(|| { + let key = PublishedDataRoots::::hashed_key(); + println!("PublishedDataRoots storage key (bytes): {:?}", key); + + // Print as hex manually + print!("PublishedDataRoots storage key (hex): "); + for byte in &key { + print!("{:02x}", byte); + } + println!(); + }); +} + +#[test] +fn subscribe_toggle_works() { + new_test_ext(Default::default()).execute_with(|| { + let subscriber = ParaId::from(1000); + let publisher = ParaId::from(2000); + + // Initially not subscribed + assert!(!Broadcaster::is_subscribed(subscriber, publisher)); + assert_eq!(Broadcaster::get_subscriptions(subscriber), vec![]); + + // First toggle: subscribe + assert_ok!(Broadcaster::handle_subscribe_toggle(subscriber, publisher)); + assert!(Broadcaster::is_subscribed(subscriber, publisher)); + assert_eq!(Broadcaster::get_subscriptions(subscriber), vec![publisher]); + + // Second toggle: unsubscribe + assert_ok!(Broadcaster::handle_subscribe_toggle(subscriber, publisher)); + assert!(!Broadcaster::is_subscribed(subscriber, publisher)); + assert_eq!(Broadcaster::get_subscriptions(subscriber), vec![]); + }); +} + +#[test] +fn multiple_subscriptions_work() { + new_test_ext(Default::default()).execute_with(|| { + let subscriber = ParaId::from(1000); + let publisher1 = ParaId::from(2000); + let publisher2 = ParaId::from(3000); + let publisher3 = ParaId::from(4000); + + // Subscribe to multiple publishers + assert_ok!(Broadcaster::handle_subscribe_toggle(subscriber, publisher1)); + assert_ok!(Broadcaster::handle_subscribe_toggle(subscriber, publisher2)); + assert_ok!(Broadcaster::handle_subscribe_toggle(subscriber, publisher3)); + + let subscriptions = Broadcaster::get_subscriptions(subscriber); + assert_eq!(subscriptions.len(), 3); + assert!(subscriptions.contains(&publisher1)); + assert!(subscriptions.contains(&publisher2)); + assert!(subscriptions.contains(&publisher3)); + + // Unsubscribe from middle one + assert_ok!(Broadcaster::handle_subscribe_toggle(subscriber, publisher2)); + + let subscriptions = Broadcaster::get_subscriptions(subscriber); + assert_eq!(subscriptions.len(), 2); + assert!(subscriptions.contains(&publisher1)); + assert!(!subscriptions.contains(&publisher2)); + assert!(subscriptions.contains(&publisher3)); + }); +} + +#[test] +fn max_subscriptions_limit_enforced() { + new_test_ext(Default::default()).execute_with(|| { + let subscriber = ParaId::from(1000); + + // Subscribe up to MaxSubscriptions (10 in mock) + for i in 0..10 { + let publisher = ParaId::from(2000 + i); + assert_ok!(Broadcaster::handle_subscribe_toggle(subscriber, publisher)); + } + + // Try to add one more subscription - should fail + let publisher = ParaId::from(3000); + assert_err!( + Broadcaster::handle_subscribe_toggle(subscriber, publisher), + Error::::TooManySubscriptions + ); + + // But can still unsubscribe and resubscribe + let existing_publisher = ParaId::from(2000); + assert_ok!(Broadcaster::handle_subscribe_toggle(subscriber, existing_publisher)); // Unsubscribe + assert_ok!(Broadcaster::handle_subscribe_toggle(subscriber, publisher)); // Subscribe to new one + }); +} \ No newline at end of file diff --git a/polkadot/runtime/parachains/src/lib.rs b/polkadot/runtime/parachains/src/lib.rs index 1cd534257d7f9..0c7be5b0f6834 100644 --- a/polkadot/runtime/parachains/src/lib.rs +++ b/polkadot/runtime/parachains/src/lib.rs @@ -24,6 +24,7 @@ #![cfg_attr(not(feature = "std"), no_std)] pub mod assigner_coretime; +pub mod broadcaster; pub mod configuration; pub mod coretime; pub mod disputes; diff --git a/polkadot/runtime/parachains/src/mock.rs b/polkadot/runtime/parachains/src/mock.rs index cba63ae7b1b04..e6d39b02aba21 100644 --- a/polkadot/runtime/parachains/src/mock.rs +++ b/polkadot/runtime/parachains/src/mock.rs @@ -17,7 +17,7 @@ //! Mocks for all the traits. use crate::{ - assigner_coretime, configuration, coretime, disputes, dmp, hrmp, + assigner_coretime, broadcaster, configuration, coretime, disputes, dmp, hrmp, inclusion::{self, AggregateMessageOrigin, UmpQueueId}, initializer, on_demand, origin, paras, paras::ParaKind, @@ -74,6 +74,7 @@ frame_support::construct_runtime!( Paras: paras, Configuration: configuration, ParasShared: shared, + Broadcaster: broadcaster, ParaInclusion: inclusion, ParaInherent: paras_inherent, Scheduler: scheduler, @@ -482,6 +483,19 @@ impl crate::paras_inherent::Config for Test { type WeightInfo = crate::paras_inherent::TestWeightInfo; } +parameter_types! { + pub const MaxPublishItems: u32 = 10; + pub const MaxKeyLength: u32 = 100; + pub const MaxValueLength: u32 = 1000; +} + +impl crate::broadcaster::Config for Test { + type MaxPublishItems = MaxPublishItems; + type MaxKeyLength = MaxKeyLength; + type MaxValueLength = MaxValueLength; + type MaxSubscriptions = ConstU32<10>; +} + pub struct MockValidatorSet; impl ValidatorSet for MockValidatorSet { diff --git a/polkadot/runtime/rococo/src/lib.rs b/polkadot/runtime/rococo/src/lib.rs index 0ecc929c7ce8d..f989e958b5957 100644 --- a/polkadot/runtime/rococo/src/lib.rs +++ b/polkadot/runtime/rococo/src/lib.rs @@ -1223,6 +1223,20 @@ impl parachains_slashing::Config for Runtime { type BenchmarkingConfig = parachains_slashing::BenchConfig<200>; } +parameter_types! { + pub const MaxPublishItems: u32 = 100; + pub const MaxKeyLength: u32 = 256; + pub const MaxValueLength: u32 = 1024; + pub const MaxSubscriptions: u32 = 100; +} + +impl polkadot_runtime_parachains::broadcaster::Config for Runtime { + type MaxPublishItems = MaxPublishItems; + type MaxKeyLength = MaxKeyLength; + type MaxValueLength = MaxValueLength; + type MaxSubscriptions = MaxSubscriptions; +} + parameter_types! { pub const ParaDeposit: Balance = 40 * UNITS; } @@ -1598,6 +1612,9 @@ construct_runtime! { Crowdloan: crowdloan = 73, Coretime: coretime = 74, + // Broadcaster pallet for pubsub XCM v5 functionality + Broadcaster: polkadot_runtime_parachains::broadcaster = 75, + // Migrations pallet MultiBlockMigrations: pallet_migrations = 98, @@ -2717,6 +2734,28 @@ sp_api::impl_runtime_apis! { XcmPallet::is_trusted_teleporter(asset, location) } } + + impl polkadot_runtime_parachains::broadcaster::runtime_api::BroadcasterApi for Runtime { + fn get_published_value(para_id: polkadot_primitives::Id, key: Vec) -> Option> { + Broadcaster::get_published_value(para_id, &key) + } + + fn get_publisher_child_root(para_id: polkadot_primitives::Id) -> Option> { + Broadcaster::get_publisher_child_root(para_id) + } + + fn get_all_published_data(para_id: polkadot_primitives::Id) -> Vec<(Vec, Vec)> { + Broadcaster::get_all_published_data(para_id) + } + + fn get_all_publishers() -> Vec { + Broadcaster::get_all_publishers() + } + + fn get_subscribed_data(subscriber_para_id: polkadot_primitives::Id) -> alloc::collections::BTreeMap, Vec)>> { + Broadcaster::get_subscribed_data(subscriber_para_id) + } + } } #[cfg(all(test, feature = "try-runtime"))] diff --git a/polkadot/runtime/rococo/src/weights/xcm/mod.rs b/polkadot/runtime/rococo/src/weights/xcm/mod.rs index 36d818a87445d..c5292d6f1092c 100644 --- a/polkadot/runtime/rococo/src/weights/xcm/mod.rs +++ b/polkadot/runtime/rococo/src/weights/xcm/mod.rs @@ -21,6 +21,7 @@ use crate::Runtime; use alloc::vec::Vec; use frame_support::weights::Weight; use xcm::{latest::prelude::*, DoubleEncoded}; +use xcm::latest::PublishData; use pallet_xcm_benchmarks_fungible::WeightInfo as XcmBalancesWeight; use pallet_xcm_benchmarks_generic::WeightInfo as XcmGeneric; @@ -305,6 +306,16 @@ impl XcmWeightInfo for RococoXcmWeight { fn execute_with_origin(_: &Option, _: &Xcm) -> Weight { XcmGeneric::::execute_with_origin() } + fn publish(data: &PublishData) -> Weight { + // TODO: Benchmark + let base_weight = Weight::from_parts(1_000_000, 64); + let per_item_weight = Weight::from_parts(100_000, 32); + base_weight.saturating_add(per_item_weight.saturating_mul(data.len() as u64)) + } + fn subscribe(_: &u32) -> Weight { + // TODO: Benchmark + Weight::from_parts(10_000_000, 0) + } } #[test] diff --git a/polkadot/runtime/rococo/src/xcm_config.rs b/polkadot/runtime/rococo/src/xcm_config.rs index 87fc99eb32ad7..d17b75366bbe7 100644 --- a/polkadot/runtime/rococo/src/xcm_config.rs +++ b/polkadot/runtime/rococo/src/xcm_config.rs @@ -17,9 +17,9 @@ //! XCM configuration for Rococo. use super::{ - parachains_origin, AccountId, AllPalletsWithSystem, Balances, Dmp, Fellows, ParaId, Runtime, - RuntimeCall, RuntimeEvent, RuntimeOrigin, TransactionByteFee, Treasurer, Treasury, WeightToFee, - XcmPallet, + parachains_origin, AccountId, AllPalletsWithSystem, Balances, Broadcaster, Dmp, Fellows, + ParaId, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, TransactionByteFee, Treasurer, + Treasury, WeightToFee, XcmPallet, }; use crate::governance::StakingAdmin; @@ -42,10 +42,10 @@ use xcm_builder::{ AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, ChildParachainAsNative, ChildParachainConvertsVia, DescribeAllTerminal, DescribeFamily, FixedWeightBounds, FrameTransactionalProcessor, FungibleAdapter, HashedDescription, IsChildSystemParachain, - IsConcrete, MintLocation, OriginToPluralityVoice, SendXcmFeeToAccount, - SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, - TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, - XcmFeeManagerFromComponents, + IsConcrete, MintLocation, OriginToPluralityVoice, ParachainBroadcastAdapter, + SendXcmFeeToAccount, SignedAccountId32AsNative, SignedToAccountId32, + SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, + WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, XcmFeeManagerFromComponents, }; use xcm_executor::XcmExecutor; @@ -227,6 +227,7 @@ impl xcm_executor::Config for XcmConfig { type HrmpChannelAcceptedHandler = (); type HrmpChannelClosingHandler = (); type XcmRecorder = XcmPallet; + type BroadcastHandler = ParachainBroadcastAdapter; } parameter_types! { diff --git a/polkadot/runtime/test-runtime/src/xcm_config.rs b/polkadot/runtime/test-runtime/src/xcm_config.rs index 8d7e351d0d5be..4b43918733c91 100644 --- a/polkadot/runtime/test-runtime/src/xcm_config.rs +++ b/polkadot/runtime/test-runtime/src/xcm_config.rs @@ -158,6 +158,7 @@ impl xcm_executor::Config for XcmConfig { type HrmpChannelAcceptedHandler = (); type HrmpChannelClosingHandler = (); type XcmRecorder = (); + type BroadcastHandler = (); } impl pallet_xcm::Config for crate::Runtime { diff --git a/polkadot/runtime/westend/src/weights/xcm/mod.rs b/polkadot/runtime/westend/src/weights/xcm/mod.rs index ba4502e228420..44a3d4572056d 100644 --- a/polkadot/runtime/westend/src/weights/xcm/mod.rs +++ b/polkadot/runtime/westend/src/weights/xcm/mod.rs @@ -21,7 +21,7 @@ use crate::Runtime; use alloc::vec::Vec; use frame_support::weights::Weight; use xcm::{ - latest::{prelude::*, QueryResponseInfo}, + latest::{prelude::*, QueryResponseInfo, PublishData}, DoubleEncoded, }; @@ -307,6 +307,14 @@ impl XcmWeightInfo for WestendXcmWeight { fn execute_with_origin(_: &Option, _: &Xcm) -> Weight { XcmGeneric::::execute_with_origin() } + fn publish(_: &PublishData) -> Weight { + // TODO: Benchmark + Weight::from_parts(10_000_000, 0) + } + fn subscribe(_: &u32) -> Weight { + // TODO: Benchmark + Weight::from_parts(10_000_000, 0) + } } #[test] diff --git a/polkadot/runtime/westend/src/xcm_config.rs b/polkadot/runtime/westend/src/xcm_config.rs index 1b639433e0f5f..13d72e43cb7a6 100644 --- a/polkadot/runtime/westend/src/xcm_config.rs +++ b/polkadot/runtime/westend/src/xcm_config.rs @@ -232,6 +232,7 @@ impl xcm_executor::Config for XcmConfig { type HrmpChannelAcceptedHandler = (); type HrmpChannelClosingHandler = (); type XcmRecorder = XcmPallet; + type BroadcastHandler = (); } parameter_types! { diff --git a/polkadot/xcm/src/v4/mod.rs b/polkadot/xcm/src/v4/mod.rs index b6f314a62622c..0987871011cf5 100644 --- a/polkadot/xcm/src/v4/mod.rs +++ b/polkadot/xcm/src/v4/mod.rs @@ -1431,6 +1431,14 @@ impl TryFrom> for Instructi log::debug!(target: "xcm::versions::v5tov4", "`{new_instruction:?}` not supported by v4"); return Err(()); }, + Publish { .. } => { + log::debug!(target: "xcm::versions::v5tov4", "`{new_instruction:?}` not supported by v4"); + return Err(()); + }, + Subscribe { .. } => { + log::debug!(target: "xcm::versions::v5tov4", "`{new_instruction:?}` not supported by v4"); + return Err(()); + }, }) } } diff --git a/polkadot/xcm/src/v5/mod.rs b/polkadot/xcm/src/v5/mod.rs index 0caf7d0c581fe..7725cc02dc7ae 100644 --- a/polkadot/xcm/src/v5/mod.rs +++ b/polkadot/xcm/src/v5/mod.rs @@ -186,7 +186,7 @@ pub mod prelude { InstructionError, InstructionIndex, InteriorLocation, Junction::{self, *}, Junctions::{self, Here}, - Location, MaxAssetTransferFilters, MaybeErrorCode, + Location, MaxAssetTransferFilters, MaxPublishItems, MaybeErrorCode, NetworkId::{self, *}, OriginKind, Outcome, PalletInfo, Parent, ParentThen, PreparedMessage, QueryId, QueryResponseInfo, Reanchorable, Response, Result as XcmResult, SendError, SendResult, @@ -211,8 +211,12 @@ parameter_types! { pub MaxPalletNameLen: u32 = 48; pub MaxPalletsInfo: u32 = 64; pub MaxAssetTransferFilters: u32 = 6; + pub MaxPublishItems: u32 = 16; } +/// Type alias for published data to avoid macro issues +pub type PublishData = BoundedVec<(Vec, Vec), MaxPublishItems>; + #[derive( Clone, Eq, PartialEq, Encode, Decode, DecodeWithMemTracking, Debug, TypeInfo, MaxEncodedLen, )] @@ -1139,6 +1143,44 @@ pub enum Instruction { /// - `hints`: A bounded vector of `ExecutionHint`, specifying the different hints that will /// be activated. SetHints { hints: BoundedVec }, + + /// Publish data to the relay chain for other parachains to subscribe to. + /// + /// This instruction allows parachains to publish key-value data pairs to the relay chain + /// which can then be subscribed to by other parachains through the Subscribe instruction. + /// The data is stored in child tries on the relay chain indexed by the publisher's ParaId. + /// + /// - `data`: The key-value pairs to be published, bounded by MaxPublishItems + /// + /// Safety: Origin must be a parachain (Sovereign Account). The relay chain will validate + /// the origin and store data in the appropriate child trie. + /// + /// Kind: *Command* + /// + /// Errors: + /// - BadOrigin: If origin is not a valid parachain + /// - Overflow: If data exceeds bounds + Publish { + data: PublishData + }, + + /// Toggle subscription to a publisher parachain's data. + /// + /// This instruction allows parachains to subscribe/unsubscribe to data published by + /// other parachains through the Publish instruction. If already subscribed, this will + /// unsubscribe. If not subscribed, this will subscribe. + /// + /// - `publisher`: The ID of the publisher parachain to toggle subscription for + /// + /// Safety: Origin must be a parachain. The relay chain will validate the origin and + /// manage the subscription state. + /// + /// Kind: *Command* + /// + /// Errors: + /// - BadOrigin: If origin is not a valid parachain + /// - TooManySubscriptions: If subscriber has reached maximum subscription limit + Subscribe { publisher: u32 }, } #[derive( @@ -1241,6 +1283,8 @@ impl Instruction { InitiateTransfer { destination, remote_fees, preserve_origin, assets, remote_xcm }, ExecuteWithOrigin { descendant_origin, xcm } => ExecuteWithOrigin { descendant_origin, xcm: xcm.into() }, + Publish { data } => Publish { data }, + Subscribe { publisher } => Subscribe { publisher }, } } } @@ -1316,6 +1360,8 @@ impl> GetWeight for Instruction { W::initiate_transfer(destination, remote_fees, preserve_origin, assets, remote_xcm), ExecuteWithOrigin { descendant_origin, xcm } => W::execute_with_origin(descendant_origin, xcm), + Publish { data } => W::publish(data), + Subscribe { publisher } => W::subscribe(publisher), } } } diff --git a/polkadot/xcm/xcm-builder/Cargo.toml b/polkadot/xcm/xcm-builder/Cargo.toml index c508bf609a75b..296681488bbad 100644 --- a/polkadot/xcm/xcm-builder/Cargo.toml +++ b/polkadot/xcm/xcm-builder/Cargo.toml @@ -20,6 +20,8 @@ impl-trait-for-tuples = { workspace = true } pallet-asset-conversion.workspace = true pallet-transaction-payment.workspace = true polkadot-parachain-primitives.workspace = true +polkadot-primitives.workspace = true +polkadot-runtime-parachains.workspace = true scale-info = { features = ["derive"], workspace = true } sp-arithmetic.workspace = true sp-core.workspace = true @@ -69,6 +71,8 @@ std = [ "pallet-asset-conversion/std", "pallet-transaction-payment/std", "polkadot-parachain-primitives/std", + "polkadot-primitives/std", + "polkadot-runtime-parachains/std", "primitive-types/std", "scale-info/std", "sp-arithmetic/std", diff --git a/polkadot/xcm/xcm-builder/src/broadcast_adapter.rs b/polkadot/xcm/xcm-builder/src/broadcast_adapter.rs new file mode 100644 index 0000000000000..3d80a3e2a0ee2 --- /dev/null +++ b/polkadot/xcm/xcm-builder/src/broadcast_adapter.rs @@ -0,0 +1,105 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Polkadot. + +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . + +//! Adapters for broadcast/publish operations in XCM. + +use core::marker::PhantomData; +use frame_support::traits::Contains; +use polkadot_primitives::Id as ParaId; +use polkadot_runtime_parachains::broadcaster::publish; +use xcm::latest::{Junction, Location, PublishData, Result as XcmResult}; +use xcm::latest::prelude::XcmError; +use xcm_executor::traits::BroadcastHandler; + +/// Configurable broadcast adapter that validates parachain origins. +pub struct ParachainBroadcastAdapter(PhantomData<(Filter, Handler)>); + +impl BroadcastHandler for ParachainBroadcastAdapter +where + Filter: Contains, + Handler: publish::Publish, +{ + fn handle_publish(origin: &Location, data: PublishData) -> XcmResult { + // Check if origin is authorized to publish + if !Filter::contains(origin) { + return Err(XcmError::NoPermission); + } + + // Extract parachain ID from authorized origin + let para_id = match origin.unpack() { + (0, [Junction::Parachain(id)]) => ParaId::from(*id), // Direct parachain + (1, [Junction::Parachain(id), ..]) => ParaId::from(*id), // Sibling parachain + _ => return Err(XcmError::BadOrigin), // Should be caught by filter + }; + + // Call the actual handler + let data_vec = data.into_inner(); + Handler::publish_data(para_id, data_vec).map_err(|_| XcmError::Unimplemented) + } + + fn handle_subscribe(origin: &Location, publisher: u32) -> XcmResult { + // Check if origin is authorized to subscribe + if !Filter::contains(origin) { + return Err(XcmError::NoPermission); + } + + // Extract subscriber parachain ID from authorized origin + let subscriber_id = match origin.unpack() { + (0, [Junction::Parachain(id)]) => ParaId::from(*id), // Direct parachain + (1, [Junction::Parachain(id), ..]) => ParaId::from(*id), // Sibling parachain + _ => return Err(XcmError::BadOrigin), // Should be caught by filter + }; + + let publisher_id = ParaId::from(publisher); + + // Call the handler for subscribe toggle + Handler::toggle_subscription(subscriber_id, publisher_id).map_err(|_| XcmError::Unimplemented) + } +} + + +/// Allows only direct parachains (parents=0, interior=[Parachain(_)]). +pub struct DirectParachainsOnly; +impl Contains for DirectParachainsOnly { + fn contains(origin: &Location) -> bool { + matches!(origin.unpack(), (0, [Junction::Parachain(_)])) + } +} + +/// Allows both direct and sibling parachains. +pub struct AllParachains; +impl Contains for AllParachains { + fn contains(origin: &Location) -> bool { + matches!( + origin.unpack(), + (0, [Junction::Parachain(_)]) | (1, [Junction::Parachain(_), ..]) + ) + } +} + +/// Allows specific parachain IDs only. +/// Usage: `SpecificParachains<1000, 2000>` for parachains 1000 and 2000. +pub struct SpecificParachains; +impl Contains for SpecificParachains { + fn contains(origin: &Location) -> bool { + match origin.unpack() { + (0, [Junction::Parachain(id)]) | (1, [Junction::Parachain(id), ..]) => { + *id == PARA1 || (PARA2 != 0 && *id == PARA2) + }, + _ => false, + } + } +} \ No newline at end of file diff --git a/polkadot/xcm/xcm-builder/src/lib.rs b/polkadot/xcm/xcm-builder/src/lib.rs index 27d0efe115508..08332a6542af5 100644 --- a/polkadot/xcm/xcm-builder/src/lib.rs +++ b/polkadot/xcm/xcm-builder/src/lib.rs @@ -48,6 +48,11 @@ pub use barriers::{ TakeWeightCredit, TrailingSetTopicAsId, WithComputedOrigin, }; +mod broadcast_adapter; +pub use broadcast_adapter::{ + AllParachains, DirectParachainsOnly, ParachainBroadcastAdapter, SpecificParachains, +}; + mod controller; pub use controller::{ Controller, ExecuteController, ExecuteControllerWeightInfo, QueryController, diff --git a/polkadot/xcm/xcm-executor/src/config.rs b/polkadot/xcm/xcm-executor/src/config.rs index 60a5ed63f32ee..4817df98d1b12 100644 --- a/polkadot/xcm/xcm-executor/src/config.rs +++ b/polkadot/xcm/xcm-executor/src/config.rs @@ -15,10 +15,10 @@ // along with Polkadot. If not, see . use crate::traits::{ - AssetExchange, AssetLock, CallDispatcher, ClaimAssets, ConvertOrigin, DropAssets, EventEmitter, - ExportXcm, FeeManager, HandleHrmpChannelAccepted, HandleHrmpChannelClosing, - HandleHrmpNewChannelOpenRequest, OnResponse, ProcessTransaction, RecordXcm, ShouldExecute, - TransactAsset, VersionChangeNotifier, WeightBounds, WeightTrader, + AssetExchange, AssetLock, BroadcastHandler, CallDispatcher, ClaimAssets, ConvertOrigin, + DropAssets, EventEmitter, ExportXcm, FeeManager, HandleHrmpChannelAccepted, + HandleHrmpChannelClosing, HandleHrmpNewChannelOpenRequest, OnResponse, ProcessTransaction, + RecordXcm, ShouldExecute, TransactAsset, VersionChangeNotifier, WeightBounds, WeightTrader, }; use frame_support::{ dispatch::{GetDispatchInfo, Parameter, PostDispatchInfo}, @@ -134,4 +134,7 @@ pub trait Config { type HrmpChannelClosingHandler: HandleHrmpChannelClosing; /// Allows recording the last executed XCM (used by dry-run runtime APIs). type XcmRecorder: RecordXcm; + + /// Handler for publish/subscribe operations on the relay chain. + type BroadcastHandler: BroadcastHandler; } diff --git a/polkadot/xcm/xcm-executor/src/lib.rs b/polkadot/xcm/xcm-executor/src/lib.rs index b4efab9349a4b..18adef5893bfc 100644 --- a/polkadot/xcm/xcm-executor/src/lib.rs +++ b/polkadot/xcm/xcm-executor/src/lib.rs @@ -33,11 +33,11 @@ use xcm::latest::{prelude::*, AssetTransferFilter}; pub mod traits; use traits::{ - validate_export, AssetExchange, AssetLock, CallDispatcher, ClaimAssets, ConvertOrigin, - DropAssets, Enact, EventEmitter, ExportXcm, FeeManager, FeeReason, HandleHrmpChannelAccepted, - HandleHrmpChannelClosing, HandleHrmpNewChannelOpenRequest, OnResponse, ProcessTransaction, - Properties, ShouldExecute, TransactAsset, VersionChangeNotifier, WeightBounds, WeightTrader, - XcmAssetTransfers, + validate_export, AssetExchange, AssetLock, BroadcastHandler, CallDispatcher, ClaimAssets, + ConvertOrigin, DropAssets, Enact, EventEmitter, ExportXcm, FeeManager, FeeReason, + HandleHrmpChannelAccepted, HandleHrmpChannelClosing, HandleHrmpNewChannelOpenRequest, + OnResponse, ProcessTransaction, Properties, ShouldExecute, TransactAsset, + VersionChangeNotifier, WeightBounds, WeightTrader, XcmAssetTransfers, }; pub use traits::RecordXcm; @@ -1820,6 +1820,16 @@ impl XcmExecutor { Config::TransactionalProcessor::process(|| { Config::HrmpChannelClosingHandler::handle(initiator, sender, recipient) }), + Publish { data } => { + let origin = self.origin_ref().ok_or(XcmError::BadOrigin)?; + Config::BroadcastHandler::handle_publish(origin, data)?; + Ok(()) + }, + Subscribe { publisher } => { + let origin = self.origin_ref().ok_or(XcmError::BadOrigin)?; + Config::BroadcastHandler::handle_subscribe(origin, publisher)?; + Ok(()) + }, } } diff --git a/polkadot/xcm/xcm-executor/src/traits/broadcast_handler.rs b/polkadot/xcm/xcm-executor/src/traits/broadcast_handler.rs new file mode 100644 index 0000000000000..3f3d2ed16dd58 --- /dev/null +++ b/polkadot/xcm/xcm-executor/src/traits/broadcast_handler.rs @@ -0,0 +1,50 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Polkadot. + +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . + +//! Traits for handling publish/subscribe operations in XCM. + +use alloc::vec::Vec; +use xcm::latest::{Location, PublishData, Result as XcmResult}; + +/// Trait for handling publish/subscribe operations on the relay chain. +pub trait BroadcastHandler { + /// Handle publish operation from the given origin. + /// Should validate origin authorization and extract necessary data. + fn handle_publish(origin: &Location, data: PublishData) -> XcmResult; + + /// Handle subscribe/unsubscribe operation from the given origin. + /// Toggles subscription state for the given publisher. + fn handle_subscribe(origin: &Location, publisher: u32) -> XcmResult; +} + +/// Trait for the actual publish handling logic. +/// Implemented by pallets that store published data. +pub trait HandlePublish { + fn handle_publish(publisher: u32, data: Vec<(Vec, Vec)>) -> Result<(), ()>; +} + +/// Implementation of `BroadcastHandler` for the unit type `()`. +impl BroadcastHandler for () { + fn handle_publish(_origin: &Location, _data: PublishData) -> XcmResult { + // No-op implementation for unit type + Ok(()) + } + + fn handle_subscribe(_origin: &Location, _publisher: u32) -> XcmResult { + // No-op implementation for unit type + Ok(()) + } +} \ No newline at end of file diff --git a/polkadot/xcm/xcm-executor/src/traits/mod.rs b/polkadot/xcm/xcm-executor/src/traits/mod.rs index e70d2c2f4f3af..380dc04af1a5f 100644 --- a/polkadot/xcm/xcm-executor/src/traits/mod.rs +++ b/polkadot/xcm/xcm-executor/src/traits/mod.rs @@ -49,6 +49,8 @@ mod hrmp; pub use hrmp::{ HandleHrmpChannelAccepted, HandleHrmpChannelClosing, HandleHrmpNewChannelOpenRequest, }; +mod broadcast_handler; +pub use broadcast_handler::{BroadcastHandler, HandlePublish}; mod event_emitter; mod record_xcm; mod weight; @@ -61,11 +63,11 @@ pub use weight::{WeightBounds, WeightTrader}; pub mod prelude { pub use super::{ - export_xcm, validate_export, AssetExchange, AssetLock, ClaimAssets, ConvertOrigin, - DropAssets, Enact, Error, EventEmitter, ExportXcm, FeeManager, FeeReason, LockError, - MatchesFungible, MatchesFungibles, MatchesNonFungible, MatchesNonFungibles, OnResponse, - ProcessTransaction, ShouldExecute, TransactAsset, VersionChangeNotifier, WeightBounds, - WeightTrader, WithOriginFilter, + export_xcm, validate_export, AssetExchange, AssetLock, BroadcastHandler, ClaimAssets, + ConvertOrigin, DropAssets, Enact, Error, EventEmitter, ExportXcm, + FeeManager, FeeReason, LockError, MatchesFungible, MatchesFungibles, MatchesNonFungible, + MatchesNonFungibles, OnResponse, ProcessTransaction, ShouldExecute, TransactAsset, + VersionChangeNotifier, WeightBounds, WeightTrader, WithOriginFilter, }; #[allow(deprecated)] pub use super::{Identity, JustTry}; diff --git a/pubsub-dev/build.sh b/pubsub-dev/build.sh new file mode 100755 index 0000000000000..7a388a9fc2086 --- /dev/null +++ b/pubsub-dev/build.sh @@ -0,0 +1,54 @@ +#!/bin/bash + +echo "🔨 Building Polkadot SDK binaries for pubsub XCM v5 testing..." +echo + +# Build main polkadot binary +echo "📦 Building polkadot relay chain binary..." +cargo build --release -p polkadot --bin polkadot +if [ $? -ne 0 ]; then + echo "❌ Failed to build polkadot binary" + exit 1 +fi +echo "✅ polkadot binary built successfully" +echo + +# Build PVF execute worker +echo "📦 Building polkadot-execute-worker..." +cargo build --release -p polkadot --bin polkadot-execute-worker +if [ $? -ne 0 ]; then + echo "❌ Failed to build polkadot-execute-worker" + exit 1 +fi +echo "✅ polkadot-execute-worker built successfully" +echo + +# Build PVF prepare worker +echo "📦 Building polkadot-prepare-worker..." +cargo build --release -p polkadot --bin polkadot-prepare-worker +if [ $? -ne 0 ]; then + echo "❌ Failed to build polkadot-prepare-worker" + exit 1 +fi +echo "✅ polkadot-prepare-worker built successfully" +echo + +# Build parachain binary +echo "📦 Building polkadot-parachain binary..." +cargo build --release -p polkadot-parachain-bin --bin polkadot-parachain +if [ $? -ne 0 ]; then + echo "❌ Failed to build polkadot-parachain binary" + exit 1 +fi +echo "✅ polkadot-parachain binary built successfully" +echo + +echo "🎉 All binaries built successfully!" +echo +echo "📍 Binary locations:" +echo " - Relay chain: target/release/polkadot" +echo " - Execute worker: target/release/polkadot-execute-worker" +echo " - Prepare worker: target/release/polkadot-prepare-worker" +echo " - Parachain: target/release/polkadot-parachain" +echo +echo "🚀 Ready for zombienet testing!" \ No newline at end of file diff --git a/pubsub-dev/test_broadcaster_api.sh b/pubsub-dev/test_broadcaster_api.sh new file mode 100755 index 0000000000000..0f14c083d9458 --- /dev/null +++ b/pubsub-dev/test_broadcaster_api.sh @@ -0,0 +1,145 @@ +#!/bin/bash + +# Enhanced test script for BroadcasterApi with human-readable output +# Tests with the exact data from your publish: ParaID 1000, key "0x123" + +RPC_URL=${1:-"http://localhost:9900"} + +# Function to decode hex to ASCII if possible +hex_to_ascii() { + local hex=$1 + # Remove 0x prefix if present + hex=${hex#0x} + # Convert hex to ASCII, handling non-printable chars + echo -n "$hex" | xxd -r -p 2>/dev/null | tr -d '\0' | cat -v +} + +# Function to decode SCALE-encoded Option> +decode_option_vec() { + local hex_result=$1 + # Remove 0x prefix + hex_result=${hex_result#0x} + + if [[ -z "$hex_result" ]]; then + echo "❌ None (empty result)" + return + fi + + # Check first byte for Option + local option_byte=${hex_result:0:2} + if [[ "$option_byte" == "00" ]]; then + echo "❌ None" + return + elif [[ "$option_byte" == "01" ]]; then + echo "✅ Some:" + # Remove option byte + hex_result=${hex_result:2} + + # Decode Vec - first get length + local length_hex=${hex_result:0:2} + local length=$((16#$length_hex)) + echo " 📏 Length: $length bytes" + + # Extract data bytes + local data_hex=${hex_result:2:$((length*2))} + echo " 🔢 Raw bytes: [$data_hex]" + + # Convert to decimal array + local decimal_array="" + for ((i=0; i<${#data_hex}; i+=2)); do + local byte_hex=${data_hex:$i:2} + local byte_dec=$((16#$byte_hex)) + decimal_array="$decimal_array$byte_dec, " + done + decimal_array=${decimal_array%, } + echo " 🔢 Decimal: [$decimal_array]" + + # Try to decode as ASCII + local ascii_text=$(hex_to_ascii "$data_hex") + if [[ -n "$ascii_text" ]]; then + echo " 📝 ASCII: \"$ascii_text\"" + fi + else + echo "❓ Unknown format: $hex_result" + fi +} + +echo "🔍 Testing BroadcasterApi with Enhanced Decoding..." +echo " RPC URL: $RPC_URL" +echo " Testing ParaID: 1000" +echo " Testing Key: [48, 120, 49, 50, 51] (\"0x123\")" +echo "" + +# SCALE-encoded parameters for get_published_value(1000, [48, 120, 49, 50, 51]) +# ParaID 1000 = 0xe8030000 (little-endian u32) +# Vec [48, 120, 49, 50, 51] = 0x14307831323 (length prefix + bytes) +ENCODED_PARAMS="0xe8030000143078313233" + +echo "📡 Calling BroadcasterApi_get_published_value..." +echo " Parameters: $ENCODED_PARAMS" +echo "" + +# Make the API call and extract result +RESPONSE=$(curl -s -H "Content-Type: application/json" -d "{ + \"id\": 1, + \"jsonrpc\": \"2.0\", + \"method\": \"state_call\", + \"params\": [ + \"BroadcasterApi_get_published_value\", + \"$ENCODED_PARAMS\" + ] +}" $RPC_URL) + +echo "📊 Raw Response:" +echo "$RESPONSE" | jq '.' +echo "" + +# Extract and decode result +RESULT=$(echo "$RESPONSE" | jq -r '.result // empty') +if [[ -n "$RESULT" && "$RESULT" != "null" ]]; then + echo "🔍 Decoded Result:" + decode_option_vec "$RESULT" +else + echo "❌ No result or error in response" +fi + +echo "" +echo "==================================" +echo "" + +# Also test get_publisher_child_root +echo "📡 Calling BroadcasterApi_get_publisher_child_root..." +PARA_ONLY="0xe8030000" # Just ParaID 1000 + +ROOT_RESPONSE=$(curl -s -H "Content-Type: application/json" -d "{ + \"id\": 2, + \"jsonrpc\": \"2.0\", + \"method\": \"state_call\", + \"params\": [ + \"BroadcasterApi_get_publisher_child_root\", + \"$PARA_ONLY\" + ] +}" $RPC_URL) + +echo "" +echo "📊 Raw Response:" +echo "$ROOT_RESPONSE" | jq '.' +echo "" + +# Extract and decode child root +ROOT_RESULT=$(echo "$ROOT_RESPONSE" | jq -r '.result // empty') +if [[ -n "$ROOT_RESULT" && "$ROOT_RESULT" != "null" ]]; then + echo "🔍 Decoded Child Root:" + if [[ "${ROOT_RESULT:0:4}" == "0x01" ]]; then + echo "✅ Some:" + ROOT_HASH=${ROOT_RESULT:4} + echo " 🌳 Child Trie Root Hash: 0x$ROOT_HASH" + echo " 📏 Hash Length: $((${#ROOT_HASH}/2)) bytes" + else + echo "❌ None (no published data)" + fi +else + echo "❌ No result or error in response" +fi + +echo "" \ No newline at end of file diff --git a/pubsub-dev/zombienet.toml b/pubsub-dev/zombienet.toml new file mode 100644 index 0000000000000..840e8026c5408 --- /dev/null +++ b/pubsub-dev/zombienet.toml @@ -0,0 +1,44 @@ +[relaychain] +chain = "rococo-local" +default_command = "./target/release/polkadot" +default_args = [ "-lparachain=debug", "-lxcm=trace" ] + + [[relaychain.nodes]] + name = "alice" + rpc_port = 9900 + validator = true + args = ["--trie-cache-size=0", "--disable-worker-version-check"] + + [[relaychain.nodes]] + name = "bob" + validator = true + args = ["--trie-cache-size=0", "--disable-worker-version-check"] + + [[relaychain.nodes]] + name = "charlie" + validator = true + args = ["--trie-cache-size=0", "--disable-worker-version-check"] + + [[relaychain.nodes]] + name = "dave" + validator = true + args = ["--trie-cache-size=0", "--disable-worker-version-check"] + +[[parachains]] +id = 1000 +addToGenesis = true +cumulus_based = true + + [[parachains.collators]] + name = "para-collator01" + rpc_port = 9920 + chain = "penpal-local" + command = "./target/release/polkadot-parachain" + args = ["-lxcm=trace", "--trie-cache-size=0", "--network-backend=libp2p", "--", "--network-backend=libp2p"] + + [[parachains.collators]] + name = "para-collator02" + chain = "penpal-local" + command = "./target/release/polkadot-parachain" + args = ["-lxcm=trace", "--trie-cache-size=0", "--network-backend=libp2p", "--", "--network-backend=libp2p"] + From 9b8dd3f2894cb2d449a8eec66b24fdd3c9fa602d Mon Sep 17 00:00:00 2001 From: metricaez Date: Tue, 30 Sep 2025 09:07:08 -0300 Subject: [PATCH 087/128] feat: logs clean up and event emission on broadcaster --- .../runtime/parachains/src/broadcaster/mod.rs | 132 ++++-------------- polkadot/runtime/parachains/src/mock.rs | 1 + polkadot/runtime/rococo/src/lib.rs | 1 + 3 files changed, 26 insertions(+), 108 deletions(-) diff --git a/polkadot/runtime/parachains/src/broadcaster/mod.rs b/polkadot/runtime/parachains/src/broadcaster/mod.rs index 73aa64d0be93d..8a233ef7f0952 100644 --- a/polkadot/runtime/parachains/src/broadcaster/mod.rs +++ b/polkadot/runtime/parachains/src/broadcaster/mod.rs @@ -62,6 +62,9 @@ pub mod pallet { #[pallet::config] pub trait Config: frame_system::Config { + /// The overarching event type. + type RuntimeEvent: From> + IsType<::RuntimeEvent>; + /// Maximum number of items that can be published in one operation #[pallet::constant] type MaxPublishItems: Get; @@ -79,6 +82,17 @@ pub mod pallet { type MaxSubscriptions: Get; } + #[pallet::event] + #[pallet::generate_deposit(pub(super) fn deposit_event)] + pub enum Event { + /// Data published by a parachain. + DataPublished { publisher: ParaId, items_count: u32 }, + /// Parachain subscribed to a publisher. + Subscribed { subscriber: ParaId, publisher: ParaId }, + /// Parachain unsubscribed from a publisher. + Unsubscribed { subscriber: ParaId, publisher: ParaId }, + } + /// Tracks which parachains have published data. /// /// Maps parachain ID to a boolean indicating whether they have a child trie. @@ -160,12 +174,7 @@ pub mod pallet { origin_para_id: ParaId, data: Vec<(Vec, Vec)>, ) -> DispatchResult { - log::info!( - target: "broadcaster::publish", - "📡 Publishing data from parachain {:?}: {} items", - origin_para_id, - data.len() - ); + let items_count = data.len() as u32; // Validate input limits first before making any changes ensure!( @@ -193,15 +202,6 @@ pub mod pallet { // Store each key-value pair in the child trie and track the key for (key, value) in data { - log::debug!( - target: "broadcaster::publish", - "📝 Storing key {:?} ({}B) -> value ({}B) for parachain {:?}", - key, - key.len(), - value.len(), - origin_para_id - ); - frame_support::storage::child::put(&child_info, &key, &value); // Track the key for enumeration (convert to BoundedVec) @@ -241,13 +241,7 @@ pub mod pallet { PublishedDataRoots::::put(roots); - log::info!( - target: "broadcaster::publish", - "✅ Successfully published data for parachain {:?}, total keys: {}, root: {:?}", - origin_para_id, - PublishedKeys::::get(origin_para_id).len(), - child_root - ); + Self::deposit_event(Event::DataPublished { publisher: origin_para_id, items_count }); Ok(()) } @@ -295,57 +289,28 @@ pub mod pallet { /// Get all published data for a parachain. pub fn get_all_published_data(para_id: ParaId) -> Vec<(Vec, Vec)> { - log::debug!( - target: "broadcaster::query", - "🔍 get_all_published_data() called for parachain {:?}", - para_id - ); - if !PublisherExists::::get(para_id) { - log::debug!( - target: "broadcaster::query", - "❌ Parachain {:?} has no published data", - para_id - ); return Vec::new(); } let child_info = Self::derive_child_info(para_id); let published_keys = PublishedKeys::::get(para_id); - let data: Vec<(Vec, Vec)> = published_keys + published_keys .into_iter() .filter_map(|bounded_key| { let key: Vec = bounded_key.into(); frame_support::storage::child::get(&child_info, &key) .map(|value| (key, value)) }) - .collect(); - - log::debug!( - target: "broadcaster::query", - "📦 Returning {} data items for parachain {:?}", - data.len(), - para_id - ); - - data + .collect() } /// Get list of all parachains that have published data. pub fn get_all_publishers() -> Vec { - let publishers: Vec = PublisherExists::::iter() + PublisherExists::::iter() .filter_map(|(para_id, exists)| if exists { Some(para_id) } else { None }) - .collect(); - - log::debug!( - target: "broadcaster::query", - "🔍 get_all_publishers() returning {} publishers: {:?}", - publishers.len(), - publishers - ); - - publishers + .collect() } /// Toggle subscription: subscribe if not subscribed, unsubscribe if subscribed. @@ -353,37 +318,21 @@ pub mod pallet { subscriber: ParaId, publisher: ParaId, ) -> DispatchResult { - log::info!( - target: "broadcaster::subscribe", - "🔄 Toggle subscription for parachain {:?} to publisher {:?}", - subscriber, - publisher - ); - let mut subscriptions = Subscriptions::::get(subscriber); // Check if already subscribed if let Some(pos) = subscriptions.iter().position(|&p| p == publisher) { // Already subscribed -> unsubscribe subscriptions.swap_remove(pos); - log::debug!( - target: "broadcaster::subscribe", - "❌ Unsubscribed: {:?} from {:?}", - subscriber, - publisher - ); + Subscriptions::::insert(subscriber, subscriptions); + Self::deposit_event(Event::Unsubscribed { subscriber, publisher }); } else { // Not subscribed -> subscribe subscriptions.try_push(publisher).map_err(|_| Error::::TooManySubscriptions)?; - log::debug!( - target: "broadcaster::subscribe", - "✅ Subscribed: {:?} to {:?}", - subscriber, - publisher - ); + Subscriptions::::insert(subscriber, subscriptions); + Self::deposit_event(Event::Subscribed { subscriber, publisher }); } - Subscriptions::::insert(subscriber, subscriptions); Ok(()) } @@ -401,49 +350,16 @@ pub mod pallet { /// Returns a map of Publisher ParaId -> published data. /// Only includes publishers that have actual data and are subscribed to. pub fn get_subscribed_data(subscriber_para_id: ParaId) -> BTreeMap, Vec)>> { - log::debug!( - target: "broadcaster::query", - "🔍 get_subscribed_data() called for subscriber {:?}", - subscriber_para_id - ); - let subscriptions = Self::get_subscriptions(subscriber_para_id); let mut result = BTreeMap::new(); - log::debug!( - target: "broadcaster::query", - "📋 Subscriber {:?} has {} subscriptions: {:?}", - subscriber_para_id, - subscriptions.len(), - subscriptions - ); - for publisher in subscriptions { let data = Self::get_all_published_data(publisher); if !data.is_empty() { - log::debug!( - target: "broadcaster::query", - "📦 Including {} data items from publisher {:?}", - data.len(), - publisher - ); result.insert(publisher, data); - } else { - log::debug!( - target: "broadcaster::query", - "🕳️ No data found for subscribed publisher {:?}", - publisher - ); } } - log::debug!( - target: "broadcaster::query", - "✅ Returning subscribed data from {} publishers for subscriber {:?}", - result.len(), - subscriber_para_id - ); - result } } diff --git a/polkadot/runtime/parachains/src/mock.rs b/polkadot/runtime/parachains/src/mock.rs index e6d39b02aba21..cebeec119d7fd 100644 --- a/polkadot/runtime/parachains/src/mock.rs +++ b/polkadot/runtime/parachains/src/mock.rs @@ -490,6 +490,7 @@ parameter_types! { } impl crate::broadcaster::Config for Test { + type RuntimeEvent = RuntimeEvent; type MaxPublishItems = MaxPublishItems; type MaxKeyLength = MaxKeyLength; type MaxValueLength = MaxValueLength; diff --git a/polkadot/runtime/rococo/src/lib.rs b/polkadot/runtime/rococo/src/lib.rs index f989e958b5957..0d4d65f666ebd 100644 --- a/polkadot/runtime/rococo/src/lib.rs +++ b/polkadot/runtime/rococo/src/lib.rs @@ -1231,6 +1231,7 @@ parameter_types! { } impl polkadot_runtime_parachains::broadcaster::Config for Runtime { + type RuntimeEvent = RuntimeEvent; type MaxPublishItems = MaxPublishItems; type MaxKeyLength = MaxKeyLength; type MaxValueLength = MaxValueLength; From 3a1440bcbc4ac20a09fde0753e0bff7f9aad3280 Mon Sep 17 00:00:00 2001 From: metricaez Date: Tue, 30 Sep 2025 12:01:41 -0300 Subject: [PATCH 088/128] feat: handle bounds and clean up --- .../runtime/parachains/src/broadcaster/mod.rs | 114 ++++++++---------- polkadot/runtime/parachains/src/mock.rs | 1 + polkadot/runtime/rococo/src/lib.rs | 2 + 3 files changed, 55 insertions(+), 62 deletions(-) diff --git a/polkadot/runtime/parachains/src/broadcaster/mod.rs b/polkadot/runtime/parachains/src/broadcaster/mod.rs index 8a233ef7f0952..9d36e15ff6877 100644 --- a/polkadot/runtime/parachains/src/broadcaster/mod.rs +++ b/polkadot/runtime/parachains/src/broadcaster/mod.rs @@ -23,7 +23,7 @@ use alloc::{collections::BTreeMap, vec::Vec}; use frame_support::{ pallet_prelude::*, storage::child::ChildInfo, - traits::{Get, ConstU32}, + traits::{defensive_prelude::*, Get, ConstU32}, }; use frame_system::pallet_prelude::BlockNumberFor; use polkadot_primitives::Id as ParaId; @@ -57,7 +57,10 @@ mod tests; pub mod pallet { use super::*; + const STORAGE_VERSION: StorageVersion = StorageVersion::new(0); + #[pallet::pallet] + #[pallet::storage_version(STORAGE_VERSION)] pub struct Pallet(_); #[pallet::config] @@ -65,21 +68,25 @@ pub mod pallet { /// The overarching event type. type RuntimeEvent: From> + IsType<::RuntimeEvent>; - /// Maximum number of items that can be published in one operation + /// Maximum number of items that can be published in one operation. #[pallet::constant] type MaxPublishItems: Get; - /// Maximum length of a key in bytes + /// Maximum length of a key in bytes. #[pallet::constant] type MaxKeyLength: Get; - /// Maximum length of a value in bytes + /// Maximum length of a value in bytes. #[pallet::constant] type MaxValueLength: Get; - /// Maximum number of publishers a subscriber can subscribe to + /// Maximum number of publishers a subscriber can subscribe to. #[pallet::constant] type MaxSubscriptions: Get; + + /// Maximum number of publishers that can have published data. + #[pallet::constant] + type MaxPublishers: Get; } #[pallet::event] @@ -136,21 +143,19 @@ pub mod pallet { #[pallet::storage] pub type PublishedDataRoots = StorageValue< _, - BoundedVec<(ParaId, BoundedVec>), ConstU32<1000>>, + BoundedVec<(ParaId, BoundedVec>), T::MaxPublishers>, ValueQuery, >; #[pallet::error] pub enum Error { - /// Too many items in a single publish operation + /// Too many items in a single publish operation. TooManyPublishItems, - /// Key length exceeds maximum allowed + /// Key length exceeds maximum allowed. KeyTooLong, - /// Value length exceeds maximum allowed + /// Value length exceeds maximum allowed. ValueTooLong, - /// Child trie operation failed - ChildTrieError, - /// Too many subscriptions for this subscriber + /// Too many subscriptions for this subscriber. TooManySubscriptions, } @@ -206,7 +211,7 @@ pub mod pallet { // Track the key for enumeration (convert to BoundedVec) if let Ok(bounded_key) = BoundedVec::try_from(key) { - let _ = published_keys.try_insert(bounded_key); + published_keys.try_insert(bounded_key).defensive_ok(); } } @@ -220,22 +225,14 @@ pub mod pallet { // Update the aggregated roots storage let mut roots = PublishedDataRoots::::get(); - // Find and update existing entry or add new one - let mut found = false; - for (para_id, root_hash) in roots.iter_mut() { - if *para_id == origin_para_id { - if let Ok(bounded_root) = BoundedVec::try_from(child_root.clone()) { - *root_hash = bounded_root; - } - found = true; - break; - } - } - - // If not found, add new entry - if !found { - if let Ok(bounded_root) = BoundedVec::try_from(child_root.clone()) { - let _ = roots.try_push((origin_para_id, bounded_root)); + // Convert child_root once + if let Ok(bounded_root) = BoundedVec::try_from(child_root) { + // Find and update existing entry or add new one + if let Some((_, root_hash)) = roots.iter_mut().find(|(para_id, _)| *para_id == origin_para_id) { + *root_hash = bounded_root; + } else { + // Not found, add new entry + roots.try_push((origin_para_id, bounded_root)).defensive_ok(); } } @@ -247,17 +244,14 @@ pub mod pallet { } /// Get the child trie root hash for a specific publisher. - /// + /// /// This root is always included in PersistedValidationData to prove /// the current state of the publisher's data. pub fn get_publisher_child_root(para_id: ParaId) -> Option> { - if PublisherExists::::get(para_id) { + PublisherExists::::get(para_id).then(|| { let child_info = Self::derive_child_info(para_id); - Some(frame_support::storage::child::root(&child_info, - sp_runtime::StateVersion::V1)) - } else { - None - } + frame_support::storage::child::root(&child_info, sp_runtime::StateVersion::V1) + }) } /// Get or create child trie info for a publisher. @@ -269,8 +263,11 @@ pub mod pallet { /// Derive a deterministic child trie identifier from parachain ID. pub fn derive_child_info(para_id: ParaId) -> ChildInfo { - let mut key = b"pubsub".to_vec(); - key.extend_from_slice(¶_id.encode()); + const PREFIX: &[u8] = b"pubsub"; + let encoded = para_id.encode(); + let mut key = Vec::with_capacity(PREFIX.len() + encoded.len()); + key.extend_from_slice(PREFIX); + key.extend_from_slice(&encoded); ChildInfo::new_default(&key) } @@ -279,12 +276,10 @@ pub mod pallet { /// /// Returns None if the publisher doesn't exist or the key is not found. pub fn get_published_value(para_id: ParaId, key: &[u8]) -> Option> { - if PublisherExists::::get(para_id) { + PublisherExists::::get(para_id).then(|| { let child_info = Self::derive_child_info(para_id); frame_support::storage::child::get(&child_info, key) - } else { - None - } + })? } /// Get all published data for a parachain. @@ -308,9 +303,7 @@ pub mod pallet { /// Get list of all parachains that have published data. pub fn get_all_publishers() -> Vec { - PublisherExists::::iter() - .filter_map(|(para_id, exists)| if exists { Some(para_id) } else { None }) - .collect() + PublisherExists::::iter_keys().collect() } /// Toggle subscription: subscribe if not subscribed, unsubscribe if subscribed. @@ -321,17 +314,18 @@ pub mod pallet { let mut subscriptions = Subscriptions::::get(subscriber); // Check if already subscribed - if let Some(pos) = subscriptions.iter().position(|&p| p == publisher) { + let event = if let Some(pos) = subscriptions.iter().position(|&p| p == publisher) { // Already subscribed -> unsubscribe subscriptions.swap_remove(pos); - Subscriptions::::insert(subscriber, subscriptions); - Self::deposit_event(Event::Unsubscribed { subscriber, publisher }); + Event::Unsubscribed { subscriber, publisher } } else { // Not subscribed -> subscribe subscriptions.try_push(publisher).map_err(|_| Error::::TooManySubscriptions)?; - Subscriptions::::insert(subscriber, subscriptions); - Self::deposit_event(Event::Subscribed { subscriber, publisher }); - } + Event::Subscribed { subscriber, publisher } + }; + + Subscriptions::::insert(subscriber, subscriptions); + Self::deposit_event(event); Ok(()) } @@ -350,17 +344,13 @@ pub mod pallet { /// Returns a map of Publisher ParaId -> published data. /// Only includes publishers that have actual data and are subscribed to. pub fn get_subscribed_data(subscriber_para_id: ParaId) -> BTreeMap, Vec)>> { - let subscriptions = Self::get_subscriptions(subscriber_para_id); - let mut result = BTreeMap::new(); - - for publisher in subscriptions { - let data = Self::get_all_published_data(publisher); - if !data.is_empty() { - result.insert(publisher, data); - } - } - - result + Subscriptions::::get(subscriber_para_id) + .into_iter() + .filter_map(|publisher| { + let data = Self::get_all_published_data(publisher); + (!data.is_empty()).then_some((publisher, data)) + }) + .collect() } } } diff --git a/polkadot/runtime/parachains/src/mock.rs b/polkadot/runtime/parachains/src/mock.rs index cebeec119d7fd..816b0c46651ec 100644 --- a/polkadot/runtime/parachains/src/mock.rs +++ b/polkadot/runtime/parachains/src/mock.rs @@ -495,6 +495,7 @@ impl crate::broadcaster::Config for Test { type MaxKeyLength = MaxKeyLength; type MaxValueLength = MaxValueLength; type MaxSubscriptions = ConstU32<10>; + type MaxPublishers = ConstU32<1000>; } pub struct MockValidatorSet; diff --git a/polkadot/runtime/rococo/src/lib.rs b/polkadot/runtime/rococo/src/lib.rs index 0d4d65f666ebd..54a6d19dd299b 100644 --- a/polkadot/runtime/rococo/src/lib.rs +++ b/polkadot/runtime/rococo/src/lib.rs @@ -1228,6 +1228,7 @@ parameter_types! { pub const MaxKeyLength: u32 = 256; pub const MaxValueLength: u32 = 1024; pub const MaxSubscriptions: u32 = 100; + pub const MaxPublishers: u32 = 1000; } impl polkadot_runtime_parachains::broadcaster::Config for Runtime { @@ -1236,6 +1237,7 @@ impl polkadot_runtime_parachains::broadcaster::Config for Runtime { type MaxKeyLength = MaxKeyLength; type MaxValueLength = MaxValueLength; type MaxSubscriptions = MaxSubscriptions; + type MaxPublishers = MaxPublishers; } parameter_types! { From 331e62cf7774ffac958d27faddbbf84f163013ae Mon Sep 17 00:00:00 2001 From: metricaez Date: Tue, 30 Sep 2025 12:54:33 -0300 Subject: [PATCH 089/128] feat: small opt --- polkadot/runtime/parachains/src/broadcaster/mod.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/polkadot/runtime/parachains/src/broadcaster/mod.rs b/polkadot/runtime/parachains/src/broadcaster/mod.rs index 9d36e15ff6877..209b007fc74d4 100644 --- a/polkadot/runtime/parachains/src/broadcaster/mod.rs +++ b/polkadot/runtime/parachains/src/broadcaster/mod.rs @@ -256,9 +256,10 @@ pub mod pallet { /// Get or create child trie info for a publisher. fn get_or_create_publisher_child_info(para_id: ParaId) -> ChildInfo { - let child_info = Self::derive_child_info(para_id); - PublisherExists::::insert(para_id, true); - child_info + if !PublisherExists::::contains_key(para_id) { + PublisherExists::::insert(para_id, true); + } + Self::derive_child_info(para_id) } /// Derive a deterministic child trie identifier from parachain ID. From 087c85acc25192ed95b3d621f4393a966e324413 Mon Sep 17 00:00:00 2001 From: metricaez Date: Tue, 30 Sep 2025 15:35:37 -0300 Subject: [PATCH 090/128] feat: adapter tests --- .../single_asset_adapter/mock.rs | 1 + .../xcm/xcm-builder/src/broadcast_adapter.rs | 221 ++++++++++++++- polkadot/xcm/xcm-builder/src/test_utils.rs | 53 +++- polkadot/xcm/xcm-builder/src/tests/mock.rs | 1 + polkadot/xcm/xcm-builder/src/tests/mod.rs | 1 + .../xcm/xcm-builder/src/tests/pay/mock.rs | 1 + .../src/tests/publish_subscribe.rs | 254 ++++++++++++++++++ polkadot/xcm/xcm-executor/src/tests/mock.rs | 1 + 8 files changed, 530 insertions(+), 3 deletions(-) create mode 100644 polkadot/xcm/xcm-builder/src/tests/publish_subscribe.rs diff --git a/polkadot/xcm/xcm-builder/src/asset_exchange/single_asset_adapter/mock.rs b/polkadot/xcm/xcm-builder/src/asset_exchange/single_asset_adapter/mock.rs index 30136b004a480..ed26b8ab67a38 100644 --- a/polkadot/xcm/xcm-builder/src/asset_exchange/single_asset_adapter/mock.rs +++ b/polkadot/xcm/xcm-builder/src/asset_exchange/single_asset_adapter/mock.rs @@ -251,6 +251,7 @@ impl xcm_executor::Config for XcmConfig { type HrmpChannelAcceptedHandler = (); type HrmpChannelClosingHandler = (); type XcmRecorder = (); + type BroadcastHandler = (); } /// Simple converter from a [`Location`] with an [`AccountIndex64`] junction and no parent to a diff --git a/polkadot/xcm/xcm-builder/src/broadcast_adapter.rs b/polkadot/xcm/xcm-builder/src/broadcast_adapter.rs index 3d80a3e2a0ee2..3f02a010696e1 100644 --- a/polkadot/xcm/xcm-builder/src/broadcast_adapter.rs +++ b/polkadot/xcm/xcm-builder/src/broadcast_adapter.rs @@ -79,7 +79,7 @@ impl Contains for DirectParachainsOnly { } } -/// Allows both direct and sibling parachains. +/// Allows both direct and sibling parachains. pub struct AllParachains; impl Contains for AllParachains { fn contains(origin: &Location) -> bool { @@ -102,4 +102,223 @@ impl Contains for SpecificParachai _ => false, } } +} + +#[cfg(test)] +mod tests { + use super::*; + use frame_support::parameter_types; + use polkadot_runtime_parachains::broadcaster::publish; + use sp_runtime::bounded_vec; + use xcm::latest::{PublishData, Location, Junction}; + use xcm::latest::prelude::XcmError; + + // Mock handler that tracks calls + parameter_types! { + pub static PublishCalls: Vec<(ParaId, Vec<(Vec, Vec)>)> = vec![]; + pub static SubscribeCalls: Vec<(ParaId, ParaId)> = vec![]; + } + + struct MockPublishHandler; + impl publish::Publish for MockPublishHandler { + fn publish_data( + publisher: ParaId, + data: Vec<(Vec, Vec)>, + ) -> Result<(), sp_runtime::DispatchError> { + let mut calls = PublishCalls::get(); + calls.push((publisher, data)); + PublishCalls::set(calls); + Ok(()) + } + + fn toggle_subscription( + subscriber: ParaId, + publisher: ParaId, + ) -> Result<(), sp_runtime::DispatchError> { + let mut calls = SubscribeCalls::get(); + calls.push((subscriber, publisher)); + SubscribeCalls::set(calls); + Ok(()) + } + } + + #[test] + fn publish_from_direct_parachain_works() { + PublishCalls::set(vec![]); + let origin = Location::new(0, [Junction::Parachain(1000)]); + let data: PublishData = bounded_vec![ + (b"key1".to_vec(), b"value1".to_vec()), + ]; + + let result = ParachainBroadcastAdapter::::handle_publish( + &origin, + data.clone(), + ); + + assert!(result.is_ok()); + let calls = PublishCalls::get(); + assert_eq!(calls.len(), 1); + assert_eq!(calls[0].0, ParaId::from(1000)); + assert_eq!(calls[0].1, data.into_inner()); + } + + #[test] + fn publish_from_sibling_parachain_works() { + PublishCalls::set(vec![]); + let origin = Location::new(1, [Junction::Parachain(2000), Junction::AccountId32 { network: None, id: [1; 32] }]); + let data: PublishData = bounded_vec![ + (b"key1".to_vec(), b"value1".to_vec()), + ]; + + let result = ParachainBroadcastAdapter::::handle_publish( + &origin, + data.clone(), + ); + + assert!(result.is_ok()); + let calls = PublishCalls::get(); + assert_eq!(calls.len(), 1); + assert_eq!(calls[0].0, ParaId::from(2000)); + } + + #[test] + fn publish_from_non_parachain_fails() { + PublishCalls::set(vec![]); + // Root origin + let origin = Location::here(); + let data: PublishData = bounded_vec![ + (b"key1".to_vec(), b"value1".to_vec()), + ]; + + let result = ParachainBroadcastAdapter::::handle_publish( + &origin, + data, + ); + + assert!(matches!(result, Err(XcmError::NoPermission))); + assert!(PublishCalls::get().is_empty()); + } + + #[test] + fn publish_rejected_by_filter() { + PublishCalls::set(vec![]); + // Para 1000 not allowed by DirectParachainsOnly + let origin = Location::new(1, [Junction::Parachain(1000)]); + let data: PublishData = bounded_vec![ + (b"key1".to_vec(), b"value1".to_vec()), + ]; + + let result = ParachainBroadcastAdapter::::handle_publish( + &origin, + data, + ); + + assert!(matches!(result, Err(XcmError::NoPermission))); + assert!(PublishCalls::get().is_empty()); + } + + #[test] + fn subscribe_from_direct_parachain_works() { + SubscribeCalls::set(vec![]); + let origin = Location::new(0, [Junction::Parachain(1000)]); + let publisher = 2000; + + let result = ParachainBroadcastAdapter::::handle_subscribe( + &origin, + publisher, + ); + + assert!(result.is_ok()); + let calls = SubscribeCalls::get(); + assert_eq!(calls.len(), 1); + assert_eq!(calls[0], (ParaId::from(1000), ParaId::from(2000))); + } + + #[test] + fn subscribe_from_sibling_parachain_works() { + SubscribeCalls::set(vec![]); + let origin = Location::new(1, [Junction::Parachain(3000), Junction::AccountId32 { network: None, id: [1; 32] }]); + let publisher = 2000; + + let result = ParachainBroadcastAdapter::::handle_subscribe( + &origin, + publisher, + ); + + assert!(result.is_ok()); + let calls = SubscribeCalls::get(); + assert_eq!(calls.len(), 1); + assert_eq!(calls[0], (ParaId::from(3000), ParaId::from(2000))); + } + + #[test] + fn subscribe_from_non_parachain_fails() { + SubscribeCalls::set(vec![]); + let origin = Location::here(); + let publisher = 2000; + + let result = ParachainBroadcastAdapter::::handle_subscribe( + &origin, + publisher, + ); + + assert!(matches!(result, Err(XcmError::NoPermission))); + assert!(SubscribeCalls::get().is_empty()); + } + + #[test] + fn subscribe_rejected_by_filter() { + SubscribeCalls::set(vec![]); + let origin = Location::new(1, [Junction::Parachain(1000)]); + let publisher = 2000; + + let result = ParachainBroadcastAdapter::::handle_subscribe( + &origin, + publisher, + ); + + assert!(matches!(result, Err(XcmError::NoPermission))); + assert!(SubscribeCalls::get().is_empty()); + } + + #[test] + fn direct_parachains_only_filter_works() { + // Direct parachain allowed + assert!(DirectParachainsOnly::contains(&Location::new(0, [Junction::Parachain(1000)]))); + + // Sibling parachain not allowed + assert!(!DirectParachainsOnly::contains(&Location::new(1, [Junction::Parachain(1000)]))); + + // Root not allowed + assert!(!DirectParachainsOnly::contains(&Location::here())); + } + + #[test] + fn all_parachains_filter_works() { + // Direct parachain allowed + assert!(AllParachains::contains(&Location::new(0, [Junction::Parachain(1000)]))); + + // Sibling parachain allowed + assert!(AllParachains::contains(&Location::new(1, [Junction::Parachain(2000), Junction::AccountId32 { network: None, id: [1; 32] }]))); + + // Root not allowed + assert!(!AllParachains::contains(&Location::here())); + } + + #[test] + fn specific_parachains_filter_works() { + type TestFilter = SpecificParachains<1000, 2000>; + + // Para 1000 allowed (direct) + assert!(TestFilter::contains(&Location::new(0, [Junction::Parachain(1000)]))); + + // Para 2000 allowed (sibling) + assert!(TestFilter::contains(&Location::new(1, [Junction::Parachain(2000)]))); + + // Para 3000 not allowed + assert!(!TestFilter::contains(&Location::new(0, [Junction::Parachain(3000)]))); + + // Root not allowed + assert!(!TestFilter::contains(&Location::here())); + } } \ No newline at end of file diff --git a/polkadot/xcm/xcm-builder/src/test_utils.rs b/polkadot/xcm/xcm-builder/src/test_utils.rs index 90afb2c9a3d3e..2cd7b4189cf73 100644 --- a/polkadot/xcm/xcm-builder/src/test_utils.rs +++ b/polkadot/xcm/xcm-builder/src/test_utils.rs @@ -21,8 +21,9 @@ use frame_support::{ parameter_types, traits::{Contains, CrateVersion, PalletInfoData, PalletsInfoAccess}, }; -pub use xcm::latest::{prelude::*, Weight}; -use xcm_executor::traits::{ClaimAssets, DropAssets, VersionChangeNotifier}; +pub use xcm::latest::{prelude::*, PublishData, Weight}; +use alloc::collections::BTreeMap; +use xcm_executor::traits::{BroadcastHandler, ClaimAssets, DropAssets, VersionChangeNotifier}; pub use xcm_executor::{ traits::{ AssetExchange, AssetLock, ConvertOrigin, Enact, LockError, OnResponse, TransactAsset, @@ -33,6 +34,10 @@ pub use xcm_executor::{ parameter_types! { pub static SubscriptionRequests: Vec<(Location, Option<(QueryId, Weight)>)> = vec![]; pub static MaxAssetsIntoHolding: u32 = 4; + // Maps ParaId => Vec<(key, value)> + pub static PublishedData: BTreeMap, Vec)>> = BTreeMap::new(); + // Maps subscriber ParaId => Vec + pub static BroadcastSubscriptions: BTreeMap> = BTreeMap::new(); } pub struct TestSubscriptionService; @@ -62,6 +67,50 @@ impl VersionChangeNotifier for TestSubscriptionService { } } +pub struct TestBroadcastHandler; + +impl BroadcastHandler for TestBroadcastHandler { + fn handle_publish(origin: &Location, data: PublishData) -> XcmResult { + // Extract para_id from origin + let para_id = match origin.unpack() { + (0, [Parachain(id)]) => *id, + (1, [Parachain(id), ..]) => *id, + _ => return Err(XcmError::BadOrigin), + }; + + let mut published = PublishedData::get(); + let data_vec: Vec<(Vec, Vec)> = data.into_inner(); + + // Merge with existing data for this parachain + published.entry(para_id).or_insert_with(Vec::new).extend(data_vec); + PublishedData::set(published); + + Ok(()) + } + + fn handle_subscribe(origin: &Location, publisher: u32) -> XcmResult { + // Extract subscriber para_id from origin + let subscriber_id = match origin.unpack() { + (0, [Parachain(id)]) => *id, + (1, [Parachain(id), ..]) => *id, + _ => return Err(XcmError::BadOrigin), + }; + + let mut subscriptions = BroadcastSubscriptions::get(); + let subscriber_list = subscriptions.entry(subscriber_id).or_insert_with(Vec::new); + + // Toggle subscription + if let Some(pos) = subscriber_list.iter().position(|&p| p == publisher) { + subscriber_list.remove(pos); + } else { + subscriber_list.push(publisher); + } + + BroadcastSubscriptions::set(subscriptions); + Ok(()) + } +} + parameter_types! { pub static TrappedAssets: Vec<(Location, Assets)> = vec![]; } diff --git a/polkadot/xcm/xcm-builder/src/tests/mock.rs b/polkadot/xcm/xcm-builder/src/tests/mock.rs index b932aaee6fcf8..75758cca65690 100644 --- a/polkadot/xcm/xcm-builder/src/tests/mock.rs +++ b/polkadot/xcm/xcm-builder/src/tests/mock.rs @@ -771,6 +771,7 @@ impl Config for TestConfig { type HrmpChannelAcceptedHandler = (); type HrmpChannelClosingHandler = (); type XcmRecorder = (); + type BroadcastHandler = TestBroadcastHandler; } pub fn fungible_multi_asset(location: Location, amount: u128) -> Asset { diff --git a/polkadot/xcm/xcm-builder/src/tests/mod.rs b/polkadot/xcm/xcm-builder/src/tests/mod.rs index 379baaf5e3767..d7f727c830b3c 100644 --- a/polkadot/xcm/xcm-builder/src/tests/mod.rs +++ b/polkadot/xcm/xcm-builder/src/tests/mod.rs @@ -35,6 +35,7 @@ mod expecting; mod locking; mod origins; mod pay; +mod publish_subscribe; mod querying; mod routing; mod transacting; diff --git a/polkadot/xcm/xcm-builder/src/tests/pay/mock.rs b/polkadot/xcm/xcm-builder/src/tests/pay/mock.rs index 7f29ab872faaa..9e530be164410 100644 --- a/polkadot/xcm/xcm-builder/src/tests/pay/mock.rs +++ b/polkadot/xcm/xcm-builder/src/tests/pay/mock.rs @@ -235,6 +235,7 @@ impl xcm_executor::Config for XcmConfig { type HrmpChannelAcceptedHandler = (); type HrmpChannelClosingHandler = (); type XcmRecorder = XcmPallet; + type BroadcastHandler = (); } parameter_types! { diff --git a/polkadot/xcm/xcm-builder/src/tests/publish_subscribe.rs b/polkadot/xcm/xcm-builder/src/tests/publish_subscribe.rs new file mode 100644 index 0000000000000..79337617d9795 --- /dev/null +++ b/polkadot/xcm/xcm-builder/src/tests/publish_subscribe.rs @@ -0,0 +1,254 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Polkadot. + +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . + +//! Tests for Publish and Subscribe XCM instructions. + +use super::*; +use crate::test_utils::{BroadcastSubscriptions, PublishedData}; +use sp_runtime::bounded_vec; + +#[test] +fn publish_from_parachain_works() { + // Allow unpaid execution from Parachain(1000) + AllowUnpaidFrom::set(vec![Parachain(1000).into()]); + + let data: PublishData = bounded_vec![(b"key1".to_vec(), b"value1".to_vec()),]; + + let message = Xcm::(vec![Publish { data: data.clone() }]); + let mut hash = fake_message_hash(&message); + let weight_limit = Weight::from_parts(10, 10); + + let r = XcmExecutor::::prepare_and_execute( + Parachain(1000), + message, + &mut hash, + weight_limit, + Weight::zero(), + ); + + assert_eq!(r, Outcome::Complete { used: Weight::from_parts(10, 10) }); + + // Verify data was published + let published = PublishedData::get(); + assert_eq!(published.get(&1000).unwrap().len(), 1); + assert_eq!(published.get(&1000).unwrap()[0], (b"key1".to_vec(), b"value1".to_vec())); +} + +#[test] +fn publish_from_non_parachain_fails() { + // Allow unpaid execution from Parent to test that origin validation happens + AllowUnpaidFrom::set(vec![Parent.into()]); + + let data: PublishData = bounded_vec![(b"key1".to_vec(), b"value1".to_vec()),]; + + let message = Xcm::(vec![Publish { data }]); + let mut hash = fake_message_hash(&message); + let weight_limit = Weight::from_parts(10, 10); + + // Try from Parent (not a parachain) + let r = XcmExecutor::::prepare_and_execute( + Parent, + message, + &mut hash, + weight_limit, + Weight::zero(), + ); + + assert_eq!( + r, + Outcome::Incomplete { + used: Weight::from_parts(10, 10), + error: InstructionError { index: 0, error: XcmError::BadOrigin }, + } + ); +} + +#[test] +fn publish_without_origin_fails() { + // Allow unpaid execution from Parachain(1000) + AllowUnpaidFrom::set(vec![Parachain(1000).into()]); + + let data: PublishData = bounded_vec![(b"key1".to_vec(), b"value1".to_vec()),]; + + let message = Xcm::(vec![ClearOrigin, Publish { data }]); + let mut hash = fake_message_hash(&message); + let weight_limit = Weight::from_parts(20, 20); + + let r = XcmExecutor::::prepare_and_execute( + Parachain(1000), + message, + &mut hash, + weight_limit, + Weight::zero(), + ); + + assert_eq!( + r, + Outcome::Incomplete { + used: Weight::from_parts(20, 20), + error: InstructionError { index: 1, error: XcmError::BadOrigin }, + } + ); +} + +#[test] +fn subscribe_from_parachain_works() { + // Allow unpaid execution from Parachain(1000) + AllowUnpaidFrom::set(vec![Parachain(1000).into()]); + + let message = Xcm::(vec![Subscribe { publisher: 2000 }]); + let mut hash = fake_message_hash(&message); + let weight_limit = Weight::from_parts(10, 10); + + let r = XcmExecutor::::prepare_and_execute( + Parachain(1000), + message, + &mut hash, + weight_limit, + Weight::zero(), + ); + + assert_eq!(r, Outcome::Complete { used: Weight::from_parts(10, 10) }); + + // Verify subscription was created + let subscriptions = BroadcastSubscriptions::get(); + assert_eq!(subscriptions.get(&1000).unwrap(), &vec![2000]); +} + +#[test] +fn subscribe_toggle_unsubscribes() { + // Allow unpaid execution from Parachain(1000) + AllowUnpaidFrom::set(vec![Parachain(1000).into()]); + + // First subscribe + let message1 = Xcm::(vec![Subscribe { publisher: 2000 }]); + let mut hash1 = fake_message_hash(&message1); + let weight_limit = Weight::from_parts(10, 10); + + let r = XcmExecutor::::prepare_and_execute( + Parachain(1000), + message1, + &mut hash1, + weight_limit, + Weight::zero(), + ); + assert_eq!(r, Outcome::Complete { used: Weight::from_parts(10, 10) }); + + // Verify subscribed + let subscriptions = BroadcastSubscriptions::get(); + assert_eq!(subscriptions.get(&1000).unwrap(), &vec![2000]); + + // Subscribe again to toggle (unsubscribe) + let message2 = Xcm::(vec![Subscribe { publisher: 2000 }]); + let mut hash2 = fake_message_hash(&message2); + + let r = XcmExecutor::::prepare_and_execute( + Parachain(1000), + message2, + &mut hash2, + weight_limit, + Weight::zero(), + ); + assert_eq!(r, Outcome::Complete { used: Weight::from_parts(10, 10) }); + + // Verify unsubscribed + let subscriptions = BroadcastSubscriptions::get(); + assert!(subscriptions.get(&1000).unwrap().is_empty()); +} + +#[test] +fn subscribe_from_non_parachain_fails() { + // Allow unpaid execution from Parent to test that origin validation happens + AllowUnpaidFrom::set(vec![Parent.into()]); + + let message = Xcm::(vec![Subscribe { publisher: 2000 }]); + let mut hash = fake_message_hash(&message); + let weight_limit = Weight::from_parts(10, 10); + + let r = XcmExecutor::::prepare_and_execute( + Parent, + message, + &mut hash, + weight_limit, + Weight::zero(), + ); + + assert_eq!( + r, + Outcome::Incomplete { + used: Weight::from_parts(10, 10), + error: InstructionError { index: 0, error: XcmError::BadOrigin }, + } + ); +} + +#[test] +fn subscribe_without_origin_fails() { + // Allow unpaid execution from Parachain(1000) + AllowUnpaidFrom::set(vec![Parachain(1000).into()]); + + let message = Xcm::(vec![ClearOrigin, Subscribe { publisher: 2000 }]); + let mut hash = fake_message_hash(&message); + let weight_limit = Weight::from_parts(20, 20); + + let r = XcmExecutor::::prepare_and_execute( + Parachain(1000), + message, + &mut hash, + weight_limit, + Weight::zero(), + ); + + assert_eq!( + r, + Outcome::Incomplete { + used: Weight::from_parts(20, 20), + error: InstructionError { index: 1, error: XcmError::BadOrigin }, + } + ); +} + +#[test] +fn publish_multiple_items_works() { + // Allow unpaid execution from Parachain(1000) + AllowUnpaidFrom::set(vec![Parachain(1000).into()]); + + let data: PublishData = bounded_vec![ + (b"key1".to_vec(), b"value1".to_vec()), + (b"key2".to_vec(), b"value2".to_vec()), + ]; + + let message = Xcm::(vec![Publish { data: data.clone() }]); + let mut hash = fake_message_hash(&message); + let weight_limit = Weight::from_parts(10, 10); + + let r = XcmExecutor::::prepare_and_execute( + Parachain(1000), + message, + &mut hash, + weight_limit, + Weight::zero(), + ); + + assert_eq!(r, Outcome::Complete { used: Weight::from_parts(10, 10) }); + + // Verify all data was published + let published = PublishedData::get(); + let para_data = published.get(&1000).unwrap(); + assert_eq!(para_data.len(), 2); + assert!(para_data.contains(&(b"key1".to_vec(), b"value1".to_vec()))); + assert!(para_data.contains(&(b"key2".to_vec(), b"value2".to_vec()))); +} diff --git a/polkadot/xcm/xcm-executor/src/tests/mock.rs b/polkadot/xcm/xcm-executor/src/tests/mock.rs index 850629bef8c06..ef8789f8b1713 100644 --- a/polkadot/xcm/xcm-executor/src/tests/mock.rs +++ b/polkadot/xcm/xcm-executor/src/tests/mock.rs @@ -328,4 +328,5 @@ impl Config for XcmConfig { type HrmpChannelAcceptedHandler = (); type HrmpChannelClosingHandler = (); type XcmRecorder = (); + type BroadcastHandler = (); } From a13befbd4750f4236a08024de7d75554b0e8f0a8 Mon Sep 17 00:00:00 2001 From: metricaez Date: Wed, 1 Oct 2025 12:19:08 -0300 Subject: [PATCH 091/128] feat: bound key and data of Publish --- .../runtime/parachains/src/broadcaster/mod.rs | 16 +++++++ polkadot/xcm/src/v5/mod.rs | 5 ++- .../xcm/xcm-builder/src/broadcast_adapter.rs | 45 +++++++++++-------- polkadot/xcm/xcm-builder/src/test_utils.rs | 5 ++- .../src/tests/publish_subscribe.rs | 32 +++++++++---- 5 files changed, 74 insertions(+), 29 deletions(-) diff --git a/polkadot/runtime/parachains/src/broadcaster/mod.rs b/polkadot/runtime/parachains/src/broadcaster/mod.rs index 209b007fc74d4..f754d0106d5a2 100644 --- a/polkadot/runtime/parachains/src/broadcaster/mod.rs +++ b/polkadot/runtime/parachains/src/broadcaster/mod.rs @@ -69,14 +69,17 @@ pub mod pallet { type RuntimeEvent: From> + IsType<::RuntimeEvent>; /// Maximum number of items that can be published in one operation. + /// Must not exceed `xcm::v5::MaxPublishItems`. #[pallet::constant] type MaxPublishItems: Get; /// Maximum length of a key in bytes. + /// Must not exceed `xcm::v5::MaxPublishKeyLength`. #[pallet::constant] type MaxKeyLength: Get; /// Maximum length of a value in bytes. + /// Must not exceed `xcm::v5::MaxPublishValueLength`. #[pallet::constant] type MaxValueLength: Get; @@ -168,6 +171,19 @@ pub mod pallet { "`well_known_keys::BROADCASTER_PUBLISHED_DATA_ROOTS` doesn't match key of `PublishedDataRoots`! \ Make sure that the name of the broadcaster pallet is `Broadcaster` in the runtime!", ); + + assert!( + T::MaxPublishItems::get() <= xcm::v5::MaxPublishItems::get(), + "Broadcaster MaxPublishItems exceeds XCM MaxPublishItems upper bound" + ); + assert!( + T::MaxKeyLength::get() <= xcm::v5::MaxPublishKeyLength::get(), + "Broadcaster MaxKeyLength exceeds XCM MaxPublishKeyLength upper bound" + ); + assert!( + T::MaxValueLength::get() <= xcm::v5::MaxPublishValueLength::get(), + "Broadcaster MaxValueLength exceeds XCM MaxPublishValueLength upper bound" + ); } } diff --git a/polkadot/xcm/src/v5/mod.rs b/polkadot/xcm/src/v5/mod.rs index 7725cc02dc7ae..31f33cdeec590 100644 --- a/polkadot/xcm/src/v5/mod.rs +++ b/polkadot/xcm/src/v5/mod.rs @@ -212,10 +212,11 @@ parameter_types! { pub MaxPalletsInfo: u32 = 64; pub MaxAssetTransferFilters: u32 = 6; pub MaxPublishItems: u32 = 16; + pub MaxPublishKeyLength: u32 = 256; + pub MaxPublishValueLength: u32 = 1024; } -/// Type alias for published data to avoid macro issues -pub type PublishData = BoundedVec<(Vec, Vec), MaxPublishItems>; +pub type PublishData = BoundedVec<(BoundedVec, BoundedVec), MaxPublishItems>; #[derive( Clone, Eq, PartialEq, Encode, Decode, DecodeWithMemTracking, Debug, TypeInfo, MaxEncodedLen, diff --git a/polkadot/xcm/xcm-builder/src/broadcast_adapter.rs b/polkadot/xcm/xcm-builder/src/broadcast_adapter.rs index 3f02a010696e1..2377a07593440 100644 --- a/polkadot/xcm/xcm-builder/src/broadcast_adapter.rs +++ b/polkadot/xcm/xcm-builder/src/broadcast_adapter.rs @@ -16,6 +16,7 @@ //! Adapters for broadcast/publish operations in XCM. +use alloc::vec::Vec; use core::marker::PhantomData; use frame_support::traits::Contains; use polkadot_primitives::Id as ParaId; @@ -46,7 +47,10 @@ where }; // Call the actual handler - let data_vec = data.into_inner(); + let data_vec: Vec<(Vec, Vec)> = data.into_inner() + .into_iter() + .map(|(k, v)| (k.into_inner(), v.into_inner())) + .collect(); Handler::publish_data(para_id, data_vec).map_err(|_| XcmError::Unimplemented) } @@ -109,8 +113,8 @@ mod tests { use super::*; use frame_support::parameter_types; use polkadot_runtime_parachains::broadcaster::publish; - use sp_runtime::bounded_vec; - use xcm::latest::{PublishData, Location, Junction}; + use sp_runtime::{bounded_vec, BoundedVec}; + use xcm::latest::{PublishData, Location, Junction, MaxPublishKeyLength, MaxPublishValueLength}; use xcm::latest::prelude::XcmError; // Mock handler that tracks calls @@ -119,6 +123,21 @@ mod tests { pub static SubscribeCalls: Vec<(ParaId, ParaId)> = vec![]; } + // Helper to create test publish data + fn test_publish_data(items: Vec<(&[u8], &[u8])>) -> PublishData { + items + .into_iter() + .map(|(k, v)| { + ( + BoundedVec::::try_from(k.to_vec()).unwrap(), + BoundedVec::::try_from(v.to_vec()).unwrap(), + ) + }) + .collect::>() + .try_into() + .unwrap() + } + struct MockPublishHandler; impl publish::Publish for MockPublishHandler { fn publish_data( @@ -146,9 +165,7 @@ mod tests { fn publish_from_direct_parachain_works() { PublishCalls::set(vec![]); let origin = Location::new(0, [Junction::Parachain(1000)]); - let data: PublishData = bounded_vec![ - (b"key1".to_vec(), b"value1".to_vec()), - ]; + let data = test_publish_data(vec![(b"key1", b"value1")]); let result = ParachainBroadcastAdapter::::handle_publish( &origin, @@ -159,16 +176,14 @@ mod tests { let calls = PublishCalls::get(); assert_eq!(calls.len(), 1); assert_eq!(calls[0].0, ParaId::from(1000)); - assert_eq!(calls[0].1, data.into_inner()); + assert_eq!(calls[0].1, vec![(b"key1".to_vec(), b"value1".to_vec())]); } #[test] fn publish_from_sibling_parachain_works() { PublishCalls::set(vec![]); let origin = Location::new(1, [Junction::Parachain(2000), Junction::AccountId32 { network: None, id: [1; 32] }]); - let data: PublishData = bounded_vec![ - (b"key1".to_vec(), b"value1".to_vec()), - ]; + let data = test_publish_data(vec![(b"key1", b"value1")]); let result = ParachainBroadcastAdapter::::handle_publish( &origin, @@ -184,11 +199,8 @@ mod tests { #[test] fn publish_from_non_parachain_fails() { PublishCalls::set(vec![]); - // Root origin let origin = Location::here(); - let data: PublishData = bounded_vec![ - (b"key1".to_vec(), b"value1".to_vec()), - ]; + let data = test_publish_data(vec![(b"key1", b"value1")]); let result = ParachainBroadcastAdapter::::handle_publish( &origin, @@ -202,11 +214,8 @@ mod tests { #[test] fn publish_rejected_by_filter() { PublishCalls::set(vec![]); - // Para 1000 not allowed by DirectParachainsOnly let origin = Location::new(1, [Junction::Parachain(1000)]); - let data: PublishData = bounded_vec![ - (b"key1".to_vec(), b"value1".to_vec()), - ]; + let data = test_publish_data(vec![(b"key1", b"value1")]); let result = ParachainBroadcastAdapter::::handle_publish( &origin, diff --git a/polkadot/xcm/xcm-builder/src/test_utils.rs b/polkadot/xcm/xcm-builder/src/test_utils.rs index 2cd7b4189cf73..21e8d6e294cfd 100644 --- a/polkadot/xcm/xcm-builder/src/test_utils.rs +++ b/polkadot/xcm/xcm-builder/src/test_utils.rs @@ -79,7 +79,10 @@ impl BroadcastHandler for TestBroadcastHandler { }; let mut published = PublishedData::get(); - let data_vec: Vec<(Vec, Vec)> = data.into_inner(); + let data_vec: Vec<(Vec, Vec)> = data.into_inner() + .into_iter() + .map(|(k, v)| (k.into_inner(), v.into_inner())) + .collect(); // Merge with existing data for this parachain published.entry(para_id).or_insert_with(Vec::new).extend(data_vec); diff --git a/polkadot/xcm/xcm-builder/src/tests/publish_subscribe.rs b/polkadot/xcm/xcm-builder/src/tests/publish_subscribe.rs index 79337617d9795..a7aa51a1a8e90 100644 --- a/polkadot/xcm/xcm-builder/src/tests/publish_subscribe.rs +++ b/polkadot/xcm/xcm-builder/src/tests/publish_subscribe.rs @@ -18,14 +18,30 @@ use super::*; use crate::test_utils::{BroadcastSubscriptions, PublishedData}; -use sp_runtime::bounded_vec; +use sp_runtime::BoundedVec; +use xcm::latest::{MaxPublishKeyLength, MaxPublishValueLength}; + +// Helper to create test publish data +fn test_publish_data(items: Vec<(&[u8], &[u8])>) -> PublishData { + items + .into_iter() + .map(|(k, v)| { + ( + BoundedVec::::try_from(k.to_vec()).unwrap(), + BoundedVec::::try_from(v.to_vec()).unwrap(), + ) + }) + .collect::>() + .try_into() + .unwrap() +} #[test] fn publish_from_parachain_works() { // Allow unpaid execution from Parachain(1000) AllowUnpaidFrom::set(vec![Parachain(1000).into()]); - let data: PublishData = bounded_vec![(b"key1".to_vec(), b"value1".to_vec()),]; + let data = test_publish_data(vec![(b"key1", b"value1")]); let message = Xcm::(vec![Publish { data: data.clone() }]); let mut hash = fake_message_hash(&message); @@ -52,7 +68,7 @@ fn publish_from_non_parachain_fails() { // Allow unpaid execution from Parent to test that origin validation happens AllowUnpaidFrom::set(vec![Parent.into()]); - let data: PublishData = bounded_vec![(b"key1".to_vec(), b"value1".to_vec()),]; + let data = test_publish_data(vec![(b"key1", b"value1")]); let message = Xcm::(vec![Publish { data }]); let mut hash = fake_message_hash(&message); @@ -81,7 +97,7 @@ fn publish_without_origin_fails() { // Allow unpaid execution from Parachain(1000) AllowUnpaidFrom::set(vec![Parachain(1000).into()]); - let data: PublishData = bounded_vec![(b"key1".to_vec(), b"value1".to_vec()),]; + let data = test_publish_data(vec![(b"key1", b"value1")]); let message = Xcm::(vec![ClearOrigin, Publish { data }]); let mut hash = fake_message_hash(&message); @@ -226,10 +242,10 @@ fn publish_multiple_items_works() { // Allow unpaid execution from Parachain(1000) AllowUnpaidFrom::set(vec![Parachain(1000).into()]); - let data: PublishData = bounded_vec![ - (b"key1".to_vec(), b"value1".to_vec()), - (b"key2".to_vec(), b"value2".to_vec()), - ]; + let data = test_publish_data(vec![ + (b"key1", b"value1"), + (b"key2", b"value2"), + ]); let message = Xcm::(vec![Publish { data: data.clone() }]); let mut hash = fake_message_hash(&message); From aec78c9cadc97f5112390a67e066ad6e1284a94c Mon Sep 17 00:00:00 2001 From: metricaez Date: Wed, 1 Oct 2025 14:42:13 -0300 Subject: [PATCH 092/128] feat: Publish and Sub XCMErrors --- polkadot/xcm/pallet-xcm/src/errors.rs | 8 + polkadot/xcm/src/v5/mod.rs | 190 +++++++++++------- polkadot/xcm/src/v5/traits.rs | 11 +- .../xcm/xcm-builder/src/broadcast_adapter.rs | 96 +++++---- 4 files changed, 183 insertions(+), 122 deletions(-) diff --git a/polkadot/xcm/pallet-xcm/src/errors.rs b/polkadot/xcm/pallet-xcm/src/errors.rs index 84e544c08748e..34b502d6985a1 100644 --- a/polkadot/xcm/pallet-xcm/src/errors.rs +++ b/polkadot/xcm/pallet-xcm/src/errors.rs @@ -136,6 +136,12 @@ pub enum ExecutionError { /// Too many assets matched the given asset filter. #[codec(index = 35)] TooManyAssets, + /// Publishing data failed. + #[codec(index = 36)] + PublishFailed, + /// Subscribing to a publisher failed. + #[codec(index = 37)] + SubscribeFailed, // Errors that happen prior to instructions being executed. These fall outside of the XCM // spec. /// XCM version not able to be handled. @@ -198,6 +204,8 @@ impl From for ExecutionError { XcmError::Unanchored => Self::Unanchored, XcmError::NotDepositable => Self::NotDepositable, XcmError::TooManyAssets => Self::TooManyAssets, + XcmError::PublishFailed => Self::PublishFailed, + XcmError::SubscribeFailed => Self::SubscribeFailed, XcmError::UnhandledXcmVersion => Self::UnhandledXcmVersion, XcmError::WeightLimitReached(_) => Self::WeightLimitReached, XcmError::Barrier => Self::Barrier, diff --git a/polkadot/xcm/src/v5/mod.rs b/polkadot/xcm/src/v5/mod.rs index 31f33cdeec590..9106c5eed60c7 100644 --- a/polkadot/xcm/src/v5/mod.rs +++ b/polkadot/xcm/src/v5/mod.rs @@ -216,7 +216,10 @@ parameter_types! { pub MaxPublishValueLength: u32 = 1024; } -pub type PublishData = BoundedVec<(BoundedVec, BoundedVec), MaxPublishItems>; +pub type PublishData = BoundedVec< + (BoundedVec, BoundedVec), + MaxPublishItems, +>; #[derive( Clone, Eq, PartialEq, Encode, Decode, DecodeWithMemTracking, Debug, TypeInfo, MaxEncodedLen, @@ -1159,11 +1162,10 @@ pub enum Instruction { /// Kind: *Command* /// /// Errors: + /// - NoPermission: If origin is not authorized by the configured filter /// - BadOrigin: If origin is not a valid parachain - /// - Overflow: If data exceeds bounds - Publish { - data: PublishData - }, + /// - PublishFailed: If the underlying handler fails (e.g., key/value too long, too many items) + Publish { data: PublishData }, /// Toggle subscription to a publisher parachain's data. /// @@ -1179,8 +1181,9 @@ pub enum Instruction { /// Kind: *Command* /// /// Errors: + /// - NoPermission: If origin is not authorized by the configured filter /// - BadOrigin: If origin is not a valid parachain - /// - TooManySubscriptions: If subscriber has reached maximum subscription limit + /// - SubscribeFailed: If the underlying handler fails (e.g., too many subscriptions) Subscribe { publisher: u32 }, } @@ -1222,24 +1225,30 @@ impl Instruction { WithdrawAsset(assets) => WithdrawAsset(assets), ReserveAssetDeposited(assets) => ReserveAssetDeposited(assets), ReceiveTeleportedAsset(assets) => ReceiveTeleportedAsset(assets), - QueryResponse { query_id, response, max_weight, querier } => - QueryResponse { query_id, response, max_weight, querier }, + QueryResponse { query_id, response, max_weight, querier } => { + QueryResponse { query_id, response, max_weight, querier } + }, TransferAsset { assets, beneficiary } => TransferAsset { assets, beneficiary }, - TransferReserveAsset { assets, dest, xcm } => - TransferReserveAsset { assets, dest, xcm }, - HrmpNewChannelOpenRequest { sender, max_message_size, max_capacity } => - HrmpNewChannelOpenRequest { sender, max_message_size, max_capacity }, + TransferReserveAsset { assets, dest, xcm } => { + TransferReserveAsset { assets, dest, xcm } + }, + HrmpNewChannelOpenRequest { sender, max_message_size, max_capacity } => { + HrmpNewChannelOpenRequest { sender, max_message_size, max_capacity } + }, HrmpChannelAccepted { recipient } => HrmpChannelAccepted { recipient }, - HrmpChannelClosing { initiator, sender, recipient } => - HrmpChannelClosing { initiator, sender, recipient }, - Transact { origin_kind, call, fallback_max_weight } => - Transact { origin_kind, call: call.into(), fallback_max_weight }, + HrmpChannelClosing { initiator, sender, recipient } => { + HrmpChannelClosing { initiator, sender, recipient } + }, + Transact { origin_kind, call, fallback_max_weight } => { + Transact { origin_kind, call: call.into(), fallback_max_weight } + }, ReportError(response_info) => ReportError(response_info), DepositAsset { assets, beneficiary } => DepositAsset { assets, beneficiary }, DepositReserveAsset { assets, dest, xcm } => DepositReserveAsset { assets, dest, xcm }, ExchangeAsset { give, want, maximal } => ExchangeAsset { give, want, maximal }, - InitiateReserveWithdraw { assets, reserve, xcm } => - InitiateReserveWithdraw { assets, reserve, xcm }, + InitiateReserveWithdraw { assets, reserve, xcm } => { + InitiateReserveWithdraw { assets, reserve, xcm } + }, InitiateTeleport { assets, dest, xcm } => InitiateTeleport { assets, dest, xcm }, ReportHolding { response_info, assets } => ReportHolding { response_info, assets }, BuyExecution { fees, weight_limit } => BuyExecution { fees, weight_limit }, @@ -1252,23 +1261,27 @@ impl Instruction { SetHints { hints } => SetHints { hints }, ClaimAsset { assets, ticket } => ClaimAsset { assets, ticket }, Trap(code) => Trap(code), - SubscribeVersion { query_id, max_response_weight } => - SubscribeVersion { query_id, max_response_weight }, + SubscribeVersion { query_id, max_response_weight } => { + SubscribeVersion { query_id, max_response_weight } + }, UnsubscribeVersion => UnsubscribeVersion, BurnAsset(assets) => BurnAsset(assets), ExpectAsset(assets) => ExpectAsset(assets), ExpectOrigin(origin) => ExpectOrigin(origin), ExpectError(error) => ExpectError(error), ExpectTransactStatus(transact_status) => ExpectTransactStatus(transact_status), - QueryPallet { module_name, response_info } => - QueryPallet { module_name, response_info }, - ExpectPallet { index, name, module_name, crate_major, min_crate_minor } => - ExpectPallet { index, name, module_name, crate_major, min_crate_minor }, + QueryPallet { module_name, response_info } => { + QueryPallet { module_name, response_info } + }, + ExpectPallet { index, name, module_name, crate_major, min_crate_minor } => { + ExpectPallet { index, name, module_name, crate_major, min_crate_minor } + }, ReportTransactStatus(response_info) => ReportTransactStatus(response_info), ClearTransactStatus => ClearTransactStatus, UniversalOrigin(j) => UniversalOrigin(j), - ExportMessage { network, destination, xcm } => - ExportMessage { network, destination, xcm }, + ExportMessage { network, destination, xcm } => { + ExportMessage { network, destination, xcm } + }, LockAsset { asset, unlocker } => LockAsset { asset, unlocker }, UnlockAsset { asset, target } => UnlockAsset { asset, target }, NoteUnlockable { asset, owner } => NoteUnlockable { asset, owner }, @@ -1277,13 +1290,16 @@ impl Instruction { SetTopic(topic) => SetTopic(topic), ClearTopic => ClearTopic, AliasOrigin(location) => AliasOrigin(location), - UnpaidExecution { weight_limit, check_origin } => - UnpaidExecution { weight_limit, check_origin }, + UnpaidExecution { weight_limit, check_origin } => { + UnpaidExecution { weight_limit, check_origin } + }, PayFees { asset } => PayFees { asset }, - InitiateTransfer { destination, remote_fees, preserve_origin, assets, remote_xcm } => - InitiateTransfer { destination, remote_fees, preserve_origin, assets, remote_xcm }, - ExecuteWithOrigin { descendant_origin, xcm } => - ExecuteWithOrigin { descendant_origin, xcm: xcm.into() }, + InitiateTransfer { destination, remote_fees, preserve_origin, assets, remote_xcm } => { + InitiateTransfer { destination, remote_fees, preserve_origin, assets, remote_xcm } + }, + ExecuteWithOrigin { descendant_origin, xcm } => { + ExecuteWithOrigin { descendant_origin, xcm: xcm.into() } + }, Publish { data } => Publish { data }, Subscribe { publisher } => Subscribe { publisher }, } @@ -1298,27 +1314,34 @@ impl> GetWeight for Instruction { WithdrawAsset(assets) => W::withdraw_asset(assets), ReserveAssetDeposited(assets) => W::reserve_asset_deposited(assets), ReceiveTeleportedAsset(assets) => W::receive_teleported_asset(assets), - QueryResponse { query_id, response, max_weight, querier } => - W::query_response(query_id, response, max_weight, querier), + QueryResponse { query_id, response, max_weight, querier } => { + W::query_response(query_id, response, max_weight, querier) + }, TransferAsset { assets, beneficiary } => W::transfer_asset(assets, beneficiary), - TransferReserveAsset { assets, dest, xcm } => - W::transfer_reserve_asset(&assets, dest, xcm), - Transact { origin_kind, fallback_max_weight, call } => - W::transact(origin_kind, fallback_max_weight, call), - HrmpNewChannelOpenRequest { sender, max_message_size, max_capacity } => - W::hrmp_new_channel_open_request(sender, max_message_size, max_capacity), + TransferReserveAsset { assets, dest, xcm } => { + W::transfer_reserve_asset(&assets, dest, xcm) + }, + Transact { origin_kind, fallback_max_weight, call } => { + W::transact(origin_kind, fallback_max_weight, call) + }, + HrmpNewChannelOpenRequest { sender, max_message_size, max_capacity } => { + W::hrmp_new_channel_open_request(sender, max_message_size, max_capacity) + }, HrmpChannelAccepted { recipient } => W::hrmp_channel_accepted(recipient), - HrmpChannelClosing { initiator, sender, recipient } => - W::hrmp_channel_closing(initiator, sender, recipient), + HrmpChannelClosing { initiator, sender, recipient } => { + W::hrmp_channel_closing(initiator, sender, recipient) + }, ClearOrigin => W::clear_origin(), DescendOrigin(who) => W::descend_origin(who), ReportError(response_info) => W::report_error(&response_info), DepositAsset { assets, beneficiary } => W::deposit_asset(assets, beneficiary), - DepositReserveAsset { assets, dest, xcm } => - W::deposit_reserve_asset(assets, dest, xcm), + DepositReserveAsset { assets, dest, xcm } => { + W::deposit_reserve_asset(assets, dest, xcm) + }, ExchangeAsset { give, want, maximal } => W::exchange_asset(give, want, maximal), - InitiateReserveWithdraw { assets, reserve, xcm } => - W::initiate_reserve_withdraw(assets, reserve, xcm), + InitiateReserveWithdraw { assets, reserve, xcm } => { + W::initiate_reserve_withdraw(assets, reserve, xcm) + }, InitiateTeleport { assets, dest, xcm } => W::initiate_teleport(assets, dest, xcm), ReportHolding { response_info, assets } => W::report_holding(&response_info, &assets), BuyExecution { fees, weight_limit } => W::buy_execution(fees, weight_limit), @@ -1329,23 +1352,27 @@ impl> GetWeight for Instruction { SetHints { hints } => W::set_hints(hints), ClaimAsset { assets, ticket } => W::claim_asset(assets, ticket), Trap(code) => W::trap(code), - SubscribeVersion { query_id, max_response_weight } => - W::subscribe_version(query_id, max_response_weight), + SubscribeVersion { query_id, max_response_weight } => { + W::subscribe_version(query_id, max_response_weight) + }, UnsubscribeVersion => W::unsubscribe_version(), BurnAsset(assets) => W::burn_asset(assets), ExpectAsset(assets) => W::expect_asset(assets), ExpectOrigin(origin) => W::expect_origin(origin), ExpectError(error) => W::expect_error(error), ExpectTransactStatus(transact_status) => W::expect_transact_status(transact_status), - QueryPallet { module_name, response_info } => - W::query_pallet(module_name, response_info), - ExpectPallet { index, name, module_name, crate_major, min_crate_minor } => - W::expect_pallet(index, name, module_name, crate_major, min_crate_minor), + QueryPallet { module_name, response_info } => { + W::query_pallet(module_name, response_info) + }, + ExpectPallet { index, name, module_name, crate_major, min_crate_minor } => { + W::expect_pallet(index, name, module_name, crate_major, min_crate_minor) + }, ReportTransactStatus(response_info) => W::report_transact_status(response_info), ClearTransactStatus => W::clear_transact_status(), UniversalOrigin(j) => W::universal_origin(j), - ExportMessage { network, destination, xcm } => - W::export_message(network, destination, xcm), + ExportMessage { network, destination, xcm } => { + W::export_message(network, destination, xcm) + }, LockAsset { asset, unlocker } => W::lock_asset(asset, unlocker), UnlockAsset { asset, target } => W::unlock_asset(asset, target), NoteUnlockable { asset, owner } => W::note_unlockable(asset, owner), @@ -1354,13 +1381,16 @@ impl> GetWeight for Instruction { SetTopic(topic) => W::set_topic(topic), ClearTopic => W::clear_topic(), AliasOrigin(location) => W::alias_origin(location), - UnpaidExecution { weight_limit, check_origin } => - W::unpaid_execution(weight_limit, check_origin), + UnpaidExecution { weight_limit, check_origin } => { + W::unpaid_execution(weight_limit, check_origin) + }, PayFees { asset } => W::pay_fees(asset), - InitiateTransfer { destination, remote_fees, preserve_origin, assets, remote_xcm } => - W::initiate_transfer(destination, remote_fees, preserve_origin, assets, remote_xcm), - ExecuteWithOrigin { descendant_origin, xcm } => - W::execute_with_origin(descendant_origin, xcm), + InitiateTransfer { destination, remote_fees, preserve_origin, assets, remote_xcm } => { + W::initiate_transfer(destination, remote_fees, preserve_origin, assets, remote_xcm) + }, + ExecuteWithOrigin { descendant_origin, xcm } => { + W::execute_with_origin(descendant_origin, xcm) + }, Publish { data } => W::publish(data), Subscribe { publisher } => W::subscribe(publisher), } @@ -1394,20 +1424,22 @@ impl TryFrom> for Instruction { WithdrawAsset(assets) => Self::WithdrawAsset(assets.try_into()?), ReserveAssetDeposited(assets) => Self::ReserveAssetDeposited(assets.try_into()?), ReceiveTeleportedAsset(assets) => Self::ReceiveTeleportedAsset(assets.try_into()?), - QueryResponse { query_id, response, max_weight, querier: Some(querier) } => + QueryResponse { query_id, response, max_weight, querier: Some(querier) } => { Self::QueryResponse { query_id, querier: querier.try_into()?, response: response.try_into()?, max_weight, - }, - QueryResponse { query_id, response, max_weight, querier: None } => + } + }, + QueryResponse { query_id, response, max_weight, querier: None } => { Self::QueryResponse { query_id, querier: None, response: response.try_into()?, max_weight, - }, + } + }, TransferAsset { assets, beneficiary } => Self::TransferAsset { assets: assets.try_into()?, beneficiary: beneficiary.try_into()?, @@ -1417,11 +1449,13 @@ impl TryFrom> for Instruction { dest: dest.try_into()?, xcm: xcm.try_into()?, }, - HrmpNewChannelOpenRequest { sender, max_message_size, max_capacity } => - Self::HrmpNewChannelOpenRequest { sender, max_message_size, max_capacity }, + HrmpNewChannelOpenRequest { sender, max_message_size, max_capacity } => { + Self::HrmpNewChannelOpenRequest { sender, max_message_size, max_capacity } + }, HrmpChannelAccepted { recipient } => Self::HrmpChannelAccepted { recipient }, - HrmpChannelClosing { initiator, sender, recipient } => - Self::HrmpChannelClosing { initiator, sender, recipient }, + HrmpChannelClosing { initiator, sender, recipient } => { + Self::HrmpChannelClosing { initiator, sender, recipient } + }, Transact { origin_kind, require_weight_at_most, call } => Self::Transact { origin_kind, call: call.into(), @@ -1485,8 +1519,9 @@ impl TryFrom> for Instruction { Self::ClaimAsset { assets, ticket } }, Trap(code) => Self::Trap(code), - SubscribeVersion { query_id, max_response_weight } => - Self::SubscribeVersion { query_id, max_response_weight }, + SubscribeVersion { query_id, max_response_weight } => { + Self::SubscribeVersion { query_id, max_response_weight } + }, UnsubscribeVersion => Self::UnsubscribeVersion, BurnAsset(assets) => Self::BurnAsset(assets.try_into()?), ExpectAsset(assets) => Self::ExpectAsset(assets.try_into()?), @@ -1505,13 +1540,16 @@ impl TryFrom> for Instruction { module_name, response_info: response_info.try_into().map_err(|_| ())?, }, - ExpectPallet { index, name, module_name, crate_major, min_crate_minor } => - Self::ExpectPallet { index, name, module_name, crate_major, min_crate_minor }, - ReportTransactStatus(response_info) => - Self::ReportTransactStatus(response_info.try_into().map_err(|_| ())?), + ExpectPallet { index, name, module_name, crate_major, min_crate_minor } => { + Self::ExpectPallet { index, name, module_name, crate_major, min_crate_minor } + }, + ReportTransactStatus(response_info) => { + Self::ReportTransactStatus(response_info.try_into().map_err(|_| ())?) + }, ClearTransactStatus => Self::ClearTransactStatus, - UniversalOrigin(junction) => - Self::UniversalOrigin(junction.try_into().map_err(|_| ())?), + UniversalOrigin(junction) => { + Self::UniversalOrigin(junction.try_into().map_err(|_| ())?) + }, ExportMessage { network, destination, xcm } => Self::ExportMessage { network: network.into(), destination: destination.try_into().map_err(|_| ())?, diff --git a/polkadot/xcm/src/v5/traits.rs b/polkadot/xcm/src/v5/traits.rs index 7a8da3441402e..5b87c60a1392e 100644 --- a/polkadot/xcm/src/v5/traits.rs +++ b/polkadot/xcm/src/v5/traits.rs @@ -143,6 +143,12 @@ pub enum Error { /// Too many assets matched the given asset filter. #[codec(index = 35)] TooManyAssets, + /// Publishing data failed. + #[codec(index = 36)] + PublishFailed, + /// Subscribing to a publisher failed. + #[codec(index = 37)] + SubscribeFailed, // Errors that happen prior to instructions being executed. These fall outside of the XCM // spec. @@ -227,8 +233,9 @@ impl MaxEncodedLen for Error { impl From for Error { fn from(e: SendError) -> Self { match e { - SendError::NotApplicable | SendError::Unroutable | SendError::MissingArgument => - Error::Unroutable, + SendError::NotApplicable | SendError::Unroutable | SendError::MissingArgument => { + Error::Unroutable + }, SendError::Transport(s) => Error::Transport(s), SendError::DestinationUnsupported => Error::DestinationUnsupported, SendError::ExceedsMaxMessageSize => Error::ExceedsMaxMessageSize, diff --git a/polkadot/xcm/xcm-builder/src/broadcast_adapter.rs b/polkadot/xcm/xcm-builder/src/broadcast_adapter.rs index 2377a07593440..7555c6ae024b0 100644 --- a/polkadot/xcm/xcm-builder/src/broadcast_adapter.rs +++ b/polkadot/xcm/xcm-builder/src/broadcast_adapter.rs @@ -21,8 +21,8 @@ use core::marker::PhantomData; use frame_support::traits::Contains; use polkadot_primitives::Id as ParaId; use polkadot_runtime_parachains::broadcaster::publish; -use xcm::latest::{Junction, Location, PublishData, Result as XcmResult}; use xcm::latest::prelude::XcmError; +use xcm::latest::{Junction, Location, PublishData, Result as XcmResult}; use xcm_executor::traits::BroadcastHandler; /// Configurable broadcast adapter that validates parachain origins. @@ -41,17 +41,18 @@ where // Extract parachain ID from authorized origin let para_id = match origin.unpack() { - (0, [Junction::Parachain(id)]) => ParaId::from(*id), // Direct parachain - (1, [Junction::Parachain(id), ..]) => ParaId::from(*id), // Sibling parachain - _ => return Err(XcmError::BadOrigin), // Should be caught by filter + (0, [Junction::Parachain(id)]) => ParaId::from(*id), // Direct parachain + (1, [Junction::Parachain(id), ..]) => ParaId::from(*id), // Sibling parachain + _ => return Err(XcmError::BadOrigin), // Should be caught by filter }; // Call the actual handler - let data_vec: Vec<(Vec, Vec)> = data.into_inner() + let data_vec: Vec<(Vec, Vec)> = data + .into_inner() .into_iter() .map(|(k, v)| (k.into_inner(), v.into_inner())) .collect(); - Handler::publish_data(para_id, data_vec).map_err(|_| XcmError::Unimplemented) + Handler::publish_data(para_id, data_vec).map_err(|_| XcmError::PublishFailed) } fn handle_subscribe(origin: &Location, publisher: u32) -> XcmResult { @@ -62,19 +63,19 @@ where // Extract subscriber parachain ID from authorized origin let subscriber_id = match origin.unpack() { - (0, [Junction::Parachain(id)]) => ParaId::from(*id), // Direct parachain - (1, [Junction::Parachain(id), ..]) => ParaId::from(*id), // Sibling parachain - _ => return Err(XcmError::BadOrigin), // Should be caught by filter + (0, [Junction::Parachain(id)]) => ParaId::from(*id), // Direct parachain + (1, [Junction::Parachain(id), ..]) => ParaId::from(*id), // Sibling parachain + _ => return Err(XcmError::BadOrigin), // Should be caught by filter }; let publisher_id = ParaId::from(publisher); // Call the handler for subscribe toggle - Handler::toggle_subscription(subscriber_id, publisher_id).map_err(|_| XcmError::Unimplemented) + Handler::toggle_subscription(subscriber_id, publisher_id) + .map_err(|_| XcmError::SubscribeFailed) } } - /// Allows only direct parachains (parents=0, interior=[Parachain(_)]). pub struct DirectParachainsOnly; impl Contains for DirectParachainsOnly { @@ -83,14 +84,11 @@ impl Contains for DirectParachainsOnly { } } -/// Allows both direct and sibling parachains. +/// Allows both direct and sibling parachains. pub struct AllParachains; impl Contains for AllParachains { fn contains(origin: &Location) -> bool { - matches!( - origin.unpack(), - (0, [Junction::Parachain(_)]) | (1, [Junction::Parachain(_), ..]) - ) + matches!(origin.unpack(), (0, [Junction::Parachain(_)]) | (1, [Junction::Parachain(_), ..])) } } @@ -113,9 +111,11 @@ mod tests { use super::*; use frame_support::parameter_types; use polkadot_runtime_parachains::broadcaster::publish; - use sp_runtime::{bounded_vec, BoundedVec}; - use xcm::latest::{PublishData, Location, Junction, MaxPublishKeyLength, MaxPublishValueLength}; + use sp_runtime::BoundedVec; use xcm::latest::prelude::XcmError; + use xcm::latest::{ + Junction, Location, MaxPublishKeyLength, MaxPublishValueLength, PublishData, + }; // Mock handler that tracks calls parameter_types! { @@ -182,7 +182,10 @@ mod tests { #[test] fn publish_from_sibling_parachain_works() { PublishCalls::set(vec![]); - let origin = Location::new(1, [Junction::Parachain(2000), Junction::AccountId32 { network: None, id: [1; 32] }]); + let origin = Location::new( + 1, + [Junction::Parachain(2000), Junction::AccountId32 { network: None, id: [1; 32] }], + ); let data = test_publish_data(vec![(b"key1", b"value1")]); let result = ParachainBroadcastAdapter::::handle_publish( @@ -203,8 +206,7 @@ mod tests { let data = test_publish_data(vec![(b"key1", b"value1")]); let result = ParachainBroadcastAdapter::::handle_publish( - &origin, - data, + &origin, data, ); assert!(matches!(result, Err(XcmError::NoPermission))); @@ -217,10 +219,10 @@ mod tests { let origin = Location::new(1, [Junction::Parachain(1000)]); let data = test_publish_data(vec![(b"key1", b"value1")]); - let result = ParachainBroadcastAdapter::::handle_publish( - &origin, - data, - ); + let result = + ParachainBroadcastAdapter::::handle_publish( + &origin, data, + ); assert!(matches!(result, Err(XcmError::NoPermission))); assert!(PublishCalls::get().is_empty()); @@ -232,10 +234,10 @@ mod tests { let origin = Location::new(0, [Junction::Parachain(1000)]); let publisher = 2000; - let result = ParachainBroadcastAdapter::::handle_subscribe( - &origin, - publisher, - ); + let result = + ParachainBroadcastAdapter::::handle_subscribe( + &origin, publisher, + ); assert!(result.is_ok()); let calls = SubscribeCalls::get(); @@ -246,13 +248,16 @@ mod tests { #[test] fn subscribe_from_sibling_parachain_works() { SubscribeCalls::set(vec![]); - let origin = Location::new(1, [Junction::Parachain(3000), Junction::AccountId32 { network: None, id: [1; 32] }]); + let origin = Location::new( + 1, + [Junction::Parachain(3000), Junction::AccountId32 { network: None, id: [1; 32] }], + ); let publisher = 2000; - let result = ParachainBroadcastAdapter::::handle_subscribe( - &origin, - publisher, - ); + let result = + ParachainBroadcastAdapter::::handle_subscribe( + &origin, publisher, + ); assert!(result.is_ok()); let calls = SubscribeCalls::get(); @@ -266,10 +271,10 @@ mod tests { let origin = Location::here(); let publisher = 2000; - let result = ParachainBroadcastAdapter::::handle_subscribe( - &origin, - publisher, - ); + let result = + ParachainBroadcastAdapter::::handle_subscribe( + &origin, publisher, + ); assert!(matches!(result, Err(XcmError::NoPermission))); assert!(SubscribeCalls::get().is_empty()); @@ -281,10 +286,10 @@ mod tests { let origin = Location::new(1, [Junction::Parachain(1000)]); let publisher = 2000; - let result = ParachainBroadcastAdapter::::handle_subscribe( - &origin, - publisher, - ); + let result = + ParachainBroadcastAdapter::::handle_subscribe( + &origin, publisher, + ); assert!(matches!(result, Err(XcmError::NoPermission))); assert!(SubscribeCalls::get().is_empty()); @@ -308,7 +313,10 @@ mod tests { assert!(AllParachains::contains(&Location::new(0, [Junction::Parachain(1000)]))); // Sibling parachain allowed - assert!(AllParachains::contains(&Location::new(1, [Junction::Parachain(2000), Junction::AccountId32 { network: None, id: [1; 32] }]))); + assert!(AllParachains::contains(&Location::new( + 1, + [Junction::Parachain(2000), Junction::AccountId32 { network: None, id: [1; 32] }] + ))); // Root not allowed assert!(!AllParachains::contains(&Location::here())); @@ -330,4 +338,4 @@ mod tests { // Root not allowed assert!(!TestFilter::contains(&Location::here())); } -} \ No newline at end of file +} From b7824986a6fc596936dfd09e8ebf25b80850509b Mon Sep 17 00:00:00 2001 From: metricaez Date: Wed, 1 Oct 2025 15:34:18 -0300 Subject: [PATCH 093/128] feat: benchmark first approach --- .../src/fungible/mock.rs | 1 + .../src/generic/benchmarking.rs | 53 +++++++++++++++++++ .../pallet-xcm-benchmarks/src/generic/mock.rs | 1 + 3 files changed, 55 insertions(+) diff --git a/polkadot/xcm/pallet-xcm-benchmarks/src/fungible/mock.rs b/polkadot/xcm/pallet-xcm-benchmarks/src/fungible/mock.rs index 9e06550b6b724..dc4c14e2f6432 100644 --- a/polkadot/xcm/pallet-xcm-benchmarks/src/fungible/mock.rs +++ b/polkadot/xcm/pallet-xcm-benchmarks/src/fungible/mock.rs @@ -122,6 +122,7 @@ impl xcm_executor::Config for XcmConfig { type HrmpChannelAcceptedHandler = (); type HrmpChannelClosingHandler = (); type XcmRecorder = (); + type BroadcastHandler = (); } impl crate::Config for Test { diff --git a/polkadot/xcm/pallet-xcm-benchmarks/src/generic/benchmarking.rs b/polkadot/xcm/pallet-xcm-benchmarks/src/generic/benchmarking.rs index aefbada7429dd..3ea04c2e011ff 100644 --- a/polkadot/xcm/pallet-xcm-benchmarks/src/generic/benchmarking.rs +++ b/polkadot/xcm/pallet-xcm-benchmarks/src/generic/benchmarking.rs @@ -961,6 +961,59 @@ mod benchmarks { Ok(()) } + #[benchmark] + fn publish(n: Linear<1, { MaxPublishItems::get() }>) -> Result<(), BenchmarkError> { + use xcm::latest::{MaxPublishKeyLength, MaxPublishValueLength}; + + // The `Publish` instruction weight scales with the number of items published. + // Each item is benchmarked at maximum key and value lengths to represent worst-case + // storage operations. The actual weight formula will be `base_weight + n * per_item_weight`. + let max_key_len = MaxPublishKeyLength::get() as usize; + let max_value_len = MaxPublishValueLength::get() as usize; + + // Create publish data: n items, each with maximum key and value length + let data_vec: Vec<_> = (0..n) + .map(|i| { + ( + BoundedVec::try_from(vec![i as u8; max_key_len]).unwrap(), + BoundedVec::try_from(vec![i as u8; max_value_len]).unwrap(), + ) + }) + .collect(); + + let data = BoundedVec::try_from(data_vec).unwrap(); + + let origin = Location::new(0, [Junction::Parachain(1000)]); + let mut executor = new_executor::(origin); + + let instruction = Instruction::Publish { data }; + let xcm = Xcm(vec![instruction]); + + #[block] + { + executor.bench_process(xcm)?; + } + + Ok(()) + } + + #[benchmark] + fn subscribe() -> Result<(), BenchmarkError> { + let origin = Location::new(0, [Junction::Parachain(1000)]); + let mut executor = new_executor::(origin); + + let publisher = 2000u32; + let instruction = Instruction::Subscribe { publisher }; + let xcm = Xcm(vec![instruction]); + + #[block] + { + executor.bench_process(xcm)?; + } + + Ok(()) + } + impl_benchmark_test_suite!( Pallet, crate::generic::mock::new_test_ext(), diff --git a/polkadot/xcm/pallet-xcm-benchmarks/src/generic/mock.rs b/polkadot/xcm/pallet-xcm-benchmarks/src/generic/mock.rs index 6368ca0e9c3f5..cfcc26f68f141 100644 --- a/polkadot/xcm/pallet-xcm-benchmarks/src/generic/mock.rs +++ b/polkadot/xcm/pallet-xcm-benchmarks/src/generic/mock.rs @@ -112,6 +112,7 @@ impl xcm_executor::Config for XcmConfig { type HrmpChannelAcceptedHandler = (); type HrmpChannelClosingHandler = (); type XcmRecorder = (); + type BroadcastHandler = (); } parameter_types! { From 6a2f6d602d73d11f629c3b282dd64664fba7ff8e Mon Sep 17 00:00:00 2001 From: metricaez Date: Thu, 2 Oct 2025 10:29:17 -0300 Subject: [PATCH 094/128] feat: benchmarks and proper weights for rococo --- polkadot/runtime/rococo/src/lib.rs | 11 +- .../runtime/rococo/src/weights/xcm/mod.rs | 8 +- .../xcm/pallet_xcm_benchmarks_generic.rs | 324 ++++++++++++------ .../src/generic/benchmarking.rs | 8 +- .../pallet-xcm-benchmarks/src/generic/mock.rs | 8 + .../pallet-xcm-benchmarks/src/generic/mod.rs | 16 + pubsub-dev/benchmark_xcm_generic.sh | 46 +++ 7 files changed, 298 insertions(+), 123 deletions(-) create mode 100755 pubsub-dev/benchmark_xcm_generic.sh diff --git a/polkadot/runtime/rococo/src/lib.rs b/polkadot/runtime/rococo/src/lib.rs index 54a6d19dd299b..17bfa453f6520 100644 --- a/polkadot/runtime/rococo/src/lib.rs +++ b/polkadot/runtime/rococo/src/lib.rs @@ -1224,7 +1224,7 @@ impl parachains_slashing::Config for Runtime { } parameter_types! { - pub const MaxPublishItems: u32 = 100; + pub const MaxPublishItems: u32 = 16; pub const MaxKeyLength: u32 = 256; pub const MaxValueLength: u32 = 1024; pub const MaxSubscriptions: u32 = 100; @@ -2700,6 +2700,15 @@ sp_api::impl_runtime_apis! { // The XCM executor of Rococo doesn't have a configured `Aliasers` Err(BenchmarkError::Skip) } + + fn publish_origin() -> Result { + Ok(AssetHub::get()) + } + + fn valid_publisher() -> Result { + // Use Asset Hub's parachain ID as the publisher + Ok(rococo_runtime_constants::system_parachain::ASSET_HUB_ID) + } } let mut whitelist: Vec = AllPalletsWithSystem::whitelisted_storage_keys(); diff --git a/polkadot/runtime/rococo/src/weights/xcm/mod.rs b/polkadot/runtime/rococo/src/weights/xcm/mod.rs index c5292d6f1092c..fb17db491bc27 100644 --- a/polkadot/runtime/rococo/src/weights/xcm/mod.rs +++ b/polkadot/runtime/rococo/src/weights/xcm/mod.rs @@ -307,14 +307,10 @@ impl XcmWeightInfo for RococoXcmWeight { XcmGeneric::::execute_with_origin() } fn publish(data: &PublishData) -> Weight { - // TODO: Benchmark - let base_weight = Weight::from_parts(1_000_000, 64); - let per_item_weight = Weight::from_parts(100_000, 32); - base_weight.saturating_add(per_item_weight.saturating_mul(data.len() as u64)) + XcmGeneric::::publish(data.len() as u32) } fn subscribe(_: &u32) -> Weight { - // TODO: Benchmark - Weight::from_parts(10_000_000, 0) + XcmGeneric::::subscribe() } } diff --git a/polkadot/runtime/rococo/src/weights/xcm/pallet_xcm_benchmarks_generic.rs b/polkadot/runtime/rococo/src/weights/xcm/pallet_xcm_benchmarks_generic.rs index 4268ce5612f52..acb82f1418945 100644 --- a/polkadot/runtime/rococo/src/weights/xcm/pallet_xcm_benchmarks_generic.rs +++ b/polkadot/runtime/rococo/src/weights/xcm/pallet_xcm_benchmarks_generic.rs @@ -16,30 +16,30 @@ //! Autogenerated weights for `pallet_xcm_benchmarks::generic` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0 -//! DATE: 2025-02-21, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 49.1.0 +//! DATE: 2025-10-01, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `d3a9aad6f7a3`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz` -//! WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024 +//! HOSTNAME: `192.168.1.3`, CPU: `` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("rococo-local")`, DB CACHE: 1024 // Executed Command: -// frame-omni-bencher -// v1 +// ./target/release/polkadot // benchmark // pallet -// --extrinsic=* -// --runtime=target/production/wbuild/rococo-runtime/rococo_runtime.wasm -// --pallet=pallet_xcm_benchmarks::generic -// --header=/__w/polkadot-sdk/polkadot-sdk/polkadot/file_header.txt -// --output=./polkadot/runtime/rococo/src/weights/xcm -// --wasm-execution=compiled -// --steps=50 -// --repeat=20 -// --heap-pages=4096 -// --template=polkadot/xcm/pallet-xcm-benchmarks/template.hbs -// --no-storage-info -// --no-min-squares -// --no-median-slopes +// --chain +// rococo-local +// --pallets +// pallet_xcm_benchmarks::generic +// --extrinsic +// * +// --steps +// 50 +// --repeat +// 20 +// --output +// ./polkadot/runtime/rococo/src/weights/xcm/pallet_xcm_benchmarks_generic.rs +// --header +// ./polkadot/file_header.txt #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] @@ -64,101 +64,116 @@ impl WeightInfo { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `Dmp::DownwardMessageQueueHeads` (r:1 w:1) /// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `max_size`: None, mode: `Measured`) - pub(crate) fn report_holding() -> Weight { + pub fn report_holding() -> Weight { // Proof Size summary in bytes: // Measured: `346` // Estimated: `3811` - // Minimum execution time: 75_713_000 picoseconds. - Weight::from_parts(78_677_000, 3811) + // Minimum execution time: 56_000_000 picoseconds. + Weight::from_parts(57_000_000, 0) + .saturating_add(Weight::from_parts(0, 3811)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } - pub(crate) fn buy_execution() -> Weight { + pub fn buy_execution() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 722_000 picoseconds. - Weight::from_parts(778_000, 0) + // Minimum execution time: 2_000_000 picoseconds. + Weight::from_parts(3_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } - pub(crate) fn pay_fees() -> Weight { + pub fn pay_fees() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_357_000 picoseconds. - Weight::from_parts(3_532_000, 0) + // Minimum execution time: 2_000_000 picoseconds. + Weight::from_parts(3_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } - pub(crate) fn asset_claimer() -> Weight { + pub fn asset_claimer() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 774_000 picoseconds. - Weight::from_parts(813_000, 0) + // Minimum execution time: 0_000 picoseconds. + Weight::from_parts(1_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `XcmPallet::Queries` (r:1 w:0) /// Proof: `XcmPallet::Queries` (`max_values`: None, `max_size`: None, mode: `Measured`) - pub(crate) fn query_response() -> Weight { + pub fn query_response() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3465` - // Minimum execution time: 6_069_000 picoseconds. - Weight::from_parts(6_386_000, 3465) + // Minimum execution time: 4_000_000 picoseconds. + Weight::from_parts(4_000_000, 0) + .saturating_add(Weight::from_parts(0, 3465)) .saturating_add(T::DbWeight::get().reads(1)) } - pub(crate) fn transact() -> Weight { + pub fn transact() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 7_635_000 picoseconds. - Weight::from_parts(8_175_000, 0) + // Minimum execution time: 5_000_000 picoseconds. + Weight::from_parts(5_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } - pub(crate) fn refund_surplus() -> Weight { + pub fn refund_surplus() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_329_000 picoseconds. - Weight::from_parts(1_408_000, 0) + // Minimum execution time: 0_000 picoseconds. + Weight::from_parts(1_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } - pub(crate) fn set_error_handler() -> Weight { + pub fn set_error_handler() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 732_000 picoseconds. - Weight::from_parts(787_000, 0) + // Minimum execution time: 0_000 picoseconds. + Weight::from_parts(1_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } - pub(crate) fn set_appendix() -> Weight { + pub fn set_appendix() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 718_000 picoseconds. - Weight::from_parts(780_000, 0) + // Minimum execution time: 0_000 picoseconds. + Weight::from_parts(1_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } - pub(crate) fn clear_error() -> Weight { + pub fn clear_error() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 719_000 picoseconds. - Weight::from_parts(754_000, 0) + // Minimum execution time: 0_000 picoseconds. + Weight::from_parts(1_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } - pub(crate) fn descend_origin() -> Weight { + pub fn descend_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 740_000 picoseconds. - Weight::from_parts(837_000, 0) + // Minimum execution time: 0_000 picoseconds. + Weight::from_parts(0, 0) + .saturating_add(Weight::from_parts(0, 0)) } - pub(crate) fn execute_with_origin() -> Weight { + /// Storage: `Benchmark::Override` (r:0 w:0) + /// Proof: `Benchmark::Override` (`max_values`: None, `max_size`: None, mode: `Measured`) + pub fn execute_with_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 791_000 picoseconds. - Weight::from_parts(865_000, 0) + // Minimum execution time: 18_446_744_073_709_551_000 picoseconds. + Weight::from_parts(18_446_744_073_709_551_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } - pub(crate) fn clear_origin() -> Weight { + pub fn clear_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 706_000 picoseconds. - Weight::from_parts(777_000, 0) + // Minimum execution time: 0_000 picoseconds. + Weight::from_parts(0, 0) + .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `Dmp::DeliveryFeeFactor` (r:1 w:0) /// Proof: `Dmp::DeliveryFeeFactor` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -172,32 +187,35 @@ impl WeightInfo { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `Dmp::DownwardMessageQueueHeads` (r:1 w:1) /// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `max_size`: None, mode: `Measured`) - pub(crate) fn report_error() -> Weight { + pub fn report_error() -> Weight { // Proof Size summary in bytes: // Measured: `346` // Estimated: `3811` - // Minimum execution time: 72_746_000 picoseconds. - Weight::from_parts(76_021_000, 3811) + // Minimum execution time: 54_000_000 picoseconds. + Weight::from_parts(55_000_000, 0) + .saturating_add(Weight::from_parts(0, 3811)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } /// Storage: `XcmPallet::AssetTraps` (r:1 w:1) /// Proof: `XcmPallet::AssetTraps` (`max_values`: None, `max_size`: None, mode: `Measured`) - pub(crate) fn claim_asset() -> Weight { + pub fn claim_asset() -> Weight { // Proof Size summary in bytes: // Measured: `23` // Estimated: `3488` - // Minimum execution time: 9_752_000 picoseconds. - Weight::from_parts(10_165_000, 3488) + // Minimum execution time: 6_000_000 picoseconds. + Weight::from_parts(7_000_000, 0) + .saturating_add(Weight::from_parts(0, 3488)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - pub(crate) fn trap() -> Weight { + pub fn trap() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 671_000 picoseconds. - Weight::from_parts(758_000, 0) + // Minimum execution time: 2_000_000 picoseconds. + Weight::from_parts(3_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `XcmPallet::VersionNotifyTargets` (r:1 w:1) /// Proof: `XcmPallet::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -211,59 +229,66 @@ impl WeightInfo { /// Proof: `Paras::Heads` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `Dmp::DownwardMessageQueueHeads` (r:1 w:1) /// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `max_size`: None, mode: `Measured`) - pub(crate) fn subscribe_version() -> Weight { + pub fn subscribe_version() -> Weight { // Proof Size summary in bytes: // Measured: `245` // Estimated: `3710` - // Minimum execution time: 38_093_000 picoseconds. - Weight::from_parts(39_825_000, 3710) + // Minimum execution time: 26_000_000 picoseconds. + Weight::from_parts(27_000_000, 0) + .saturating_add(Weight::from_parts(0, 3710)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } /// Storage: `XcmPallet::VersionNotifyTargets` (r:0 w:1) /// Proof: `XcmPallet::VersionNotifyTargets` (`max_values`: None, `max_size`: None, mode: `Measured`) - pub(crate) fn unsubscribe_version() -> Weight { + pub fn unsubscribe_version() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_159_000 picoseconds. - Weight::from_parts(3_456_000, 0) + // Minimum execution time: 2_000_000 picoseconds. + Weight::from_parts(2_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } - pub(crate) fn burn_asset() -> Weight { + pub fn burn_asset() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_097_000 picoseconds. - Weight::from_parts(1_201_000, 0) + // Minimum execution time: 0_000 picoseconds. + Weight::from_parts(1_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } - pub(crate) fn expect_asset() -> Weight { + pub fn expect_asset() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 842_000 picoseconds. - Weight::from_parts(909_000, 0) + // Minimum execution time: 0_000 picoseconds. + Weight::from_parts(0, 0) + .saturating_add(Weight::from_parts(0, 0)) } - pub(crate) fn expect_origin() -> Weight { + pub fn expect_origin() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 694_000 picoseconds. - Weight::from_parts(765_000, 0) + // Minimum execution time: 2_000_000 picoseconds. + Weight::from_parts(3_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } - pub(crate) fn expect_error() -> Weight { + pub fn expect_error() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 707_000 picoseconds. - Weight::from_parts(744_000, 0) + // Minimum execution time: 2_000_000 picoseconds. + Weight::from_parts(3_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } - pub(crate) fn expect_transact_status() -> Weight { + pub fn expect_transact_status() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 880_000 picoseconds. - Weight::from_parts(976_000, 0) + // Minimum execution time: 0_000 picoseconds. + Weight::from_parts(1_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `Dmp::DeliveryFeeFactor` (r:1 w:0) /// Proof: `Dmp::DeliveryFeeFactor` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -277,21 +302,23 @@ impl WeightInfo { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `Dmp::DownwardMessageQueueHeads` (r:1 w:1) /// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `max_size`: None, mode: `Measured`) - pub(crate) fn query_pallet() -> Weight { + pub fn query_pallet() -> Weight { // Proof Size summary in bytes: // Measured: `346` // Estimated: `3811` - // Minimum execution time: 85_577_000 picoseconds. - Weight::from_parts(87_984_000, 3811) + // Minimum execution time: 64_000_000 picoseconds. + Weight::from_parts(65_000_000, 0) + .saturating_add(Weight::from_parts(0, 3811)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } - pub(crate) fn expect_pallet() -> Weight { + pub fn expect_pallet() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 9_176_000 picoseconds. - Weight::from_parts(9_545_000, 0) + // Minimum execution time: 7_000_000 picoseconds. + Weight::from_parts(7_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `Dmp::DeliveryFeeFactor` (r:1 w:0) /// Proof: `Dmp::DeliveryFeeFactor` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -305,48 +332,121 @@ impl WeightInfo { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// Storage: `Dmp::DownwardMessageQueueHeads` (r:1 w:1) /// Proof: `Dmp::DownwardMessageQueueHeads` (`max_values`: None, `max_size`: None, mode: `Measured`) - pub(crate) fn report_transact_status() -> Weight { + pub fn report_transact_status() -> Weight { // Proof Size summary in bytes: // Measured: `346` // Estimated: `3811` - // Minimum execution time: 74_596_000 picoseconds. - Weight::from_parts(76_130_000, 3811) + // Minimum execution time: 55_000_000 picoseconds. + Weight::from_parts(57_000_000, 0) + .saturating_add(Weight::from_parts(0, 3811)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } - pub(crate) fn clear_transact_status() -> Weight { + pub fn clear_transact_status() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 759_000 picoseconds. - Weight::from_parts(821_000, 0) + // Minimum execution time: 0_000 picoseconds. + Weight::from_parts(1_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } - pub(crate) fn set_topic() -> Weight { + pub fn set_topic() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 712_000 picoseconds. - Weight::from_parts(747_000, 0) + // Minimum execution time: 0_000 picoseconds. + Weight::from_parts(1_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } - pub(crate) fn clear_topic() -> Weight { + pub fn clear_topic() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 694_000 picoseconds. - Weight::from_parts(743_000, 0) + // Minimum execution time: 0_000 picoseconds. + Weight::from_parts(1_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } - pub(crate) fn set_fees_mode() -> Weight { + pub fn set_fees_mode() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 682_000 picoseconds. - Weight::from_parts(764_000, 0) + // Minimum execution time: 0_000 picoseconds. + Weight::from_parts(1_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) } - pub(crate) fn unpaid_execution() -> Weight { + pub fn unpaid_execution() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 766_000 picoseconds. - Weight::from_parts(807_000, 0) + // Minimum execution time: 0_000 picoseconds. + Weight::from_parts(1_000_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + /// Storage: `Broadcaster::PublisherExists` (r:1 w:1) + /// Proof: `Broadcaster::PublisherExists` (`max_values`: None, `max_size`: Some(21), added: 2496, mode: `MaxEncodedLen`) + /// Storage: `Broadcaster::PublishedKeys` (r:1 w:1) + /// Proof: `Broadcaster::PublishedKeys` (`max_values`: None, `max_size`: Some(25822), added: 28297, mode: `MaxEncodedLen`) + /// Storage: `Broadcaster::PublishedDataRoots` (r:1 w:1) + /// Proof: `Broadcaster::PublishedDataRoots` (`max_values`: Some(1), `max_size`: Some(37002), added: 37497, mode: `MaxEncodedLen`) + /// Storage: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a707562737562e80300` (r:0 w:1) + /// Proof: UNKNOWN KEY `0x3a6368696c645f73746f726167653a64656661756c743a707562737562e80300` (r:0 w:1) + /// Storage: UNKNOWN KEY `0x0000000000000000000000000000000000000000000000000000000000000000` (r:0 w:1) + /// Proof: UNKNOWN KEY `0x0000000000000000000000000000000000000000000000000000000000000000` (r:0 w:1) + /// Storage: UNKNOWN KEY `0x0101010101010101010101010101010101010101010101010101010101010101` (r:0 w:1) + /// Proof: UNKNOWN KEY `0x0101010101010101010101010101010101010101010101010101010101010101` (r:0 w:1) + /// Storage: UNKNOWN KEY `0x0202020202020202020202020202020202020202020202020202020202020202` (r:0 w:1) + /// Proof: UNKNOWN KEY `0x0202020202020202020202020202020202020202020202020202020202020202` (r:0 w:1) + /// Storage: UNKNOWN KEY `0x0303030303030303030303030303030303030303030303030303030303030303` (r:0 w:1) + /// Proof: UNKNOWN KEY `0x0303030303030303030303030303030303030303030303030303030303030303` (r:0 w:1) + /// Storage: UNKNOWN KEY `0x0404040404040404040404040404040404040404040404040404040404040404` (r:0 w:1) + /// Proof: UNKNOWN KEY `0x0404040404040404040404040404040404040404040404040404040404040404` (r:0 w:1) + /// Storage: UNKNOWN KEY `0x0505050505050505050505050505050505050505050505050505050505050505` (r:0 w:1) + /// Proof: UNKNOWN KEY `0x0505050505050505050505050505050505050505050505050505050505050505` (r:0 w:1) + /// Storage: UNKNOWN KEY `0x0606060606060606060606060606060606060606060606060606060606060606` (r:0 w:1) + /// Proof: UNKNOWN KEY `0x0606060606060606060606060606060606060606060606060606060606060606` (r:0 w:1) + /// Storage: UNKNOWN KEY `0x0707070707070707070707070707070707070707070707070707070707070707` (r:0 w:1) + /// Proof: UNKNOWN KEY `0x0707070707070707070707070707070707070707070707070707070707070707` (r:0 w:1) + /// Storage: UNKNOWN KEY `0x0808080808080808080808080808080808080808080808080808080808080808` (r:0 w:1) + /// Proof: UNKNOWN KEY `0x0808080808080808080808080808080808080808080808080808080808080808` (r:0 w:1) + /// Storage: UNKNOWN KEY `0x0909090909090909090909090909090909090909090909090909090909090909` (r:0 w:1) + /// Proof: UNKNOWN KEY `0x0909090909090909090909090909090909090909090909090909090909090909` (r:0 w:1) + /// Storage: UNKNOWN KEY `0x0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a` (r:0 w:1) + /// Proof: UNKNOWN KEY `0x0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a` (r:0 w:1) + /// Storage: UNKNOWN KEY `0x0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b` (r:0 w:1) + /// Proof: UNKNOWN KEY `0x0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b` (r:0 w:1) + /// Storage: UNKNOWN KEY `0x0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c` (r:0 w:1) + /// Proof: UNKNOWN KEY `0x0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c` (r:0 w:1) + /// Storage: UNKNOWN KEY `0x0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d` (r:0 w:1) + /// Proof: UNKNOWN KEY `0x0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d` (r:0 w:1) + /// Storage: UNKNOWN KEY `0x0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e` (r:0 w:1) + /// Proof: UNKNOWN KEY `0x0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e0e` (r:0 w:1) + /// Storage: UNKNOWN KEY `0x0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f` (r:0 w:1) + /// Proof: UNKNOWN KEY `0x0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f` (r:0 w:1) + /// The range of component `n` is `[1, 16]`. + pub fn publish(n: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `222` + // Estimated: `38487 + n * (14 ±0)` + // Minimum execution time: 18_000_000 picoseconds. + Weight::from_parts(15_154_813, 0) + .saturating_add(Weight::from_parts(0, 38487)) + // Standard Error: 6_584 + .saturating_add(Weight::from_parts(4_663_489, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(4)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into()))) + .saturating_add(Weight::from_parts(0, 14).saturating_mul(n.into())) + } + /// Storage: `Broadcaster::Subscriptions` (r:1 w:1) + /// Proof: `Broadcaster::Subscriptions` (`max_values`: None, `max_size`: Some(422), added: 2897, mode: `MaxEncodedLen`) + pub fn subscribe() -> Weight { + // Proof Size summary in bytes: + // Measured: `217` + // Estimated: `3887` + // Minimum execution time: 7_000_000 picoseconds. + Weight::from_parts(7_000_000, 0) + .saturating_add(Weight::from_parts(0, 3887)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) } } diff --git a/polkadot/xcm/pallet-xcm-benchmarks/src/generic/benchmarking.rs b/polkadot/xcm/pallet-xcm-benchmarks/src/generic/benchmarking.rs index 3ea04c2e011ff..9141fca025011 100644 --- a/polkadot/xcm/pallet-xcm-benchmarks/src/generic/benchmarking.rs +++ b/polkadot/xcm/pallet-xcm-benchmarks/src/generic/benchmarking.rs @@ -983,7 +983,7 @@ mod benchmarks { let data = BoundedVec::try_from(data_vec).unwrap(); - let origin = Location::new(0, [Junction::Parachain(1000)]); + let origin = T::publish_origin()?; let mut executor = new_executor::(origin); let instruction = Instruction::Publish { data }; @@ -999,10 +999,10 @@ mod benchmarks { #[benchmark] fn subscribe() -> Result<(), BenchmarkError> { - let origin = Location::new(0, [Junction::Parachain(1000)]); - let mut executor = new_executor::(origin); + let origin = T::publish_origin()?; + let publisher = T::valid_publisher()?; - let publisher = 2000u32; + let mut executor = new_executor::(origin); let instruction = Instruction::Subscribe { publisher }; let xcm = Xcm(vec![instruction]); diff --git a/polkadot/xcm/pallet-xcm-benchmarks/src/generic/mock.rs b/polkadot/xcm/pallet-xcm-benchmarks/src/generic/mock.rs index cfcc26f68f141..df05f68bdbd0f 100644 --- a/polkadot/xcm/pallet-xcm-benchmarks/src/generic/mock.rs +++ b/polkadot/xcm/pallet-xcm-benchmarks/src/generic/mock.rs @@ -194,6 +194,14 @@ impl generic::Config for Test { let target: Location = AccountId32 { network: None, id: [0; 32] }.into(); Ok((origin, target)) } + + fn publish_origin() -> Result { + Ok(Parachain(1000).into()) + } + + fn valid_publisher() -> Result { + Ok(2000) + } } #[cfg(feature = "runtime-benchmarks")] diff --git a/polkadot/xcm/pallet-xcm-benchmarks/src/generic/mod.rs b/polkadot/xcm/pallet-xcm-benchmarks/src/generic/mod.rs index d7471b02368fa..20180e98388bb 100644 --- a/polkadot/xcm/pallet-xcm-benchmarks/src/generic/mod.rs +++ b/polkadot/xcm/pallet-xcm-benchmarks/src/generic/mod.rs @@ -108,6 +108,22 @@ pub mod pallet { crate_version: as frame_support::traits::PalletInfoAccess>::crate_version(), } } + + /// Return a valid origin for `Publish` and `Subscribe` benchmarks. + /// + /// Should return a parachain origin that is allowed by the BroadcastHandler filter. + /// If set to `Err`, benchmarks which rely on publish/subscribe will be skipped. + fn publish_origin() -> Result { + Err(BenchmarkError::Skip) + } + + /// Return a valid publisher ID for the `Subscribe` benchmark. + /// + /// This should be a parachain ID that subscribers can listen to. + /// If set to `Err`, the subscribe benchmark will be skipped. + fn valid_publisher() -> Result { + Err(BenchmarkError::Skip) + } } #[pallet::pallet] diff --git a/pubsub-dev/benchmark_xcm_generic.sh b/pubsub-dev/benchmark_xcm_generic.sh new file mode 100755 index 0000000000000..4da69a5feaea4 --- /dev/null +++ b/pubsub-dev/benchmark_xcm_generic.sh @@ -0,0 +1,46 @@ +#!/bin/bash + +echo "🔨 Building Polkadot with runtime-benchmarks feature for XCM generic benchmarks..." +echo + +# Build polkadot binary with runtime-benchmarks feature +echo "📦 Building polkadot binary with runtime-benchmarks..." +cargo build --release --features runtime-benchmarks -p polkadot +if [ $? -ne 0 ]; then + echo "❌ Failed to build polkadot binary with runtime-benchmarks" + exit 1 +fi +echo "✅ polkadot binary built successfully with runtime-benchmarks" +echo + +# Run XCM generic benchmarks for Rococo +echo "🏃 Running XCM generic benchmarks for Rococo runtime..." +echo " This will benchmark all XCM generic instructions including publish and subscribe" +echo + +./target/release/polkadot benchmark pallet \ + --chain rococo-local \ + --pallets pallet_xcm_benchmarks::generic \ + --extrinsic '*' \ + --steps 50 \ + --repeat 20 \ + --output ./polkadot/runtime/rococo/src/weights/xcm/pallet_xcm_benchmarks_generic.rs \ + --header ./polkadot/file_header.txt + +if [ $? -ne 0 ]; then + echo "❌ Benchmark execution failed" + exit 1 +fi + +echo +echo "✅ Benchmarks completed successfully!" +echo +echo "📍 Generated weight file:" +echo " - Location: polkadot/runtime/rococo/src/weights/xcm/pallet_xcm_benchmarks_generic.rs" +echo +echo "📊 The weight file now includes:" +echo " - publish(n) - Linear weight scaling with number of items" +echo " - subscribe() - Constant weight" +echo " - All other XCM generic instructions" +echo +echo "🎉 Ready to commit the updated weights!" From dc6817a8f951442913a52a8dd0caacfd7db8ffc3 Mon Sep 17 00:00:00 2001 From: metricaez Date: Thu, 2 Oct 2025 13:23:16 -0300 Subject: [PATCH 095/128] feat: fix param inconsitency --- .../runtime/parachains/src/broadcaster/mod.rs | 27 ++++++++- .../parachains/src/broadcaster/tests.rs | 57 +++++++++++++++---- polkadot/runtime/parachains/src/mock.rs | 8 ++- polkadot/runtime/rococo/src/lib.rs | 2 + 4 files changed, 80 insertions(+), 14 deletions(-) diff --git a/polkadot/runtime/parachains/src/broadcaster/mod.rs b/polkadot/runtime/parachains/src/broadcaster/mod.rs index f754d0106d5a2..4d176c702e9b1 100644 --- a/polkadot/runtime/parachains/src/broadcaster/mod.rs +++ b/polkadot/runtime/parachains/src/broadcaster/mod.rs @@ -83,6 +83,10 @@ pub mod pallet { #[pallet::constant] type MaxValueLength: Get; + /// Maximum number of unique keys a publisher can have stored across all publishes. + #[pallet::constant] + type MaxStoredKeys: Get; + /// Maximum number of publishers a subscriber can subscribe to. #[pallet::constant] type MaxSubscriptions: Get; @@ -122,7 +126,7 @@ pub mod pallet { _, Blake2_128Concat, ParaId, - BoundedBTreeSet, T::MaxPublishItems>, + BoundedBTreeSet, T::MaxStoredKeys>, ValueQuery, >; @@ -158,6 +162,8 @@ pub mod pallet { KeyTooLong, /// Value length exceeds maximum allowed. ValueTooLong, + /// Too many unique keys stored for this publisher. + TooManyStoredKeys, /// Too many subscriptions for this subscriber. TooManySubscriptions, } @@ -221,12 +227,31 @@ pub mod pallet { // Get current published keys set for tracking let mut published_keys = PublishedKeys::::get(origin_para_id); + // Check if adding new keys would exceed MaxStoredKeys limit + // Count how many unique new keys we're adding + let mut new_keys_count = 0u32; + for (key, _) in &data { + if let Ok(bounded_key) = BoundedVec::try_from(key.clone()) { + if !published_keys.contains(&bounded_key) { + new_keys_count += 1; + } + } + } + + // Ensure we won't exceed the total stored keys limit + let current_keys_count = published_keys.len() as u32; + ensure!( + current_keys_count.saturating_add(new_keys_count) <= T::MaxStoredKeys::get(), + Error::::TooManyStoredKeys + ); + // Store each key-value pair in the child trie and track the key for (key, value) in data { frame_support::storage::child::put(&child_info, &key, &value); // Track the key for enumeration (convert to BoundedVec) if let Ok(bounded_key) = BoundedVec::try_from(key) { + // This should never fail now since we checked the limit above published_keys.try_insert(bounded_key).defensive_ok(); } } diff --git a/polkadot/runtime/parachains/src/broadcaster/tests.rs b/polkadot/runtime/parachains/src/broadcaster/tests.rs index df1bbd0f99cca..a7d22abebd7e2 100644 --- a/polkadot/runtime/parachains/src/broadcaster/tests.rs +++ b/polkadot/runtime/parachains/src/broadcaster/tests.rs @@ -97,13 +97,12 @@ fn empty_publish_still_creates_publisher() { fn handle_publish_respects_max_items_limit() { new_test_ext(Default::default()).execute_with(|| { let para_id = ParaId::from(1000); - - // Create 11 items (exceeds MaxPublishItems=10) + let mut data = Vec::new(); - for i in 0..11 { + for i in 0..17 { data.push((format!("key{}", i).into_bytes(), b"value".to_vec())); } - + let result = Broadcaster::handle_publish(para_id, data); assert!(result.is_err()); assert!(!PublisherExists::::get(para_id)); @@ -114,11 +113,10 @@ fn handle_publish_respects_max_items_limit() { fn handle_publish_respects_key_length_limit() { new_test_ext(Default::default()).execute_with(|| { let para_id = ParaId::from(1000); - - // Create key longer than MaxKeyLength=100 - let long_key = vec![b'a'; 101]; + + let long_key = vec![b'a'; 257]; let data = vec![(long_key, b"value".to_vec())]; - + let result = Broadcaster::handle_publish(para_id, data); assert!(result.is_err()); assert!(!PublisherExists::::get(para_id)); @@ -130,8 +128,7 @@ fn handle_publish_respects_value_length_limit() { new_test_ext(Default::default()).execute_with(|| { let para_id = ParaId::from(1000); - // Create value longer than MaxValueLength=1000 - let long_value = vec![b'v'; 1001]; + let long_value = vec![b'v'; 1025]; let data = vec![(b"key".to_vec(), long_value)]; let result = Broadcaster::handle_publish(para_id, data); @@ -230,4 +227,44 @@ fn max_subscriptions_limit_enforced() { assert_ok!(Broadcaster::handle_subscribe_toggle(subscriber, existing_publisher)); // Unsubscribe assert_ok!(Broadcaster::handle_subscribe_toggle(subscriber, publisher)); // Subscribe to new one }); +} + +#[test] +fn max_stored_keys_limit_enforced() { + new_test_ext(Default::default()).execute_with(|| { + let para_id = ParaId::from(1000); + + for batch in 0..7 { + let mut data = Vec::new(); + for i in 0..16 { + let key_num = batch * 16 + i; + if key_num < 100 { + data.push((format!("key{}", key_num).into_bytes(), b"value".to_vec())); + } + } + if !data.is_empty() { + assert_ok!(Broadcaster::handle_publish(para_id, data)); + } + } + + let published_keys = PublishedKeys::::get(para_id); + assert_eq!(published_keys.len(), 100); + + let result = Broadcaster::handle_publish( + para_id, + vec![(b"new_key".to_vec(), b"value".to_vec())] + ); + assert_err!(result, Error::::TooManyStoredKeys); + + let result = Broadcaster::handle_publish( + para_id, + vec![(b"key0".to_vec(), b"updated_value".to_vec())] + ); + assert_ok!(result); + + assert_eq!( + Broadcaster::get_published_value(para_id, b"key0"), + Some(b"updated_value".to_vec()) + ); + }); } \ No newline at end of file diff --git a/polkadot/runtime/parachains/src/mock.rs b/polkadot/runtime/parachains/src/mock.rs index 816b0c46651ec..2123316159dbe 100644 --- a/polkadot/runtime/parachains/src/mock.rs +++ b/polkadot/runtime/parachains/src/mock.rs @@ -484,9 +484,10 @@ impl crate::paras_inherent::Config for Test { } parameter_types! { - pub const MaxPublishItems: u32 = 10; - pub const MaxKeyLength: u32 = 100; - pub const MaxValueLength: u32 = 1000; + pub const MaxPublishItems: u32 = 16; + pub const MaxKeyLength: u32 = 256; + pub const MaxValueLength: u32 = 1024; + pub const MaxStoredKeys: u32 = 100; } impl crate::broadcaster::Config for Test { @@ -494,6 +495,7 @@ impl crate::broadcaster::Config for Test { type MaxPublishItems = MaxPublishItems; type MaxKeyLength = MaxKeyLength; type MaxValueLength = MaxValueLength; + type MaxStoredKeys = MaxStoredKeys; type MaxSubscriptions = ConstU32<10>; type MaxPublishers = ConstU32<1000>; } diff --git a/polkadot/runtime/rococo/src/lib.rs b/polkadot/runtime/rococo/src/lib.rs index 17bfa453f6520..6e480229039e0 100644 --- a/polkadot/runtime/rococo/src/lib.rs +++ b/polkadot/runtime/rococo/src/lib.rs @@ -1227,6 +1227,7 @@ parameter_types! { pub const MaxPublishItems: u32 = 16; pub const MaxKeyLength: u32 = 256; pub const MaxValueLength: u32 = 1024; + pub const MaxStoredKeys: u32 = 100; pub const MaxSubscriptions: u32 = 100; pub const MaxPublishers: u32 = 1000; } @@ -1236,6 +1237,7 @@ impl polkadot_runtime_parachains::broadcaster::Config for Runtime { type MaxPublishItems = MaxPublishItems; type MaxKeyLength = MaxKeyLength; type MaxValueLength = MaxValueLength; + type MaxStoredKeys = MaxStoredKeys; type MaxSubscriptions = MaxSubscriptions; type MaxPublishers = MaxPublishers; } From a14d153c3baa680ee9623e92afd1c8ccb8ce5c1e Mon Sep 17 00:00:00 2001 From: metricaez Date: Thu, 2 Oct 2025 15:20:14 -0300 Subject: [PATCH 096/128] fix: cleanup dead code, move trait, fix pending trait --- .../runtime/parachains/src/broadcaster/mod.rs | 23 +++---------- .../parachains/src/broadcaster/traits.rs | 33 +++++++++++++++++++ .../xcm/xcm-builder/src/broadcast_adapter.rs | 8 ++--- polkadot/xcm/xcm-builder/tests/mock/mod.rs | 1 + polkadot/xcm/xcm-builder/tests/scenarios.rs | 1 + .../src/traits/broadcast_handler.rs | 7 ---- polkadot/xcm/xcm-executor/src/traits/mod.rs | 2 +- 7 files changed, 44 insertions(+), 31 deletions(-) create mode 100644 polkadot/runtime/parachains/src/broadcaster/traits.rs diff --git a/polkadot/runtime/parachains/src/broadcaster/mod.rs b/polkadot/runtime/parachains/src/broadcaster/mod.rs index 4d176c702e9b1..013fe387897d5 100644 --- a/polkadot/runtime/parachains/src/broadcaster/mod.rs +++ b/polkadot/runtime/parachains/src/broadcaster/mod.rs @@ -31,23 +31,8 @@ use polkadot_primitives::Id as ParaId; pub use pallet::*; pub mod runtime_api; - -/// Trait for publishing key-value data. -/// Inspired by fungibles trait. -/// TODO: Check if we need to move out of pallets into a separate crate. -/// TODO: Check if sufficient level of abstraction, for now we will leave ParaId. -pub mod publish { - use super::*; - - /// Trait for publishing key-value data for parachains. - pub trait Publish { - /// Publish key-value data for a specific parachain. - fn publish_data(publisher: ParaId, data: Vec<(Vec, Vec)>) -> DispatchResult; - - /// Toggle subscription to a publisher's data. - fn toggle_subscription(subscriber: ParaId, publisher: ParaId) -> DispatchResult; - } -} +mod traits; +pub use traits::PublishSubscribe; #[cfg(test)] mod tests; @@ -397,8 +382,8 @@ pub mod pallet { } } -// Implement publish::Publish trait -impl publish::Publish for Pallet { +// Implement PublishSubscribe trait +impl PublishSubscribe for Pallet { fn publish_data(publisher: ParaId, data: Vec<(Vec, Vec)>) -> DispatchResult { Self::handle_publish(publisher, data) } diff --git a/polkadot/runtime/parachains/src/broadcaster/traits.rs b/polkadot/runtime/parachains/src/broadcaster/traits.rs new file mode 100644 index 0000000000000..8df081d41ee6d --- /dev/null +++ b/polkadot/runtime/parachains/src/broadcaster/traits.rs @@ -0,0 +1,33 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Polkadot. + +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . + +//! Traits for publish/subscribe operations in the broadcaster pallet. + +use alloc::vec::Vec; +use polkadot_primitives::Id as ParaId; +use sp_runtime::DispatchResult; + +/// Trait for handling publish and subscribe operations for parachains. +/// +/// This trait provides the interface for parachains to publish key-value data +/// and manage subscriptions to other parachains' published data. +pub trait PublishSubscribe { + /// Publish key-value data for a specific parachain. + fn publish_data(publisher: ParaId, data: Vec<(Vec, Vec)>) -> DispatchResult; + + /// Toggle subscription to a publisher's data. + fn toggle_subscription(subscriber: ParaId, publisher: ParaId) -> DispatchResult; +} diff --git a/polkadot/xcm/xcm-builder/src/broadcast_adapter.rs b/polkadot/xcm/xcm-builder/src/broadcast_adapter.rs index 7555c6ae024b0..d1834a681a299 100644 --- a/polkadot/xcm/xcm-builder/src/broadcast_adapter.rs +++ b/polkadot/xcm/xcm-builder/src/broadcast_adapter.rs @@ -20,7 +20,7 @@ use alloc::vec::Vec; use core::marker::PhantomData; use frame_support::traits::Contains; use polkadot_primitives::Id as ParaId; -use polkadot_runtime_parachains::broadcaster::publish; +use polkadot_runtime_parachains::broadcaster::PublishSubscribe; use xcm::latest::prelude::XcmError; use xcm::latest::{Junction, Location, PublishData, Result as XcmResult}; use xcm_executor::traits::BroadcastHandler; @@ -31,7 +31,7 @@ pub struct ParachainBroadcastAdapter(PhantomData<(Filter, Handl impl BroadcastHandler for ParachainBroadcastAdapter where Filter: Contains, - Handler: publish::Publish, + Handler: PublishSubscribe, { fn handle_publish(origin: &Location, data: PublishData) -> XcmResult { // Check if origin is authorized to publish @@ -110,7 +110,7 @@ impl Contains for SpecificParachai mod tests { use super::*; use frame_support::parameter_types; - use polkadot_runtime_parachains::broadcaster::publish; + use polkadot_runtime_parachains::broadcaster::PublishSubscribe; use sp_runtime::BoundedVec; use xcm::latest::prelude::XcmError; use xcm::latest::{ @@ -139,7 +139,7 @@ mod tests { } struct MockPublishHandler; - impl publish::Publish for MockPublishHandler { + impl PublishSubscribe for MockPublishHandler { fn publish_data( publisher: ParaId, data: Vec<(Vec, Vec)>, diff --git a/polkadot/xcm/xcm-builder/tests/mock/mod.rs b/polkadot/xcm/xcm-builder/tests/mock/mod.rs index 7a2eb8cc55adf..c3b76f74e3dfa 100644 --- a/polkadot/xcm/xcm-builder/tests/mock/mod.rs +++ b/polkadot/xcm/xcm-builder/tests/mock/mod.rs @@ -196,6 +196,7 @@ impl xcm_executor::Config for XcmConfig { type HrmpChannelAcceptedHandler = (); type HrmpChannelClosingHandler = (); type XcmRecorder = XcmPallet; + type BroadcastHandler = (); } /// Converts a local signed origin into an XCM location. Forms the basis for local origins diff --git a/polkadot/xcm/xcm-builder/tests/scenarios.rs b/polkadot/xcm/xcm-builder/tests/scenarios.rs index c772a49fc8226..65622eef71038 100644 --- a/polkadot/xcm/xcm-builder/tests/scenarios.rs +++ b/polkadot/xcm/xcm-builder/tests/scenarios.rs @@ -403,6 +403,7 @@ fn recursive_xcm_execution_fail() { type HrmpChannelAcceptedHandler = (); type HrmpChannelClosingHandler = (); type XcmRecorder = XcmPallet; + type BroadcastHandler = (); } let para_acc: AccountId = ParaId::from(PARA_ID).into_account_truncating(); diff --git a/polkadot/xcm/xcm-executor/src/traits/broadcast_handler.rs b/polkadot/xcm/xcm-executor/src/traits/broadcast_handler.rs index 3f3d2ed16dd58..789c09181eb73 100644 --- a/polkadot/xcm/xcm-executor/src/traits/broadcast_handler.rs +++ b/polkadot/xcm/xcm-executor/src/traits/broadcast_handler.rs @@ -16,7 +16,6 @@ //! Traits for handling publish/subscribe operations in XCM. -use alloc::vec::Vec; use xcm::latest::{Location, PublishData, Result as XcmResult}; /// Trait for handling publish/subscribe operations on the relay chain. @@ -30,12 +29,6 @@ pub trait BroadcastHandler { fn handle_subscribe(origin: &Location, publisher: u32) -> XcmResult; } -/// Trait for the actual publish handling logic. -/// Implemented by pallets that store published data. -pub trait HandlePublish { - fn handle_publish(publisher: u32, data: Vec<(Vec, Vec)>) -> Result<(), ()>; -} - /// Implementation of `BroadcastHandler` for the unit type `()`. impl BroadcastHandler for () { fn handle_publish(_origin: &Location, _data: PublishData) -> XcmResult { diff --git a/polkadot/xcm/xcm-executor/src/traits/mod.rs b/polkadot/xcm/xcm-executor/src/traits/mod.rs index 380dc04af1a5f..c2bb37485106a 100644 --- a/polkadot/xcm/xcm-executor/src/traits/mod.rs +++ b/polkadot/xcm/xcm-executor/src/traits/mod.rs @@ -50,7 +50,7 @@ pub use hrmp::{ HandleHrmpChannelAccepted, HandleHrmpChannelClosing, HandleHrmpNewChannelOpenRequest, }; mod broadcast_handler; -pub use broadcast_handler::{BroadcastHandler, HandlePublish}; +pub use broadcast_handler::BroadcastHandler; mod event_emitter; mod record_xcm; mod weight; From 114256dda1894dc12480ea86d2dc7d76911f1530 Mon Sep 17 00:00:00 2001 From: metricaez Date: Thu, 2 Oct 2025 18:24:54 -0300 Subject: [PATCH 097/128] choir: cleanup rutime api methods --- .../parachains/src/broadcaster/runtime_api.rs | 16 -- polkadot/runtime/rococo/src/lib.rs | 16 -- pubsub-dev/test_broadcaster_api.sh | 145 ------------------ 3 files changed, 177 deletions(-) delete mode 100755 pubsub-dev/test_broadcaster_api.sh diff --git a/polkadot/runtime/parachains/src/broadcaster/runtime_api.rs b/polkadot/runtime/parachains/src/broadcaster/runtime_api.rs index ad29d60f5f93d..4490a076018ab 100644 --- a/polkadot/runtime/parachains/src/broadcaster/runtime_api.rs +++ b/polkadot/runtime/parachains/src/broadcaster/runtime_api.rs @@ -23,22 +23,6 @@ sp_api::decl_runtime_apis! { /// The API for querying published data from parachains. #[api_version(1)] pub trait BroadcasterApi { - /// Get published value for a specific parachain and key. - /// Returns None if the parachain hasn't published data or the key doesn't exist. - fn get_published_value(para_id: ParaId, key: Vec) -> Option>; - - /// Get the child trie root hash for a publisher. - /// This can be used to prove the current state of published data. - fn get_publisher_child_root(para_id: ParaId) -> Option>; - - /// Get all published data for a specific parachain. - /// Returns empty vec if the parachain hasn't published any data. - fn get_all_published_data(para_id: ParaId) -> Vec<(Vec, Vec)>; - - /// Get list of all parachains that have published data. - /// Returns empty vec if no parachains have published data. - fn get_all_publishers() -> Vec; - /// Get published data from all parachains that the subscriber is subscribed to. /// Returns a map of Publisher ParaId -> published data. /// Only includes publishers that have actual data and are subscribed to. diff --git a/polkadot/runtime/rococo/src/lib.rs b/polkadot/runtime/rococo/src/lib.rs index 6e480229039e0..e77a09cabb4d1 100644 --- a/polkadot/runtime/rococo/src/lib.rs +++ b/polkadot/runtime/rococo/src/lib.rs @@ -2750,22 +2750,6 @@ sp_api::impl_runtime_apis! { } impl polkadot_runtime_parachains::broadcaster::runtime_api::BroadcasterApi for Runtime { - fn get_published_value(para_id: polkadot_primitives::Id, key: Vec) -> Option> { - Broadcaster::get_published_value(para_id, &key) - } - - fn get_publisher_child_root(para_id: polkadot_primitives::Id) -> Option> { - Broadcaster::get_publisher_child_root(para_id) - } - - fn get_all_published_data(para_id: polkadot_primitives::Id) -> Vec<(Vec, Vec)> { - Broadcaster::get_all_published_data(para_id) - } - - fn get_all_publishers() -> Vec { - Broadcaster::get_all_publishers() - } - fn get_subscribed_data(subscriber_para_id: polkadot_primitives::Id) -> alloc::collections::BTreeMap, Vec)>> { Broadcaster::get_subscribed_data(subscriber_para_id) } diff --git a/pubsub-dev/test_broadcaster_api.sh b/pubsub-dev/test_broadcaster_api.sh deleted file mode 100755 index 0f14c083d9458..0000000000000 --- a/pubsub-dev/test_broadcaster_api.sh +++ /dev/null @@ -1,145 +0,0 @@ -#!/bin/bash - -# Enhanced test script for BroadcasterApi with human-readable output -# Tests with the exact data from your publish: ParaID 1000, key "0x123" - -RPC_URL=${1:-"http://localhost:9900"} - -# Function to decode hex to ASCII if possible -hex_to_ascii() { - local hex=$1 - # Remove 0x prefix if present - hex=${hex#0x} - # Convert hex to ASCII, handling non-printable chars - echo -n "$hex" | xxd -r -p 2>/dev/null | tr -d '\0' | cat -v -} - -# Function to decode SCALE-encoded Option> -decode_option_vec() { - local hex_result=$1 - # Remove 0x prefix - hex_result=${hex_result#0x} - - if [[ -z "$hex_result" ]]; then - echo "❌ None (empty result)" - return - fi - - # Check first byte for Option - local option_byte=${hex_result:0:2} - if [[ "$option_byte" == "00" ]]; then - echo "❌ None" - return - elif [[ "$option_byte" == "01" ]]; then - echo "✅ Some:" - # Remove option byte - hex_result=${hex_result:2} - - # Decode Vec - first get length - local length_hex=${hex_result:0:2} - local length=$((16#$length_hex)) - echo " 📏 Length: $length bytes" - - # Extract data bytes - local data_hex=${hex_result:2:$((length*2))} - echo " 🔢 Raw bytes: [$data_hex]" - - # Convert to decimal array - local decimal_array="" - for ((i=0; i<${#data_hex}; i+=2)); do - local byte_hex=${data_hex:$i:2} - local byte_dec=$((16#$byte_hex)) - decimal_array="$decimal_array$byte_dec, " - done - decimal_array=${decimal_array%, } - echo " 🔢 Decimal: [$decimal_array]" - - # Try to decode as ASCII - local ascii_text=$(hex_to_ascii "$data_hex") - if [[ -n "$ascii_text" ]]; then - echo " 📝 ASCII: \"$ascii_text\"" - fi - else - echo "❓ Unknown format: $hex_result" - fi -} - -echo "🔍 Testing BroadcasterApi with Enhanced Decoding..." -echo " RPC URL: $RPC_URL" -echo " Testing ParaID: 1000" -echo " Testing Key: [48, 120, 49, 50, 51] (\"0x123\")" -echo "" - -# SCALE-encoded parameters for get_published_value(1000, [48, 120, 49, 50, 51]) -# ParaID 1000 = 0xe8030000 (little-endian u32) -# Vec [48, 120, 49, 50, 51] = 0x14307831323 (length prefix + bytes) -ENCODED_PARAMS="0xe8030000143078313233" - -echo "📡 Calling BroadcasterApi_get_published_value..." -echo " Parameters: $ENCODED_PARAMS" -echo "" - -# Make the API call and extract result -RESPONSE=$(curl -s -H "Content-Type: application/json" -d "{ - \"id\": 1, - \"jsonrpc\": \"2.0\", - \"method\": \"state_call\", - \"params\": [ - \"BroadcasterApi_get_published_value\", - \"$ENCODED_PARAMS\" - ] -}" $RPC_URL) - -echo "📊 Raw Response:" -echo "$RESPONSE" | jq '.' -echo "" - -# Extract and decode result -RESULT=$(echo "$RESPONSE" | jq -r '.result // empty') -if [[ -n "$RESULT" && "$RESULT" != "null" ]]; then - echo "🔍 Decoded Result:" - decode_option_vec "$RESULT" -else - echo "❌ No result or error in response" -fi - -echo "" -echo "==================================" -echo "" - -# Also test get_publisher_child_root -echo "📡 Calling BroadcasterApi_get_publisher_child_root..." -PARA_ONLY="0xe8030000" # Just ParaID 1000 - -ROOT_RESPONSE=$(curl -s -H "Content-Type: application/json" -d "{ - \"id\": 2, - \"jsonrpc\": \"2.0\", - \"method\": \"state_call\", - \"params\": [ - \"BroadcasterApi_get_publisher_child_root\", - \"$PARA_ONLY\" - ] -}" $RPC_URL) - -echo "" -echo "📊 Raw Response:" -echo "$ROOT_RESPONSE" | jq '.' -echo "" - -# Extract and decode child root -ROOT_RESULT=$(echo "$ROOT_RESPONSE" | jq -r '.result // empty') -if [[ -n "$ROOT_RESULT" && "$ROOT_RESULT" != "null" ]]; then - echo "🔍 Decoded Child Root:" - if [[ "${ROOT_RESULT:0:4}" == "0x01" ]]; then - echo "✅ Some:" - ROOT_HASH=${ROOT_RESULT:4} - echo " 🌳 Child Trie Root Hash: 0x$ROOT_HASH" - echo " 📏 Hash Length: $((${#ROOT_HASH}/2)) bytes" - else - echo "❌ None (no published data)" - fi -else - echo "❌ No result or error in response" -fi - -echo "" \ No newline at end of file From 20196ffbd06df5000c23226385c69224b8ee2a72 Mon Sep 17 00:00:00 2001 From: metricaez Date: Fri, 3 Oct 2025 12:11:05 -0300 Subject: [PATCH 098/128] feat: move runtime api call of inherent to proper traits --- .../slot_based/block_builder_task.rs | 8 +++ cumulus/client/consensus/common/src/tests.rs | 8 +++ cumulus/client/network/src/tests.rs | 8 +++ cumulus/client/parachain-inherent/src/lib.rs | 64 ++---------------- cumulus/client/pov-recovery/src/tests.rs | 16 +++-- .../src/lib.rs | 8 +++ .../client/relay-chain-interface/src/lib.rs | 16 +++++ .../relay-chain-rpc-interface/src/lib.rs | 12 +++- .../src/rpc_client.rs | 14 ++++ cumulus/pallets/parachain-system/src/lib.rs | 67 +------------------ polkadot/primitives/src/runtime_api.rs | 5 ++ polkadot/runtime/rococo/src/lib.rs | 11 ++- 12 files changed, 101 insertions(+), 136 deletions(-) diff --git a/cumulus/client/consensus/aura/src/collators/slot_based/block_builder_task.rs b/cumulus/client/consensus/aura/src/collators/slot_based/block_builder_task.rs index 1c9fe5ca04fae..6bfc38d98249e 100644 --- a/cumulus/client/consensus/aura/src/collators/slot_based/block_builder_task.rs +++ b/cumulus/client/consensus/aura/src/collators/slot_based/block_builder_task.rs @@ -635,6 +635,14 @@ mod tests { unimplemented!("Not needed for test") } + async fn retrieve_subscribed_published_data( + &self, + _: ParaId, + _: RelayHash, + ) -> RelayChainResult, Vec)>>> { + unimplemented!("Not needed for test") + } + async fn persisted_validation_data( &self, _: RelayHash, diff --git a/cumulus/client/consensus/common/src/tests.rs b/cumulus/client/consensus/common/src/tests.rs index 47336ea703150..4a336f06c5880 100644 --- a/cumulus/client/consensus/common/src/tests.rs +++ b/cumulus/client/consensus/common/src/tests.rs @@ -122,6 +122,14 @@ impl RelayChainInterface for Relaychain { unimplemented!("Not needed for test") } + async fn retrieve_subscribed_published_data( + &self, + _: ParaId, + _: PHash, + ) -> RelayChainResult, Vec)>>> { + unimplemented!("Not needed for test") + } + async fn persisted_validation_data( &self, hash: PHash, diff --git a/cumulus/client/network/src/tests.rs b/cumulus/client/network/src/tests.rs index 77aaa8c034610..820010c50971b 100644 --- a/cumulus/client/network/src/tests.rs +++ b/cumulus/client/network/src/tests.rs @@ -143,6 +143,14 @@ impl RelayChainInterface for DummyRelayChainInterface { Ok(BTreeMap::new()) } + async fn retrieve_subscribed_published_data( + &self, + _: ParaId, + _: PHash, + ) -> RelayChainResult, Vec)>>> { + Ok(BTreeMap::new()) + } + async fn persisted_validation_data( &self, _: PHash, diff --git a/cumulus/client/parachain-inherent/src/lib.rs b/cumulus/client/parachain-inherent/src/lib.rs index 27a92f45558f9..dbb9961a12e49 100644 --- a/cumulus/client/parachain-inherent/src/lib.rs +++ b/cumulus/client/parachain-inherent/src/lib.rs @@ -16,13 +16,12 @@ //! Client side code for generating the parachain inherent. -use codec::{Decode, Encode}; +use codec::Decode; use cumulus_primitives_core::{ relay_chain::{self, Block as RelayBlock, Hash as PHash, HrmpChannelId}, ParaId, PersistedValidationData, }; use cumulus_relay_chain_interface::RelayChainInterface; -use std::collections::BTreeMap; mod mock; @@ -151,54 +150,6 @@ async fn collect_relay_storage_proof( .ok() } -/// Collect published data from subscribed publishers for a specific parachain. -async fn collect_published_data( - relay_chain_interface: &impl RelayChainInterface, - relay_parent: PHash, - subscriber_para_id: ParaId, -) -> Option, Vec)>>> { - tracing::info!( - target: LOG_TARGET, - relay_parent = ?relay_parent, - subscriber = ?subscriber_para_id, - "🔍 Collecting subscribed published data from broadcaster pallet" - ); - - // Get all published data that the subscriber is subscribed to - let published_data: BTreeMap, Vec)>> = cumulus_relay_chain_interface::call_runtime_api( - relay_chain_interface, - "BroadcasterApi_get_subscribed_data", - relay_parent, - subscriber_para_id, - ) - .await - .map_err(|e| { - tracing::error!( - target: LOG_TARGET, - relay_parent = ?relay_parent, - subscriber = ?subscriber_para_id, - error = ?e, - "Cannot obtain subscribed published data.", - ); - }) - .ok()?; - - let total_items: usize = published_data.values().map(|v| v.len()).sum(); - tracing::info!( - target: LOG_TARGET, - relay_parent = ?relay_parent, - subscriber = ?subscriber_para_id, - publishers = published_data.len(), - total_items = total_items, - "🎯 Collected {} items from {} subscribed publishers for parachain {:?}", - total_items, - published_data.len(), - subscriber_para_id - ); - - Some(published_data) -} - pub struct ParachainInherentDataProvider; impl ParachainInherentDataProvider { @@ -253,15 +204,10 @@ impl ParachainInherentDataProvider { ); }) .ok()?; - - // Fetch published data from subscribed publishers via broadcaster pallet - let published_data = collect_published_data( - relay_chain_interface, - relay_parent, - para_id, - ) - .await - .unwrap_or_default(); + let published_data = relay_chain_interface + .retrieve_subscribed_published_data(para_id, relay_parent) + .await + .unwrap_or_default(); Some(ParachainInherentData { downward_messages, diff --git a/cumulus/client/pov-recovery/src/tests.rs b/cumulus/client/pov-recovery/src/tests.rs index c3be39d7f0fe4..9c8b60222fc93 100644 --- a/cumulus/client/pov-recovery/src/tests.rs +++ b/cumulus/client/pov-recovery/src/tests.rs @@ -367,6 +367,14 @@ impl RelayChainInterface for Relaychain { unimplemented!("Not needed for test") } + async fn retrieve_subscribed_published_data( + &self, + _: ParaId, + _: PHash, + ) -> RelayChainResult, Vec)>>> { + unimplemented!("Not needed for test") + } + async fn persisted_validation_data( &self, _: PHash, @@ -390,8 +398,8 @@ impl RelayChainInterface for Relaychain { hash: PHash, _: ParaId, ) -> RelayChainResult> { - if self.inner.lock().expect("Poisoned lock").runtime_version >= - RuntimeApiRequest::CANDIDATES_PENDING_AVAILABILITY_RUNTIME_REQUIREMENT + if self.inner.lock().expect("Poisoned lock").runtime_version + >= RuntimeApiRequest::CANDIDATES_PENDING_AVAILABILITY_RUNTIME_REQUIREMENT { panic!("Should have used candidates_pending_availability instead"); } @@ -413,8 +421,8 @@ impl RelayChainInterface for Relaychain { hash: PHash, _: ParaId, ) -> RelayChainResult> { - if self.inner.lock().expect("Poisoned lock").runtime_version < - RuntimeApiRequest::CANDIDATES_PENDING_AVAILABILITY_RUNTIME_REQUIREMENT + if self.inner.lock().expect("Poisoned lock").runtime_version + < RuntimeApiRequest::CANDIDATES_PENDING_AVAILABILITY_RUNTIME_REQUIREMENT { panic!("Should have used candidate_pending_availability instead"); } diff --git a/cumulus/client/relay-chain-inprocess-interface/src/lib.rs b/cumulus/client/relay-chain-inprocess-interface/src/lib.rs index 751a016cae01f..6887b578dd03f 100644 --- a/cumulus/client/relay-chain-inprocess-interface/src/lib.rs +++ b/cumulus/client/relay-chain-inprocess-interface/src/lib.rs @@ -106,6 +106,14 @@ impl RelayChainInterface for RelayChainInProcessInterface { .inbound_hrmp_channels_contents(relay_parent, para_id)?) } + async fn retrieve_subscribed_published_data( + &self, + para_id: ParaId, + relay_parent: PHash, + ) -> RelayChainResult, Vec)>>> { + Ok(self.full_client.runtime_api().get_subscribed_data(relay_parent, para_id)?) + } + async fn header(&self, block_id: BlockId) -> RelayChainResult> { let hash = match block_id { BlockId::Hash(hash) => hash, diff --git a/cumulus/client/relay-chain-interface/src/lib.rs b/cumulus/client/relay-chain-interface/src/lib.rs index 72ce38f1a18ef..78af2cb02ae48 100644 --- a/cumulus/client/relay-chain-interface/src/lib.rs +++ b/cumulus/client/relay-chain-interface/src/lib.rs @@ -151,6 +151,14 @@ pub trait RelayChainInterface: Send + Sync { relay_parent: PHash, ) -> RelayChainResult>>; + /// Returns published data from all subscribed publishers for the parachain we are collating + /// for. + async fn retrieve_subscribed_published_data( + &self, + para_id: ParaId, + relay_parent: PHash, + ) -> RelayChainResult, Vec)>>>; + /// Yields the persisted validation data for the given `ParaId` along with an assumption that /// should be used if the para currently occupies a core. /// @@ -273,6 +281,14 @@ where (**self).retrieve_all_inbound_hrmp_channel_contents(para_id, relay_parent).await } + async fn retrieve_subscribed_published_data( + &self, + para_id: ParaId, + relay_parent: PHash, + ) -> RelayChainResult, Vec)>>> { + (**self).retrieve_subscribed_published_data(para_id, relay_parent).await + } + async fn persisted_validation_data( &self, block_id: PHash, diff --git a/cumulus/client/relay-chain-rpc-interface/src/lib.rs b/cumulus/client/relay-chain-rpc-interface/src/lib.rs index 2597cd393bc79..b02fa91189680 100644 --- a/cumulus/client/relay-chain-rpc-interface/src/lib.rs +++ b/cumulus/client/relay-chain-rpc-interface/src/lib.rs @@ -87,6 +87,14 @@ impl RelayChainInterface for RelayChainRpcInterface { .await } + async fn retrieve_subscribed_published_data( + &self, + para_id: ParaId, + relay_parent: RelayHash, + ) -> RelayChainResult, Vec)>>> { + self.rpc_client.broadcaster_get_subscribed_data(para_id, relay_parent).await + } + async fn header(&self, block_id: BlockId) -> RelayChainResult> { let hash = match block_id { BlockId::Hash(hash) => hash, @@ -94,7 +102,7 @@ impl RelayChainInterface for RelayChainRpcInterface { if let Some(hash) = self.rpc_client.chain_get_block_hash(Some(num)).await? { hash } else { - return Ok(None) + return Ok(None); } }, }; @@ -229,7 +237,7 @@ impl RelayChainInterface for RelayChainRpcInterface { let mut head_stream = self.rpc_client.get_imported_heads_stream()?; if self.rpc_client.chain_get_header(Some(wait_for_hash)).await?.is_some() { - return Ok(()) + return Ok(()); } let mut timeout = futures_timer::Delay::new(Duration::from_secs(TIMEOUT_IN_SECONDS)).fuse(); diff --git a/cumulus/client/relay-chain-rpc-interface/src/rpc_client.rs b/cumulus/client/relay-chain-rpc-interface/src/rpc_client.rs index 113bc557499f0..af96638dd5ce1 100644 --- a/cumulus/client/relay-chain-rpc-interface/src/rpc_client.rs +++ b/cumulus/client/relay-chain-rpc-interface/src/rpc_client.rs @@ -627,6 +627,20 @@ impl RelayChainRpcClient { .await } + /// Get published data from all subscribed publishers for a parachain. + pub async fn broadcaster_get_subscribed_data( + &self, + para_id: ParaId, + at: RelayHash, + ) -> Result, Vec)>>, RelayChainError> { + self.call_remote_runtime_function( + "ParachainHost_get_subscribed_data", + at, + Some(para_id), + ) + .await + } + /// Get the minimum number of backing votes for a candidate. pub async fn parachain_host_minimum_backing_votes( &self, diff --git a/cumulus/pallets/parachain-system/src/lib.rs b/cumulus/pallets/parachain-system/src/lib.rs index fd6a8fd4d06d8..03cddb045e176 100644 --- a/cumulus/pallets/parachain-system/src/lib.rs +++ b/cumulus/pallets/parachain-system/src/lib.rs @@ -1379,23 +1379,10 @@ impl Pallet { if let Some(previous_root) = previous_roots_map.get(para_id) { if current_root != previous_root { changed_publishers.insert(*para_id); - log::info!( - target: "parachain_system::published_data", - "🔄 Publisher {:?} has changed root: {:?} -> {:?}", - para_id, - sp_core::hexdisplay::HexDisplay::from(&**previous_root), - sp_core::hexdisplay::HexDisplay::from(&**current_root) - ); } } else { // New publisher changed_publishers.insert(*para_id); - log::info!( - target: "parachain_system::published_data", - "🆕 New publisher {:?} with root: {:?}", - para_id, - sp_core::hexdisplay::HexDisplay::from(&**current_root) - ); } } @@ -1403,78 +1390,28 @@ impl Pallet { for (para_id, _) in &previous_roots_map { if !current_roots_map.contains_key(para_id) { changed_publishers.insert(*para_id); - log::info!( - target: "parachain_system::published_data", - "🗑️ Publisher {:?} removed", - para_id - ); } } - if changed_publishers.is_empty() { - log::info!( - target: "parachain_system::published_data", - "⚡ No publishers have changed data roots - skipping processing for optimization" - ); - } else { - log::info!( - target: "parachain_system::published_data", - "📨 Processing published data from {} publishers with changed roots (out of {} total)", - changed_publishers.len(), - published_data.len() - ); - - // Only process data for publishers with changed roots + // Only process data for publishers with changed roots + if !changed_publishers.is_empty() { for (publisher, data_entries) in published_data { if !changed_publishers.contains(publisher) { continue; } - log::info!( - target: "parachain_system::published_data", - "📦 Processing {} data items from publisher parachain {:?}", - data_entries.len(), - publisher - ); - // Clear existing data for this publisher let _ = PublishedData::::clear_prefix(publisher, u32::MAX, None); // Store new data for this publisher for (key, value) in data_entries { - log::debug!( - target: "parachain_system::published_data", - "💾 Storing key {:?} ({}B) -> value ({}B) from publisher {:?}", - key, - key.len(), - value.len(), - publisher - ); PublishedData::::insert(publisher, key, value); } - - log::info!( - target: "parachain_system::published_data", - "✅ Successfully stored {} items from publisher {:?}", - data_entries.len(), - publisher - ); } - - log::info!( - target: "parachain_system::published_data", - "🎯 Finished processing published data from all publishers" - ); } // Update previous roots storage for next comparison >::put(current_roots); - - log::info!( - target: "parachain_system::published_data", - "💾 Updated previous published data roots for {} publishers", - current_roots.len() - ); } diff --git a/polkadot/primitives/src/runtime_api.rs b/polkadot/primitives/src/runtime_api.rs index 7feb5da434859..1775bc2f517bb 100644 --- a/polkadot/primitives/src/runtime_api.rs +++ b/polkadot/primitives/src/runtime_api.rs @@ -314,6 +314,11 @@ sp_api::decl_runtime_apis! { #[api_version(13)] fn scheduling_lookahead() -> u32; + /// Get published data from all parachains that the subscriber is subscribed to. + /// Returns a map of Publisher ParaId -> published data. + /// Only includes publishers that have actual data and are subscribed to. + #[api_version(14)] + fn get_subscribed_data(subscriber_para_id: ppp::Id) -> BTreeMap, Vec)>>; } } diff --git a/polkadot/runtime/rococo/src/lib.rs b/polkadot/runtime/rococo/src/lib.rs index e77a09cabb4d1..2417666804852 100644 --- a/polkadot/runtime/rococo/src/lib.rs +++ b/polkadot/runtime/rococo/src/lib.rs @@ -2034,7 +2034,7 @@ sp_api::impl_runtime_apis! { } } - #[api_version(13)] + #[api_version(14)] impl polkadot_primitives::runtime_api::ParachainHost for Runtime { fn validators() -> Vec { parachains_runtime_api_impl::validators::() @@ -2212,6 +2212,10 @@ sp_api::impl_runtime_apis! { fn validation_code_bomb_limit() -> u32 { parachains_staging_runtime_api_impl::validation_code_bomb_limit::() } + + fn get_subscribed_data(subscriber_para_id: ParaId) -> BTreeMap, Vec)>> { + Broadcaster::get_subscribed_data(subscriber_para_id) + } } #[api_version(5)] @@ -2749,11 +2753,6 @@ sp_api::impl_runtime_apis! { } } - impl polkadot_runtime_parachains::broadcaster::runtime_api::BroadcasterApi for Runtime { - fn get_subscribed_data(subscriber_para_id: polkadot_primitives::Id) -> alloc::collections::BTreeMap, Vec)>> { - Broadcaster::get_subscribed_data(subscriber_para_id) - } - } } #[cfg(all(test, feature = "try-runtime"))] From 16d2643feb454365c7b3c599166d5fd47f29d408 Mon Sep 17 00:00:00 2001 From: metricaez Date: Fri, 3 Oct 2025 14:03:01 -0300 Subject: [PATCH 099/128] choir: cleanup dead test --- .../parachains/src/broadcaster/tests.rs | 54 +++++-------------- 1 file changed, 13 insertions(+), 41 deletions(-) diff --git a/polkadot/runtime/parachains/src/broadcaster/tests.rs b/polkadot/runtime/parachains/src/broadcaster/tests.rs index a7d22abebd7e2..3e27cdd408006 100644 --- a/polkadot/runtime/parachains/src/broadcaster/tests.rs +++ b/polkadot/runtime/parachains/src/broadcaster/tests.rs @@ -16,7 +16,7 @@ use super::*; use crate::mock::{new_test_ext, Broadcaster, Test}; -use frame_support::{assert_ok, assert_err}; +use frame_support::{assert_err, assert_ok}; use polkadot_primitives::Id as ParaId; #[test] @@ -29,10 +29,8 @@ fn publish_store_retrieve_and_update_data() { assert!(Broadcaster::get_publisher_child_root(para_id).is_none()); // Publish initial data - let initial_data = vec![ - (b"key1".to_vec(), b"value1".to_vec()), - (b"key2".to_vec(), b"value2".to_vec()), - ]; + let initial_data = + vec![(b"key1".to_vec(), b"value1".to_vec()), (b"key2".to_vec(), b"value2".to_vec())]; Broadcaster::handle_publish(para_id, initial_data.clone()).unwrap(); // Verify publisher exists and has a child root @@ -42,14 +40,8 @@ fn publish_store_retrieve_and_update_data() { assert!(!root_after_initial.as_ref().unwrap().is_empty()); // Verify the actual stored data matches what was published - assert_eq!( - Broadcaster::get_published_value(para_id, b"key1"), - Some(b"value1".to_vec()) - ); - assert_eq!( - Broadcaster::get_published_value(para_id, b"key2"), - Some(b"value2".to_vec()) - ); + assert_eq!(Broadcaster::get_published_value(para_id, b"key1"), Some(b"value1".to_vec())); + assert_eq!(Broadcaster::get_published_value(para_id, b"key2"), Some(b"value2".to_vec())); // Non-existent key should return None assert_eq!(Broadcaster::get_published_value(para_id, b"key3"), None); @@ -73,12 +65,9 @@ fn publish_store_retrieve_and_update_data() { ); assert_eq!( Broadcaster::get_published_value(para_id, b"key2"), - Some(b"value2".to_vec()) // Should remain unchanged - ); - assert_eq!( - Broadcaster::get_published_value(para_id, b"key3"), - Some(b"value3".to_vec()) + Some(b"value2".to_vec()) // Should remain unchanged ); + assert_eq!(Broadcaster::get_published_value(para_id, b"key3"), Some(b"value3".to_vec())); }); } @@ -86,9 +75,9 @@ fn publish_store_retrieve_and_update_data() { fn empty_publish_still_creates_publisher() { new_test_ext(Default::default()).execute_with(|| { let para_id = ParaId::from(1000); - + let _ = Broadcaster::handle_publish(para_id, vec![]); - + assert!(PublisherExists::::get(para_id)); }); } @@ -137,21 +126,6 @@ fn handle_publish_respects_value_length_limit() { }); } -#[test] -fn get_storage_key() { - new_test_ext(Default::default()).execute_with(|| { - let key = PublishedDataRoots::::hashed_key(); - println!("PublishedDataRoots storage key (bytes): {:?}", key); - - // Print as hex manually - print!("PublishedDataRoots storage key (hex): "); - for byte in &key { - print!("{:02x}", byte); - } - println!(); - }); -} - #[test] fn subscribe_toggle_works() { new_test_ext(Default::default()).execute_with(|| { @@ -250,15 +224,13 @@ fn max_stored_keys_limit_enforced() { let published_keys = PublishedKeys::::get(para_id); assert_eq!(published_keys.len(), 100); - let result = Broadcaster::handle_publish( - para_id, - vec![(b"new_key".to_vec(), b"value".to_vec())] - ); + let result = + Broadcaster::handle_publish(para_id, vec![(b"new_key".to_vec(), b"value".to_vec())]); assert_err!(result, Error::::TooManyStoredKeys); let result = Broadcaster::handle_publish( para_id, - vec![(b"key0".to_vec(), b"updated_value".to_vec())] + vec![(b"key0".to_vec(), b"updated_value".to_vec())], ); assert_ok!(result); @@ -267,4 +239,4 @@ fn max_stored_keys_limit_enforced() { Some(b"updated_value".to_vec()) ); }); -} \ No newline at end of file +} From 1a4ba5ce771515d37a17f8abbf9fd539a0a03855 Mon Sep 17 00:00:00 2001 From: metricaez Date: Fri, 3 Oct 2025 16:22:21 -0300 Subject: [PATCH 100/128] feat: sproof test --- cumulus/client/parachain-inherent/src/lib.rs | 1 - cumulus/pallets/parachain-system/src/tests.rs | 24 +++++++++++++++++++ cumulus/test/relay-sproof-builder/src/lib.rs | 9 +++++++ 3 files changed, 33 insertions(+), 1 deletion(-) diff --git a/cumulus/client/parachain-inherent/src/lib.rs b/cumulus/client/parachain-inherent/src/lib.rs index dbb9961a12e49..e397c9f010bc7 100644 --- a/cumulus/client/parachain-inherent/src/lib.rs +++ b/cumulus/client/parachain-inherent/src/lib.rs @@ -133,7 +133,6 @@ async fn collect_relay_storage_proof( relevant_keys.push(relay_well_known_keys::NEXT_AUTHORITIES.to_vec()); } - // Include broadcaster published data roots relevant_keys.push(relay_well_known_keys::BROADCASTER_PUBLISHED_DATA_ROOTS.to_vec()); relay_chain_interface diff --git a/cumulus/pallets/parachain-system/src/tests.rs b/cumulus/pallets/parachain-system/src/tests.rs index b069f47a0cb7f..44851d3432a99 100755 --- a/cumulus/pallets/parachain-system/src/tests.rs +++ b/cumulus/pallets/parachain-system/src/tests.rs @@ -1324,6 +1324,30 @@ fn deposits_relay_parent_storage_root() { ); } +#[test] +fn stores_published_data_roots_from_relay_chain() { + BlockTests::new() + .with_relay_sproof_builder(|_, _, sproof| { + let roots = vec![ + (ParaId::from(1000), vec![1u8; 32]), + (ParaId::from(2000), vec![2u8; 32]), + ]; + sproof.published_data_roots = Some(roots); + }) + .add_with_post_test( + 123, + || {}, + || { + let stored = PublishedDataRoots::::get(); + assert_eq!(stored.len(), 2); + assert_eq!(stored[0].0, ParaId::from(1000)); + assert_eq!(stored[0].1, vec![1u8; 32]); + assert_eq!(stored[1].0, ParaId::from(2000)); + assert_eq!(stored[1].1, vec![2u8; 32]); + }, + ); +} + #[test] fn ump_fee_factor_increases_and_decreases() { BlockTests::new() diff --git a/cumulus/test/relay-sproof-builder/src/lib.rs b/cumulus/test/relay-sproof-builder/src/lib.rs index 472ea9ec9e029..bb908a556af80 100644 --- a/cumulus/test/relay-sproof-builder/src/lib.rs +++ b/cumulus/test/relay-sproof-builder/src/lib.rs @@ -49,6 +49,7 @@ pub struct RelayStateSproofBuilder { pub randomness: relay_chain::Hash, pub additional_key_values: Vec<(Vec, Vec)>, pub included_para_head: Option, + pub published_data_roots: Option)>>, } impl Default for RelayStateSproofBuilder { @@ -81,6 +82,7 @@ impl Default for RelayStateSproofBuilder { randomness: relay_chain::Hash::default(), additional_key_values: vec![], included_para_head: None, + published_data_roots: None, } } } @@ -203,6 +205,13 @@ impl RelayStateSproofBuilder { ); insert(relay_chain::well_known_keys::CURRENT_SLOT.to_vec(), self.current_slot.encode()); + if let Some(published_data_roots) = self.published_data_roots { + insert( + relay_chain::well_known_keys::BROADCASTER_PUBLISHED_DATA_ROOTS.to_vec(), + published_data_roots.encode(), + ); + } + for (key, value) in self.additional_key_values { insert(key, value); } From 5df7dcd64570364fa1ac7fc7da9913dad0f9f920 Mon Sep 17 00:00:00 2001 From: metricaez Date: Fri, 3 Oct 2025 19:18:28 -0300 Subject: [PATCH 101/128] choir: clean dev logs --- cumulus/pallets/parachain-system/src/lib.rs | 9 --------- 1 file changed, 9 deletions(-) diff --git a/cumulus/pallets/parachain-system/src/lib.rs b/cumulus/pallets/parachain-system/src/lib.rs index 03cddb045e176..830d0a9c7fc4b 100644 --- a/cumulus/pallets/parachain-system/src/lib.rs +++ b/cumulus/pallets/parachain-system/src/lib.rs @@ -739,21 +739,12 @@ pub mod pallet { // Extract and store published data roots from relay chain state let current_roots = if let Ok(Some(published_roots)) = relay_state_proof.read_published_data_roots() { >::put(&published_roots); - log::debug!( - target: "parachain_system::inherent", - "Stored published data roots from relay chain state" - ); published_roots } else { Vec::new() }; // Process published data from the broadcaster pallet - log::info!( - target: "parachain_system::inherent", - "📨 Received inherent with published_data containing {} publishers", - published_data.len() - ); Self::process_published_data(&published_data, ¤t_roots); ::on_validation_data(&vfp); From 4db8f2c5467fa7c6d0603ef66bfe663d4d02ac40 Mon Sep 17 00:00:00 2001 From: metricaez Date: Fri, 3 Oct 2025 22:09:04 -0300 Subject: [PATCH 102/128] feat: handle clear_prefix failure --- cumulus/pallets/parachain-system/src/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cumulus/pallets/parachain-system/src/lib.rs b/cumulus/pallets/parachain-system/src/lib.rs index 830d0a9c7fc4b..9f362122d4bcc 100644 --- a/cumulus/pallets/parachain-system/src/lib.rs +++ b/cumulus/pallets/parachain-system/src/lib.rs @@ -1392,7 +1392,8 @@ impl Pallet { } // Clear existing data for this publisher - let _ = PublishedData::::clear_prefix(publisher, u32::MAX, None); + let result = PublishedData::::clear_prefix(publisher, u32::MAX, None); + debug_assert!(result.maybe_cursor.is_none()); // Store new data for this publisher for (key, value) in data_entries { From 480fe437d98d47dd327a2d56afa8681335964a10 Mon Sep 17 00:00:00 2001 From: metricaez Date: Fri, 3 Oct 2025 22:12:08 -0300 Subject: [PATCH 103/128] feat: early return --- cumulus/pallets/parachain-system/src/lib.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cumulus/pallets/parachain-system/src/lib.rs b/cumulus/pallets/parachain-system/src/lib.rs index 9f362122d4bcc..aa2d8520e3f5e 100644 --- a/cumulus/pallets/parachain-system/src/lib.rs +++ b/cumulus/pallets/parachain-system/src/lib.rs @@ -1352,6 +1352,11 @@ impl Pallet { published_data: &BTreeMap, Vec)>>, current_roots: &Vec<(ParaId, Vec)>, ) { + + if current_roots.is_empty() && published_data.is_empty() { + return; + } + let previous_roots = >::get(); // Create maps for easier lookup From 3b3d8f06fc4c89e304ef0414322310f8dee85348 Mon Sep 17 00:00:00 2001 From: metricaez Date: Mon, 6 Oct 2025 13:59:09 -0300 Subject: [PATCH 104/128] feat: data storage and processing opt and tests --- cumulus/pallets/parachain-system/src/lib.rs | 98 +++---- cumulus/pallets/parachain-system/src/tests.rs | 242 +++++++++++++++++- 2 files changed, 265 insertions(+), 75 deletions(-) diff --git a/cumulus/pallets/parachain-system/src/lib.rs b/cumulus/pallets/parachain-system/src/lib.rs index aa2d8520e3f5e..ed48e34a01cc8 100644 --- a/cumulus/pallets/parachain-system/src/lib.rs +++ b/cumulus/pallets/parachain-system/src/lib.rs @@ -29,7 +29,7 @@ extern crate alloc; -use alloc::{collections::{btree_map::BTreeMap, btree_set::BTreeSet}, vec, vec::Vec}; +use alloc::{collections::btree_map::BTreeMap, vec, vec::Vec}; use codec::{Decode, DecodeLimit, Encode}; use core::{cmp, marker::PhantomData}; use cumulus_primitives_core::{ @@ -736,13 +736,12 @@ pub mod pallet { >::put(relevant_messaging_state.clone()); >::put(host_config); - // Extract and store published data roots from relay chain state - let current_roots = if let Ok(Some(published_roots)) = relay_state_proof.read_published_data_roots() { - >::put(&published_roots); - published_roots - } else { - Vec::new() - }; + // Extract published data roots from relay chain state + let current_roots = relay_state_proof + .read_published_data_roots() + .ok() + .flatten() + .unwrap_or_default(); // Process published data from the broadcaster pallet Self::process_published_data(&published_data, ¤t_roots); @@ -998,21 +997,13 @@ pub mod pallet { OptionQuery, >; - /// Data roots of published data from broadcaster pallet on relay chain. - /// Contains (ParaId, root_hash) pairs for all publishers, mirroring the relay chain storage. - #[pallet::storage] - pub type PublishedDataRoots = StorageValue< - _, - Vec<(ParaId, Vec)>, // Vector of (Publisher, Root hash) - ValueQuery, - >; - /// Previous data roots of published data, used to detect changes. /// Contains (ParaId, root_hash) pairs from the previous block for comparison. + /// Stored as BTreeMap for efficient lookups without conversion overhead. #[pallet::storage] pub type PreviousPublishedDataRoots = StorageValue< _, - Vec<(ParaId, Vec)>, // Vector of (Publisher, Root hash) + BTreeMap>, ValueQuery, >; @@ -1347,68 +1338,53 @@ impl Pallet { } /// Process published data from the broadcaster pallet and store it in parachain storage. - /// Only processes data for publishers whose trie roots have changed. + /// + /// Uses child trie roots to detect changes between blocks, only updating storage for + /// publishers whose data has changed. Clears data for publishers that have been removed. fn process_published_data( published_data: &BTreeMap, Vec)>>, current_roots: &Vec<(ParaId, Vec)>, ) { - - if current_roots.is_empty() && published_data.is_empty() { - return; - } - let previous_roots = >::get(); - // Create maps for easier lookup - let current_roots_map: BTreeMap> = current_roots.iter() - .map(|(para_id, root)| (*para_id, root)) - .collect(); - let previous_roots_map: BTreeMap> = previous_roots.iter() - .map(|(para_id, root)| (*para_id, root)) - .collect(); - - // Determine which publishers have changed roots - let mut changed_publishers = BTreeSet::new(); - - // Check for new or changed publishers - for (para_id, current_root) in ¤t_roots_map { - if let Some(previous_root) = previous_roots_map.get(para_id) { - if current_root != previous_root { - changed_publishers.insert(*para_id); - } - } else { - // New publisher - changed_publishers.insert(*para_id); - } + if current_roots.is_empty() && published_data.is_empty() && previous_roots.is_empty() { + return; } - // Check for removed publishers - for (para_id, _) in &previous_roots_map { - if !current_roots_map.contains_key(para_id) { - changed_publishers.insert(*para_id); - } - } + // Convert current roots to map for efficient lookups. + let current_roots_map: BTreeMap> = current_roots.iter() + .map(|(para_id, root)| (*para_id, root.clone())) + .collect(); - // Only process data for publishers with changed roots - if !changed_publishers.is_empty() { - for (publisher, data_entries) in published_data { - if !changed_publishers.contains(publisher) { - continue; - } + // Update storage for publishers with changed roots. + for (publisher, data_entries) in published_data { + let should_update = match previous_roots.get(publisher) { + Some(prev_root) => match current_roots_map.get(publisher) { + Some(curr_root) if prev_root == curr_root => false, + _ => true, + }, + None => true, + }; - // Clear existing data for this publisher + if should_update { let result = PublishedData::::clear_prefix(publisher, u32::MAX, None); debug_assert!(result.maybe_cursor.is_none()); - // Store new data for this publisher for (key, value) in data_entries { PublishedData::::insert(publisher, key, value); } } } - // Update previous roots storage for next comparison - >::put(current_roots); + // Clear storage for removed publishers. + for (para_id, _) in previous_roots.iter() { + if !current_roots_map.contains_key(para_id) { + let result = PublishedData::::clear_prefix(para_id, u32::MAX, None); + debug_assert!(result.maybe_cursor.is_none()); + } + } + + >::put(current_roots_map); } diff --git a/cumulus/pallets/parachain-system/src/tests.rs b/cumulus/pallets/parachain-system/src/tests.rs index 44851d3432a99..aa9d8a5128604 100755 --- a/cumulus/pallets/parachain-system/src/tests.rs +++ b/cumulus/pallets/parachain-system/src/tests.rs @@ -1324,30 +1324,244 @@ fn deposits_relay_parent_storage_root() { ); } + #[test] -fn stores_published_data_roots_from_relay_chain() { +fn published_data_root_changes() { BlockTests::new() - .with_relay_sproof_builder(|_, _, sproof| { - let roots = vec![ - (ParaId::from(1000), vec![1u8; 32]), - (ParaId::from(2000), vec![2u8; 32]), - ]; - sproof.published_data_roots = Some(roots); + .with_relay_sproof_builder(|_, relay_block_num, sproof| match relay_block_num { + 1 => { + sproof.published_data_roots = Some(vec![ + (ParaId::from(1000), vec![0xAA; 32]), + ]); + }, + 2 => { + // 1000 - root unchanged + sproof.published_data_roots = Some(vec![ + (ParaId::from(1000), vec![0xAA; 32]), + ]); + }, + 3 => { + // 1000 - root changed + sproof.published_data_roots = Some(vec![ + (ParaId::from(1000), vec![0xBB; 32]), + ]); + }, + _ => unreachable!(), + }) + .with_inherent_data(|_, relay_block_num, data| match relay_block_num { + 1 => { + data.published_data.insert( + ParaId::from(1000), + vec![(b"key1".to_vec(), b"value1".to_vec())], + ); + }, + 2 => { + // same root, data ignored + data.published_data.insert( + ParaId::from(1000), + vec![(b"key1".to_vec(), b"ignored".to_vec())], + ); + }, + 3 => { + data.published_data.insert( + ParaId::from(1000), + vec![(b"key1".to_vec(), b"value2".to_vec())], + ); + }, + _ => unreachable!(), }) .add_with_post_test( - 123, + 1, + || {}, + || { + assert_eq!( + PublishedData::::get(ParaId::from(1000), b"key1".to_vec()), + Some(b"value1".to_vec()) + ); + }, + ) + .add_with_post_test( + 2, + || {}, + || { + assert_eq!( + PublishedData::::get(ParaId::from(1000), b"key1".to_vec()), + Some(b"value1".to_vec()) + ); + }, + ) + .add_with_post_test( + 3, + || {}, + || { + assert_eq!( + PublishedData::::get(ParaId::from(1000), b"key1".to_vec()), + Some(b"value2".to_vec()) + ); + let roots = PreviousPublishedDataRoots::::get(); + assert_eq!(roots.get(&ParaId::from(1000)), Some(&vec![0xBB; 32])); + }, + ); +} + +#[test] +fn published_data_removed_clears_storage() { + BlockTests::new() + .with_relay_sproof_builder(|_, relay_block_num, sproof| { + if relay_block_num == 1 { + sproof.published_data_roots = Some(vec![ + (ParaId::from(1000), vec![0xAA; 32]), + ]); + } else { + // 1000 - removed + sproof.published_data_roots = Some(vec![]); + } + }) + .with_inherent_data(|_, relay_block_num, data| { + if relay_block_num == 1 { + data.published_data.insert( + ParaId::from(1000), + vec![ + (b"key1".to_vec(), b"value1".to_vec()), + (b"key2".to_vec(), b"value2".to_vec()), + (b"key3".to_vec(), b"value3".to_vec()), + ], + ); + } + }) + .add_with_post_test( + 1, + || {}, + || { + assert_eq!( + PublishedData::::get(ParaId::from(1000), b"key1".to_vec()), + Some(b"value1".to_vec()) + ); + assert_eq!( + PublishedData::::get(ParaId::from(1000), b"key2".to_vec()), + Some(b"value2".to_vec()) + ); + assert_eq!( + PublishedData::::get(ParaId::from(1000), b"key3".to_vec()), + Some(b"value3".to_vec()) + ); + }, + ) + .add_with_post_test( + 2, || {}, || { - let stored = PublishedDataRoots::::get(); - assert_eq!(stored.len(), 2); - assert_eq!(stored[0].0, ParaId::from(1000)); - assert_eq!(stored[0].1, vec![1u8; 32]); - assert_eq!(stored[1].0, ParaId::from(2000)); - assert_eq!(stored[1].1, vec![2u8; 32]); + assert_eq!( + PublishedData::::get(ParaId::from(1000), b"key1".to_vec()), + None + ); + assert_eq!( + PublishedData::::get(ParaId::from(1000), b"key2".to_vec()), + None + ); + assert_eq!( + PublishedData::::get(ParaId::from(1000), b"key3".to_vec()), + None + ); + let roots = PreviousPublishedDataRoots::::get(); + assert!(!roots.contains_key(&ParaId::from(1000))); }, ); } +#[test] +fn published_data_multiple_publishers() { + BlockTests::new() + .with_relay_sproof_builder(|_, relay_block_num, sproof| match relay_block_num { + 1 => { + sproof.published_data_roots = Some(vec![]); + }, + 2 => { + // 1000, 2000 - appear + sproof.published_data_roots = Some(vec![ + (ParaId::from(1000), vec![0xAA; 32]), + (ParaId::from(2000), vec![0xBB; 32]), + ]); + }, + 3 => { + // 1000 - removed, 2000 - remains + sproof.published_data_roots = Some(vec![ + (ParaId::from(2000), vec![0xBB; 32]), + ]); + }, + _ => unreachable!(), + }) + .with_inherent_data(|_, relay_block_num, data| match relay_block_num { + 1 => {}, + 2 => { + data.published_data.insert( + ParaId::from(1000), + vec![(b"key1".to_vec(), b"value1".to_vec())], + ); + data.published_data.insert( + ParaId::from(2000), + vec![(b"key2".to_vec(), b"value2".to_vec())], + ); + }, + 3 => { + data.published_data.insert( + ParaId::from(2000), + vec![(b"key2".to_vec(), b"value2".to_vec())], + ); + }, + _ => unreachable!(), + }) + .add_with_post_test( + 1, + || {}, + || { + let roots = PreviousPublishedDataRoots::::get(); + assert!(roots.is_empty()); + }, + ) + .add_with_post_test( + 2, + || {}, + || { + assert_eq!( + PublishedData::::get(ParaId::from(1000), b"key1".to_vec()), + Some(b"value1".to_vec()) + ); + assert_eq!( + PublishedData::::get(ParaId::from(2000), b"key2".to_vec()), + Some(b"value2".to_vec()) + ); + + let roots = PreviousPublishedDataRoots::::get(); + assert_eq!(roots.len(), 2); + assert_eq!(roots.get(&ParaId::from(1000)), Some(&vec![0xAA; 32])); + assert_eq!(roots.get(&ParaId::from(2000)), Some(&vec![0xBB; 32])); + }, + ) + .add_with_post_test( + 3, + || {}, + || { + // 1000 - cleared + assert_eq!( + PublishedData::::get(ParaId::from(1000), b"key1".to_vec()), + None + ); + // 2000 - intact + assert_eq!( + PublishedData::::get(ParaId::from(2000), b"key2".to_vec()), + Some(b"value2".to_vec()) + ); + + let roots = PreviousPublishedDataRoots::::get(); + assert_eq!(roots.len(), 1); + assert!(!roots.contains_key(&ParaId::from(1000))); + assert_eq!(roots.get(&ParaId::from(2000)), Some(&vec![0xBB; 32])); + }, + ); +} + + #[test] fn ump_fee_factor_increases_and_decreases() { BlockTests::new() From 998d4ce4be169fe3c54a33812c2a2db066ecaa4f Mon Sep 17 00:00:00 2001 From: metricaez Date: Tue, 7 Oct 2025 09:22:33 -0300 Subject: [PATCH 105/128] feat: benchmarking for parachain-system --- .../parachain-system/src/benchmarking.rs | 53 ++++++ cumulus/pallets/parachain-system/src/lib.rs | 20 ++- .../pallets/parachain-system/src/weights.rs | 155 ++++++++++++------ .../cumulus_pallet_parachain_system.rs | 19 +++ .../cumulus_pallet_parachain_system.rs | 19 +++ .../cumulus_pallet_parachain_system.rs | 19 +++ .../cumulus_pallet_parachain_system.rs | 19 +++ .../cumulus_pallet_parachain_system.rs | 19 +++ .../cumulus_pallet_parachain_system.rs | 19 +++ .../cumulus_pallet_parachain_system.rs | 19 +++ .../cumulus_pallet_parachain_system.rs | 19 +++ .../cumulus_pallet_parachain_system.rs | 19 +++ .../cumulus_pallet_parachain_system.rs | 19 +++ pubsub-dev/benchmark_parachain_system.sh | 47 ++++++ .../cumulus_pallet_parachain_system.rs | 19 +++ 15 files changed, 431 insertions(+), 53 deletions(-) create mode 100755 pubsub-dev/benchmark_parachain_system.sh diff --git a/cumulus/pallets/parachain-system/src/benchmarking.rs b/cumulus/pallets/parachain-system/src/benchmarking.rs index 8f97d12a48091..613c65f27b6c2 100644 --- a/cumulus/pallets/parachain-system/src/benchmarking.rs +++ b/cumulus/pallets/parachain-system/src/benchmarking.rs @@ -50,6 +50,59 @@ mod benchmarks { assert_eq!(LastDmqMqcHead::::get().head(), head); } + /// Benchmark processing published data from the broadcaster pallet. + /// + /// - `p`: Number of publishers with changed data + /// - `k`: Number of key-value pairs per publisher + /// - `v`: Size of each value in bytes + #[benchmark] + fn process_published_data( + p: Linear<1, 100>, + k: Linear<1, 16>, + v: Linear<1, 1024>, + ) { + use alloc::collections::BTreeMap; + + // Populate storage with existing data to maximize clear_prefix cost + for i in 0..p { + let para_id = ParaId::from(1000 + i); + for j in 0..k { + PublishedData::::insert( + para_id, + vec![j as u8; 32], + vec![0u8; v as usize], + ); + } + } + + // Store initial roots + let initial_roots: BTreeMap> = (0..p) + .map(|i| (ParaId::from(1000 + i), vec![0xBB; 32])) + .collect(); + PreviousPublishedDataRoots::::put(initial_roots); + + // Prepare new data with changed roots + let mut published_data = BTreeMap::new(); + let mut current_roots = Vec::new(); + + for i in 0..p { + let para_id = ParaId::from(1000 + i); + let entries: Vec<(Vec, Vec)> = (0..k) + .map(|j| (vec![j as u8; 32], vec![1u8; v as usize])) + .collect(); + published_data.insert(para_id, entries); + current_roots.push((para_id, vec![0xAA; 32])); + } + + #[block] + { + Pallet::::process_published_data(&published_data, ¤t_roots); + } + + // Verify storage updated + assert_eq!(PreviousPublishedDataRoots::::get().len(), p as usize); + } + /// Re-implements an easy version of the `MessageQueueChain` for testing purposes. fn mqp_head(msgs: &Vec) -> RelayHash { let mut head = Default::default(); diff --git a/cumulus/pallets/parachain-system/src/lib.rs b/cumulus/pallets/parachain-system/src/lib.rs index ed48e34a01cc8..f7896210a8442 100644 --- a/cumulus/pallets/parachain-system/src/lib.rs +++ b/cumulus/pallets/parachain-system/src/lib.rs @@ -744,7 +744,7 @@ pub mod pallet { .unwrap_or_default(); // Process published data from the broadcaster pallet - Self::process_published_data(&published_data, ¤t_roots); + total_weight.saturating_accrue(Self::process_published_data(&published_data, ¤t_roots)); ::on_validation_data(&vfp); @@ -1344,13 +1344,25 @@ impl Pallet { fn process_published_data( published_data: &BTreeMap, Vec)>>, current_roots: &Vec<(ParaId, Vec)>, - ) { + ) -> Weight { let previous_roots = >::get(); if current_roots.is_empty() && published_data.is_empty() && previous_roots.is_empty() { - return; + return T::DbWeight::get().reads(1); } + // Calculate weight parameters for benchmarking + let p = published_data.len() as u32; + let k = published_data.values() + .map(|entries| entries.len() as u32) + .max() + .unwrap_or(0); + let v = published_data.values() + .flat_map(|entries| entries.iter()) + .map(|(_, value)| value.len() as u32) + .max() + .unwrap_or(0); + // Convert current roots to map for efficient lookups. let current_roots_map: BTreeMap> = current_roots.iter() .map(|(para_id, root)| (*para_id, root.clone())) @@ -1385,6 +1397,8 @@ impl Pallet { } >::put(current_roots_map); + + T::WeightInfo::process_published_data(p, k, v) } diff --git a/cumulus/pallets/parachain-system/src/weights.rs b/cumulus/pallets/parachain-system/src/weights.rs index ba7d8b1e87f6b..c61fd30f25d4e 100644 --- a/cumulus/pallets/parachain-system/src/weights.rs +++ b/cumulus/pallets/parachain-system/src/weights.rs @@ -1,5 +1,6 @@ +// This file is part of Substrate. + // Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Cumulus. // SPDX-License-Identifier: Apache-2.0 // Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,13 +15,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -//! Autogenerated weights for cumulus_pallet_parachain_system + +//! Autogenerated weights for `cumulus_pallet_parachain_system` //! -//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-03-28, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 49.1.0 +//! DATE: 2025-10-06, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `i9`, CPU: `13th Gen Intel(R) Core(TM) i9-13900K` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westmint-dev"), DB CACHE: 1024 +//! HOSTNAME: `192.168.1.3`, CPU: `` +//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("westmint-dev")`, DB CACHE: `1024` // Executed Command: // ./target/release/polkadot-parachain @@ -36,80 +38,133 @@ // wasm // --wasm-execution // compiled -// --output -// pallets/parachain-system/src/weights.rs // --steps // 50 // --repeat // 20 +// --output +// ./cumulus/pallets/parachain-system/src/weights.rs // --template -// ../substrate/.maintain/frame-weight-template.hbs +// ./substrate/.maintain/frame-weight-template.hbs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] +#![allow(missing_docs)] +#![allow(dead_code)] use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; use core::marker::PhantomData; -/// Weight functions needed for cumulus_pallet_parachain_system. +/// Weight functions needed for `cumulus_pallet_parachain_system`. pub trait WeightInfo { fn enqueue_inbound_downward_messages(n: u32, ) -> Weight; + fn process_published_data(p: u32, k: u32, v: u32, ) -> Weight; } -/// Weights for cumulus_pallet_parachain_system using the Substrate node and recommended hardware. +/// Weights for `cumulus_pallet_parachain_system` using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl WeightInfo for SubstrateWeight { - /// Storage: ParachainSystem LastDmqMqcHead (r:1 w:1) - /// Proof Skipped: ParachainSystem LastDmqMqcHead (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: ParachainSystem ReservedDmpWeightOverride (r:1 w:0) - /// Proof Skipped: ParachainSystem ReservedDmpWeightOverride (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: MessageQueue BookStateFor (r:1 w:1) - /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) - /// Storage: MessageQueue ServiceHead (r:1 w:1) - /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) - /// Storage: ParachainSystem ProcessedDownwardMessages (r:0 w:1) - /// Proof Skipped: ParachainSystem ProcessedDownwardMessages (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: MessageQueue Pages (r:0 w:16) - /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + /// Storage: `ParachainSystem::LastDmqMqcHead` (r:1 w:1) + /// Proof: `ParachainSystem::LastDmqMqcHead` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `MessageQueue::BookStateFor` (r:1 w:1) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::ServiceHead` (r:1 w:1) + /// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`) + /// Storage: `ParachainSystem::ProcessedDownwardMessages` (r:0 w:1) + /// Proof: `ParachainSystem::ProcessedDownwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `MessageQueue::Pages` (r:0 w:1000) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `MaxEncodedLen`) /// The range of component `n` is `[0, 1000]`. fn enqueue_inbound_downward_messages(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `12` - // Estimated: `8013` - // Minimum execution time: 1_625_000 picoseconds. - Weight::from_parts(1_735_000, 8013) - // Standard Error: 14_563 - .saturating_add(Weight::from_parts(25_300_108, 0).saturating_mul(n.into())) - .saturating_add(T::DbWeight::get().reads(4_u64)) + // Measured: `84` + // Estimated: `3517` + // Minimum execution time: 2_000_000 picoseconds. + Weight::from_parts(228_591_515, 3517) + // Standard Error: 42_210 + .saturating_add(Weight::from_parts(99_122_122, 0).saturating_mul(n.into())) + .saturating_add(T::DbWeight::get().reads(3_u64)) .saturating_add(T::DbWeight::get().writes(4_u64)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into()))) + } + /// Storage: `ParachainSystem::PreviousPublishedDataRoots` (r:1 w:1) + /// Proof: `ParachainSystem::PreviousPublishedDataRoots` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::PublishedData` (r:1600 w:1600) + /// Proof: `ParachainSystem::PublishedData` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `p` is `[1, 100]`. + /// The range of component `k` is `[1, 16]`. + /// The range of component `v` is `[1, 1024]`. + fn process_published_data(p: u32, k: u32, _v: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0 + k * (8700 ±0) + p * (1453 ±0)` + // Estimated: `42129 + k * (152196 ±69) + p * (24762 ±11)` + // Minimum execution time: 44_000_000 picoseconds. + Weight::from_parts(47_000_000, 42129) + // Standard Error: 358_553 + .saturating_add(Weight::from_parts(30_340_884, 0).saturating_mul(p.into())) + // Standard Error: 2_254_225 + .saturating_add(Weight::from_parts(160_483_325, 0).saturating_mul(k.into())) + .saturating_add(T::DbWeight::get().reads(17_u64)) + .saturating_add(T::DbWeight::get().reads((10_u64).saturating_mul(p.into()))) + .saturating_add(T::DbWeight::get().reads((59_u64).saturating_mul(k.into()))) + .saturating_add(T::DbWeight::get().writes(17_u64)) + .saturating_add(T::DbWeight::get().writes((10_u64).saturating_mul(p.into()))) + .saturating_add(T::DbWeight::get().writes((59_u64).saturating_mul(k.into()))) + .saturating_add(Weight::from_parts(0, 152196).saturating_mul(k.into())) + .saturating_add(Weight::from_parts(0, 24762).saturating_mul(p.into())) } } -// For backwards compatibility and tests +// For backwards compatibility and tests. impl WeightInfo for () { - /// Storage: ParachainSystem LastDmqMqcHead (r:1 w:1) - /// Proof Skipped: ParachainSystem LastDmqMqcHead (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: ParachainSystem ReservedDmpWeightOverride (r:1 w:0) - /// Proof Skipped: ParachainSystem ReservedDmpWeightOverride (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: MessageQueue BookStateFor (r:1 w:1) - /// Proof: MessageQueue BookStateFor (max_values: None, max_size: Some(52), added: 2527, mode: MaxEncodedLen) - /// Storage: MessageQueue ServiceHead (r:1 w:1) - /// Proof: MessageQueue ServiceHead (max_values: Some(1), max_size: Some(5), added: 500, mode: MaxEncodedLen) - /// Storage: ParachainSystem ProcessedDownwardMessages (r:0 w:1) - /// Proof Skipped: ParachainSystem ProcessedDownwardMessages (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: MessageQueue Pages (r:0 w:16) - /// Proof: MessageQueue Pages (max_values: None, max_size: Some(65585), added: 68060, mode: MaxEncodedLen) + /// Storage: `ParachainSystem::LastDmqMqcHead` (r:1 w:1) + /// Proof: `ParachainSystem::LastDmqMqcHead` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `MessageQueue::BookStateFor` (r:1 w:1) + /// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`) + /// Storage: `MessageQueue::ServiceHead` (r:1 w:1) + /// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`) + /// Storage: `ParachainSystem::ProcessedDownwardMessages` (r:0 w:1) + /// Proof: `ParachainSystem::ProcessedDownwardMessages` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `MessageQueue::Pages` (r:0 w:1000) + /// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `MaxEncodedLen`) /// The range of component `n` is `[0, 1000]`. fn enqueue_inbound_downward_messages(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `12` - // Estimated: `8013` - // Minimum execution time: 1_625_000 picoseconds. - Weight::from_parts(1_735_000, 8013) - // Standard Error: 14_563 - .saturating_add(Weight::from_parts(25_300_108, 0).saturating_mul(n.into())) - .saturating_add(RocksDbWeight::get().reads(4_u64)) + // Measured: `84` + // Estimated: `3517` + // Minimum execution time: 2_000_000 picoseconds. + Weight::from_parts(228_591_515, 3517) + // Standard Error: 42_210 + .saturating_add(Weight::from_parts(99_122_122, 0).saturating_mul(n.into())) + .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) + .saturating_add(RocksDbWeight::get().writes((1_u64).saturating_mul(n.into()))) + } + /// Storage: `ParachainSystem::PreviousPublishedDataRoots` (r:1 w:1) + /// Proof: `ParachainSystem::PreviousPublishedDataRoots` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) + /// Storage: `ParachainSystem::PublishedData` (r:1600 w:1600) + /// Proof: `ParachainSystem::PublishedData` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `p` is `[1, 100]`. + /// The range of component `k` is `[1, 16]`. + /// The range of component `v` is `[1, 1024]`. + fn process_published_data(p: u32, k: u32, _v: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `0 + k * (8700 ±0) + p * (1453 ±0)` + // Estimated: `42129 + k * (152196 ±69) + p * (24762 ±11)` + // Minimum execution time: 44_000_000 picoseconds. + Weight::from_parts(47_000_000, 42129) + // Standard Error: 358_553 + .saturating_add(Weight::from_parts(30_340_884, 0).saturating_mul(p.into())) + // Standard Error: 2_254_225 + .saturating_add(Weight::from_parts(160_483_325, 0).saturating_mul(k.into())) + .saturating_add(RocksDbWeight::get().reads(17_u64)) + .saturating_add(RocksDbWeight::get().reads((10_u64).saturating_mul(p.into()))) + .saturating_add(RocksDbWeight::get().reads((59_u64).saturating_mul(k.into()))) + .saturating_add(RocksDbWeight::get().writes(17_u64)) + .saturating_add(RocksDbWeight::get().writes((10_u64).saturating_mul(p.into()))) + .saturating_add(RocksDbWeight::get().writes((59_u64).saturating_mul(k.into()))) + .saturating_add(Weight::from_parts(0, 152196).saturating_mul(k.into())) + .saturating_add(Weight::from_parts(0, 24762).saturating_mul(p.into())) } } diff --git a/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/weights/cumulus_pallet_parachain_system.rs b/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/weights/cumulus_pallet_parachain_system.rs index 23dd800922aea..7016c2258de6f 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/weights/cumulus_pallet_parachain_system.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/weights/cumulus_pallet_parachain_system.rs @@ -74,4 +74,23 @@ impl cumulus_pallet_parachain_system::WeightInfo for We .saturating_add(T::DbWeight::get().writes(4)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into()))) } + + /// Storage: ParachainSystem PreviousPublishedDataRoots (r:1 w:1) + /// Proof Skipped: ParachainSystem PreviousPublishedDataRoots (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ParachainSystem PublishedData (r:0 w:1600) + /// Proof Skipped: ParachainSystem PublishedData (max_values: None, max_size: None, mode: Measured) + /// The range of component `p` is `[1, 100]`. + /// The range of component `k` is `[1, 16]`. + /// The range of component `v` is `[1, 1024]`. + // TODO: Placeholder weight. Needs to be benchmarked for this specific runtime. + fn process_published_data(p: u32, k: u32, v: u32, ) -> Weight { + Weight::from_parts(5_000_000, 0) + .saturating_add(Weight::from_parts(50_000_000, 0).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(10_000_000, 0).saturating_mul(k.into())) + .saturating_add(Weight::from_parts(5_000, 0).saturating_mul(v.into())) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(p.into()))) + .saturating_add(T::DbWeight::get().writes((k as u64).saturating_mul(p.into()))) + } } diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/cumulus_pallet_parachain_system.rs b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/cumulus_pallet_parachain_system.rs index 28f8aca5f5e7e..9d1e942f7c810 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/cumulus_pallet_parachain_system.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/cumulus_pallet_parachain_system.rs @@ -74,4 +74,23 @@ impl cumulus_pallet_parachain_system::WeightInfo for We .saturating_add(T::DbWeight::get().writes(4)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into()))) } + + /// Storage: ParachainSystem PreviousPublishedDataRoots (r:1 w:1) + /// Proof Skipped: ParachainSystem PreviousPublishedDataRoots (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ParachainSystem PublishedData (r:0 w:1600) + /// Proof Skipped: ParachainSystem PublishedData (max_values: None, max_size: None, mode: Measured) + /// The range of component `p` is `[1, 100]`. + /// The range of component `k` is `[1, 16]`. + /// The range of component `v` is `[1, 1024]`. + // TODO: Placeholder weight. Needs to be benchmarked for this specific runtime. + fn process_published_data(p: u32, k: u32, v: u32, ) -> Weight { + Weight::from_parts(5_000_000, 0) + .saturating_add(Weight::from_parts(50_000_000, 0).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(10_000_000, 0).saturating_mul(k.into())) + .saturating_add(Weight::from_parts(5_000, 0).saturating_mul(v.into())) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(p.into()))) + .saturating_add(T::DbWeight::get().writes((k as u64).saturating_mul(p.into()))) + } } diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/cumulus_pallet_parachain_system.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/cumulus_pallet_parachain_system.rs index 145a6e3e3cf1b..11d5a73440446 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/cumulus_pallet_parachain_system.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/cumulus_pallet_parachain_system.rs @@ -74,4 +74,23 @@ impl cumulus_pallet_parachain_system::WeightInfo for We .saturating_add(T::DbWeight::get().writes(4)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into()))) } + + /// Storage: ParachainSystem PreviousPublishedDataRoots (r:1 w:1) + /// Proof Skipped: ParachainSystem PreviousPublishedDataRoots (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ParachainSystem PublishedData (r:0 w:1600) + /// Proof Skipped: ParachainSystem PublishedData (max_values: None, max_size: None, mode: Measured) + /// The range of component `p` is `[1, 100]`. + /// The range of component `k` is `[1, 16]`. + /// The range of component `v` is `[1, 1024]`. + // TODO: Placeholder weight. Needs to be benchmarked for this specific runtime. + fn process_published_data(p: u32, k: u32, v: u32, ) -> Weight { + Weight::from_parts(5_000_000, 0) + .saturating_add(Weight::from_parts(50_000_000, 0).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(10_000_000, 0).saturating_mul(k.into())) + .saturating_add(Weight::from_parts(5_000, 0).saturating_mul(v.into())) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(p.into()))) + .saturating_add(T::DbWeight::get().writes((k as u64).saturating_mul(p.into()))) + } } diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/weights/cumulus_pallet_parachain_system.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/weights/cumulus_pallet_parachain_system.rs index e60c9cfde30e5..8b86d726e639f 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/weights/cumulus_pallet_parachain_system.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/weights/cumulus_pallet_parachain_system.rs @@ -74,4 +74,23 @@ impl cumulus_pallet_parachain_system::WeightInfo for We .saturating_add(T::DbWeight::get().writes(4)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into()))) } + + /// Storage: ParachainSystem PreviousPublishedDataRoots (r:1 w:1) + /// Proof Skipped: ParachainSystem PreviousPublishedDataRoots (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ParachainSystem PublishedData (r:0 w:1600) + /// Proof Skipped: ParachainSystem PublishedData (max_values: None, max_size: None, mode: Measured) + /// The range of component `p` is `[1, 100]`. + /// The range of component `k` is `[1, 16]`. + /// The range of component `v` is `[1, 1024]`. + // TODO: Placeholder weight. Needs to be benchmarked for this specific runtime. + fn process_published_data(p: u32, k: u32, v: u32, ) -> Weight { + Weight::from_parts(5_000_000, 0) + .saturating_add(Weight::from_parts(50_000_000, 0).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(10_000_000, 0).saturating_mul(k.into())) + .saturating_add(Weight::from_parts(5_000, 0).saturating_mul(v.into())) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(p.into()))) + .saturating_add(T::DbWeight::get().writes((k as u64).saturating_mul(p.into()))) + } } diff --git a/cumulus/parachains/runtimes/collectives/collectives-westend/src/weights/cumulus_pallet_parachain_system.rs b/cumulus/parachains/runtimes/collectives/collectives-westend/src/weights/cumulus_pallet_parachain_system.rs index 9ebfbd2fbd0a3..9aeb5cc12b227 100644 --- a/cumulus/parachains/runtimes/collectives/collectives-westend/src/weights/cumulus_pallet_parachain_system.rs +++ b/cumulus/parachains/runtimes/collectives/collectives-westend/src/weights/cumulus_pallet_parachain_system.rs @@ -74,4 +74,23 @@ impl cumulus_pallet_parachain_system::WeightInfo for We .saturating_add(T::DbWeight::get().writes(4)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into()))) } + + /// Storage: ParachainSystem PreviousPublishedDataRoots (r:1 w:1) + /// Proof Skipped: ParachainSystem PreviousPublishedDataRoots (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ParachainSystem PublishedData (r:0 w:1600) + /// Proof Skipped: ParachainSystem PublishedData (max_values: None, max_size: None, mode: Measured) + /// The range of component `p` is `[1, 100]`. + /// The range of component `k` is `[1, 16]`. + /// The range of component `v` is `[1, 1024]`. + // TODO: Placeholder weight. Needs to be benchmarked for this specific runtime. + fn process_published_data(p: u32, k: u32, v: u32, ) -> Weight { + Weight::from_parts(5_000_000, 0) + .saturating_add(Weight::from_parts(50_000_000, 0).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(10_000_000, 0).saturating_mul(k.into())) + .saturating_add(Weight::from_parts(5_000, 0).saturating_mul(v.into())) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(p.into()))) + .saturating_add(T::DbWeight::get().writes((k as u64).saturating_mul(p.into()))) + } } diff --git a/cumulus/parachains/runtimes/coretime/coretime-rococo/src/weights/cumulus_pallet_parachain_system.rs b/cumulus/parachains/runtimes/coretime/coretime-rococo/src/weights/cumulus_pallet_parachain_system.rs index 73c4b2ba241d2..ea3e6abc4f2ab 100644 --- a/cumulus/parachains/runtimes/coretime/coretime-rococo/src/weights/cumulus_pallet_parachain_system.rs +++ b/cumulus/parachains/runtimes/coretime/coretime-rococo/src/weights/cumulus_pallet_parachain_system.rs @@ -74,4 +74,23 @@ impl cumulus_pallet_parachain_system::WeightInfo for We .saturating_add(T::DbWeight::get().writes(4)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into()))) } + + /// Storage: ParachainSystem PreviousPublishedDataRoots (r:1 w:1) + /// Proof Skipped: ParachainSystem PreviousPublishedDataRoots (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ParachainSystem PublishedData (r:0 w:1600) + /// Proof Skipped: ParachainSystem PublishedData (max_values: None, max_size: None, mode: Measured) + /// The range of component `p` is `[1, 100]`. + /// The range of component `k` is `[1, 16]`. + /// The range of component `v` is `[1, 1024]`. + // TODO: Placeholder weight. Needs to be benchmarked for this specific runtime. + fn process_published_data(p: u32, k: u32, v: u32, ) -> Weight { + Weight::from_parts(5_000_000, 0) + .saturating_add(Weight::from_parts(50_000_000, 0).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(10_000_000, 0).saturating_mul(k.into())) + .saturating_add(Weight::from_parts(5_000, 0).saturating_mul(v.into())) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(p.into()))) + .saturating_add(T::DbWeight::get().writes((k as u64).saturating_mul(p.into()))) + } } diff --git a/cumulus/parachains/runtimes/coretime/coretime-westend/src/weights/cumulus_pallet_parachain_system.rs b/cumulus/parachains/runtimes/coretime/coretime-westend/src/weights/cumulus_pallet_parachain_system.rs index 8f5714bbe0cd7..2c34ccd856ca6 100644 --- a/cumulus/parachains/runtimes/coretime/coretime-westend/src/weights/cumulus_pallet_parachain_system.rs +++ b/cumulus/parachains/runtimes/coretime/coretime-westend/src/weights/cumulus_pallet_parachain_system.rs @@ -74,4 +74,23 @@ impl cumulus_pallet_parachain_system::WeightInfo for We .saturating_add(T::DbWeight::get().writes(4)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into()))) } + + /// Storage: ParachainSystem PreviousPublishedDataRoots (r:1 w:1) + /// Proof Skipped: ParachainSystem PreviousPublishedDataRoots (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ParachainSystem PublishedData (r:0 w:1600) + /// Proof Skipped: ParachainSystem PublishedData (max_values: None, max_size: None, mode: Measured) + /// The range of component `p` is `[1, 100]`. + /// The range of component `k` is `[1, 16]`. + /// The range of component `v` is `[1, 1024]`. + // TODO: Placeholder weight. Needs to be benchmarked for this specific runtime. + fn process_published_data(p: u32, k: u32, v: u32, ) -> Weight { + Weight::from_parts(5_000_000, 0) + .saturating_add(Weight::from_parts(50_000_000, 0).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(10_000_000, 0).saturating_mul(k.into())) + .saturating_add(Weight::from_parts(5_000, 0).saturating_mul(v.into())) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(p.into()))) + .saturating_add(T::DbWeight::get().writes((k as u64).saturating_mul(p.into()))) + } } diff --git a/cumulus/parachains/runtimes/glutton/glutton-westend/src/weights/cumulus_pallet_parachain_system.rs b/cumulus/parachains/runtimes/glutton/glutton-westend/src/weights/cumulus_pallet_parachain_system.rs index a753f6fc78f87..e38525e1c9c79 100644 --- a/cumulus/parachains/runtimes/glutton/glutton-westend/src/weights/cumulus_pallet_parachain_system.rs +++ b/cumulus/parachains/runtimes/glutton/glutton-westend/src/weights/cumulus_pallet_parachain_system.rs @@ -75,4 +75,23 @@ impl cumulus_pallet_parachain_system::WeightInfo for We .saturating_add(T::DbWeight::get().writes(4)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into()))) } + + /// Storage: ParachainSystem PreviousPublishedDataRoots (r:1 w:1) + /// Proof Skipped: ParachainSystem PreviousPublishedDataRoots (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ParachainSystem PublishedData (r:0 w:1600) + /// Proof Skipped: ParachainSystem PublishedData (max_values: None, max_size: None, mode: Measured) + /// The range of component `p` is `[1, 100]`. + /// The range of component `k` is `[1, 16]`. + /// The range of component `v` is `[1, 1024]`. + // TODO: Placeholder weight. Needs to be benchmarked for this specific runtime. + fn process_published_data(p: u32, k: u32, v: u32, ) -> Weight { + Weight::from_parts(5_000_000, 0) + .saturating_add(Weight::from_parts(50_000_000, 0).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(10_000_000, 0).saturating_mul(k.into())) + .saturating_add(Weight::from_parts(5_000, 0).saturating_mul(v.into())) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(p.into()))) + .saturating_add(T::DbWeight::get().writes((k as u64).saturating_mul(p.into()))) + } } diff --git a/cumulus/parachains/runtimes/people/people-rococo/src/weights/cumulus_pallet_parachain_system.rs b/cumulus/parachains/runtimes/people/people-rococo/src/weights/cumulus_pallet_parachain_system.rs index 58aef8cd5ab87..5d0e510624d47 100644 --- a/cumulus/parachains/runtimes/people/people-rococo/src/weights/cumulus_pallet_parachain_system.rs +++ b/cumulus/parachains/runtimes/people/people-rococo/src/weights/cumulus_pallet_parachain_system.rs @@ -74,4 +74,23 @@ impl cumulus_pallet_parachain_system::WeightInfo for We .saturating_add(T::DbWeight::get().writes(4)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into()))) } + + /// Storage: ParachainSystem PreviousPublishedDataRoots (r:1 w:1) + /// Proof Skipped: ParachainSystem PreviousPublishedDataRoots (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ParachainSystem PublishedData (r:0 w:1600) + /// Proof Skipped: ParachainSystem PublishedData (max_values: None, max_size: None, mode: Measured) + /// The range of component `p` is `[1, 100]`. + /// The range of component `k` is `[1, 16]`. + /// The range of component `v` is `[1, 1024]`. + // TODO: Placeholder weight. Needs to be benchmarked for this specific runtime. + fn process_published_data(p: u32, k: u32, v: u32, ) -> Weight { + Weight::from_parts(5_000_000, 0) + .saturating_add(Weight::from_parts(50_000_000, 0).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(10_000_000, 0).saturating_mul(k.into())) + .saturating_add(Weight::from_parts(5_000, 0).saturating_mul(v.into())) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(p.into()))) + .saturating_add(T::DbWeight::get().writes((k as u64).saturating_mul(p.into()))) + } } diff --git a/cumulus/parachains/runtimes/people/people-westend/src/weights/cumulus_pallet_parachain_system.rs b/cumulus/parachains/runtimes/people/people-westend/src/weights/cumulus_pallet_parachain_system.rs index 05c07f998e8e2..4091c2270e1eb 100644 --- a/cumulus/parachains/runtimes/people/people-westend/src/weights/cumulus_pallet_parachain_system.rs +++ b/cumulus/parachains/runtimes/people/people-westend/src/weights/cumulus_pallet_parachain_system.rs @@ -74,4 +74,23 @@ impl cumulus_pallet_parachain_system::WeightInfo for We .saturating_add(T::DbWeight::get().writes(4)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into()))) } + + /// Storage: ParachainSystem PreviousPublishedDataRoots (r:1 w:1) + /// Proof Skipped: ParachainSystem PreviousPublishedDataRoots (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ParachainSystem PublishedData (r:0 w:1600) + /// Proof Skipped: ParachainSystem PublishedData (max_values: None, max_size: None, mode: Measured) + /// The range of component `p` is `[1, 100]`. + /// The range of component `k` is `[1, 16]`. + /// The range of component `v` is `[1, 1024]`. + // TODO: Placeholder weight. Needs to be benchmarked for this specific runtime. + fn process_published_data(p: u32, k: u32, v: u32, ) -> Weight { + Weight::from_parts(5_000_000, 0) + .saturating_add(Weight::from_parts(50_000_000, 0).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(10_000_000, 0).saturating_mul(k.into())) + .saturating_add(Weight::from_parts(5_000, 0).saturating_mul(v.into())) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(p.into()))) + .saturating_add(T::DbWeight::get().writes((k as u64).saturating_mul(p.into()))) + } } diff --git a/pubsub-dev/benchmark_parachain_system.sh b/pubsub-dev/benchmark_parachain_system.sh new file mode 100755 index 0000000000000..762fb7db3268a --- /dev/null +++ b/pubsub-dev/benchmark_parachain_system.sh @@ -0,0 +1,47 @@ +#!/bin/bash + +echo "🔨 Building polkadot-parachain with runtime-benchmarks feature for parachain-system benchmarks..." +echo + +# Build polkadot-parachain binary with runtime-benchmarks feature +echo "📦 Building polkadot-parachain binary with runtime-benchmarks..." +cargo build --release --features runtime-benchmarks -p polkadot-parachain-bin +if [ $? -ne 0 ]; then + echo "❌ Failed to build polkadot-parachain binary with runtime-benchmarks" + exit 1 +fi +echo "✅ polkadot-parachain binary built successfully with runtime-benchmarks" +echo + +# Run parachain-system benchmarks for westmint (asset-hub-westend) +echo "🏃 Running parachain-system benchmarks for westmint-dev runtime..." +echo " This will benchmark process_published_data and other parachain-system functions" +echo + +./target/release/polkadot-parachain benchmark pallet \ + --chain westmint-dev \ + --pallet cumulus_pallet_parachain_system \ + --extrinsic '*' \ + --execution wasm \ + --wasm-execution compiled \ + --steps 50 \ + --repeat 20 \ + --output ./cumulus/pallets/parachain-system/src/weights.rs \ + --template ./substrate/.maintain/frame-weight-template.hbs + +if [ $? -ne 0 ]; then + echo "❌ Benchmark execution failed" + exit 1 +fi + +echo +echo "✅ Benchmarks completed successfully!" +echo +echo "📍 Generated weight file:" +echo " - Location: cumulus/pallets/parachain-system/src/weights.rs" +echo +echo "📊 The weight file now includes:" +echo " - enqueue_inbound_downward_messages(n) - DMP message processing" +echo " - process_published_data(p, k, v) - Published data processing with 3 parameters" +echo +echo "🎉 Ready to commit the updated weights!" diff --git a/substrate/frame/staking-async/runtimes/parachain/src/weights/cumulus_pallet_parachain_system.rs b/substrate/frame/staking-async/runtimes/parachain/src/weights/cumulus_pallet_parachain_system.rs index b91921ce85eb1..c3f4555f045f2 100644 --- a/substrate/frame/staking-async/runtimes/parachain/src/weights/cumulus_pallet_parachain_system.rs +++ b/substrate/frame/staking-async/runtimes/parachain/src/weights/cumulus_pallet_parachain_system.rs @@ -79,4 +79,23 @@ impl cumulus_pallet_parachain_system::WeightInfo for We .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) } + + /// Storage: ParachainSystem PreviousPublishedDataRoots (r:1 w:1) + /// Proof Skipped: ParachainSystem PreviousPublishedDataRoots (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: ParachainSystem PublishedData (r:0 w:1600) + /// Proof Skipped: ParachainSystem PublishedData (max_values: None, max_size: None, mode: Measured) + /// The range of component `p` is `[1, 100]`. + /// The range of component `k` is `[1, 16]`. + /// The range of component `v` is `[1, 1024]`. + // TODO: Placeholder weight. Needs to be benchmarked for this specific runtime. + fn process_published_data(p: u32, k: u32, v: u32, ) -> Weight { + Weight::from_parts(5_000_000, 0) + .saturating_add(Weight::from_parts(50_000_000, 0).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(10_000_000, 0).saturating_mul(k.into())) + .saturating_add(Weight::from_parts(5_000, 0).saturating_mul(v.into())) + .saturating_add(T::DbWeight::get().reads(1_u64)) + .saturating_add(T::DbWeight::get().writes(1_u64)) + .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(p.into()))) + .saturating_add(T::DbWeight::get().writes((k as u64).saturating_mul(p.into()))) + } } From aa2becdd9f63ed77050b8fae23cb39f4607d5a63 Mon Sep 17 00:00:00 2001 From: metricaez Date: Tue, 7 Oct 2025 13:01:31 -0300 Subject: [PATCH 106/128] feat: better hashing for ParaId --- polkadot/runtime/parachains/src/broadcaster/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/polkadot/runtime/parachains/src/broadcaster/mod.rs b/polkadot/runtime/parachains/src/broadcaster/mod.rs index 013fe387897d5..c387ac5021c84 100644 --- a/polkadot/runtime/parachains/src/broadcaster/mod.rs +++ b/polkadot/runtime/parachains/src/broadcaster/mod.rs @@ -99,7 +99,7 @@ pub mod pallet { #[pallet::storage] pub type PublisherExists = StorageMap< _, - Blake2_128Concat, + Twox64Concat, ParaId, bool, ValueQuery, @@ -109,7 +109,7 @@ pub mod pallet { #[pallet::storage] pub type PublishedKeys = StorageMap< _, - Blake2_128Concat, + Twox64Concat, ParaId, BoundedBTreeSet, T::MaxStoredKeys>, ValueQuery, @@ -122,7 +122,7 @@ pub mod pallet { #[pallet::storage] pub type Subscriptions = StorageMap< _, - Blake2_128Concat, + Twox64Concat, ParaId, // Subscriber BoundedVec, // List of publishers ValueQuery, From ea5317f1a108eca1cdc1ce8fdd550717cccb191c Mon Sep 17 00:00:00 2001 From: metricaez Date: Wed, 8 Oct 2025 08:55:44 -0300 Subject: [PATCH 107/128] choir: some more tests --- .../runtime/parachains/src/broadcaster/mod.rs | 6 + .../parachains/src/broadcaster/tests.rs | 104 ++++++++++++++++++ 2 files changed, 110 insertions(+) diff --git a/polkadot/runtime/parachains/src/broadcaster/mod.rs b/polkadot/runtime/parachains/src/broadcaster/mod.rs index c387ac5021c84..767e45df18107 100644 --- a/polkadot/runtime/parachains/src/broadcaster/mod.rs +++ b/polkadot/runtime/parachains/src/broadcaster/mod.rs @@ -18,6 +18,12 @@ //! //! This pallet provides a publish-subscribe mechanism for parachains to share data //! efficiently through the relay chain storage using child tries per publisher. +//! +//! ## Storage Lifecycle +//! +//! Note: This pallet does not currently implement publisher removal or cleanup mechanisms. +//! Once a parachain publishes data, it remains in storage. Publishers can update their data +//! by publishing again, but there is no explicit removal path. use alloc::{collections::BTreeMap, vec::Vec}; use frame_support::{ diff --git a/polkadot/runtime/parachains/src/broadcaster/tests.rs b/polkadot/runtime/parachains/src/broadcaster/tests.rs index 3e27cdd408006..c64e6bcf92168 100644 --- a/polkadot/runtime/parachains/src/broadcaster/tests.rs +++ b/polkadot/runtime/parachains/src/broadcaster/tests.rs @@ -240,3 +240,107 @@ fn max_stored_keys_limit_enforced() { ); }); } + +#[test] +fn published_keys_storage_matches_child_trie() { + new_test_ext(Default::default()).execute_with(|| { + let para_id = ParaId::from(1000); + + // Publish multiple batches to ensure consistency maintained across updates + let data1 = vec![ + (b"key1".to_vec(), b"value1".to_vec()), + (b"key2".to_vec(), b"value2".to_vec()), + ]; + Broadcaster::handle_publish(para_id, data1).unwrap(); + + // Update some keys, add new ones + let data2 = vec![ + (b"key1".to_vec(), b"updated_value1".to_vec()), + (b"key3".to_vec(), b"value3".to_vec()), + ]; + Broadcaster::handle_publish(para_id, data2).unwrap(); + + let tracked_keys = PublishedKeys::::get(para_id); + let actual_data = Broadcaster::get_all_published_data(para_id); + + // Counts must match + assert_eq!(tracked_keys.len(), actual_data.len()); + + // Every tracked key must exist in child trie + for tracked_key in tracked_keys.iter() { + let key: Vec = tracked_key.clone().into(); + assert!(actual_data.iter().any(|(k, _)| k == &key)); + } + + // Every child trie key must be tracked + for (actual_key, _) in actual_data.iter() { + assert!(tracked_keys.iter().any(|tracked| { + let k: Vec = tracked.clone().into(); + &k == actual_key + })); + } + }); +} + +#[test] +fn subscribe_to_non_publishing_para_returns_empty() { + new_test_ext(Default::default()).execute_with(|| { + let subscriber = ParaId::from(1000); + let non_publisher = ParaId::from(9999); + + // Subscribe to a para that has never published anything + assert_ok!(Broadcaster::handle_subscribe_toggle(subscriber, non_publisher)); + + // Verify subscription was created + assert!(Broadcaster::is_subscribed(subscriber, non_publisher)); + + // Get subscribed data - should return empty for non-publishing para + let subscribed_data = Broadcaster::get_subscribed_data(subscriber); + + // Non-publishing para should not appear in results (filtered out by is_empty check) + assert!(!subscribed_data.contains_key(&non_publisher)); + assert_eq!(subscribed_data.len(), 0); + }); +} + +#[test] +fn multiple_publishers_in_same_block() { + new_test_ext(Default::default()).execute_with(|| { + let para1 = ParaId::from(1000); + let para2 = ParaId::from(2000); + let para3 = ParaId::from(3000); + + // Multiple parachains publish data in the same block + let data1 = vec![(b"key1".to_vec(), b"value1".to_vec())]; + let data2 = vec![(b"key2".to_vec(), b"value2".to_vec())]; + let data3 = vec![(b"key3".to_vec(), b"value3".to_vec())]; + + Broadcaster::handle_publish(para1, data1).unwrap(); + Broadcaster::handle_publish(para2, data2).unwrap(); + Broadcaster::handle_publish(para3, data3).unwrap(); + + // Verify all three publishers exist + assert!(PublisherExists::::get(para1)); + assert!(PublisherExists::::get(para2)); + assert!(PublisherExists::::get(para3)); + + // Verify PublishedDataRoots contains all three + let roots = PublishedDataRoots::::get(); + assert_eq!(roots.len(), 3); + + // Verify each para has its root in the aggregated roots + assert!(roots.iter().any(|(id, _)| *id == para1)); + assert!(roots.iter().any(|(id, _)| *id == para2)); + assert!(roots.iter().any(|(id, _)| *id == para3)); + + // Verify each para's data is independently accessible + assert_eq!(Broadcaster::get_published_value(para1, b"key1"), Some(b"value1".to_vec())); + assert_eq!(Broadcaster::get_published_value(para2, b"key2"), Some(b"value2".to_vec())); + assert_eq!(Broadcaster::get_published_value(para3, b"key3"), Some(b"value3".to_vec())); + + // Verify no cross-contamination + assert_eq!(Broadcaster::get_published_value(para1, b"key2"), None); + assert_eq!(Broadcaster::get_published_value(para2, b"key3"), None); + assert_eq!(Broadcaster::get_published_value(para3, b"key1"), None); + }); +} From 2229ad0bea4a40f8452c1664477f9cef41357369 Mon Sep 17 00:00:00 2001 From: metricaez Date: Wed, 8 Oct 2025 09:22:55 -0300 Subject: [PATCH 108/128] feat: remove one iteration --- cumulus/pallets/parachain-system/src/lib.rs | 23 ++++++++++++--------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/cumulus/pallets/parachain-system/src/lib.rs b/cumulus/pallets/parachain-system/src/lib.rs index f7896210a8442..9733218122659 100644 --- a/cumulus/pallets/parachain-system/src/lib.rs +++ b/cumulus/pallets/parachain-system/src/lib.rs @@ -1352,16 +1352,19 @@ impl Pallet { } // Calculate weight parameters for benchmarking - let p = published_data.len() as u32; - let k = published_data.values() - .map(|entries| entries.len() as u32) - .max() - .unwrap_or(0); - let v = published_data.values() - .flat_map(|entries| entries.iter()) - .map(|(_, value)| value.len() as u32) - .max() - .unwrap_or(0); + let mut p = 0u32; + let mut k = 0u32; + let mut v = 0u32; + + for entries in published_data.values() { + p += 1; + let entry_count = entries.len() as u32; + k = k.max(entry_count); + + for (_, value) in entries { + v = v.max(value.len() as u32); + } + } // Convert current roots to map for efficient lookups. let current_roots_map: BTreeMap> = current_roots.iter() From 89d61620629799cefe73cd53eb133e9318fdd3eb Mon Sep 17 00:00:00 2001 From: metricaez Date: Wed, 3 Dec 2025 12:23:18 -0300 Subject: [PATCH 109/128] feat: remove Subscribe xcm instruction --- .../asset-hub-rococo/src/weights/xcm/mod.rs | 4 - .../asset-hub-westend/src/weights/xcm/mod.rs | 4 - .../bridge-hub-rococo/src/weights/xcm/mod.rs | 4 - .../bridge-hub-westend/src/weights/xcm/mod.rs | 4 - .../src/weights/xcm/mod.rs | 4 - .../coretime-rococo/src/weights/xcm/mod.rs | 4 - .../coretime-westend/src/weights/xcm/mod.rs | 4 - .../people-rococo/src/weights/xcm/mod.rs | 4 - .../people-westend/src/weights/xcm/mod.rs | 4 - .../runtime/parachains/src/broadcaster/mod.rs | 80 +----------- .../parachains/src/broadcaster/traits.rs | 10 +- polkadot/runtime/parachains/src/mock.rs | 1 - polkadot/runtime/rococo/src/lib.rs | 7 +- .../runtime/rococo/src/weights/xcm/mod.rs | 3 - .../xcm/pallet_xcm_benchmarks_generic.rs | 12 -- .../runtime/westend/src/weights/xcm/mod.rs | 4 - .../src/generic/benchmarking.rs | 17 --- polkadot/xcm/pallet-xcm/src/errors.rs | 4 - polkadot/xcm/src/v4/mod.rs | 4 - polkadot/xcm/src/v5/mod.rs | 21 ---- polkadot/xcm/src/v5/traits.rs | 3 - .../xcm/xcm-builder/src/broadcast_adapter.rs | 104 +-------------- polkadot/xcm/xcm-builder/src/test_utils.rs | 24 ---- .../src/tests/publish_subscribe.rs | 119 +----------------- polkadot/xcm/xcm-executor/src/lib.rs | 5 - .../src/traits/broadcast_handler.rs | 11 +- 26 files changed, 14 insertions(+), 451 deletions(-) diff --git a/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/weights/xcm/mod.rs b/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/weights/xcm/mod.rs index 08ca0d1d8d681..4df7ecc11b436 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/weights/xcm/mod.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/weights/xcm/mod.rs @@ -275,8 +275,4 @@ impl XcmWeightInfo for AssetHubRococoXcmWeight { // TODO: Benchmark Weight::from_parts(10_000_000, 0) } - fn subscribe(_: &u32) -> Weight { - // TODO: Benchmark - Weight::from_parts(10_000_000, 0) - } } diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/xcm/mod.rs b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/xcm/mod.rs index 87858cc676343..5dd73c8af806f 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/xcm/mod.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/xcm/mod.rs @@ -306,8 +306,4 @@ impl XcmWeightInfo for AssetHubWestendXcmWeight { // TODO: Benchmark Weight::from_parts(10_000_000, 0) } - fn subscribe(_: &u32) -> Weight { - // TODO: Benchmark - Weight::from_parts(10_000_000, 0) - } } diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/xcm/mod.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/xcm/mod.rs index 951fd5144532f..451ce1859faf6 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/xcm/mod.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/weights/xcm/mod.rs @@ -276,8 +276,4 @@ impl XcmWeightInfo for BridgeHubRococoXcmWeight { // TODO: Benchmark Weight::from_parts(10_000_000, 0) } - fn subscribe(_: &u32) -> Weight { - // TODO: Benchmark - Weight::from_parts(10_000_000, 0) - } } diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/weights/xcm/mod.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/weights/xcm/mod.rs index 0743b0b60ef52..d5bcee559080e 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/weights/xcm/mod.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/weights/xcm/mod.rs @@ -276,8 +276,4 @@ impl XcmWeightInfo for BridgeHubWestendXcmWeight { // TODO: Benchmark Weight::from_parts(10_000_000, 0) } - fn subscribe(_: &u32) -> Weight { - // TODO: Benchmark - Weight::from_parts(10_000_000, 0) - } } diff --git a/cumulus/parachains/runtimes/collectives/collectives-westend/src/weights/xcm/mod.rs b/cumulus/parachains/runtimes/collectives/collectives-westend/src/weights/xcm/mod.rs index 2f0c910ccab59..d766a786469d6 100644 --- a/cumulus/parachains/runtimes/collectives/collectives-westend/src/weights/xcm/mod.rs +++ b/cumulus/parachains/runtimes/collectives/collectives-westend/src/weights/xcm/mod.rs @@ -274,8 +274,4 @@ impl XcmWeightInfo for CollectivesWestendXcmWeight { // TODO: Benchmark Weight::from_parts(10_000_000, 0) } - fn subscribe(_: &u32) -> Weight { - // TODO: Benchmark - Weight::from_parts(10_000_000, 0) - } } diff --git a/cumulus/parachains/runtimes/coretime/coretime-rococo/src/weights/xcm/mod.rs b/cumulus/parachains/runtimes/coretime/coretime-rococo/src/weights/xcm/mod.rs index ff8221a927d0b..283ba18a004f2 100644 --- a/cumulus/parachains/runtimes/coretime/coretime-rococo/src/weights/xcm/mod.rs +++ b/cumulus/parachains/runtimes/coretime/coretime-rococo/src/weights/xcm/mod.rs @@ -274,8 +274,4 @@ impl XcmWeightInfo for CoretimeRococoXcmWeight { // TODO: Benchmark Weight::from_parts(10_000_000, 0) } - fn subscribe(_: &u32) -> Weight { - // TODO: Benchmark - Weight::from_parts(10_000_000, 0) - } } diff --git a/cumulus/parachains/runtimes/coretime/coretime-westend/src/weights/xcm/mod.rs b/cumulus/parachains/runtimes/coretime/coretime-westend/src/weights/xcm/mod.rs index fdb7f1845ea29..cdafed4fd0fde 100644 --- a/cumulus/parachains/runtimes/coretime/coretime-westend/src/weights/xcm/mod.rs +++ b/cumulus/parachains/runtimes/coretime/coretime-westend/src/weights/xcm/mod.rs @@ -273,8 +273,4 @@ impl XcmWeightInfo for CoretimeWestendXcmWeight { // TODO: Benchmark Weight::from_parts(10_000_000, 0) } - fn subscribe(_: &u32) -> Weight { - // TODO: Benchmark - Weight::from_parts(10_000_000, 0) - } } diff --git a/cumulus/parachains/runtimes/people/people-rococo/src/weights/xcm/mod.rs b/cumulus/parachains/runtimes/people/people-rococo/src/weights/xcm/mod.rs index 6f99411170729..ac94c88943576 100644 --- a/cumulus/parachains/runtimes/people/people-rococo/src/weights/xcm/mod.rs +++ b/cumulus/parachains/runtimes/people/people-rococo/src/weights/xcm/mod.rs @@ -273,8 +273,4 @@ impl XcmWeightInfo for PeopleRococoXcmWeight { // TODO: Benchmark Weight::from_parts(10_000_000, 0) } - fn subscribe(_: &u32) -> Weight { - // TODO: Benchmark - Weight::from_parts(10_000_000, 0) - } } diff --git a/cumulus/parachains/runtimes/people/people-westend/src/weights/xcm/mod.rs b/cumulus/parachains/runtimes/people/people-westend/src/weights/xcm/mod.rs index c5f1a1c0a3151..03fe1be972008 100644 --- a/cumulus/parachains/runtimes/people/people-westend/src/weights/xcm/mod.rs +++ b/cumulus/parachains/runtimes/people/people-westend/src/weights/xcm/mod.rs @@ -272,8 +272,4 @@ impl XcmWeightInfo for PeopleWestendXcmWeight { // TODO: Benchmark Weight::from_parts(10_000_000, 0) } - fn subscribe(_: &u32) -> Weight { - // TODO: Benchmark - Weight::from_parts(10_000_000, 0) - } } diff --git a/polkadot/runtime/parachains/src/broadcaster/mod.rs b/polkadot/runtime/parachains/src/broadcaster/mod.rs index 767e45df18107..bea5dfe76543f 100644 --- a/polkadot/runtime/parachains/src/broadcaster/mod.rs +++ b/polkadot/runtime/parachains/src/broadcaster/mod.rs @@ -38,7 +38,7 @@ pub use pallet::*; pub mod runtime_api; mod traits; -pub use traits::PublishSubscribe; +pub use traits::Publish; #[cfg(test)] mod tests; @@ -78,10 +78,6 @@ pub mod pallet { #[pallet::constant] type MaxStoredKeys: Get; - /// Maximum number of publishers a subscriber can subscribe to. - #[pallet::constant] - type MaxSubscriptions: Get; - /// Maximum number of publishers that can have published data. #[pallet::constant] type MaxPublishers: Get; @@ -92,10 +88,6 @@ pub mod pallet { pub enum Event { /// Data published by a parachain. DataPublished { publisher: ParaId, items_count: u32 }, - /// Parachain subscribed to a publisher. - Subscribed { subscriber: ParaId, publisher: ParaId }, - /// Parachain unsubscribed from a publisher. - Unsubscribed { subscriber: ParaId, publisher: ParaId }, } /// Tracks which parachains have published data. @@ -121,19 +113,6 @@ pub mod pallet { ValueQuery, >; - /// Tracks subscriptions: subscriber -> list of publishers. - /// - /// Maps subscriber ParaId to a bounded vector of publisher ParaIds. - /// Empty vec means no subscriptions. - #[pallet::storage] - pub type Subscriptions = StorageMap< - _, - Twox64Concat, - ParaId, // Subscriber - BoundedVec, // List of publishers - ValueQuery, - >; - /// Aggregated child trie roots for all publishers. /// /// Contains (ParaId, child_trie_root) pairs for all parachains that have published data. @@ -155,8 +134,6 @@ pub mod pallet { ValueTooLong, /// Too many unique keys stored for this publisher. TooManyStoredKeys, - /// Too many subscriptions for this subscriber. - TooManySubscriptions, } #[pallet::hooks] @@ -338,63 +315,12 @@ pub mod pallet { pub fn get_all_publishers() -> Vec { PublisherExists::::iter_keys().collect() } - - /// Toggle subscription: subscribe if not subscribed, unsubscribe if subscribed. - pub fn handle_subscribe_toggle( - subscriber: ParaId, - publisher: ParaId, - ) -> DispatchResult { - let mut subscriptions = Subscriptions::::get(subscriber); - - // Check if already subscribed - let event = if let Some(pos) = subscriptions.iter().position(|&p| p == publisher) { - // Already subscribed -> unsubscribe - subscriptions.swap_remove(pos); - Event::Unsubscribed { subscriber, publisher } - } else { - // Not subscribed -> subscribe - subscriptions.try_push(publisher).map_err(|_| Error::::TooManySubscriptions)?; - Event::Subscribed { subscriber, publisher } - }; - - Subscriptions::::insert(subscriber, subscriptions); - Self::deposit_event(event); - - Ok(()) - } - - /// Get all subscriptions for a parachain. - pub fn get_subscriptions(subscriber: ParaId) -> Vec { - Subscriptions::::get(subscriber).into_inner() - } - - /// Check if a parachain is subscribed to a publisher. - pub fn is_subscribed(subscriber: ParaId, publisher: ParaId) -> bool { - Subscriptions::::get(subscriber).contains(&publisher) - } - - /// Get published data from all parachains that the subscriber is subscribed to. - /// Returns a map of Publisher ParaId -> published data. - /// Only includes publishers that have actual data and are subscribed to. - pub fn get_subscribed_data(subscriber_para_id: ParaId) -> BTreeMap, Vec)>> { - Subscriptions::::get(subscriber_para_id) - .into_iter() - .filter_map(|publisher| { - let data = Self::get_all_published_data(publisher); - (!data.is_empty()).then_some((publisher, data)) - }) - .collect() - } } } -// Implement PublishSubscribe trait -impl PublishSubscribe for Pallet { +// Implement Publish trait +impl Publish for Pallet { fn publish_data(publisher: ParaId, data: Vec<(Vec, Vec)>) -> DispatchResult { Self::handle_publish(publisher, data) } - - fn toggle_subscription(subscriber: ParaId, publisher: ParaId) -> DispatchResult { - Self::handle_subscribe_toggle(subscriber, publisher) - } } \ No newline at end of file diff --git a/polkadot/runtime/parachains/src/broadcaster/traits.rs b/polkadot/runtime/parachains/src/broadcaster/traits.rs index 8df081d41ee6d..10e6ea3bd3172 100644 --- a/polkadot/runtime/parachains/src/broadcaster/traits.rs +++ b/polkadot/runtime/parachains/src/broadcaster/traits.rs @@ -20,14 +20,10 @@ use alloc::vec::Vec; use polkadot_primitives::Id as ParaId; use sp_runtime::DispatchResult; -/// Trait for handling publish and subscribe operations for parachains. +/// Trait for handling publish operations for parachains. /// -/// This trait provides the interface for parachains to publish key-value data -/// and manage subscriptions to other parachains' published data. -pub trait PublishSubscribe { +/// This trait provides the interface for parachains to publish key-value data. +pub trait Publish { /// Publish key-value data for a specific parachain. fn publish_data(publisher: ParaId, data: Vec<(Vec, Vec)>) -> DispatchResult; - - /// Toggle subscription to a publisher's data. - fn toggle_subscription(subscriber: ParaId, publisher: ParaId) -> DispatchResult; } diff --git a/polkadot/runtime/parachains/src/mock.rs b/polkadot/runtime/parachains/src/mock.rs index 2123316159dbe..bbb74f119f96b 100644 --- a/polkadot/runtime/parachains/src/mock.rs +++ b/polkadot/runtime/parachains/src/mock.rs @@ -496,7 +496,6 @@ impl crate::broadcaster::Config for Test { type MaxKeyLength = MaxKeyLength; type MaxValueLength = MaxValueLength; type MaxStoredKeys = MaxStoredKeys; - type MaxSubscriptions = ConstU32<10>; type MaxPublishers = ConstU32<1000>; } diff --git a/polkadot/runtime/rococo/src/lib.rs b/polkadot/runtime/rococo/src/lib.rs index 2417666804852..b795535a11e5b 100644 --- a/polkadot/runtime/rococo/src/lib.rs +++ b/polkadot/runtime/rococo/src/lib.rs @@ -1228,7 +1228,6 @@ parameter_types! { pub const MaxKeyLength: u32 = 256; pub const MaxValueLength: u32 = 1024; pub const MaxStoredKeys: u32 = 100; - pub const MaxSubscriptions: u32 = 100; pub const MaxPublishers: u32 = 1000; } @@ -1238,7 +1237,6 @@ impl polkadot_runtime_parachains::broadcaster::Config for Runtime { type MaxKeyLength = MaxKeyLength; type MaxValueLength = MaxValueLength; type MaxStoredKeys = MaxStoredKeys; - type MaxSubscriptions = MaxSubscriptions; type MaxPublishers = MaxPublishers; } @@ -2213,8 +2211,9 @@ sp_api::impl_runtime_apis! { parachains_staging_runtime_api_impl::validation_code_bomb_limit::() } - fn get_subscribed_data(subscriber_para_id: ParaId) -> BTreeMap, Vec)>> { - Broadcaster::get_subscribed_data(subscriber_para_id) + fn get_subscribed_data(_subscriber_para_id: ParaId) -> BTreeMap, Vec)>> { + // TODO: This will be removed and replaced with keys_to_include_in_relay_proof approach + BTreeMap::new() } } diff --git a/polkadot/runtime/rococo/src/weights/xcm/mod.rs b/polkadot/runtime/rococo/src/weights/xcm/mod.rs index fb17db491bc27..e8bcb7b4e9163 100644 --- a/polkadot/runtime/rococo/src/weights/xcm/mod.rs +++ b/polkadot/runtime/rococo/src/weights/xcm/mod.rs @@ -309,9 +309,6 @@ impl XcmWeightInfo for RococoXcmWeight { fn publish(data: &PublishData) -> Weight { XcmGeneric::::publish(data.len() as u32) } - fn subscribe(_: &u32) -> Weight { - XcmGeneric::::subscribe() - } } #[test] diff --git a/polkadot/runtime/rococo/src/weights/xcm/pallet_xcm_benchmarks_generic.rs b/polkadot/runtime/rococo/src/weights/xcm/pallet_xcm_benchmarks_generic.rs index acb82f1418945..461e854056449 100644 --- a/polkadot/runtime/rococo/src/weights/xcm/pallet_xcm_benchmarks_generic.rs +++ b/polkadot/runtime/rococo/src/weights/xcm/pallet_xcm_benchmarks_generic.rs @@ -437,16 +437,4 @@ impl WeightInfo { .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(n.into()))) .saturating_add(Weight::from_parts(0, 14).saturating_mul(n.into())) } - /// Storage: `Broadcaster::Subscriptions` (r:1 w:1) - /// Proof: `Broadcaster::Subscriptions` (`max_values`: None, `max_size`: Some(422), added: 2897, mode: `MaxEncodedLen`) - pub fn subscribe() -> Weight { - // Proof Size summary in bytes: - // Measured: `217` - // Estimated: `3887` - // Minimum execution time: 7_000_000 picoseconds. - Weight::from_parts(7_000_000, 0) - .saturating_add(Weight::from_parts(0, 3887)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) - } } diff --git a/polkadot/runtime/westend/src/weights/xcm/mod.rs b/polkadot/runtime/westend/src/weights/xcm/mod.rs index 44a3d4572056d..276462715b1c6 100644 --- a/polkadot/runtime/westend/src/weights/xcm/mod.rs +++ b/polkadot/runtime/westend/src/weights/xcm/mod.rs @@ -311,10 +311,6 @@ impl XcmWeightInfo for WestendXcmWeight { // TODO: Benchmark Weight::from_parts(10_000_000, 0) } - fn subscribe(_: &u32) -> Weight { - // TODO: Benchmark - Weight::from_parts(10_000_000, 0) - } } #[test] diff --git a/polkadot/xcm/pallet-xcm-benchmarks/src/generic/benchmarking.rs b/polkadot/xcm/pallet-xcm-benchmarks/src/generic/benchmarking.rs index 9141fca025011..199543f4efa76 100644 --- a/polkadot/xcm/pallet-xcm-benchmarks/src/generic/benchmarking.rs +++ b/polkadot/xcm/pallet-xcm-benchmarks/src/generic/benchmarking.rs @@ -997,23 +997,6 @@ mod benchmarks { Ok(()) } - #[benchmark] - fn subscribe() -> Result<(), BenchmarkError> { - let origin = T::publish_origin()?; - let publisher = T::valid_publisher()?; - - let mut executor = new_executor::(origin); - let instruction = Instruction::Subscribe { publisher }; - let xcm = Xcm(vec![instruction]); - - #[block] - { - executor.bench_process(xcm)?; - } - - Ok(()) - } - impl_benchmark_test_suite!( Pallet, crate::generic::mock::new_test_ext(), diff --git a/polkadot/xcm/pallet-xcm/src/errors.rs b/polkadot/xcm/pallet-xcm/src/errors.rs index 34b502d6985a1..6dccb583b9f67 100644 --- a/polkadot/xcm/pallet-xcm/src/errors.rs +++ b/polkadot/xcm/pallet-xcm/src/errors.rs @@ -139,9 +139,6 @@ pub enum ExecutionError { /// Publishing data failed. #[codec(index = 36)] PublishFailed, - /// Subscribing to a publisher failed. - #[codec(index = 37)] - SubscribeFailed, // Errors that happen prior to instructions being executed. These fall outside of the XCM // spec. /// XCM version not able to be handled. @@ -205,7 +202,6 @@ impl From for ExecutionError { XcmError::NotDepositable => Self::NotDepositable, XcmError::TooManyAssets => Self::TooManyAssets, XcmError::PublishFailed => Self::PublishFailed, - XcmError::SubscribeFailed => Self::SubscribeFailed, XcmError::UnhandledXcmVersion => Self::UnhandledXcmVersion, XcmError::WeightLimitReached(_) => Self::WeightLimitReached, XcmError::Barrier => Self::Barrier, diff --git a/polkadot/xcm/src/v4/mod.rs b/polkadot/xcm/src/v4/mod.rs index 0987871011cf5..d586c14c53157 100644 --- a/polkadot/xcm/src/v4/mod.rs +++ b/polkadot/xcm/src/v4/mod.rs @@ -1435,10 +1435,6 @@ impl TryFrom> for Instructi log::debug!(target: "xcm::versions::v5tov4", "`{new_instruction:?}` not supported by v4"); return Err(()); }, - Subscribe { .. } => { - log::debug!(target: "xcm::versions::v5tov4", "`{new_instruction:?}` not supported by v4"); - return Err(()); - }, }) } } diff --git a/polkadot/xcm/src/v5/mod.rs b/polkadot/xcm/src/v5/mod.rs index 9106c5eed60c7..05acf3bf5d4ed 100644 --- a/polkadot/xcm/src/v5/mod.rs +++ b/polkadot/xcm/src/v5/mod.rs @@ -1166,25 +1166,6 @@ pub enum Instruction { /// - BadOrigin: If origin is not a valid parachain /// - PublishFailed: If the underlying handler fails (e.g., key/value too long, too many items) Publish { data: PublishData }, - - /// Toggle subscription to a publisher parachain's data. - /// - /// This instruction allows parachains to subscribe/unsubscribe to data published by - /// other parachains through the Publish instruction. If already subscribed, this will - /// unsubscribe. If not subscribed, this will subscribe. - /// - /// - `publisher`: The ID of the publisher parachain to toggle subscription for - /// - /// Safety: Origin must be a parachain. The relay chain will validate the origin and - /// manage the subscription state. - /// - /// Kind: *Command* - /// - /// Errors: - /// - NoPermission: If origin is not authorized by the configured filter - /// - BadOrigin: If origin is not a valid parachain - /// - SubscribeFailed: If the underlying handler fails (e.g., too many subscriptions) - Subscribe { publisher: u32 }, } #[derive( @@ -1301,7 +1282,6 @@ impl Instruction { ExecuteWithOrigin { descendant_origin, xcm: xcm.into() } }, Publish { data } => Publish { data }, - Subscribe { publisher } => Subscribe { publisher }, } } } @@ -1392,7 +1372,6 @@ impl> GetWeight for Instruction { W::execute_with_origin(descendant_origin, xcm) }, Publish { data } => W::publish(data), - Subscribe { publisher } => W::subscribe(publisher), } } } diff --git a/polkadot/xcm/src/v5/traits.rs b/polkadot/xcm/src/v5/traits.rs index 5b87c60a1392e..286d53d5eaf14 100644 --- a/polkadot/xcm/src/v5/traits.rs +++ b/polkadot/xcm/src/v5/traits.rs @@ -146,9 +146,6 @@ pub enum Error { /// Publishing data failed. #[codec(index = 36)] PublishFailed, - /// Subscribing to a publisher failed. - #[codec(index = 37)] - SubscribeFailed, // Errors that happen prior to instructions being executed. These fall outside of the XCM // spec. diff --git a/polkadot/xcm/xcm-builder/src/broadcast_adapter.rs b/polkadot/xcm/xcm-builder/src/broadcast_adapter.rs index d1834a681a299..a3616def7ffc0 100644 --- a/polkadot/xcm/xcm-builder/src/broadcast_adapter.rs +++ b/polkadot/xcm/xcm-builder/src/broadcast_adapter.rs @@ -20,7 +20,7 @@ use alloc::vec::Vec; use core::marker::PhantomData; use frame_support::traits::Contains; use polkadot_primitives::Id as ParaId; -use polkadot_runtime_parachains::broadcaster::PublishSubscribe; +use polkadot_runtime_parachains::broadcaster::Publish; use xcm::latest::prelude::XcmError; use xcm::latest::{Junction, Location, PublishData, Result as XcmResult}; use xcm_executor::traits::BroadcastHandler; @@ -31,7 +31,7 @@ pub struct ParachainBroadcastAdapter(PhantomData<(Filter, Handl impl BroadcastHandler for ParachainBroadcastAdapter where Filter: Contains, - Handler: PublishSubscribe, + Handler: Publish, { fn handle_publish(origin: &Location, data: PublishData) -> XcmResult { // Check if origin is authorized to publish @@ -54,26 +54,6 @@ where .collect(); Handler::publish_data(para_id, data_vec).map_err(|_| XcmError::PublishFailed) } - - fn handle_subscribe(origin: &Location, publisher: u32) -> XcmResult { - // Check if origin is authorized to subscribe - if !Filter::contains(origin) { - return Err(XcmError::NoPermission); - } - - // Extract subscriber parachain ID from authorized origin - let subscriber_id = match origin.unpack() { - (0, [Junction::Parachain(id)]) => ParaId::from(*id), // Direct parachain - (1, [Junction::Parachain(id), ..]) => ParaId::from(*id), // Sibling parachain - _ => return Err(XcmError::BadOrigin), // Should be caught by filter - }; - - let publisher_id = ParaId::from(publisher); - - // Call the handler for subscribe toggle - Handler::toggle_subscription(subscriber_id, publisher_id) - .map_err(|_| XcmError::SubscribeFailed) - } } /// Allows only direct parachains (parents=0, interior=[Parachain(_)]). @@ -120,7 +100,6 @@ mod tests { // Mock handler that tracks calls parameter_types! { pub static PublishCalls: Vec<(ParaId, Vec<(Vec, Vec)>)> = vec![]; - pub static SubscribeCalls: Vec<(ParaId, ParaId)> = vec![]; } // Helper to create test publish data @@ -139,7 +118,7 @@ mod tests { } struct MockPublishHandler; - impl PublishSubscribe for MockPublishHandler { + impl Publish for MockPublishHandler { fn publish_data( publisher: ParaId, data: Vec<(Vec, Vec)>, @@ -149,16 +128,6 @@ mod tests { PublishCalls::set(calls); Ok(()) } - - fn toggle_subscription( - subscriber: ParaId, - publisher: ParaId, - ) -> Result<(), sp_runtime::DispatchError> { - let mut calls = SubscribeCalls::get(); - calls.push((subscriber, publisher)); - SubscribeCalls::set(calls); - Ok(()) - } } #[test] @@ -228,73 +197,6 @@ mod tests { assert!(PublishCalls::get().is_empty()); } - #[test] - fn subscribe_from_direct_parachain_works() { - SubscribeCalls::set(vec![]); - let origin = Location::new(0, [Junction::Parachain(1000)]); - let publisher = 2000; - - let result = - ParachainBroadcastAdapter::::handle_subscribe( - &origin, publisher, - ); - - assert!(result.is_ok()); - let calls = SubscribeCalls::get(); - assert_eq!(calls.len(), 1); - assert_eq!(calls[0], (ParaId::from(1000), ParaId::from(2000))); - } - - #[test] - fn subscribe_from_sibling_parachain_works() { - SubscribeCalls::set(vec![]); - let origin = Location::new( - 1, - [Junction::Parachain(3000), Junction::AccountId32 { network: None, id: [1; 32] }], - ); - let publisher = 2000; - - let result = - ParachainBroadcastAdapter::::handle_subscribe( - &origin, publisher, - ); - - assert!(result.is_ok()); - let calls = SubscribeCalls::get(); - assert_eq!(calls.len(), 1); - assert_eq!(calls[0], (ParaId::from(3000), ParaId::from(2000))); - } - - #[test] - fn subscribe_from_non_parachain_fails() { - SubscribeCalls::set(vec![]); - let origin = Location::here(); - let publisher = 2000; - - let result = - ParachainBroadcastAdapter::::handle_subscribe( - &origin, publisher, - ); - - assert!(matches!(result, Err(XcmError::NoPermission))); - assert!(SubscribeCalls::get().is_empty()); - } - - #[test] - fn subscribe_rejected_by_filter() { - SubscribeCalls::set(vec![]); - let origin = Location::new(1, [Junction::Parachain(1000)]); - let publisher = 2000; - - let result = - ParachainBroadcastAdapter::::handle_subscribe( - &origin, publisher, - ); - - assert!(matches!(result, Err(XcmError::NoPermission))); - assert!(SubscribeCalls::get().is_empty()); - } - #[test] fn direct_parachains_only_filter_works() { // Direct parachain allowed diff --git a/polkadot/xcm/xcm-builder/src/test_utils.rs b/polkadot/xcm/xcm-builder/src/test_utils.rs index 21e8d6e294cfd..59041fbb3b0b3 100644 --- a/polkadot/xcm/xcm-builder/src/test_utils.rs +++ b/polkadot/xcm/xcm-builder/src/test_utils.rs @@ -36,8 +36,6 @@ parameter_types! { pub static MaxAssetsIntoHolding: u32 = 4; // Maps ParaId => Vec<(key, value)> pub static PublishedData: BTreeMap, Vec)>> = BTreeMap::new(); - // Maps subscriber ParaId => Vec - pub static BroadcastSubscriptions: BTreeMap> = BTreeMap::new(); } pub struct TestSubscriptionService; @@ -90,28 +88,6 @@ impl BroadcastHandler for TestBroadcastHandler { Ok(()) } - - fn handle_subscribe(origin: &Location, publisher: u32) -> XcmResult { - // Extract subscriber para_id from origin - let subscriber_id = match origin.unpack() { - (0, [Parachain(id)]) => *id, - (1, [Parachain(id), ..]) => *id, - _ => return Err(XcmError::BadOrigin), - }; - - let mut subscriptions = BroadcastSubscriptions::get(); - let subscriber_list = subscriptions.entry(subscriber_id).or_insert_with(Vec::new); - - // Toggle subscription - if let Some(pos) = subscriber_list.iter().position(|&p| p == publisher) { - subscriber_list.remove(pos); - } else { - subscriber_list.push(publisher); - } - - BroadcastSubscriptions::set(subscriptions); - Ok(()) - } } parameter_types! { diff --git a/polkadot/xcm/xcm-builder/src/tests/publish_subscribe.rs b/polkadot/xcm/xcm-builder/src/tests/publish_subscribe.rs index a7aa51a1a8e90..28acee3c5e7ce 100644 --- a/polkadot/xcm/xcm-builder/src/tests/publish_subscribe.rs +++ b/polkadot/xcm/xcm-builder/src/tests/publish_subscribe.rs @@ -17,7 +17,7 @@ //! Tests for Publish and Subscribe XCM instructions. use super::*; -use crate::test_utils::{BroadcastSubscriptions, PublishedData}; +use crate::test_utils::PublishedData; use sp_runtime::BoundedVec; use xcm::latest::{MaxPublishKeyLength, MaxPublishValueLength}; @@ -120,123 +120,6 @@ fn publish_without_origin_fails() { ); } -#[test] -fn subscribe_from_parachain_works() { - // Allow unpaid execution from Parachain(1000) - AllowUnpaidFrom::set(vec![Parachain(1000).into()]); - - let message = Xcm::(vec![Subscribe { publisher: 2000 }]); - let mut hash = fake_message_hash(&message); - let weight_limit = Weight::from_parts(10, 10); - - let r = XcmExecutor::::prepare_and_execute( - Parachain(1000), - message, - &mut hash, - weight_limit, - Weight::zero(), - ); - - assert_eq!(r, Outcome::Complete { used: Weight::from_parts(10, 10) }); - - // Verify subscription was created - let subscriptions = BroadcastSubscriptions::get(); - assert_eq!(subscriptions.get(&1000).unwrap(), &vec![2000]); -} - -#[test] -fn subscribe_toggle_unsubscribes() { - // Allow unpaid execution from Parachain(1000) - AllowUnpaidFrom::set(vec![Parachain(1000).into()]); - - // First subscribe - let message1 = Xcm::(vec![Subscribe { publisher: 2000 }]); - let mut hash1 = fake_message_hash(&message1); - let weight_limit = Weight::from_parts(10, 10); - - let r = XcmExecutor::::prepare_and_execute( - Parachain(1000), - message1, - &mut hash1, - weight_limit, - Weight::zero(), - ); - assert_eq!(r, Outcome::Complete { used: Weight::from_parts(10, 10) }); - - // Verify subscribed - let subscriptions = BroadcastSubscriptions::get(); - assert_eq!(subscriptions.get(&1000).unwrap(), &vec![2000]); - - // Subscribe again to toggle (unsubscribe) - let message2 = Xcm::(vec![Subscribe { publisher: 2000 }]); - let mut hash2 = fake_message_hash(&message2); - - let r = XcmExecutor::::prepare_and_execute( - Parachain(1000), - message2, - &mut hash2, - weight_limit, - Weight::zero(), - ); - assert_eq!(r, Outcome::Complete { used: Weight::from_parts(10, 10) }); - - // Verify unsubscribed - let subscriptions = BroadcastSubscriptions::get(); - assert!(subscriptions.get(&1000).unwrap().is_empty()); -} - -#[test] -fn subscribe_from_non_parachain_fails() { - // Allow unpaid execution from Parent to test that origin validation happens - AllowUnpaidFrom::set(vec![Parent.into()]); - - let message = Xcm::(vec![Subscribe { publisher: 2000 }]); - let mut hash = fake_message_hash(&message); - let weight_limit = Weight::from_parts(10, 10); - - let r = XcmExecutor::::prepare_and_execute( - Parent, - message, - &mut hash, - weight_limit, - Weight::zero(), - ); - - assert_eq!( - r, - Outcome::Incomplete { - used: Weight::from_parts(10, 10), - error: InstructionError { index: 0, error: XcmError::BadOrigin }, - } - ); -} - -#[test] -fn subscribe_without_origin_fails() { - // Allow unpaid execution from Parachain(1000) - AllowUnpaidFrom::set(vec![Parachain(1000).into()]); - - let message = Xcm::(vec![ClearOrigin, Subscribe { publisher: 2000 }]); - let mut hash = fake_message_hash(&message); - let weight_limit = Weight::from_parts(20, 20); - - let r = XcmExecutor::::prepare_and_execute( - Parachain(1000), - message, - &mut hash, - weight_limit, - Weight::zero(), - ); - - assert_eq!( - r, - Outcome::Incomplete { - used: Weight::from_parts(20, 20), - error: InstructionError { index: 1, error: XcmError::BadOrigin }, - } - ); -} - #[test] fn publish_multiple_items_works() { // Allow unpaid execution from Parachain(1000) diff --git a/polkadot/xcm/xcm-executor/src/lib.rs b/polkadot/xcm/xcm-executor/src/lib.rs index 18adef5893bfc..12af093ead6f6 100644 --- a/polkadot/xcm/xcm-executor/src/lib.rs +++ b/polkadot/xcm/xcm-executor/src/lib.rs @@ -1825,11 +1825,6 @@ impl XcmExecutor { Config::BroadcastHandler::handle_publish(origin, data)?; Ok(()) }, - Subscribe { publisher } => { - let origin = self.origin_ref().ok_or(XcmError::BadOrigin)?; - Config::BroadcastHandler::handle_subscribe(origin, publisher)?; - Ok(()) - }, } } diff --git a/polkadot/xcm/xcm-executor/src/traits/broadcast_handler.rs b/polkadot/xcm/xcm-executor/src/traits/broadcast_handler.rs index 789c09181eb73..221f3b622ff58 100644 --- a/polkadot/xcm/xcm-executor/src/traits/broadcast_handler.rs +++ b/polkadot/xcm/xcm-executor/src/traits/broadcast_handler.rs @@ -18,15 +18,11 @@ use xcm::latest::{Location, PublishData, Result as XcmResult}; -/// Trait for handling publish/subscribe operations on the relay chain. +/// Trait for handling publish operations on the relay chain. pub trait BroadcastHandler { /// Handle publish operation from the given origin. /// Should validate origin authorization and extract necessary data. fn handle_publish(origin: &Location, data: PublishData) -> XcmResult; - - /// Handle subscribe/unsubscribe operation from the given origin. - /// Toggles subscription state for the given publisher. - fn handle_subscribe(origin: &Location, publisher: u32) -> XcmResult; } /// Implementation of `BroadcastHandler` for the unit type `()`. @@ -35,9 +31,4 @@ impl BroadcastHandler for () { // No-op implementation for unit type Ok(()) } - - fn handle_subscribe(_origin: &Location, _publisher: u32) -> XcmResult { - // No-op implementation for unit type - Ok(()) - } } \ No newline at end of file From f90c67d0ce910d49b012ab5aba4250368569ee24 Mon Sep 17 00:00:00 2001 From: metricaez Date: Wed, 3 Dec 2025 13:55:09 -0300 Subject: [PATCH 110/128] feat: add subscriptions storage and extrinsic to parachain system --- cumulus/pallets/parachain-system/src/lib.rs | 63 +++++++++++++++++ cumulus/pallets/parachain-system/src/tests.rs | 70 +++++++++++++++++++ 2 files changed, 133 insertions(+) diff --git a/cumulus/pallets/parachain-system/src/lib.rs b/cumulus/pallets/parachain-system/src/lib.rs index 9733218122659..e9cc93445acb5 100644 --- a/cumulus/pallets/parachain-system/src/lib.rs +++ b/cumulus/pallets/parachain-system/src/lib.rs @@ -777,6 +777,52 @@ pub mod pallet { Ok(()) } + /// Subscribe to published data from a specific parachain. + /// + /// If `keys` is empty, subscribes to ALL data from that publisher. + /// If `keys` is non-empty, subscribes only to those specific keys. + /// + /// The dispatch origin for this call must be `Root`. + #[pallet::call_index(4)] + #[pallet::weight((10_000, DispatchClass::Operational))] + pub fn subscribe( + origin: OriginFor, + publisher: ParaId, + keys: Vec>, + ) -> DispatchResult { + ensure_root(origin)?; + + let bounded_keys: BoundedVec>, ConstU32<100>> = keys + .into_iter() + .map(|k| BoundedVec::try_from(k).map_err(|_| Error::::KeyTooLong)) + .collect::, _>>()? + .try_into() + .map_err(|_| Error::::TooManyKeys)?; + + Subscriptions::::insert(publisher, bounded_keys); + Ok(()) + } + + /// Unsubscribe from a publisher and clean up associated published data. + /// + /// The dispatch origin for this call must be `Root`. + #[pallet::call_index(5)] + #[pallet::weight((10_000, DispatchClass::Operational))] + pub fn unsubscribe( + origin: OriginFor, + publisher: ParaId, + ) -> DispatchResult { + ensure_root(origin)?; + + // Remove the subscription + Subscriptions::::remove(publisher); + + // Clean up all published data from this publisher + let _ = PublishedData::::clear_prefix(publisher, u32::MAX, None); + + Ok(()) + } + // WARNING: call indices 2 and 3 were used in a former version of this pallet. Using them // again will require to bump the transaction version of runtimes using this pallet. } @@ -813,6 +859,10 @@ pub mod pallet { HostConfigurationNotAvailable, /// No validation function upgrade is currently scheduled. NotScheduled, + /// A subscription key exceeds the maximum allowed length. + KeyTooLong, + /// Too many keys provided for a single subscription. + TooManyKeys, } /// Latest included block descendants the runtime accepted. In other words, these are @@ -1007,6 +1057,19 @@ pub mod pallet { ValueQuery, >; + /// Local subscriptions to published data from other parachains. + /// + /// Maps Publisher ParaId -> Vec of keys we're interested in from that publisher. + /// An empty vec means we want ALL keys from that publisher. + #[pallet::storage] + pub type Subscriptions = StorageMap< + _, + Twox64Concat, + ParaId, + BoundedVec>, ConstU32<100>>, + OptionQuery, + >; + #[pallet::inherent] impl ProvideInherent for Pallet { diff --git a/cumulus/pallets/parachain-system/src/tests.rs b/cumulus/pallets/parachain-system/src/tests.rs index aa9d8a5128604..cc9b0ca6ff95c 100755 --- a/cumulus/pallets/parachain-system/src/tests.rs +++ b/cumulus/pallets/parachain-system/src/tests.rs @@ -1647,3 +1647,73 @@ fn ump_fee_factor_increases_and_decreases() { }, ); } + +#[test] +fn subscribe_to_all_keys_works() { + new_test_ext().execute_with(|| { + let publisher = ParaId::from(1000); + + assert_ok!(ParachainSystem::subscribe(RuntimeOrigin::root(), publisher, vec![])); + + assert!(Subscriptions::::contains_key(publisher)); + let keys = Subscriptions::::get(publisher).unwrap(); + assert!(keys.is_empty()); + }); +} + +#[test] +fn subscribe_to_specific_keys_works() { + new_test_ext().execute_with(|| { + let publisher = ParaId::from(2000); + let keys = vec![b"key1".to_vec(), b"key2".to_vec()]; + + assert_ok!(ParachainSystem::subscribe(RuntimeOrigin::root(), publisher, keys.clone())); + + assert!(Subscriptions::::contains_key(publisher)); + let stored_keys = Subscriptions::::get(publisher).unwrap(); + assert_eq!(stored_keys.len(), 2); + assert_eq!(stored_keys[0].as_slice(), b"key1"); + assert_eq!(stored_keys[1].as_slice(), b"key2"); + }); +} + +#[test] +fn unsubscribe_removes_subscription_and_data() { + new_test_ext().execute_with(|| { + let publisher = ParaId::from(3000); + + assert_ok!(ParachainSystem::subscribe(RuntimeOrigin::root(), publisher, vec![])); + + PublishedData::::insert(publisher, b"key1".to_vec(), b"value1".to_vec()); + PublishedData::::insert(publisher, b"key2".to_vec(), b"value2".to_vec()); + + assert!(PublishedData::::contains_key(publisher, b"key1".to_vec())); + assert!(PublishedData::::contains_key(publisher, b"key2".to_vec())); + + assert_ok!(ParachainSystem::unsubscribe(RuntimeOrigin::root(), publisher)); + + assert!(!Subscriptions::::contains_key(publisher)); + assert!(!PublishedData::::contains_key(publisher, b"key1".to_vec())); + assert!(!PublishedData::::contains_key(publisher, b"key2".to_vec())); + }); +} + +#[test] +fn subscribe_overwrites_existing_subscription() { + new_test_ext().execute_with(|| { + let publisher = ParaId::from(4000); + + assert_ok!(ParachainSystem::subscribe(RuntimeOrigin::root(), publisher, vec![])); + assert!(Subscriptions::::get(publisher).unwrap().is_empty()); + + assert_ok!(ParachainSystem::subscribe( + RuntimeOrigin::root(), + publisher, + vec![b"specific".to_vec()] + )); + + let keys = Subscriptions::::get(publisher).unwrap(); + assert_eq!(keys.len(), 1); + assert_eq!(keys[0].as_slice(), b"specific"); + }); +} From a0618d7c531b042d86891ae22c5899bb010008ef Mon Sep 17 00:00:00 2001 From: metricaez Date: Wed, 3 Dec 2025 14:40:48 -0300 Subject: [PATCH 111/128] feat: storedata roots as storage map and not vec --- .../runtime/parachains/src/broadcaster/mod.rs | 52 ++++--- .../parachains/src/broadcaster/tests.rs | 134 ++++-------------- polkadot/runtime/parachains/src/mock.rs | 3 +- 3 files changed, 57 insertions(+), 132 deletions(-) diff --git a/polkadot/runtime/parachains/src/broadcaster/mod.rs b/polkadot/runtime/parachains/src/broadcaster/mod.rs index bea5dfe76543f..6c61d90376389 100644 --- a/polkadot/runtime/parachains/src/broadcaster/mod.rs +++ b/polkadot/runtime/parachains/src/broadcaster/mod.rs @@ -28,7 +28,7 @@ use alloc::{collections::BTreeMap, vec::Vec}; use frame_support::{ pallet_prelude::*, - storage::child::ChildInfo, + storage::{child::ChildInfo, types::CountedStorageMap}, traits::{defensive_prelude::*, Get, ConstU32}, }; use frame_system::pallet_prelude::BlockNumberFor; @@ -78,7 +78,7 @@ pub mod pallet { #[pallet::constant] type MaxStoredKeys: Get; - /// Maximum number of publishers that can have published data. + /// Maximum number of parachains that can publish data. #[pallet::constant] type MaxPublishers: Get; } @@ -113,15 +113,18 @@ pub mod pallet { ValueQuery, >; - /// Aggregated child trie roots for all publishers. + /// Child trie root for each publisher parachain. /// - /// Contains (ParaId, child_trie_root) pairs for all parachains that have published data. - /// This is used in relay chain storage proofs to efficiently provide all publisher roots. + /// Maps ParaId -> child_trie_root hash (32 bytes). + /// This allows selective inclusion in storage proofs - only roots for publishers + /// we're interested in need to be included. #[pallet::storage] - pub type PublishedDataRoots = StorageValue< + pub type PublishedDataRoots = CountedStorageMap< _, - BoundedVec<(ParaId, BoundedVec>), T::MaxPublishers>, - ValueQuery, + Twox64Concat, + ParaId, + [u8; 32], + OptionQuery, >; #[pallet::error] @@ -134,13 +137,15 @@ pub mod pallet { ValueTooLong, /// Too many unique keys stored for this publisher. TooManyStoredKeys, + /// Maximum number of publishers reached. + TooManyPublishers, } #[pallet::hooks] impl Hooks> for Pallet { fn integrity_test() { assert_eq!( - &PublishedDataRoots::::hashed_key(), + &PublishedDataRoots::::map_storage_final_prefix(), polkadot_primitives::well_known_keys::BROADCASTER_PUBLISHED_DATA_ROOTS, "`well_known_keys::BROADCASTER_PUBLISHED_DATA_ROOTS` doesn't match key of `PublishedDataRoots`! \ Make sure that the name of the broadcaster pallet is `Broadcaster` in the runtime!", @@ -190,7 +195,7 @@ pub mod pallet { } // All validation passed, now get or create child trie info for this publisher - let child_info = Self::get_or_create_publisher_child_info(origin_para_id); + let child_info = Self::get_or_create_publisher_child_info(origin_para_id)?; // Get current published keys set for tracking let mut published_keys = PublishedKeys::::get(origin_para_id); @@ -231,21 +236,10 @@ pub mod pallet { let child_root = frame_support::storage::child::root(&child_info, sp_runtime::StateVersion::V1); - // Update the aggregated roots storage - let mut roots = PublishedDataRoots::::get(); - - // Convert child_root once - if let Ok(bounded_root) = BoundedVec::try_from(child_root) { - // Find and update existing entry or add new one - if let Some((_, root_hash)) = roots.iter_mut().find(|(para_id, _)| *para_id == origin_para_id) { - *root_hash = bounded_root; - } else { - // Not found, add new entry - roots.try_push((origin_para_id, bounded_root)).defensive_ok(); - } - } - - PublishedDataRoots::::put(roots); + // Store the root in the map (fixed 32-byte array) + let root_array: [u8; 32] = child_root.try_into() + .defensive_unwrap_or([0u8; 32]); + PublishedDataRoots::::insert(origin_para_id, root_array); Self::deposit_event(Event::DataPublished { publisher: origin_para_id, items_count }); @@ -264,11 +258,15 @@ pub mod pallet { } /// Get or create child trie info for a publisher. - fn get_or_create_publisher_child_info(para_id: ParaId) -> ChildInfo { + fn get_or_create_publisher_child_info(para_id: ParaId) -> Result { if !PublisherExists::::contains_key(para_id) { + ensure!( + PublishedDataRoots::::count() < T::MaxPublishers::get(), + Error::::TooManyPublishers + ); PublisherExists::::insert(para_id, true); } - Self::derive_child_info(para_id) + Ok(Self::derive_child_info(para_id)) } /// Derive a deterministic child trie identifier from parachain ID. diff --git a/polkadot/runtime/parachains/src/broadcaster/tests.rs b/polkadot/runtime/parachains/src/broadcaster/tests.rs index c64e6bcf92168..c3c124f562edf 100644 --- a/polkadot/runtime/parachains/src/broadcaster/tests.rs +++ b/polkadot/runtime/parachains/src/broadcaster/tests.rs @@ -126,83 +126,6 @@ fn handle_publish_respects_value_length_limit() { }); } -#[test] -fn subscribe_toggle_works() { - new_test_ext(Default::default()).execute_with(|| { - let subscriber = ParaId::from(1000); - let publisher = ParaId::from(2000); - - // Initially not subscribed - assert!(!Broadcaster::is_subscribed(subscriber, publisher)); - assert_eq!(Broadcaster::get_subscriptions(subscriber), vec![]); - - // First toggle: subscribe - assert_ok!(Broadcaster::handle_subscribe_toggle(subscriber, publisher)); - assert!(Broadcaster::is_subscribed(subscriber, publisher)); - assert_eq!(Broadcaster::get_subscriptions(subscriber), vec![publisher]); - - // Second toggle: unsubscribe - assert_ok!(Broadcaster::handle_subscribe_toggle(subscriber, publisher)); - assert!(!Broadcaster::is_subscribed(subscriber, publisher)); - assert_eq!(Broadcaster::get_subscriptions(subscriber), vec![]); - }); -} - -#[test] -fn multiple_subscriptions_work() { - new_test_ext(Default::default()).execute_with(|| { - let subscriber = ParaId::from(1000); - let publisher1 = ParaId::from(2000); - let publisher2 = ParaId::from(3000); - let publisher3 = ParaId::from(4000); - - // Subscribe to multiple publishers - assert_ok!(Broadcaster::handle_subscribe_toggle(subscriber, publisher1)); - assert_ok!(Broadcaster::handle_subscribe_toggle(subscriber, publisher2)); - assert_ok!(Broadcaster::handle_subscribe_toggle(subscriber, publisher3)); - - let subscriptions = Broadcaster::get_subscriptions(subscriber); - assert_eq!(subscriptions.len(), 3); - assert!(subscriptions.contains(&publisher1)); - assert!(subscriptions.contains(&publisher2)); - assert!(subscriptions.contains(&publisher3)); - - // Unsubscribe from middle one - assert_ok!(Broadcaster::handle_subscribe_toggle(subscriber, publisher2)); - - let subscriptions = Broadcaster::get_subscriptions(subscriber); - assert_eq!(subscriptions.len(), 2); - assert!(subscriptions.contains(&publisher1)); - assert!(!subscriptions.contains(&publisher2)); - assert!(subscriptions.contains(&publisher3)); - }); -} - -#[test] -fn max_subscriptions_limit_enforced() { - new_test_ext(Default::default()).execute_with(|| { - let subscriber = ParaId::from(1000); - - // Subscribe up to MaxSubscriptions (10 in mock) - for i in 0..10 { - let publisher = ParaId::from(2000 + i); - assert_ok!(Broadcaster::handle_subscribe_toggle(subscriber, publisher)); - } - - // Try to add one more subscription - should fail - let publisher = ParaId::from(3000); - assert_err!( - Broadcaster::handle_subscribe_toggle(subscriber, publisher), - Error::::TooManySubscriptions - ); - - // But can still unsubscribe and resubscribe - let existing_publisher = ParaId::from(2000); - assert_ok!(Broadcaster::handle_subscribe_toggle(subscriber, existing_publisher)); // Unsubscribe - assert_ok!(Broadcaster::handle_subscribe_toggle(subscriber, publisher)); // Subscribe to new one - }); -} - #[test] fn max_stored_keys_limit_enforced() { new_test_ext(Default::default()).execute_with(|| { @@ -282,27 +205,6 @@ fn published_keys_storage_matches_child_trie() { }); } -#[test] -fn subscribe_to_non_publishing_para_returns_empty() { - new_test_ext(Default::default()).execute_with(|| { - let subscriber = ParaId::from(1000); - let non_publisher = ParaId::from(9999); - - // Subscribe to a para that has never published anything - assert_ok!(Broadcaster::handle_subscribe_toggle(subscriber, non_publisher)); - - // Verify subscription was created - assert!(Broadcaster::is_subscribed(subscriber, non_publisher)); - - // Get subscribed data - should return empty for non-publishing para - let subscribed_data = Broadcaster::get_subscribed_data(subscriber); - - // Non-publishing para should not appear in results (filtered out by is_empty check) - assert!(!subscribed_data.contains_key(&non_publisher)); - assert_eq!(subscribed_data.len(), 0); - }); -} - #[test] fn multiple_publishers_in_same_block() { new_test_ext(Default::default()).execute_with(|| { @@ -325,13 +227,12 @@ fn multiple_publishers_in_same_block() { assert!(PublisherExists::::get(para3)); // Verify PublishedDataRoots contains all three - let roots = PublishedDataRoots::::get(); - assert_eq!(roots.len(), 3); + assert_eq!(PublishedDataRoots::::count(), 3); - // Verify each para has its root in the aggregated roots - assert!(roots.iter().any(|(id, _)| *id == para1)); - assert!(roots.iter().any(|(id, _)| *id == para2)); - assert!(roots.iter().any(|(id, _)| *id == para3)); + // Verify each para has its root in the map + assert!(PublishedDataRoots::::contains_key(para1)); + assert!(PublishedDataRoots::::contains_key(para2)); + assert!(PublishedDataRoots::::contains_key(para3)); // Verify each para's data is independently accessible assert_eq!(Broadcaster::get_published_value(para1, b"key1"), Some(b"value1".to_vec())); @@ -344,3 +245,28 @@ fn multiple_publishers_in_same_block() { assert_eq!(Broadcaster::get_published_value(para3, b"key1"), None); }); } + +#[test] +fn max_publishers_limit_enforced() { + new_test_ext(Default::default()).execute_with(|| { + for i in 0..1000 { + let para_id = ParaId::from(1000 + i); + let data = vec![(b"key".to_vec(), b"value".to_vec())]; + assert_ok!(Broadcaster::handle_publish(para_id, data)); + } + + assert_eq!(PublishedDataRoots::::count(), 1000); + + let para_id = ParaId::from(2000); + let data = vec![(b"key".to_vec(), b"value".to_vec())]; + assert_err!(Broadcaster::handle_publish(para_id, data), Error::::TooManyPublishers); + + let existing_para = ParaId::from(1000); + let update_data = vec![(b"key".to_vec(), b"updated".to_vec())]; + assert_ok!(Broadcaster::handle_publish(existing_para, update_data)); + assert_eq!( + Broadcaster::get_published_value(existing_para, b"key"), + Some(b"updated".to_vec()) + ); + }); +} diff --git a/polkadot/runtime/parachains/src/mock.rs b/polkadot/runtime/parachains/src/mock.rs index bbb74f119f96b..10d824d018217 100644 --- a/polkadot/runtime/parachains/src/mock.rs +++ b/polkadot/runtime/parachains/src/mock.rs @@ -488,6 +488,7 @@ parameter_types! { pub const MaxKeyLength: u32 = 256; pub const MaxValueLength: u32 = 1024; pub const MaxStoredKeys: u32 = 100; + pub const MaxPublishers: u32 = 1000; } impl crate::broadcaster::Config for Test { @@ -496,7 +497,7 @@ impl crate::broadcaster::Config for Test { type MaxKeyLength = MaxKeyLength; type MaxValueLength = MaxValueLength; type MaxStoredKeys = MaxStoredKeys; - type MaxPublishers = ConstU32<1000>; + type MaxPublishers = MaxPublishers; } pub struct MockValidatorSet; From 16d1af2b12a383f4d79be4396c2cc0bd2dea5d11 Mon Sep 17 00:00:00 2001 From: metricaez Date: Thu, 4 Dec 2025 11:50:43 -0300 Subject: [PATCH 112/128] feat: get subscriptions into the collator via API --- .../consensus/aura/src/collators/lookahead.rs | 38 ++++++++++++++++--- cumulus/pallets/parachain-system/src/lib.rs | 21 ++++++++++ .../testing/rococo-parachain/src/lib.rs | 6 +++ .../polkadot-omni-node/lib/src/common/aura.rs | 2 + .../lib/src/fake_runtime_api/utils.rs | 6 +++ cumulus/primitives/core/src/lib.rs | 9 +++++ pubsub-dev/zombienet.toml | 4 +- 7 files changed, 79 insertions(+), 7 deletions(-) diff --git a/cumulus/client/consensus/aura/src/collators/lookahead.rs b/cumulus/client/consensus/aura/src/collators/lookahead.rs index 5f1a9eaa579db..0c65f523477dc 100644 --- a/cumulus/client/consensus/aura/src/collators/lookahead.rs +++ b/cumulus/client/consensus/aura/src/collators/lookahead.rs @@ -37,7 +37,9 @@ use cumulus_client_collator::service::ServiceInterface as CollatorServiceInterfa use cumulus_client_consensus_common::{self as consensus_common, ParachainBlockImportMarker}; use cumulus_client_consensus_proposer::ProposerInterface; use cumulus_primitives_aura::AuraUnincludedSegmentApi; -use cumulus_primitives_core::{ClaimQueueOffset, CollectCollationInfo, PersistedValidationData}; +use cumulus_primitives_core::{ + ClaimQueueOffset, CollectCollationInfo, KeyToIncludeInRelayProofApi, PersistedValidationData, +}; use cumulus_relay_chain_interface::RelayChainInterface; use polkadot_node_primitives::SubmitCollationParams; @@ -114,8 +116,10 @@ where + Send + Sync + 'static, - Client::Api: - AuraApi + CollectCollationInfo + AuraUnincludedSegmentApi, + Client::Api: AuraApi + + CollectCollationInfo + + AuraUnincludedSegmentApi + + KeyToIncludeInRelayProofApi, Backend: sc_client_api::Backend + 'static, RClient: RelayChainInterface + Clone + 'static, CIDP: CreateInherentDataProviders + 'static, @@ -166,8 +170,10 @@ where + Send + Sync + 'static, - Client::Api: - AuraApi + CollectCollationInfo + AuraUnincludedSegmentApi, + Client::Api: AuraApi + + CollectCollationInfo + + AuraUnincludedSegmentApi + + KeyToIncludeInRelayProofApi, Backend: sc_client_api::Backend + 'static, RClient: RelayChainInterface + Clone + 'static, CIDP: CreateInherentDataProviders + 'static, @@ -284,6 +290,28 @@ where }, }; tracing::debug!(target: crate::LOG_TARGET, ?slot_duration, ?block_hash, "Parachain slot duration acquired"); + + // Query subscription keys from the parachain runtime + let subscription_keys = params + .para_client + .runtime_api() + .keys_to_include_in_relay_proof(block_hash) + .unwrap_or_else(|e| { + tracing::warn!( + target: crate::LOG_TARGET, + error = ?e, + "Failed to fetch subscription keys from runtime, using empty vec" + ); + Vec::new() + }); + + tracing::debug!( + target: crate::LOG_TARGET, + ?block_hash, + ?subscription_keys, + "Retrieved subscription keys from parachain runtime" + ); + let (relay_slot, timestamp) = consensus_common::relay_slot_and_timestamp( &relay_parent_header, params.relay_chain_slot_duration, diff --git a/cumulus/pallets/parachain-system/src/lib.rs b/cumulus/pallets/parachain-system/src/lib.rs index e9cc93445acb5..5096967447cab 100644 --- a/cumulus/pallets/parachain-system/src/lib.rs +++ b/cumulus/pallets/parachain-system/src/lib.rs @@ -1138,6 +1138,27 @@ impl Pallet { let segment = UnincludedSegment::::get(); crate::unincluded_segment::size_after_included(included_hash, &segment) } + + /// Get the subscription keys for accessing published data from other parachains. + /// + /// Returns a vector of (ParaId, Vec) tuples where: + /// - ParaId is the publisher parachain we're subscribed to + /// - Vec is the list of specific keys we want from that publisher + /// (empty vec means we want ALL keys from that publisher) + /// + /// This is intended to be used by the runtime API to inform the collator which + /// relay chain storage keys should be included in the storage proof. + pub fn get_subscription_keys() -> Vec<(ParaId, Vec>)> { + Subscriptions::::iter() + .map(|(para_id, keys)| { + let unbounded_keys: Vec> = keys + .into_iter() + .map(|bounded_key| bounded_key.into_inner()) + .collect(); + (para_id, unbounded_keys) + }) + .collect() + } } impl FeeTracker for Pallet { diff --git a/cumulus/parachains/runtimes/testing/rococo-parachain/src/lib.rs b/cumulus/parachains/runtimes/testing/rococo-parachain/src/lib.rs index 2a85cc41d2a5b..3f5144b5beee2 100644 --- a/cumulus/parachains/runtimes/testing/rococo-parachain/src/lib.rs +++ b/cumulus/parachains/runtimes/testing/rococo-parachain/src/lib.rs @@ -887,6 +887,12 @@ impl_runtime_apis! { ParachainSystem::core_selector() } } + + impl cumulus_primitives_core::KeyToIncludeInRelayProofApi for Runtime { + fn keys_to_include_in_relay_proof() -> Vec<(ParaId, Vec>)> { + ParachainSystem::get_subscription_keys() + } + } } cumulus_pallet_parachain_system::register_validate_block! { diff --git a/cumulus/polkadot-omni-node/lib/src/common/aura.rs b/cumulus/polkadot-omni-node/lib/src/common/aura.rs index 9ca725ff3279a..49630ae33033e 100644 --- a/cumulus/polkadot-omni-node/lib/src/common/aura.rs +++ b/cumulus/polkadot-omni-node/lib/src/common/aura.rs @@ -53,6 +53,7 @@ pub trait AuraRuntimeApi: sp_api::ApiExt + AuraApi::Public> + AuraUnincludedSegmentApi + + cumulus_primitives_core::KeyToIncludeInRelayProofApi + Sized { /// Check if the runtime has the Aura API. @@ -66,5 +67,6 @@ impl AuraRuntimeApi for T wher T: sp_api::ApiExt + AuraApi::Public> + AuraUnincludedSegmentApi + + cumulus_primitives_core::KeyToIncludeInRelayProofApi { } diff --git a/cumulus/polkadot-omni-node/lib/src/fake_runtime_api/utils.rs b/cumulus/polkadot-omni-node/lib/src/fake_runtime_api/utils.rs index b090dd4e7c4a1..d5dc1cc543e1b 100644 --- a/cumulus/polkadot-omni-node/lib/src/fake_runtime_api/utils.rs +++ b/cumulus/polkadot-omni-node/lib/src/fake_runtime_api/utils.rs @@ -175,6 +175,12 @@ macro_rules! impl_node_runtime_apis { } } + impl cumulus_primitives_core::KeyToIncludeInRelayProofApi<$block> for $runtime { + fn keys_to_include_in_relay_proof() -> Vec<(cumulus_primitives_core::ParaId, Vec>)> { + unimplemented!() + } + } + #[cfg(feature = "try-runtime")] impl frame_try_runtime::TryRuntime<$block> for $runtime { fn on_runtime_upgrade( diff --git a/cumulus/primitives/core/src/lib.rs b/cumulus/primitives/core/src/lib.rs index 5a0c60bc18daa..4fb439532d888 100644 --- a/cumulus/primitives/core/src/lib.rs +++ b/cumulus/primitives/core/src/lib.rs @@ -401,4 +401,13 @@ sp_api::decl_runtime_apis! { /// Fetch the slot offset that is expected from the relay chain. fn relay_parent_offset() -> u32; } + + /// API to tell the collator which relay chain storage keys to include in proofs. + /// + /// Returns subscription information for accessing published data from other parachains + /// via the relay chain storage proof. + pub trait KeyToIncludeInRelayProofApi { + /// Get relay chain storage keys required for accessing subscribed published data. + fn keys_to_include_in_relay_proof() -> Vec<(ParaId, Vec>)>; + } } diff --git a/pubsub-dev/zombienet.toml b/pubsub-dev/zombienet.toml index 840e8026c5408..dc31ddf36001e 100644 --- a/pubsub-dev/zombienet.toml +++ b/pubsub-dev/zombienet.toml @@ -34,11 +34,11 @@ cumulus_based = true rpc_port = 9920 chain = "penpal-local" command = "./target/release/polkadot-parachain" - args = ["-lxcm=trace", "--trie-cache-size=0", "--network-backend=libp2p", "--", "--network-backend=libp2p"] + args = ["-lxcm=trace", "-laura::cumulus=debug", "--trie-cache-size=0", "--network-backend=libp2p", "--", "--network-backend=libp2p"] [[parachains.collators]] name = "para-collator02" chain = "penpal-local" command = "./target/release/polkadot-parachain" - args = ["-lxcm=trace", "--trie-cache-size=0", "--network-backend=libp2p", "--", "--network-backend=libp2p"] + args = ["-lxcm=trace", "-laura::cumulus=debug", "--trie-cache-size=0", "--network-backend=libp2p", "--", "--network-backend=libp2p"] From e2f1877702bd47d435b9d3f231b84cd394c46c5a Mon Sep 17 00:00:00 2001 From: metricaez Date: Thu, 4 Dec 2025 14:12:07 -0300 Subject: [PATCH 113/128] feat: propagate keys up to relay proof generation --- cumulus/client/consensus/aura/src/collator.rs | 4 +++ .../consensus/aura/src/collators/basic.rs | 1 + .../consensus/aura/src/collators/lookahead.rs | 36 ++++++++----------- .../slot_based/block_builder_task.rs | 1 + cumulus/client/parachain-inherent/src/lib.rs | 9 +++++ pubsub-dev/zombienet.toml | 4 +-- 6 files changed, 32 insertions(+), 23 deletions(-) diff --git a/cumulus/client/consensus/aura/src/collator.rs b/cumulus/client/consensus/aura/src/collator.rs index f213cf9071f89..5a179ec68b649 100644 --- a/cumulus/client/consensus/aura/src/collator.rs +++ b/cumulus/client/consensus/aura/src/collator.rs @@ -128,6 +128,7 @@ where parent_hash: Block::Hash, timestamp: impl Into>, relay_parent_descendants: Option, + subscription_keys: Vec<(ParaId, Vec>)>, ) -> Result<(ParachainInherentData, InherentData), Box> { let paras_inherent_data = ParachainInherentDataProvider::create_at( relay_parent, @@ -137,6 +138,7 @@ where relay_parent_descendants .map(RelayParentData::into_inherent_descendant_list) .unwrap_or_default(), + subscription_keys, ) .await; @@ -172,6 +174,7 @@ where validation_data: &PersistedValidationData, parent_hash: Block::Hash, timestamp: impl Into>, + subscription_keys: Vec<(ParaId, Vec>)>, ) -> Result<(ParachainInherentData, InherentData), Box> { self.create_inherent_data_with_rp_offset( relay_parent, @@ -179,6 +182,7 @@ where parent_hash, timestamp, None, + subscription_keys, ) .await } diff --git a/cumulus/client/consensus/aura/src/collators/basic.rs b/cumulus/client/consensus/aura/src/collators/basic.rs index a66abf979d683..eb4ca4f3a3c23 100644 --- a/cumulus/client/consensus/aura/src/collators/basic.rs +++ b/cumulus/client/consensus/aura/src/collators/basic.rs @@ -234,6 +234,7 @@ where &validation_data, parent_hash, claim.timestamp(), + Vec::new(), ) .await ); diff --git a/cumulus/client/consensus/aura/src/collators/lookahead.rs b/cumulus/client/consensus/aura/src/collators/lookahead.rs index 0c65f523477dc..21d9f9db3f96b 100644 --- a/cumulus/client/consensus/aura/src/collators/lookahead.rs +++ b/cumulus/client/consensus/aura/src/collators/lookahead.rs @@ -291,27 +291,6 @@ where }; tracing::debug!(target: crate::LOG_TARGET, ?slot_duration, ?block_hash, "Parachain slot duration acquired"); - // Query subscription keys from the parachain runtime - let subscription_keys = params - .para_client - .runtime_api() - .keys_to_include_in_relay_proof(block_hash) - .unwrap_or_else(|e| { - tracing::warn!( - target: crate::LOG_TARGET, - error = ?e, - "Failed to fetch subscription keys from runtime, using empty vec" - ); - Vec::new() - }); - - tracing::debug!( - target: crate::LOG_TARGET, - ?block_hash, - ?subscription_keys, - "Retrieved subscription keys from parachain runtime" - ); - let (relay_slot, timestamp) = consensus_common::relay_slot_and_timestamp( &relay_parent_header, params.relay_chain_slot_duration, @@ -366,6 +345,20 @@ where "Slot claimed. Building" ); + // Query subscription keys from the parachain runtime + let subscription_keys = params + .para_client + .runtime_api() + .keys_to_include_in_relay_proof(parent_hash) + .unwrap_or_else(|e| { + tracing::warn!( + target: crate::LOG_TARGET, + error = ?e, + "Failed to fetch subscription keys from runtime, using empty vec" + ); + Vec::new() + }); + let validation_data = PersistedValidationData { parent_head: parent_header.encode().into(), relay_parent_number: *relay_parent_header.number(), @@ -381,6 +374,7 @@ where &validation_data, parent_hash, slot_claim.timestamp(), + subscription_keys.clone(), ) .await { diff --git a/cumulus/client/consensus/aura/src/collators/slot_based/block_builder_task.rs b/cumulus/client/consensus/aura/src/collators/slot_based/block_builder_task.rs index 6bfc38d98249e..2526ed8a81432 100644 --- a/cumulus/client/consensus/aura/src/collators/slot_based/block_builder_task.rs +++ b/cumulus/client/consensus/aura/src/collators/slot_based/block_builder_task.rs @@ -368,6 +368,7 @@ where parent_hash, slot_claim.timestamp(), Some(rp_data), + Vec::new(), ) .await { diff --git a/cumulus/client/parachain-inherent/src/lib.rs b/cumulus/client/parachain-inherent/src/lib.rs index e397c9f010bc7..8244c7bbadd7f 100644 --- a/cumulus/client/parachain-inherent/src/lib.rs +++ b/cumulus/client/parachain-inherent/src/lib.rs @@ -39,9 +39,16 @@ async fn collect_relay_storage_proof( relay_parent: PHash, include_authorities: bool, include_next_authorities: bool, + subscription_keys: Vec<(ParaId, Vec>)>, ) -> Option { use relay_chain::well_known_keys as relay_well_known_keys; + tracing::debug!( + target: LOG_TARGET, + ?subscription_keys, + "Received subscription keys in collect_relay_storage_proof" + ); + let ingress_channels = relay_chain_interface .get_storage_by_key( relay_parent, @@ -161,6 +168,7 @@ impl ParachainInherentDataProvider { validation_data: &PersistedValidationData, para_id: ParaId, relay_parent_descendants: Vec, + subscription_keys: Vec<(ParaId, Vec>)>, ) -> Option { // Only include next epoch authorities when the descendants include an epoch digest. // Skip the first entry because this is the relay parent itself. @@ -176,6 +184,7 @@ impl ParachainInherentDataProvider { relay_parent, !relay_parent_descendants.is_empty(), include_next_authorities, + subscription_keys, ) .await?; diff --git a/pubsub-dev/zombienet.toml b/pubsub-dev/zombienet.toml index dc31ddf36001e..44eb6c8ac3f98 100644 --- a/pubsub-dev/zombienet.toml +++ b/pubsub-dev/zombienet.toml @@ -34,11 +34,11 @@ cumulus_based = true rpc_port = 9920 chain = "penpal-local" command = "./target/release/polkadot-parachain" - args = ["-lxcm=trace", "-laura::cumulus=debug", "--trie-cache-size=0", "--network-backend=libp2p", "--", "--network-backend=libp2p"] + args = ["-lxcm=trace", "-laura::cumulus=debug", "-lparachain-inherent=debug", "--trie-cache-size=0", "--network-backend=libp2p", "--", "--network-backend=libp2p"] [[parachains.collators]] name = "para-collator02" chain = "penpal-local" command = "./target/release/polkadot-parachain" - args = ["-lxcm=trace", "-laura::cumulus=debug", "--trie-cache-size=0", "--network-backend=libp2p", "--", "--network-backend=libp2p"] + args = ["-lxcm=trace", "-laura::cumulus=debug", "-lparachain-inherent=debug", "--trie-cache-size=0", "--network-backend=libp2p", "--", "--network-backend=libp2p"] From 4f4798e7625026a32d752ada79fbdac7ff387c50 Mon Sep 17 00:00:00 2001 From: metricaez Date: Fri, 5 Dec 2025 13:26:44 -0300 Subject: [PATCH 114/128] feat: first approach to get data from proof --- Cargo.lock | 4 + cumulus/client/parachain-inherent/Cargo.toml | 2 + cumulus/client/parachain-inherent/src/lib.rs | 74 ++++++- .../Cargo.toml | 2 + .../src/lib.rs | 21 +- .../client/relay-chain-interface/Cargo.toml | 2 + .../client/relay-chain-interface/src/lib.rs | 34 +-- .../relay-chain-rpc-interface/src/lib.rs | 24 +- cumulus/pallets/parachain-system/Cargo.toml | 1 + cumulus/pallets/parachain-system/src/lib.rs | 205 +++++++++++++++--- .../src/relay_state_snapshot.rs | 16 ++ polkadot/primitives/src/v8/mod.rs | 21 +- pubsub-dev/zombienet.toml | 4 +- 13 files changed, 334 insertions(+), 76 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8146be1b8af24..3c08fee51bb7b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4436,6 +4436,7 @@ dependencies = [ "sp-runtime 42.0.0", "sp-state-machine 0.46.0", "sp-storage 22.0.0", + "sp-trie 40.0.0", "tracing", ] @@ -4591,6 +4592,7 @@ dependencies = [ "sp-runtime 42.0.0", "sp-state-machine 0.46.0", "sp-std 14.0.0", + "sp-storage 22.0.0", "sp-tracing 17.1.0", "sp-trie 40.0.0", "sp-version 40.0.0", @@ -4850,6 +4852,7 @@ dependencies = [ "sp-keyring", "sp-runtime 42.0.0", "sp-state-machine 0.46.0", + "sp-storage 22.0.0", ] [[package]] @@ -4867,6 +4870,7 @@ dependencies = [ "sp-api 37.0.0", "sp-blockchain", "sp-state-machine 0.46.0", + "sp-storage 22.0.0", "sp-version 40.0.0", "thiserror 1.0.65", ] diff --git a/cumulus/client/parachain-inherent/Cargo.toml b/cumulus/client/parachain-inherent/Cargo.toml index a5a56c7ae3c3f..5dea06bcbf6bf 100644 --- a/cumulus/client/parachain-inherent/Cargo.toml +++ b/cumulus/client/parachain-inherent/Cargo.toml @@ -35,4 +35,6 @@ sp-state-machine.default-features = true sp-state-machine.workspace = true sp-storage.default-features = true sp-storage.workspace = true +sp-trie.default-features = true +sp-trie.workspace = true tracing = { workspace = true, default-features = true } diff --git a/cumulus/client/parachain-inherent/src/lib.rs b/cumulus/client/parachain-inherent/src/lib.rs index 8244c7bbadd7f..ee843992ef6cb 100644 --- a/cumulus/client/parachain-inherent/src/lib.rs +++ b/cumulus/client/parachain-inherent/src/lib.rs @@ -16,12 +16,14 @@ //! Client side code for generating the parachain inherent. -use codec::Decode; +use codec::{Decode, Encode}; use cumulus_primitives_core::{ relay_chain::{self, Block as RelayBlock, Hash as PHash, HrmpChannelId}, ParaId, PersistedValidationData, }; use cumulus_relay_chain_interface::RelayChainInterface; +use sp_storage::ChildInfo; +use sp_trie::StorageProof; mod mock; @@ -140,9 +142,14 @@ async fn collect_relay_storage_proof( relevant_keys.push(relay_well_known_keys::NEXT_AUTHORITIES.to_vec()); } - relevant_keys.push(relay_well_known_keys::BROADCASTER_PUBLISHED_DATA_ROOTS.to_vec()); + // Add storage map keys for published data roots of subscribed publishers + // This allows the runtime to read the child trie roots from the proof + for (publisher_para_id, _) in subscription_keys.iter() { + relevant_keys.push(relay_well_known_keys::published_data_root(*publisher_para_id)); + } - relay_chain_interface + // Generate the main trie proof with all the standard keys + let mut combined_proof = relay_chain_interface .prove_read(relay_parent, &relevant_keys) .await .map_err(|e| { @@ -153,7 +160,59 @@ async fn collect_relay_storage_proof( "Cannot obtain read proof from relay chain.", ); }) - .ok() + .ok()?; + + // For each ParaId we're subscribed to, generate child trie proofs and merge them + for (publisher_para_id, child_keys) in subscription_keys { + if child_keys.is_empty() { + continue; + } + + // Construct the ChildInfo for this publisher's child trie + // The broadcaster pallet uses "pubsub" prefix + encoded ParaId + const PREFIX: &[u8] = b"pubsub"; + let para_id_encoded = publisher_para_id.encode(); + let mut child_storage_key = Vec::with_capacity(PREFIX.len() + para_id_encoded.len()); + child_storage_key.extend_from_slice(PREFIX); + child_storage_key.extend_from_slice(¶_id_encoded); + + let child_info = ChildInfo::new_default(&child_storage_key); + + // Generate proof for child trie keys + tracing::debug!( + target: LOG_TARGET, + publisher_para_id = ?publisher_para_id, + num_keys = child_keys.len(), + "Attempting to generate child trie proof" + ); + + match relay_chain_interface + .prove_child_read(relay_parent, &child_info, &child_keys) + .await + { + Ok(child_proof) => { + tracing::debug!( + target: LOG_TARGET, + publisher_para_id = ?publisher_para_id, + child_proof_nodes = child_proof.len(), + "✅ Generated child trie proof successfully" + ); + // Merge the child trie proof into the combined proof + combined_proof = StorageProof::merge([combined_proof, child_proof]); + }, + Err(e) => { + tracing::error!( + target: LOG_TARGET, + relay_parent = ?relay_parent, + publisher_para_id = ?publisher_para_id, + error = ?e, + "❌ Cannot obtain child trie proof from relay chain.", + ); + }, + } + } + + Some(combined_proof) } pub struct ParachainInherentDataProvider; @@ -212,10 +271,9 @@ impl ParachainInherentDataProvider { ); }) .ok()?; - let published_data = relay_chain_interface - .retrieve_subscribed_published_data(para_id, relay_parent) - .await - .unwrap_or_default(); + // Published data is now included in the relay_chain_state proof via child trie proofs. + // The parachain runtime will read it from the proof instead of this field. + let published_data = Default::default(); Some(ParachainInherentData { downward_messages, diff --git a/cumulus/client/relay-chain-inprocess-interface/Cargo.toml b/cumulus/client/relay-chain-inprocess-interface/Cargo.toml index 060c1c27cf884..35cc77f644438 100644 --- a/cumulus/client/relay-chain-inprocess-interface/Cargo.toml +++ b/cumulus/client/relay-chain-inprocess-interface/Cargo.toml @@ -49,6 +49,8 @@ sp-runtime.default-features = true sp-runtime.workspace = true sp-state-machine.default-features = true sp-state-machine.workspace = true +sp-storage.default-features = true +sp-storage.workspace = true [dev-dependencies] # Substrate diff --git a/cumulus/client/relay-chain-inprocess-interface/src/lib.rs b/cumulus/client/relay-chain-inprocess-interface/src/lib.rs index 6887b578dd03f..dc8ce4c0c4b70 100644 --- a/cumulus/client/relay-chain-inprocess-interface/src/lib.rs +++ b/cumulus/client/relay-chain-inprocess-interface/src/lib.rs @@ -36,6 +36,7 @@ use cumulus_primitives_core::{ use cumulus_relay_chain_interface::{RelayChainError, RelayChainInterface, RelayChainResult}; use futures::{FutureExt, Stream, StreamExt}; use polkadot_primitives::vstaging::CandidateEvent; +use sp_storage::ChildInfo; use polkadot_service::{ builder::PolkadotServiceBuilder, CollatorOverseerGen, CollatorPair, Configuration, FullBackend, FullClient, Handle, NewFull, NewFullParams, TaskManager, @@ -106,14 +107,6 @@ impl RelayChainInterface for RelayChainInProcessInterface { .inbound_hrmp_channels_contents(relay_parent, para_id)?) } - async fn retrieve_subscribed_published_data( - &self, - para_id: ParaId, - relay_parent: PHash, - ) -> RelayChainResult, Vec)>>> { - Ok(self.full_client.runtime_api().get_subscribed_data(relay_parent, para_id)?) - } - async fn header(&self, block_id: BlockId) -> RelayChainResult> { let hash = match block_id { BlockId::Hash(hash) => hash, @@ -248,6 +241,18 @@ impl RelayChainInterface for RelayChainInProcessInterface { .map_err(RelayChainError::StateMachineError) } + async fn prove_child_read( + &self, + relay_parent: PHash, + child_info: &ChildInfo, + child_keys: &[Vec], + ) -> RelayChainResult { + let state_backend = self.backend.state_at(relay_parent, TrieCacheContext::Untrusted)?; + + sp_state_machine::prove_child_read(state_backend, child_info, child_keys) + .map_err(RelayChainError::StateMachineError) + } + /// Wait for a given relay chain block in an async way. /// /// The caller needs to pass the hash of a block it waits for and the function will return when diff --git a/cumulus/client/relay-chain-interface/Cargo.toml b/cumulus/client/relay-chain-interface/Cargo.toml index 610ecbc919436..c73a3dc4955c9 100644 --- a/cumulus/client/relay-chain-interface/Cargo.toml +++ b/cumulus/client/relay-chain-interface/Cargo.toml @@ -26,6 +26,8 @@ sp-blockchain.default-features = true sp-blockchain.workspace = true sp-state-machine.default-features = true sp-state-machine.workspace = true +sp-storage.default-features = true +sp-storage.workspace = true sp-version.workspace = true async-trait = { workspace = true } diff --git a/cumulus/client/relay-chain-interface/src/lib.rs b/cumulus/client/relay-chain-interface/src/lib.rs index 78af2cb02ae48..7779ee8ad5b1f 100644 --- a/cumulus/client/relay-chain-interface/src/lib.rs +++ b/cumulus/client/relay-chain-interface/src/lib.rs @@ -24,6 +24,7 @@ use std::{ use futures::Stream; use polkadot_overseer::prometheus::PrometheusError; use sc_client_api::StorageProof; +use sp_storage::ChildInfo; use sp_version::RuntimeVersion; use async_trait::async_trait; @@ -151,14 +152,6 @@ pub trait RelayChainInterface: Send + Sync { relay_parent: PHash, ) -> RelayChainResult>>; - /// Returns published data from all subscribed publishers for the parachain we are collating - /// for. - async fn retrieve_subscribed_published_data( - &self, - para_id: ParaId, - relay_parent: PHash, - ) -> RelayChainResult, Vec)>>>; - /// Yields the persisted validation data for the given `ParaId` along with an assumption that /// should be used if the para currently occupies a core. /// @@ -221,6 +214,14 @@ pub trait RelayChainInterface: Send + Sync { relevant_keys: &Vec>, ) -> RelayChainResult; + /// Generate a child trie storage read proof. + async fn prove_child_read( + &self, + relay_parent: PHash, + child_info: &ChildInfo, + child_keys: &[Vec], + ) -> RelayChainResult; + /// Returns the validation code hash for the given `para_id` using the given /// `occupied_core_assumption`. async fn validation_code_hash( @@ -281,14 +282,6 @@ where (**self).retrieve_all_inbound_hrmp_channel_contents(para_id, relay_parent).await } - async fn retrieve_subscribed_published_data( - &self, - para_id: ParaId, - relay_parent: PHash, - ) -> RelayChainResult, Vec)>>> { - (**self).retrieve_subscribed_published_data(para_id, relay_parent).await - } - async fn persisted_validation_data( &self, block_id: PHash, @@ -370,6 +363,15 @@ where (**self).prove_read(relay_parent, relevant_keys).await } + async fn prove_child_read( + &self, + relay_parent: PHash, + child_info: &ChildInfo, + child_keys: &[Vec], + ) -> RelayChainResult { + (**self).prove_child_read(relay_parent, child_info, child_keys).await + } + async fn wait_for_block(&self, hash: PHash) -> RelayChainResult<()> { (**self).wait_for_block(hash).await } diff --git a/cumulus/client/relay-chain-rpc-interface/src/lib.rs b/cumulus/client/relay-chain-rpc-interface/src/lib.rs index b02fa91189680..22d5b1fd9cc63 100644 --- a/cumulus/client/relay-chain-rpc-interface/src/lib.rs +++ b/cumulus/client/relay-chain-rpc-interface/src/lib.rs @@ -87,14 +87,6 @@ impl RelayChainInterface for RelayChainRpcInterface { .await } - async fn retrieve_subscribed_published_data( - &self, - para_id: ParaId, - relay_parent: RelayHash, - ) -> RelayChainResult, Vec)>>> { - self.rpc_client.broadcaster_get_subscribed_data(para_id, relay_parent).await - } - async fn header(&self, block_id: BlockId) -> RelayChainResult> { let hash = match block_id { BlockId::Hash(hash) => hash, @@ -223,6 +215,22 @@ impl RelayChainInterface for RelayChainRpcInterface { }) } + async fn prove_child_read( + &self, + _relay_parent: RelayHash, + _child_info: &sp_storage::ChildInfo, + _child_keys: &[Vec], + ) -> RelayChainResult { + // TODO: Implement child trie proof generation via RPC + // This requires the relay chain RPC to expose a method for generating child trie proofs + // For now, return an empty proof which will cause the collator to skip this data + tracing::warn!( + target: "relay-chain-rpc-interface", + "prove_child_read not yet implemented for RPC interface, returning empty proof" + ); + Ok(StorageProof::empty()) + } + /// Wait for a given relay chain block /// /// The hash of the block to wait for is passed. We wait for the block to arrive or return after diff --git a/cumulus/pallets/parachain-system/Cargo.toml b/cumulus/pallets/parachain-system/Cargo.toml index 6f913f581ce03..71dac46ce6a67 100644 --- a/cumulus/pallets/parachain-system/Cargo.toml +++ b/cumulus/pallets/parachain-system/Cargo.toml @@ -37,6 +37,7 @@ sp-io.workspace = true sp-runtime.workspace = true sp-state-machine.workspace = true sp-std.workspace = true +sp-storage.workspace = true sp-trie.workspace = true sp-version.workspace = true trie-db = { workspace = true } diff --git a/cumulus/pallets/parachain-system/src/lib.rs b/cumulus/pallets/parachain-system/src/lib.rs index 5096967447cab..2a8a3f0eb93d8 100644 --- a/cumulus/pallets/parachain-system/src/lib.rs +++ b/cumulus/pallets/parachain-system/src/lib.rs @@ -630,7 +630,7 @@ pub mod pallet { horizontal_messages, relay_parent_descendants, collator_peer_id: _, - published_data, + published_data: _, } = data; // Check that the associated relay chain block number is as expected. @@ -736,15 +736,43 @@ pub mod pallet { >::put(relevant_messaging_state.clone()); >::put(host_config); - // Extract published data roots from relay chain state - let current_roots = relay_state_proof - .read_published_data_roots() - .ok() - .flatten() - .unwrap_or_default(); + // Build current_roots by reading individual storage map entries for subscribed publishers + let mut current_roots = Vec::new(); + for (publisher_para_id, _) in Subscriptions::::iter() { + // Construct the storage key for PublishedDataRoots[publisher_para_id] + let storage_key = relay_chain::well_known_keys::published_data_root(publisher_para_id); + + // Try to read the root hash from the proof + match relay_state_proof.read_optional_entry::<[u8; 32]>(&storage_key) { + Ok(Some(root_hash)) => { + log::debug!( + target: "parachain-system::pubsub", + "✅ Read root for publisher {:?}: {:?}", + publisher_para_id, + root_hash + ); + current_roots.push((publisher_para_id, root_hash.to_vec())); + }, + Ok(None) => { + log::debug!( + target: "parachain-system::pubsub", + "⚠️ No root found for publisher {:?} (not published yet)", + publisher_para_id + ); + }, + Err(e) => { + log::error!( + target: "parachain-system::pubsub", + "❌ Error reading root for publisher {:?}: {:?}", + publisher_para_id, + e + ); + }, + } + } // Process published data from the broadcaster pallet - total_weight.saturating_accrue(Self::process_published_data(&published_data, ¤t_roots)); + total_weight.saturating_accrue(Self::process_published_data(&relay_state_proof, ¤t_roots)); ::on_validation_data(&vfp); @@ -1423,15 +1451,26 @@ impl Pallet { /// Process published data from the broadcaster pallet and store it in parachain storage. /// - /// Uses child trie roots to detect changes between blocks, only updating storage for - /// publishers whose data has changed. Clears data for publishers that have been removed. + /// Reads data from child tries in the relay chain storage proof for subscribed publishers + /// whose roots have changed. Uses child trie roots to detect changes between blocks. fn process_published_data( - published_data: &BTreeMap, Vec)>>, + relay_state_proof: &RelayChainStateProof, current_roots: &Vec<(ParaId, Vec)>, ) -> Weight { let previous_roots = >::get(); - if current_roots.is_empty() && published_data.is_empty() && previous_roots.is_empty() { + log::debug!( + target: "parachain-system::pubsub", + "🔄 process_published_data called, current_roots len: {}, previous_roots len: {}", + current_roots.len(), + previous_roots.len() + ); + + if current_roots.is_empty() && previous_roots.is_empty() { + log::debug!( + target: "parachain-system::pubsub", + "⏭️ Skipping: both current and previous roots are empty" + ); return T::DbWeight::get().reads(1); } @@ -1440,38 +1479,142 @@ impl Pallet { let mut k = 0u32; let mut v = 0u32; - for entries in published_data.values() { - p += 1; - let entry_count = entries.len() as u32; - k = k.max(entry_count); - - for (_, value) in entries { - v = v.max(value.len() as u32); - } - } - // Convert current roots to map for efficient lookups. let current_roots_map: BTreeMap> = current_roots.iter() .map(|(para_id, root)| (*para_id, root.clone())) .collect(); - // Update storage for publishers with changed roots. - for (publisher, data_entries) in published_data { - let should_update = match previous_roots.get(publisher) { - Some(prev_root) => match current_roots_map.get(publisher) { - Some(curr_root) if prev_root == curr_root => false, + // Get subscriptions to know which publishers' data to read + let subscriptions = Subscriptions::::iter().collect::>(); + + log::debug!( + target: "parachain-system::pubsub", + "📋 Found {} subscriptions", + subscriptions.len() + ); + + // Update storage for publishers with changed roots that we're subscribed to. + for (publisher, subscription_keys) in subscriptions { + log::debug!( + target: "parachain-system::pubsub", + "🔍 Processing subscription for publisher {:?}, {} keys", + publisher, + subscription_keys.len() + ); + + let should_update = match previous_roots.get(&publisher) { + Some(prev_root) => match current_roots_map.get(&publisher) { + Some(curr_root) if prev_root == curr_root => { + log::debug!( + target: "parachain-system::pubsub", + "⏭️ Root unchanged for publisher {:?}, skipping", + publisher + ); + false + }, _ => true, }, None => true, }; - if should_update { - let result = PublishedData::::clear_prefix(publisher, u32::MAX, None); + if should_update && current_roots_map.contains_key(&publisher) { + log::debug!( + target: "parachain-system::pubsub", + "✅ Root changed for publisher {:?}, reading from proof", + publisher + ); + + // Clear existing data for this publisher + let result = PublishedData::::clear_prefix(&publisher, u32::MAX, None); debug_assert!(result.maybe_cursor.is_none()); - for (key, value) in data_entries { - PublishedData::::insert(publisher, key, value); + // Construct ChildInfo for this publisher's child trie + // Must match the broadcaster pallet's derive_child_info function + use codec::Encode; + const PREFIX: &[u8] = b"pubsub"; + let para_id_encoded = publisher.encode(); + let mut child_storage_key = alloc::vec::Vec::with_capacity(PREFIX.len() + para_id_encoded.len()); + child_storage_key.extend_from_slice(PREFIX); + child_storage_key.extend_from_slice(¶_id_encoded); + let child_info = sp_storage::ChildInfo::new_default(&child_storage_key); + + // Read data from child trie in the proof for each subscribed key + let mut data_entries = alloc::vec::Vec::new(); + for bounded_key in subscription_keys.iter() { + let key = bounded_key.as_ref(); + log::debug!( + target: "parachain-system::pubsub", + "🔑 Attempting to read key {:?} from child trie", + key + ); + + match relay_state_proof.read_child_storage(&child_info, key) { + Ok(Some(encoded_value)) => { + // SCALE-decode the Vec since broadcaster uses child::put which encodes + match Vec::::decode(&mut &encoded_value[..]) { + Ok(value) => { + log::debug!( + target: "parachain-system::pubsub", + "✅ Read key {:?} from publisher {:?}, value len: {} (encoded len: {})", + key, + publisher, + value.len(), + encoded_value.len() + ); + data_entries.push((key.to_vec(), value.clone())); + v = v.max(value.len() as u32); + }, + Err(e) => { + log::error!( + target: "parachain-system::pubsub", + "❌ Failed to SCALE-decode value for key {:?} from publisher {:?}: {:?}", + key, + publisher, + e + ); + }, + } + }, + Ok(None) => { + log::warn!( + target: "parachain-system::pubsub", + "⚠️ Key {:?} not found in child trie for publisher {:?}", + key, + publisher + ); + }, + Err(e) => { + log::error!( + target: "parachain-system::pubsub", + "❌ Error reading key {:?} from publisher {:?}: {:?}", + key, + publisher, + e + ); + }, + } } + + // Store the data in local parachain storage + log::debug!( + target: "parachain-system::pubsub", + "📦 Storing {} entries for publisher {:?}", + data_entries.len(), + publisher + ); + + for (key, value) in data_entries.iter() { + PublishedData::::insert(&publisher, key, value); + } + + p += 1; + k = k.max(data_entries.len() as u32); + } else if !current_roots_map.contains_key(&publisher) { + log::warn!( + target: "parachain-system::pubsub", + "⚠️ Publisher {:?} not found in current roots", + publisher + ); } } diff --git a/cumulus/pallets/parachain-system/src/relay_state_snapshot.rs b/cumulus/pallets/parachain-system/src/relay_state_snapshot.rs index 7d7bd761d79f6..58d09efad2eb2 100644 --- a/cumulus/pallets/parachain-system/src/relay_state_snapshot.rs +++ b/cumulus/pallets/parachain-system/src/relay_state_snapshot.rs @@ -397,4 +397,20 @@ impl RelayChainStateProof { ) .map_err(Error::ReadOptionalEntry) } + + /// Read a value from a child trie in the relay chain state proof. + /// + /// Returns `Ok(Some(value))` if the key exists in the child trie, + /// `Ok(None)` if the key doesn't exist, + /// or `Err` if there was a proof error. + pub fn read_child_storage( + &self, + child_info: &sp_storage::ChildInfo, + key: &[u8], + ) -> Result>, Error> { + use sp_state_machine::Backend; + self.trie_backend + .child_storage(child_info, key) + .map_err(|_| Error::ReadEntry(ReadEntryErr::Proof)) + } } diff --git a/polkadot/primitives/src/v8/mod.rs b/polkadot/primitives/src/v8/mod.rs index d0ae2cc200000..82b45b713f742 100644 --- a/polkadot/primitives/src/v8/mod.rs +++ b/polkadot/primitives/src/v8/mod.rs @@ -248,13 +248,28 @@ pub mod well_known_keys { pub const AUTHORITIES: &[u8] = &hex!["1cb6f36e027abb2091cfb5110ab5087f5e0621c4869aa60c02be9adcc98a0d1d"]; - /// Published data roots from the broadcaster pallet. + /// Published data roots from the broadcaster pallet (StorageMap prefix). /// - /// The storage entry should be accessed as `Vec<(ParaId, Vec)>` encoded value - /// where Vec is the child trie root hash for each publisher. + /// This is the prefix for the `PublishedDataRoots` StorageMap. + /// To access individual entries, use `published_data_root(para_id)` instead. pub const BROADCASTER_PUBLISHED_DATA_ROOTS: &[u8] = &hex!["6aca18c1f7576767ccb238db4ccaedf239166324ac7ea24c870f96ab961f9654"]; + /// Get the storage key for a specific parachain's published data root. + /// + /// Returns the key to access `PublishedDataRoots[para_id]` which contains + /// the child trie root hash (32 bytes) for that publisher. + pub fn published_data_root(para_id: Id) -> Vec { + para_id.using_encoded(|para_id: &[u8]| { + BROADCASTER_PUBLISHED_DATA_ROOTS + .iter() + .chain(twox_64(para_id).iter()) + .chain(para_id.iter()) + .cloned() + .collect() + }) + } + /// The authorities for the next epoch. /// /// The storage entry should be accessed as an `Vec<(AuthorityId, BabeAuthorityWeight)>` encoded diff --git a/pubsub-dev/zombienet.toml b/pubsub-dev/zombienet.toml index 44eb6c8ac3f98..72e825b62b5da 100644 --- a/pubsub-dev/zombienet.toml +++ b/pubsub-dev/zombienet.toml @@ -34,11 +34,11 @@ cumulus_based = true rpc_port = 9920 chain = "penpal-local" command = "./target/release/polkadot-parachain" - args = ["-lxcm=trace", "-laura::cumulus=debug", "-lparachain-inherent=debug", "--trie-cache-size=0", "--network-backend=libp2p", "--", "--network-backend=libp2p"] + args = ["-lxcm=trace", "-laura::cumulus=debug", "-lparachain-inherent=debug", "-lparachain-system::pubsub=debug", "--trie-cache-size=0", "--network-backend=libp2p", "--", "--network-backend=libp2p"] [[parachains.collators]] name = "para-collator02" chain = "penpal-local" command = "./target/release/polkadot-parachain" - args = ["-lxcm=trace", "-laura::cumulus=debug", "-lparachain-inherent=debug", "--trie-cache-size=0", "--network-backend=libp2p", "--", "--network-backend=libp2p"] + args = ["-lxcm=trace", "-laura::cumulus=debug", "-lparachain-inherent=debug", "-lparachain-system::pubsub=debug", "--trie-cache-size=0", "--network-backend=libp2p", "--", "--network-backend=libp2p"] From ec0ea3de1529da940d1720d3cd053b91bcd5d4c1 Mon Sep 17 00:00:00 2001 From: metricaez Date: Fri, 5 Dec 2025 19:33:56 -0300 Subject: [PATCH 115/128] choir: parachain system and inherent clean up and refactor --- cumulus/client/parachain-inherent/src/lib.rs | 108 +++++----- .../relay-chain-rpc-interface/src/lib.rs | 6 +- cumulus/pallets/parachain-system/src/lib.rs | 186 ++++-------------- .../src/relay_state_snapshot.rs | 14 -- .../runtime/parachains/src/broadcaster/mod.rs | 7 - 5 files changed, 106 insertions(+), 215 deletions(-) diff --git a/cumulus/client/parachain-inherent/src/lib.rs b/cumulus/client/parachain-inherent/src/lib.rs index ee843992ef6cb..c39569d3106d7 100644 --- a/cumulus/client/parachain-inherent/src/lib.rs +++ b/cumulus/client/parachain-inherent/src/lib.rs @@ -33,6 +33,18 @@ pub use mock::{MockValidationDataInherentDataProvider, MockXcmConfig}; const LOG_TARGET: &str = "parachain-inherent"; +/// Constructs the ChildInfo for a publisher's child trie. +/// +/// The broadcaster pallet uses "pubsub" prefix + encoded ParaId as the child storage key. +fn derive_child_info(publisher_para_id: ParaId) -> ChildInfo { + const PREFIX: &[u8] = b"pubsub"; + let para_id_encoded = publisher_para_id.encode(); + let mut child_storage_key = Vec::with_capacity(PREFIX.len() + para_id_encoded.len()); + child_storage_key.extend_from_slice(PREFIX); + child_storage_key.extend_from_slice(¶_id_encoded); + ChildInfo::new_default(&child_storage_key) +} + /// Collect the relevant relay chain state in form of a proof for putting it into the validation /// data inherent. async fn collect_relay_storage_proof( @@ -41,16 +53,9 @@ async fn collect_relay_storage_proof( relay_parent: PHash, include_authorities: bool, include_next_authorities: bool, - subscription_keys: Vec<(ParaId, Vec>)>, ) -> Option { use relay_chain::well_known_keys as relay_well_known_keys; - tracing::debug!( - target: LOG_TARGET, - ?subscription_keys, - "Received subscription keys in collect_relay_storage_proof" - ); - let ingress_channels = relay_chain_interface .get_storage_by_key( relay_parent, @@ -142,62 +147,68 @@ async fn collect_relay_storage_proof( relevant_keys.push(relay_well_known_keys::NEXT_AUTHORITIES.to_vec()); } - // Add storage map keys for published data roots of subscribed publishers - // This allows the runtime to read the child trie roots from the proof - for (publisher_para_id, _) in subscription_keys.iter() { - relevant_keys.push(relay_well_known_keys::published_data_root(*publisher_para_id)); + relay_chain_interface + .prove_read(relay_parent, &relevant_keys) + .await + .map_err(|e| { + tracing::error!( + target: LOG_TARGET, + relay_parent = ?relay_parent, + error = ?e, + "Cannot obtain read proof from relay chain.", + ); + }) + .ok() +} + +/// Collect child trie proofs for subscribed publishers' data. +/// +/// Generates proofs for publisher child trie roots and their data entries. Returns a merged proof +/// combining all child trie data, or `None` if there are no subscriptions. +async fn collect_child_trie_proofs( + relay_chain_interface: &impl RelayChainInterface, + relay_parent: PHash, + subscription_keys: Vec<(ParaId, Vec>)>, +) -> Option { + use relay_chain::well_known_keys as relay_well_known_keys; + + if subscription_keys.is_empty() { + return None; } - // Generate the main trie proof with all the standard keys + // Collect storage keys for all publisher roots + let root_keys: Vec<_> = subscription_keys + .iter() + .map(|(publisher_para_id, _)| relay_well_known_keys::published_data_root(*publisher_para_id)) + .collect(); + + // Generate proof for publisher roots let mut combined_proof = relay_chain_interface - .prove_read(relay_parent, &relevant_keys) + .prove_read(relay_parent, &root_keys) .await .map_err(|e| { tracing::error!( target: LOG_TARGET, relay_parent = ?relay_parent, error = ?e, - "Cannot obtain read proof from relay chain.", + "Cannot obtain publisher roots proof from relay chain.", ); }) .ok()?; - // For each ParaId we're subscribed to, generate child trie proofs and merge them + // Generate and merge child trie proofs for each publisher for (publisher_para_id, child_keys) in subscription_keys { if child_keys.is_empty() { continue; } - // Construct the ChildInfo for this publisher's child trie - // The broadcaster pallet uses "pubsub" prefix + encoded ParaId - const PREFIX: &[u8] = b"pubsub"; - let para_id_encoded = publisher_para_id.encode(); - let mut child_storage_key = Vec::with_capacity(PREFIX.len() + para_id_encoded.len()); - child_storage_key.extend_from_slice(PREFIX); - child_storage_key.extend_from_slice(¶_id_encoded); - - let child_info = ChildInfo::new_default(&child_storage_key); - - // Generate proof for child trie keys - tracing::debug!( - target: LOG_TARGET, - publisher_para_id = ?publisher_para_id, - num_keys = child_keys.len(), - "Attempting to generate child trie proof" - ); + let child_info = derive_child_info(publisher_para_id); match relay_chain_interface .prove_child_read(relay_parent, &child_info, &child_keys) .await { Ok(child_proof) => { - tracing::debug!( - target: LOG_TARGET, - publisher_para_id = ?publisher_para_id, - child_proof_nodes = child_proof.len(), - "✅ Generated child trie proof successfully" - ); - // Merge the child trie proof into the combined proof combined_proof = StorageProof::merge([combined_proof, child_proof]); }, Err(e) => { @@ -206,7 +217,7 @@ async fn collect_relay_storage_proof( relay_parent = ?relay_parent, publisher_para_id = ?publisher_para_id, error = ?e, - "❌ Cannot obtain child trie proof from relay chain.", + "Cannot obtain child trie proof from relay chain.", ); }, } @@ -237,16 +248,27 @@ impl ParachainInherentDataProvider { .flatten() .is_some() }); - let relay_chain_state = collect_relay_storage_proof( + let mut relay_chain_state = collect_relay_storage_proof( relay_chain_interface, para_id, relay_parent, !relay_parent_descendants.is_empty(), include_next_authorities, - subscription_keys, ) .await?; + if !subscription_keys.is_empty() { + if let Some(child_proofs) = collect_child_trie_proofs( + relay_chain_interface, + relay_parent, + subscription_keys, + ) + .await + { + relay_chain_state = StorageProof::merge([relay_chain_state, child_proofs]); + } + } + let downward_messages = relay_chain_interface .retrieve_dmq_contents(para_id, relay_parent) .await @@ -271,8 +293,6 @@ impl ParachainInherentDataProvider { ); }) .ok()?; - // Published data is now included in the relay_chain_state proof via child trie proofs. - // The parachain runtime will read it from the proof instead of this field. let published_data = Default::default(); Some(ParachainInherentData { diff --git a/cumulus/client/relay-chain-rpc-interface/src/lib.rs b/cumulus/client/relay-chain-rpc-interface/src/lib.rs index 22d5b1fd9cc63..869d52754c50c 100644 --- a/cumulus/client/relay-chain-rpc-interface/src/lib.rs +++ b/cumulus/client/relay-chain-rpc-interface/src/lib.rs @@ -221,12 +221,10 @@ impl RelayChainInterface for RelayChainRpcInterface { _child_info: &sp_storage::ChildInfo, _child_keys: &[Vec], ) -> RelayChainResult { - // TODO: Implement child trie proof generation via RPC - // This requires the relay chain RPC to expose a method for generating child trie proofs - // For now, return an empty proof which will cause the collator to skip this data + // Not implemented: requires relay chain RPC to expose child trie proof method. tracing::warn!( target: "relay-chain-rpc-interface", - "prove_child_read not yet implemented for RPC interface, returning empty proof" + "prove_child_read not implemented for RPC interface, returning empty proof" ); Ok(StorageProof::empty()) } diff --git a/cumulus/pallets/parachain-system/src/lib.rs b/cumulus/pallets/parachain-system/src/lib.rs index 2a8a3f0eb93d8..d00e3220cfd22 100644 --- a/cumulus/pallets/parachain-system/src/lib.rs +++ b/cumulus/pallets/parachain-system/src/lib.rs @@ -736,42 +736,7 @@ pub mod pallet { >::put(relevant_messaging_state.clone()); >::put(host_config); - // Build current_roots by reading individual storage map entries for subscribed publishers - let mut current_roots = Vec::new(); - for (publisher_para_id, _) in Subscriptions::::iter() { - // Construct the storage key for PublishedDataRoots[publisher_para_id] - let storage_key = relay_chain::well_known_keys::published_data_root(publisher_para_id); - - // Try to read the root hash from the proof - match relay_state_proof.read_optional_entry::<[u8; 32]>(&storage_key) { - Ok(Some(root_hash)) => { - log::debug!( - target: "parachain-system::pubsub", - "✅ Read root for publisher {:?}: {:?}", - publisher_para_id, - root_hash - ); - current_roots.push((publisher_para_id, root_hash.to_vec())); - }, - Ok(None) => { - log::debug!( - target: "parachain-system::pubsub", - "⚠️ No root found for publisher {:?} (not published yet)", - publisher_para_id - ); - }, - Err(e) => { - log::error!( - target: "parachain-system::pubsub", - "❌ Error reading root for publisher {:?}: {:?}", - publisher_para_id, - e - ); - }, - } - } - - // Process published data from the broadcaster pallet + let current_roots = Self::collect_publisher_roots(&relay_state_proof); total_weight.saturating_accrue(Self::process_published_data(&relay_state_proof, ¤t_roots)); ::on_validation_data(&vfp); @@ -1449,6 +1414,37 @@ impl Pallet { weight_used } + /// Constructs the ChildInfo for a publisher's child trie. + /// + /// Must match the broadcaster pallet's child trie structure. + fn derive_child_info(publisher_para_id: ParaId) -> sp_storage::ChildInfo { + use codec::Encode; + const PREFIX: &[u8] = b"pubsub"; + let para_id_encoded = publisher_para_id.encode(); + let mut child_storage_key = + alloc::vec::Vec::with_capacity(PREFIX.len() + para_id_encoded.len()); + child_storage_key.extend_from_slice(PREFIX); + child_storage_key.extend_from_slice(¶_id_encoded); + sp_storage::ChildInfo::new_default(&child_storage_key) + } + + /// Collect publisher roots from relay chain state proof for subscribed publishers. + fn collect_publisher_roots( + relay_state_proof: &RelayChainStateProof, + ) -> Vec<(ParaId, Vec)> { + Subscriptions::::iter() + .filter_map(|(publisher_para_id, _)| { + let storage_key = + relay_chain::well_known_keys::published_data_root(publisher_para_id); + relay_state_proof + .read_optional_entry::<[u8; 32]>(&storage_key) + .ok() + .flatten() + .map(|root_hash| (publisher_para_id, root_hash.to_vec())) + }) + .collect() + } + /// Process published data from the broadcaster pallet and store it in parachain storage. /// /// Reads data from child tries in the relay chain storage proof for subscribed publishers @@ -1459,162 +1455,60 @@ impl Pallet { ) -> Weight { let previous_roots = >::get(); - log::debug!( - target: "parachain-system::pubsub", - "🔄 process_published_data called, current_roots len: {}, previous_roots len: {}", - current_roots.len(), - previous_roots.len() - ); - if current_roots.is_empty() && previous_roots.is_empty() { - log::debug!( - target: "parachain-system::pubsub", - "⏭️ Skipping: both current and previous roots are empty" - ); return T::DbWeight::get().reads(1); } - // Calculate weight parameters for benchmarking let mut p = 0u32; let mut k = 0u32; let mut v = 0u32; - // Convert current roots to map for efficient lookups. - let current_roots_map: BTreeMap> = current_roots.iter() - .map(|(para_id, root)| (*para_id, root.clone())) - .collect(); + let current_roots_map: BTreeMap> = + current_roots.iter().map(|(para_id, root)| (*para_id, root.clone())).collect(); - // Get subscriptions to know which publishers' data to read let subscriptions = Subscriptions::::iter().collect::>(); - log::debug!( - target: "parachain-system::pubsub", - "📋 Found {} subscriptions", - subscriptions.len() - ); - - // Update storage for publishers with changed roots that we're subscribed to. for (publisher, subscription_keys) in subscriptions { - log::debug!( - target: "parachain-system::pubsub", - "🔍 Processing subscription for publisher {:?}, {} keys", - publisher, - subscription_keys.len() - ); - let should_update = match previous_roots.get(&publisher) { Some(prev_root) => match current_roots_map.get(&publisher) { - Some(curr_root) if prev_root == curr_root => { - log::debug!( - target: "parachain-system::pubsub", - "⏭️ Root unchanged for publisher {:?}, skipping", - publisher - ); - false - }, + Some(curr_root) if prev_root == curr_root => false, _ => true, }, None => true, }; if should_update && current_roots_map.contains_key(&publisher) { - log::debug!( - target: "parachain-system::pubsub", - "✅ Root changed for publisher {:?}, reading from proof", - publisher - ); - - // Clear existing data for this publisher let result = PublishedData::::clear_prefix(&publisher, u32::MAX, None); debug_assert!(result.maybe_cursor.is_none()); - // Construct ChildInfo for this publisher's child trie - // Must match the broadcaster pallet's derive_child_info function - use codec::Encode; - const PREFIX: &[u8] = b"pubsub"; - let para_id_encoded = publisher.encode(); - let mut child_storage_key = alloc::vec::Vec::with_capacity(PREFIX.len() + para_id_encoded.len()); - child_storage_key.extend_from_slice(PREFIX); - child_storage_key.extend_from_slice(¶_id_encoded); - let child_info = sp_storage::ChildInfo::new_default(&child_storage_key); - - // Read data from child trie in the proof for each subscribed key + let child_info = Self::derive_child_info(publisher); + let mut data_entries = alloc::vec::Vec::new(); for bounded_key in subscription_keys.iter() { let key = bounded_key.as_ref(); - log::debug!( - target: "parachain-system::pubsub", - "🔑 Attempting to read key {:?} from child trie", - key - ); match relay_state_proof.read_child_storage(&child_info, key) { Ok(Some(encoded_value)) => { - // SCALE-decode the Vec since broadcaster uses child::put which encodes match Vec::::decode(&mut &encoded_value[..]) { Ok(value) => { - log::debug!( - target: "parachain-system::pubsub", - "✅ Read key {:?} from publisher {:?}, value len: {} (encoded len: {})", - key, - publisher, - value.len(), - encoded_value.len() - ); data_entries.push((key.to_vec(), value.clone())); v = v.max(value.len() as u32); }, - Err(e) => { - log::error!( - target: "parachain-system::pubsub", - "❌ Failed to SCALE-decode value for key {:?} from publisher {:?}: {:?}", - key, - publisher, - e - ); + Err(_) => { + defensive!("Failed to decode published data value"); }, } }, - Ok(None) => { - log::warn!( - target: "parachain-system::pubsub", - "⚠️ Key {:?} not found in child trie for publisher {:?}", - key, - publisher - ); - }, - Err(e) => { - log::error!( - target: "parachain-system::pubsub", - "❌ Error reading key {:?} from publisher {:?}: {:?}", - key, - publisher, - e - ); - }, + Ok(None) | Err(_) => {}, } } - // Store the data in local parachain storage - log::debug!( - target: "parachain-system::pubsub", - "📦 Storing {} entries for publisher {:?}", - data_entries.len(), - publisher - ); - for (key, value) in data_entries.iter() { PublishedData::::insert(&publisher, key, value); } p += 1; k = k.max(data_entries.len() as u32); - } else if !current_roots_map.contains_key(&publisher) { - log::warn!( - target: "parachain-system::pubsub", - "⚠️ Publisher {:?} not found in current roots", - publisher - ); } } diff --git a/cumulus/pallets/parachain-system/src/relay_state_snapshot.rs b/cumulus/pallets/parachain-system/src/relay_state_snapshot.rs index 58d09efad2eb2..7b4b8354268c9 100644 --- a/cumulus/pallets/parachain-system/src/relay_state_snapshot.rs +++ b/cumulus/pallets/parachain-system/src/relay_state_snapshot.rs @@ -384,20 +384,6 @@ impl RelayChainStateProof { read_optional_entry(&self.trie_backend, key).map_err(Error::ReadOptionalEntry) } - /// Read the published data roots from the broadcaster pallet on the relay chain. - /// - /// Returns `Ok(Some(data))` if the data exists and can be decoded, - /// `Ok(None)` if the data doesn't exist (broadcaster pallet not present), - /// or `Err` if there was a proof/decode error. - pub fn read_published_data_roots(&self) -> Result)>>, Error> { - // Use the well-known key for BROADCASTER_PUBLISHED_DATA_ROOTS - read_optional_entry::)>, _>( - &self.trie_backend, - relay_chain::well_known_keys::BROADCASTER_PUBLISHED_DATA_ROOTS, - ) - .map_err(Error::ReadOptionalEntry) - } - /// Read a value from a child trie in the relay chain state proof. /// /// Returns `Ok(Some(value))` if the key exists in the child trie, diff --git a/polkadot/runtime/parachains/src/broadcaster/mod.rs b/polkadot/runtime/parachains/src/broadcaster/mod.rs index 6c61d90376389..bfe59297eb275 100644 --- a/polkadot/runtime/parachains/src/broadcaster/mod.rs +++ b/polkadot/runtime/parachains/src/broadcaster/mod.rs @@ -144,13 +144,6 @@ pub mod pallet { #[pallet::hooks] impl Hooks> for Pallet { fn integrity_test() { - assert_eq!( - &PublishedDataRoots::::map_storage_final_prefix(), - polkadot_primitives::well_known_keys::BROADCASTER_PUBLISHED_DATA_ROOTS, - "`well_known_keys::BROADCASTER_PUBLISHED_DATA_ROOTS` doesn't match key of `PublishedDataRoots`! \ - Make sure that the name of the broadcaster pallet is `Broadcaster` in the runtime!", - ); - assert!( T::MaxPublishItems::get() <= xcm::v5::MaxPublishItems::get(), "Broadcaster MaxPublishItems exceeds XCM MaxPublishItems upper bound" From 44156a4c4529f76a54c259257ecc04506fe20889 Mon Sep 17 00:00:00 2001 From: metricaez Date: Sat, 6 Dec 2025 18:00:08 -0300 Subject: [PATCH 116/128] feat: api data retrieval cleanup --- .../slot_based/block_builder_task.rs | 7 ----- cumulus/client/consensus/common/src/tests.rs | 7 ----- cumulus/client/network/src/tests.rs | 7 ----- cumulus/client/parachain-inherent/src/lib.rs | 2 -- cumulus/client/parachain-inherent/src/mock.rs | 1 - cumulus/client/pov-recovery/src/tests.rs | 7 ----- .../src/rpc_client.rs | 13 -------- cumulus/pallets/parachain-system/src/lib.rs | 1 - cumulus/pallets/parachain-system/src/mock.rs | 1 - cumulus/pallets/parachain-system/src/tests.rs | 2 -- .../primitives/parachain-inherent/src/lib.rs | 4 --- cumulus/test/client/src/block_builder.rs | 1 - cumulus/test/service/src/bench_utils.rs | 1 - polkadot/primitives/src/runtime_api.rs | 6 ---- .../runtime/parachains/src/broadcaster/mod.rs | 1 - .../parachains/src/broadcaster/runtime_api.rs | 31 ------------------- polkadot/runtime/rococo/src/lib.rs | 6 +--- 17 files changed, 1 insertion(+), 97 deletions(-) delete mode 100644 polkadot/runtime/parachains/src/broadcaster/runtime_api.rs diff --git a/cumulus/client/consensus/aura/src/collators/slot_based/block_builder_task.rs b/cumulus/client/consensus/aura/src/collators/slot_based/block_builder_task.rs index 2526ed8a81432..587c4f9984447 100644 --- a/cumulus/client/consensus/aura/src/collators/slot_based/block_builder_task.rs +++ b/cumulus/client/consensus/aura/src/collators/slot_based/block_builder_task.rs @@ -636,13 +636,6 @@ mod tests { unimplemented!("Not needed for test") } - async fn retrieve_subscribed_published_data( - &self, - _: ParaId, - _: RelayHash, - ) -> RelayChainResult, Vec)>>> { - unimplemented!("Not needed for test") - } async fn persisted_validation_data( &self, diff --git a/cumulus/client/consensus/common/src/tests.rs b/cumulus/client/consensus/common/src/tests.rs index 4a336f06c5880..34f42ed68c76a 100644 --- a/cumulus/client/consensus/common/src/tests.rs +++ b/cumulus/client/consensus/common/src/tests.rs @@ -122,13 +122,6 @@ impl RelayChainInterface for Relaychain { unimplemented!("Not needed for test") } - async fn retrieve_subscribed_published_data( - &self, - _: ParaId, - _: PHash, - ) -> RelayChainResult, Vec)>>> { - unimplemented!("Not needed for test") - } async fn persisted_validation_data( &self, diff --git a/cumulus/client/network/src/tests.rs b/cumulus/client/network/src/tests.rs index 820010c50971b..e031f319f2778 100644 --- a/cumulus/client/network/src/tests.rs +++ b/cumulus/client/network/src/tests.rs @@ -143,13 +143,6 @@ impl RelayChainInterface for DummyRelayChainInterface { Ok(BTreeMap::new()) } - async fn retrieve_subscribed_published_data( - &self, - _: ParaId, - _: PHash, - ) -> RelayChainResult, Vec)>>> { - Ok(BTreeMap::new()) - } async fn persisted_validation_data( &self, diff --git a/cumulus/client/parachain-inherent/src/lib.rs b/cumulus/client/parachain-inherent/src/lib.rs index c39569d3106d7..638b5a8f67d6c 100644 --- a/cumulus/client/parachain-inherent/src/lib.rs +++ b/cumulus/client/parachain-inherent/src/lib.rs @@ -293,7 +293,6 @@ impl ParachainInherentDataProvider { ); }) .ok()?; - let published_data = Default::default(); Some(ParachainInherentData { downward_messages, @@ -302,7 +301,6 @@ impl ParachainInherentDataProvider { relay_chain_state, relay_parent_descendants, collator_peer_id: None, - published_data, }) } } diff --git a/cumulus/client/parachain-inherent/src/mock.rs b/cumulus/client/parachain-inherent/src/mock.rs index 75977a3a5920a..5f4517f884245 100644 --- a/cumulus/client/parachain-inherent/src/mock.rs +++ b/cumulus/client/parachain-inherent/src/mock.rs @@ -242,7 +242,6 @@ impl> InherentDataProvider relay_chain_state: proof, relay_parent_descendants: Default::default(), collator_peer_id: None, - published_data: Default::default(), }; parachain_inherent_data.provide_inherent_data(inherent_data).await diff --git a/cumulus/client/pov-recovery/src/tests.rs b/cumulus/client/pov-recovery/src/tests.rs index 9c8b60222fc93..cf68be2bf8ea4 100644 --- a/cumulus/client/pov-recovery/src/tests.rs +++ b/cumulus/client/pov-recovery/src/tests.rs @@ -367,13 +367,6 @@ impl RelayChainInterface for Relaychain { unimplemented!("Not needed for test") } - async fn retrieve_subscribed_published_data( - &self, - _: ParaId, - _: PHash, - ) -> RelayChainResult, Vec)>>> { - unimplemented!("Not needed for test") - } async fn persisted_validation_data( &self, diff --git a/cumulus/client/relay-chain-rpc-interface/src/rpc_client.rs b/cumulus/client/relay-chain-rpc-interface/src/rpc_client.rs index af96638dd5ce1..1a0d137f3fb38 100644 --- a/cumulus/client/relay-chain-rpc-interface/src/rpc_client.rs +++ b/cumulus/client/relay-chain-rpc-interface/src/rpc_client.rs @@ -627,19 +627,6 @@ impl RelayChainRpcClient { .await } - /// Get published data from all subscribed publishers for a parachain. - pub async fn broadcaster_get_subscribed_data( - &self, - para_id: ParaId, - at: RelayHash, - ) -> Result, Vec)>>, RelayChainError> { - self.call_remote_runtime_function( - "ParachainHost_get_subscribed_data", - at, - Some(para_id), - ) - .await - } /// Get the minimum number of backing votes for a candidate. pub async fn parachain_host_minimum_backing_votes( diff --git a/cumulus/pallets/parachain-system/src/lib.rs b/cumulus/pallets/parachain-system/src/lib.rs index d00e3220cfd22..26fe28b262aba 100644 --- a/cumulus/pallets/parachain-system/src/lib.rs +++ b/cumulus/pallets/parachain-system/src/lib.rs @@ -630,7 +630,6 @@ pub mod pallet { horizontal_messages, relay_parent_descendants, collator_peer_id: _, - published_data: _, } = data; // Check that the associated relay chain block number is as expected. diff --git a/cumulus/pallets/parachain-system/src/mock.rs b/cumulus/pallets/parachain-system/src/mock.rs index df470e54d6723..76f8ebc602139 100644 --- a/cumulus/pallets/parachain-system/src/mock.rs +++ b/cumulus/pallets/parachain-system/src/mock.rs @@ -423,7 +423,6 @@ impl BlockTests { horizontal_messages: Default::default(), relay_parent_descendants: Default::default(), collator_peer_id: None, - published_data: Default::default(), }; if let Some(ref hook) = self.inherent_data_hook { hook(self, relay_parent_number, &mut system_inherent_data); diff --git a/cumulus/pallets/parachain-system/src/tests.rs b/cumulus/pallets/parachain-system/src/tests.rs index cc9b0ca6ff95c..4b3662154fe63 100755 --- a/cumulus/pallets/parachain-system/src/tests.rs +++ b/cumulus/pallets/parachain-system/src/tests.rs @@ -57,7 +57,6 @@ fn test_inherent_compatibility() { horizontal_messages: Default::default(), relay_parent_descendants: Default::default(), collator_peer_id: None, - published_data: Default::default(), }, ) .expect("Put validation function params failed"); @@ -83,7 +82,6 @@ fn test_inherent_compatibility() { horizontal_messages: Default::default(), relay_parent_descendants: Default::default(), collator_peer_id: None, - published_data: Default::default(), }; let _ = futures::executor::block_on( data.provide_inherent_data(&mut valid_inherent_data_full_compatibility), diff --git a/cumulus/primitives/parachain-inherent/src/lib.rs b/cumulus/primitives/parachain-inherent/src/lib.rs index 9ac33dda91197..7af2cc09cd6e5 100644 --- a/cumulus/primitives/parachain-inherent/src/lib.rs +++ b/cumulus/primitives/parachain-inherent/src/lib.rs @@ -120,9 +120,6 @@ pub struct ParachainInherentData { /// Contains the collator peer ID, which is later sent by the parachain to the /// relay chain via a UMP signal to promote the reputation of the given peer ID. pub collator_peer_id: Option, - /// Published data from the broadcaster pallet on the relay chain. - /// Key: Publisher ParaId, Value: Vector of (key, value) pairs published by that parachain. - pub published_data: BTreeMap, Vec)>>, } // Upgrades the ParachainInherentData v0 to the newest format. @@ -135,7 +132,6 @@ impl Into for v0::ParachainInherentData { horizontal_messages: self.horizontal_messages, relay_parent_descendants: Vec::new(), collator_peer_id: None, - published_data: BTreeMap::new(), } } } diff --git a/cumulus/test/client/src/block_builder.rs b/cumulus/test/client/src/block_builder.rs index 52e26564da5e0..ee400859f75c8 100644 --- a/cumulus/test/client/src/block_builder.rs +++ b/cumulus/test/client/src/block_builder.rs @@ -124,7 +124,6 @@ fn init_block_builder( horizontal_messages: Default::default(), relay_parent_descendants: Default::default(), collator_peer_id: None, - published_data: Default::default(), }, ) .expect("Put validation function params failed"); diff --git a/cumulus/test/service/src/bench_utils.rs b/cumulus/test/service/src/bench_utils.rs index 8b88cd6690700..5030cd6d95399 100644 --- a/cumulus/test/service/src/bench_utils.rs +++ b/cumulus/test/service/src/bench_utils.rs @@ -100,7 +100,6 @@ pub fn extrinsic_set_validation_data( horizontal_messages: Default::default(), relay_parent_descendants: Default::default(), collator_peer_id: None, - published_data: Default::default(), }; cumulus_test_runtime::UncheckedExtrinsic::new_bare( diff --git a/polkadot/primitives/src/runtime_api.rs b/polkadot/primitives/src/runtime_api.rs index 1775bc2f517bb..28439a3a2e4fb 100644 --- a/polkadot/primitives/src/runtime_api.rs +++ b/polkadot/primitives/src/runtime_api.rs @@ -314,11 +314,5 @@ sp_api::decl_runtime_apis! { #[api_version(13)] fn scheduling_lookahead() -> u32; - /// Get published data from all parachains that the subscriber is subscribed to. - /// Returns a map of Publisher ParaId -> published data. - /// Only includes publishers that have actual data and are subscribed to. - #[api_version(14)] - fn get_subscribed_data(subscriber_para_id: ppp::Id) -> BTreeMap, Vec)>>; - } } diff --git a/polkadot/runtime/parachains/src/broadcaster/mod.rs b/polkadot/runtime/parachains/src/broadcaster/mod.rs index bfe59297eb275..c0b4c8e245d88 100644 --- a/polkadot/runtime/parachains/src/broadcaster/mod.rs +++ b/polkadot/runtime/parachains/src/broadcaster/mod.rs @@ -36,7 +36,6 @@ use polkadot_primitives::Id as ParaId; pub use pallet::*; -pub mod runtime_api; mod traits; pub use traits::Publish; diff --git a/polkadot/runtime/parachains/src/broadcaster/runtime_api.rs b/polkadot/runtime/parachains/src/broadcaster/runtime_api.rs deleted file mode 100644 index 4490a076018ab..0000000000000 --- a/polkadot/runtime/parachains/src/broadcaster/runtime_api.rs +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Polkadot. - -// Polkadot is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Polkadot is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . - -//! Runtime API definition for the broadcaster pallet. - -use alloc::{collections::BTreeMap, vec::Vec}; -use polkadot_primitives::Id as ParaId; - -sp_api::decl_runtime_apis! { - /// The API for querying published data from parachains. - #[api_version(1)] - pub trait BroadcasterApi { - /// Get published data from all parachains that the subscriber is subscribed to. - /// Returns a map of Publisher ParaId -> published data. - /// Only includes publishers that have actual data and are subscribed to. - fn get_subscribed_data(subscriber_para_id: ParaId) -> BTreeMap, Vec)>>; - } -} \ No newline at end of file diff --git a/polkadot/runtime/rococo/src/lib.rs b/polkadot/runtime/rococo/src/lib.rs index b795535a11e5b..caaea5801e278 100644 --- a/polkadot/runtime/rococo/src/lib.rs +++ b/polkadot/runtime/rococo/src/lib.rs @@ -2032,7 +2032,7 @@ sp_api::impl_runtime_apis! { } } - #[api_version(14)] + #[api_version(13)] impl polkadot_primitives::runtime_api::ParachainHost for Runtime { fn validators() -> Vec { parachains_runtime_api_impl::validators::() @@ -2211,10 +2211,6 @@ sp_api::impl_runtime_apis! { parachains_staging_runtime_api_impl::validation_code_bomb_limit::() } - fn get_subscribed_data(_subscriber_para_id: ParaId) -> BTreeMap, Vec)>> { - // TODO: This will be removed and replaced with keys_to_include_in_relay_proof approach - BTreeMap::new() - } } #[api_version(5)] From b602641478e13d49fb60679411eff3e3eea5c644 Mon Sep 17 00:00:00 2001 From: metricaez Date: Sun, 7 Dec 2025 11:49:04 -0300 Subject: [PATCH 117/128] feat: first approach to generilzation of API --- cumulus/client/consensus/aura/src/collator.rs | 8 +-- .../consensus/aura/src/collators/lookahead.rs | 10 +-- cumulus/client/parachain-inherent/src/lib.rs | 71 ++++++------------- cumulus/pallets/parachain-system/src/lib.rs | 61 ++++++++++------ .../testing/rococo-parachain/src/lib.rs | 4 +- .../lib/src/fake_runtime_api/utils.rs | 2 +- cumulus/primitives/core/src/lib.rs | 24 +++++-- 7 files changed, 92 insertions(+), 88 deletions(-) diff --git a/cumulus/client/consensus/aura/src/collator.rs b/cumulus/client/consensus/aura/src/collator.rs index 5a179ec68b649..b204799a797aa 100644 --- a/cumulus/client/consensus/aura/src/collator.rs +++ b/cumulus/client/consensus/aura/src/collator.rs @@ -128,7 +128,7 @@ where parent_hash: Block::Hash, timestamp: impl Into>, relay_parent_descendants: Option, - subscription_keys: Vec<(ParaId, Vec>)>, + child_trie_requests: Vec, ) -> Result<(ParachainInherentData, InherentData), Box> { let paras_inherent_data = ParachainInherentDataProvider::create_at( relay_parent, @@ -138,7 +138,7 @@ where relay_parent_descendants .map(RelayParentData::into_inherent_descendant_list) .unwrap_or_default(), - subscription_keys, + child_trie_requests, ) .await; @@ -174,7 +174,7 @@ where validation_data: &PersistedValidationData, parent_hash: Block::Hash, timestamp: impl Into>, - subscription_keys: Vec<(ParaId, Vec>)>, + child_trie_requests: Vec, ) -> Result<(ParachainInherentData, InherentData), Box> { self.create_inherent_data_with_rp_offset( relay_parent, @@ -182,7 +182,7 @@ where parent_hash, timestamp, None, - subscription_keys, + child_trie_requests, ) .await } diff --git a/cumulus/client/consensus/aura/src/collators/lookahead.rs b/cumulus/client/consensus/aura/src/collators/lookahead.rs index 21d9f9db3f96b..05d477c270e06 100644 --- a/cumulus/client/consensus/aura/src/collators/lookahead.rs +++ b/cumulus/client/consensus/aura/src/collators/lookahead.rs @@ -345,16 +345,16 @@ where "Slot claimed. Building" ); - // Query subscription keys from the parachain runtime - let subscription_keys = params + // Query child trie proof requests from the parachain runtime + let child_trie_requests = params .para_client .runtime_api() - .keys_to_include_in_relay_proof(parent_hash) + .child_trie_keys_to_prove(parent_hash) .unwrap_or_else(|e| { tracing::warn!( target: crate::LOG_TARGET, error = ?e, - "Failed to fetch subscription keys from runtime, using empty vec" + "Failed to fetch child trie proof requests from runtime, using empty vec" ); Vec::new() }); @@ -374,7 +374,7 @@ where &validation_data, parent_hash, slot_claim.timestamp(), - subscription_keys.clone(), + child_trie_requests.clone(), ) .await { diff --git a/cumulus/client/parachain-inherent/src/lib.rs b/cumulus/client/parachain-inherent/src/lib.rs index 638b5a8f67d6c..70a59ebcfddfe 100644 --- a/cumulus/client/parachain-inherent/src/lib.rs +++ b/cumulus/client/parachain-inherent/src/lib.rs @@ -33,18 +33,6 @@ pub use mock::{MockValidationDataInherentDataProvider, MockXcmConfig}; const LOG_TARGET: &str = "parachain-inherent"; -/// Constructs the ChildInfo for a publisher's child trie. -/// -/// The broadcaster pallet uses "pubsub" prefix + encoded ParaId as the child storage key. -fn derive_child_info(publisher_para_id: ParaId) -> ChildInfo { - const PREFIX: &[u8] = b"pubsub"; - let para_id_encoded = publisher_para_id.encode(); - let mut child_storage_key = Vec::with_capacity(PREFIX.len() + para_id_encoded.len()); - child_storage_key.extend_from_slice(PREFIX); - child_storage_key.extend_from_slice(¶_id_encoded); - ChildInfo::new_default(&child_storage_key) -} - /// Collect the relevant relay chain state in form of a proof for putting it into the validation /// data inherent. async fn collect_relay_storage_proof( @@ -161,61 +149,46 @@ async fn collect_relay_storage_proof( .ok() } -/// Collect child trie proofs for subscribed publishers' data. +/// Collect child trie proofs for relay chain storage. +/// +/// Generates proofs for child trie data. The child trie roots are automatically +/// included from their standard storage locations (`:child_storage:default:` + identifier). /// -/// Generates proofs for publisher child trie roots and their data entries. Returns a merged proof -/// combining all child trie data, or `None` if there are no subscriptions. +/// Returns a merged proof combining all requested child trie data, or `None` if +/// there are no requests. async fn collect_child_trie_proofs( relay_chain_interface: &impl RelayChainInterface, relay_parent: PHash, - subscription_keys: Vec<(ParaId, Vec>)>, + requests: Vec, ) -> Option { - use relay_chain::well_known_keys as relay_well_known_keys; - - if subscription_keys.is_empty() { + if requests.is_empty() { return None; } - // Collect storage keys for all publisher roots - let root_keys: Vec<_> = subscription_keys - .iter() - .map(|(publisher_para_id, _)| relay_well_known_keys::published_data_root(*publisher_para_id)) - .collect(); - - // Generate proof for publisher roots - let mut combined_proof = relay_chain_interface - .prove_read(relay_parent, &root_keys) - .await - .map_err(|e| { - tracing::error!( - target: LOG_TARGET, - relay_parent = ?relay_parent, - error = ?e, - "Cannot obtain publisher roots proof from relay chain.", - ); - }) - .ok()?; + let mut combined_proof: Option = None; - // Generate and merge child trie proofs for each publisher - for (publisher_para_id, child_keys) in subscription_keys { - if child_keys.is_empty() { + for request in requests { + if request.data_keys.is_empty() { continue; } - let child_info = derive_child_info(publisher_para_id); + let child_info = ChildInfo::new_default(&request.child_trie_identifier); match relay_chain_interface - .prove_child_read(relay_parent, &child_info, &child_keys) + .prove_child_read(relay_parent, &child_info, &request.data_keys) .await { Ok(child_proof) => { - combined_proof = StorageProof::merge([combined_proof, child_proof]); + combined_proof = match combined_proof { + None => Some(child_proof), + Some(existing) => Some(StorageProof::merge([existing, child_proof])), + }; }, Err(e) => { tracing::error!( target: LOG_TARGET, relay_parent = ?relay_parent, - publisher_para_id = ?publisher_para_id, + child_trie_id = ?request.child_trie_identifier, error = ?e, "Cannot obtain child trie proof from relay chain.", ); @@ -223,7 +196,7 @@ async fn collect_child_trie_proofs( } } - Some(combined_proof) + combined_proof } pub struct ParachainInherentDataProvider; @@ -238,7 +211,7 @@ impl ParachainInherentDataProvider { validation_data: &PersistedValidationData, para_id: ParaId, relay_parent_descendants: Vec, - subscription_keys: Vec<(ParaId, Vec>)>, + child_trie_requests: Vec, ) -> Option { // Only include next epoch authorities when the descendants include an epoch digest. // Skip the first entry because this is the relay parent itself. @@ -257,11 +230,11 @@ impl ParachainInherentDataProvider { ) .await?; - if !subscription_keys.is_empty() { + if !child_trie_requests.is_empty() { if let Some(child_proofs) = collect_child_trie_proofs( relay_chain_interface, relay_parent, - subscription_keys, + child_trie_requests, ) .await { diff --git a/cumulus/pallets/parachain-system/src/lib.rs b/cumulus/pallets/parachain-system/src/lib.rs index 26fe28b262aba..6d338b50fb96b 100644 --- a/cumulus/pallets/parachain-system/src/lib.rs +++ b/cumulus/pallets/parachain-system/src/lib.rs @@ -1039,9 +1039,9 @@ pub mod pallet { OptionQuery, >; - /// Previous data roots of published data, used to detect changes. - /// Contains (ParaId, root_hash) pairs from the previous block for comparison. - /// Stored as BTreeMap for efficient lookups without conversion overhead. + /// Child trie root hashes from the previous block, used for change detection. + /// + /// Stored as BTreeMap for efficient lookups during comparison. #[pallet::storage] pub type PreviousPublishedDataRoots = StorageValue< _, @@ -1131,26 +1131,42 @@ impl Pallet { crate::unincluded_segment::size_after_included(included_hash, &segment) } - /// Get the subscription keys for accessing published data from other parachains. + /// Get child trie proof requests for subscribed publishers. /// - /// Returns a vector of (ParaId, Vec) tuples where: - /// - ParaId is the publisher parachain we're subscribed to - /// - Vec is the list of specific keys we want from that publisher - /// (empty vec means we want ALL keys from that publisher) + /// This is pubsub-specific logic that constructs child trie identifiers + /// from ParaIds. Other pallets could construct identifiers differently. /// - /// This is intended to be used by the runtime API to inform the collator which - /// relay chain storage keys should be included in the storage proof. - pub fn get_subscription_keys() -> Vec<(ParaId, Vec>)> { + /// Returns child trie proof requests where each request specifies: + /// - The child trie identifier (derived from ParaId using pubsub convention) + /// - The specific keys to read from that child trie + pub fn get_child_trie_proof_requests() -> Vec { Subscriptions::::iter() .map(|(para_id, keys)| { - let unbounded_keys: Vec> = keys - .into_iter() - .map(|bounded_key| bounded_key.into_inner()) - .collect(); - (para_id, unbounded_keys) + cumulus_primitives_core::ChildTrieProofRequest { + // Pubsub-specific: derive child trie identifier from ParaId + child_trie_identifier: Self::derive_child_storage_key(para_id), + + // Convert bounded keys to unbounded + data_keys: keys + .into_iter() + .map(|bounded_key| bounded_key.into_inner()) + .collect(), + } }) .collect() } + + /// Derive child trie identifier from ParaId. + /// + /// This is pubsub-specific. The identifier format matches what the + /// broadcaster pallet uses: b"pubsub" + encoded ParaId. + fn derive_child_storage_key(para_id: ParaId) -> Vec { + use codec::Encode; + const PREFIX: &[u8] = b"pubsub"; + let mut key = PREFIX.to_vec(); + key.extend_from_slice(¶_id.encode()); + key + } } impl FeeTracker for Pallet { @@ -1413,7 +1429,7 @@ impl Pallet { weight_used } - /// Constructs the ChildInfo for a publisher's child trie. + /// Derives the child trie info for a publisher parachain. /// /// Must match the broadcaster pallet's child trie structure. fn derive_child_info(publisher_para_id: ParaId) -> sp_storage::ChildInfo { @@ -1427,16 +1443,19 @@ impl Pallet { sp_storage::ChildInfo::new_default(&child_storage_key) } - /// Collect publisher roots from relay chain state proof for subscribed publishers. + /// Collects child trie root hashes for subscribed publishers from the relay chain state proof. + /// + /// Returns pairs of (ParaId, root_hash) for change detection optimization. fn collect_publisher_roots( relay_state_proof: &RelayChainStateProof, ) -> Vec<(ParaId, Vec)> { Subscriptions::::iter() .filter_map(|(publisher_para_id, _)| { - let storage_key = - relay_chain::well_known_keys::published_data_root(publisher_para_id); + let child_info = Self::derive_child_info(publisher_para_id); + let prefixed_key = child_info.prefixed_storage_key(); + relay_state_proof - .read_optional_entry::<[u8; 32]>(&storage_key) + .read_optional_entry::<[u8; 32]>(&*prefixed_key) .ok() .flatten() .map(|root_hash| (publisher_para_id, root_hash.to_vec())) diff --git a/cumulus/parachains/runtimes/testing/rococo-parachain/src/lib.rs b/cumulus/parachains/runtimes/testing/rococo-parachain/src/lib.rs index 3f5144b5beee2..91fe1679d9427 100644 --- a/cumulus/parachains/runtimes/testing/rococo-parachain/src/lib.rs +++ b/cumulus/parachains/runtimes/testing/rococo-parachain/src/lib.rs @@ -889,8 +889,8 @@ impl_runtime_apis! { } impl cumulus_primitives_core::KeyToIncludeInRelayProofApi for Runtime { - fn keys_to_include_in_relay_proof() -> Vec<(ParaId, Vec>)> { - ParachainSystem::get_subscription_keys() + fn child_trie_keys_to_prove() -> Vec { + ParachainSystem::get_child_trie_proof_requests() } } } diff --git a/cumulus/polkadot-omni-node/lib/src/fake_runtime_api/utils.rs b/cumulus/polkadot-omni-node/lib/src/fake_runtime_api/utils.rs index d5dc1cc543e1b..7f41705d2cb43 100644 --- a/cumulus/polkadot-omni-node/lib/src/fake_runtime_api/utils.rs +++ b/cumulus/polkadot-omni-node/lib/src/fake_runtime_api/utils.rs @@ -176,7 +176,7 @@ macro_rules! impl_node_runtime_apis { } impl cumulus_primitives_core::KeyToIncludeInRelayProofApi<$block> for $runtime { - fn keys_to_include_in_relay_proof() -> Vec<(cumulus_primitives_core::ParaId, Vec>)> { + fn child_trie_keys_to_prove() -> Vec { unimplemented!() } } diff --git a/cumulus/primitives/core/src/lib.rs b/cumulus/primitives/core/src/lib.rs index 4fb439532d888..f623b902af4f6 100644 --- a/cumulus/primitives/core/src/lib.rs +++ b/cumulus/primitives/core/src/lib.rs @@ -370,6 +370,18 @@ pub struct CollationInfo { pub head_data: HeadData, } +/// Request for proving child trie data from the relay chain. +/// +/// Specifies a child trie identifier and the keys to prove from that trie. +#[derive(Clone, Debug, Encode, Decode, TypeInfo, PartialEq, Eq)] +pub struct ChildTrieProofRequest { + /// Child trie identifier (converted to `ChildInfo` by the collator). + pub child_trie_identifier: Vec, + + /// Keys to prove from within the child trie. + pub data_keys: Vec>, +} + sp_api::decl_runtime_apis! { /// Runtime api to collect information about a collation. /// @@ -402,12 +414,12 @@ sp_api::decl_runtime_apis! { fn relay_parent_offset() -> u32; } - /// API to tell the collator which relay chain storage keys to include in proofs. - /// - /// Returns subscription information for accessing published data from other parachains - /// via the relay chain storage proof. + /// API for specifying which relay chain child trie data to include in storage proofs. pub trait KeyToIncludeInRelayProofApi { - /// Get relay chain storage keys required for accessing subscribed published data. - fn keys_to_include_in_relay_proof() -> Vec<(ParaId, Vec>)>; + /// Returns child trie proof requests. + /// + /// Each request specifies a child trie identifier and the keys to read from that trie. + /// The collator generates proofs for these and includes them in the relay chain state proof. + fn child_trie_keys_to_prove() -> Vec; } } From 0886a756a581d43f4c6e4f7f762db6b22f1c67ac Mon Sep 17 00:00:00 2001 From: metricaez Date: Sun, 7 Dec 2025 18:01:26 -0300 Subject: [PATCH 118/128] feat: child info unificication --- cumulus/pallets/parachain-system/src/lib.rs | 21 +++++++------------ .../runtime/parachains/src/broadcaster/mod.rs | 8 +------ 2 files changed, 9 insertions(+), 20 deletions(-) diff --git a/cumulus/pallets/parachain-system/src/lib.rs b/cumulus/pallets/parachain-system/src/lib.rs index 6d338b50fb96b..35e76f230805f 100644 --- a/cumulus/pallets/parachain-system/src/lib.rs +++ b/cumulus/pallets/parachain-system/src/lib.rs @@ -1161,11 +1161,7 @@ impl Pallet { /// This is pubsub-specific. The identifier format matches what the /// broadcaster pallet uses: b"pubsub" + encoded ParaId. fn derive_child_storage_key(para_id: ParaId) -> Vec { - use codec::Encode; - const PREFIX: &[u8] = b"pubsub"; - let mut key = PREFIX.to_vec(); - key.extend_from_slice(¶_id.encode()); - key + Self::derive_child_info(para_id).storage_key().to_vec() } } @@ -1434,13 +1430,7 @@ impl Pallet { /// Must match the broadcaster pallet's child trie structure. fn derive_child_info(publisher_para_id: ParaId) -> sp_storage::ChildInfo { use codec::Encode; - const PREFIX: &[u8] = b"pubsub"; - let para_id_encoded = publisher_para_id.encode(); - let mut child_storage_key = - alloc::vec::Vec::with_capacity(PREFIX.len() + para_id_encoded.len()); - child_storage_key.extend_from_slice(PREFIX); - child_storage_key.extend_from_slice(¶_id_encoded); - sp_storage::ChildInfo::new_default(&child_storage_key) + sp_storage::ChildInfo::new_default(&(b"pubsub", publisher_para_id).encode()) } /// Collects child trie root hashes for subscribed publishers from the relay chain state proof. @@ -1517,7 +1507,12 @@ impl Pallet { }, } }, - Ok(None) | Err(_) => {}, + Ok(None) => { + // Key not published yet - expected + }, + Err(_) => { + defensive!("Failed to read child storage from relay chain proof"); + }, } } diff --git a/polkadot/runtime/parachains/src/broadcaster/mod.rs b/polkadot/runtime/parachains/src/broadcaster/mod.rs index c0b4c8e245d88..e0bdf6e4035da 100644 --- a/polkadot/runtime/parachains/src/broadcaster/mod.rs +++ b/polkadot/runtime/parachains/src/broadcaster/mod.rs @@ -263,13 +263,7 @@ pub mod pallet { /// Derive a deterministic child trie identifier from parachain ID. pub fn derive_child_info(para_id: ParaId) -> ChildInfo { - const PREFIX: &[u8] = b"pubsub"; - let encoded = para_id.encode(); - let mut key = Vec::with_capacity(PREFIX.len() + encoded.len()); - key.extend_from_slice(PREFIX); - key.extend_from_slice(&encoded); - - ChildInfo::new_default(&key) + ChildInfo::new_default(&(b"pubsub", para_id).encode()) } /// Retrieve a value from a publisher's child trie. From bb042774130a2beb8a091e2c01eaa770e9ad6557 Mon Sep 17 00:00:00 2001 From: metricaez Date: Mon, 8 Dec 2025 08:27:44 -0300 Subject: [PATCH 119/128] feat: new pallet architecture --- Cargo.lock | 34 ++ Cargo.toml | 4 + cumulus/pallets/parachain-system/src/lib.rs | 247 +------------- .../src/relay_state_snapshot.rs | 22 ++ cumulus/pallets/pubsub-consumer/Cargo.toml | 37 +++ cumulus/pallets/pubsub-consumer/src/lib.rs | 106 ++++++ cumulus/pallets/subscriber/Cargo.toml | 67 ++++ cumulus/pallets/subscriber/src/lib.rs | 307 ++++++++++++++++++ .../assets/asset-hub-rococo/src/lib.rs | 1 + .../assets/asset-hub-westend/src/lib.rs | 1 + .../bridge-hubs/bridge-hub-rococo/src/lib.rs | 1 + .../bridge-hubs/bridge-hub-westend/src/lib.rs | 1 + .../collectives-westend/src/lib.rs | 1 + .../coretime/coretime-rococo/src/lib.rs | 1 + .../coretime/coretime-westend/src/lib.rs | 1 + .../glutton/glutton-westend/src/lib.rs | 1 + .../runtimes/people/people-rococo/src/lib.rs | 1 + .../runtimes/people/people-westend/src/lib.rs | 1 + .../runtimes/testing/penpal/src/lib.rs | 1 + .../testing/rococo-parachain/Cargo.toml | 4 + .../testing/rococo-parachain/src/lib.rs | 12 +- .../testing/yet-another-parachain/src/lib.rs | 1 + .../runtimes/parachain/src/lib.rs | 1 + 23 files changed, 615 insertions(+), 238 deletions(-) create mode 100644 cumulus/pallets/pubsub-consumer/Cargo.toml create mode 100644 cumulus/pallets/pubsub-consumer/src/lib.rs create mode 100644 cumulus/pallets/subscriber/Cargo.toml create mode 100644 cumulus/pallets/subscriber/src/lib.rs diff --git a/Cargo.lock b/Cargo.lock index 3c08fee51bb7b..8263b714d09d8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4612,6 +4612,19 @@ dependencies = [ "syn 2.0.98", ] +[[package]] +name = "cumulus-pallet-pubsub-consumer" +version = "0.1.0" +dependencies = [ + "cumulus-pallet-subscriber", + "cumulus-primitives-core", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-std 14.0.0", +] + [[package]] name = "cumulus-pallet-session-benchmarking" version = "22.0.0" @@ -4638,6 +4651,25 @@ dependencies = [ "sp-runtime 42.0.0", ] +[[package]] +name = "cumulus-pallet-subscriber" +version = "0.1.0" +dependencies = [ + "cumulus-pallet-parachain-system", + "cumulus-primitives-core", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "polkadot-parachain-primitives", + "scale-info", + "sp-core 37.0.0", + "sp-io 41.0.1", + "sp-runtime 42.0.0", + "sp-std 14.0.0", + "sp-storage 22.0.0", +] + [[package]] name = "cumulus-pallet-weight-reclaim" version = "0.3.0" @@ -18523,6 +18555,8 @@ version = "0.21.0" dependencies = [ "cumulus-pallet-aura-ext", "cumulus-pallet-parachain-system", + "cumulus-pallet-pubsub-consumer", + "cumulus-pallet-subscriber", "cumulus-pallet-weight-reclaim", "cumulus-pallet-xcm", "cumulus-pallet-xcmp-queue", diff --git a/Cargo.toml b/Cargo.toml index 5bbccd58af1b5..14e2a3b0068f6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -83,8 +83,10 @@ members = [ "cumulus/pallets/dmp-queue", "cumulus/pallets/parachain-system", "cumulus/pallets/parachain-system/proc-macro", + "cumulus/pallets/pubsub-consumer", "cumulus/pallets/session-benchmarking", "cumulus/pallets/solo-to-para", + "cumulus/pallets/subscriber", "cumulus/pallets/weight-reclaim", "cumulus/pallets/xcm", "cumulus/pallets/xcmp-queue", @@ -744,8 +746,10 @@ cumulus-pallet-aura-ext = { path = "cumulus/pallets/aura-ext", default-features cumulus-pallet-dmp-queue = { default-features = false, path = "cumulus/pallets/dmp-queue" } cumulus-pallet-parachain-system = { path = "cumulus/pallets/parachain-system", default-features = false } cumulus-pallet-parachain-system-proc-macro = { path = "cumulus/pallets/parachain-system/proc-macro", default-features = false } +cumulus-pallet-pubsub-consumer = { path = "cumulus/pallets/pubsub-consumer", default-features = false } cumulus-pallet-session-benchmarking = { path = "cumulus/pallets/session-benchmarking", default-features = false } cumulus-pallet-solo-to-para = { path = "cumulus/pallets/solo-to-para", default-features = false } +cumulus-pallet-subscriber = { path = "cumulus/pallets/subscriber", default-features = false } cumulus-pallet-weight-reclaim = { path = "cumulus/pallets/weight-reclaim", default-features = false } cumulus-pallet-xcm = { path = "cumulus/pallets/xcm", default-features = false } cumulus-pallet-xcmp-queue = { path = "cumulus/pallets/xcmp-queue", default-features = false } diff --git a/cumulus/pallets/parachain-system/src/lib.rs b/cumulus/pallets/parachain-system/src/lib.rs index 35e76f230805f..402e96d4b4177 100644 --- a/cumulus/pallets/parachain-system/src/lib.rs +++ b/cumulus/pallets/parachain-system/src/lib.rs @@ -84,6 +84,7 @@ use unincluded_segment::{ }; pub use consensus_hook::{ConsensusHook, ExpectParentIncluded}; +pub use relay_state_snapshot::ProcessChildTrieData; /// Register the `validate_block` function that is used by parachains to validate blocks on a /// validator. /// @@ -309,6 +310,12 @@ pub mod pallet { /// /// If set to 0, this config has no impact. type RelayParentOffset: Get; + + /// Processor for child trie data from relay chain state proofs. + /// + /// This is called after the relay state proof has been verified, allowing external + /// pallets to extract and process child trie data. + type ChildTrieProcessor: relay_state_snapshot::ProcessChildTrieData; } #[pallet::hooks] @@ -735,8 +742,7 @@ pub mod pallet { >::put(relevant_messaging_state.clone()); >::put(host_config); - let current_roots = Self::collect_publisher_roots(&relay_state_proof); - total_weight.saturating_accrue(Self::process_published_data(&relay_state_proof, ¤t_roots)); + total_weight.saturating_accrue(T::ChildTrieProcessor::process_child_trie_data(&relay_state_proof)); ::on_validation_data(&vfp); @@ -769,54 +775,8 @@ pub mod pallet { Ok(()) } - /// Subscribe to published data from a specific parachain. - /// - /// If `keys` is empty, subscribes to ALL data from that publisher. - /// If `keys` is non-empty, subscribes only to those specific keys. - /// - /// The dispatch origin for this call must be `Root`. - #[pallet::call_index(4)] - #[pallet::weight((10_000, DispatchClass::Operational))] - pub fn subscribe( - origin: OriginFor, - publisher: ParaId, - keys: Vec>, - ) -> DispatchResult { - ensure_root(origin)?; - - let bounded_keys: BoundedVec>, ConstU32<100>> = keys - .into_iter() - .map(|k| BoundedVec::try_from(k).map_err(|_| Error::::KeyTooLong)) - .collect::, _>>()? - .try_into() - .map_err(|_| Error::::TooManyKeys)?; - - Subscriptions::::insert(publisher, bounded_keys); - Ok(()) - } - - /// Unsubscribe from a publisher and clean up associated published data. - /// - /// The dispatch origin for this call must be `Root`. - #[pallet::call_index(5)] - #[pallet::weight((10_000, DispatchClass::Operational))] - pub fn unsubscribe( - origin: OriginFor, - publisher: ParaId, - ) -> DispatchResult { - ensure_root(origin)?; - - // Remove the subscription - Subscriptions::::remove(publisher); - - // Clean up all published data from this publisher - let _ = PublishedData::::clear_prefix(publisher, u32::MAX, None); - - Ok(()) - } - - // WARNING: call indices 2 and 3 were used in a former version of this pallet. Using them - // again will require to bump the transaction version of runtimes using this pallet. + // WARNING: call indices 2, 3, 4, and 5 were used in a former version of this pallet. + // Using them again will require to bump the transaction version of runtimes using this pallet. } #[pallet::event] @@ -851,10 +811,6 @@ pub mod pallet { HostConfigurationNotAvailable, /// No validation function upgrade is currently scheduled. NotScheduled, - /// A subscription key exceeds the maximum allowed length. - KeyTooLong, - /// Too many keys provided for a single subscription. - TooManyKeys, } /// Latest included block descendants the runtime accepted. In other words, these are @@ -1026,43 +982,6 @@ pub mod pallet { #[pallet::storage] pub type CustomValidationHeadData = StorageValue<_, Vec, OptionQuery>; - /// Published data from parachains available through the broadcaster pallet. - /// Double map: Publisher ParaId -> Key -> Value - #[pallet::storage] - pub type PublishedData = StorageDoubleMap< - _, - Blake2_128Concat, - ParaId, // Publisher - Blake2_128Concat, - Vec, // Key - Vec, // Value - OptionQuery, - >; - - /// Child trie root hashes from the previous block, used for change detection. - /// - /// Stored as BTreeMap for efficient lookups during comparison. - #[pallet::storage] - pub type PreviousPublishedDataRoots = StorageValue< - _, - BTreeMap>, - ValueQuery, - >; - - /// Local subscriptions to published data from other parachains. - /// - /// Maps Publisher ParaId -> Vec of keys we're interested in from that publisher. - /// An empty vec means we want ALL keys from that publisher. - #[pallet::storage] - pub type Subscriptions = StorageMap< - _, - Twox64Concat, - ParaId, - BoundedVec>, ConstU32<100>>, - OptionQuery, - >; - - #[pallet::inherent] impl ProvideInherent for Pallet { type Call = Call; @@ -1131,38 +1050,6 @@ impl Pallet { crate::unincluded_segment::size_after_included(included_hash, &segment) } - /// Get child trie proof requests for subscribed publishers. - /// - /// This is pubsub-specific logic that constructs child trie identifiers - /// from ParaIds. Other pallets could construct identifiers differently. - /// - /// Returns child trie proof requests where each request specifies: - /// - The child trie identifier (derived from ParaId using pubsub convention) - /// - The specific keys to read from that child trie - pub fn get_child_trie_proof_requests() -> Vec { - Subscriptions::::iter() - .map(|(para_id, keys)| { - cumulus_primitives_core::ChildTrieProofRequest { - // Pubsub-specific: derive child trie identifier from ParaId - child_trie_identifier: Self::derive_child_storage_key(para_id), - - // Convert bounded keys to unbounded - data_keys: keys - .into_iter() - .map(|bounded_key| bounded_key.into_inner()) - .collect(), - } - }) - .collect() - } - - /// Derive child trie identifier from ParaId. - /// - /// This is pubsub-specific. The identifier format matches what the - /// broadcaster pallet uses: b"pubsub" + encoded ParaId. - fn derive_child_storage_key(para_id: ParaId) -> Vec { - Self::derive_child_info(para_id).storage_key().to_vec() - } } impl FeeTracker for Pallet { @@ -1425,120 +1312,6 @@ impl Pallet { weight_used } - /// Derives the child trie info for a publisher parachain. - /// - /// Must match the broadcaster pallet's child trie structure. - fn derive_child_info(publisher_para_id: ParaId) -> sp_storage::ChildInfo { - use codec::Encode; - sp_storage::ChildInfo::new_default(&(b"pubsub", publisher_para_id).encode()) - } - - /// Collects child trie root hashes for subscribed publishers from the relay chain state proof. - /// - /// Returns pairs of (ParaId, root_hash) for change detection optimization. - fn collect_publisher_roots( - relay_state_proof: &RelayChainStateProof, - ) -> Vec<(ParaId, Vec)> { - Subscriptions::::iter() - .filter_map(|(publisher_para_id, _)| { - let child_info = Self::derive_child_info(publisher_para_id); - let prefixed_key = child_info.prefixed_storage_key(); - - relay_state_proof - .read_optional_entry::<[u8; 32]>(&*prefixed_key) - .ok() - .flatten() - .map(|root_hash| (publisher_para_id, root_hash.to_vec())) - }) - .collect() - } - - /// Process published data from the broadcaster pallet and store it in parachain storage. - /// - /// Reads data from child tries in the relay chain storage proof for subscribed publishers - /// whose roots have changed. Uses child trie roots to detect changes between blocks. - fn process_published_data( - relay_state_proof: &RelayChainStateProof, - current_roots: &Vec<(ParaId, Vec)>, - ) -> Weight { - let previous_roots = >::get(); - - if current_roots.is_empty() && previous_roots.is_empty() { - return T::DbWeight::get().reads(1); - } - - let mut p = 0u32; - let mut k = 0u32; - let mut v = 0u32; - - let current_roots_map: BTreeMap> = - current_roots.iter().map(|(para_id, root)| (*para_id, root.clone())).collect(); - - let subscriptions = Subscriptions::::iter().collect::>(); - - for (publisher, subscription_keys) in subscriptions { - let should_update = match previous_roots.get(&publisher) { - Some(prev_root) => match current_roots_map.get(&publisher) { - Some(curr_root) if prev_root == curr_root => false, - _ => true, - }, - None => true, - }; - - if should_update && current_roots_map.contains_key(&publisher) { - let result = PublishedData::::clear_prefix(&publisher, u32::MAX, None); - debug_assert!(result.maybe_cursor.is_none()); - - let child_info = Self::derive_child_info(publisher); - - let mut data_entries = alloc::vec::Vec::new(); - for bounded_key in subscription_keys.iter() { - let key = bounded_key.as_ref(); - - match relay_state_proof.read_child_storage(&child_info, key) { - Ok(Some(encoded_value)) => { - match Vec::::decode(&mut &encoded_value[..]) { - Ok(value) => { - data_entries.push((key.to_vec(), value.clone())); - v = v.max(value.len() as u32); - }, - Err(_) => { - defensive!("Failed to decode published data value"); - }, - } - }, - Ok(None) => { - // Key not published yet - expected - }, - Err(_) => { - defensive!("Failed to read child storage from relay chain proof"); - }, - } - } - - for (key, value) in data_entries.iter() { - PublishedData::::insert(&publisher, key, value); - } - - p += 1; - k = k.max(data_entries.len() as u32); - } - } - - // Clear storage for removed publishers. - for (para_id, _) in previous_roots.iter() { - if !current_roots_map.contains_key(para_id) { - let result = PublishedData::::clear_prefix(para_id, u32::MAX, None); - debug_assert!(result.maybe_cursor.is_none()); - } - } - - >::put(current_roots_map); - - T::WeightInfo::process_published_data(p, k, v) - } - - /// Drop blocks from the unincluded segment with respect to the latest parachain head. fn maybe_drop_included_ancestors( relay_state_proof: &RelayChainStateProof, diff --git a/cumulus/pallets/parachain-system/src/relay_state_snapshot.rs b/cumulus/pallets/parachain-system/src/relay_state_snapshot.rs index 7b4b8354268c9..838a4c5531501 100644 --- a/cumulus/pallets/parachain-system/src/relay_state_snapshot.rs +++ b/cumulus/pallets/parachain-system/src/relay_state_snapshot.rs @@ -21,11 +21,33 @@ use codec::{Decode, Encode}; use cumulus_primitives_core::{ relay_chain, AbridgedHostConfiguration, AbridgedHrmpChannel, ParaId, }; +use frame_support::weights::Weight; use scale_info::TypeInfo; use sp_runtime::traits::HashingFor; use sp_state_machine::{Backend, TrieBackend, TrieBackendBuilder}; use sp_trie::{HashDBT, MemoryDB, StorageProof, EMPTY_PREFIX}; +/// Trait for processing verified relay chain state proofs to extract child trie data. +/// +/// Implemented by external pallets (like pallet-subscriber) and called by parachain-system +/// after proof verification. +pub trait ProcessChildTrieData { + /// Process child trie data from a verified relay chain state proof. + /// + /// This is called by parachain-system's `set_validation_data` inherent after the proof + /// has been verified. The proof is guaranteed to be valid at this point. + /// + /// Returns the weight consumed by processing. + fn process_child_trie_data(verified_proof: &RelayChainStateProof) -> Weight; +} + +/// No-op implementation for runtimes that don't use child trie processing. +impl ProcessChildTrieData for () { + fn process_child_trie_data(_verified_proof: &RelayChainStateProof) -> Weight { + Weight::zero() + } +} + /// The capacity of the upward message queue of a parachain on the relay chain. // The field order should stay the same as the data can be found in the proof to ensure both are // have the same encoded representation. diff --git a/cumulus/pallets/pubsub-consumer/Cargo.toml b/cumulus/pallets/pubsub-consumer/Cargo.toml new file mode 100644 index 0000000000000..29325251a3659 --- /dev/null +++ b/cumulus/pallets/pubsub-consumer/Cargo.toml @@ -0,0 +1,37 @@ +[package] +name = "cumulus-pallet-pubsub-consumer" +version = "0.1.0" +authors.workspace = true +edition.workspace = true +description = "Example consumer pallet for testing pubsub subscriptions" +license = "Apache-2.0" +homepage.workspace = true +repository.workspace = true + +[lints] +workspace = true + +[dependencies] +codec = { features = ["derive"], workspace = true } +scale-info = { features = ["derive"], workspace = true } + +# Substrate +frame-support.workspace = true +frame-system.workspace = true +sp-std.workspace = true + +# Cumulus +cumulus-pallet-subscriber.workspace = true +cumulus-primitives-core.workspace = true + +[features] +default = ["std"] +std = [ + "codec/std", + "cumulus-pallet-subscriber/std", + "cumulus-primitives-core/std", + "frame-support/std", + "frame-system/std", + "scale-info/std", + "sp-std/std", +] diff --git a/cumulus/pallets/pubsub-consumer/src/lib.rs b/cumulus/pallets/pubsub-consumer/src/lib.rs new file mode 100644 index 0000000000000..ef535cc810bfd --- /dev/null +++ b/cumulus/pallets/pubsub-consumer/src/lib.rs @@ -0,0 +1,106 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Cumulus. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#![cfg_attr(not(feature = "std"), no_std)] + +//! # Pubsub Consumer Pallet +//! +//! Minimal example consumer pallet for testing end-to-end pubsub functionality. +//! +//! This pallet: +//! - Subscribes to ParaId 1000, key `0x1234` +//! - Stores received data in `ReceivedData` storage +//! - Emits `DataReceived` event on updates + +extern crate alloc; + +use alloc::vec::Vec; +use cumulus_primitives_core::ParaId; +use frame_support::{pallet_prelude::*, BoundedVec}; +use frame_system::pallet_prelude::*; + +pub use pallet::*; + +/// Test subscription handler that subscribes to ParaId 1000, key 0x1234 +pub struct TestSubscriptionHandler(core::marker::PhantomData); + +impl cumulus_pallet_subscriber::SubscriptionHandler for TestSubscriptionHandler { + fn subscriptions() -> Vec<(ParaId, Vec>)> { + // Subscribe to ParaId 1000, key 0x1234 + alloc::vec![(ParaId::from(1000), alloc::vec![alloc::vec![0x12, 0x34]])] + } + + fn on_data_updated(publisher: ParaId, key: Vec, value: Vec) { + // Convert to bounded vecs + let bounded_key: BoundedVec> = + key.clone().try_into().unwrap_or_default(); + let bounded_value: BoundedVec> = + value.clone().try_into().unwrap_or_default(); + + // Store the data + >::insert(&publisher, &bounded_key, &bounded_value); + + // Emit event + Pallet::::deposit_event(Event::DataReceived { + publisher, + key: bounded_key, + value: bounded_value, + }); + } +} + +#[frame_support::pallet] +pub mod pallet { + use super::*; + + #[pallet::pallet] + pub struct Pallet(_); + + #[pallet::config] + pub trait Config: frame_system::Config>> {} + + /// Storage map for received data: (PublisherParaId, Key) => Value + /// Keys limited to 256 bytes, values to 1024 bytes + #[pallet::storage] + pub type ReceivedData = StorageDoubleMap< + _, + Blake2_128Concat, + ParaId, + Blake2_128Concat, + BoundedVec>, + BoundedVec>, + OptionQuery, + >; + + #[pallet::event] + #[pallet::generate_deposit(pub(super) fn deposit_event)] + pub enum Event { + /// Data was received from a publisher + DataReceived { + publisher: ParaId, + key: BoundedVec>, + value: BoundedVec>, + }, + } + + impl Pallet { + /// Get received data for a publisher and key + pub fn get_data(publisher: ParaId, key: &[u8]) -> Option> { + let bounded_key: BoundedVec> = key.to_vec().try_into().ok()?; + ReceivedData::::get(publisher, bounded_key).map(|v| v.into_inner()) + } + } +} diff --git a/cumulus/pallets/subscriber/Cargo.toml b/cumulus/pallets/subscriber/Cargo.toml new file mode 100644 index 0000000000000..538e7c76ee185 --- /dev/null +++ b/cumulus/pallets/subscriber/Cargo.toml @@ -0,0 +1,67 @@ +[package] +name = "cumulus-pallet-subscriber" +version = "0.1.0" +authors.workspace = true +edition.workspace = true +description = "Pallet for subscribing to relay chain child trie data" +license = "Apache-2.0" +homepage.workspace = true +repository.workspace = true + +[lints] +workspace = true + +[dependencies] +codec = { features = ["derive"], workspace = true } +log = { workspace = true } +scale-info = { features = ["derive"], workspace = true } + +# Substrate +frame-support.workspace = true +frame-system.workspace = true +sp-runtime.workspace = true +sp-std.workspace = true +sp-storage.workspace = true + +# Cumulus +cumulus-pallet-parachain-system.workspace = true +cumulus-primitives-core.workspace = true + +# Polkadot +polkadot-parachain-primitives.workspace = true + +[dev-dependencies] +sp-core = { default-features = true, workspace = true } +sp-io = { default-features = true, workspace = true } + +[features] +default = ["std"] +std = [ + "codec/std", + "cumulus-pallet-parachain-system/std", + "cumulus-primitives-core/std", + "frame-support/std", + "frame-system/std", + "log/std", + "polkadot-parachain-primitives/std", + "scale-info/std", + "sp-runtime/std", + "sp-std/std", + "sp-storage/std", +] + +runtime-benchmarks = [ + "cumulus-pallet-parachain-system/runtime-benchmarks", + "cumulus-primitives-core/runtime-benchmarks", + "frame-support/runtime-benchmarks", + "frame-system/runtime-benchmarks", + "polkadot-parachain-primitives/runtime-benchmarks", + "sp-runtime/runtime-benchmarks", +] + +try-runtime = [ + "cumulus-pallet-parachain-system/try-runtime", + "frame-support/try-runtime", + "frame-system/try-runtime", + "sp-runtime/try-runtime", +] diff --git a/cumulus/pallets/subscriber/src/lib.rs b/cumulus/pallets/subscriber/src/lib.rs new file mode 100644 index 0000000000000..e8d06a916ae38 --- /dev/null +++ b/cumulus/pallets/subscriber/src/lib.rs @@ -0,0 +1,307 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Cumulus. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#![cfg_attr(not(feature = "std"), no_std)] + +//! # Subscriber Pallet +//! +//! Extracts and processes published data from relay chain child tries. +//! +//! ## Overview +//! +//! This pallet provides infrastructure for subscribing to data published by other parachains +//! via the relay chain broadcaster pallet. It: +//! +//! - Extracts child trie data from verified relay chain state proofs +//! - Tracks child trie roots for change detection optimization +//! - Delegates to consumer-defined handlers for processing received data +//! +//! The pallet is intentionally agnostic about: +//! - Which parachains to subscribe to +//! - Which keys to read +//! - What to do with the data +//! +//! These decisions are delegated to the `SubscriptionHandler` implementation provided via Config. +//! +//! ## Usage Example +//! +//! ```rust,ignore +//! // 1. Define your subscription handler +//! pub struct MyPriceOracleHandler; +//! impl cumulus_pallet_subscriber::SubscriptionHandler for MyPriceOracleHandler { +//! fn subscriptions() -> Vec<(ParaId, Vec>)> { +//! vec![(ParaId::from(2000), vec![b"btc_price".to_vec()])] +//! } +//! +//! fn on_data_updated(publisher: ParaId, key: Vec, value: Vec) { +//! // Store price in your pallet +//! PriceStorage::insert(key, value); +//! } +//! } +//! +//! // 2. Configure pallet-subscriber +//! impl cumulus_pallet_subscriber::Config for Runtime { +//! type SubscriptionHandler = MyPriceOracleHandler; +//! type WeightInfo = (); +//! } +//! +//! // 3. Configure parachain-system to use subscriber +//! impl cumulus_pallet_parachain_system::Config for Runtime { +//! // ... other config ... +//! type ChildTrieProcessor = Subscriber; +//! } +//! +//! // 4. Implement runtime API +//! impl cumulus_primitives_core::KeyToIncludeInRelayProofApi for Runtime { +//! fn child_trie_keys_to_prove() -> Vec { +//! Subscriber::get_child_trie_proof_requests() +//! } +//! } +//! ``` + +extern crate alloc; + +use alloc::{collections::btree_map::BTreeMap, vec::Vec}; +use codec::Decode; +use cumulus_pallet_parachain_system::relay_state_snapshot::RelayChainStateProof; +use cumulus_primitives_core::ParaId; +use frame_support::{ + defensive, + pallet_prelude::*, + storage::bounded_btree_map::BoundedBTreeMap, + traits::Get, +}; +use frame_system::pallet_prelude::*; +use sp_std::vec; + +pub use pallet::*; + +// Re-export the trait from parachain-system for convenience +pub use cumulus_pallet_parachain_system::relay_state_snapshot::ProcessChildTrieData; + +/// Trait for defining subscriptions and handling received data. +/// +/// Consumer pallets implement this trait to specify: +/// - Which parachains and keys to subscribe to +/// - How to process received data +pub trait SubscriptionHandler { + /// Returns the list of subscriptions. + /// + /// Each tuple contains: + /// - `ParaId`: The publisher parachain to subscribe to + /// - `Vec>`: The keys to subscribe to (empty means all keys) + fn subscriptions() -> Vec<(ParaId, Vec>)>; + + /// Called when subscribed data is updated. + /// + /// # Parameters + /// - `publisher`: The ParaId that published the data + /// - `key`: The storage key that was updated + /// - `value`: The new value (already decoded from SCALE) + fn on_data_updated(publisher: ParaId, key: Vec, value: Vec); +} + +#[frame_support::pallet] +pub mod pallet { + use super::*; + + #[pallet::pallet] + pub struct Pallet(_); + + #[pallet::config] + pub trait Config: frame_system::Config { + /// Handler that defines subscriptions and processes received data. + type SubscriptionHandler: SubscriptionHandler; + + /// Weight information for extrinsics in this pallet. + type WeightInfo: WeightInfo; + } + + /// Child trie root hashes from the previous block, used for change detection. + /// + /// Maps publisher ParaId to their child trie root hash (32 bytes). + /// Only roots for subscribed publishers are tracked. + /// Limited to 100 publishers max. + #[pallet::storage] + pub type PreviousPublishedDataRoots = StorageValue< + _, + BoundedBTreeMap>, ConstU32<100>>, + ValueQuery, + >; + + impl Pallet { + /// Get child trie proof requests for the collator. + /// + /// This should be called from the runtime API `child_trie_keys_to_prove` implementation. + /// It queries the subscription handler to build proof requests. + pub fn get_child_trie_proof_requests( + ) -> Vec { + T::SubscriptionHandler::subscriptions() + .into_iter() + .map(|(para_id, keys)| cumulus_primitives_core::ChildTrieProofRequest { + child_trie_identifier: Self::derive_child_info(para_id) + .storage_key() + .to_vec(), + data_keys: keys, + }) + .collect() + } + + /// Derives the child trie info for a publisher parachain. + /// + /// Must match the broadcaster pallet's child trie structure. + /// Uses the pubsub convention: `encode(b"pubsub", ParaId)` + fn derive_child_info(publisher_para_id: ParaId) -> sp_storage::ChildInfo { + use codec::Encode; + sp_storage::ChildInfo::new_default(&(b"pubsub", publisher_para_id).encode()) + } + + /// Collects child trie root hashes for subscribed publishers from the relay chain state + /// proof. + /// + /// Returns pairs of (ParaId, root_hash) for change detection optimization. + fn collect_publisher_roots( + relay_state_proof: &RelayChainStateProof, + ) -> Vec<(ParaId, Vec)> { + let subscriptions = T::SubscriptionHandler::subscriptions(); + + subscriptions + .into_iter() + .filter_map(|(publisher_para_id, _keys)| { + let child_info = Self::derive_child_info(publisher_para_id); + let prefixed_key = child_info.prefixed_storage_key(); + + relay_state_proof + .read_optional_entry::<[u8; 32]>(&*prefixed_key) + .ok() + .flatten() + .map(|root_hash| (publisher_para_id, root_hash.to_vec())) + }) + .collect() + } + + /// Process published data from the broadcaster pallet. + /// + /// Reads data from child tries in the relay chain storage proof for subscribed publishers + /// whose roots have changed. Uses child trie roots to detect changes between blocks. + /// + /// Returns the weight consumed. + fn process_published_data( + relay_state_proof: &RelayChainStateProof, + current_roots: &Vec<(ParaId, Vec)>, + ) -> Weight { + let previous_roots = >::get(); + + if current_roots.is_empty() && previous_roots.is_empty() { + return T::DbWeight::get().reads(1); + } + + let mut p = 0u32; + let mut k = 0u32; + let mut v = 0u32; + + let current_roots_map: BTreeMap> = + current_roots.iter().map(|(para_id, root)| (*para_id, root.clone())).collect(); + + let subscriptions = T::SubscriptionHandler::subscriptions(); + + for (publisher, subscription_keys) in subscriptions { + let should_update = match previous_roots.get(&publisher) { + Some(prev_root) => match current_roots_map.get(&publisher) { + Some(curr_root) if prev_root == curr_root => false, + _ => true, + }, + None => true, + }; + + if should_update && current_roots_map.contains_key(&publisher) { + let child_info = Self::derive_child_info(publisher); + + for key in subscription_keys.iter() { + match relay_state_proof.read_child_storage(&child_info, key) { + Ok(Some(encoded_value)) => { + match Vec::::decode(&mut &encoded_value[..]) { + Ok(value) => { + T::SubscriptionHandler::on_data_updated( + publisher, + key.clone(), + value.clone(), + ); + v = v.max(value.len() as u32); + k += 1; + }, + Err(_) => { + defensive!("Failed to decode published data value"); + }, + } + }, + Ok(None) => { + // Key not published yet - expected + }, + Err(_) => { + defensive!("Failed to read child storage from relay chain proof"); + }, + } + } + + p += 1; + } + } + + // Convert to BoundedBTreeMap with BoundedVec values + let bounded_roots: BoundedBTreeMap>, ConstU32<100>> = + current_roots_map + .into_iter() + .filter_map(|(para_id, root)| { + BoundedVec::try_from(root).ok().map(|bounded_root| (para_id, bounded_root)) + }) + .collect::>() + .try_into() + .unwrap_or_default(); + >::put(bounded_roots); + + T::WeightInfo::process_published_data(p, k, v) + } + } + + impl ProcessChildTrieData for Pallet { + fn process_child_trie_data(verified_proof: &RelayChainStateProof) -> Weight { + let current_roots = Self::collect_publisher_roots(verified_proof); + Self::process_published_data(verified_proof, ¤t_roots) + } + } +} + +/// Weight functions needed for this pallet. +pub trait WeightInfo { + fn process_published_data(p: u32, k: u32, v: u32) -> Weight; +} + +/// Default weights implementation (placeholder). +impl WeightInfo for () { + fn process_published_data(_p: u32, k: u32, v: u32) -> Weight { + // Rough estimate based on operations: + // - Reading previous roots: 1 read + // - Reading child storage: k reads + // - Writing updated roots: 1 write + // - Decoding and processing: computation based on value size + Weight::from_parts(10_000_000, 0) + .saturating_add(Weight::from_parts(5_000 * k as u64, 0)) + .saturating_add(Weight::from_parts(100 * v as u64, 0)) + .saturating_add(frame_support::weights::constants::RocksDbWeight::get().reads(1 + k as u64)) + .saturating_add(frame_support::weights::constants::RocksDbWeight::get().writes(1)) + } +} diff --git a/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs b/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs index 78b92e2054114..a7c8aaaf62da4 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs @@ -740,6 +740,7 @@ impl cumulus_pallet_parachain_system::Config for Runtime { type ConsensusHook = ConsensusHook; type SelectCore = cumulus_pallet_parachain_system::DefaultCoreSelector; type RelayParentOffset = ConstU32<0>; + type ChildTrieProcessor = (); } type ConsensusHook = cumulus_pallet_aura_ext::FixedVelocityConsensusHook< diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs index 068c9d39b9245..8810095c5d6d4 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs @@ -792,6 +792,7 @@ impl cumulus_pallet_parachain_system::Config for Runtime { type ConsensusHook = ConsensusHook; type SelectCore = cumulus_pallet_parachain_system::DefaultCoreSelector; type RelayParentOffset = ConstU32<0>; + type ChildTrieProcessor = (); } type ConsensusHook = cumulus_pallet_aura_ext::FixedVelocityConsensusHook< diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs index b0afd342b2b1a..f43d4bb3ab95b 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs @@ -401,6 +401,7 @@ impl cumulus_pallet_parachain_system::Config for Runtime { type ConsensusHook = ConsensusHook; type SelectCore = cumulus_pallet_parachain_system::DefaultCoreSelector; type RelayParentOffset = ConstU32<0>; + type ChildTrieProcessor = (); } type ConsensusHook = cumulus_pallet_aura_ext::FixedVelocityConsensusHook< diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/lib.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/lib.rs index ffc86b7b64d23..151bf9ccf345e 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/lib.rs @@ -391,6 +391,7 @@ impl cumulus_pallet_parachain_system::Config for Runtime { type ConsensusHook = ConsensusHook; type SelectCore = cumulus_pallet_parachain_system::DefaultCoreSelector; type RelayParentOffset = ConstU32<0>; + type ChildTrieProcessor = (); } type ConsensusHook = cumulus_pallet_aura_ext::FixedVelocityConsensusHook< diff --git a/cumulus/parachains/runtimes/collectives/collectives-westend/src/lib.rs b/cumulus/parachains/runtimes/collectives/collectives-westend/src/lib.rs index 2c2a83b7795f4..b8d099087ae37 100644 --- a/cumulus/parachains/runtimes/collectives/collectives-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/collectives/collectives-westend/src/lib.rs @@ -410,6 +410,7 @@ impl cumulus_pallet_parachain_system::Config for Runtime { type ConsensusHook = ConsensusHook; type SelectCore = cumulus_pallet_parachain_system::DefaultCoreSelector; type RelayParentOffset = ConstU32<0>; + type ChildTrieProcessor = (); } type ConsensusHook = cumulus_pallet_aura_ext::FixedVelocityConsensusHook< diff --git a/cumulus/parachains/runtimes/coretime/coretime-rococo/src/lib.rs b/cumulus/parachains/runtimes/coretime/coretime-rococo/src/lib.rs index f95251d461b65..793c03e07b92b 100644 --- a/cumulus/parachains/runtimes/coretime/coretime-rococo/src/lib.rs +++ b/cumulus/parachains/runtimes/coretime/coretime-rococo/src/lib.rs @@ -304,6 +304,7 @@ impl cumulus_pallet_parachain_system::Config for Runtime { type ConsensusHook = ConsensusHook; type SelectCore = cumulus_pallet_parachain_system::DefaultCoreSelector; type RelayParentOffset = ConstU32<0>; + type ChildTrieProcessor = (); } type ConsensusHook = cumulus_pallet_aura_ext::FixedVelocityConsensusHook< diff --git a/cumulus/parachains/runtimes/coretime/coretime-westend/src/lib.rs b/cumulus/parachains/runtimes/coretime/coretime-westend/src/lib.rs index 7af259482645d..9007d4139fffe 100644 --- a/cumulus/parachains/runtimes/coretime/coretime-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/coretime/coretime-westend/src/lib.rs @@ -305,6 +305,7 @@ impl cumulus_pallet_parachain_system::Config for Runtime { type ConsensusHook = ConsensusHook; type SelectCore = cumulus_pallet_parachain_system::DefaultCoreSelector; type RelayParentOffset = ConstU32<0>; + type ChildTrieProcessor = (); } type ConsensusHook = cumulus_pallet_aura_ext::FixedVelocityConsensusHook< diff --git a/cumulus/parachains/runtimes/glutton/glutton-westend/src/lib.rs b/cumulus/parachains/runtimes/glutton/glutton-westend/src/lib.rs index 6c8a93d8a5275..99f4cb9a4e1cb 100644 --- a/cumulus/parachains/runtimes/glutton/glutton-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/glutton/glutton-westend/src/lib.rs @@ -191,6 +191,7 @@ impl cumulus_pallet_parachain_system::Config for Runtime { type WeightInfo = weights::cumulus_pallet_parachain_system::WeightInfo; type SelectCore = cumulus_pallet_parachain_system::DefaultCoreSelector; type RelayParentOffset = ConstU32<0>; + type ChildTrieProcessor = (); } parameter_types! { diff --git a/cumulus/parachains/runtimes/people/people-rococo/src/lib.rs b/cumulus/parachains/runtimes/people/people-rococo/src/lib.rs index e87e0213be087..785c00e2a5490 100644 --- a/cumulus/parachains/runtimes/people/people-rococo/src/lib.rs +++ b/cumulus/parachains/runtimes/people/people-rococo/src/lib.rs @@ -279,6 +279,7 @@ impl cumulus_pallet_parachain_system::Config for Runtime { type WeightInfo = weights::cumulus_pallet_parachain_system::WeightInfo; type SelectCore = cumulus_pallet_parachain_system::DefaultCoreSelector; type RelayParentOffset = ConstU32<0>; + type ChildTrieProcessor = (); } type ConsensusHook = cumulus_pallet_aura_ext::FixedVelocityConsensusHook< diff --git a/cumulus/parachains/runtimes/people/people-westend/src/lib.rs b/cumulus/parachains/runtimes/people/people-westend/src/lib.rs index 274a4d25e63bd..0dbe0b5714a4a 100644 --- a/cumulus/parachains/runtimes/people/people-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/people/people-westend/src/lib.rs @@ -282,6 +282,7 @@ impl cumulus_pallet_parachain_system::Config for Runtime { type WeightInfo = weights::cumulus_pallet_parachain_system::WeightInfo; type SelectCore = cumulus_pallet_parachain_system::DefaultCoreSelector; type RelayParentOffset = ConstU32<0>; + type ChildTrieProcessor = (); } type ConsensusHook = cumulus_pallet_aura_ext::FixedVelocityConsensusHook< diff --git a/cumulus/parachains/runtimes/testing/penpal/src/lib.rs b/cumulus/parachains/runtimes/testing/penpal/src/lib.rs index 6a37590ce7cd2..53f452e9900d5 100644 --- a/cumulus/parachains/runtimes/testing/penpal/src/lib.rs +++ b/cumulus/parachains/runtimes/testing/penpal/src/lib.rs @@ -688,6 +688,7 @@ impl cumulus_pallet_parachain_system::Config for Runtime { >; type SelectCore = cumulus_pallet_parachain_system::DefaultCoreSelector; type RelayParentOffset = ConstU32<0>; + type ChildTrieProcessor = (); } impl parachain_info::Config for Runtime {} diff --git a/cumulus/parachains/runtimes/testing/rococo-parachain/Cargo.toml b/cumulus/parachains/runtimes/testing/rococo-parachain/Cargo.toml index 910d2fa0e979c..2fd3b78bbe84b 100644 --- a/cumulus/parachains/runtimes/testing/rococo-parachain/Cargo.toml +++ b/cumulus/parachains/runtimes/testing/rococo-parachain/Cargo.toml @@ -15,6 +15,8 @@ workspace = true codec = { features = ["derive"], workspace = true } cumulus-pallet-aura-ext.workspace = true cumulus-pallet-parachain-system.workspace = true +cumulus-pallet-pubsub-consumer.workspace = true +cumulus-pallet-subscriber.workspace = true cumulus-pallet-weight-reclaim.workspace = true cumulus-pallet-xcm.workspace = true cumulus-pallet-xcmp-queue.workspace = true @@ -67,6 +69,8 @@ std = [ "codec/std", "cumulus-pallet-aura-ext/std", "cumulus-pallet-parachain-system/std", + "cumulus-pallet-pubsub-consumer/std", + "cumulus-pallet-subscriber/std", "cumulus-pallet-weight-reclaim/std", "cumulus-pallet-xcm/std", "cumulus-pallet-xcmp-queue/std", diff --git a/cumulus/parachains/runtimes/testing/rococo-parachain/src/lib.rs b/cumulus/parachains/runtimes/testing/rococo-parachain/src/lib.rs index 91fe1679d9427..a3cda0f788bdf 100644 --- a/cumulus/parachains/runtimes/testing/rococo-parachain/src/lib.rs +++ b/cumulus/parachains/runtimes/testing/rococo-parachain/src/lib.rs @@ -309,6 +309,14 @@ impl cumulus_pallet_parachain_system::Config for Runtime { type ConsensusHook = ConsensusHook; type SelectCore = cumulus_pallet_parachain_system::DefaultCoreSelector; type RelayParentOffset = ConstU32<0>; + type ChildTrieProcessor = Subscriber; +} + +impl cumulus_pallet_pubsub_consumer::Config for Runtime {} + +impl cumulus_pallet_subscriber::Config for Runtime { + type SubscriptionHandler = cumulus_pallet_pubsub_consumer::TestSubscriptionHandler; + type WeightInfo = (); } impl parachain_info::Config for Runtime {} @@ -634,6 +642,8 @@ construct_runtime! { ParachainSystem: cumulus_pallet_parachain_system = 20, ParachainInfo: parachain_info = 21, + Subscriber: cumulus_pallet_subscriber = 22, + PubsubConsumer: cumulus_pallet_pubsub_consumer = 23, Balances: pallet_balances = 30, Assets: pallet_assets = 31, @@ -890,7 +900,7 @@ impl_runtime_apis! { impl cumulus_primitives_core::KeyToIncludeInRelayProofApi for Runtime { fn child_trie_keys_to_prove() -> Vec { - ParachainSystem::get_child_trie_proof_requests() + Subscriber::get_child_trie_proof_requests() } } } diff --git a/cumulus/parachains/runtimes/testing/yet-another-parachain/src/lib.rs b/cumulus/parachains/runtimes/testing/yet-another-parachain/src/lib.rs index a5c94fca779e8..d5e9bbd7af4e4 100644 --- a/cumulus/parachains/runtimes/testing/yet-another-parachain/src/lib.rs +++ b/cumulus/parachains/runtimes/testing/yet-another-parachain/src/lib.rs @@ -310,6 +310,7 @@ impl cumulus_pallet_parachain_system::Config for Runtime { type ConsensusHook = ConsensusHook; type SelectCore = cumulus_pallet_parachain_system::DefaultCoreSelector; type RelayParentOffset = ConstU32; + type ChildTrieProcessor = (); } impl pallet_message_queue::Config for Runtime { diff --git a/substrate/frame/staking-async/runtimes/parachain/src/lib.rs b/substrate/frame/staking-async/runtimes/parachain/src/lib.rs index e069e032f3c9a..b7884f3db9ba6 100644 --- a/substrate/frame/staking-async/runtimes/parachain/src/lib.rs +++ b/substrate/frame/staking-async/runtimes/parachain/src/lib.rs @@ -810,6 +810,7 @@ impl cumulus_pallet_parachain_system::Config for Runtime { type ConsensusHook = ConsensusHook; type SelectCore = cumulus_pallet_parachain_system::DefaultCoreSelector; type RelayParentOffset = ConstU32<0>; + type ChildTrieProcessor = (); } type ConsensusHook = cumulus_pallet_aura_ext::FixedVelocityConsensusHook< From 48c5f30ef0d104a3c67dbc6205d678363f5a42ae Mon Sep 17 00:00:00 2001 From: metricaez Date: Mon, 8 Dec 2025 09:51:48 -0300 Subject: [PATCH 120/128] choir: shorter comments --- .../src/relay_state_snapshot.rs | 13 +-- cumulus/pallets/pubsub-consumer/src/lib.rs | 18 +-- cumulus/pallets/subscriber/src/lib.rs | 110 +----------------- 3 files changed, 8 insertions(+), 133 deletions(-) diff --git a/cumulus/pallets/parachain-system/src/relay_state_snapshot.rs b/cumulus/pallets/parachain-system/src/relay_state_snapshot.rs index 838a4c5531501..a99e5d8c4849e 100644 --- a/cumulus/pallets/parachain-system/src/relay_state_snapshot.rs +++ b/cumulus/pallets/parachain-system/src/relay_state_snapshot.rs @@ -27,21 +27,12 @@ use sp_runtime::traits::HashingFor; use sp_state_machine::{Backend, TrieBackend, TrieBackendBuilder}; use sp_trie::{HashDBT, MemoryDB, StorageProof, EMPTY_PREFIX}; -/// Trait for processing verified relay chain state proofs to extract child trie data. -/// -/// Implemented by external pallets (like pallet-subscriber) and called by parachain-system -/// after proof verification. +/// Process child trie data from verified relay chain state proofs. pub trait ProcessChildTrieData { - /// Process child trie data from a verified relay chain state proof. - /// - /// This is called by parachain-system's `set_validation_data` inherent after the proof - /// has been verified. The proof is guaranteed to be valid at this point. - /// - /// Returns the weight consumed by processing. + /// Process child trie data from a verified relay state proof. fn process_child_trie_data(verified_proof: &RelayChainStateProof) -> Weight; } -/// No-op implementation for runtimes that don't use child trie processing. impl ProcessChildTrieData for () { fn process_child_trie_data(_verified_proof: &RelayChainStateProof) -> Weight { Weight::zero() diff --git a/cumulus/pallets/pubsub-consumer/src/lib.rs b/cumulus/pallets/pubsub-consumer/src/lib.rs index ef535cc810bfd..bbc3ff9fb1cf2 100644 --- a/cumulus/pallets/pubsub-consumer/src/lib.rs +++ b/cumulus/pallets/pubsub-consumer/src/lib.rs @@ -16,14 +16,7 @@ #![cfg_attr(not(feature = "std"), no_std)] -//! # Pubsub Consumer Pallet -//! -//! Minimal example consumer pallet for testing end-to-end pubsub functionality. -//! -//! This pallet: -//! - Subscribes to ParaId 1000, key `0x1234` -//! - Stores received data in `ReceivedData` storage -//! - Emits `DataReceived` event on updates +//! Test consumer for pubsub subscriptions. extern crate alloc; @@ -34,26 +27,21 @@ use frame_system::pallet_prelude::*; pub use pallet::*; -/// Test subscription handler that subscribes to ParaId 1000, key 0x1234 pub struct TestSubscriptionHandler(core::marker::PhantomData); impl cumulus_pallet_subscriber::SubscriptionHandler for TestSubscriptionHandler { fn subscriptions() -> Vec<(ParaId, Vec>)> { - // Subscribe to ParaId 1000, key 0x1234 alloc::vec![(ParaId::from(1000), alloc::vec![alloc::vec![0x12, 0x34]])] } fn on_data_updated(publisher: ParaId, key: Vec, value: Vec) { - // Convert to bounded vecs let bounded_key: BoundedVec> = key.clone().try_into().unwrap_or_default(); let bounded_value: BoundedVec> = value.clone().try_into().unwrap_or_default(); - // Store the data >::insert(&publisher, &bounded_key, &bounded_value); - // Emit event Pallet::::deposit_event(Event::DataReceived { publisher, key: bounded_key, @@ -72,8 +60,6 @@ pub mod pallet { #[pallet::config] pub trait Config: frame_system::Config>> {} - /// Storage map for received data: (PublisherParaId, Key) => Value - /// Keys limited to 256 bytes, values to 1024 bytes #[pallet::storage] pub type ReceivedData = StorageDoubleMap< _, @@ -88,7 +74,6 @@ pub mod pallet { #[pallet::event] #[pallet::generate_deposit(pub(super) fn deposit_event)] pub enum Event { - /// Data was received from a publisher DataReceived { publisher: ParaId, key: BoundedVec>, @@ -97,7 +82,6 @@ pub mod pallet { } impl Pallet { - /// Get received data for a publisher and key pub fn get_data(publisher: ParaId, key: &[u8]) -> Option> { let bounded_key: BoundedVec> = key.to_vec().try_into().ok()?; ReceivedData::::get(publisher, bounded_key).map(|v| v.into_inner()) diff --git a/cumulus/pallets/subscriber/src/lib.rs b/cumulus/pallets/subscriber/src/lib.rs index e8d06a916ae38..aa58a3f7cdadd 100644 --- a/cumulus/pallets/subscriber/src/lib.rs +++ b/cumulus/pallets/subscriber/src/lib.rs @@ -16,61 +16,7 @@ #![cfg_attr(not(feature = "std"), no_std)] -//! # Subscriber Pallet -//! -//! Extracts and processes published data from relay chain child tries. -//! -//! ## Overview -//! -//! This pallet provides infrastructure for subscribing to data published by other parachains -//! via the relay chain broadcaster pallet. It: -//! -//! - Extracts child trie data from verified relay chain state proofs -//! - Tracks child trie roots for change detection optimization -//! - Delegates to consumer-defined handlers for processing received data -//! -//! The pallet is intentionally agnostic about: -//! - Which parachains to subscribe to -//! - Which keys to read -//! - What to do with the data -//! -//! These decisions are delegated to the `SubscriptionHandler` implementation provided via Config. -//! -//! ## Usage Example -//! -//! ```rust,ignore -//! // 1. Define your subscription handler -//! pub struct MyPriceOracleHandler; -//! impl cumulus_pallet_subscriber::SubscriptionHandler for MyPriceOracleHandler { -//! fn subscriptions() -> Vec<(ParaId, Vec>)> { -//! vec![(ParaId::from(2000), vec![b"btc_price".to_vec()])] -//! } -//! -//! fn on_data_updated(publisher: ParaId, key: Vec, value: Vec) { -//! // Store price in your pallet -//! PriceStorage::insert(key, value); -//! } -//! } -//! -//! // 2. Configure pallet-subscriber -//! impl cumulus_pallet_subscriber::Config for Runtime { -//! type SubscriptionHandler = MyPriceOracleHandler; -//! type WeightInfo = (); -//! } -//! -//! // 3. Configure parachain-system to use subscriber -//! impl cumulus_pallet_parachain_system::Config for Runtime { -//! // ... other config ... -//! type ChildTrieProcessor = Subscriber; -//! } -//! -//! // 4. Implement runtime API -//! impl cumulus_primitives_core::KeyToIncludeInRelayProofApi for Runtime { -//! fn child_trie_keys_to_prove() -> Vec { -//! Subscriber::get_child_trie_proof_requests() -//! } -//! } -//! ``` +//! Process child trie data from relay chain state proofs via configurable handler. extern crate alloc; @@ -89,28 +35,14 @@ use sp_std::vec; pub use pallet::*; -// Re-export the trait from parachain-system for convenience pub use cumulus_pallet_parachain_system::relay_state_snapshot::ProcessChildTrieData; -/// Trait for defining subscriptions and handling received data. -/// -/// Consumer pallets implement this trait to specify: -/// - Which parachains and keys to subscribe to -/// - How to process received data +/// Define subscriptions and handle received data. pub trait SubscriptionHandler { - /// Returns the list of subscriptions. - /// - /// Each tuple contains: - /// - `ParaId`: The publisher parachain to subscribe to - /// - `Vec>`: The keys to subscribe to (empty means all keys) + /// List of subscriptions as (ParaId, keys) tuples. fn subscriptions() -> Vec<(ParaId, Vec>)>; /// Called when subscribed data is updated. - /// - /// # Parameters - /// - `publisher`: The ParaId that published the data - /// - `key`: The storage key that was updated - /// - `value`: The new value (already decoded from SCALE) fn on_data_updated(publisher: ParaId, key: Vec, value: Vec); } @@ -123,18 +55,11 @@ pub mod pallet { #[pallet::config] pub trait Config: frame_system::Config { - /// Handler that defines subscriptions and processes received data. type SubscriptionHandler: SubscriptionHandler; - - /// Weight information for extrinsics in this pallet. type WeightInfo: WeightInfo; } - /// Child trie root hashes from the previous block, used for change detection. - /// - /// Maps publisher ParaId to their child trie root hash (32 bytes). - /// Only roots for subscribed publishers are tracked. - /// Limited to 100 publishers max. + /// Child trie roots from previous block for change detection. #[pallet::storage] pub type PreviousPublishedDataRoots = StorageValue< _, @@ -143,10 +68,7 @@ pub mod pallet { >; impl Pallet { - /// Get child trie proof requests for the collator. - /// - /// This should be called from the runtime API `child_trie_keys_to_prove` implementation. - /// It queries the subscription handler to build proof requests. + /// Build child trie proof requests from subscriptions. pub fn get_child_trie_proof_requests( ) -> Vec { T::SubscriptionHandler::subscriptions() @@ -160,19 +82,11 @@ pub mod pallet { .collect() } - /// Derives the child trie info for a publisher parachain. - /// - /// Must match the broadcaster pallet's child trie structure. - /// Uses the pubsub convention: `encode(b"pubsub", ParaId)` fn derive_child_info(publisher_para_id: ParaId) -> sp_storage::ChildInfo { use codec::Encode; sp_storage::ChildInfo::new_default(&(b"pubsub", publisher_para_id).encode()) } - /// Collects child trie root hashes for subscribed publishers from the relay chain state - /// proof. - /// - /// Returns pairs of (ParaId, root_hash) for change detection optimization. fn collect_publisher_roots( relay_state_proof: &RelayChainStateProof, ) -> Vec<(ParaId, Vec)> { @@ -193,12 +107,6 @@ pub mod pallet { .collect() } - /// Process published data from the broadcaster pallet. - /// - /// Reads data from child tries in the relay chain storage proof for subscribed publishers - /// whose roots have changed. Uses child trie roots to detect changes between blocks. - /// - /// Returns the weight consumed. fn process_published_data( relay_state_proof: &RelayChainStateProof, current_roots: &Vec<(ParaId, Vec)>, @@ -261,7 +169,6 @@ pub mod pallet { } } - // Convert to BoundedBTreeMap with BoundedVec values let bounded_roots: BoundedBTreeMap>, ConstU32<100>> = current_roots_map .into_iter() @@ -285,19 +192,12 @@ pub mod pallet { } } -/// Weight functions needed for this pallet. pub trait WeightInfo { fn process_published_data(p: u32, k: u32, v: u32) -> Weight; } -/// Default weights implementation (placeholder). impl WeightInfo for () { fn process_published_data(_p: u32, k: u32, v: u32) -> Weight { - // Rough estimate based on operations: - // - Reading previous roots: 1 read - // - Reading child storage: k reads - // - Writing updated roots: 1 write - // - Decoding and processing: computation based on value size Weight::from_parts(10_000_000, 0) .saturating_add(Weight::from_parts(5_000 * k as u64, 0)) .saturating_add(Weight::from_parts(100 * v as u64, 0)) From dfa8156225514e3e9942740a58833947d0df5d7e Mon Sep 17 00:00:00 2001 From: metricaez Date: Mon, 8 Dec 2025 12:52:55 -0300 Subject: [PATCH 121/128] feat: register publisher --- .../runtime/parachains/src/broadcaster/mod.rs | 225 ++++++++++++++-- .../parachains/src/broadcaster/tests.rs | 251 ++++++++++++++++-- polkadot/runtime/parachains/src/mock.rs | 7 + polkadot/runtime/rococo/src/lib.rs | 4 + 4 files changed, 446 insertions(+), 41 deletions(-) diff --git a/polkadot/runtime/parachains/src/broadcaster/mod.rs b/polkadot/runtime/parachains/src/broadcaster/mod.rs index e0bdf6e4035da..5765942923b3f 100644 --- a/polkadot/runtime/parachains/src/broadcaster/mod.rs +++ b/polkadot/runtime/parachains/src/broadcaster/mod.rs @@ -14,25 +14,53 @@ // You should have received a copy of the GNU General Public License // along with Polkadot. If not, see . -//! A pallet for managing parachain data publishing and subscription. +//! Broadcaster pallet for managing parachain data publishing and subscription. //! -//! This pallet provides a publish-subscribe mechanism for parachains to share data -//! efficiently through the relay chain storage using child tries per publisher. +//! This pallet provides a publish-subscribe mechanism for parachains to efficiently share data +//! through the relay chain storage using child tries per publisher. +//! +//! ## Publisher Registration +//! +//! Parachains must register before they can publish data: +//! +//! - System parachains (ID < 2000): Registered via `force_register_publisher` (Root origin) +//! with custom deposit amounts (typically zero). +//! - Public parachains (ID >= 2000): Registered via `register_publisher` requiring a deposit. +//! +//! The deposit is held using the native fungible traits with the `PublisherDeposit` hold reason. +//! +//! ## Storage Organization +//! +//! Each publisher gets a dedicated child trie identified by `(b"pubsub", ParaId)`. The child +//! trie root is stored on-chain and can be included in storage proofs for subscribers to verify +//! published data. //! //! ## Storage Lifecycle //! //! Note: This pallet does not currently implement publisher removal or cleanup mechanisms. //! Once a parachain publishes data, it remains in storage. Publishers can update their data -//! by publishing again, but there is no explicit removal path. +//! by publishing again, but there is no explicit removal path. use alloc::{collections::BTreeMap, vec::Vec}; +use codec::{Decode, Encode}; use frame_support::{ pallet_prelude::*, storage::{child::ChildInfo, types::CountedStorageMap}, - traits::{defensive_prelude::*, Get, ConstU32}, + traits::{ + defensive_prelude::*, + fungible::{ + hold::{Balanced as FunHoldBalanced, Mutate as FunHoldMutate}, + Inspect as FunInspect, Mutate as FunMutate, + }, + tokens::Precision::Exact, + Get, + }, }; -use frame_system::pallet_prelude::BlockNumberFor; +use frame_system::{ensure_root, ensure_signed, pallet_prelude::BlockNumberFor}; +use polkadot_parachain_primitives::primitives::IsSystem; use polkadot_primitives::Id as ParaId; +use scale_info::TypeInfo; +use sp_runtime::{traits::Zero, RuntimeDebug}; pub use pallet::*; @@ -42,10 +70,20 @@ pub use traits::Publish; #[cfg(test)] mod tests; +/// Information about a registered publisher. +#[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo, MaxEncodedLen)] +pub struct PublisherInfo { + /// The account that registered and manages this publisher. + pub manager: AccountId, + /// The amount held as deposit for registration. + pub deposit: Balance, +} + #[frame_support::pallet] pub mod pallet { use super::*; + use frame_system::pallet_prelude::*; const STORAGE_VERSION: StorageVersion = StorageVersion::new(0); @@ -53,33 +91,61 @@ pub mod pallet { #[pallet::storage_version(STORAGE_VERSION)] pub struct Pallet(_); + /// Reasons for the pallet placing a hold on funds. + #[pallet::composite_enum] + pub enum HoldReason { + /// The funds are held as deposit for publisher registration. + #[codec(index = 0)] + PublisherDeposit, + } + + type BalanceOf = + <::Currency as FunInspect<::AccountId>>::Balance; + #[pallet::config] pub trait Config: frame_system::Config { /// The overarching event type. type RuntimeEvent: From> + IsType<::RuntimeEvent>; - /// Maximum number of items that can be published in one operation. + /// Currency mechanism for managing publisher deposits. + type Currency: FunHoldMutate + + FunMutate + + FunHoldBalanced; + + /// Overarching hold reason. + type RuntimeHoldReason: From; + + /// Maximum number of items that can be published in a single operation. + /// /// Must not exceed `xcm::v5::MaxPublishItems`. #[pallet::constant] type MaxPublishItems: Get; - /// Maximum length of a key in bytes. + /// Maximum length of a published key in bytes. + /// /// Must not exceed `xcm::v5::MaxPublishKeyLength`. #[pallet::constant] type MaxKeyLength: Get; - /// Maximum length of a value in bytes. + /// Maximum length of a published value in bytes. + /// /// Must not exceed `xcm::v5::MaxPublishValueLength`. #[pallet::constant] type MaxValueLength: Get; - /// Maximum number of unique keys a publisher can have stored across all publishes. + /// Maximum number of unique keys a publisher can store. #[pallet::constant] type MaxStoredKeys: Get; - /// Maximum number of parachains that can publish data. + /// Maximum number of parachains that can register as publishers. #[pallet::constant] type MaxPublishers: Get; + + /// The deposit required for a parachain to register as a publisher. + /// + /// System parachains may use `force_register_publisher` with a custom deposit amount. + #[pallet::constant] + type PublisherDeposit: Get>; } #[pallet::event] @@ -87,8 +153,25 @@ pub mod pallet { pub enum Event { /// Data published by a parachain. DataPublished { publisher: ParaId, items_count: u32 }, + /// A publisher has been registered. + PublisherRegistered { para_id: ParaId, manager: T::AccountId }, + /// A publisher has been deregistered. + PublisherDeregistered { para_id: ParaId }, } + /// Registered publishers and their deposit information. + /// + /// Parachains must be registered before they can publish data. The registration includes + /// information about the managing account and the deposit held for the registration. + #[pallet::storage] + pub type RegisteredPublishers = StorageMap< + _, + Twox64Concat, + ParaId, + PublisherInfo>, + OptionQuery, + >; + /// Tracks which parachains have published data. /// /// Maps parachain ID to a boolean indicating whether they have a child trie. @@ -138,6 +221,12 @@ pub mod pallet { TooManyStoredKeys, /// Maximum number of publishers reached. TooManyPublishers, + /// Para is not registered as a publisher. + NotRegistered, + /// Para is already registered as a publisher. + AlreadyRegistered, + /// Cannot publish without being registered first. + PublishNotAuthorized, } #[pallet::hooks] @@ -158,14 +247,100 @@ pub mod pallet { } } + #[pallet::call] impl Pallet { - /// Process a publish operation from a parachain. + /// Register a parachain as a publisher. /// - /// Stores the provided key-value pairs in the publisher's child trie. + /// The calling account will be set as the manager and must hold a deposit. + /// The deposit is held using the `PublisherDeposit` hold reason until the publisher is + /// deregistered. + /// + /// - `origin`: Must be `Signed`. + /// - `para_id`: The parachain ID to register as a publisher. + /// + /// Emits `PublisherRegistered` on success. + #[pallet::call_index(0)] + #[pallet::weight(T::DbWeight::get().reads_writes(2, 1))] + pub fn register_publisher( + origin: OriginFor, + para_id: ParaId, + ) -> DispatchResult { + let who = ensure_signed(origin)?; + Self::do_register_publisher(who, para_id, T::PublisherDeposit::get()) + } + + /// Force register a parachain as a publisher. + /// + /// This function must be called by a Root origin. + /// + /// Allows registration of any `ParaId`, including system parachains, with a custom deposit + /// amount. This is typically used for system chains which can be registered with zero + /// deposit. + /// + /// - `origin`: Must be `Root`. + /// - `manager`: The account that will manage this publisher. + /// - `deposit`: The deposit amount to hold (can be zero for system chains). + /// - `para_id`: The parachain ID to register as a publisher. + /// + /// Emits `PublisherRegistered` on success. + #[pallet::call_index(1)] + #[pallet::weight(T::DbWeight::get().reads_writes(2, 1))] + pub fn force_register_publisher( + origin: OriginFor, + manager: T::AccountId, + deposit: BalanceOf, + para_id: ParaId, + ) -> DispatchResult { + ensure_root(origin)?; + Self::do_register_publisher(manager, para_id, deposit) + } + } + + impl Pallet { + /// Register a publisher, holding the deposit from the manager account. + fn do_register_publisher( + manager: T::AccountId, + para_id: ParaId, + deposit: BalanceOf, + ) -> DispatchResult { + // Check not already registered + ensure!( + !RegisteredPublishers::::contains_key(para_id), + Error::::AlreadyRegistered + ); + + // Hold the deposit if non-zero + if !deposit.is_zero() { + ::Currency::hold( + &HoldReason::PublisherDeposit.into(), + &manager, + deposit, + )?; + } + + let info = PublisherInfo { manager: manager.clone(), deposit }; + + RegisteredPublishers::::insert(para_id, info); + Self::deposit_event(Event::PublisherRegistered { para_id, manager }); + + Ok(()) + } + + /// Processes a publish operation from a parachain. + /// + /// Validates the publisher is registered, checks all bounds, and stores the provided + /// key-value pairs in the publisher's dedicated child trie. Updates the child trie root + /// and published keys tracking. pub fn handle_publish( origin_para_id: ParaId, data: Vec<(Vec, Vec)>, ) -> DispatchResult { + // Check publisher is registered + ensure!( + RegisteredPublishers::::contains_key(origin_para_id), + Error::::PublishNotAuthorized + ); + let items_count = data.len() as u32; // Validate input limits first before making any changes @@ -238,10 +413,9 @@ pub mod pallet { Ok(()) } - /// Get the child trie root hash for a specific publisher. + /// Returns the child trie root hash for a specific publisher. /// - /// This root is always included in PersistedValidationData to prove - /// the current state of the publisher's data. + /// The root can be included in storage proofs for subscribers to verify published data. pub fn get_publisher_child_root(para_id: ParaId) -> Option> { PublisherExists::::get(para_id).then(|| { let child_info = Self::derive_child_info(para_id); @@ -249,7 +423,9 @@ pub mod pallet { }) } - /// Get or create child trie info for a publisher. + /// Gets or creates the child trie info for a publisher. + /// + /// Checks the maximum publishers limit before creating a new publisher entry. fn get_or_create_publisher_child_info(para_id: ParaId) -> Result { if !PublisherExists::::contains_key(para_id) { ensure!( @@ -261,14 +437,16 @@ pub mod pallet { Ok(Self::derive_child_info(para_id)) } - /// Derive a deterministic child trie identifier from parachain ID. + /// Derives a deterministic child trie identifier from a parachain ID. + /// + /// The child trie identifier is `(b"pubsub", para_id)` encoded. pub fn derive_child_info(para_id: ParaId) -> ChildInfo { ChildInfo::new_default(&(b"pubsub", para_id).encode()) } - /// Retrieve a value from a publisher's child trie. + /// Retrieves a value from a publisher's child trie. /// - /// Returns None if the publisher doesn't exist or the key is not found. + /// Returns `None` if the publisher doesn't exist or the key is not found. pub fn get_published_value(para_id: ParaId, key: &[u8]) -> Option> { PublisherExists::::get(para_id).then(|| { let child_info = Self::derive_child_info(para_id); @@ -276,7 +454,10 @@ pub mod pallet { })? } - /// Get all published data for a parachain. + /// Returns all published data for a parachain. + /// + /// Iterates over all tracked keys for the publisher and retrieves their values from the + /// child trie. pub fn get_all_published_data(para_id: ParaId) -> Vec<(Vec, Vec)> { if !PublisherExists::::get(para_id) { return Vec::new(); @@ -295,7 +476,7 @@ pub mod pallet { .collect() } - /// Get list of all parachains that have published data. + /// Returns a list of all parachains that have published data. pub fn get_all_publishers() -> Vec { PublisherExists::::iter_keys().collect() } diff --git a/polkadot/runtime/parachains/src/broadcaster/tests.rs b/polkadot/runtime/parachains/src/broadcaster/tests.rs index c3c124f562edf..3237f79f8e626 100644 --- a/polkadot/runtime/parachains/src/broadcaster/tests.rs +++ b/polkadot/runtime/parachains/src/broadcaster/tests.rs @@ -15,14 +15,204 @@ // along with Polkadot. If not, see . use super::*; -use crate::mock::{new_test_ext, Broadcaster, Test}; -use frame_support::{assert_err, assert_ok}; +use crate::mock::{new_test_ext, Balances, Broadcaster, RuntimeOrigin, Test}; +use frame_support::{ + assert_err, assert_ok, + traits::fungible::{hold::Inspect as HoldInspect, Inspect}, +}; use polkadot_primitives::Id as ParaId; +const ALICE: u64 = 1; +const BOB: u64 = 2; + +// Helper function to set up an account with balance +fn setup_account(who: u64, balance: u128) { + let _ = Balances::mint_into(&who, balance); +} + +// Helper function to register a publisher for testing +fn register_test_publisher(para_id: ParaId) { + setup_account(ALICE, 10000); + assert_ok!(Broadcaster::register_publisher(RuntimeOrigin::signed(ALICE), para_id)); +} + +// ========== Registration Tests ========== + #[test] -fn publish_store_retrieve_and_update_data() { +fn register_publisher_works() { + new_test_ext(Default::default()).execute_with(|| { + let para_id = ParaId::from(2000); + setup_account(ALICE, 1000); + + // Register publisher + assert_ok!(Broadcaster::register_publisher(RuntimeOrigin::signed(ALICE), para_id)); + + // Verify registration + let info = RegisteredPublishers::::get(para_id).unwrap(); + assert_eq!(info.manager, ALICE); + assert_eq!(info.deposit, 100); + + // Verify deposit is held + assert_eq!(Balances::balance_on_hold(&HoldReason::PublisherDeposit.into(), &ALICE), 100); + assert_eq!(Balances::balance(&ALICE), 900); + }); +} + +#[test] +fn force_register_system_chain_works() { + new_test_ext(Default::default()).execute_with(|| { + let para_id = ParaId::from(1000); // System chain + setup_account(ALICE, 1000); + + // Force register with zero deposit + assert_ok!(Broadcaster::force_register_publisher( + RuntimeOrigin::root(), + ALICE, + 0, + para_id + )); + + // Verify registration + let info = RegisteredPublishers::::get(para_id).unwrap(); + assert_eq!(info.manager, ALICE); + assert_eq!(info.deposit, 0); + + // Verify no deposit held + assert_eq!(Balances::balance_on_hold(&HoldReason::PublisherDeposit.into(), &ALICE), 0); + assert_eq!(Balances::balance(&ALICE), 1000); + }); +} + +#[test] +fn force_register_with_custom_deposit_works() { + new_test_ext(Default::default()).execute_with(|| { + let para_id = ParaId::from(2000); + setup_account(BOB, 1000); + + // Force register with custom deposit + assert_ok!(Broadcaster::force_register_publisher( + RuntimeOrigin::root(), + BOB, + 500, + para_id + )); + + // Verify registration + let info = RegisteredPublishers::::get(para_id).unwrap(); + assert_eq!(info.manager, BOB); + assert_eq!(info.deposit, 500); + + // Verify custom deposit held + assert_eq!(Balances::balance_on_hold(&HoldReason::PublisherDeposit.into(), &BOB), 500); + assert_eq!(Balances::balance(&BOB), 500); + }); +} + +#[test] +fn cannot_register_twice() { + new_test_ext(Default::default()).execute_with(|| { + let para_id = ParaId::from(2000); + setup_account(ALICE, 1000); + setup_account(BOB, 1000); + + // First registration succeeds + assert_ok!(Broadcaster::register_publisher(RuntimeOrigin::signed(ALICE), para_id)); + + // Second registration by same account fails + assert_err!( + Broadcaster::register_publisher(RuntimeOrigin::signed(ALICE), para_id), + Error::::AlreadyRegistered + ); + + // Second registration by different account also fails + assert_err!( + Broadcaster::register_publisher(RuntimeOrigin::signed(BOB), para_id), + Error::::AlreadyRegistered + ); + + // Only one deposit held + assert_eq!(Balances::balance_on_hold(&HoldReason::PublisherDeposit.into(), &ALICE), 100); + assert_eq!(Balances::balance_on_hold(&HoldReason::PublisherDeposit.into(), &BOB), 0); + }); +} + +#[test] +fn force_register_requires_root() { new_test_ext(Default::default()).execute_with(|| { let para_id = ParaId::from(1000); + setup_account(ALICE, 1000); + + // Non-root origin fails + assert_err!( + Broadcaster::force_register_publisher(RuntimeOrigin::signed(ALICE), ALICE, 0, para_id), + sp_runtime::DispatchError::BadOrigin + ); + + // Para not registered + assert!(!RegisteredPublishers::::contains_key(para_id)); + }); +} + +#[test] +fn register_publisher_requires_sufficient_balance() { + new_test_ext(Default::default()).execute_with(|| { + let para_id = ParaId::from(2000); + setup_account(ALICE, 50); // Less than required deposit + + // Registration fails due to insufficient funds + let result = Broadcaster::register_publisher(RuntimeOrigin::signed(ALICE), para_id); + assert!(result.is_err()); + + // Para not registered + assert!(!RegisteredPublishers::::contains_key(para_id)); + }); +} + +#[test] +fn publish_requires_registration() { + new_test_ext(Default::default()).execute_with(|| { + let para_id = ParaId::from(2000); + let data = vec![(b"key".to_vec(), b"value".to_vec())]; + + // Publish without registration fails + assert_err!( + Broadcaster::handle_publish(para_id, data), + Error::::PublishNotAuthorized + ); + + // No data stored + assert!(!PublisherExists::::get(para_id)); + }); +} + +#[test] +fn registered_publisher_can_publish() { + new_test_ext(Default::default()).execute_with(|| { + let para_id = ParaId::from(2000); + setup_account(ALICE, 1000); + + // Register first + assert_ok!(Broadcaster::register_publisher(RuntimeOrigin::signed(ALICE), para_id)); + + // Now publish works + let data = vec![(b"key".to_vec(), b"value".to_vec())]; + assert_ok!(Broadcaster::handle_publish(para_id, data)); + + // Verify data stored + assert_eq!(Broadcaster::get_published_value(para_id, b"key"), Some(b"value".to_vec())); + }); +} + +// ========== Existing Tests (updated to register first) ========== + +#[test] +fn publish_store_retrieve_and_update_data() { + new_test_ext(Default::default()).execute_with(|| { + let para_id = ParaId::from(2000); + setup_account(ALICE, 1000); + + // Register publisher first + assert_ok!(Broadcaster::register_publisher(RuntimeOrigin::signed(ALICE), para_id)); // Initial state: publisher doesn't exist, no child root assert!(!PublisherExists::::get(para_id)); @@ -74,7 +264,8 @@ fn publish_store_retrieve_and_update_data() { #[test] fn empty_publish_still_creates_publisher() { new_test_ext(Default::default()).execute_with(|| { - let para_id = ParaId::from(1000); + let para_id = ParaId::from(2000); + register_test_publisher(para_id); let _ = Broadcaster::handle_publish(para_id, vec![]); @@ -85,7 +276,8 @@ fn empty_publish_still_creates_publisher() { #[test] fn handle_publish_respects_max_items_limit() { new_test_ext(Default::default()).execute_with(|| { - let para_id = ParaId::from(1000); + let para_id = ParaId::from(2000); + register_test_publisher(para_id); let mut data = Vec::new(); for i in 0..17 { @@ -94,42 +286,42 @@ fn handle_publish_respects_max_items_limit() { let result = Broadcaster::handle_publish(para_id, data); assert!(result.is_err()); - assert!(!PublisherExists::::get(para_id)); }); } #[test] fn handle_publish_respects_key_length_limit() { new_test_ext(Default::default()).execute_with(|| { - let para_id = ParaId::from(1000); + let para_id = ParaId::from(2000); + register_test_publisher(para_id); let long_key = vec![b'a'; 257]; let data = vec![(long_key, b"value".to_vec())]; let result = Broadcaster::handle_publish(para_id, data); assert!(result.is_err()); - assert!(!PublisherExists::::get(para_id)); }); } #[test] fn handle_publish_respects_value_length_limit() { new_test_ext(Default::default()).execute_with(|| { - let para_id = ParaId::from(1000); + let para_id = ParaId::from(2000); + register_test_publisher(para_id); let long_value = vec![b'v'; 1025]; let data = vec![(b"key".to_vec(), long_value)]; let result = Broadcaster::handle_publish(para_id, data); assert!(result.is_err()); - assert!(!PublisherExists::::get(para_id)); }); } #[test] fn max_stored_keys_limit_enforced() { new_test_ext(Default::default()).execute_with(|| { - let para_id = ParaId::from(1000); + let para_id = ParaId::from(2000); + register_test_publisher(para_id); for batch in 0..7 { let mut data = Vec::new(); @@ -167,7 +359,8 @@ fn max_stored_keys_limit_enforced() { #[test] fn published_keys_storage_matches_child_trie() { new_test_ext(Default::default()).execute_with(|| { - let para_id = ParaId::from(1000); + let para_id = ParaId::from(2000); + register_test_publisher(para_id); // Publish multiple batches to ensure consistency maintained across updates let data1 = vec![ @@ -208,9 +401,16 @@ fn published_keys_storage_matches_child_trie() { #[test] fn multiple_publishers_in_same_block() { new_test_ext(Default::default()).execute_with(|| { - let para1 = ParaId::from(1000); - let para2 = ParaId::from(2000); - let para3 = ParaId::from(3000); + let para1 = ParaId::from(2000); + let para2 = ParaId::from(2001); + let para3 = ParaId::from(2002); + + // Register all publishers + register_test_publisher(para1); + setup_account(BOB, 10000); + assert_ok!(Broadcaster::register_publisher(RuntimeOrigin::signed(BOB), para2)); + setup_account(3, 10000); + assert_ok!(Broadcaster::register_publisher(RuntimeOrigin::signed(3), para3)); // Multiple parachains publish data in the same block let data1 = vec![(b"key1".to_vec(), b"value1".to_vec())]; @@ -249,19 +449,32 @@ fn multiple_publishers_in_same_block() { #[test] fn max_publishers_limit_enforced() { new_test_ext(Default::default()).execute_with(|| { + // Register and publish for max publishers for i in 0..1000 { - let para_id = ParaId::from(1000 + i); + let para_id = ParaId::from(2000 + i); + setup_account(100 + i as u64, 10000); + assert_ok!(Broadcaster::register_publisher( + RuntimeOrigin::signed(100 + i as u64), + para_id + )); let data = vec![(b"key".to_vec(), b"value".to_vec())]; assert_ok!(Broadcaster::handle_publish(para_id, data)); } assert_eq!(PublishedDataRoots::::count(), 1000); - let para_id = ParaId::from(2000); + // Cannot register new publisher when limit reached + let new_para = ParaId::from(3000); + setup_account(ALICE, 10000); let data = vec![(b"key".to_vec(), b"value".to_vec())]; - assert_err!(Broadcaster::handle_publish(para_id, data), Error::::TooManyPublishers); - let existing_para = ParaId::from(1000); + // Registration should fail due to max publishers + // (registration checks this in get_or_create_publisher_child_info) + assert_ok!(Broadcaster::register_publisher(RuntimeOrigin::signed(ALICE), new_para)); + assert_err!(Broadcaster::handle_publish(new_para, data), Error::::TooManyPublishers); + + // Existing publisher can still update + let existing_para = ParaId::from(2000); let update_data = vec![(b"key".to_vec(), b"updated".to_vec())]; assert_ok!(Broadcaster::handle_publish(existing_para, update_data)); assert_eq!( diff --git a/polkadot/runtime/parachains/src/mock.rs b/polkadot/runtime/parachains/src/mock.rs index 10d824d018217..953e221820a15 100644 --- a/polkadot/runtime/parachains/src/mock.rs +++ b/polkadot/runtime/parachains/src/mock.rs @@ -491,13 +491,20 @@ parameter_types! { pub const MaxPublishers: u32 = 1000; } +parameter_types! { + pub const PublisherDeposit: Balance = 100; +} + impl crate::broadcaster::Config for Test { type RuntimeEvent = RuntimeEvent; + type Currency = Balances; + type RuntimeHoldReason = RuntimeHoldReason; type MaxPublishItems = MaxPublishItems; type MaxKeyLength = MaxKeyLength; type MaxValueLength = MaxValueLength; type MaxStoredKeys = MaxStoredKeys; type MaxPublishers = MaxPublishers; + type PublisherDeposit = PublisherDeposit; } pub struct MockValidatorSet; diff --git a/polkadot/runtime/rococo/src/lib.rs b/polkadot/runtime/rococo/src/lib.rs index caaea5801e278..37e5f06dda9ec 100644 --- a/polkadot/runtime/rococo/src/lib.rs +++ b/polkadot/runtime/rococo/src/lib.rs @@ -1229,15 +1229,19 @@ parameter_types! { pub const MaxValueLength: u32 = 1024; pub const MaxStoredKeys: u32 = 100; pub const MaxPublishers: u32 = 1000; + pub const PublisherDeposit: Balance = 100 * UNITS; } impl polkadot_runtime_parachains::broadcaster::Config for Runtime { type RuntimeEvent = RuntimeEvent; + type Currency = Balances; + type RuntimeHoldReason = RuntimeHoldReason; type MaxPublishItems = MaxPublishItems; type MaxKeyLength = MaxKeyLength; type MaxValueLength = MaxValueLength; type MaxStoredKeys = MaxStoredKeys; type MaxPublishers = MaxPublishers; + type PublisherDeposit = PublisherDeposit; } parameter_types! { From 7389dadbc1cc7a182ff1705b2e0402c60a99e9c2 Mon Sep 17 00:00:00 2001 From: metricaez Date: Mon, 8 Dec 2025 17:06:52 -0300 Subject: [PATCH 122/128] feat: de register --- .../runtime/parachains/src/broadcaster/mod.rs | 234 ++++++++++++-- .../parachains/src/broadcaster/tests.rs | 306 +++++++++++++++--- 2 files changed, 469 insertions(+), 71 deletions(-) diff --git a/polkadot/runtime/parachains/src/broadcaster/mod.rs b/polkadot/runtime/parachains/src/broadcaster/mod.rs index 5765942923b3f..11625e1a3fb96 100644 --- a/polkadot/runtime/parachains/src/broadcaster/mod.rs +++ b/polkadot/runtime/parachains/src/broadcaster/mod.rs @@ -37,11 +37,15 @@ //! //! ## Storage Lifecycle //! -//! Note: This pallet does not currently implement publisher removal or cleanup mechanisms. -//! Once a parachain publishes data, it remains in storage. Publishers can update their data -//! by publishing again, but there is no explicit removal path. +//! Publishers can deregister to reclaim their deposit and remove their data: +//! +//! 1. Call `cleanup_published_data` to remove all published key-value pairs from the child trie +//! 2. Call `deregister_publisher` to release the deposit and complete deregistration +//! +//! Root can force deregistration with `force_deregister_publisher`, which removes all data +//! and releases the deposit in a single call. -use alloc::{collections::BTreeMap, vec::Vec}; +use alloc::vec::Vec; use codec::{Decode, Encode}; use frame_support::{ pallet_prelude::*, @@ -57,7 +61,6 @@ use frame_support::{ }, }; use frame_system::{ensure_root, ensure_signed, pallet_prelude::BlockNumberFor}; -use polkadot_parachain_primitives::primitives::IsSystem; use polkadot_primitives::Id as ParaId; use scale_info::TypeInfo; use sp_runtime::{traits::Zero, RuntimeDebug}; @@ -157,6 +160,8 @@ pub mod pallet { PublisherRegistered { para_id: ParaId, manager: T::AccountId }, /// A publisher has been deregistered. PublisherDeregistered { para_id: ParaId }, + /// Published data has been cleaned up. + DataCleanedUp { para_id: ParaId }, } /// Registered publishers and their deposit information. @@ -227,6 +232,12 @@ pub mod pallet { AlreadyRegistered, /// Cannot publish without being registered first. PublishNotAuthorized, + /// Caller is not authorized to perform this action. + NotAuthorized, + /// Cannot deregister while published data exists. Call cleanup_published_data first. + MustCleanupDataFirst, + /// No published data to cleanup. + NoDataToCleanup, } #[pallet::hooks] @@ -249,16 +260,20 @@ pub mod pallet { #[pallet::call] impl Pallet { - /// Register a parachain as a publisher. + /// Register a parachain as a publisher with the calling account as manager. + /// + /// Requires `PublisherDeposit` to be held from the caller's account. /// - /// The calling account will be set as the manager and must hold a deposit. - /// The deposit is held using the `PublisherDeposit` hold reason until the publisher is - /// deregistered. + /// Parameters: + /// - `origin`: Signed origin that will become the publisher manager and pay the deposit. + /// - `para_id`: The parachain to register as a publisher. /// - /// - `origin`: Must be `Signed`. - /// - `para_id`: The parachain ID to register as a publisher. + /// Errors: + /// - `AlreadyRegistered` + /// - `InsufficientBalance` (from Currency trait) /// - /// Emits `PublisherRegistered` on success. + /// Events: + /// - `PublisherRegistered` #[pallet::call_index(0)] #[pallet::weight(T::DbWeight::get().reads_writes(2, 1))] pub fn register_publisher( @@ -269,20 +284,22 @@ pub mod pallet { Self::do_register_publisher(who, para_id, T::PublisherDeposit::get()) } - /// Force register a parachain as a publisher. + /// Register a parachain as a publisher with a custom deposit amount. /// - /// This function must be called by a Root origin. + /// Allows Root to register system parachains with zero or reduced deposits. /// - /// Allows registration of any `ParaId`, including system parachains, with a custom deposit - /// amount. This is typically used for system chains which can be registered with zero - /// deposit. + /// Parameters: + /// - `origin`: Root origin. + /// - `manager`: Account that will manage the publisher. + /// - `deposit`: Custom deposit amount to hold (typically zero for system parachains). + /// - `para_id`: The parachain to register as a publisher. /// - /// - `origin`: Must be `Root`. - /// - `manager`: The account that will manage this publisher. - /// - `deposit`: The deposit amount to hold (can be zero for system chains). - /// - `para_id`: The parachain ID to register as a publisher. + /// Errors: + /// - `AlreadyRegistered` + /// - `InsufficientBalance` (from Currency trait if deposit is non-zero) /// - /// Emits `PublisherRegistered` on success. + /// Events: + /// - `PublisherRegistered` #[pallet::call_index(1)] #[pallet::weight(T::DbWeight::get().reads_writes(2, 1))] pub fn force_register_publisher( @@ -294,6 +311,121 @@ pub mod pallet { ensure_root(origin)?; Self::do_register_publisher(manager, para_id, deposit) } + + /// Remove all published data for a parachain. + /// + /// Must be called before `deregister_publisher`. Only callable by the publisher manager. + /// + /// Parameters: + /// - `origin`: Signed origin, must be the publisher manager. + /// - `para_id`: The parachain to clean up. + /// + /// Errors: + /// - `NotRegistered` + /// - `NotAuthorized` + /// - `NoDataToCleanup` + /// + /// Events: + /// - `DataCleanedUp` + #[pallet::call_index(2)] + #[pallet::weight( + T::DbWeight::get().reads(2) + .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(Weight::from_parts(567_000, 0).saturating_mul(T::MaxStoredKeys::get().into())) + )] + pub fn cleanup_published_data( + origin: OriginFor, + para_id: ParaId, + ) -> DispatchResult { + let who = ensure_signed(origin)?; + + let info = RegisteredPublishers::::get(para_id) + .ok_or(Error::::NotRegistered)?; + + ensure!(who == info.manager, Error::::NotAuthorized); + ensure!(PublisherExists::::get(para_id), Error::::NoDataToCleanup); + + Self::do_cleanup_publisher(para_id)?; + + Self::deposit_event(Event::DataCleanedUp { para_id }); + Ok(()) + } + + /// Deregister a publisher and release their deposit. + /// + /// All published data must be cleaned up first via `cleanup_published_data`. + /// + /// Parameters: + /// - `origin`: Signed origin, must be the publisher manager. + /// - `para_id`: The parachain to deregister. + /// + /// Errors: + /// - `NotRegistered` + /// - `NotAuthorized` + /// - `MustCleanupDataFirst` + /// + /// Events: + /// - `PublisherDeregistered` + #[pallet::call_index(3)] + #[pallet::weight(T::DbWeight::get().reads_writes(2, 2))] + pub fn deregister_publisher( + origin: OriginFor, + para_id: ParaId, + ) -> DispatchResult { + let who = ensure_signed(origin)?; + + let info = RegisteredPublishers::::get(para_id) + .ok_or(Error::::NotRegistered)?; + + ensure!(who == info.manager, Error::::NotAuthorized); + ensure!(!PublisherExists::::get(para_id), Error::::MustCleanupDataFirst); + + Self::do_deregister(para_id, info)?; + + Self::deposit_event(Event::PublisherDeregistered { para_id }); + Ok(()) + } + + /// Force deregister a publisher, cleaning up data if necessary. + /// + /// Combines cleanup and deregistration in a single call. Only callable by Root. + /// + /// Parameters: + /// - `origin`: Root origin. + /// - `para_id`: The parachain to force deregister. + /// + /// Errors: + /// - `NotRegistered` + /// + /// Events: + /// - `DataCleanedUp` (if data existed) + /// - `PublisherDeregistered` + #[pallet::call_index(4)] + #[pallet::weight( + T::DbWeight::get().reads(2) + .saturating_add(T::DbWeight::get().writes(5)) + .saturating_add(Weight::from_parts(567_000, 0).saturating_mul(T::MaxStoredKeys::get().into())) + )] + pub fn force_deregister_publisher( + origin: OriginFor, + para_id: ParaId, + ) -> DispatchResult { + ensure_root(origin)?; + + let info = RegisteredPublishers::::get(para_id) + .ok_or(Error::::NotRegistered)?; + + // Clean up data if it exists + if PublisherExists::::get(para_id) { + Self::do_cleanup_publisher(para_id)?; + Self::deposit_event(Event::DataCleanedUp { para_id }); + } + + Self::do_deregister(para_id, info)?; + + Self::deposit_event(Event::PublisherDeregistered { para_id }); + Ok(()) + } } impl Pallet { @@ -326,6 +458,49 @@ pub mod pallet { Ok(()) } + fn do_cleanup_publisher(para_id: ParaId) -> DispatchResult { + let child_info = Self::derive_child_info(para_id); + let published_keys = PublishedKeys::::get(para_id); + + // Remove all key-value pairs from the child trie + for bounded_key in published_keys.iter() { + let key: Vec = bounded_key.clone().into(); + frame_support::storage::child::kill(&child_info, &key); + } + + // Clean up tracking storage + PublishedKeys::::remove(para_id); + PublishedDataRoots::::remove(para_id); + PublisherExists::::remove(para_id); + + Ok(()) + } + + fn do_deregister( + para_id: ParaId, + info: PublisherInfo>, + ) -> DispatchResult { + // Release deposit if non-zero + if !info.deposit.is_zero() { + let released = ::Currency::release( + &HoldReason::PublisherDeposit.into(), + &info.manager, + info.deposit, + Exact, + )?; + + defensive_assert!( + released == info.deposit, + "deposit should be fully released" + ); + } + + // Remove registration + RegisteredPublishers::::remove(para_id); + + Ok(()) + } + /// Processes a publish operation from a parachain. /// /// Validates the publisher is registered, checks all bounds, and stores the provided @@ -361,14 +536,12 @@ pub mod pallet { ); } - // All validation passed, now get or create child trie info for this publisher + // Get or create child trie. This checks MaxPublishers limit on first publish. let child_info = Self::get_or_create_publisher_child_info(origin_para_id)?; - // Get current published keys set for tracking let mut published_keys = PublishedKeys::::get(origin_para_id); - // Check if adding new keys would exceed MaxStoredKeys limit - // Count how many unique new keys we're adding + // Count new unique keys to prevent exceeding MaxStoredKeys let mut new_keys_count = 0u32; for (key, _) in &data { if let Ok(bounded_key) = BoundedVec::try_from(key.clone()) { @@ -378,32 +551,27 @@ pub mod pallet { } } - // Ensure we won't exceed the total stored keys limit let current_keys_count = published_keys.len() as u32; ensure!( current_keys_count.saturating_add(new_keys_count) <= T::MaxStoredKeys::get(), Error::::TooManyStoredKeys ); - // Store each key-value pair in the child trie and track the key + // Write to child trie and track keys for enumeration for (key, value) in data { frame_support::storage::child::put(&child_info, &key, &value); - // Track the key for enumeration (convert to BoundedVec) if let Ok(bounded_key) = BoundedVec::try_from(key) { - // This should never fail now since we checked the limit above published_keys.try_insert(bounded_key).defensive_ok(); } } - // Update the published keys storage PublishedKeys::::insert(origin_para_id, published_keys); - // Calculate and update the child trie root for this publisher + // Update child trie root for storage proof verification let child_root = frame_support::storage::child::root(&child_info, sp_runtime::StateVersion::V1); - // Store the root in the map (fixed 32-byte array) let root_array: [u8; 32] = child_root.try_into() .defensive_unwrap_or([0u8; 32]); PublishedDataRoots::::insert(origin_para_id, root_array); diff --git a/polkadot/runtime/parachains/src/broadcaster/tests.rs b/polkadot/runtime/parachains/src/broadcaster/tests.rs index 3237f79f8e626..19ab7d90b664d 100644 --- a/polkadot/runtime/parachains/src/broadcaster/tests.rs +++ b/polkadot/runtime/parachains/src/broadcaster/tests.rs @@ -25,34 +25,27 @@ use polkadot_primitives::Id as ParaId; const ALICE: u64 = 1; const BOB: u64 = 2; -// Helper function to set up an account with balance fn setup_account(who: u64, balance: u128) { let _ = Balances::mint_into(&who, balance); } -// Helper function to register a publisher for testing fn register_test_publisher(para_id: ParaId) { setup_account(ALICE, 10000); assert_ok!(Broadcaster::register_publisher(RuntimeOrigin::signed(ALICE), para_id)); } -// ========== Registration Tests ========== - #[test] fn register_publisher_works() { new_test_ext(Default::default()).execute_with(|| { let para_id = ParaId::from(2000); setup_account(ALICE, 1000); - // Register publisher assert_ok!(Broadcaster::register_publisher(RuntimeOrigin::signed(ALICE), para_id)); - // Verify registration let info = RegisteredPublishers::::get(para_id).unwrap(); assert_eq!(info.manager, ALICE); assert_eq!(info.deposit, 100); - // Verify deposit is held assert_eq!(Balances::balance_on_hold(&HoldReason::PublisherDeposit.into(), &ALICE), 100); assert_eq!(Balances::balance(&ALICE), 900); }); @@ -64,7 +57,6 @@ fn force_register_system_chain_works() { let para_id = ParaId::from(1000); // System chain setup_account(ALICE, 1000); - // Force register with zero deposit assert_ok!(Broadcaster::force_register_publisher( RuntimeOrigin::root(), ALICE, @@ -72,12 +64,10 @@ fn force_register_system_chain_works() { para_id )); - // Verify registration let info = RegisteredPublishers::::get(para_id).unwrap(); assert_eq!(info.manager, ALICE); assert_eq!(info.deposit, 0); - // Verify no deposit held assert_eq!(Balances::balance_on_hold(&HoldReason::PublisherDeposit.into(), &ALICE), 0); assert_eq!(Balances::balance(&ALICE), 1000); }); @@ -89,7 +79,6 @@ fn force_register_with_custom_deposit_works() { let para_id = ParaId::from(2000); setup_account(BOB, 1000); - // Force register with custom deposit assert_ok!(Broadcaster::force_register_publisher( RuntimeOrigin::root(), BOB, @@ -97,12 +86,10 @@ fn force_register_with_custom_deposit_works() { para_id )); - // Verify registration let info = RegisteredPublishers::::get(para_id).unwrap(); assert_eq!(info.manager, BOB); assert_eq!(info.deposit, 500); - // Verify custom deposit held assert_eq!(Balances::balance_on_hold(&HoldReason::PublisherDeposit.into(), &BOB), 500); assert_eq!(Balances::balance(&BOB), 500); }); @@ -115,22 +102,18 @@ fn cannot_register_twice() { setup_account(ALICE, 1000); setup_account(BOB, 1000); - // First registration succeeds assert_ok!(Broadcaster::register_publisher(RuntimeOrigin::signed(ALICE), para_id)); - // Second registration by same account fails assert_err!( Broadcaster::register_publisher(RuntimeOrigin::signed(ALICE), para_id), Error::::AlreadyRegistered ); - // Second registration by different account also fails assert_err!( Broadcaster::register_publisher(RuntimeOrigin::signed(BOB), para_id), Error::::AlreadyRegistered ); - // Only one deposit held assert_eq!(Balances::balance_on_hold(&HoldReason::PublisherDeposit.into(), &ALICE), 100); assert_eq!(Balances::balance_on_hold(&HoldReason::PublisherDeposit.into(), &BOB), 0); }); @@ -142,13 +125,11 @@ fn force_register_requires_root() { let para_id = ParaId::from(1000); setup_account(ALICE, 1000); - // Non-root origin fails assert_err!( Broadcaster::force_register_publisher(RuntimeOrigin::signed(ALICE), ALICE, 0, para_id), sp_runtime::DispatchError::BadOrigin ); - // Para not registered assert!(!RegisteredPublishers::::contains_key(para_id)); }); } @@ -159,11 +140,9 @@ fn register_publisher_requires_sufficient_balance() { let para_id = ParaId::from(2000); setup_account(ALICE, 50); // Less than required deposit - // Registration fails due to insufficient funds let result = Broadcaster::register_publisher(RuntimeOrigin::signed(ALICE), para_id); assert!(result.is_err()); - // Para not registered assert!(!RegisteredPublishers::::contains_key(para_id)); }); } @@ -174,13 +153,11 @@ fn publish_requires_registration() { let para_id = ParaId::from(2000); let data = vec![(b"key".to_vec(), b"value".to_vec())]; - // Publish without registration fails assert_err!( Broadcaster::handle_publish(para_id, data), Error::::PublishNotAuthorized ); - // No data stored assert!(!PublisherExists::::get(para_id)); }); } @@ -191,64 +168,49 @@ fn registered_publisher_can_publish() { let para_id = ParaId::from(2000); setup_account(ALICE, 1000); - // Register first assert_ok!(Broadcaster::register_publisher(RuntimeOrigin::signed(ALICE), para_id)); - // Now publish works let data = vec![(b"key".to_vec(), b"value".to_vec())]; assert_ok!(Broadcaster::handle_publish(para_id, data)); - // Verify data stored assert_eq!(Broadcaster::get_published_value(para_id, b"key"), Some(b"value".to_vec())); }); } -// ========== Existing Tests (updated to register first) ========== - #[test] fn publish_store_retrieve_and_update_data() { new_test_ext(Default::default()).execute_with(|| { let para_id = ParaId::from(2000); setup_account(ALICE, 1000); - // Register publisher first assert_ok!(Broadcaster::register_publisher(RuntimeOrigin::signed(ALICE), para_id)); - // Initial state: publisher doesn't exist, no child root assert!(!PublisherExists::::get(para_id)); assert!(Broadcaster::get_publisher_child_root(para_id).is_none()); - // Publish initial data let initial_data = vec![(b"key1".to_vec(), b"value1".to_vec()), (b"key2".to_vec(), b"value2".to_vec())]; Broadcaster::handle_publish(para_id, initial_data.clone()).unwrap(); - // Verify publisher exists and has a child root assert!(PublisherExists::::get(para_id)); let root_after_initial = Broadcaster::get_publisher_child_root(para_id); assert!(root_after_initial.is_some()); assert!(!root_after_initial.as_ref().unwrap().is_empty()); - // Verify the actual stored data matches what was published assert_eq!(Broadcaster::get_published_value(para_id, b"key1"), Some(b"value1".to_vec())); assert_eq!(Broadcaster::get_published_value(para_id, b"key2"), Some(b"value2".to_vec())); - - // Non-existent key should return None assert_eq!(Broadcaster::get_published_value(para_id, b"key3"), None); - // Update existing key and add new key let update_data = vec![ (b"key1".to_vec(), b"updated_value1".to_vec()), (b"key3".to_vec(), b"value3".to_vec()), ]; Broadcaster::handle_publish(para_id, update_data).unwrap(); - // Verify child root changed after update let root_after_update = Broadcaster::get_publisher_child_root(para_id); assert!(root_after_update.is_some()); assert_ne!(root_after_initial.unwrap(), root_after_update.unwrap()); - // Verify the data was correctly updated assert_eq!( Broadcaster::get_published_value(para_id, b"key1"), Some(b"updated_value1".to_vec()) @@ -483,3 +445,271 @@ fn max_publishers_limit_enforced() { ); }); } + +#[test] +fn cleanup_published_data_works() { + new_test_ext(Default::default()).execute_with(|| { + let para_id = ParaId::from(2000); + setup_account(ALICE, 10000); + + assert_ok!(Broadcaster::register_publisher(RuntimeOrigin::signed(ALICE), para_id)); + let data = vec![ + (b"key1".to_vec(), b"value1".to_vec()), + (b"key2".to_vec(), b"value2".to_vec()), + ]; + assert_ok!(Broadcaster::handle_publish(para_id, data)); + + assert!(PublisherExists::::get(para_id)); + assert_eq!(PublishedKeys::::get(para_id).len(), 2); + assert!(PublishedDataRoots::::get(para_id).is_some()); + + assert_ok!(Broadcaster::cleanup_published_data(RuntimeOrigin::signed(ALICE), para_id)); + + assert!(!PublisherExists::::get(para_id)); + assert_eq!(PublishedKeys::::get(para_id).len(), 0); + assert!(PublishedDataRoots::::get(para_id).is_none()); + assert_eq!(Broadcaster::get_published_value(para_id, b"key1"), None); + assert_eq!(Broadcaster::get_published_value(para_id, b"key2"), None); + assert!(RegisteredPublishers::::get(para_id).is_some()); + }); +} + +#[test] +fn cleanup_requires_manager() { + new_test_ext(Default::default()).execute_with(|| { + let para_id = ParaId::from(2000); + setup_account(ALICE, 10000); + setup_account(BOB, 10000); + + assert_ok!(Broadcaster::register_publisher(RuntimeOrigin::signed(ALICE), para_id)); + assert_ok!(Broadcaster::handle_publish(para_id, vec![(b"key".to_vec(), b"value".to_vec())])); + + assert_err!( + Broadcaster::cleanup_published_data(RuntimeOrigin::signed(BOB), para_id), + Error::::NotAuthorized + ); + + assert!(PublisherExists::::get(para_id)); + }); +} + +#[test] +fn cleanup_fails_if_no_data() { + new_test_ext(Default::default()).execute_with(|| { + let para_id = ParaId::from(2000); + setup_account(ALICE, 10000); + + assert_ok!(Broadcaster::register_publisher(RuntimeOrigin::signed(ALICE), para_id)); + + assert_err!( + Broadcaster::cleanup_published_data(RuntimeOrigin::signed(ALICE), para_id), + Error::::NoDataToCleanup + ); + }); +} + +#[test] +fn cleanup_fails_if_not_registered() { + new_test_ext(Default::default()).execute_with(|| { + let para_id = ParaId::from(2000); + setup_account(ALICE, 10000); + + assert_err!( + Broadcaster::cleanup_published_data(RuntimeOrigin::signed(ALICE), para_id), + Error::::NotRegistered + ); + }); +} + +#[test] +fn deregister_publisher_works() { + new_test_ext(Default::default()).execute_with(|| { + let para_id = ParaId::from(2000); + setup_account(ALICE, 10000); + + assert_ok!(Broadcaster::register_publisher(RuntimeOrigin::signed(ALICE), para_id)); + + assert_eq!(Balances::balance_on_hold(&HoldReason::PublisherDeposit.into(), &ALICE), 100); + assert_eq!(Balances::balance(&ALICE), 9900); + + assert_ok!(Broadcaster::deregister_publisher(RuntimeOrigin::signed(ALICE), para_id)); + + assert_eq!(Balances::balance_on_hold(&HoldReason::PublisherDeposit.into(), &ALICE), 0); + assert_eq!(Balances::balance(&ALICE), 10000); + assert!(!RegisteredPublishers::::contains_key(para_id)); + }); +} + +#[test] +fn deregister_fails_if_data_exists() { + new_test_ext(Default::default()).execute_with(|| { + let para_id = ParaId::from(2000); + setup_account(ALICE, 10000); + + assert_ok!(Broadcaster::register_publisher(RuntimeOrigin::signed(ALICE), para_id)); + assert_ok!(Broadcaster::handle_publish(para_id, vec![(b"key".to_vec(), b"value".to_vec())])); + + assert_err!( + Broadcaster::deregister_publisher(RuntimeOrigin::signed(ALICE), para_id), + Error::::MustCleanupDataFirst + ); + + assert_eq!(Balances::balance_on_hold(&HoldReason::PublisherDeposit.into(), &ALICE), 100); + }); +} + +#[test] +fn deregister_requires_manager() { + new_test_ext(Default::default()).execute_with(|| { + let para_id = ParaId::from(2000); + setup_account(ALICE, 10000); + setup_account(BOB, 10000); + + assert_ok!(Broadcaster::register_publisher(RuntimeOrigin::signed(ALICE), para_id)); + + assert_err!( + Broadcaster::deregister_publisher(RuntimeOrigin::signed(BOB), para_id), + Error::::NotAuthorized + ); + }); +} + +#[test] +fn two_phase_cleanup_and_deregister_works() { + new_test_ext(Default::default()).execute_with(|| { + let para_id = ParaId::from(2000); + setup_account(ALICE, 10000); + + assert_ok!(Broadcaster::register_publisher(RuntimeOrigin::signed(ALICE), para_id)); + let data = vec![ + (b"key1".to_vec(), b"value1".to_vec()), + (b"key2".to_vec(), b"value2".to_vec()), + (b"key3".to_vec(), b"value3".to_vec()), + ]; + assert_ok!(Broadcaster::handle_publish(para_id, data)); + + // Phase 1: Cleanup data + assert_ok!(Broadcaster::cleanup_published_data(RuntimeOrigin::signed(ALICE), para_id)); + assert!(!PublisherExists::::get(para_id)); + assert_eq!(Balances::balance_on_hold(&HoldReason::PublisherDeposit.into(), &ALICE), 100); + + // Phase 2: Deregister + assert_ok!(Broadcaster::deregister_publisher(RuntimeOrigin::signed(ALICE), para_id)); + assert!(!RegisteredPublishers::::contains_key(para_id)); + assert_eq!(Balances::balance_on_hold(&HoldReason::PublisherDeposit.into(), &ALICE), 0); + assert_eq!(Balances::balance(&ALICE), 10000); + }); +} + +#[test] +fn force_deregister_works() { + new_test_ext(Default::default()).execute_with(|| { + let para_id = ParaId::from(2000); + setup_account(ALICE, 10000); + + assert_ok!(Broadcaster::register_publisher(RuntimeOrigin::signed(ALICE), para_id)); + let data = vec![ + (b"key1".to_vec(), b"value1".to_vec()), + (b"key2".to_vec(), b"value2".to_vec()), + ]; + assert_ok!(Broadcaster::handle_publish(para_id, data)); + + assert_ok!(Broadcaster::force_deregister_publisher(RuntimeOrigin::root(), para_id)); + + assert!(!PublisherExists::::get(para_id)); + assert!(!RegisteredPublishers::::contains_key(para_id)); + assert_eq!(PublishedKeys::::get(para_id).len(), 0); + assert!(PublishedDataRoots::::get(para_id).is_none()); + assert_eq!(Balances::balance_on_hold(&HoldReason::PublisherDeposit.into(), &ALICE), 0); + assert_eq!(Balances::balance(&ALICE), 10000); + }); +} + +#[test] +fn force_deregister_works_without_data() { + new_test_ext(Default::default()).execute_with(|| { + let para_id = ParaId::from(2000); + setup_account(ALICE, 10000); + + assert_ok!(Broadcaster::register_publisher(RuntimeOrigin::signed(ALICE), para_id)); + + assert_ok!(Broadcaster::force_deregister_publisher(RuntimeOrigin::root(), para_id)); + + assert!(!RegisteredPublishers::::contains_key(para_id)); + assert_eq!(Balances::balance(&ALICE), 10000); + }); +} + +#[test] +fn force_deregister_requires_root() { + new_test_ext(Default::default()).execute_with(|| { + let para_id = ParaId::from(2000); + setup_account(ALICE, 10000); + + assert_ok!(Broadcaster::register_publisher(RuntimeOrigin::signed(ALICE), para_id)); + assert_ok!(Broadcaster::handle_publish(para_id, vec![(b"key".to_vec(), b"value".to_vec())])); + + assert_err!( + Broadcaster::force_deregister_publisher(RuntimeOrigin::signed(ALICE), para_id), + sp_runtime::DispatchError::BadOrigin + ); + + assert!(PublisherExists::::get(para_id)); + assert!(RegisteredPublishers::::contains_key(para_id)); + }); +} + +#[test] +fn cleanup_removes_all_keys_from_child_trie() { + new_test_ext(Default::default()).execute_with(|| { + let para_id = ParaId::from(2000); + setup_account(ALICE, 10000); + + assert_ok!(Broadcaster::register_publisher(RuntimeOrigin::signed(ALICE), para_id)); + + // Publish multiple batches to fill up keys + for batch in 0..5 { + let mut data = Vec::new(); + for i in 0..10 { + let key = format!("key_{}_{}", batch, i); + data.push((key.as_bytes().to_vec(), b"value".to_vec())); + } + assert_ok!(Broadcaster::handle_publish(para_id, data)); + } + + assert_eq!(PublishedKeys::::get(para_id).len(), 50); + + assert_ok!(Broadcaster::cleanup_published_data(RuntimeOrigin::signed(ALICE), para_id)); + + for batch in 0..5 { + for i in 0..10 { + let key = format!("key_{}_{}", batch, i); + assert_eq!(Broadcaster::get_published_value(para_id, key.as_bytes()), None); + } + } + + assert_eq!(PublishedKeys::::get(para_id).len(), 0); + }); +} + +#[test] +fn force_deregister_with_zero_deposit() { + new_test_ext(Default::default()).execute_with(|| { + let para_id = ParaId::from(1000); // System chain + setup_account(ALICE, 10000); + + assert_ok!(Broadcaster::force_register_publisher( + RuntimeOrigin::root(), + ALICE, + 0, + para_id + )); + + assert_ok!(Broadcaster::handle_publish(para_id, vec![(b"key".to_vec(), b"value".to_vec())])); + + assert_ok!(Broadcaster::force_deregister_publisher(RuntimeOrigin::root(), para_id)); + + assert!(!RegisteredPublishers::::contains_key(para_id)); + assert_eq!(Balances::balance(&ALICE), 10000); // No deposit change + }); +} From 68bbc4367400a98c106c177a0d15bde222693dd1 Mon Sep 17 00:00:00 2001 From: metricaez Date: Mon, 8 Dec 2025 18:30:38 -0300 Subject: [PATCH 123/128] feat: first cleanup intializer appraoch --- .../runtime/parachains/src/broadcaster/mod.rs | 26 +++++++++++++++++++ .../runtime/parachains/src/initializer.rs | 3 +++ 2 files changed, 29 insertions(+) diff --git a/polkadot/runtime/parachains/src/broadcaster/mod.rs b/polkadot/runtime/parachains/src/broadcaster/mod.rs index 11625e1a3fb96..50bcdfc18b9cf 100644 --- a/polkadot/runtime/parachains/src/broadcaster/mod.rs +++ b/polkadot/runtime/parachains/src/broadcaster/mod.rs @@ -501,6 +501,32 @@ pub mod pallet { Ok(()) } + /// Called by the initializer to note that a new session has started. + pub(crate) fn initializer_on_new_session( + _notification: &crate::initializer::SessionChangeNotification>, + outgoing_paras: &[ParaId], + ) { + Self::cleanup_outgoing_publishers(outgoing_paras); + } + + /// Remove all storage for offboarded parachains. + fn cleanup_outgoing_publishers(outgoing: &[ParaId]) { + for outgoing_para in outgoing { + Self::cleanup_outgoing_publisher(outgoing_para); + } + } + + /// Remove all relevant storage items for an outgoing parachain. + fn cleanup_outgoing_publisher(outgoing_para: &ParaId) { + if let Some(info) = RegisteredPublishers::::get(outgoing_para) { + if PublisherExists::::get(outgoing_para) { + let _ = Self::do_cleanup_publisher(*outgoing_para); + } + + let _ = Self::do_deregister(*outgoing_para, info); + } + } + /// Processes a publish operation from a parachain. /// /// Validates the publisher is registered, checks all bounds, and stores the provided diff --git a/polkadot/runtime/parachains/src/initializer.rs b/polkadot/runtime/parachains/src/initializer.rs index 6ee245fb5230c..b72ccb93a47b2 100644 --- a/polkadot/runtime/parachains/src/initializer.rs +++ b/polkadot/runtime/parachains/src/initializer.rs @@ -21,6 +21,7 @@ //! initialization. use crate::{ + broadcaster, configuration::{self, HostConfiguration}, disputes::{self, DisputesHandler as _, SlashingHandler as _}, dmp, hrmp, inclusion, paras, scheduler, session_info, shared, @@ -125,6 +126,7 @@ pub mod pallet { + disputes::Config + dmp::Config + hrmp::Config + + broadcaster::Config { /// A randomness beacon. type Randomness: Randomness>; @@ -282,6 +284,7 @@ impl Pallet { T::SlashingHandler::initializer_on_new_session(session_index); dmp::Pallet::::initializer_on_new_session(¬ification, &outgoing_paras); hrmp::Pallet::::initializer_on_new_session(¬ification, &outgoing_paras); + broadcaster::Pallet::::initializer_on_new_session(¬ification, &outgoing_paras); T::CoretimeOnNewSession::on_new_session(¬ification); } From e967a6503f015d02c966d2bcb1c5dad3b09ba928 Mon Sep 17 00:00:00 2001 From: metricaez Date: Mon, 8 Dec 2025 18:52:29 -0300 Subject: [PATCH 124/128] feat: outgoing weight ack and tests --- .../runtime/parachains/src/broadcaster/mod.rs | 33 +++++++++++---- .../parachains/src/broadcaster/tests.rs | 34 +++++++++++++++ .../parachains/src/broadcaster/weights.rs | 41 +++++++++++++++++++ polkadot/runtime/parachains/src/mock.rs | 1 + 4 files changed, 102 insertions(+), 7 deletions(-) create mode 100644 polkadot/runtime/parachains/src/broadcaster/weights.rs diff --git a/polkadot/runtime/parachains/src/broadcaster/mod.rs b/polkadot/runtime/parachains/src/broadcaster/mod.rs index 50bcdfc18b9cf..394a59d4e7555 100644 --- a/polkadot/runtime/parachains/src/broadcaster/mod.rs +++ b/polkadot/runtime/parachains/src/broadcaster/mod.rs @@ -70,6 +70,9 @@ pub use pallet::*; mod traits; pub use traits::Publish; +pub mod weights; +pub use weights::WeightInfo; + #[cfg(test)] mod tests; @@ -118,6 +121,9 @@ pub mod pallet { /// Overarching hold reason. type RuntimeHoldReason: From; + /// Weight information for extrinsics and operations. + type WeightInfo: WeightInfo; + /// Maximum number of items that can be published in a single operation. /// /// Must not exceed `xcm::v5::MaxPublishItems`. @@ -505,26 +511,39 @@ pub mod pallet { pub(crate) fn initializer_on_new_session( _notification: &crate::initializer::SessionChangeNotification>, outgoing_paras: &[ParaId], - ) { - Self::cleanup_outgoing_publishers(outgoing_paras); + ) -> Weight { + Self::cleanup_outgoing_publishers(outgoing_paras) } /// Remove all storage for offboarded parachains. - fn cleanup_outgoing_publishers(outgoing: &[ParaId]) { + fn cleanup_outgoing_publishers(outgoing: &[ParaId]) -> Weight { + let mut total_weight = Weight::zero(); for outgoing_para in outgoing { - Self::cleanup_outgoing_publisher(outgoing_para); + total_weight = total_weight.saturating_add(Self::cleanup_outgoing_publisher(outgoing_para)); } + total_weight } /// Remove all relevant storage items for an outgoing parachain. - fn cleanup_outgoing_publisher(outgoing_para: &ParaId) { + fn cleanup_outgoing_publisher(outgoing_para: &ParaId) -> Weight { if let Some(info) = RegisteredPublishers::::get(outgoing_para) { - if PublisherExists::::get(outgoing_para) { + let weight = if PublisherExists::::get(outgoing_para) { + let published_keys = PublishedKeys::::get(outgoing_para); + let key_count = published_keys.len() as u32; let _ = Self::do_cleanup_publisher(*outgoing_para); - } + T::WeightInfo::do_cleanup_publisher(key_count) + } else { + Weight::zero() + }; let _ = Self::do_deregister(*outgoing_para, info); + + // Account for reads (RegisteredPublishers, PublisherExists) and writes (deregister) + return weight + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)); } + T::DbWeight::get().reads(1) // Just the RegisteredPublishers read } /// Processes a publish operation from a parachain. diff --git a/polkadot/runtime/parachains/src/broadcaster/tests.rs b/polkadot/runtime/parachains/src/broadcaster/tests.rs index 19ab7d90b664d..c49b2498ea29c 100644 --- a/polkadot/runtime/parachains/src/broadcaster/tests.rs +++ b/polkadot/runtime/parachains/src/broadcaster/tests.rs @@ -713,3 +713,37 @@ fn force_deregister_with_zero_deposit() { assert_eq!(Balances::balance(&ALICE), 10000); // No deposit change }); } + +#[test] +fn cleanup_outgoing_publishers_works() { + new_test_ext(Default::default()).execute_with(|| { + let para_a = ParaId::from(2000); + let para_b = ParaId::from(2001); + let para_c = ParaId::from(2002); + + setup_account(ALICE, 10000); + + // Register and publish data for A, B, C + assert_ok!(Broadcaster::register_publisher(RuntimeOrigin::signed(ALICE), para_a)); + assert_ok!(Broadcaster::register_publisher(RuntimeOrigin::signed(ALICE), para_b)); + assert_ok!(Broadcaster::register_publisher(RuntimeOrigin::signed(ALICE), para_c)); + + assert_ok!(Broadcaster::handle_publish(para_a, vec![(b"key1".to_vec(), b"value1".to_vec())])); + assert_ok!(Broadcaster::handle_publish(para_b, vec![(b"key2".to_vec(), b"value2".to_vec())])); + assert_ok!(Broadcaster::handle_publish(para_c, vec![(b"key3".to_vec(), b"value3".to_vec())])); + + let notification = crate::initializer::SessionChangeNotification::default(); + let outgoing_paras = vec![para_a, para_b]; + Broadcaster::initializer_on_new_session(¬ification, &outgoing_paras); + + // A and B cleaned up + assert!(!RegisteredPublishers::::contains_key(para_a)); + assert!(!RegisteredPublishers::::contains_key(para_b)); + assert!(!PublisherExists::::get(para_a)); + assert!(!PublisherExists::::get(para_b)); + + // C unaffected + assert!(RegisteredPublishers::::contains_key(para_c)); + assert!(PublisherExists::::get(para_c)); + }); +} diff --git a/polkadot/runtime/parachains/src/broadcaster/weights.rs b/polkadot/runtime/parachains/src/broadcaster/weights.rs new file mode 100644 index 0000000000000..efdf48bbaf851 --- /dev/null +++ b/polkadot/runtime/parachains/src/broadcaster/weights.rs @@ -0,0 +1,41 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Polkadot. + +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . + +//! Autogenerated weights for `broadcaster` +//! +//! THIS FILE WAS NOT AUTO-GENERATED. PLACEHOLDER WEIGHTS. +//! TODO: Run benchmarks to generate actual weights. + +use frame_support::weights::Weight; + +/// Weight information for broadcaster operations. +pub trait WeightInfo { + /// Weight for cleaning up a publisher's data. + /// + /// Parameters: + /// - `k`: Number of keys to remove from child trie + fn do_cleanup_publisher(k: u32) -> Weight; +} + +/// Placeholder weights (to be replaced with benchmarked values). +impl WeightInfo for () { + fn do_cleanup_publisher(k: u32) -> Weight { + // Conservative estimate until benchmarks are run: + // Base cost + per-key cost for child trie operations + Weight::from_parts(10_000_000, 0) + .saturating_add(Weight::from_parts(5_000_000, 0).saturating_mul(k.into())) + } +} diff --git a/polkadot/runtime/parachains/src/mock.rs b/polkadot/runtime/parachains/src/mock.rs index 953e221820a15..660e0b6451458 100644 --- a/polkadot/runtime/parachains/src/mock.rs +++ b/polkadot/runtime/parachains/src/mock.rs @@ -499,6 +499,7 @@ impl crate::broadcaster::Config for Test { type RuntimeEvent = RuntimeEvent; type Currency = Balances; type RuntimeHoldReason = RuntimeHoldReason; + type WeightInfo = (); type MaxPublishItems = MaxPublishItems; type MaxKeyLength = MaxKeyLength; type MaxValueLength = MaxValueLength; From 4e8c5f2752d9af3719bf7701ea14c63958cba227 Mon Sep 17 00:00:00 2001 From: metricaez Date: Tue, 9 Dec 2025 09:17:01 -0300 Subject: [PATCH 125/128] feat: broadcaster weights and benchmarks --- .../src/broadcaster/benchmarking.rs | 161 ++++++++++++++++++ .../runtime/parachains/src/broadcaster/mod.rs | 23 +-- .../parachains/src/broadcaster/weights.rs | 38 ++++- polkadot/runtime/rococo/src/lib.rs | 43 ++--- 4 files changed, 224 insertions(+), 41 deletions(-) create mode 100644 polkadot/runtime/parachains/src/broadcaster/benchmarking.rs diff --git a/polkadot/runtime/parachains/src/broadcaster/benchmarking.rs b/polkadot/runtime/parachains/src/broadcaster/benchmarking.rs new file mode 100644 index 0000000000000..4e9d7f2b0c2f6 --- /dev/null +++ b/polkadot/runtime/parachains/src/broadcaster/benchmarking.rs @@ -0,0 +1,161 @@ +// Copyright (C) Parity Technologies (UK) Ltd. +// This file is part of Polkadot. + +// Polkadot is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Polkadot is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Polkadot. If not, see . + +#![cfg(feature = "runtime-benchmarks")] + +use super::{Pallet as Broadcaster, *}; +use frame_benchmarking::v2::*; +use frame_support::traits::fungible::{Inspect as FunInspect, Mutate}; +use polkadot_primitives::Id as ParaId; + +type BalanceOf = + <::Currency as FunInspect<::AccountId>>::Balance; + +#[benchmarks] +mod benchmarks { + use super::*; + use frame_system::RawOrigin; + + #[benchmark] + fn register_publisher() { + let caller: T::AccountId = whitelisted_caller(); + let para_id = ParaId::from(2000); + let deposit = T::PublisherDeposit::get(); + + T::Currency::set_balance(&caller, deposit * 2u32.into()); + + #[extrinsic_call] + _(RawOrigin::Signed(caller.clone()), para_id); + + assert!(RegisteredPublishers::::contains_key(para_id)); + } + + #[benchmark] + fn force_register_publisher() { + let manager: T::AccountId = whitelisted_caller(); + let para_id = ParaId::from(1000); + let deposit = BalanceOf::::from(0u32); + + #[extrinsic_call] + _(RawOrigin::Root, manager.clone(), deposit, para_id); + + assert!(RegisteredPublishers::::contains_key(para_id)); + } + + #[benchmark] + fn cleanup_published_data(k: Linear<1, { T::MaxStoredKeys::get() }>) { + let caller: T::AccountId = whitelisted_caller(); + let para_id = ParaId::from(2000); + let deposit = T::PublisherDeposit::get(); + + T::Currency::set_balance(&caller, deposit * 2u32.into()); + Broadcaster::::register_publisher(RawOrigin::Signed(caller.clone()).into(), para_id) + .unwrap(); + + // Publish k keys + let mut data = Vec::new(); + for i in 0..k { + data.push(( + format!("key_{}", i).as_bytes().to_vec(), + b"value".to_vec(), + )); + } + Broadcaster::::handle_publish(para_id, data).unwrap(); + + #[extrinsic_call] + _(RawOrigin::Signed(caller), para_id); + + assert!(!PublisherExists::::get(para_id)); + } + + #[benchmark] + fn deregister_publisher() { + let caller: T::AccountId = whitelisted_caller(); + let para_id = ParaId::from(2000); + let deposit = T::PublisherDeposit::get(); + + T::Currency::set_balance(&caller, deposit * 2u32.into()); + Broadcaster::::register_publisher(RawOrigin::Signed(caller.clone()).into(), para_id) + .unwrap(); + + #[extrinsic_call] + _(RawOrigin::Signed(caller), para_id); + + assert!(!RegisteredPublishers::::contains_key(para_id)); + } + + #[benchmark] + fn force_deregister_publisher(k: Linear<0, { T::MaxStoredKeys::get() }>) { + let manager: T::AccountId = whitelisted_caller(); + let para_id = ParaId::from(2000); + let deposit = T::PublisherDeposit::get(); + + T::Currency::set_balance(&manager, deposit * 2u32.into()); + Broadcaster::::register_publisher(RawOrigin::Signed(manager).into(), para_id) + .unwrap(); + + // Publish k keys (if k > 0) + if k > 0 { + let mut data = Vec::new(); + for i in 0..k { + data.push(( + format!("key_{}", i).as_bytes().to_vec(), + b"value".to_vec(), + )); + } + Broadcaster::::handle_publish(para_id, data).unwrap(); + } + + #[extrinsic_call] + _(RawOrigin::Root, para_id); + + assert!(!RegisteredPublishers::::contains_key(para_id)); + } + + #[benchmark] + fn do_cleanup_publisher(k: Linear<1, { T::MaxStoredKeys::get() }>) { + let caller: T::AccountId = whitelisted_caller(); + let para_id = ParaId::from(2000); + let deposit = T::PublisherDeposit::get(); + + T::Currency::set_balance(&caller, deposit * 2u32.into()); + Broadcaster::::register_publisher(RawOrigin::Signed(caller).into(), para_id) + .unwrap(); + + // Publish k keys + let mut data = Vec::new(); + for i in 0..k { + data.push(( + format!("key_{}", i).as_bytes().to_vec(), + b"value".to_vec(), + )); + } + Broadcaster::::handle_publish(para_id, data).unwrap(); + + #[block] + { + Broadcaster::::do_cleanup_publisher(para_id).unwrap(); + } + + assert!(!PublisherExists::::get(para_id)); + } + + impl_benchmark_test_suite!( + Broadcaster, + crate::mock::new_test_ext(Default::default()), + crate::mock::Test + ); +} diff --git a/polkadot/runtime/parachains/src/broadcaster/mod.rs b/polkadot/runtime/parachains/src/broadcaster/mod.rs index 394a59d4e7555..9941886aace7c 100644 --- a/polkadot/runtime/parachains/src/broadcaster/mod.rs +++ b/polkadot/runtime/parachains/src/broadcaster/mod.rs @@ -73,6 +73,9 @@ pub use traits::Publish; pub mod weights; pub use weights::WeightInfo; +#[cfg(feature = "runtime-benchmarks")] +mod benchmarking; + #[cfg(test)] mod tests; @@ -281,7 +284,7 @@ pub mod pallet { /// Events: /// - `PublisherRegistered` #[pallet::call_index(0)] - #[pallet::weight(T::DbWeight::get().reads_writes(2, 1))] + #[pallet::weight(T::WeightInfo::register_publisher())] pub fn register_publisher( origin: OriginFor, para_id: ParaId, @@ -307,7 +310,7 @@ pub mod pallet { /// Events: /// - `PublisherRegistered` #[pallet::call_index(1)] - #[pallet::weight(T::DbWeight::get().reads_writes(2, 1))] + #[pallet::weight(T::WeightInfo::force_register_publisher())] pub fn force_register_publisher( origin: OriginFor, manager: T::AccountId, @@ -334,11 +337,7 @@ pub mod pallet { /// Events: /// - `DataCleanedUp` #[pallet::call_index(2)] - #[pallet::weight( - T::DbWeight::get().reads(2) - .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(Weight::from_parts(567_000, 0).saturating_mul(T::MaxStoredKeys::get().into())) - )] + #[pallet::weight(T::WeightInfo::cleanup_published_data(T::MaxStoredKeys::get()))] pub fn cleanup_published_data( origin: OriginFor, para_id: ParaId, @@ -373,7 +372,7 @@ pub mod pallet { /// Events: /// - `PublisherDeregistered` #[pallet::call_index(3)] - #[pallet::weight(T::DbWeight::get().reads_writes(2, 2))] + #[pallet::weight(T::WeightInfo::deregister_publisher())] pub fn deregister_publisher( origin: OriginFor, para_id: ParaId, @@ -407,11 +406,7 @@ pub mod pallet { /// - `DataCleanedUp` (if data existed) /// - `PublisherDeregistered` #[pallet::call_index(4)] - #[pallet::weight( - T::DbWeight::get().reads(2) - .saturating_add(T::DbWeight::get().writes(5)) - .saturating_add(Weight::from_parts(567_000, 0).saturating_mul(T::MaxStoredKeys::get().into())) - )] + #[pallet::weight(T::WeightInfo::force_deregister_publisher(T::MaxStoredKeys::get()))] pub fn force_deregister_publisher( origin: OriginFor, para_id: ParaId, @@ -464,7 +459,7 @@ pub mod pallet { Ok(()) } - fn do_cleanup_publisher(para_id: ParaId) -> DispatchResult { + pub(crate) fn do_cleanup_publisher(para_id: ParaId) -> DispatchResult { let child_info = Self::derive_child_info(para_id); let published_keys = PublishedKeys::::get(para_id); diff --git a/polkadot/runtime/parachains/src/broadcaster/weights.rs b/polkadot/runtime/parachains/src/broadcaster/weights.rs index efdf48bbaf851..702eb678f408f 100644 --- a/polkadot/runtime/parachains/src/broadcaster/weights.rs +++ b/polkadot/runtime/parachains/src/broadcaster/weights.rs @@ -23,18 +23,44 @@ use frame_support::weights::Weight; /// Weight information for broadcaster operations. pub trait WeightInfo { - /// Weight for cleaning up a publisher's data. - /// - /// Parameters: - /// - `k`: Number of keys to remove from child trie + fn register_publisher() -> Weight; + fn force_register_publisher() -> Weight; + fn cleanup_published_data(k: u32) -> Weight; + fn deregister_publisher() -> Weight; + fn force_deregister_publisher(k: u32) -> Weight; fn do_cleanup_publisher(k: u32) -> Weight; } /// Placeholder weights (to be replaced with benchmarked values). impl WeightInfo for () { + fn register_publisher() -> Weight { + Weight::from_parts(20_000_000, 0) + .saturating_add(Weight::from_parts(0, 3000)) + } + + fn force_register_publisher() -> Weight { + Weight::from_parts(15_000_000, 0) + .saturating_add(Weight::from_parts(0, 3000)) + } + + fn cleanup_published_data(k: u32) -> Weight { + Weight::from_parts(25_000_000, 0) + .saturating_add(Weight::from_parts(5_000_000, 0).saturating_mul(k.into())) + .saturating_add(Weight::from_parts(0, 5000)) + } + + fn deregister_publisher() -> Weight { + Weight::from_parts(20_000_000, 0) + .saturating_add(Weight::from_parts(0, 3000)) + } + + fn force_deregister_publisher(k: u32) -> Weight { + Weight::from_parts(30_000_000, 0) + .saturating_add(Weight::from_parts(5_000_000, 0).saturating_mul(k.into())) + .saturating_add(Weight::from_parts(0, 5000)) + } + fn do_cleanup_publisher(k: u32) -> Weight { - // Conservative estimate until benchmarks are run: - // Base cost + per-key cost for child trie operations Weight::from_parts(10_000_000, 0) .saturating_add(Weight::from_parts(5_000_000, 0).saturating_mul(k.into())) } diff --git a/polkadot/runtime/rococo/src/lib.rs b/polkadot/runtime/rococo/src/lib.rs index 37e5f06dda9ec..1cae43ddf3d8d 100644 --- a/polkadot/runtime/rococo/src/lib.rs +++ b/polkadot/runtime/rococo/src/lib.rs @@ -1192,6 +1192,28 @@ impl parachains_on_demand::Config for Runtime { impl parachains_assigner_coretime::Config for Runtime {} +parameter_types! { + pub const MaxPublishItems: u32 = 16; + pub const MaxKeyLength: u32 = 256; + pub const MaxValueLength: u32 = 1024; + pub const MaxStoredKeys: u32 = 100; + pub const MaxPublishers: u32 = 1000; + pub const PublisherDeposit: Balance = 100 * UNITS; +} + +impl polkadot_runtime_parachains::broadcaster::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type Currency = Balances; + type RuntimeHoldReason = RuntimeHoldReason; + type WeightInfo = (); + type MaxPublishItems = MaxPublishItems; + type MaxKeyLength = MaxKeyLength; + type MaxValueLength = MaxValueLength; + type MaxStoredKeys = MaxStoredKeys; + type MaxPublishers = MaxPublishers; + type PublisherDeposit = PublisherDeposit; +} + impl parachains_initializer::Config for Runtime { type Randomness = pallet_babe::RandomnessFromOneEpochAgo; type ForceOrigin = EnsureRoot; @@ -1223,27 +1245,6 @@ impl parachains_slashing::Config for Runtime { type BenchmarkingConfig = parachains_slashing::BenchConfig<200>; } -parameter_types! { - pub const MaxPublishItems: u32 = 16; - pub const MaxKeyLength: u32 = 256; - pub const MaxValueLength: u32 = 1024; - pub const MaxStoredKeys: u32 = 100; - pub const MaxPublishers: u32 = 1000; - pub const PublisherDeposit: Balance = 100 * UNITS; -} - -impl polkadot_runtime_parachains::broadcaster::Config for Runtime { - type RuntimeEvent = RuntimeEvent; - type Currency = Balances; - type RuntimeHoldReason = RuntimeHoldReason; - type MaxPublishItems = MaxPublishItems; - type MaxKeyLength = MaxKeyLength; - type MaxValueLength = MaxValueLength; - type MaxStoredKeys = MaxStoredKeys; - type MaxPublishers = MaxPublishers; - type PublisherDeposit = PublisherDeposit; -} - parameter_types! { pub const ParaDeposit: Balance = 40 * UNITS; } From c03867dcc769b302319965d3658cdf2d99d487bf Mon Sep 17 00:00:00 2001 From: metricaez Date: Tue, 9 Dec 2025 11:37:45 -0300 Subject: [PATCH 126/128] feat: OnNewSessionOutgoing to avoid broadcaster integration in every runtime --- .../runtime/parachains/src/broadcaster/mod.rs | 10 ++++++++ .../runtime/parachains/src/initializer.rs | 24 ++++++++++++++++--- polkadot/runtime/parachains/src/mock.rs | 1 + polkadot/runtime/rococo/src/lib.rs | 1 + polkadot/runtime/test-runtime/src/lib.rs | 1 + polkadot/runtime/westend/src/lib.rs | 1 + .../staking-async/runtimes/rc/src/lib.rs | 1 + 7 files changed, 36 insertions(+), 3 deletions(-) diff --git a/polkadot/runtime/parachains/src/broadcaster/mod.rs b/polkadot/runtime/parachains/src/broadcaster/mod.rs index 9941886aace7c..e8ca37b54aade 100644 --- a/polkadot/runtime/parachains/src/broadcaster/mod.rs +++ b/polkadot/runtime/parachains/src/broadcaster/mod.rs @@ -696,4 +696,14 @@ impl Publish for Pallet { fn publish_data(publisher: ParaId, data: Vec<(Vec, Vec)>) -> DispatchResult { Self::handle_publish(publisher, data) } +} + +// Implement OnNewSessionOutgoing for cleanup of offboarded parachains +impl crate::initializer::OnNewSessionOutgoing> for Pallet { + fn on_new_session_outgoing( + notification: &crate::initializer::SessionChangeNotification>, + outgoing_paras: &[ParaId], + ) { + let _ = Self::initializer_on_new_session(notification, outgoing_paras); + } } \ No newline at end of file diff --git a/polkadot/runtime/parachains/src/initializer.rs b/polkadot/runtime/parachains/src/initializer.rs index b72ccb93a47b2..99d399f62f19c 100644 --- a/polkadot/runtime/parachains/src/initializer.rs +++ b/polkadot/runtime/parachains/src/initializer.rs @@ -21,7 +21,6 @@ //! initialization. use crate::{ - broadcaster, configuration::{self, HostConfiguration}, disputes::{self, DisputesHandler as _, SlashingHandler as _}, dmp, hrmp, inclusion, paras, scheduler, session_info, shared, @@ -71,6 +70,23 @@ impl OnNewSession for () { fn on_new_session(_: &SessionChangeNotification) {} } +/// Handler for session changes with offboarded parachains. +pub trait OnNewSessionOutgoing { + /// Called when a new session starts with parachains being offboarded. + fn on_new_session_outgoing( + notification: &SessionChangeNotification, + outgoing_paras: &[polkadot_primitives::Id], + ); +} + +impl OnNewSessionOutgoing for () { + fn on_new_session_outgoing( + _: &SessionChangeNotification, + _: &[polkadot_primitives::Id], + ) { + } +} + /// Number of validators (not only parachain) in a session. pub type ValidatorSetCount = u32; @@ -126,7 +142,6 @@ pub mod pallet { + disputes::Config + dmp::Config + hrmp::Config - + broadcaster::Config { /// A randomness beacon. type Randomness: Randomness>; @@ -136,6 +151,9 @@ pub mod pallet { /// to disable it on the ones that don't support it. Can be removed and replaced by a simple /// bound to `coretime::Config` once all chains support it. type CoretimeOnNewSession: OnNewSession>; + /// Optional handler for outgoing parachains on new session. + /// Use `()` to disable, or configure a pallet that implements `OnNewSessionOutgoing`. + type OnNewSessionOutgoing: OnNewSessionOutgoing>; /// Weight information for extrinsics in this pallet. type WeightInfo: WeightInfo; } @@ -284,7 +302,7 @@ impl Pallet { T::SlashingHandler::initializer_on_new_session(session_index); dmp::Pallet::::initializer_on_new_session(¬ification, &outgoing_paras); hrmp::Pallet::::initializer_on_new_session(¬ification, &outgoing_paras); - broadcaster::Pallet::::initializer_on_new_session(¬ification, &outgoing_paras); + T::OnNewSessionOutgoing::on_new_session_outgoing(¬ification, &outgoing_paras); T::CoretimeOnNewSession::on_new_session(¬ification); } diff --git a/polkadot/runtime/parachains/src/mock.rs b/polkadot/runtime/parachains/src/mock.rs index 660e0b6451458..c396d67b89688 100644 --- a/polkadot/runtime/parachains/src/mock.rs +++ b/polkadot/runtime/parachains/src/mock.rs @@ -193,6 +193,7 @@ impl crate::initializer::Config for Test { type ForceOrigin = frame_system::EnsureRoot; type WeightInfo = (); type CoretimeOnNewSession = Coretime; + type OnNewSessionOutgoing = (); } impl crate::configuration::Config for Test { diff --git a/polkadot/runtime/rococo/src/lib.rs b/polkadot/runtime/rococo/src/lib.rs index 1cae43ddf3d8d..4ebc0f62c3f40 100644 --- a/polkadot/runtime/rococo/src/lib.rs +++ b/polkadot/runtime/rococo/src/lib.rs @@ -1219,6 +1219,7 @@ impl parachains_initializer::Config for Runtime { type ForceOrigin = EnsureRoot; type WeightInfo = weights::polkadot_runtime_parachains_initializer::WeightInfo; type CoretimeOnNewSession = Coretime; + type OnNewSessionOutgoing = Broadcaster; } impl parachains_disputes::Config for Runtime { diff --git a/polkadot/runtime/test-runtime/src/lib.rs b/polkadot/runtime/test-runtime/src/lib.rs index c3071c48985fc..64e795a3912c6 100644 --- a/polkadot/runtime/test-runtime/src/lib.rs +++ b/polkadot/runtime/test-runtime/src/lib.rs @@ -593,6 +593,7 @@ impl parachains_initializer::Config for Runtime { type ForceOrigin = frame_system::EnsureRoot; type WeightInfo = (); type CoretimeOnNewSession = Coretime; + type OnNewSessionOutgoing = (); } impl parachains_session_info::Config for Runtime { diff --git a/polkadot/runtime/westend/src/lib.rs b/polkadot/runtime/westend/src/lib.rs index 2c5e7c75341ad..cad103ac8e6f3 100644 --- a/polkadot/runtime/westend/src/lib.rs +++ b/polkadot/runtime/westend/src/lib.rs @@ -1549,6 +1549,7 @@ impl parachains_initializer::Config for Runtime { type ForceOrigin = EnsureRoot; type WeightInfo = weights::polkadot_runtime_parachains_initializer::WeightInfo; type CoretimeOnNewSession = Coretime; + type OnNewSessionOutgoing = (); } impl paras_sudo_wrapper::Config for Runtime {} diff --git a/substrate/frame/staking-async/runtimes/rc/src/lib.rs b/substrate/frame/staking-async/runtimes/rc/src/lib.rs index c02c7ebaa8e7e..932aea7b7211a 100644 --- a/substrate/frame/staking-async/runtimes/rc/src/lib.rs +++ b/substrate/frame/staking-async/runtimes/rc/src/lib.rs @@ -1492,6 +1492,7 @@ impl parachains_initializer::Config for Runtime { type ForceOrigin = EnsureRoot; type WeightInfo = weights::polkadot_runtime_parachains_initializer::WeightInfo; type CoretimeOnNewSession = Coretime; + type OnNewSessionOutgoing = (); } impl paras_sudo_wrapper::Config for Runtime {} From bfa19f1d24cf148cc733d68d7548c912fb0c94c1 Mon Sep 17 00:00:00 2001 From: metricaez Date: Tue, 9 Dec 2025 13:09:43 -0300 Subject: [PATCH 127/128] choir: remove unnecesary root tracking on broadcaster --- .../runtime/parachains/src/broadcaster/mod.rs | 27 +++---------------- .../parachains/src/broadcaster/tests.rs | 13 +-------- 2 files changed, 4 insertions(+), 36 deletions(-) diff --git a/polkadot/runtime/parachains/src/broadcaster/mod.rs b/polkadot/runtime/parachains/src/broadcaster/mod.rs index e8ca37b54aade..50d7657ac5577 100644 --- a/polkadot/runtime/parachains/src/broadcaster/mod.rs +++ b/polkadot/runtime/parachains/src/broadcaster/mod.rs @@ -49,7 +49,7 @@ use alloc::vec::Vec; use codec::{Decode, Encode}; use frame_support::{ pallet_prelude::*, - storage::{child::ChildInfo, types::CountedStorageMap}, + storage::child::ChildInfo, traits::{ defensive_prelude::*, fungible::{ @@ -209,19 +209,6 @@ pub mod pallet { ValueQuery, >; - /// Child trie root for each publisher parachain. - /// - /// Maps ParaId -> child_trie_root hash (32 bytes). - /// This allows selective inclusion in storage proofs - only roots for publishers - /// we're interested in need to be included. - #[pallet::storage] - pub type PublishedDataRoots = CountedStorageMap< - _, - Twox64Concat, - ParaId, - [u8; 32], - OptionQuery, - >; #[pallet::error] pub enum Error { @@ -471,7 +458,6 @@ pub mod pallet { // Clean up tracking storage PublishedKeys::::remove(para_id); - PublishedDataRoots::::remove(para_id); PublisherExists::::remove(para_id); Ok(()) @@ -608,14 +594,6 @@ pub mod pallet { PublishedKeys::::insert(origin_para_id, published_keys); - // Update child trie root for storage proof verification - let child_root = frame_support::storage::child::root(&child_info, - sp_runtime::StateVersion::V1); - - let root_array: [u8; 32] = child_root.try_into() - .defensive_unwrap_or([0u8; 32]); - PublishedDataRoots::::insert(origin_para_id, root_array); - Self::deposit_event(Event::DataPublished { publisher: origin_para_id, items_count }); Ok(()) @@ -636,8 +614,9 @@ pub mod pallet { /// Checks the maximum publishers limit before creating a new publisher entry. fn get_or_create_publisher_child_info(para_id: ParaId) -> Result { if !PublisherExists::::contains_key(para_id) { + let current_publisher_count = PublisherExists::::iter().count() as u32; ensure!( - PublishedDataRoots::::count() < T::MaxPublishers::get(), + current_publisher_count < T::MaxPublishers::get(), Error::::TooManyPublishers ); PublisherExists::::insert(para_id, true); diff --git a/polkadot/runtime/parachains/src/broadcaster/tests.rs b/polkadot/runtime/parachains/src/broadcaster/tests.rs index c49b2498ea29c..297152cdab237 100644 --- a/polkadot/runtime/parachains/src/broadcaster/tests.rs +++ b/polkadot/runtime/parachains/src/broadcaster/tests.rs @@ -388,14 +388,6 @@ fn multiple_publishers_in_same_block() { assert!(PublisherExists::::get(para2)); assert!(PublisherExists::::get(para3)); - // Verify PublishedDataRoots contains all three - assert_eq!(PublishedDataRoots::::count(), 3); - - // Verify each para has its root in the map - assert!(PublishedDataRoots::::contains_key(para1)); - assert!(PublishedDataRoots::::contains_key(para2)); - assert!(PublishedDataRoots::::contains_key(para3)); - // Verify each para's data is independently accessible assert_eq!(Broadcaster::get_published_value(para1, b"key1"), Some(b"value1".to_vec())); assert_eq!(Broadcaster::get_published_value(para2, b"key2"), Some(b"value2".to_vec())); @@ -423,7 +415,7 @@ fn max_publishers_limit_enforced() { assert_ok!(Broadcaster::handle_publish(para_id, data)); } - assert_eq!(PublishedDataRoots::::count(), 1000); + assert_eq!(PublisherExists::::iter().count(), 1000); // Cannot register new publisher when limit reached let new_para = ParaId::from(3000); @@ -461,13 +453,11 @@ fn cleanup_published_data_works() { assert!(PublisherExists::::get(para_id)); assert_eq!(PublishedKeys::::get(para_id).len(), 2); - assert!(PublishedDataRoots::::get(para_id).is_some()); assert_ok!(Broadcaster::cleanup_published_data(RuntimeOrigin::signed(ALICE), para_id)); assert!(!PublisherExists::::get(para_id)); assert_eq!(PublishedKeys::::get(para_id).len(), 0); - assert!(PublishedDataRoots::::get(para_id).is_none()); assert_eq!(Broadcaster::get_published_value(para_id, b"key1"), None); assert_eq!(Broadcaster::get_published_value(para_id, b"key2"), None); assert!(RegisteredPublishers::::get(para_id).is_some()); @@ -619,7 +609,6 @@ fn force_deregister_works() { assert!(!PublisherExists::::get(para_id)); assert!(!RegisteredPublishers::::contains_key(para_id)); assert_eq!(PublishedKeys::::get(para_id).len(), 0); - assert!(PublishedDataRoots::::get(para_id).is_none()); assert_eq!(Balances::balance_on_hold(&HoldReason::PublisherDeposit.into(), &ALICE), 0); assert_eq!(Balances::balance(&ALICE), 10000); }); From 87956183fee8cded5c20398a8069581fc27bfd51 Mon Sep 17 00:00:00 2001 From: metricaez Date: Thu, 11 Dec 2025 09:34:51 -0300 Subject: [PATCH 128/128] feat: generic API --- cumulus/client/consensus/aura/src/collator.rs | 8 +- .../consensus/aura/src/collators/basic.rs | 2 +- .../consensus/aura/src/collators/lookahead.rs | 18 +--- .../consensus/aura/src/collators/mod.rs | 32 ++++++- .../slot_based/block_builder_task.rs | 2 +- cumulus/client/parachain-inherent/src/lib.rs | 85 ++++++++++++------- cumulus/pallets/subscriber/src/lib.rs | 27 +++--- .../testing/rococo-parachain/src/lib.rs | 4 +- .../lib/src/fake_runtime_api/utils.rs | 2 +- cumulus/primitives/core/src/lib.rs | 43 +++++++--- 10 files changed, 148 insertions(+), 75 deletions(-) diff --git a/cumulus/client/consensus/aura/src/collator.rs b/cumulus/client/consensus/aura/src/collator.rs index b204799a797aa..fc717988c7c06 100644 --- a/cumulus/client/consensus/aura/src/collator.rs +++ b/cumulus/client/consensus/aura/src/collator.rs @@ -128,7 +128,7 @@ where parent_hash: Block::Hash, timestamp: impl Into>, relay_parent_descendants: Option, - child_trie_requests: Vec, + relay_proof_request: cumulus_primitives_core::RelayProofRequest, ) -> Result<(ParachainInherentData, InherentData), Box> { let paras_inherent_data = ParachainInherentDataProvider::create_at( relay_parent, @@ -138,7 +138,7 @@ where relay_parent_descendants .map(RelayParentData::into_inherent_descendant_list) .unwrap_or_default(), - child_trie_requests, + relay_proof_request, ) .await; @@ -174,7 +174,7 @@ where validation_data: &PersistedValidationData, parent_hash: Block::Hash, timestamp: impl Into>, - child_trie_requests: Vec, + relay_proof_request: cumulus_primitives_core::RelayProofRequest, ) -> Result<(ParachainInherentData, InherentData), Box> { self.create_inherent_data_with_rp_offset( relay_parent, @@ -182,7 +182,7 @@ where parent_hash, timestamp, None, - child_trie_requests, + relay_proof_request, ) .await } diff --git a/cumulus/client/consensus/aura/src/collators/basic.rs b/cumulus/client/consensus/aura/src/collators/basic.rs index eb4ca4f3a3c23..81f695e4c2a34 100644 --- a/cumulus/client/consensus/aura/src/collators/basic.rs +++ b/cumulus/client/consensus/aura/src/collators/basic.rs @@ -234,7 +234,7 @@ where &validation_data, parent_hash, claim.timestamp(), - Vec::new(), + Default::default(), ) .await ); diff --git a/cumulus/client/consensus/aura/src/collators/lookahead.rs b/cumulus/client/consensus/aura/src/collators/lookahead.rs index 05d477c270e06..136098b6727ff 100644 --- a/cumulus/client/consensus/aura/src/collators/lookahead.rs +++ b/cumulus/client/consensus/aura/src/collators/lookahead.rs @@ -345,19 +345,9 @@ where "Slot claimed. Building" ); - // Query child trie proof requests from the parachain runtime - let child_trie_requests = params - .para_client - .runtime_api() - .child_trie_keys_to_prove(parent_hash) - .unwrap_or_else(|e| { - tracing::warn!( - target: crate::LOG_TARGET, - error = ?e, - "Failed to fetch child trie proof requests from runtime, using empty vec" - ); - Vec::new() - }); + // Query relay proof requests from the parachain runtime + let relay_proof_request = + super::get_relay_proof_request(&*params.para_client, parent_hash); let validation_data = PersistedValidationData { parent_head: parent_header.encode().into(), @@ -374,7 +364,7 @@ where &validation_data, parent_hash, slot_claim.timestamp(), - child_trie_requests.clone(), + relay_proof_request.clone(), ) .await { diff --git a/cumulus/client/consensus/aura/src/collators/mod.rs b/cumulus/client/consensus/aura/src/collators/mod.rs index 72fa7ad3dcdb8..70d85759fde21 100644 --- a/cumulus/client/consensus/aura/src/collators/mod.rs +++ b/cumulus/client/consensus/aura/src/collators/mod.rs @@ -25,7 +25,9 @@ use crate::collator::SlotClaim; use codec::Codec; use cumulus_client_consensus_common::{self as consensus_common, ParentSearchParams}; use cumulus_primitives_aura::{AuraUnincludedSegmentApi, Slot}; -use cumulus_primitives_core::{relay_chain::Header as RelayHeader, BlockT, ClaimQueueOffset}; +use cumulus_primitives_core::{ + relay_chain::Header as RelayHeader, BlockT, ClaimQueueOffset, KeyToIncludeInRelayProofApi, +}; use cumulus_relay_chain_interface::RelayChainInterface; use polkadot_node_subsystem::messages::RuntimeApiRequest; use polkadot_node_subsystem_util::runtime::ClaimQueueSnapshot; @@ -175,6 +177,34 @@ async fn cores_scheduled_for_para( .collect() } +/// Query relay chain storage keys to include in proofs. +/// +/// This helper function queries the runtime for which relay chain storage keys +/// (both top-level and child trie keys) should be included in the relay chain state proof. +/// +/// Falls back to an empty request if the runtime API call fails or is not implemented. +fn get_relay_proof_request( + client: &Client, + parent_hash: Block::Hash, +) -> cumulus_primitives_core::RelayProofRequest +where + Block: BlockT, + Client: ProvideRuntimeApi, + Client::Api: cumulus_primitives_core::KeyToIncludeInRelayProofApi, +{ + client + .runtime_api() + .keys_to_prove(parent_hash) + .unwrap_or_else(|e| { + tracing::warn!( + target: crate::LOG_TARGET, + error = ?e, + "Failed to fetch relay proof requests from runtime, using empty request" + ); + Default::default() + }) +} + // Checks if we own the slot at the given block and whether there // is space in the unincluded segment. async fn can_build_upon( diff --git a/cumulus/client/consensus/aura/src/collators/slot_based/block_builder_task.rs b/cumulus/client/consensus/aura/src/collators/slot_based/block_builder_task.rs index 587c4f9984447..3ec1a4a629ee3 100644 --- a/cumulus/client/consensus/aura/src/collators/slot_based/block_builder_task.rs +++ b/cumulus/client/consensus/aura/src/collators/slot_based/block_builder_task.rs @@ -368,7 +368,7 @@ where parent_hash, slot_claim.timestamp(), Some(rp_data), - Vec::new(), + Default::default(), ) .await { diff --git a/cumulus/client/parachain-inherent/src/lib.rs b/cumulus/client/parachain-inherent/src/lib.rs index 70a59ebcfddfe..fb08856f49ac9 100644 --- a/cumulus/client/parachain-inherent/src/lib.rs +++ b/cumulus/client/parachain-inherent/src/lib.rs @@ -16,7 +16,7 @@ //! Client side code for generating the parachain inherent. -use codec::{Decode, Encode}; +use codec::Decode; use cumulus_primitives_core::{ relay_chain::{self, Block as RelayBlock, Hash as PHash, HrmpChannelId}, ParaId, PersistedValidationData, @@ -149,35 +149,63 @@ async fn collect_relay_storage_proof( .ok() } -/// Collect child trie proofs for relay chain storage. +/// Collect storage proofs for relay chain data. /// -/// Generates proofs for child trie data. The child trie roots are automatically -/// included from their standard storage locations (`:child_storage:default:` + identifier). +/// Generates proofs for both top-level relay chain storage and child trie data. +/// Top-level keys are proven directly. Child trie roots are automatically included +/// from their standard storage locations (`:child_storage:default:` + identifier). /// -/// Returns a merged proof combining all requested child trie data, or `None` if -/// there are no requests. -async fn collect_child_trie_proofs( +/// Returns a merged proof combining all requested data, or `None` if there are no requests. +async fn collect_relay_storage_proofs( relay_chain_interface: &impl RelayChainInterface, relay_parent: PHash, - requests: Vec, + relay_proof_request: cumulus_primitives_core::RelayProofRequest, ) -> Option { - if requests.is_empty() { + use cumulus_primitives_core::RelayStorageKey; + + let cumulus_primitives_core::RelayProofRequest { keys } = relay_proof_request; + + if keys.is_empty() { return None; } let mut combined_proof: Option = None; - for request in requests { - if request.data_keys.is_empty() { - continue; + // Group keys by storage type + let mut top_keys = Vec::new(); + let mut child_keys: std::collections::BTreeMap, Vec>> = + std::collections::BTreeMap::new(); + + for key in keys { + match key { + RelayStorageKey::Top(k) => top_keys.push(k), + RelayStorageKey::Child { info, key } => { + child_keys.entry(info).or_default().push(key); + }, } + } - let child_info = ChildInfo::new_default(&request.child_trie_identifier); + // Collect top-level storage proofs + if !top_keys.is_empty() { + match relay_chain_interface.prove_read(relay_parent, &top_keys).await { + Ok(top_proof) => { + combined_proof = Some(top_proof); + }, + Err(e) => { + tracing::error!( + target: LOG_TARGET, + relay_parent = ?relay_parent, + error = ?e, + "Cannot obtain top-level storage proof from relay chain.", + ); + }, + } + } - match relay_chain_interface - .prove_child_read(relay_parent, &child_info, &request.data_keys) - .await - { + // Collect child trie proofs + for (storage_key, data_keys) in child_keys { + let child_info = ChildInfo::new_default(&storage_key); + match relay_chain_interface.prove_child_read(relay_parent, &child_info, &data_keys).await { Ok(child_proof) => { combined_proof = match combined_proof { None => Some(child_proof), @@ -188,7 +216,7 @@ async fn collect_child_trie_proofs( tracing::error!( target: LOG_TARGET, relay_parent = ?relay_parent, - child_trie_id = ?request.child_trie_identifier, + child_trie_id = ?child_info.storage_key(), error = ?e, "Cannot obtain child trie proof from relay chain.", ); @@ -211,7 +239,7 @@ impl ParachainInherentDataProvider { validation_data: &PersistedValidationData, para_id: ParaId, relay_parent_descendants: Vec, - child_trie_requests: Vec, + relay_proof_request: cumulus_primitives_core::RelayProofRequest, ) -> Option { // Only include next epoch authorities when the descendants include an epoch digest. // Skip the first entry because this is the relay parent itself. @@ -230,16 +258,15 @@ impl ParachainInherentDataProvider { ) .await?; - if !child_trie_requests.is_empty() { - if let Some(child_proofs) = collect_child_trie_proofs( - relay_chain_interface, - relay_parent, - child_trie_requests, - ) - .await - { - relay_chain_state = StorageProof::merge([relay_chain_state, child_proofs]); - } + // Collect additional requested storage proofs (top-level and child tries) + if let Some(additional_proofs) = collect_relay_storage_proofs( + relay_chain_interface, + relay_parent, + relay_proof_request, + ) + .await + { + relay_chain_state = StorageProof::merge([relay_chain_state, additional_proofs]); } let downward_messages = relay_chain_interface diff --git a/cumulus/pallets/subscriber/src/lib.rs b/cumulus/pallets/subscriber/src/lib.rs index aa58a3f7cdadd..83effc366d663 100644 --- a/cumulus/pallets/subscriber/src/lib.rs +++ b/cumulus/pallets/subscriber/src/lib.rs @@ -68,18 +68,25 @@ pub mod pallet { >; impl Pallet { - /// Build child trie proof requests from subscriptions. - pub fn get_child_trie_proof_requests( - ) -> Vec { - T::SubscriptionHandler::subscriptions() + /// Build relay proof requests from subscriptions. + /// + /// Returns a `RelayProofRequest` with child trie proof requests for subscribed data. + pub fn get_relay_proof_requests() -> cumulus_primitives_core::RelayProofRequest { + let storage_keys = T::SubscriptionHandler::subscriptions() .into_iter() - .map(|(para_id, keys)| cumulus_primitives_core::ChildTrieProofRequest { - child_trie_identifier: Self::derive_child_info(para_id) - .storage_key() - .to_vec(), - data_keys: keys, + .flat_map(|(para_id, data_keys)| { + let child_info = Self::derive_child_info(para_id); + let storage_key = child_info.storage_key().to_vec(); + data_keys.into_iter().map(move |key| { + cumulus_primitives_core::RelayStorageKey::Child { + info: storage_key.clone(), + key, + } }) - .collect() + }) + .collect(); + + cumulus_primitives_core::RelayProofRequest { keys: storage_keys } } fn derive_child_info(publisher_para_id: ParaId) -> sp_storage::ChildInfo { diff --git a/cumulus/parachains/runtimes/testing/rococo-parachain/src/lib.rs b/cumulus/parachains/runtimes/testing/rococo-parachain/src/lib.rs index a3cda0f788bdf..ccc56d452e0b1 100644 --- a/cumulus/parachains/runtimes/testing/rococo-parachain/src/lib.rs +++ b/cumulus/parachains/runtimes/testing/rococo-parachain/src/lib.rs @@ -899,8 +899,8 @@ impl_runtime_apis! { } impl cumulus_primitives_core::KeyToIncludeInRelayProofApi for Runtime { - fn child_trie_keys_to_prove() -> Vec { - Subscriber::get_child_trie_proof_requests() + fn keys_to_prove() -> cumulus_primitives_core::RelayProofRequest { + Subscriber::get_relay_proof_requests() } } } diff --git a/cumulus/polkadot-omni-node/lib/src/fake_runtime_api/utils.rs b/cumulus/polkadot-omni-node/lib/src/fake_runtime_api/utils.rs index 7f41705d2cb43..3391d22b36c80 100644 --- a/cumulus/polkadot-omni-node/lib/src/fake_runtime_api/utils.rs +++ b/cumulus/polkadot-omni-node/lib/src/fake_runtime_api/utils.rs @@ -176,7 +176,7 @@ macro_rules! impl_node_runtime_apis { } impl cumulus_primitives_core::KeyToIncludeInRelayProofApi<$block> for $runtime { - fn child_trie_keys_to_prove() -> Vec { + fn keys_to_prove() -> cumulus_primitives_core::RelayProofRequest { unimplemented!() } } diff --git a/cumulus/primitives/core/src/lib.rs b/cumulus/primitives/core/src/lib.rs index f623b902af4f6..95d3410d645f2 100644 --- a/cumulus/primitives/core/src/lib.rs +++ b/cumulus/primitives/core/src/lib.rs @@ -370,16 +370,28 @@ pub struct CollationInfo { pub head_data: HeadData, } -/// Request for proving child trie data from the relay chain. -/// -/// Specifies a child trie identifier and the keys to prove from that trie. +/// A relay chain storage key to be included in the storage proof. #[derive(Clone, Debug, Encode, Decode, TypeInfo, PartialEq, Eq)] -pub struct ChildTrieProofRequest { - /// Child trie identifier (converted to `ChildInfo` by the collator). - pub child_trie_identifier: Vec, +pub enum RelayStorageKey { + /// Top-level relay chain storage key. + Top(Vec), + /// Child trie storage key. + Child { + /// Child trie storage key (unprefixed). + info: Vec, + /// Key within the child trie. + key: Vec, + }, +} - /// Keys to prove from within the child trie. - pub data_keys: Vec>, +/// Request for proving relay chain storage data. +/// +/// Contains a list of storage keys (either top-level or child trie keys) +/// to be included in the relay chain state proof. +#[derive(Clone, Debug, Encode, Decode, TypeInfo, PartialEq, Eq, Default)] +pub struct RelayProofRequest { + /// Storage keys to include in the relay chain state proof. + pub keys: Vec, } sp_api::decl_runtime_apis! { @@ -414,12 +426,19 @@ sp_api::decl_runtime_apis! { fn relay_parent_offset() -> u32; } - /// API for specifying which relay chain child trie data to include in storage proofs. + /// API for specifying which relay chain storage data to include in storage proofs. + /// + /// This API allows parachains to request both top-level relay chain storage keys + /// and child trie storage keys to be included in the relay chain state proof. pub trait KeyToIncludeInRelayProofApi { - /// Returns child trie proof requests. + /// Returns relay chain storage proof requests. + /// + /// The returned structure specifies: + /// - `top`: Top-level relay chain storage keys to include in the proof + /// - `children_default`: Child trie storage to include, with each entry containing + /// the child trie identifier and the keys to prove from that child trie /// - /// Each request specifies a child trie identifier and the keys to read from that trie. /// The collator generates proofs for these and includes them in the relay chain state proof. - fn child_trie_keys_to_prove() -> Vec; + fn keys_to_prove() -> RelayProofRequest; } }