mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 06:21:11 +00:00
Companion for Weight v1.5 (#5943)
* fix to latest substrate pr
* update weights
* cargo build -p polkadot-runtime-parachains
* fix xcm-builder
* fix import
* fix a bunch
* fix a bunch of weight stuff
* kusama compile
* unused
* builds
* maybe fix
* cargo test -p polkadot-runtime-parachains
* xcm simulator example
* fix tests
* xcm sim fuzz
* fix runtime tests
* remove unused
* fix integration tests
* scalar div
* update lockfile for {"substrate"}
Co-authored-by: parity-processbot <>
This commit is contained in:
@@ -74,7 +74,7 @@ pub mod fee {
|
||||
type Balance = Balance;
|
||||
fn polynomial() -> WeightToFeeCoefficients<Self::Balance> {
|
||||
let p = super::currency::CENTS;
|
||||
let q = 10 * Balance::from(ExtrinsicBaseWeight::get());
|
||||
let q = 10 * Balance::from(ExtrinsicBaseWeight::get().ref_time());
|
||||
smallvec![WeightToFeeCoefficient {
|
||||
degree: 1,
|
||||
negative: false,
|
||||
|
||||
@@ -23,7 +23,7 @@ pub mod constants {
|
||||
|
||||
parameter_types! {
|
||||
/// Importing a block with 0 Extrinsics.
|
||||
pub const BlockExecutionWeight: Weight = 5_000_000 * constants::WEIGHT_PER_NANOS;
|
||||
pub const BlockExecutionWeight: Weight = constants::WEIGHT_PER_NANOS.scalar_saturating_mul(5_000_000);
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
||||
@@ -23,7 +23,7 @@ pub mod constants {
|
||||
|
||||
parameter_types! {
|
||||
/// Executing a NO-OP `System::remarks` Extrinsic.
|
||||
pub const ExtrinsicBaseWeight: Weight = 125_000 * constants::WEIGHT_PER_NANOS;
|
||||
pub const ExtrinsicBaseWeight: Weight = constants::WEIGHT_PER_NANOS.scalar_saturating_mul(125_000);
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
||||
@@ -25,8 +25,8 @@ pub mod constants {
|
||||
/// `ParityDB` can be enabled with a feature flag, but is still experimental. These weights
|
||||
/// are available for brave runtime engineers who may want to try this out as default.
|
||||
pub const ParityDbWeight: RuntimeDbWeight = RuntimeDbWeight {
|
||||
read: 8_000 * constants::WEIGHT_PER_NANOS,
|
||||
write: 50_000 * constants::WEIGHT_PER_NANOS,
|
||||
read: 8_000 * constants::WEIGHT_PER_NANOS.ref_time(),
|
||||
write: 50_000 * constants::WEIGHT_PER_NANOS.ref_time(),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -25,8 +25,8 @@ pub mod constants {
|
||||
/// By default, Substrate uses `RocksDB`, so this will be the weight used throughout
|
||||
/// the runtime.
|
||||
pub const RocksDbWeight: RuntimeDbWeight = RuntimeDbWeight {
|
||||
read: 25_000 * constants::WEIGHT_PER_NANOS,
|
||||
write: 100_000 * constants::WEIGHT_PER_NANOS,
|
||||
read: 25_000 * constants::WEIGHT_PER_NANOS.ref_time(),
|
||||
write: 100_000 * constants::WEIGHT_PER_NANOS.ref_time(),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -518,7 +518,7 @@ impl parachains_paras::Config for Runtime {
|
||||
impl parachains_dmp::Config for Runtime {}
|
||||
|
||||
parameter_types! {
|
||||
pub const FirstMessageFactorPercent: u64 = 100;
|
||||
pub const FirstMessageFactorPercent: Weight = Weight::from_ref_time(100);
|
||||
}
|
||||
|
||||
impl parachains_ump::Config for Runtime {
|
||||
@@ -530,7 +530,7 @@ impl parachains_ump::Config for Runtime {
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
pub const BaseXcmWeight: frame_support::weights::Weight = 1_000;
|
||||
pub const BaseXcmWeight: xcm::latest::Weight = 1_000;
|
||||
pub const AnyNetwork: xcm::latest::NetworkId = xcm::latest::NetworkId::Any;
|
||||
pub const MaxInstructions: u32 = 100;
|
||||
}
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use frame_support::{parameter_types, traits::Everything, weights::Weight};
|
||||
use xcm::latest::prelude::*;
|
||||
use frame_support::{parameter_types, traits::Everything};
|
||||
use xcm::latest::{prelude::*, Weight as XCMWeight};
|
||||
use xcm_builder::{AllowUnpaidExecutionFrom, FixedWeightBounds, SignedToAccountId32};
|
||||
use xcm_executor::{
|
||||
traits::{InvertLocation, TransactAsset, WeightTrader},
|
||||
@@ -61,7 +61,7 @@ impl WeightTrader for DummyWeightTrader {
|
||||
DummyWeightTrader
|
||||
}
|
||||
|
||||
fn buy_weight(&mut self, _weight: Weight, _payment: Assets) -> Result<Assets, XcmError> {
|
||||
fn buy_weight(&mut self, _weight: XCMWeight, _payment: Assets) -> Result<Assets, XcmError> {
|
||||
Ok(Assets::default())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user