Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5,730 changes: 3,021 additions & 2,709 deletions Cargo.lock

Large diffs are not rendered by default.

175 changes: 87 additions & 88 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ resolver = "2"

[workspace.dependencies]
clap = { version = "4.5.26", features = ["derive"] }
codec = { package = "parity-scale-codec", version = "3.6.12", default-features = false, features = [
codec = { package = "parity-scale-codec", version = "3.7.5", default-features = false, features = [
"derive",
] }
color-print = "0.3.7"
docify = "0.2.9"
docify = "0.4.1"
futures = "0.3.31"
hex-literal = "0.4.1"
jsonrpsee = { version = "0.24.7", features = ["server"] }
hex-literal = "1.0.0"
jsonrpsee = { version = "0.24.9", features = ["server"] }
log = { version = "0.4.25", default-features = false }
scale-info = { version = "2.11.6", default-features = false, features = [
"derive",
Expand All @@ -32,96 +32,95 @@ smallvec = "1.13.2"

# Build
substrate-build-script-utils = "11.0.0"
substrate-wasm-builder = "25.0.0"
substrate-wasm-builder = "26.0.0"

# Local
parachain-template-runtime = { path = "./runtime" }

# Substrate
frame-benchmarking = { version = "39.0.0", default-features = false }
frame-benchmarking-cli = "45.0.0"
frame-executive = { version = "39.0.0", default-features = false }
frame-support = { version = "39.0.0", default-features = false }
frame-support-procedural = { version = "31.0.0", default-features = false }
frame-system = { version = "39.0.0", default-features = false }
frame-system-benchmarking = { version = "39.0.0", default-features = false }
frame-system-rpc-runtime-api = { version = "35.0.0", default-features = false }
frame-try-runtime = { version = "0.45.0", default-features = false }
frame-metadata-hash-extension = { version = "0.7.0", default-features = false }
pallet-aura = { version = "38.0.0", default-features = false }
pallet-authorship = { version = "39.0.0", default-features = false }
pallet-balances = { version = "40.0.0", default-features = false }
pallet-message-queue = { version = "42.0.0", default-features = false }
pallet-session = { version = "39.0.0", default-features = false }
pallet-sudo = { version = "39.0.0", default-features = false }
pallet-timestamp = { version = "38.0.0", default-features = false }
pallet-transaction-payment = { version = "39.0.0", default-features = false }
pallet-transaction-payment-rpc = "42.0.0"
pallet-transaction-payment-rpc-runtime-api = { version = "39.0.0", default-features = false }
prometheus-endpoint = { version = "0.17.1", default-features = false, package = "substrate-prometheus-endpoint" }
sc-basic-authorship = "0.47.0"
sc-chain-spec = "40.0.0"
sc-cli = "0.49.0"
sc-client-api = "38.0.0"
sc-offchain = "42.0.0"
sc-consensus = "0.46.0"
sc-executor = "0.41.0"
sc-network = "0.47.0"
sc-network-sync = "0.46.0"
sc-rpc = "42.0.0"
sc-service = "0.48.0"
sc-sysinfo = "40.0.0"
sc-telemetry = "27.0.0"
sc-tracing = "38.0.0"
sc-transaction-pool = "38.0.0"
sc-transaction-pool-api = "38.0.0"
sp-api = { version = "35.0.0", default-features = false }
sp-block-builder = { version = "35.0.0", default-features = false }
sp-blockchain = "38.0.0"
sp-consensus-aura = { version = "0.41.0", default-features = false }
sp-core = { version = "35.0.0", default-features = false }
sp-io = { version = "39.0.0", default-features = false }
sp-genesis-builder = { version = "0.16.0", default-features = false }
sp-inherents = { version = "35.0.0", default-features = false }
sp-keyring = { version = "40.0.0", default-features = false }
sp-keystore = "0.41.0"
sp-offchain = { version = "35.0.0", default-features = false }
sp-runtime = { version = "40.0.0", default-features = false }
sp-session = { version = "37.0.0", default-features = false }
sp-std = { version = "14.0.0", default-features = false }
sp-timestamp = "35.0.0"
sp-transaction-pool = { version = "35.0.0", default-features = false }
sp-version = { version = "38.0.0", default-features = false }
substrate-frame-rpc-system = "41.0.0"
frame-benchmarking = { version = "40.0.0", default-features = false }
frame-benchmarking-cli = "47.0.0"
frame-executive = { version = "40.0.0", default-features = false }
frame-support = { version = "40.1.0", default-features = false }
frame-support-procedural = { version = "33.0.0", default-features = false }
frame-system = { version = "40.1.0", default-features = false }
frame-system-benchmarking = { version = "40.0.0", default-features = false }
frame-system-rpc-runtime-api = { version = "36.0.0", default-features = false }
frame-try-runtime = { version = "0.46.0", default-features = false }
frame-metadata-hash-extension = { version = "0.8.0", default-features = false }
pallet-aura = { version = "39.0.0", default-features = false }
pallet-authorship = { version = "40.0.0", default-features = false }
pallet-balances = { version = "41.1.0", default-features = false }
pallet-message-queue = { version = "43.1.0", default-features = false }
pallet-session = { version = "40.0.0", default-features = false }
pallet-sudo = { version = "40.0.0", default-features = false }
pallet-timestamp = { version = "39.0.0", default-features = false }
pallet-transaction-payment = { version = "40.0.0", default-features = false }
pallet-transaction-payment-rpc = "43.0.0"
pallet-transaction-payment-rpc-runtime-api = { version = "40.0.0", default-features = false }
prometheus-endpoint = { version = "0.17.2", default-features = false, package = "substrate-prometheus-endpoint" }
sc-basic-authorship = "0.49.0"
sc-chain-spec = "42.0.0"
sc-cli = "0.51.0"
sc-client-api = "39.0.0"
sc-offchain = "44.0.0"
sc-consensus = "0.48.0"
sc-executor = "0.42.0"
sc-network = "0.49.0"
sc-network-sync = "0.48.0"
sc-rpc = "44.0.0"
sc-service = "0.50.0"
sc-sysinfo = "42.0.0"
sc-telemetry = "28.1.0"
sc-tracing = "39.0.0"
sc-transaction-pool = "39.0.0"
sc-transaction-pool-api = "39.0.0"
sp-api = { version = "36.0.1", default-features = false }
sp-block-builder = { version = "36.0.0", default-features = false }
sp-blockchain = "39.0.0"
sp-consensus-aura = { version = "0.42.0", default-features = false }
sp-core = { version = "36.1.0", default-features = false }
sp-io = { version = "40.0.0", default-features = false }
sp-genesis-builder = { version = "0.17.0", default-features = false }
sp-inherents = { version = "36.0.0", default-features = false }
sp-keyring = { version = "41.0.0", default-features = false }
sp-keystore = "0.42.0"
sp-offchain = { version = "36.0.0", default-features = false }
sp-runtime = { version = "41.1.0", default-features = false }
sp-session = { version = "38.1.0", default-features = false }
sp-timestamp = "36.0.0"
sp-transaction-pool = { version = "36.0.0", default-features = false }
sp-version = { version = "39.0.0", default-features = false }
substrate-frame-rpc-system = "43.0.0"

# Polkadot
pallet-xcm = { version = "18.0.0", default-features = false }
polkadot-cli = "21.0.0"
polkadot-parachain-primitives = { version = "15.0.0", default-features = false }
polkadot-primitives = "17.0.0"
polkadot-runtime-common = { version = "18.0.0", default-features = false }
xcm = { version = "15.0.0", package = "staging-xcm", default-features = false }
xcm-builder = { version = "18.0.0", package = "staging-xcm-builder", default-features = false }
xcm-executor = { version = "18.0.0", package = "staging-xcm-executor", default-features = false }
pallet-xcm = { version = "19.1.0", default-features = false }
polkadot-cli = "23.0.0"
polkadot-parachain-primitives = { version = "16.1.0", default-features = false }
polkadot-primitives = "18.1.0"
polkadot-runtime-common = { version = "19.1.0", default-features = false }
xcm = { version = "16.1.0", package = "staging-xcm", default-features = false }
xcm-builder = { version = "20.0.0", package = "staging-xcm-builder", default-features = false }
xcm-executor = { version = "19.1.0", package = "staging-xcm-executor", default-features = false }

# Cumulus
cumulus-client-cli = "0.20.0"
cumulus-client-collator = "0.20.0"
cumulus-client-consensus-aura = "0.20.0"
cumulus-client-consensus-common = "0.20.0"
cumulus-client-consensus-proposer = "0.17.0"
cumulus-client-service = "0.21.0"
cumulus-pallet-aura-ext = { version = "0.18.0", default-features = false }
cumulus-pallet-parachain-system = { version = "0.18.0", default-features = false }
cumulus-pallet-session-benchmarking = { version = "20.0.0", default-features = false }
cumulus-pallet-xcm = { version = "0.18.0", default-features = false }
cumulus-pallet-xcmp-queue = { version = "0.18.0", default-features = false }
cumulus-primitives-aura = { version = "0.16.0", default-features = false }
cumulus-primitives-core = { version = "0.17.0", default-features = false }
cumulus-primitives-parachain-inherent = "0.17.0"
cumulus-primitives-storage-weight-reclaim = { version = "9.0.0", default-features = false }
cumulus-primitives-utility = { version = "0.18.0", default-features = false }
cumulus-relay-chain-interface = "0.20.0"
pallet-collator-selection = { version = "20.0.0", default-features = false }
parachains-common = { version = "19.0.0", default-features = false }
parachain-info = { version = "0.18.0", package = "staging-parachain-info", default-features = false }
cumulus-client-cli = "0.22.0"
cumulus-client-collator = "0.22.0"
cumulus-client-consensus-aura = "0.22.0"
cumulus-client-consensus-common = "0.22.0"
cumulus-client-consensus-proposer = "0.19.0"
cumulus-client-service = "0.23.0"
cumulus-pallet-aura-ext = { version = "0.20.0", default-features = false }
cumulus-pallet-parachain-system = { version = "0.20.0", default-features = false }
cumulus-pallet-session-benchmarking = { version = "21.0.0", default-features = false }
cumulus-pallet-weight-reclaim = { version = "0.2.0", default-features = false }
cumulus-pallet-xcm = { version = "0.19.1", default-features = false }
cumulus-pallet-xcmp-queue = { version = "0.20.0", default-features = false }
cumulus-primitives-aura = { version = "0.17.0", default-features = false }
cumulus-primitives-core = { version = "0.18.1", default-features = false }
cumulus-primitives-parachain-inherent = "0.18.1"
cumulus-primitives-utility = { version = "0.20.0", default-features = false }
cumulus-relay-chain-interface = "0.22.0"
pallet-collator-selection = { version = "21.0.0", default-features = false }
parachains-common = { version = "21.0.0", default-features = false }
parachain-info = { version = "0.20.0", package = "staging-parachain-info", default-features = false }
5 changes: 2 additions & 3 deletions node/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ fn start_consensus(
collator_service,
authoring_duration: Duration::from_millis(2000),
reinitialize: false,
max_pov_percentage: None,
};

let fut = aura::run::<Block, sp_consensus_aura::sr25519::AuthorityPair, _, _, _, _, _, _, _, _>(
Expand Down Expand Up @@ -279,7 +280,7 @@ pub async fn start_parachain_node(

// NOTE: because we use Aura here explicitly, we can use `CollatorSybilResistance::Resistant`
// when starting the network.
let (network, system_rpc_tx, tx_handler_controller, start_network, sync_service) =
let (network, system_rpc_tx, tx_handler_controller, sync_service) =
build_network(BuildNetworkParams {
parachain_config: &parachain_config,
net_config,
Expand Down Expand Up @@ -419,7 +420,5 @@ pub async fn start_parachain_node(
)?;
}

start_network.start_network();

Ok((task_manager, client))
}
7 changes: 3 additions & 4 deletions runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ sp-keyring.workspace = true
sp-offchain.workspace = true
sp-runtime.workspace = true
sp-session.workspace = true
sp-std.workspace = true
sp-transaction-pool.workspace = true
sp-version.workspace = true

Expand All @@ -69,11 +68,11 @@ xcm-executor.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-storage-weight-reclaim.workspace = true
cumulus-primitives-utility.workspace = true
pallet-collator-selection.workspace = true
parachains-common.workspace = true
Expand All @@ -86,11 +85,11 @@ std = [
"cumulus-pallet-aura-ext/std",
"cumulus-pallet-parachain-system/std",
"cumulus-pallet-session-benchmarking/std",
"cumulus-pallet-weight-reclaim/std",
"cumulus-pallet-xcm/std",
"cumulus-pallet-xcmp-queue/std",
"cumulus-primitives-aura/std",
"cumulus-primitives-core/std",
"cumulus-primitives-storage-weight-reclaim/std",
"cumulus-primitives-utility/std",
"frame-benchmarking?/std",
"frame-executive/std",
Expand Down Expand Up @@ -128,7 +127,6 @@ std = [
"sp-offchain/std",
"sp-runtime/std",
"sp-session/std",
"sp-std/std",
"sp-transaction-pool/std",
"sp-version/std",
"xcm-builder/std",
Expand All @@ -139,6 +137,7 @@ std = [
runtime-benchmarks = [
"cumulus-pallet-parachain-system/runtime-benchmarks",
"cumulus-pallet-session-benchmarking/runtime-benchmarks",
"cumulus-pallet-weight-reclaim/runtime-benchmarks",
"cumulus-pallet-xcmp-queue/runtime-benchmarks",
"cumulus-primitives-core/runtime-benchmarks",
"cumulus-primitives-utility/runtime-benchmarks",
Expand Down
15 changes: 12 additions & 3 deletions runtime/src/apis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
// For more information, please refer to <http://unlicense.org>

// External crates imports
use alloc::vec::Vec;
use frame_support::{
genesis_builder_helper::{build_state, get_preset},
weights::Weight,
Expand All @@ -37,7 +38,6 @@
transaction_validity::{TransactionSource, TransactionValidity},
ApplyExtrinsicResult,
};
use sp_std::prelude::Vec;
use sp_version::RuntimeVersion;

// Local module imports
Expand Down Expand Up @@ -95,6 +95,15 @@
}
}

impl frame_support::view_functions::runtime_api::RuntimeViewFunction<Block> for Runtime {
fn execute_view_function(
id: frame_support::view_functions::ViewFunctionId,
input: Vec<u8>
) -> Result<Vec<u8>, frame_support::view_functions::ViewFunctionDispatchError> {
Runtime::execute_view_function(id, input)
}
}

impl sp_block_builder::BlockBuilder<Block> for Runtime {
fn apply_extrinsic(extrinsic: <Block as BlockT>::Extrinsic) -> ApplyExtrinsicResult {
Executive::apply_extrinsic(extrinsic)
Expand Down Expand Up @@ -227,7 +236,7 @@
Vec<frame_benchmarking::BenchmarkList>,
Vec<frame_support::traits::StorageInfo>,
) {
use frame_benchmarking::{Benchmarking, BenchmarkList};
use frame_benchmarking::BenchmarkList;
use frame_support::traits::StorageInfoTrait;
use frame_system_benchmarking::Pallet as SystemBench;
use cumulus_pallet_session_benchmarking::Pallet as SessionBench;
Expand All @@ -243,11 +252,11 @@
fn dispatch_benchmark(
config: frame_benchmarking::BenchmarkConfig
) -> Result<Vec<frame_benchmarking::BenchmarkBatch>, alloc::string::String> {
use frame_benchmarking::{BenchmarkError, Benchmarking, BenchmarkBatch};
use frame_benchmarking::{BenchmarkError, BenchmarkBatch};
use super::*;

use frame_system_benchmarking::Pallet as SystemBench;
impl frame_system_benchmarking::Config for Runtime {

Check warning on line 259 in runtime/src/apis.rs

View workflow job for this annotation

GitHub Actions / clippy

non-local `impl` definition, `impl` blocks should be written at the same level as their item

warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item --> runtime/src/apis.rs:259:13 | 252 | / fn dispatch_benchmark( 253 | | config: frame_benchmarking::BenchmarkConfig 254 | | ) -> Result<Vec<frame_benchmarking::BenchmarkBatch>, alloc::string::String> { | |___________________________________________________________________________________- move the `impl` block outside of this associated function `dispatch_benchmark` ... 259 | impl frame_system_benchmarking::Config for Runtime { | ^^^^^---------------------------------^^^^^------- | | | | | `Runtime` is not local | `Config` is not local | = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` = note: `#[warn(non_local_definitions)]` on by default
fn setup_set_code_requirements(code: &Vec<u8>) -> Result<(), BenchmarkError> {
ParachainSystem::initialize_for_set_code_benchmark(code.len() as u32);
Ok(())
Expand All @@ -259,7 +268,7 @@
}

use cumulus_pallet_session_benchmarking::Pallet as SessionBench;
impl cumulus_pallet_session_benchmarking::Config for Runtime {}

Check warning on line 271 in runtime/src/apis.rs

View workflow job for this annotation

GitHub Actions / clippy

non-local `impl` definition, `impl` blocks should be written at the same level as their item

warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item --> runtime/src/apis.rs:271:13 | 252 | / fn dispatch_benchmark( 253 | | config: frame_benchmarking::BenchmarkConfig 254 | | ) -> Result<Vec<frame_benchmarking::BenchmarkBatch>, alloc::string::String> { | |___________________________________________________________________________________- move the `impl` block outside of this associated function `dispatch_benchmark` ... 271 | impl cumulus_pallet_session_benchmarking::Config for Runtime {} | ^^^^^-------------------------------------------^^^^^------- | | | | | `Runtime` is not local | `Config` is not local | = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl`

use frame_support::traits::WhitelistedStorageKeys;
let whitelist = AllPalletsWithSystem::whitelisted_storage_keys();
Expand Down
1 change: 1 addition & 0 deletions runtime/src/benchmarks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,5 @@ frame_benchmarking::define_benchmarks!(
[pallet_session, SessionBench::<Runtime>]
[cumulus_pallet_xcmp_queue, XcmpQueue]
[pallet_message_queue, MessageQueue]
[cumulus_pallet_weight_reclaim, WeightReclaim]
);
5 changes: 5 additions & 0 deletions runtime/src/configs/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,10 @@ impl frame_system::Config for Runtime {
type MaxConsumers = frame_support::traits::ConstU32<16>;
}

impl cumulus_pallet_weight_reclaim::Config for Runtime {
type WeightInfo = ();
}

impl pallet_timestamp::Config for Runtime {
/// A timestamp: milliseconds since the unix epoch.
type Moment = u64;
Expand Down Expand Up @@ -258,6 +262,7 @@ parameter_types! {
}

impl pallet_session::Config for Runtime {
type DisablingStrategy = ();
type RuntimeEvent = RuntimeEvent;
type ValidatorId = <Self as frame_system::Config>::AccountId;
// we don't have stash and controller, thus we don't need the convert as well.
Expand Down
Loading
Loading