Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Bridge-Hubs - Add proxy pallet ([#1045](https://github.com/polkadot-fellows/runtimes/pull/1045)).
- AH Polkadot - A new stepped curve primitive. Used for the 'Hard Pressure' inflation changes from [Ref 1710](https://polkadot.subsquare.io/referenda/1710) ([#898](https://github.com/polkadot-fellows/runtimes/pull/898)).
- AH Polkadot - Added `pallet_revive` and changed proof size fee formula ([polkadot-fellows/runtimes/pull/1050](https://github.com/polkadot-fellows/runtimes/pull/1050))
- Add `cumulus-pallet-weight-reclaim` to all Polkadot system parachains (Asset Hub, Bridge Hub, Coretime, People, Collectives) for storage weight reclaim functionality ([#1047](https://github.com/polkadot-fellows/runtimes/pull/1047)).

### Changed

Expand Down
5 changes: 5 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions system-parachains/asset-hubs/asset-hub-polkadot/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ xcm-runtime-apis = { workspace = true }
cumulus-pallet-aura-ext = { workspace = true }
cumulus-pallet-parachain-system = { workspace = true }
cumulus-pallet-session-benchmarking = { workspace = true }
cumulus-pallet-weight-reclaim = { workspace = true }
cumulus-pallet-xcm = { workspace = true }
cumulus-pallet-xcmp-queue = { features = ["bridging"], workspace = true }
cumulus-primitives-aura = { workspace = true }
Expand Down Expand Up @@ -167,6 +168,7 @@ runtime-benchmarks = [
"bp-bridge-hub-polkadot/runtime-benchmarks",
"cumulus-pallet-parachain-system/runtime-benchmarks",
"cumulus-pallet-session-benchmarking/runtime-benchmarks",
"cumulus-pallet-weight-reclaim/runtime-benchmarks",
"cumulus-pallet-xcmp-queue/runtime-benchmarks",
"cumulus-primitives-core/runtime-benchmarks",
"cumulus-primitives-utility/runtime-benchmarks",
Expand Down Expand Up @@ -239,6 +241,7 @@ try-runtime = [
"assets-common/try-runtime",
"cumulus-pallet-aura-ext/try-runtime",
"cumulus-pallet-parachain-system/try-runtime",
"cumulus-pallet-weight-reclaim/try-runtime",
"cumulus-pallet-xcm/try-runtime",
"cumulus-pallet-xcmp-queue/try-runtime",
"frame-election-provider-support/try-runtime",
Expand Down Expand Up @@ -311,6 +314,7 @@ std = [
"cumulus-pallet-aura-ext/std",
"cumulus-pallet-parachain-system/std",
"cumulus-pallet-session-benchmarking/std",
"cumulus-pallet-weight-reclaim/std",
"cumulus-pallet-xcm/std",
"cumulus-pallet-xcmp-queue/std",
"cumulus-primitives-aura/std",
Expand Down
34 changes: 22 additions & 12 deletions system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1454,6 +1454,10 @@ impl pallet_revive::Config for Runtime {
type GasScale = ConstU32<80_000>;
}

impl cumulus_pallet_weight_reclaim::Config for Runtime {
type WeightInfo = weights::cumulus_pallet_weight_reclaim::WeightInfo<Runtime>;
}

Comment thread
skunert marked this conversation as resolved.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A whitespace-only line was added (diff shows a standalone added line). Remove trailing whitespace/blank lines containing spaces to avoid formatting/CI checks that fail on whitespace-only changes.

// Create the runtime by composing the FRAME pallets that were previously configured.
construct_runtime!(
pub enum Runtime
Expand All @@ -1467,6 +1471,7 @@ construct_runtime!(
Preimage: pallet_preimage = 5,
Scheduler: pallet_scheduler = 6,
Parameters: pallet_parameters = 7,
WeightReclaim: cumulus_pallet_weight_reclaim = 8,

// Monetary stuff.
Balances: pallet_balances = 10,
Expand Down Expand Up @@ -1546,18 +1551,21 @@ pub type SignedBlock = generic::SignedBlock<Block>;
/// BlockId type as expected by this runtime.
pub type BlockId = generic::BlockId<Block>;
/// The `TransactionExtension` to the basic transaction logic.
pub type TxExtension = (
frame_system::CheckNonZeroSender<Runtime>,
frame_system::CheckSpecVersion<Runtime>,
frame_system::CheckTxVersion<Runtime>,
frame_system::CheckGenesis<Runtime>,
frame_system::CheckEra<Runtime>,
frame_system::CheckNonce<Runtime>,
frame_system::CheckWeight<Runtime>,
pallet_asset_conversion_tx_payment::ChargeAssetTxPayment<Runtime>,
frame_metadata_hash_extension::CheckMetadataHash<Runtime>,
pallet_revive::evm::tx_extension::SetOrigin<Runtime>,
);
pub type TxExtension = cumulus_pallet_weight_reclaim::StorageWeightReclaim<
Runtime,
(
frame_system::CheckNonZeroSender<Runtime>,
frame_system::CheckSpecVersion<Runtime>,
frame_system::CheckTxVersion<Runtime>,
frame_system::CheckGenesis<Runtime>,
frame_system::CheckEra<Runtime>,
frame_system::CheckNonce<Runtime>,
frame_system::CheckWeight<Runtime>,
pallet_asset_conversion_tx_payment::ChargeAssetTxPayment<Runtime>,
frame_metadata_hash_extension::CheckMetadataHash<Runtime>,
pallet_revive::evm::tx_extension::SetOrigin<Runtime>,
),
>;
Comment thread
skunert marked this conversation as resolved.

/// Default extensions applied to Ethereum transactions.
#[derive(Clone, PartialEq, Eq, Debug)]
Expand All @@ -1580,6 +1588,7 @@ impl pallet_revive::evm::runtime::EthExtra for EthExtraImpl {
frame_metadata_hash_extension::CheckMetadataHash::<Runtime>::new(false),
pallet_revive::evm::tx_extension::SetOrigin::<Runtime>::new_from_eth_transaction(),
)
.into()
}
}

Expand Down Expand Up @@ -1716,6 +1725,7 @@ mod benches {
[pallet_transaction_payment, TransactionPayment]
[pallet_collator_selection, CollatorSelection]
[cumulus_pallet_parachain_system, ParachainSystem]
[cumulus_pallet_weight_reclaim, WeightReclaim]
[cumulus_pallet_xcmp_queue, XcmpQueue]
[pallet_conviction_voting, ConvictionVoting]
[pallet_referenda, Referenda]
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions system-parachains/bridge-hubs/bridge-hub-polkadot/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ xcm-runtime-apis = { workspace = true }
cumulus-pallet-aura-ext = { workspace = true }
cumulus-pallet-parachain-system = { workspace = true }
cumulus-pallet-session-benchmarking = { workspace = true }
cumulus-pallet-weight-reclaim = { workspace = true }
cumulus-pallet-xcm = { workspace = true }
cumulus-pallet-xcmp-queue = { features = ["bridging"], workspace = true }
cumulus-primitives-aura = { workspace = true }
Expand Down Expand Up @@ -155,6 +156,7 @@ std = [
"cumulus-pallet-aura-ext/std",
"cumulus-pallet-parachain-system/std",
"cumulus-pallet-session-benchmarking/std",
"cumulus-pallet-weight-reclaim/std",
"cumulus-pallet-xcm/std",
"cumulus-pallet-xcmp-queue/std",
"cumulus-primitives-aura/std",
Expand Down Expand Up @@ -246,6 +248,7 @@ runtime-benchmarks = [
"bridge-runtime-common/runtime-benchmarks",
"cumulus-pallet-parachain-system/runtime-benchmarks",
"cumulus-pallet-session-benchmarking/runtime-benchmarks",
"cumulus-pallet-weight-reclaim/runtime-benchmarks",
"cumulus-pallet-xcmp-queue/runtime-benchmarks",
"cumulus-primitives-core/runtime-benchmarks",
"cumulus-primitives-utility/runtime-benchmarks",
Expand Down Expand Up @@ -296,6 +299,7 @@ runtime-benchmarks = [
try-runtime = [
"cumulus-pallet-aura-ext/try-runtime",
"cumulus-pallet-parachain-system/try-runtime",
"cumulus-pallet-weight-reclaim/try-runtime",
"cumulus-pallet-xcm/try-runtime",
"cumulus-pallet-xcmp-queue/try-runtime",
"frame-executive/try-runtime",
Expand Down
35 changes: 22 additions & 13 deletions system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,19 +116,22 @@ pub type SignedBlock = generic::SignedBlock<Block>;
pub type BlockId = generic::BlockId<Block>;

/// The `TransactionExtension` to the basic transaction logic.
pub type TxExtension = (
frame_system::CheckNonZeroSender<Runtime>,
frame_system::CheckSpecVersion<Runtime>,
frame_system::CheckTxVersion<Runtime>,
frame_system::CheckGenesis<Runtime>,
frame_system::CheckEra<Runtime>,
frame_system::CheckNonce<Runtime>,
frame_system::CheckWeight<Runtime>,
pallet_transaction_payment::ChargeTransactionPayment<Runtime>,
BridgeRejectObsoleteHeadersAndMessages,
bridge_to_kusama_config::OnBridgeHubPolkadotRefundBridgeHubKusamaMessages,
frame_metadata_hash_extension::CheckMetadataHash<Runtime>,
);
pub type TxExtension = cumulus_pallet_weight_reclaim::StorageWeightReclaim<
Runtime,
(
frame_system::CheckNonZeroSender<Runtime>,
frame_system::CheckSpecVersion<Runtime>,
frame_system::CheckTxVersion<Runtime>,
frame_system::CheckGenesis<Runtime>,
frame_system::CheckEra<Runtime>,
frame_system::CheckNonce<Runtime>,
frame_system::CheckWeight<Runtime>,
pallet_transaction_payment::ChargeTransactionPayment<Runtime>,
BridgeRejectObsoleteHeadersAndMessages,
bridge_to_kusama_config::OnBridgeHubPolkadotRefundBridgeHubKusamaMessages,
frame_metadata_hash_extension::CheckMetadataHash<Runtime>,
),
>;
Comment thread
skunert marked this conversation as resolved.

bridge_runtime_common::generate_bridge_reject_obsolete_headers_and_messages! {
RuntimeCall, AccountId,
Expand Down Expand Up @@ -652,6 +655,10 @@ impl pallet_proxy::Config for Runtime {
type BlockNumberProvider = System;
}

impl cumulus_pallet_weight_reclaim::Config for Runtime {
type WeightInfo = weights::cumulus_pallet_weight_reclaim::WeightInfo<Runtime>;
}

Comment thread
skunert marked this conversation as resolved.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A whitespace-only line was added (diff shows a standalone added line). Remove trailing whitespace/blank lines containing spaces to avoid formatting/CI checks that fail on whitespace-only changes.

// Create the runtime by composing the FRAME pallets that were previously configured.
construct_runtime!(
pub enum Runtime
Expand All @@ -661,6 +668,7 @@ construct_runtime!(
ParachainSystem: cumulus_pallet_parachain_system = 1,
Timestamp: pallet_timestamp = 2,
ParachainInfo: parachain_info = 3,
WeightReclaim: cumulus_pallet_weight_reclaim = 4,

// Monetary stuff.
Balances: pallet_balances = 10,
Expand Down Expand Up @@ -733,6 +741,7 @@ mod benches {
[pallet_transaction_payment, TransactionPayment]
[pallet_collator_selection, CollatorSelection]
[cumulus_pallet_parachain_system, ParachainSystem]
[cumulus_pallet_weight_reclaim, WeightReclaim]
[cumulus_pallet_xcmp_queue, XcmpQueue]
// XCM
[pallet_xcm, PalletXcmExtrinsicsBenchmark::<Runtime>]
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,8 @@ fn construct_extrinsic(
BridgeRejectObsoleteHeadersAndMessages,
(OnBridgeHubPolkadotRefundBridgeHubKusamaMessages::default()),
frame_metadata_hash_extension::CheckMetadataHash::<Runtime>::new(false),
);
)
.into();
Comment thread
skunert marked this conversation as resolved.
Comment thread
skunert marked this conversation as resolved.
let payload = SignedPayload::new(call.clone(), extra.clone()).unwrap();
let signature = payload.using_encoded(|e| sender.sign(e));
UncheckedExtrinsic::new_signed(call, account_id.into(), Signature::Sr25519(signature), extra)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ fn construct_extrinsic(
BridgeRejectObsoleteHeadersAndMessages,
(OnBridgeHubPolkadotRefundBridgeHubKusamaMessages::default()),
frame_metadata_hash_extension::CheckMetadataHash::<Runtime>::new(false),
);
)
.into();
Comment thread
skunert marked this conversation as resolved.
Comment thread
skunert marked this conversation as resolved.
let payload = SignedPayload::new(call.clone(), extra.clone()).unwrap();
let signature = payload.using_encoded(|e| sender.sign(e));
UncheckedExtrinsic::new_signed(call, account_id.into(), Signature::Sr25519(signature), extra)
Expand Down
Loading