Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
8cbb9ba
chore: :arrow_up: upgrade dependencies to 2506
manuelmauro Oct 8, 2025
b86021d
refactor: :rotating_light: use workspace dependencies in pallet crowd…
manuelmauro Oct 8, 2025
a598df1
chore: :pushpin: depend on crates.io ethereum (similarly to frontier)
manuelmauro Oct 8, 2025
e701446
fix: :bug: remove PassByCodec
manuelmauro Oct 8, 2025
3711cf1
fix: :bug: use Weight::MAX instead of Weight::max_value()
manuelmauro Oct 8, 2025
382ec9d
fix: :bug: add TrieCacheContext parameter to state_at
manuelmauro Oct 9, 2025
007e9e3
fix: :bug: add missing relay_parent_descendants and collator_peer_id …
manuelmauro Oct 9, 2025
cedd38d
fix: :bug: remove deprecated AssetHubMigrationStarted config
manuelmauro Oct 9, 2025
32dac0b
fix: :bug: update ExecuteXcm::prepare() to accept weight_limit parameter
manuelmauro Oct 10, 2025
773ca24
fix: :bug: add generic parameters to Sha3FIPS256<Runtime, ()>
manuelmauro Oct 10, 2025
92402e7
fix: :bug: add metrics field to BuildNetworkParams
manuelmauro Oct 10, 2025
f44e21c
chore: :pushpin: upgrade pins
manuelmauro Oct 10, 2025
5fa1d69
fix: :bug: add OnNewHead to bridge parachain configs
manuelmauro Oct 10, 2025
ca028d3
fix: :bug: add relay chain slot duration to FixedVelocityConsensusHook
manuelmauro Oct 10, 2025
b1cb687
fix: :bug: add SlotDuration trait items
manuelmauro Oct 10, 2025
8faaf24
fix: :bug: add RelayParentOffset trait item
manuelmauro Oct 10, 2025
73ef1d5
fix: :bug: refactor build_relay_chain_interface to return only requir…
manuelmauro Oct 23, 2025
e6fff38
fix: :bug: fixed RuntimeOrigin trait bounds by removing From<Option<A…
manuelmauro Oct 23, 2025
7cd0ec9
fix: :bug: update cumulus_pallet_xcmp_queue WeightInfo methods
manuelmauro Oct 23, 2025
b3b4fb6
fix: :bug: fix AccountId ambiguity
manuelmauro Oct 23, 2025
573face
fix: :bug: use QueueFootprintQuery trait for message queue footprint …
manuelmauro Oct 23, 2025
ab65849
fix: :bug: remove deprecated RuntimeEvent
manuelmauro Oct 27, 2025
e48d9e4
fix: :bug: update the runtime interface to use explicit marshalling s…
manuelmauro Oct 27, 2025
074aa60
fix: :bug: do not enable SharedTrieCache
manuelmauro Oct 27, 2025
bdb334e
fix: :bug: implement BenchmarkHelper
manuelmauro Oct 27, 2025
630b760
fix: :bug: remove PalletTransactionPaymentBenchmark
manuelmauro Oct 27, 2025
741b87a
fix: :bug: add missing crate in Cargo feature
manuelmauro Oct 27, 2025
dd70d3a
fix: :bug: remove RuntimeEvent associated type
manuelmauro Oct 29, 2025
5aac4e8
fix: :bug: remove unused imports
manuelmauro Oct 30, 2025
c6e47be
fix: :bug: remove RuntimeEvent associated type
manuelmauro Oct 30, 2025
e88e4e4
fix: :bug: remove AssetHubMigrationStarted associated type
manuelmauro Oct 30, 2025
6c71103
fix: :bug: add RelayParentOffset associated type
manuelmauro Oct 30, 2025
f441553
fix: :bug: add metrics_registry: None to database configuration
manuelmauro Oct 30, 2025
0f34df2
fix: :bug: add warm_up_trie_cache: None to service configuration
manuelmauro Oct 30, 2025
51ce202
fix: :bug: fix reference to deprecated RuntimeEvent associated type
manuelmauro Oct 30, 2025
25700f5
fix: :bug: update WeightBounds trait API
manuelmauro Oct 30, 2025
34086fa
fix: :bug: add missing fields to ParachainInherentData
manuelmauro Oct 30, 2025
ba1a59b
fix: :bug: add missing associated types to Runtime
manuelmauro Oct 30, 2025
d646d84
fix: :bug: replace `Fail(Option<T::Hash>, XcmError)` with `Fail(Optio…
manuelmauro Oct 30, 2025
7d39aa8
style: :art: format code
manuelmauro Oct 30, 2025
37397a8
fix: :bug: fix `XcmExecutor::prepare` args
manuelmauro Oct 30, 2025
e5c765d
fix: :bug: impl create_bare from CreateInherent trait
manuelmauro Oct 30, 2025
95cdde2
fix: :bug: mock BenchmarkHelper
manuelmauro Oct 30, 2025
2ff0743
fix: :arrow_up: upgrade frame-metadata
manuelmauro Oct 30, 2025
5cd584d
chore: :arrow_up: upgrade polkadot-sdk
manuelmauro Oct 31, 2025
c6e0ece
Merge branch 'master' into moonbeam-polkadot-stable2506
manuelmauro Oct 31, 2025
93e260a
fix: :bug: silence warning
manuelmauro Nov 3, 2025
146947c
style: :rotating_light: mark args as unused
manuelmauro Nov 3, 2025
c137594
fix: :bug: fix deprecation warning
manuelmauro Nov 3, 2025
8fc9d97
style: :art: format code
manuelmauro Nov 3, 2025
076c968
test: :bug: update snapshot
manuelmauro Nov 3, 2025
d1cf58f
chore: :pushpin: update pins
manuelmauro Nov 3, 2025
57265e2
refactor: :recycle: move lint directive to root Cargo.toml
manuelmauro Nov 3, 2025
db28322
chore: :zap: run benchmarks
manuelmauro Nov 4, 2025
0d04fd0
chore: :zap: run benchmarks
manuelmauro Nov 4, 2025
ae7c6a5
test: :white_check_mark: assert specific error type
manuelmauro Nov 4, 2025
239c816
test: :white_check_mark: use proper assert_noop!
manuelmauro Nov 4, 2025
a1d5ec0
Merge branch 'master' into moonbeam-polkadot-stable2506
RomarQ Nov 5, 2025
95fe253
test: :white_check_mark: use new extrinsic for asset transfers using …
manuelmauro Nov 6, 2025
09e6d03
fix: :bug: pin udeps Rust nightly version
manuelmauro Nov 6, 2025
ce18f8b
Revert "fix: :bug: pin udeps Rust nightly version"
manuelmauro Nov 6, 2025
a0cd92e
Merge branch 'master' into moonbeam-polkadot-stable2506
RomarQ Nov 10, 2025
456685d
fix: :bug: fix some Cargo.toml features
manuelmauro Nov 10, 2025
b216990
revert: :fire: remove AssetHubMigrationStarted storage flag
manuelmauro Nov 10, 2025
b33ee4c
refactor: :fire: remove unused import
manuelmauro Nov 10, 2025
1b87d9d
fix: :bug: add missing feature flags for pallet-assets dependency
manuelmauro Nov 10, 2025
91700b5
refactor: :rotating_light: remove duplicated feature flags
manuelmauro Nov 10, 2025
5759cca
revert: :fire: delete file committed by mistake
manuelmauro Nov 10, 2025
5bb3eec
fix: :pushpin: properly pin polkadot-sdk version
manuelmauro Nov 10, 2025
3c91577
test: :white_check_mark: initialize ParachainSystem HostConfiguration…
manuelmauro Nov 11, 2025
238646c
update polkadot-sdk pin
RomarQ Nov 18, 2025
3f3b811
update polkadot-sdk pin
RomarQ Nov 18, 2025
c770f27
fix unit tests
RomarQ Nov 18, 2025
d04d94a
update polkadot-sdk pin
RomarQ Nov 18, 2025
cb3cc90
fix check-unused-dependencies
RomarQ Nov 18, 2025
9b8eb8c
fix test
RomarQ Nov 18, 2025
71cafb1
Merge branch 'master' into moonbeam-polkadot-stable2506
RomarQ Nov 18, 2025
525876b
Merge branch 'master' into moonbeam-polkadot-stable2506
RomarQ Nov 19, 2025
b872ee4
refactor: :recycle: remove IdentityBenchmarkHelper
manuelmauro Nov 25, 2025
bff4777
Revert "refactor: :recycle: remove IdentityBenchmarkHelper"
manuelmauro Nov 26, 2025
e625e9b
revert: :rewind: restore pallet_transaction_payment
manuelmauro Nov 26, 2025
c3e19ab
test: :white_check_mark: update tests call_pallet_xcm_with_fee
manuelmauro Nov 26, 2025
6e030cc
refactor: :recycle: add mock_abridged_host_config function
manuelmauro Nov 26, 2025
894f65d
fix pallet-identity benchmarks
RomarQ Nov 26, 2025
7146343
fix: :bug: add helper function to set up XCM router for benchmarks
manuelmauro Nov 26, 2025
7ffe844
fix: :bug: add custom delivery helper for Moonbeam
manuelmauro Nov 26, 2025
ea91959
chore: :wrench: update weights
manuelmauro Nov 26, 2025
f0c26fb
style: :art: keep original name TestDeliveryHelper
manuelmauro Nov 26, 2025
29c6e80
fix pallet-randomness benchmarks
RomarQ Nov 26, 2025
586bed6
Merge branch 'master' into moonbeam-polkadot-stable2506
RomarQ Nov 26, 2025
54a9f70
Revert "chore: :wrench: update weights"
manuelmauro Nov 26, 2025
7014bf4
test: :white_check_mark: update snapshots
manuelmauro Nov 26, 2025
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
2,631 changes: 1,750 additions & 881 deletions Cargo.lock

Large diffs are not rendered by default.

364 changes: 184 additions & 180 deletions Cargo.toml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions node/cli/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ pub fn run() -> Result<()> {
let db = params.backend.expose_db();
let storage = params.backend.expose_storage();

cmd.run(config, params.client, db, storage)
cmd.run(config, params.client, db, storage, None)
})
}
#[cfg(feature = "moonbeam-native")]
Expand All @@ -646,7 +646,7 @@ pub fn run() -> Result<()> {
let db = params.backend.expose_db();
let storage = params.backend.expose_storage();

cmd.run(config, params.client, db, storage)
cmd.run(config, params.client, db, storage, None)
})
}
#[cfg(feature = "moonbase-native")]
Expand All @@ -665,7 +665,7 @@ pub fn run() -> Result<()> {
let db = params.backend.expose_db();
let storage = params.backend.expose_storage();

cmd.run(config, params.client, db, storage)
cmd.run(config, params.client, db, storage, None)
})
}
#[cfg(not(feature = "moonbase-native"))]
Expand Down
16 changes: 11 additions & 5 deletions node/service/src/lazy_loading/substrate_backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ use std::{
};

use sc_client_api::{
backend::{self, NewBlockState},
backend::{self, NewBlockState, TrieCacheContext},
blockchain::{self, BlockStatus, HeaderBackend},
leaves::LeafSet,
UsageInfo,
Expand Down Expand Up @@ -1231,7 +1231,7 @@ impl<Block: BlockT + DeserializeOwned> backend::Backend<Block> for Backend<Block
type OffchainStorage = InMemOffchainStorage;

fn begin_operation(&self) -> sp_blockchain::Result<Self::BlockImportOperation> {
let old_state = self.state_at(Default::default())?;
let old_state = self.state_at(Default::default(), TrieCacheContext::Untrusted)?;
Ok(BlockImportOperation {
pending_block: None,
old_state,
Expand All @@ -1249,7 +1249,7 @@ impl<Block: BlockT + DeserializeOwned> backend::Backend<Block> for Backend<Block
operation: &mut Self::BlockImportOperation,
block: Block::Hash,
) -> sp_blockchain::Result<()> {
operation.old_state = self.state_at(block)?;
operation.old_state = self.state_at(block, TrieCacheContext::Untrusted)?;
Ok(())
}

Expand Down Expand Up @@ -1330,7 +1330,11 @@ impl<Block: BlockT + DeserializeOwned> backend::Backend<Block> for Backend<Block
None
}

fn state_at(&self, hash: Block::Hash) -> sp_blockchain::Result<Self::State> {
fn state_at(
&self,
hash: Block::Hash,
_cache_context: sc_client_api::backend::TrieCacheContext,
) -> sp_blockchain::Result<Self::State> {
if hash == Default::default() {
return Ok(ForkedLazyBackend::<Block> {
rpc_client: self.rpc_client.clone(),
Expand Down Expand Up @@ -1359,7 +1363,9 @@ impl<Block: BlockT + DeserializeOwned> backend::Backend<Block> for Backend<Block
.map(|header| {
let checkpoint = self.fork_checkpoint.clone();
let state = if header.number().gt(checkpoint.number()) {
let parent = self.state_at(*header.parent_hash()).ok();
let parent = self
.state_at(*header.parent_hash(), TrieCacheContext::Untrusted)
.ok();

ForkedLazyBackend::<Block> {
rpc_client: self.rpc_client.clone(),
Expand Down
17 changes: 15 additions & 2 deletions node/service/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,7 @@ async fn build_relay_chain_interface(
Arc<(dyn RelayChainInterface + 'static)>,
Option<CollatorPair>,
)> {
if let cumulus_client_cli::RelayChainMode::ExternalRpc(rpc_target_urls) =
let result = if let cumulus_client_cli::RelayChainMode::ExternalRpc(rpc_target_urls) =
collator_options.relay_chain_mode
{
build_minimal_relay_chain_node_with_rpc(
Expand All @@ -659,7 +659,11 @@ async fn build_relay_chain_interface(
task_manager,
hwbench,
)
}
};

// Extract only the first two elements from the 4-tuple
result
.map(|(relay_chain_interface, collator_pair, _, _)| (relay_chain_interface, collator_pair))
}

/// Start a node with the given parachain `Configuration` and relay chain `Configuration`.
Expand Down Expand Up @@ -736,6 +740,12 @@ where
relay_chain_interface: relay_chain_interface.clone(),
net_config,
sybil_resistance_level: CollatorSybilResistance::Resistant,
metrics: Net::register_notification_metrics(
parachain_config
.prometheus_config
.as_ref()
.map(|config| &config.registry),
),
})
.await?;

Expand Down Expand Up @@ -946,6 +956,7 @@ where
relay_chain_slot_duration,
recovery_handle: Box::new(overseer_handle.clone()),
sync_service: sync_service.clone(),
prometheus_registry: prometheus_registry.as_ref(),
})?;

let BlockImportPipeline::Parachain(block_import) = block_import else {
Expand Down Expand Up @@ -1726,6 +1737,7 @@ mod tests {
path: tmp.path().into(),
cache_size: 1024,
},
metrics_registry: None,
},
u64::MAX,
)
Expand Down Expand Up @@ -1801,6 +1813,7 @@ mod tests {
cache_size: 128,
},
trie_cache_maximum_size: Some(16777216),
warm_up_trie_cache: None,
state_pruning: Default::default(),
blocks_pruning: sc_service::BlocksPruning::KeepAll,
chain_spec: Box::new(spec),
Expand Down
2 changes: 2 additions & 0 deletions node/service/src/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,8 @@ where
relay_chain_state,
downward_messages: Default::default(),
horizontal_messages: Default::default(),
relay_parent_descendants: Default::default(),
collator_peer_id: None,
};

Ok((timestamp, parachain_inherent_data))
Expand Down
20 changes: 10 additions & 10 deletions pallets/crowdloan-rewards/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@ parity-scale-codec = { version = "3.6.12", default-features = false}
scale-info = { version = "2.10.0", default-features = false, features = ["derive"] }
serde = { version = "1.0.188", optional = true, features = ["derive"], default-features = false }

frame-support = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", default-features = false, branch = "moonbeam-polkadot-stable2503" }
frame-system = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", default-features = false, branch = "moonbeam-polkadot-stable2503" }
sp-core = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", default-features = false, branch = "moonbeam-polkadot-stable2503" }
sp-runtime = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", default-features = false, branch = "moonbeam-polkadot-stable2503" }
sp-std = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", default-features = false, branch = "moonbeam-polkadot-stable2503" }
sp-io = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", default-features = false, branch = "moonbeam-polkadot-stable2503" }
frame-benchmarking = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", default-features = false, optional = true, branch = "moonbeam-polkadot-stable2503" }
sp-trie = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", default-features = false, optional = true, branch = "moonbeam-polkadot-stable2503" }
frame-support = { workspace = true }
frame-system = { workspace = true }
sp-core = { workspace = true }
sp-runtime = { workspace = true }
sp-std = { workspace = true }
sp-io = { workspace = true }
frame-benchmarking = { workspace = true, optional = true }
sp-trie = { workspace = true, optional = true }

[dev-dependencies]
pallet-balances = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", default-features = false, branch = "moonbeam-polkadot-stable2503" }
pallet-utility = { git = "https://github.com/moonbeam-foundation/polkadot-sdk", default-features = false, branch = "moonbeam-polkadot-stable2503" }
pallet-balances = { workspace = true, features = ["std"] }
pallet-utility = { workspace = true, features = ["std"] }

[features]
default = ["std"]
Expand Down
4 changes: 1 addition & 3 deletions pallets/crowdloan-rewards/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,7 @@ pub mod pallet {

/// Configuration trait of this pallet.
#[pallet::config]
pub trait Config: frame_system::Config {
/// The overarching event type
type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
pub trait Config: frame_system::Config<RuntimeEvent: From<Event<Self>>> {
/// Checker for the reward vec, is it initalized already?
type Initialized: Get<bool>;
/// Percentage to be payed at initialization
Expand Down
1 change: 0 additions & 1 deletion pallets/crowdloan-rewards/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ parameter_types! {
}

impl Config for Test {
type RuntimeEvent = RuntimeEvent;
type Initialized = Initialized;
type InitializationPayment = InitializationPayment;
type MaxInitContributors = MaxInitContributors;
Expand Down
1 change: 0 additions & 1 deletion pallets/erc20-xcm-bridge/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ impl pallet_evm::Config for Test {
type WithdrawOrigin = EnsureAddressTruncated;
type AddressMapping = HashedAddressMapping;
type Currency = Balances;
type RuntimeEvent = RuntimeEvent;
type PrecompilesType = ();
type PrecompilesValue = ();
type Runner = pallet_evm::runner::stack::Runner<Self>;
Expand Down
5 changes: 3 additions & 2 deletions pallets/erc20-xcm-bridge/src/xcm_holding_ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,9 @@ where

fn prepare(
message: xcm::latest::Xcm<Config::RuntimeCall>,
) -> Result<Self::Prepared, xcm::latest::Xcm<Config::RuntimeCall>> {
InnerXcmExecutor::prepare(message)
weight_limit: Weight,
) -> Result<Self::Prepared, xcm::latest::InstructionError> {
InnerXcmExecutor::prepare(message, weight_limit)
}

fn execute(
Expand Down
6 changes: 3 additions & 3 deletions pallets/ethereum-xcm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,9 @@ pub mod pallet {
use frame_support::pallet_prelude::*;

#[pallet::config]
pub trait Config: frame_system::Config + pallet_evm::Config {
/// The overarching event type.
type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
pub trait Config:
frame_system::Config<RuntimeEvent: From<Event<Self>>> + pallet_evm::Config
{
/// Invalid transaction error
type InvalidEvmTransactionError: From<TransactionValidationError>;
/// Handler for applying an already validated transaction
Expand Down
3 changes: 0 additions & 3 deletions pallets/ethereum-xcm/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@ impl pallet_evm::Config for Test {
type WithdrawOrigin = EnsureAddressTruncated;
type AddressMapping = HashedAddressMapping;
type Currency = Balances;
type RuntimeEvent = RuntimeEvent;
type PrecompilesType = ();
type PrecompilesValue = ();
type Runner = pallet_evm::runner::stack::Runner<Self>;
Expand All @@ -209,7 +208,6 @@ parameter_types! {
}

impl pallet_ethereum::Config for Test {
type RuntimeEvent = RuntimeEvent;
type StateRoot = IntermediateStateRoot<<Test as frame_system::Config>::Version>;
type PostLogContent = PostBlockAndTxnHashes;
type ExtraDataLength = ConstU32<30>;
Expand Down Expand Up @@ -294,7 +292,6 @@ impl xcm_primitives::EnsureProxy<AccountId32> for EthereumXcmEnsureProxy {
}

impl crate::Config for Test {
type RuntimeEvent = RuntimeEvent;
type InvalidEvmTransactionError = pallet_ethereum::InvalidTransactionWrapper;
type ValidatedTransaction = pallet_ethereum::ValidatedTransaction<Self>;
type XcmEthereumOrigin = crate::EnsureXcmEthereumTransaction;
Expand Down
9 changes: 5 additions & 4 deletions pallets/moonbeam-foreign-assets/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,11 @@ pub mod pallet {
pub const PALLET_ID: frame_support::PalletId = frame_support::PalletId(*b"forgasst");

#[pallet::config]
pub trait Config: frame_system::Config + pallet_evm::Config + scale_info::TypeInfo {
pub trait Config:
frame_system::Config<RuntimeEvent: From<Event<Self>>>
+ pallet_evm::Config
+ scale_info::TypeInfo
{
// Convert AccountId to H160
type AccountIdToH160: Convert<Self::AccountId, H160>;

Expand Down Expand Up @@ -215,9 +219,6 @@ pub mod pallet {
/// Maximum numbers of different foreign assets
type MaxForeignAssets: Get<u32>;

/// The overarching event type.
type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;

/// Weight information for extrinsics in this pallet.
type WeightInfo: WeightInfo;

Expand Down
3 changes: 0 additions & 3 deletions pallets/moonbeam-foreign-assets/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ impl pallet_evm::Config for Test {
type WithdrawOrigin = pallet_evm::EnsureAddressNever<AccountId>;
type AddressMapping = AccountId;
type Currency = Balances;
type RuntimeEvent = RuntimeEvent;
type PrecompilesType = ();
type PrecompilesValue = ();
type Runner = pallet_evm::runner::stack::Runner<Self>;
Expand All @@ -157,7 +156,6 @@ parameter_types! {
}

impl pallet_ethereum::Config for Test {
type RuntimeEvent = RuntimeEvent;
type StateRoot = IntermediateStateRoot<<Test as frame_system::Config>::Version>;
type PostLogContent = PostBlockAndTxnHashes;
type ExtraDataLength = ConstU32<30>;
Expand Down Expand Up @@ -269,7 +267,6 @@ impl crate::Config for Test {
type ForeignAssetUnfreezerOrigin = ForeignAssetManagerOrigin;
type OnForeignAssetCreated = NoteDownHook<Location>;
type MaxForeignAssets = ConstU32<3>;
type RuntimeEvent = RuntimeEvent;
type WeightInfo = ();
type XcmLocationToH160 = ();
type ForeignAssetCreationDeposit = ForeignAssetCreationDeposit;
Expand Down
1 change: 0 additions & 1 deletion pallets/moonbeam-lazy-migrations/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ impl pallet_evm::Config for Test {
type WithdrawOrigin = EnsureAddressNever<AccountId>;
type AddressMapping = AccountId;
type Currency = Balances;
type RuntimeEvent = RuntimeEvent;
type Runner = pallet_evm::runner::stack::Runner<Self>;
type PrecompilesType = ();
type PrecompilesValue = ();
Expand Down
5 changes: 1 addition & 4 deletions pallets/moonbeam-orbiters/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,7 @@ pub mod pallet {
>>::ReserveIdentifier;

#[pallet::config]
pub trait Config: frame_system::Config {
/// Overarching event type.
type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;

pub trait Config: frame_system::Config<RuntimeEvent: From<Event<Self>>> {
/// A type to convert between AuthorId and AccountId. This pallet wrap the lookup to allow
/// orbiters authoring.
type AccountLookup: AccountLookup<Self::AccountId>;
Expand Down
1 change: 0 additions & 1 deletion pallets/moonbeam-orbiters/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ impl AccountLookup<AccountId> for MockAccountLookup {
}

impl pallet_moonbeam_orbiters::Config for Test {
type RuntimeEvent = RuntimeEvent;
type AccountLookup = MockAccountLookup;
type AddCollatorOrigin = EnsureRoot<AccountId>;
type Currency = Balances;
Expand Down
4 changes: 1 addition & 3 deletions pallets/parachain-staking/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,7 @@ pub mod pallet {

/// Configuration trait of this pallet.
#[pallet::config]
pub trait Config: frame_system::Config {
/// Overarching event type
type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
pub trait Config: frame_system::Config<RuntimeEvent: From<Event<Self>>> {
/// The fungible type for handling balances
type Currency: Inspect<Self::AccountId>
+ Mutate<Self::AccountId>
Expand Down
1 change: 0 additions & 1 deletion pallets/parachain-staking/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ parameter_types! {
}

impl Config for Test {
type RuntimeEvent = RuntimeEvent;
type Currency = Balances;
type RuntimeFreezeReason = RuntimeFreezeReason;
type MonetaryGovernanceOrigin = frame_system::EnsureRoot<AccountId>;
Expand Down
19 changes: 19 additions & 0 deletions pallets/xcm-transactor/src/benchmarks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ use sp_std::boxed::Box;
use sp_std::vec;
use xcm::latest::prelude::*;

/// Helper function to set up XCM router for benchmarks
fn setup_xcm_router<T: Config>() {
// Ensure the XCM sender is properly configured for benchmarks
// This sets up the HostConfiguration for sending messages to the relay chain
T::XcmSender::ensure_successful_delivery(Some(Location::parent()));
}

#[benchmarks(
where T::Transactor: Default, T::CurrencyId: From<Location>
)]
Expand Down Expand Up @@ -135,6 +142,9 @@ mod benchmarks {
// Worst Case: transacInfo db reads
#[benchmark]
fn transact_through_derivative() -> Result<(), BenchmarkError> {
// Set up XCM router for benchmarks
setup_xcm_router::<T>();

let fee_per_second = 1;
let extra_weight: Weight = Weight::from_parts(300000000u64, 0);
let max_weight: Weight = Weight::from_parts(20000000000u64, u64::MAX);
Expand Down Expand Up @@ -193,6 +203,9 @@ mod benchmarks {

#[benchmark]
fn transact_through_sovereign() -> Result<(), BenchmarkError> {
// Set up XCM router for benchmarks
setup_xcm_router::<T>();

let fee_per_second = 1;
let extra_weight: Weight = Weight::from_parts(300000000u64, 0);
let max_weight: Weight = Weight::from_parts(20000000000u64, u64::MAX);
Expand Down Expand Up @@ -251,6 +264,9 @@ mod benchmarks {

#[benchmark]
fn transact_through_signed() -> Result<(), BenchmarkError> {
// Set up XCM router for benchmarks
setup_xcm_router::<T>();

let fee_per_second = 1;
let extra_weight: Weight = Weight::from_parts(300000000u64, 0);
let max_weight: Weight = Weight::from_parts(20000000000u64, u64::MAX);
Expand Down Expand Up @@ -298,6 +314,9 @@ mod benchmarks {

#[benchmark]
fn hrmp_manage() -> Result<(), BenchmarkError> {
// Set up XCM router for benchmarks
setup_xcm_router::<T>();

let fee_per_second = 1;
let extra_weight: Weight = Weight::from_parts(300000000u64, 0);
let max_weight: Weight = Weight::from_parts(20000000000u64, u64::MAX);
Expand Down
Loading
Loading