starknet_os: os resources test - l1 handler tx calldata factor#14152
Conversation
PR SummaryLow Risk Overview The test now writes Reviewed by Cursor Bugbot for commit 82597b0. Bugbot is set up for automated code reviews on this repo. Configure here. |
5dbac28 to
d5aaebf
Compare
77fc062 to
b07e51e
Compare
7505307 to
ebdeac0
Compare
ebdeac0 to
82597b0
Compare
4ff38f8 to
8817938
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 82597b0. Configure here.
| l1_handler_resources_params.calldata_factor = VariableCallDataFactor::Unscaled( | ||
| (&l1_handler_extra - &l1_handler_base).filter_unused_builtins(), | ||
| ); | ||
| l1_handler_resources_params.constant = l1_handler_base; |
There was a problem hiding this comment.
L1 handler constant overestimates due to unscaled model
Medium Severity
The L1 handler constant is set to l1_handler_base, but for an Unscaled calldata factor (scaling_factor=1), the linear model constant + factor * n doesn't fit either measurement point. The base was measured at payload_size=1 and the extra at payload_size=2. Setting constant = l1_handler_base makes Model(1) = l1_handler_extra and Model(2) = 2*l1_handler_extra - l1_handler_base, overestimating by one full calldata factor at every payload size. The correct constant for an unscaled linear fit is l1_handler_base - (l1_handler_extra - l1_handler_base). This differs from the invoke/deploy_account cases where Scaled(2) makes the model exact at n=2.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 82597b0. Configure here.



No description provided.