difftreelog
fix make check
in: master
8 files changed
Cargo.lockdiffbeforeafterboth--- a/Cargo.lock
+++ b/Cargo.lock
@@ -10160,6 +10160,7 @@
"pallet-xcm",
"parity-scale-codec",
"polkadot-parachain-primitives",
+ "polkadot-runtime-common",
"precompile-utils-macro",
"scale-info",
"serde",
@@ -15037,6 +15038,7 @@
"pallet-xcm",
"parity-scale-codec",
"polkadot-parachain-primitives",
+ "polkadot-runtime-common",
"precompile-utils-macro",
"scale-info",
"serde",
Cargo.tomldiffbeforeafterboth--- a/Cargo.toml
+++ b/Cargo.toml
@@ -131,13 +131,12 @@
pallet-transaction-payment-rpc-runtime-api = { default-features = false, version = "25.0.0" }
pallet-treasury = { default-features = false, version = "24.0.0" }
pallet-utility = { default-features = false, version = "25.0.0" }
-pallet-xcm = { default-features = false , version = "4.0.0" }
-staging-parachain-info = { default-features = false, version = "0.4.0" }
+pallet-xcm = { default-features = false, version = "4.0.0" }
parity-scale-codec = { version = "3.6.5", features = ["derive"], default-features = false }
polkadot-cli = "4.0.0"
-polkadot-parachain-primitives = { default-features = false , version = "3.0.0" }
-polkadot-runtime-common = { default-features = false , version = "4.0.0" }
+polkadot-parachain-primitives = { default-features = false, version = "3.0.0" }
polkadot-primitives = "4.0.0"
+polkadot-runtime-common = { default-features = false, version = "4.0.0" }
polkadot-service = "4.0.0"
sc-basic-authorship = "0.31.0"
sc-chain-spec = "24.0.0"
@@ -179,9 +178,10 @@
sp-trie = { default-features = false, version = "26.0.0" }
sp-version = { default-features = false, version = "26.0.0" }
sp-weights = { default-features = false, version = "24.0.0" }
-staging-xcm = { default-features = false , version = "4.0.0" }
-staging-xcm-builder = { default-features = false , version = "4.0.0" }
-staging-xcm-executor = { default-features = false , version = "4.0.0" }
+staging-parachain-info = { default-features = false, version = "0.4.0" }
+staging-xcm = { default-features = false, version = "4.0.0" }
+staging-xcm-builder = { default-features = false, version = "4.0.0" }
+staging-xcm-executor = { default-features = false, version = "4.0.0" }
substrate-frame-rpc-system = "25.0.0"
substrate-prometheus-endpoint = "0.16.0"
@@ -216,4 +216,3 @@
num_enum = { version = "0.7.0", default-features = false }
serde = { default-features = false, features = ['derive'], version = "1.0.188" }
smallvec = "1.11.1"
-
pallets/inflation/Cargo.tomldiffbeforeafterboth--- a/pallets/inflation/Cargo.toml
+++ b/pallets/inflation/Cargo.toml
@@ -16,6 +16,7 @@
[features]
default = ['std']
+fast-inflation = []
runtime-benchmarks = ['frame-benchmarking']
std = [
'frame-benchmarking/std',
@@ -27,7 +28,6 @@
'sp-std/std',
]
try-runtime = ["frame-support/try-runtime"]
-fast-inflation = []
[dependencies]
parity-scale-codec = { workspace = true }
runtime/common/config/substrate.rsdiffbeforeafterboth1// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.2// This file is part of Unique Network.34// Unique Network is free software: you can redistribute it and/or modify5// it under the terms of the GNU General Public License as published by6// the Free Software Foundation, either version 3 of the License, or7// (at your option) any later version.89// Unique Network is distributed in the hope that it will be useful,10// but WITHOUT ANY WARRANTY; without even the implied warranty of11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the12// GNU General Public License for more details.1314// You should have received a copy of the GNU General Public License15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.1617use frame_support::{18 dispatch::DispatchClass,19 ord_parameter_types, parameter_types,20 traits::{21 tokens::{PayFromAccount, UnityAssetBalanceConversion},22 ConstBool, ConstU32, ConstU64, Everything, NeverEnsureOrigin,23 },24 weights::{25 constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight},26 ConstantMultiplier,27 },28 PalletId,29};30use frame_system::{31 limits::{BlockLength, BlockWeights},32 EnsureRoot, EnsureSignedBy,33};34use pallet_transaction_payment::{ConstFeeMultiplier, Multiplier};35use sp_arithmetic::traits::One;36use sp_runtime::{37 traits::{AccountIdLookup, BlakeTwo256, IdentityLookup},38 Perbill, Percent, Permill,39};40use sp_std::vec;41use up_common::{constants::*, types::*};4243use crate::{44 runtime_common::DealWithFees, Balances, Block, OriginCaller, PalletInfo, Runtime, RuntimeCall,45 RuntimeEvent, RuntimeFreezeReason, RuntimeHoldReason, RuntimeOrigin, SS58Prefix, System,46 Treasury, Version,47};4849parameter_types! {50 pub const BlockHashCount: BlockNumber = 2400;51 pub RuntimeBlockLength: BlockLength =52 BlockLength::max_with_normal_ratio(5 * 1024 * 1024, NORMAL_DISPATCH_RATIO);53 pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75);54 pub const MaximumBlockLength: u32 = 5 * 1024 * 1024;55 pub RuntimeBlockWeights: BlockWeights = BlockWeights::builder()56 .base_block(BlockExecutionWeight::get())57 .for_class(DispatchClass::all(), |weights| {58 weights.base_extrinsic = ExtrinsicBaseWeight::get();59 })60 .for_class(DispatchClass::Normal, |weights| {61 weights.max_total = Some(NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT);62 })63 .for_class(DispatchClass::Operational, |weights| {64 weights.max_total = Some(MAXIMUM_BLOCK_WEIGHT);65 // Operational transactions have some extra reserved space, so that they66 // are included even if block reached `MAXIMUM_BLOCK_WEIGHT`.67 weights.reserved = Some(68 MAXIMUM_BLOCK_WEIGHT - NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT69 );70 })71 .avg_block_initialization(AVERAGE_ON_INITIALIZE_RATIO)72 .build_or_panic();73}7475impl frame_system::Config for Runtime {76 /// The data to be stored in an account.77 type AccountData = pallet_balances::AccountData<Balance>;78 /// The identifier used to distinguish between accounts.79 type AccountId = AccountId;80 /// The basic call filter to use in dispatchable.81 type BaseCallFilter = Everything;82 /// Maximum number of block number to block hash mappings to keep (oldest pruned first).83 type BlockHashCount = BlockHashCount;84 /// The block type.85 type Block = Block;86 /// The maximum length of a block (in bytes).87 type BlockLength = RuntimeBlockLength;88 /// The weight of the overhead invoked on the block import process, independent of the extrinsics included in that block.89 type BlockWeights = RuntimeBlockWeights;90 /// The aggregated dispatch type that is available for extrinsics.91 type RuntimeCall = RuntimeCall;92 /// The weight of database operations that the runtime can invoke.93 type DbWeight = RocksDbWeight;94 /// The ubiquitous event type.95 type RuntimeEvent = RuntimeEvent;96 /// The type for hashing blocks and tries.97 type Hash = Hash;98 /// The hashing algorithm used.99 type Hashing = BlakeTwo256;100 /// The index type for storing how many extrinsics an account has signed.101 type Nonce = Nonce;102 /// The lookup mechanism to get account ID from whatever is passed in dispatchers.103 type Lookup = AccountIdLookup<AccountId, ()>;104 /// What to do if an account is fully reaped from the system.105 type OnKilledAccount = ();106 /// What to do if a new account is created.107 type OnNewAccount = ();108 type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode<Self>;109 /// The ubiquitous origin type.110 type RuntimeOrigin = RuntimeOrigin;111 /// This type is being generated by `construct_runtime!`.112 type PalletInfo = PalletInfo;113 /// This is used as an identifier of the chain. 42 is the generic substrate prefix.114 type SS58Prefix = SS58Prefix;115 /// Weight information for the extrinsics of this pallet.116 type SystemWeightInfo = frame_system::weights::SubstrateWeight<Self>;117 /// Version of the runtime.118 type Version = Version;119 type MaxConsumers = ConstU32<16>;120}121122parameter_types! {123 pub const MigrationMaxKeyLen: u32 = 512;124}125ord_parameter_types! {126 pub const TrieMigrationSigned: AccountId = AccountId::from(hex_literal::hex!("3e2ee9b68b52c239488e8abbeb31284c0d4342ec7c3b53f8e50855051d54a319"));127}128129impl pallet_state_trie_migration::Config for Runtime {130 type WeightInfo = pallet_state_trie_migration::weights::SubstrateWeight<Self>;131 type RuntimeEvent = RuntimeEvent;132 type Currency = Balances;133 type SignedDepositPerItem = ();134 type SignedDepositBase = ();135 type ControlOrigin = EnsureRoot<AccountId>;136 // Only root can perform this migration137 type SignedFilter = EnsureSignedBy<TrieMigrationSigned, AccountId>;138 type MaxKeyLen = MigrationMaxKeyLen;139}140141impl pallet_timestamp::Config for Runtime {142 /// A timestamp: milliseconds since the unix epoch.143 type Moment = u64;144 type OnTimestampSet = ();145 #[cfg(not(feature = "lookahead"))]146 type MinimumPeriod = ConstU64<{ SLOT_DURATION / 2 }>;147 #[cfg(feature = "lookahead")]148 type MinimumPeriod = ConstU64<0>;149 type WeightInfo = ();150}151152parameter_types! {153 // pub const ExistentialDeposit: u128 = 500;154 pub const ExistentialDeposit: u128 = EXISTENTIAL_DEPOSIT;155 pub const MaxLocks: u32 = 50;156 pub const MaxReserves: u32 = 50;157 pub const MaxHolds: u32 = 10;158 pub const MaxFreezes: u32 = 10;159}160161impl pallet_balances::Config for Runtime {162 type MaxLocks = MaxLocks;163 type MaxReserves = MaxReserves;164 type ReserveIdentifier = [u8; 16];165 /// The type for recording an account's balance.166 type Balance = Balance;167 /// The ubiquitous event type.168 type RuntimeEvent = RuntimeEvent;169 // FIXME: Is () the new treasury?170 // Switch to real treasury once we start having dust removals171 // Related issue: https://github.com/paritytech/polkadot/issues/7323172 type DustRemoval = ();173 type ExistentialDeposit = ExistentialDeposit;174 type AccountStore = System;175 type WeightInfo = pallet_balances::weights::SubstrateWeight<Self>;176 type RuntimeHoldReason = RuntimeHoldReason;177 type RuntimeFreezeReason = RuntimeFreezeReason;178 type FreezeIdentifier = [u8; 16];179 type MaxHolds = MaxHolds;180 type MaxFreezes = MaxFreezes;181}182183parameter_types! {184 /// This value increases the priority of `Operational` transactions by adding185 /// a "virtual tip" that's equal to the `OperationalFeeMultiplier * final_fee`.186 pub const OperationalFeeMultiplier: u8 = 5;187188 pub FeeMultiplier: Multiplier = Multiplier::one();189}190191impl pallet_transaction_payment::Config for Runtime {192 type RuntimeEvent = RuntimeEvent;193 type OnChargeTransaction = pallet_transaction_payment::CurrencyAdapter<Balances, DealWithFees>;194 type LengthToFee = ConstantMultiplier<Balance, TransactionByteFee>;195 type OperationalFeeMultiplier = OperationalFeeMultiplier;196 type WeightToFee = pallet_configuration::WeightToFee<Self, Balance>;197 type FeeMultiplierUpdate = ConstFeeMultiplier<FeeMultiplier>;198}199200parameter_types! {201 pub const ProposalBond: Permill = Permill::from_percent(5);202 pub const ProposalBondMinimum: Balance = 1 * UNIQUE;203 pub const ProposalBondMaximum: Balance = 1000 * UNIQUE;204 pub const SpendPeriod: BlockNumber = 5 * MINUTES;205 pub const Burn: Permill = Permill::from_percent(0);206 pub const TipCountdown: BlockNumber = 1 * DAYS;207 pub const TipFindersFee: Percent = Percent::from_percent(20);208 pub const TipReportDepositBase: Balance = 1 * UNIQUE;209 pub const DataDepositPerByte: Balance = 1 * CENTIUNIQUE;210 pub const BountyDepositBase: Balance = 1 * UNIQUE;211 pub const BountyDepositPayoutDelay: BlockNumber = 1 * DAYS;212 pub const TreasuryModuleId: PalletId = PalletId(*b"py/trsry");213 pub TreasuryAccount: AccountId = Treasury::account_id();214 pub const BountyUpdatePeriod: BlockNumber = 14 * DAYS;215 pub const MaximumReasonLength: u32 = 16384;216 pub const BountyCuratorDeposit: Permill = Permill::from_percent(50);217 pub const BountyValueMinimum: Balance = 5 * UNIQUE;218 pub const MaxApprovals: u32 = 100;219}220221impl pallet_treasury::Config for Runtime {222 type PalletId = TreasuryModuleId;223 type Currency = Balances;224 type ApproveOrigin = EnsureRoot<AccountId>;225 type RejectOrigin = EnsureRoot<AccountId>;226 type SpendOrigin = NeverEnsureOrigin<u128>;227 type RuntimeEvent = RuntimeEvent;228 type OnSlash = ();229 type ProposalBond = ProposalBond;230 type ProposalBondMinimum = ProposalBondMinimum;231 type ProposalBondMaximum = ProposalBondMaximum;232 type SpendPeriod = SpendPeriod;233 type Burn = Burn;234 type BurnDestination = ();235 type SpendFunds = ();236 type WeightInfo = pallet_treasury::weights::SubstrateWeight<Self>;237 type MaxApprovals = MaxApprovals;238 type AssetKind = ();239 type Beneficiary = AccountId;240 type BeneficiaryLookup = IdentityLookup<Self::Beneficiary>;241 type Paymaster = PayFromAccount<Balances, TreasuryAccount>;242 type BalanceConverter = UnityAssetBalanceConversion;243 type PayoutPeriod = ConstU32<10>;244}245246impl pallet_sudo::Config for Runtime {247 type RuntimeEvent = RuntimeEvent;248 type RuntimeCall = RuntimeCall;249 type WeightInfo = pallet_sudo::weights::SubstrateWeight<Self>;250}251252parameter_types! {253 pub const MaxAuthorities: u32 = 100_000;254}255256impl pallet_aura::Config for Runtime {257 type AuthorityId = AuraId;258 type DisabledValidators = ();259 type MaxAuthorities = MaxAuthorities;260 type AllowMultipleBlocksPerSlot = ConstBool<true>;261 #[cfg(feature = "lookahead")]262 type SlotDuration = ConstU64<SLOT_DURATION>;263}264265impl pallet_utility::Config for Runtime {266 type RuntimeEvent = RuntimeEvent;267 type RuntimeCall = RuntimeCall;268 type PalletsOrigin = OriginCaller;269 type WeightInfo = pallet_utility::weights::SubstrateWeight<Self>;270}runtime/common/tests/xcm.rsdiffbeforeafterboth--- a/runtime/common/tests/xcm.rs
+++ b/runtime/common/tests/xcm.rs
@@ -37,7 +37,7 @@
Box::new(VersionedXcm::from(Xcm(vec![Transact {
origin_kind: OriginKind::Native,
require_weight_at_most: Weight::from_parts(1000, 1000),
- call: RuntimeCall::Balances(pallet_balances::Call::<Runtime>::transfer {
+ call: RuntimeCall::Balances(pallet_balances::Call::<Runtime>::transfer_keep_alive {
dest: BOB.into(),
value: INITIAL_BALANCE / 2,
})
runtime/opal/Cargo.tomldiffbeforeafterboth--- a/runtime/opal/Cargo.toml
+++ b/runtime/opal/Cargo.toml
@@ -61,6 +61,7 @@
'pallet-unique/runtime-benchmarks',
'pallet-utility/runtime-benchmarks',
'pallet-xcm/runtime-benchmarks',
+ 'polkadot-runtime-common/runtime-benchmarks',
'sp-runtime/runtime-benchmarks',
'staging-xcm-builder/runtime-benchmarks',
]
@@ -126,7 +127,6 @@
'pallet-treasury/std',
'pallet-unique/std',
'pallet-utility/std',
- 'staging-parachain-info/std',
'polkadot-runtime-common/std',
'serde',
'sp-api/std',
@@ -141,6 +141,7 @@
'sp-storage/std',
'sp-transaction-pool/std',
'sp-version/std',
+ 'staging-parachain-info/std',
'staging-xcm-builder/std',
'staging-xcm-executor/std',
'staging-xcm/std',
@@ -221,12 +222,13 @@
'pallet-unique/try-runtime',
'pallet-utility/try-runtime',
'pallet-xcm/try-runtime',
+ 'polkadot-runtime-common/try-runtime',
'staging-parachain-info/try-runtime',
- 'polkadot-runtime-common/try-runtime',
]
app-promotion = []
collator-selection = []
+fast-inflation = []
foreign-assets = []
gov-test-timings = []
governance = []
@@ -234,7 +236,6 @@
preimage = []
refungible = []
session-test-timings = []
-fast-inflation = []
################################################################################
# local dependencies
@@ -271,7 +272,6 @@
pallet-treasury = { workspace = true }
pallet-utility = { workspace = true }
pallet-xcm = { workspace = true }
-staging-parachain-info = { workspace = true }
parity-scale-codec = { workspace = true }
polkadot-parachain-primitives = { workspace = true }
polkadot-runtime-common = { workspace = true }
@@ -290,6 +290,7 @@
sp-storage = { workspace = true }
sp-transaction-pool = { workspace = true }
sp-version = { workspace = true }
+staging-parachain-info = { workspace = true }
staging-xcm = { workspace = true }
staging-xcm-builder = { workspace = true }
staging-xcm-executor = { workspace = true }
runtime/quartz/Cargo.tomldiffbeforeafterboth--- a/runtime/quartz/Cargo.toml
+++ b/runtime/quartz/Cargo.toml
@@ -58,6 +58,7 @@
'pallet-unique/runtime-benchmarks',
'pallet-utility/runtime-benchmarks',
'pallet-xcm/runtime-benchmarks',
+ 'polkadot-runtime-common/runtime-benchmarks',
'sp-runtime/runtime-benchmarks',
'staging-xcm-builder/runtime-benchmarks',
]
@@ -126,7 +127,7 @@
'pallet-treasury/std',
'pallet-unique/std',
'pallet-utility/std',
- 'staging-parachain-info/std',
+ 'polkadot-runtime-common/std',
'serde',
'sp-api/std',
'sp-block-builder/std',
@@ -139,6 +140,7 @@
'sp-std/std',
'sp-transaction-pool/std',
'sp-version/std',
+ 'staging-parachain-info/std',
'staging-xcm-builder/std',
'staging-xcm-executor/std',
'staging-xcm/std',
@@ -210,18 +212,19 @@
'pallet-unique/try-runtime',
'pallet-utility/try-runtime',
'pallet-xcm/try-runtime',
+ 'polkadot-runtime-common/try-runtime',
'staging-parachain-info/try-runtime',
]
app-promotion = []
collator-selection = []
+fast-inflation = []
foreign-assets = []
gov-test-timings = []
governance = []
preimage = []
refungible = []
session-test-timings = []
-fast-inflation = []
################################################################################
# local dependencies
@@ -257,9 +260,9 @@
pallet-treasury = { workspace = true }
pallet-utility = { workspace = true }
pallet-xcm = { workspace = true }
-staging-parachain-info = { workspace = true }
parity-scale-codec = { workspace = true }
polkadot-parachain-primitives = { workspace = true }
+polkadot-runtime-common = { workspace = true }
smallvec = { workspace = true }
sp-api = { workspace = true }
sp-arithmetic = { workspace = true }
@@ -275,6 +278,7 @@
sp-storage = { workspace = true }
sp-transaction-pool = { workspace = true }
sp-version = { workspace = true }
+staging-parachain-info = { workspace = true }
staging-xcm = { workspace = true }
staging-xcm-builder = { workspace = true }
staging-xcm-executor = { workspace = true }
runtime/unique/Cargo.tomldiffbeforeafterboth--- a/runtime/unique/Cargo.toml
+++ b/runtime/unique/Cargo.toml
@@ -55,6 +55,7 @@
'pallet-unique/runtime-benchmarks',
'pallet-utility/runtime-benchmarks',
'pallet-xcm/runtime-benchmarks',
+ 'polkadot-runtime-common/runtime-benchmarks',
'sp-runtime/runtime-benchmarks',
'staging-xcm-builder/runtime-benchmarks',
'up-data-structs/runtime-benchmarks',
@@ -124,7 +125,7 @@
'pallet-treasury/std',
'pallet-unique/std',
'pallet-utility/std',
- 'staging-parachain-info/std',
+ 'polkadot-runtime-common/std',
'sp-api/std',
'sp-block-builder/std',
'sp-core/std',
@@ -136,6 +137,7 @@
'sp-std/std',
'sp-transaction-pool/std',
'sp-version/std',
+ 'staging-parachain-info/std',
'staging-xcm-builder/std',
'staging-xcm-executor/std',
'staging-xcm/std',
@@ -212,19 +214,20 @@
'pallet-unique/try-runtime',
'pallet-utility/try-runtime',
'pallet-xcm/try-runtime',
+ 'polkadot-runtime-common/try-runtime',
'staging-parachain-info/try-runtime',
]
-unique-runtime = ['app-promotion', 'foreign-assets', 'refungible', 'governance', 'preimage']
+unique-runtime = ['app-promotion', 'foreign-assets', 'governance', 'preimage', 'refungible']
app-promotion = []
collator-selection = []
+fast-inflation = []
foreign-assets = []
gov-test-timings = []
governance = []
preimage = []
refungible = []
session-test-timings = []
-fast-inflation = []
################################################################################
# local dependencies
@@ -260,9 +263,9 @@
pallet-treasury = { workspace = true }
pallet-utility = { workspace = true }
pallet-xcm = { workspace = true }
-staging-parachain-info = { workspace = true }
parity-scale-codec = { workspace = true }
polkadot-parachain-primitives = { workspace = true }
+polkadot-runtime-common = { workspace = true }
smallvec = { workspace = true }
sp-api = { workspace = true }
sp-arithmetic = { workspace = true }
@@ -278,6 +281,7 @@
sp-storage = { workspace = true }
sp-transaction-pool = { workspace = true }
sp-version = { workspace = true }
+staging-parachain-info = { workspace = true }
staging-xcm = { workspace = true }
staging-xcm-builder = { workspace = true }
staging-xcm-executor = { workspace = true }