Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Adjust priority from CheckWeight extension #3743

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions runtime/kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ use primitives::v1::{
use runtime_common::{
auctions, claims, crowdloan, impls::DealWithFees, paras_registrar, slots, xcm_sender,
BlockHashCount, BlockLength, BlockWeights, CurrencyToVote, OffchainSolutionLengthLimit,
OffchainSolutionWeightLimit, RocksDbWeight, SlowAdjustingFeeUpdate, ToAuthor,
OffchainSolutionWeightLimit, RocksDbWeight, SlowAdjustingFeeUpdate, ToAuthor, MAXIMUM_BLOCK_WEIGHT
};
use sp_core::u32_trait::{_1, _2, _3, _5};
use sp_std::{collections::btree_map::BTreeMap, prelude::*};
Expand All @@ -49,6 +49,7 @@ use authority_discovery_primitives::AuthorityId as AuthorityDiscoveryId;
use beefy_primitives::crypto::AuthorityId as BeefyId;
use frame_support::{
construct_runtime, parameter_types,
signed_extensions::{AdjustPriority, Divide},
traits::{
Contains, Everything, InstanceFilter, KeyOwnerProofSystem, LockIdentifier, Nothing,
OnRuntimeUpgrade,
Expand Down Expand Up @@ -806,7 +807,7 @@ where
current_block,
)),
frame_system::CheckNonce::<Runtime>::from(nonce),
frame_system::CheckWeight::<Runtime>::new(),
frame_system::CheckWeight::<Runtime>::new().into(),
pallet_transaction_payment::ChargeTransactionPayment::<Runtime>::from(tip),
);
let raw_payload = SignedPayload::new(call, extra)
Expand Down Expand Up @@ -1484,7 +1485,7 @@ pub type SignedExtra = (
frame_system::CheckGenesis<Runtime>,
frame_system::CheckMortality<Runtime>,
frame_system::CheckNonce<Runtime>,
frame_system::CheckWeight<Runtime>,
AdjustPriority<frame_system::CheckWeight<Runtime>, Divide, MAXIMUM_BLOCK_WEIGHT>,
pallet_transaction_payment::ChargeTransactionPayment<Runtime>,
);
/// Unchecked extrinsic type as expected by this runtime.
Expand Down
7 changes: 4 additions & 3 deletions runtime/polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,14 @@ use pallet_transaction_payment::CurrencyAdapter;
use runtime_common::{
claims, impls::DealWithFees, AssignmentSessionKeyPlaceholder, BlockHashCount, BlockLength,
BlockWeights, CurrencyToVote, OffchainSolutionLengthLimit, OffchainSolutionWeightLimit,
ParachainSessionKeyPlaceholder, RocksDbWeight, SlowAdjustingFeeUpdate,
ParachainSessionKeyPlaceholder, RocksDbWeight, SlowAdjustingFeeUpdate, MAXIMUM_BLOCK_WEIGHT,
};

