--- a/node/cli/src/command.rs +++ b/node/cli/src/command.rs @@ -374,7 +374,7 @@ } #[cfg(feature = "unique-runtime")] Some(Subcommand::Benchmark(cmd)) => { - use frame_benchmarking_cli::BenchmarkCmd; + use frame_benchmarking_cli::{BenchmarkCmd, SUBSTRATE_REFERENCE_HARDWARE}; let runner = cli.create_runner(cmd)?; // Switch on the concrete benchmark sub-command- match cmd { @@ -406,7 +406,9 @@ cmd.run(config, partials.client.clone(), db, storage) }), - BenchmarkCmd::Machine(cmd) => runner.sync_run(|config| cmd.run(&config)), + BenchmarkCmd::Machine(cmd) => { + runner.sync_run(|config| cmd.run(&config, SUBSTRATE_REFERENCE_HARDWARE.clone())) + } BenchmarkCmd::Overhead(_) => Err("Unsupported benchmarking command".into()), } } --- a/runtime/quartz/src/lib.rs +++ b/runtime/quartz/src/lib.rs @@ -66,7 +66,6 @@ WeightToFeePolynomial, WeightToFeeCoefficient, WeightToFeeCoefficients, ConstantMultiplier, }, }; -use up_data_structs::*; // use pallet_contracts::weights::WeightInfo; // #[cfg(any(feature = "std", test))] use frame_system::{ @@ -82,7 +81,7 @@ use fp_rpc::TransactionStatus; use sp_runtime::{ traits::{ - Applyable, BlockNumberProvider, Dispatchable, PostDispatchInfoOf, Saturating, + Applyable, BlockNumberProvider, Dispatchable, PostDispatchInfoOf, DispatchInfoOf, Saturating, CheckedConversion, }, generic::Era, @@ -246,8 +245,8 @@ pub struct FixedFee; impl FeeCalculator for FixedFee { - fn min_gas_price() -> U256 { - MIN_GAS_PRICE.into() + fn min_gas_price() -> (U256, u64) { + (MIN_GAS_PRICE.into(), 0) } } @@ -862,8 +861,8 @@ } impl pallet_common::Config for Runtime { + type WeightInfo = pallet_common::weights::SubstrateWeight; type Event = Event; - type Currency = Balances; type CollectionCreationPrice = CollectionCreationPrice; type TreasuryAccountId = TreasuryAccountId; @@ -1249,9 +1248,14 @@ } } - fn validate_self_contained(&self, info: &Self::SignedInfo) -> Option { + fn validate_self_contained( + &self, + info: &Self::SignedInfo, + dispatch_info: &DispatchInfoOf, + len: usize, + ) -> Option { match self { - Call::Ethereum(call) => call.validate_self_contained(info), + Call::Ethereum(call) => call.validate_self_contained(info, dispatch_info, len), _ => None, } } --- a/runtime/unique/src/lib.rs +++ b/runtime/unique/src/lib.rs @@ -35,7 +35,7 @@ Permill, Perbill, Percent, create_runtime_str, generic, impl_opaque_keys, generic::Era, traits::{ - Applyable, BlockNumberProvider, Dispatchable, PostDispatchInfoOf, Saturating, + Applyable, BlockNumberProvider, Dispatchable, PostDispatchInfoOf, DispatchInfoOf, Saturating, CheckedConversion, AccountIdLookup, BlakeTwo256, Block as BlockT, AccountIdConversion, Zero, Member, }, @@ -75,14 +75,7 @@ DispatchClass, DispatchInfo, GetDispatchInfo, IdentityFee, Pays, PostDispatchInfo, Weight, WeightToFeePolynomial, WeightToFeeCoefficient, WeightToFeeCoefficients, ConstantMultiplier, }, -}; -use unique_runtime_common::{ - dispatch::{CollectionDispatchT, CollectionDispatch}, - weights::CommonWeights, - sponsoring::UniqueSponsorshipHandler, - eth_sponsoring::UniqueEthSponsorshipHandler, }; -use up_data_structs::*; // use pallet_contracts::weights::WeightInfo; // #[cfg(any(feature = "std", test))] use frame_system::{ @@ -124,7 +117,6 @@ Error as XcmError, }; use xcm_executor::traits::{MatchesFungible, WeightTrader}; -use sp_runtime::traits::CheckedConversion; use unique_runtime_common::{ impl_common_runtime_apis, @@ -248,8 +240,8 @@ pub struct FixedFee; impl FeeCalculator for FixedFee { - fn min_gas_price() -> U256 { - MIN_GAS_PRICE.into() + fn min_gas_price() -> (U256, u64) { + (MIN_GAS_PRICE.into(), 0) } } @@ -1250,9 +1242,14 @@ } } - fn validate_self_contained(&self, info: &Self::SignedInfo) -> Option { + fn validate_self_contained( + &self, + info: &Self::SignedInfo, + dispatch_info: &DispatchInfoOf, + len: usize, + ) -> Option { match self { - Call::Ethereum(call) => call.validate_self_contained(info), + Call::Ethereum(call) => call.validate_self_contained(info, dispatch_info, len), _ => None, } }