Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Update Weights for Vesting Pallet #5708

Merged
3 commits merged into from
Apr 29, 2020
Merged

Update Weights for Vesting Pallet #5708

3 commits merged into from
Apr 29, 2020

Conversation

shawntabrizi
Copy link
Member

This is a PR that updates the weights for the vesting pallet based on benchmarking data collected.

@shawntabrizi shawntabrizi changed the base branch from master to shawntabrizi-fix-benchmarks April 20, 2020 19:20
frame/vesting/src/lib.rs Outdated Show resolved Hide resolved
frame/vesting/src/lib.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@cecton cecton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CLI is 👌

@shawntabrizi shawntabrizi changed the base branch from shawntabrizi-fix-benchmarks to master April 24, 2020 15:51
frame/vesting/src/lib.rs Outdated Show resolved Hide resolved
frame/vesting/src/lib.rs Outdated Show resolved Hide resolved
frame/vesting/src/lib.rs Outdated Show resolved Hide resolved
@shawntabrizi shawntabrizi added the A0-please_review Pull request needs code review. label Apr 25, 2020
@shawntabrizi
Copy link
Member Author

Okay this is ready for review. Should be good based on the benchmark data.

@shawntabrizi shawntabrizi added this to the 2.0 milestone Apr 25, 2020
/// # </weight>
#[weight = 1_000_000_000]
#[weight = 300_000_000 + T::DbWeight::get().reads_writes(3, 3)]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we have a rule of thumb for granularity or soundings? This, accurately, should have been around 260_000_000 or sth?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmarks are not that accurate to begin with, but yeah, rounding here is mostly just an opinion, as long as it does not extremely change the value.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmarks are not that accurate to begin with, but yeah, rounding here is mostly just an opinion, as long as it does not extremely change the value.

I am also taking into consideration the variability of locks. If this is a little bit larger, it is a little bit safer overall as more locks are introduced per user.

Copy link
Contributor

@gnunicorn gnunicorn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@gnunicorn
Copy link
Contributor

bot merge

@ghost ghost merged commit 5b8f183 into master Apr 29, 2020
@ghost ghost deleted the shawntabrizi-vesting-weights branch April 29, 2020 07:53
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants