Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: upgrade to 1.9.0 #179

Merged
merged 5 commits into from
Aug 15, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
4,596 changes: 2,395 additions & 2,201 deletions Cargo.lock

Large diffs are not rendered by default.

195 changes: 98 additions & 97 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ subxt-signer = "0.34.0"
tokio = { version = "1.36", features = ["macros", "time", "rt-multi-thread"] }

# Build
substrate-wasm-builder = "19.0.0"
substrate-wasm-builder = "20.0.0"
substrate-build-script-utils = "11.0.0"

# Local
Expand All @@ -61,112 +61,113 @@ pop-runtime-common = { path = "runtime/common", default-features = false }
pop-primitives = { path = "./primitives", default-features = false }

# Substrate
sc-basic-authorship = "0.36.0"
sc-chain-spec = "29.0.0"
sc-cli = "0.38.0"
sc-client-api = "30.0.0"
sc-offchain = "31.0.0"
sc-consensus = "0.35.0"
sc-executor = "0.34.0"
sc-network = "0.36.0"
sc-network-sync = "0.35.0"
sc-rpc = "31.0.0"
sc-service = "0.37.0"
sc-sysinfo = "29.0.0"
sc-basic-authorship = "0.37.0"
sc-chain-spec = "30.0.1"
sc-cli = "0.39.0"
sc-client-api = "31.0.0"
sc-offchain = "32.0.0"
sc-consensus = "0.36.0"
sc-executor = "0.35.0"
sc-network = "0.37.0"
sc-network-sync = "0.36.0"
sc-rpc = "32.0.0"
sc-service = "0.38.0"
sc-sysinfo = "30.0.0"
sc-telemetry = "17.0.0"
sc-tracing = "30.0.0"
sc-transaction-pool = "30.0.0"
sc-transaction-pool-api = "30.0.0"
frame-benchmarking = { version = "30.0.0", default-features = false }
frame-benchmarking-cli = "34.0.0"
frame-executive = { version = "30.0.0", default-features = false }
frame-support = { version = "30.0.0", default-features = false }
frame-system = { version = "30.0.0", default-features = false }
frame-system-benchmarking = { version = "30.0.0", default-features = false }
frame-system-rpc-runtime-api = { version = "28.0.0", default-features = false }
frame-try-runtime = { version = "0.36.0", default-features = false }
pallet-aura = { version = "29.0.0", default-features = false }
pallet-authorship = { version = "30.0.0", default-features = false }
pallet-assets = { version = "31.0.0", default-features = false }
pallet-balances = { version = "30.0.0", default-features = false }
pallet-contracts = { version = "29.0.0", default-features = false }
pallet-message-queue = { version = "33.0.0", default-features = false }
pallet-multisig = { version = "30.0.0", default-features = false }
pallet-nft-fractionalization = { version = "12.0.0", default-features = false }
pallet-nfts = { version = "24.0.0", default-features = false }
pallet-nfts-runtime-api = { version = "16.0.0", default-features = false }
pallet-preimage = { version = "30.0.0", default-features = false }
pallet-proxy = { version = "30.0.0", default-features = false }
pallet-scheduler = { version = "31.0.0", default-features = false }
pallet-session = { version = "30.0.0", default-features = false }
pallet-sudo = { version = "30.0.0", default-features = false }
pallet-timestamp = { version = "29.0.0", default-features = false }
pallet-transaction-payment = { version = "30.0.0", default-features = false }
pallet-transaction-payment-rpc = "32.0.0"
pallet-transaction-payment-rpc-runtime-api = { version = "30.0.0", default-features = false }
pallet-utility = { version = "30.0.0", default-features = false }
sp-api = { version = "28.0.0", default-features = false }
sp-authority-discovery = { version = "28.0.0", default-features = false }
sp-block-builder = { version = "28.0.0", default-features = false }
sp-blockchain = "30.0.0"
sp-consensus-aura = { version = "0.34.0", default-features = false }
sp-consensus-babe = { version = "0.34.0", default-features = false }
sp-consensus-beefy = { version = "15.0.0", default-features = false }
sp-consensus-grandpa = { version = "15.0.0", default-features = false }
sp-core = { version = "30.0.0", default-features = false }
sp-keystore = "0.36.0"
sp-io = { version = "32.0.0", default-features = false }
sp-genesis-builder = { version = "0.9.0", default-features = false }
sp-inherents = { version = "28.0.0", default-features = false }
sp-offchain = { version = "28.0.0", default-features = false }
sp-runtime = { version = "33.0.0", default-features = false }
sp-timestamp = "28.0.0"
substrate-frame-rpc-system = "30.0.0"
sc-tracing = "31.0.0"
sc-transaction-pool = "31.0.0"
sc-transaction-pool-api = "31.0.0"
frame-benchmarking = { version = "31.0.0", default-features = false }
frame-benchmarking-cli = "35.0.1"
frame-executive = { version = "31.0.0", default-features = false }
frame-support = { version = "31.0.0", default-features = false }
frame-system = { version = "31.0.0", default-features = false }
frame-system-benchmarking = { version = "31.0.0", default-features = false }
frame-system-rpc-runtime-api = { version = "29.0.0", default-features = false }
frame-try-runtime = { version = "0.37.0", default-features = false }
pallet-aura = { version = "30.0.0", default-features = false }
pallet-authorship = { version = "31.0.0", default-features = false }
pallet-assets = { version = "32.0.0", default-features = false }
pallet-balances = { version = "31.0.0", default-features = false }
pallet-contracts = { version = "30.0.0", default-features = false }
pallet-message-queue = { version = "34.0.0", default-features = false }
pallet-multisig = { version = "31.0.0", default-features = false }
pallet-nft-fractionalization = { version = "13.0.0", default-features = false }
pallet-nfts = { version = "25.0.0", default-features = false }
pallet-nfts-runtime-api = { version = "17.0.0", default-features = false }
pallet-preimage = { version = "31.0.0", default-features = false }
pallet-proxy = { version = "31.0.0", default-features = false }
pallet-scheduler = { version = "32.0.0", default-features = false }
pallet-session = { version = "31.0.0", default-features = false }
pallet-sudo = { version = "31.0.0", default-features = false }
pallet-timestamp = { version = "30.0.0", default-features = false }
pallet-transaction-payment = { version = "31.0.0", default-features = false }
pallet-transaction-payment-rpc = "33.0.0"
pallet-transaction-payment-rpc-runtime-api = { version = "31.0.0", default-features = false }
pallet-utility = { version = "31.0.0", default-features = false }
sp-api = { version = "29.0.0", default-features = false }
sp-authority-discovery = { version = "29.0.0", default-features = false }
sp-block-builder = { version = "29.0.0", default-features = false }
sp-blockchain = "31.0.0"
sp-consensus-aura = { version = "0.35.0", default-features = false }
sp-consensus-babe = { version = "0.35.0", default-features = false }
sp-consensus-beefy = { version = "16.0.0", default-features = false }
sp-consensus-grandpa = { version = "16.0.0", default-features = false }
sp-core = { version = "31.0.0", default-features = false }
sp-keystore = "0.37.0"
sp-io = { version = "33.0.0", default-features = false }
sp-genesis-builder = { version = "0.10.0", default-features = false }
sp-inherents = { version = "29.0.0", default-features = false }
sp-offchain = { version = "29.0.0", default-features = false }
sp-runtime = { version = "34.0.0", default-features = false }
sp-timestamp = "29.0.0"
substrate-frame-rpc-system = "31.0.0"
substrate-prometheus-endpoint = "0.17.0"
sp-session = { version = "29.0.0", default-features = false }
sp-session = { version = "30.0.0", default-features = false }
sp-std = { version = "14.0.0", default-features = false }
sp-transaction-pool = { version = "28.0.0", default-features = false }
sp-version = { version = "31.0.0", default-features = false }
sp-transaction-pool = { version = "29.0.0", default-features = false }
sp-version = { version = "32.0.0", default-features = false }

# Polkadot
pallet-xcm = { version = "9.0.1", default-features = false }
polkadot-cli = "9.0.0"
polkadot-parachain-primitives = { version = "8.0.0", default-features = false }
polkadot-runtime-parachains = { version = "9.0.0", default-features = false }
polkadot-primitives = { version = "9.0.0", default-features = false }
polkadot-runtime-common = { version = "9.0.0", default-features = false }
rococo-runtime-constants = { version = "9.0.0", default-features = false }
rococo-runtime = { version = "9.0.0", default-features = false }
xcm = { version = "9.0.0", package = "staging-xcm", default-features = false }
xcm-builder = { version = "9.0.0", package = "staging-xcm-builder", default-features = false }
xcm-executor = { version = "9.0.1", package = "staging-xcm-executor", default-features = false }
pallet-xcm = { version = "10.0.1", default-features = false }
polkadot-cli = "10.0.0"
polkadot-parachain-primitives = { version = "9.0.0", default-features = false }
polkadot-runtime-parachains = { version = "10.0.0", default-features = false }
polkadot-primitives = { version = "10.0.0", default-features = false }
polkadot-runtime-common = { version = "10.0.0", default-features = false }
rococo-runtime-constants = { version = "10.0.0", default-features = false }
rococo-runtime = { version = "10.0.0", default-features = false }
xcm = { version = "10.0.0", package = "staging-xcm", default-features = false }
xcm-builder = { version = "10.0.0", package = "staging-xcm-builder", default-features = false }
xcm-executor = { version = "10.0.0", package = "staging-xcm-executor", default-features = false }

