-
Couldn't load subscription status.
- Fork 2.7k
Update weight formula for session (with new_session taking full block) #5738
Conversation
|
@thiolliere We can make this on_initialize take the full block weight. So the weight function should be an if statement, either 0 or (I think) |
| } else { | ||
| // NOTE: the non-database part of the weight for `should_end_session(n)` is | ||
| // included as weight for empty block, the database part is expected to be in | ||
| // cache. |
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.
reviewer should double-check this statement.
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.
related to #5722
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.
Weights look good 👍
updating formula for on_initialize requires new benchmarks, and maybe new API (or every cost of SessionHandler and ShouldEndSession will have to be documented)EDIT: as suggested by shawn new_session take full block to make it easier, if in the future it is wanted we can improve on this.