Skip to content

Commit 04d54fa

Browse files
committed
fix(AttackOrchestrator): increase gas forwarded to 5300 for SSTORE
The attack() call was forwarding only 3650 gas, which is insufficient for SSTORE operations on cold storage slots. SSTORE requires: - 2100 gas for cold slot access - 2900 gas for zero-to-nonzero write - Plus dispatch overhead (~200 gas) Updated to forward 5300 gas to ensure SSTORE succeeds.
1 parent f2998c2 commit 04d54fa

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

tests/benchmark/stateful/bloatnet/depth_benchmarks/AttackOrchestrator.sol

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,10 @@ contract AttackOrchestrator {
6767
mstore(callDataPtr, 0x64dd891a00000000000000000000000000000000000000000000000000000000)
6868
mstore(add(callDataPtr, 0x04), value) // Value parameter
6969

70-
// Call attack(value) with 3,650 gas (optimal for SSTORE to deep slot)
71-
// Breakdown: 2,900 gas for cold SSTORE + 342 gas for function overhead + 400 gas safety margin
70+
// Call attack(value) with 5,300 gas (minimum for SSTORE to deep slot)
71+
// Breakdown: 201 gas dispatch + 5000 gas SSTORE (2100 cold + 2900 write) + 99 gas margin
7272
let success := call(
73-
3650, // gas
73+
5300, // gas
7474
target, // to
7575
0, // value (0 ETH)
7676
callDataPtr,// argsOffset (where we stored the call data)

0 commit comments

Comments
 (0)