blockifier: bump execute_max_sierra_gas 1.1B -> 1.11B (SNIP-40)#14176
Conversation
PR SummaryHigh Risk Overview Execute L2 gas ceiling rises from 1,100,000,000 to 1,110,000,000 ( Storage syscall costs increase in the OS ( Client-side proving: Reviewed by Cursor Bugbot for commit 7a27a2c. Bugbot is set up for automated code reviews on this repo. Configure here. |
dorimedini-starkware
left a comment
There was a problem hiding this comment.
@dorimedini-starkware reviewed 4 files and all commit messages, and made 1 comment.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on matanl-starkware).
1994eb6 to
9b035e1
Compare
32ca6eb to
974e149
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ 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 974e149. Configure here.
dorimedini-starkware
left a comment
There was a problem hiding this comment.
@dorimedini-starkware reviewed 4 files and all commit messages, made 1 comment, and resolved 1 discussion.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on matanl-starkware).
9b035e1 to
453dcc9
Compare
974e149 to
4393e3e
Compare
4393e3e to
9c6f1ad
Compare
dorimedini-starkware
left a comment
There was a problem hiding this comment.
@dorimedini-starkware reviewed 15 files and all commit messages, made 1 comment, and resolved 1 discussion.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on matanl-starkware).
crates/blockifier/src/execution/deprecated_syscalls/deprecated_syscalls_test.rs line 358 at r4 (raw file):
resources: (&get_const_syscall_resources(DeprecatedSyscallSelector::CallContract) + &ExecutionResources { n_steps: 920,
another +210 step addition, i.e. one read and one write, please use formula
Code quote:
n_steps: 920,eb6b738 to
6056a1b
Compare
|
@dorimedini-starkware addressed your latest comment on n_steps: 81
+ get_const_syscall_resources(SyscallSelector::StorageRead).n_steps
+ get_const_syscall_resources(SyscallSelector::StorageWrite).n_steps,Verifies on both sides of SNIP-40: pre-cost-bump |
6056a1b to
ea30372
Compare
matanl-starkware
left a comment
There was a problem hiding this comment.
@matanl-starkware made 1 comment.
Reviewable status: 4 of 18 files reviewed, 1 unresolved discussion (waiting on dorimedini-starkware).
crates/blockifier/src/execution/deprecated_syscalls/deprecated_syscalls_test.rs line 358 at r4 (raw file):
Previously, dorimedini-starkware wrote…
another +210 step addition, i.e. one read and one write, please use formula
Done.
dorimedini-starkware
left a comment
There was a problem hiding this comment.
@dorimedini-starkware reviewed 14 files and all commit messages, and resolved 1 discussion.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on matanl-starkware).
Per SNIP-40 "More Frequent Blocks", raise EXECUTE_MAX_SIERRA_GAS from 1,100,000,000 to 1,110,000,000 L2 gas. This 0.9% headroom is intended to keep storage-heavy transactions under the per-tx limit after the StorageRead/Write gas-cost bump in the next PR. Note: this PR touches constants.cairo but leaves program_hash.json and allowed_virtual_os_program_hashes unchanged. The OS program hash needs to be regenerated by recompiling the Cairo OS after both cairo-touching SNIP-40 PRs land (this one + the StorageRead/Write change on top). Spec: https://community.starknet.io/t/snip-40-more-frequent-blocks/116203 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Per SNIP-40 "More Frequent Blocks": StorageRead: 18,070 -> 24,070 L2 gas (n_steps 180 -> 240) StorageWrite: 44,970 -> 59,970 L2 gas (n_steps 449 -> 599) The +33% bump offsets the cost reduction from fewer per-cell accesses per block at the new 1.5s block time, keeping per-block proving cost roughly flat. JSON drives constants.cairo via test_os_constants regeneration: STORAGE_READ_GAS_COST 18070 -> 24070 STORAGE_WRITE_GAS_COST 44970 -> 59970 program_hash.json regenerated via UPDATE_EXPECT=1 cargo test test_program_hashes (covers cairo deltas from this PR + the previous EXECUTE_MAX_SIERRA_GAS bump in the stack). Test fixtures updated: - expect! blocks via UPDATE_EXPECT=1 (call_contract, deploy, library_call, meta_tx, storage_read_write, transactions_test - declare/deploy/invoke/l1). - Hardcoded n_steps in deprecated_syscalls_test: 671 -> 881 (inner: +60r +150w), 710 -> 920 (outer with descendant deltas). - transactions_test::test_invoke_tx Cairo1 expected gas: 330470 -> 414470 (4 reads + 4 writes * delta = +84000). - execution_flavors_test transfer scenario step budget: +6104 -> +6944 (matches SNIP-37's +4332 -> +6104 pattern for 4r+4w deltas). Not changed: allowed_virtual_os_program_hashes still holds the two pre-SNIP-40 entries. Updating this list is a separate policy decision (authoritative virtual_os hash from the proof team) and is not strictly required for the gas-cost change to function. Spec: https://community.starknet.io/t/snip-40-more-frequent-blocks/116203 Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
ea30372 to
7a27a2c
Compare
matanl-starkware
left a comment
There was a problem hiding this comment.
@matanl-starkware reviewed 18 files and all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on matanl-starkware).


Per SNIP-40 "More Frequent Blocks", raise EXECUTE_MAX_SIERRA_GAS from
1,100,000,000 to 1,110,000,000 L2 gas. This 0.9% headroom is intended to keep
storage-heavy transactions under the per-tx limit after the StorageRead/Write
gas-cost bump in the next PR.
Note: this PR touches constants.cairo but leaves program_hash.json and
allowed_virtual_os_program_hashes unchanged. The OS program hash needs to be
regenerated by recompiling the Cairo OS after both cairo-touching SNIP-40 PRs
land (this one + the StorageRead/Write change on top).
Spec: https://community.starknet.io/t/snip-40-more-frequent-blocks/116203
Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com