feat: add extrisinc to add/remove single invulnerables#1502
feat: add extrisinc to add/remove single invulnerables#1502ashutoshvarma merged 2 commits intomasterfrom
Conversation
|
/bench astar-dev,shibuya-dev,shiden-dev pallet_collator_selection |
|
Benchmarks job is scheduled at https://github.com/AstarNetwork/Astar/actions/runs/16337375139. |
|
|
||
| let origin = T::UpdateOrigin::try_successful_origin().map_err(|_| BenchmarkError::Weightless)?; | ||
| <CollatorSelection<T>>::set_invulnerables(origin.clone(), initial_invulnerables.clone())?; | ||
| let to_remove = initial_invulnerables.last().unwrap().clone(); |
There was a problem hiding this comment.
This gives us the most time spent iterating, but eliminates memory copying.
Can you try re-running the benchmarks while removing the first element, to see if the weight becomes worse?
There was a problem hiding this comment.
Locally, it weights didn't change much, few runs slightly more, few runs slightly less. So within standard error.
There was a problem hiding this comment.
Ok, thanks!
I guess it would be become more prevalent if we had huge vectors.
|
Benchmarks have been finished. |
PierreOssun
left a comment
There was a problem hiding this comment.
LGTM ! Nit suggestion
Minimum allowed line rate is |
Closes #1474
Pull Request Summary
Add two new extrinsic for adding/removing single invulnerable
Note: Added new benchmarks in v1 style, otherwise diff would become big if all benches are changed to v2
Check list