mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 04:01:02 +00:00
Update Substrate Dependency (#566)
* Update `sp-io` dependency * Rename Trait to Config * RustFmt * Bump `sp-io` again * Use new frame_system weight types in Rialto and Millau runtimes * Update test Runtimes to use new weight types * Bump `sp-io` again * Update to not-the latest first. * Update benchmarks. * Another Trai. * Move new weight types into runtime primitive crates This allows us to check limits for extrinsics from other parts of the codebase without pulling in the entire chain runtime. * Remove leftover comments * Move new functions to a better location * Small formatting fixes * Add actual documentation to new weight config types * Decrease maximum block weight of Millau chain * Decreease maximum block length of Millau chain Co-authored-by: Tomasz Drwięga <tomasz@parity.io>
This commit is contained in:
committed by
Bastian Köcher
parent
8a5b51a944
commit
ee655b1057
@@ -89,12 +89,12 @@ impl MessageBridge for WithMillauMessageBridge {
|
||||
type BridgedChain = Millau;
|
||||
|
||||
fn maximal_extrinsic_size_on_target_chain() -> u32 {
|
||||
bp_millau::MAXIMUM_EXTRINSIC_SIZE
|
||||
bp_millau::max_extrinsic_size()
|
||||
}
|
||||
|
||||
fn weight_limits_of_message_on_bridged_chain(message_payload: &[u8]) -> RangeInclusive<Weight> {
|
||||
// we don't want to relay too large messages + keep reserve for future upgrades
|
||||
let upper_limit = bp_millau::MAXIMUM_EXTRINSIC_WEIGHT / 2;
|
||||
let upper_limit = bp_millau::max_extrinsic_weight() / 2;
|
||||
|
||||
// given Millau chain parameters (`TransactionByteFee`, `WeightToFee`, `FeeMultiplierUpdate`),
|
||||
// the minimal weight of the message may be computed as message.length()
|
||||
@@ -116,12 +116,12 @@ impl MessageBridge for WithMillauMessageBridge {
|
||||
}
|
||||
|
||||
fn this_weight_to_this_balance(weight: Weight) -> bp_rialto::Balance {
|
||||
<crate::Runtime as pallet_transaction_payment::Trait>::WeightToFee::calc(&weight)
|
||||
<crate::Runtime as pallet_transaction_payment::Config>::WeightToFee::calc(&weight)
|
||||
}
|
||||
|
||||
fn bridged_weight_to_bridged_balance(weight: Weight) -> bp_millau::Balance {
|
||||
// we're using the same weights in both chains now
|
||||
<crate::Runtime as pallet_transaction_payment::Trait>::WeightToFee::calc(&weight) as _
|
||||
<crate::Runtime as pallet_transaction_payment::Config>::WeightToFee::calc(&weight) as _
|
||||
}
|
||||
|
||||
fn this_balance_to_bridged_balance(this_balance: bp_rialto::Balance) -> bp_millau::Balance {
|
||||
|
||||
Reference in New Issue
Block a user