diff --git a/Cargo.lock b/Cargo.lock index 0aff3632da..513bd274b7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -16987,8 +16987,3 @@ dependencies = [ "cc", "pkg-config", ] - -[[patch.unused]] -name = "sp-core-hashing-proc-macro" -version = "15.0.0" -source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.7.2#0d7ca59fd4b4d15f9400971f32bc6a51b2fe837f" diff --git a/Cargo.toml b/Cargo.toml index 6a985417b0..b722be62e1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -354,7 +354,6 @@ sp-state-machine = { git = "https://github.com/paritytech/polkadot-sdk", branch sp-panic-handler = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.7.2" } sp-trie = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.7.2" } sp-version = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.7.2" } -sp-core-hashing-proc-macro = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.7.2" } sp-version-proc-macro = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.7.2" } cumulus-primitives-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.7.2" } staging-xcm = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.7.2" } diff --git a/ci/run-check.sh b/ci/run-check.sh index 8f63650325..0bc6dea814 100755 --- a/ci/run-check.sh +++ b/ci/run-check.sh @@ -10,7 +10,7 @@ cargo --version case $TARGET in cargo-build) - #cargo build -p centrifuge-chain --release "$@" + cargo build -p centrifuge-chain --release "$@" ;; test-general) diff --git a/pallets/restricted-tokens/src/benchmarking.rs b/pallets/restricted-tokens/src/benchmarking.rs index 1cc44527fd..bf985bf58b 100644 --- a/pallets/restricted-tokens/src/benchmarking.rs +++ b/pallets/restricted-tokens/src/benchmarking.rs @@ -361,7 +361,7 @@ benchmarks! { reserve_balance::(currency, &recv, reserved + reserved); }:set_balance(RawOrigin::Root, recv_loopup, currency.clone(), free, reserved) verify { - assert!( as fungible::InspectHold>::total_balance_on_hold(&recv) == reserved); + assert!( as fungibles::InspectHold>::total_balance_on_hold(currency, &recv) == reserved); assert!( as fungibles::Inspect>::reducible_balance(currency, &recv, Preservation::Protect, Fortitude::Polite) == free - as fungibles::Inspect>::minimum_balance(currency)); assert!( as fungibles::Inspect>::balance(currency, &recv) == (free)); } diff --git a/runtime/altair/src/lib.rs b/runtime/altair/src/lib.rs index 4488fb5b33..d42d3fc6bd 100644 --- a/runtime/altair/src/lib.rs +++ b/runtime/altair/src/lib.rs @@ -879,7 +879,7 @@ parameter_types! { pub const MaxSubAccounts: u32 = 100; pub const MaxAdditionalFields: u32 = 100; pub const BasicDeposit: Balance = 100 * AIR; - pub const ByteDeposit: Balance = deposit(0, 1); //TODO-1.7 + pub const ByteDeposit: Balance = deposit(0, 1); pub const SubAccountDeposit: Balance = 20 * AIR; pub const MaxRegistrars: u32 = 20; } @@ -937,6 +937,7 @@ parameter_types! { // periods between treasury spends pub const SpendPeriod: BlockNumber = 6 * DAYS; + pub const PayoutPeriod: BlockNumber = 30 * DAYS; // percentage of treasury we burn per Spend period if there is a surplus // If the treasury is able to spend on all the approved proposals and didn't miss any @@ -966,7 +967,7 @@ impl pallet_treasury::Config for Runtime { type OnSlash = Treasury; type PalletId = TreasuryPalletId; type Paymaster = PayFromAccount; - type PayoutPeriod = ConstU32<10>; + type PayoutPeriod = PayoutPeriod; type ProposalBond = ProposalBond; type ProposalBondMaximum = ProposalBondMaximum; type ProposalBondMinimum = ProposalBondMinimum; diff --git a/runtime/altair/src/xcm.rs b/runtime/altair/src/xcm.rs index 9e1975d585..ab0c2e231b 100644 --- a/runtime/altair/src/xcm.rs +++ b/runtime/altair/src/xcm.rs @@ -49,37 +49,6 @@ use super::{ RuntimeCall, RuntimeEvent, RuntimeOrigin, Tokens, XcmpQueue, }; -/// A call filter for the XCM Transact instruction. This is a temporary -/// measure until we properly account for proof size weights. -/// -/// Calls that are allowed through this filter must: -/// 1. Have a fixed weight; -/// 2. Cannot lead to another call being made; -/// 3. Have a defined proof size weight, e.g. no unbounded vecs in call -/// parameters. -/// -/// NOTE: Defensive configuration for now, inspired by filter of -/// SystemParachains and Polkadot, can be extended if desired. -pub struct SafeCallFilter; -impl frame_support::traits::Contains for SafeCallFilter { - fn contains(call: &RuntimeCall) -> bool { - matches!( - call, - RuntimeCall::Timestamp(..) - | RuntimeCall::Balances(..) - | RuntimeCall::Utility(pallet_utility::Call::as_derivative { .. }) - | RuntimeCall::PolkadotXcm( - pallet_xcm::Call::limited_reserve_transfer_assets { .. } - ) | RuntimeCall::XcmpQueue(..) - | RuntimeCall::MessageQueue(..) - | RuntimeCall::Proxy(..) - | RuntimeCall::LiquidityPoolsGateway( - pallet_liquidity_pools_gateway::Call::process_msg { .. } - ) | RuntimeCall::OrderBook(..) - ) - } -} - /// The main XCM config /// This is where we configure the core of our XCM integrations: how tokens are /// transferred, how fees are calculated, what barriers we impose on incoming @@ -104,7 +73,7 @@ impl staging_xcm_executor::Config for XcmConfig { type PalletInstancesInfo = crate::AllPalletsWithSystem; type ResponseHandler = PolkadotXcm; type RuntimeCall = RuntimeCall; - type SafeCallFilter = SafeCallFilter; + type SafeCallFilter = Everything; type SubscriptionService = PolkadotXcm; type Trader = Trader; type TransactionalProcessor = FrameTransactionalProcessor; diff --git a/runtime/centrifuge/src/lib.rs b/runtime/centrifuge/src/lib.rs index f3f0ab8f2b..3acefa9fdf 100644 --- a/runtime/centrifuge/src/lib.rs +++ b/runtime/centrifuge/src/lib.rs @@ -996,7 +996,7 @@ parameter_types! { pub const MaxSubAccounts: u32 = 100; pub const MaxAdditionalFields: u32 = 100; pub const BasicDeposit: Balance = 100 * CFG; - pub const ByteDeposit: Balance = deposit(0, 1); //TODO-1.7 + pub const ByteDeposit: Balance = deposit(0, 1); pub const SubAccountDeposit: Balance = 20 * CFG; pub const MaxRegistrars: u32 = 20; } @@ -1054,6 +1054,7 @@ parameter_types! { // periods between treasury spends pub const SpendPeriod: BlockNumber = 14 * DAYS; + pub const PayoutPeriod: BlockNumber = 30 * DAYS; // percentage of treasury we burn per Spend period if there is a surplus // If the treasury is able to spend on all the approved proposals and didn't miss any @@ -1083,7 +1084,7 @@ impl pallet_treasury::Config for Runtime { type OnSlash = Treasury; type PalletId = TreasuryPalletId; type Paymaster = PayFromAccount; - type PayoutPeriod = ConstU32<10>; + type PayoutPeriod = PayoutPeriod; type ProposalBond = ProposalBond; type ProposalBondMaximum = ProposalBondMaximum; type ProposalBondMinimum = ProposalBondMinimum; diff --git a/runtime/centrifuge/src/xcm.rs b/runtime/centrifuge/src/xcm.rs index 0c93b154fd..cd1da395a4 100644 --- a/runtime/centrifuge/src/xcm.rs +++ b/runtime/centrifuge/src/xcm.rs @@ -50,37 +50,6 @@ use super::{ RuntimeCall, RuntimeEvent, RuntimeOrigin, Tokens, XcmpQueue, }; -/// A call filter for the XCM Transact instruction. This is a temporary -/// measure until we properly account for proof size weights. -/// -/// Calls that are allowed through this filter must: -/// 1. Have a fixed weight; -/// 2. Cannot lead to another call being made; -/// 3. Have a defined proof size weight, e.g. no unbounded vecs in call -/// parameters. -/// -/// NOTE: Defensive configuration for now, inspired by filter of -/// SystemParachains and Polkadot, can be extended if desired. -pub struct SafeCallFilter; -impl frame_support::traits::Contains for SafeCallFilter { - fn contains(call: &RuntimeCall) -> bool { - matches!( - call, - RuntimeCall::Timestamp(..) - | RuntimeCall::Balances(..) - | RuntimeCall::Utility(pallet_utility::Call::as_derivative { .. }) - | RuntimeCall::PolkadotXcm( - pallet_xcm::Call::limited_reserve_transfer_assets { .. } - ) | RuntimeCall::XcmpQueue(..) - | RuntimeCall::MessageQueue(..) - | RuntimeCall::Proxy(..) - | RuntimeCall::LiquidityPoolsGateway( - pallet_liquidity_pools_gateway::Call::process_msg { .. } - ) | RuntimeCall::OrderBook(..) - ) - } -} - /// The main XCM config /// This is where we configure the core of our XCM integrations: how tokens are /// transferred, how fees are calculated, what barriers we impose on incoming @@ -105,7 +74,7 @@ impl staging_xcm_executor::Config for XcmConfig { type PalletInstancesInfo = crate::AllPalletsWithSystem; type ResponseHandler = PolkadotXcm; type RuntimeCall = RuntimeCall; - type SafeCallFilter = SafeCallFilter; + type SafeCallFilter = Everything; type SubscriptionService = PolkadotXcm; type Trader = Trader; type TransactionalProcessor = FrameTransactionalProcessor; diff --git a/runtime/development/src/lib.rs b/runtime/development/src/lib.rs index 17d7c601d9..b3fb6dbdd6 100644 --- a/runtime/development/src/lib.rs +++ b/runtime/development/src/lib.rs @@ -893,7 +893,7 @@ parameter_types! { pub const MaxSubAccounts: u32 = 100; pub const MaxAdditionalFields: u32 = 100; pub const BasicDeposit: Balance = 100 * CFG; - pub const ByteDeposit: Balance = deposit(0, 1); //TODO-1.7 + pub const ByteDeposit: Balance = deposit(0, 1); pub const SubAccountDeposit: Balance = 20 * CFG; pub const MaxRegistrars: u32 = 20; } @@ -987,6 +987,7 @@ parameter_types! { // periods between treasury spends pub const SpendPeriod: BlockNumber = 30 * DAYS; + pub const PayoutPeriod: BlockNumber = 30 * DAYS; // percentage of treasury we burn per Spend period if there is a surplus // If the treasury is able to spend on all the approved proposals and didn't miss any @@ -1018,7 +1019,7 @@ impl pallet_treasury::Config for Runtime { type OnSlash = Treasury; type PalletId = TreasuryPalletId; type Paymaster = PayFromAccount; - type PayoutPeriod = ConstU32<10>; + type PayoutPeriod = PayoutPeriod; type ProposalBond = ProposalBond; type ProposalBondMaximum = ProposalBondMaximum; type ProposalBondMinimum = ProposalBondMinimum; diff --git a/runtime/development/src/xcm.rs b/runtime/development/src/xcm.rs index 4d2b1e3543..b9efe50bed 100644 --- a/runtime/development/src/xcm.rs +++ b/runtime/development/src/xcm.rs @@ -49,37 +49,6 @@ use super::{ RuntimeCall, RuntimeEvent, RuntimeOrigin, Tokens, XcmpQueue, }; -/// A call filter for the XCM Transact instruction. This is a temporary -/// measure until we properly account for proof size weights. -/// -/// Calls that are allowed through this filter must: -/// 1. Have a fixed weight; -/// 2. Cannot lead to another call being made; -/// 3. Have a defined proof size weight, e.g. no unbounded vecs in call -/// parameters. -/// -/// NOTE: Defensive configuration for now, inspired by filter of -/// SystemParachains and Polkadot, can be extended if desired. -pub struct SafeCallFilter; -impl frame_support::traits::Contains for SafeCallFilter { - fn contains(call: &RuntimeCall) -> bool { - matches!( - call, - RuntimeCall::Timestamp(..) - | RuntimeCall::Balances(..) - | RuntimeCall::Utility(pallet_utility::Call::as_derivative { .. }) - | RuntimeCall::PolkadotXcm( - pallet_xcm::Call::limited_reserve_transfer_assets { .. } - ) | RuntimeCall::XcmpQueue(..) - | RuntimeCall::MessageQueue(..) - | RuntimeCall::Proxy(..) - | RuntimeCall::LiquidityPoolsGateway( - pallet_liquidity_pools_gateway::Call::process_msg { .. } - ) | RuntimeCall::OrderBook(..) - ) - } -} - /// The main XCM config /// This is where we configure the core of our XCM integrations: how tokens are /// transferred, how fees are calculated, what barriers we impose on incoming @@ -104,7 +73,7 @@ impl staging_xcm_executor::Config for XcmConfig { type PalletInstancesInfo = crate::AllPalletsWithSystem; type ResponseHandler = PolkadotXcm; type RuntimeCall = RuntimeCall; - type SafeCallFilter = SafeCallFilter; + type SafeCallFilter = Everything; type SubscriptionService = PolkadotXcm; type Trader = Trader; type TransactionalProcessor = FrameTransactionalProcessor;