-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Measured XCM weights and benchmarking for collectives-polkadot #547
base: main
Are you sure you want to change the base?
Conversation
/cmd fmt |
1 similar comment
/cmd fmt |
Command "fmt" has started 🚀 See logs here |
Command "fmt" has finished ✅ See logs here |
// Measured: `0` | ||
// Estimated: `0` | ||
// Minimum execution time: 18_446_744_073_709_551_000 picoseconds. | ||
Weight::from_parts(18_446_744_073_709_551_000, 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
quite big, but seems not only for this runtime
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is basically Weight::MAX
and used for unsupported instructions - in this particular case ReserveAssetDeposited
is disabled on collectives because it doesn't support any reserve assets, it only supports DOT through teleports
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is basically
Weight::MAX
and used for unsupported instructions - in this particular caseReserveAssetDeposited
is disabled on collectives because it doesn't support any reserve assets, it only supports DOT through teleports
👆
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe a DQ: why not just use Weight::Max
?
let whitelist: Vec<TrackedStorageKey> = AllPalletsWithSystem::whitelisted_storage_keys(); | ||
let mut batches = Vec::<BenchmarkBatch>::new(); | ||
let params = (&config, &whitelist); | ||
add_benchmarks!(params, batches); | ||
|
||
if batches.is_empty() { return Err("Benchmark not found for this pallet.".into()) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not needed anymore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has been removed from all Polkadot-SDK and Polkadot-Fellows runtimes, so why keep it here?
I'm not entirely sure about the purpose of this IF
, but I can imagine it might have caused issues for scripting/bots. For example, when regenerating a specific pallet_xyz
for a set of runtimes, if one of those runtimes doesn’t include pallet_xyz
, the process might abort instead of simply skipping the runtime without that pallet.
However, I believe that for scripting/bots, we now use benchmark pallet --list
, so this shouldn't be an issue anymore.
I do not remember any. But I tried to cover all important cases with integration tests. I would check them, if anything should be updated or added and it should be good to go |
Co-authored-by: Muharem <ismailov.m.h@gmail.com>
Closes: paritytech/polkadot-sdk#2904
Closes: #446
Continuation: paritytech/polkadot-sdk#6820
The
collectives-polkadot
usesFixedWeightBounds
. This PR introduces a properly measured XCM benchmarking setup and updates the weights with fresh data.TODO
Transact
that goes to thecollectives-polkadot