Commit 7d7f936
fix(evm): address devnet-6 review findings in the state-gas policy
- Clamp RemoveStateGasRefundFromReservoir for a net-spill (negative)
reservoir so revoking an advanced refund cannot reclaim spilled state
gas or over-deduct recorded usage; regression test included.
- Set the OutOfGas flag when ConsumeStateGas fails on the spill path.
- Saturate the EIP-7825 cap subtraction in CreateAvailableFromIntrinsic.
- Extract the shared destroy/recreate logic in TransactionProcessor into
DestroyAccount, removing the duplicated EIP-8246 blocks.
- Note the intentional EIP-2780 divergence on the SELFDESTRUCT
new-account charge.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>1 parent 86e1d28 commit 7d7f936
4 files changed
Lines changed: 38 additions & 26 deletions
File tree
- src/Nethermind
- Nethermind.Evm.Test
- Nethermind.Evm
- GasPolicy
- Instructions
- TransactionProcessing
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
215 | 215 | | |
216 | 216 | | |
217 | 217 | | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
218 | 232 | | |
219 | 233 | | |
220 | 234 | | |
| |||
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
| 140 | + | |
140 | 141 | | |
141 | 142 | | |
142 | 143 | | |
| |||
398 | 399 | | |
399 | 400 | | |
400 | 401 | | |
401 | | - | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
402 | 405 | | |
403 | 406 | | |
404 | 407 | | |
| |||
547 | 550 | | |
548 | 551 | | |
549 | 552 | | |
550 | | - | |
| 553 | + | |
551 | 554 | | |
552 | 555 | | |
553 | 556 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
239 | 239 | | |
240 | 240 | | |
241 | 241 | | |
242 | | - | |
| 242 | + | |
243 | 243 | | |
244 | 244 | | |
245 | 245 | | |
| |||
Lines changed: 18 additions & 23 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
380 | 380 | | |
381 | 381 | | |
382 | 382 | | |
383 | | - | |
384 | | - | |
385 | | - | |
386 | | - | |
387 | | - | |
388 | | - | |
389 | | - | |
390 | | - | |
391 | | - | |
392 | | - | |
| 383 | + | |
393 | 384 | | |
394 | 385 | | |
395 | 386 | | |
396 | 387 | | |
397 | 388 | | |
398 | 389 | | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
399 | 406 | | |
400 | 407 | | |
401 | 408 | | |
| |||
1386 | 1393 | | |
1387 | 1394 | | |
1388 | 1395 | | |
1389 | | - | |
1390 | | - | |
1391 | | - | |
1392 | | - | |
1393 | | - | |
1394 | | - | |
1395 | | - | |
1396 | | - | |
1397 | | - | |
1398 | | - | |
1399 | | - | |
1400 | | - | |
1401 | | - | |
| 1396 | + | |
1402 | 1397 | | |
1403 | 1398 | | |
1404 | 1399 | | |
| |||
0 commit comments