Mythical depends on a subset of FRAME pallets. The benchmarks for these pallets are done using external runtimes instead of the correct Mythical runtimes (testnet and mainnet).
Issue details
Mythical relies on weights for their FRAME pallet dependencies that are benchmarked with some external runtimes instead of the actual runtime.
You can find below an example of an incorrect benchmark for pallet_balances using Substrate-native pallets:
impl pallet_balances::Config for Runtime {
...
type WeightInfo = pallet_balances::weights::SubstrateWeight<Runtime>;
}
So far, this issue has been spotted for the following pallets :
Substrate-native imported benchmarks
pallet_utility
pallet_sudo
pallet_multisig
pallet_collective
pallet_nfts
pallet_proxy (testnet only)
pallet_vesting (testnet only)
pallet_collective (testnet only)
pallet_xcm (testnet only)
Risk
As pallet extrinsic benchmarks can be dependent on the actual runtime configuration, this can lead to:
Overweight extrinsics
Underweight extrinsics
for all extrinsics that are using the substrate-node template runtime weights.
Mitigation
All pallet extrinsics, even the Substrate ones, should be benchmarked with the actual runtime configuration by including them in your define_benchmarks! block.
Summary
Mythical depends on a subset of FRAME pallets. The benchmarks for these pallets are done using external runtimes instead of the correct Mythical runtimes (testnet and mainnet).
Issue details
Mythical relies on
weights
for their FRAME pallet dependencies that are benchmarked with some external runtimes instead of the actual runtime.You can find below an example of an incorrect benchmark for
pallet_balances
using Substrate-native pallets:So far, this issue has been spotted for the following pallets :
Substrate-native imported benchmarks
Risk
As pallet extrinsic benchmarks can be dependent on the actual runtime configuration, this can lead to:
for all extrinsics that are using the substrate-node template runtime weights.
Mitigation
All pallet extrinsics, even the Substrate ones, should be benchmarked with the actual runtime configuration by including them in your define_benchmarks! block.
A best practice example can be found in the Kusama runtime implementation.