OpenZeppelin / polkadot-runtime-templates

Runtime Templates for Polkadot Parachains
GNU General Public License v3.0
63 stars 18 forks source link

🐞 [Bug]: Unexpectedly high weights/fees for `pallet_xcm` #305

Closed ozgunozerk closed 1 minute ago

ozgunozerk commented 1 month ago

templates

What happened?

Discovered by @DrW3RK (thank you!): In both generic and evm templates, under pallet-xcm weights, we have unexpectedly high weights assigned to:

AFAIK, these weights are generated on a specific machine with benchmarking commands.

We should find the reason for why the benchmarking generated these absurd weights. Or, if they are expected to be that high, we should maybe explain that better in our docs or inline docs.

Expected behavior

No response

Contribution Guidelines

ozgunozerk commented 1 month ago

@KitHat do you have any idea on what's going on? Feel free to assign yourself if you see fit

franciscoaguirre commented 2 weeks ago

This impossible weights are assigned when there is no reservable or teleportable assets configured in the benchmarks, see: https://github.com/paritytech/polkadot-sdk/blob/86bb5cb5068463f006fda3a4ac4236686c989b86/polkadot/xcm/pallet-xcm/src/benchmarking.rs#L153 for example