-
Notifications
You must be signed in to change notification settings - Fork 503
feat: add extrisinc to add/remove single invulnerables #1502
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
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM ! Nit suggestion
Minimum allowed line rate is |
Dinonard
left a comment
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.
LGTM
ipapandinas
left a comment
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.
Nice work, LGTM!
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