use authority_discovery_primitives::AuthorityId as AuthorityDiscoveryId;
use beefy_primitives::crypto::AuthorityId as BeefyId;
use frame_support::{
construct_runtime, parameter_types,
signed_extensions::{AdjustPriority, Divide},
traits::{Contains, KeyOwnerProofSystem, LockIdentifier, OnRuntimeUpgrade},
weights::Weight,
PalletId, RuntimeDebug,
Expand Down Expand Up @@ -806,7 +807,7 @@ where
current_block,
)),
frame_system::CheckNonce::<Runtime>::from(nonce),
frame_system::CheckWeight::<Runtime>::new(),
frame_system::CheckWeight::<Runtime>::new().into(),
pallet_transaction_payment::ChargeTransactionPayment::<Runtime>::from(tip),
claims::PrevalidateAttests::<Runtime>::new(),
);
Expand Down Expand Up @@ -1116,7 +1117,7 @@ pub type SignedExtra = (
frame_system::CheckGenesis<Runtime>,
frame_system::CheckMortality<Runtime>,
frame_system::CheckNonce<Runtime>,
frame_system::CheckWeight<Runtime>,
AdjustPriority<frame_system::CheckWeight<Runtime>, Divide, MAXIMUM_BLOCK_WEIGHT>,
pallet_transaction_payment::ChargeTransactionPayment<Runtime>,
claims::PrevalidateAttests<Runtime>,
);
Expand Down
7 changes: 4 additions & 3 deletions runtime/rococo/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ use authority_discovery_primitives::AuthorityId as AuthorityDiscoveryId;
use beefy_primitives::{crypto::AuthorityId as BeefyId, mmr::MmrLeafVersion};
use frame_support::{
construct_runtime, parameter_types,
signed_extensions::{AdjustPriority, Divide},
traits::{
Contains, Everything, IsInVec, KeyOwnerProofSystem, Nothing, OnRuntimeUpgrade, Randomness,
},
Expand All @@ -45,7 +46,7 @@ use primitives::v1::{
};
use runtime_common::{
auctions, crowdloan, impls::ToAuthor, paras_registrar, paras_sudo_wrapper, slots, xcm_sender,
BlockHashCount, BlockLength, BlockWeights, RocksDbWeight, SlowAdjustingFeeUpdate,
BlockHashCount, BlockLength, BlockWeights, RocksDbWeight, SlowAdjustingFeeUpdate, MAXIMUM_BLOCK_WEIGHT,
};
use runtime_parachains::{self, runtime_api_impl::v1 as runtime_api_impl};
use sp_core::{OpaqueMetadata, RuntimeDebug};
Expand Down Expand Up @@ -144,7 +145,7 @@ pub type SignedExtra = (
frame_system::CheckGenesis<Runtime>,
frame_system::CheckMortality<Runtime>,
frame_system::CheckNonce<Runtime>,
frame_system::CheckWeight<Runtime>,
AdjustPriority<frame_system::CheckWeight<Runtime>, Divide, MAXIMUM_BLOCK_WEIGHT>,
pallet_transaction_payment::ChargeTransactionPayment<Runtime>,
);

Expand Down Expand Up @@ -343,7 +344,7 @@ where
current_block,
)),
frame_system::CheckNonce::<Runtime>::from(nonce),
frame_system::CheckWeight::<Runtime>::new(),
frame_system::CheckWeight::<Runtime>::new().into(),
pallet_transaction_payment::ChargeTransactionPayment::<Runtime>::from(tip),
);
let raw_payload = SignedPayload::new(call, extra)
Expand Down
7 changes: 4 additions & 3 deletions runtime/westend/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ use primitives::v1::{
use runtime_common::{
auctions, crowdloan, impls::ToAuthor, paras_registrar, paras_sudo_wrapper, slots, xcm_sender,
BlockHashCount, BlockLength, BlockWeights, CurrencyToVote, OffchainSolutionLengthLimit,
OffchainSolutionWeightLimit, RocksDbWeight, SlowAdjustingFeeUpdate,
OffchainSolutionWeightLimit, RocksDbWeight, SlowAdjustingFeeUpdate, MAXIMUM_BLOCK_WEIGHT,
};
use sp_std::{collections::btree_map::BTreeMap, prelude::*};

Expand All @@ -58,6 +58,7 @@ use authority_discovery_primitives::AuthorityId as AuthorityDiscoveryId;
use beefy_primitives::crypto::AuthorityId as BeefyId;
use frame_support::{
construct_runtime, parameter_types,
signed_extensions::{AdjustPriority, Divide},
traits::{
Contains, Everything, InstanceFilter, KeyOwnerProofSystem, Nothing, OnRuntimeUpgrade,
},
Expand Down Expand Up @@ -528,7 +529,7 @@ where
current_block,
)),
frame_system::CheckNonce::<Runtime>::from(nonce),
frame_system::CheckWeight::<Runtime>::new(),
frame_system::CheckWeight::<Runtime>::new().into(),
pallet_transaction_payment::ChargeTransactionPayment::<Runtime>::from(tip),
);
let raw_payload = SignedPayload::new(call, extra)
Expand Down Expand Up @@ -1067,7 +1068,7 @@ pub type SignedExtra = (
frame_system::CheckGenesis<Runtime>,
frame_system::CheckMortality<Runtime>,
frame_system::CheckNonce<Runtime>,
frame_system::CheckWeight<Runtime>,
AdjustPriority<frame_system::CheckWeight<Runtime>, Divide, MAXIMUM_BLOCK_WEIGHT>,
pallet_transaction_payment::ChargeTransactionPayment<Runtime>,
);
/// Unchecked extrinsic type as expected by this runtime.
Expand Down