starknet_os: os resources test - invoke tx constant factor#14146
Conversation
PR SummaryMedium Risk Overview InvokeFunction Downstream expectations are refreshed for higher invoke fees/resources: RPC Reviewed by Cursor Bugbot for commit e5e710c. Bugbot is set up for automated code reviews on this repo. Configure here. |
c632d3d to
e678a92
Compare
72ceed8 to
e0bcdfa
Compare
e678a92 to
c2f6aca
Compare
e0bcdfa to
668f39a
Compare
c2f6aca to
350efcf
Compare
668f39a to
8cf1830
Compare
885d969 to
ac6fd8a
Compare
2625ae9 to
98b3648
Compare
ac6fd8a to
8f85cc3
Compare
98b3648 to
a20c3ab
Compare
8f85cc3 to
7f07092
Compare
|
Artifacts upload workflows: |
7f07092 to
fb53fd2
Compare
21103d8 to
572a3b1
Compare
fb53fd2 to
214c8b8
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 214c8b8. Configure here.
| raw_vc.os_resources.execute_txs_inner.extend([( | ||
| TransactionType::InvokeFunction, | ||
| VariableResourceParams::WithFactor(ResourcesParams { | ||
| constant: (&invoke_first - &invoke_linear_factor).filter_unused_builtins(), |
There was a problem hiding this comment.
Wrong scaled calldata deduction
Medium Severity
When deriving the InvokeFunction execute_txs_inner constant, the test subtracts the full scaled calldata_factor.resources from the first measurement. With scaling_factor 2, runtime cost for one extended calldata unit uses calculate_resources(1) (half that bundle per field), so the stored constant is too low and misaligns with resources_for_tx_type.
Reviewed by Cursor Bugbot for commit 214c8b8. Configure here.
There was a problem hiding this comment.
@Yoni-Starkware correct me if I'm wrong but we have to scale up the calldata_factor because when charging for it, we "scale down" by the same amount. with the constant factor, no scaling is required
dorimedini-starkware
left a comment
There was a problem hiding this comment.
@dorimedini-starkware made 1 comment.
Reviewable status: 0 of 3 files reviewed, 1 unresolved discussion (waiting on yoavGrs and Yoni-Starkware).
| raw_vc.os_resources.execute_txs_inner.extend([( | ||
| TransactionType::InvokeFunction, | ||
| VariableResourceParams::WithFactor(ResourcesParams { | ||
| constant: (&invoke_first - &invoke_linear_factor).filter_unused_builtins(), |
There was a problem hiding this comment.
@Yoni-Starkware correct me if I'm wrong but we have to scale up the calldata_factor because when charging for it, we "scale down" by the same amount. with the constant factor, no scaling is required
214c8b8 to
e5e710c
Compare



No description provided.