-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Refactor to remove requested_cu from cost_trarcker #29015
Refactor to remove requested_cu from cost_trarcker #29015
Conversation
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.
Only minor nits in csome comments, otherwise lgtm
.unwrap(); | ||
|
||
// set limit ratio so each batch can only have one test transaction, | ||
// eg ratio = floor(MAX_WRITABLE_ACCOUNT_UNITS- / tx_cost.sum()) |
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.
either fix the comment (trailling -
) or just remove it. I don't think it adds much since the equation is simply the coded line below.
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.
good point, removed the line
let requested_cu = | ||
block_cost_limits::MAX_WRITABLE_ACCOUNT_UNITS.saturating_div(limit_ratio as u64); | ||
// setup two transactions, one has high priority that writes to hot account, the | ||
// other write to non-content account with no priority |
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.
nit: non-contentious
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.
✅
… use cost_model forr consistency
eed7de4
to
6be50b6
Compare
Pull request has been modified.
automerge label removed due to a CI failure |
* refactor cost tracker by removing requested_cu from it, call sites to use cost_model forr consistency * review fix
* refactor cost tracker by removing requested_cu from it, call sites to use cost_model forr consistency * review fix
Problem
Forwarder uses requested_cu to track how many CUs are forwarded. Now cost_model has been updated to use requested_cu (#28281), forwarder should use cost_model for consistency.
Summary of Changes
Fixes #