# Cumulus
asset-hub-rococo-runtime = { version = "0.13.0", default-features = false }
asset-test-utils = { version = "9.0.0", default-features = false }
cumulus-pallet-aura-ext = { version = "0.9.0", default-features = false }
cumulus-pallet-parachain-system = { version = "0.9.0", default-features = false, features = [
asset-hub-rococo-runtime = { version = "0.14.0", default-features = false }
asset-test-utils = { version = "10.0.0", default-features = false }
cumulus-pallet-aura-ext = { version = "0.10.0", default-features = false }
cumulus-pallet-parachain-system = { version = "0.10.0", default-features = false, features = [
"parameterized-consensus-hook",
] }
cumulus-pallet-session-benchmarking = { version = "11.0.0", default-features = false }
cumulus-pallet-xcm = { version = "0.9.0", default-features = false }
cumulus-pallet-xcmp-queue = { version = "0.9.0", default-features = false }
cumulus-primitives-aura = { version = "0.9.0", default-features = false }
cumulus-primitives-core = { version = "0.9.0", default-features = false }
cumulus-primitives-utility = { version = "0.9.0", default-features = false }
emulated-integration-tests-common = { version = "5.0.0", default-features = false }
pallet-collator-selection = { version = "11.0.1", default-features = false }
parachains-common = { version = "9.0.0", default-features = false }
parachain-info = { version = "0.9.0", package = "staging-parachain-info", default-features = false }
cumulus-primitives-parachain-inherent = "0.9.0"
cumulus-relay-chain-interface = "0.9.0"
cumulus-pallet-session-benchmarking = { version = "12.0.0", default-features = false }
cumulus-pallet-xcm = { version = "0.10.0", default-features = false }
cumulus-pallet-xcmp-queue = { version = "0.10.0", default-features = false }
cumulus-primitives-aura = { version = "0.10.0", default-features = false }
cumulus-primitives-core = { version = "0.10.0", default-features = false }
cumulus-primitives-storage-weight-reclaim = { version = "1.0.0", default-features = false }
cumulus-primitives-utility = { version = "0.10.0", default-features = false }
emulated-integration-tests-common = { version = "6.0.0", default-features = false }
pallet-collator-selection = { version = "12.0.1", default-features = false }
parachains-common = { version = "10.0.0", default-features = false }
parachain-info = { version = "0.10.0", package = "staging-parachain-info", default-features = false }
cumulus-primitives-parachain-inherent = "0.10.0"
cumulus-relay-chain-interface = "0.10.0"
color-print = "0.3.4"
cumulus-client-cli = "0.9.0"
cumulus-client-collator = "0.9.0"
cumulus-client-consensus-aura = "0.9.0"
cumulus-client-consensus-common = "0.9.0"
cumulus-client-consensus-proposer = "0.9.0"
cumulus-client-service = "0.9.0"
cumulus-client-cli = "0.10.0"
cumulus-client-collator = "0.10.0"
cumulus-client-consensus-aura = "0.10.0"
cumulus-client-consensus-common = "0.10.0"
cumulus-client-consensus-proposer = "0.10.0"
cumulus-client-service = "0.10.0"

# Paseo
asset-hub-paseo-runtime = { git = "https://github.com/paseo-network/runtimes/", tag = "v1.2.5-system-chains", default-features = false }
Expand Down
3 changes: 2 additions & 1 deletion node/src/command.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use std::{net::SocketAddr, path::PathBuf};

use cumulus_client_service::storage_proof_size::HostFunctions as ReclaimHostFunctions;
use cumulus_primitives_core::ParaId;
use frame_benchmarking_cli::{BenchmarkCmd, SUBSTRATE_REFERENCE_HARDWARE};
use log::info;
Expand Down Expand Up @@ -270,7 +271,7 @@ pub fn run() -> Result<()> {
match cmd {
BenchmarkCmd::Pallet(cmd) =>
if cfg!(feature = "runtime-benchmarks") {
runner.sync_run(|config| cmd.run::<sp_runtime::traits::HashingFor<Block>, ()>(config))
runner.sync_run(|config| cmd.run::<sp_runtime::traits::HashingFor<Block>, ReclaimHostFunctions>(config))
} else {
Err("Benchmarking wasn't enabled when building the node. \
You can enable it with `--features runtime-benchmarks`."
Expand Down
8 changes: 6 additions & 2 deletions node/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ use substrate_prometheus_endpoint::Registry;
pub struct DevnetRuntimeExecutor;

impl NativeExecutionDispatch for DevnetRuntimeExecutor {
type ExtendHostFunctions = frame_benchmarking::benchmarking::HostFunctions;
type ExtendHostFunctions = (
cumulus_client_service::storage_proof_size::HostFunctions,
frame_benchmarking::benchmarking::HostFunctions,
);

fn dispatch(method: &str, data: &[u8]) -> Option<Vec<u8>> {
pop_runtime_devnet::api::dispatch(method, data)
Expand Down Expand Up @@ -131,10 +134,11 @@ where
let executor = NativeElseWasmExecutor::<Executor>::new_with_wasm_executor(wasm);

let (client, backend, keystore_container, task_manager) =
sc_service::new_full_parts::<Block, RuntimeApi, _>(
sc_service::new_full_parts_record_import::<Block, RuntimeApi, _>(
config,
telemetry.as_ref().map(|(_, telemetry)| telemetry.handle()),
executor,
true,
)?;
let client = Arc::new(client);

Expand Down
2 changes: 2 additions & 0 deletions runtime/devnet/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ cumulus-pallet-xcmp-queue.workspace = true
cumulus-primitives-aura.workspace = true
cumulus-primitives-core.workspace = true
cumulus-primitives-utility.workspace = true
cumulus-primitives-storage-weight-reclaim.workspace = true
pallet-collator-selection.workspace = true
parachains-common.workspace = true
parachain-info.workspace = true
Expand All @@ -103,6 +104,7 @@ 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
4 changes: 3 additions & 1 deletion runtime/devnet/src/config/contracts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use frame_support::{
parameter_types,
traits::{ConstBool, ConstU32, Randomness},
};
use frame_system::pallet_prelude::BlockNumberFor;
use frame_system::{pallet_prelude::BlockNumberFor, EnsureSigned};

pub enum AllowBalancesCall {}

Expand Down Expand Up @@ -79,6 +79,8 @@ impl pallet_contracts::Config for Runtime {
type MaxStorageKeyLen = ConstU32<128>;
type MaxDebugBufferLen = ConstU32<{ 2 * 1024 * 1024 }>;
type UnsafeUnstableInterface = ConstBool<true>;
type UploadOrigin = EnsureSigned<Self::AccountId>;
type InstantiateOrigin = EnsureSigned<Self::AccountId>;
type CodeHashLockupDepositPercent = CodeHashLockupDepositPercent;
type MaxDelegateDependencies = ConstU32<32>;
type RuntimeHoldReason = RuntimeHoldReason;
Expand Down
6 changes: 3 additions & 3 deletions runtime/devnet/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ pub use pop_runtime_common::{
BLOCK_PROCESSING_VELOCITY, EXISTENTIAL_DEPOSIT, MICROUNIT, MILLIUNIT, NORMAL_DISPATCH_RATIO,
RELAY_CHAIN_SLOT_DURATION_MILLIS, UNIT,
};
pub use sp_runtime::{MultiAddress, Perbill, Permill};
pub use sp_runtime::{ExtrinsicInclusionMode, MultiAddress, Perbill, Permill};

#[cfg(any(feature = "std", test))]
pub use sp_runtime::BuildStorage;
Expand Down Expand Up @@ -260,7 +260,7 @@ impl Contains<RuntimeCall> for AllowedApiCalls {
/// 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.
#[derive_impl(frame_system::config_preludes::ParaChainDefaultConfig as frame_system::DefaultConfig)]
#[derive_impl(frame_system::config_preludes::ParaChainDefaultConfig)]
impl frame_system::Config for Runtime {
/// The identifier used to distinguish between accounts.
type AccountId = AccountId;
Expand Down Expand Up @@ -641,7 +641,7 @@ impl_runtime_apis! {
Executive::execute_block(block)
}

fn initialize_block(header: &<Block as BlockT>::Header) {
fn initialize_block(header: &<Block as BlockT>::Header) -> ExtrinsicInclusionMode {
Executive::initialize_block(header)
}
}
Expand Down
4 changes: 3 additions & 1 deletion runtime/testnet/src/config/contracts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use frame_support::{
parameter_types,
traits::{ConstBool, ConstU32, Randomness},
};
use frame_system::pallet_prelude::BlockNumberFor;
use frame_system::{pallet_prelude::BlockNumberFor, EnsureSigned};

pub enum AllowBalancesCall {}

Expand Down Expand Up @@ -79,6 +79,8 @@ impl pallet_contracts::Config for Runtime {
type MaxStorageKeyLen = ConstU32<128>;
type MaxDebugBufferLen = ConstU32<{ 2 * 1024 * 1024 }>;
type UnsafeUnstableInterface = ConstBool<true>;
type UploadOrigin = EnsureSigned<Self::AccountId>;
type InstantiateOrigin = EnsureSigned<Self::AccountId>;
type CodeHashLockupDepositPercent = CodeHashLockupDepositPercent;
type MaxDelegateDependencies = ConstU32<32>;
type RuntimeHoldReason = RuntimeHoldReason;
Expand Down
6 changes: 3 additions & 3 deletions runtime/testnet/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ pub use pop_runtime_common::{
MILLISECS_PER_BLOCK, MILLIUNIT, MINUTES, NORMAL_DISPATCH_RATIO,
RELAY_CHAIN_SLOT_DURATION_MILLIS, SLOT_DURATION, UNINCLUDED_SEGMENT_CAPACITY, UNIT,
};
pub use sp_runtime::{MultiAddress, Perbill, Permill};
pub use sp_runtime::{ExtrinsicInclusionMode, MultiAddress, Perbill, Permill};

#[cfg(any(feature = "std", test))]
pub use sp_runtime::BuildStorage;
Expand Down Expand Up @@ -264,7 +264,7 @@ impl Contains<RuntimeCall> for AllowedApiCalls {
/// 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.
#[derive_impl(frame_system::config_preludes::ParaChainDefaultConfig as frame_system::DefaultConfig)]
#[derive_impl(frame_system::config_preludes::ParaChainDefaultConfig)]
impl frame_system::Config for Runtime {
/// The identifier used to distinguish between accounts.
type AccountId = AccountId;
Expand Down Expand Up @@ -633,7 +633,7 @@ impl_runtime_apis! {
Executive::execute_block(block)
}

fn initialize_block(header: &<Block as BlockT>::Header) {
fn initialize_block(header: &<Block as BlockT>::Header) -> ExtrinsicInclusionMode{
Executive::initialize_block(header)
}
}
Expand Down
Loading