Skip to content

Commit 853435a

Browse files
committed
✨ feat(tests): EIP-7928 parameterise OOG test case
1 parent bcaf230 commit 853435a

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

tests/amsterdam/eip7928_block_level_access_lists/test_cases.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@
1616
| `test_bal_system_dequeue_consolidations_eip7251` | Ensure BAL tracks post-exec system dequeues for consolidations | Pre-populate EIP-7251 consolidation requests; produce a block where dequeues occur | BAL **MUST** include the 7251 system contract with `storage_changes` (queue slots 0–3) using `tx_index = len(txs)` | 🟡 Planned |
1717
| `test_bal_noop_storage_write` | Ensure BAL includes address with storage read for no-op writes where pre-state equals post-state | Contract with pre-existing storage value `0x42` in slot `0x01`; transaction executes `SSTORE(0x01, 0x42)` | BAL **MUST** include the contract address with `storage_reads` for the slot since it was accessed, but **MUST NOT** include it in `storage_changes` | 🟡 Planned |
1818
| `test_bal_aborted_transaction` | Ensure BAL captures aborted transactions correctly | Alice calls `AbortContract` that reads slot `0x01`, writes to slot `0x02`, sends 100 wei to Bob, calls `TargetContract`, deploys `NewContract` via `CREATE`, then aborts via `INVALID` or `REVERT` | BAL **MUST** include Alice, Bob, `AbortContract`, and `TargetContract` addresses in `account_changes` but **MUST NOT** include any `storage_reads`, `storage_changes`, `balance_changes`, `code_changes`, or `nonce_changes` except for Alice's `nonce_changes` and `balance_changes` for gas | 🟡 Planned |
19-
| `test_bal_oog_sstore` | Ensure BAL handles OOG before `SSTORE` execution correctly | Alice calls `StorageContract` that executes `SSTORE` to cold slot `0x01` with insufficient gas for cold storage write | BAL **MUST NOT** contain slot `0x01` in the `storage_changes` of `StorageContract` | 🟡 Planned |
20-
| `test_bal_oog_sload` | Ensure BAL handles OOG before `SLOAD` execution correctly | Alice calls `StorageContract` that executes `SLOAD` from cold slot `0x01` with insufficient gas for cold storage read | BAL **MUST NOT** contain slot `0x01` in the `storage_reads` of `StorageContract` | 🟡 Planned |
21-
| `test_bal_oog_balance` | Ensure BAL handles OOG before `BALANCE` execution correctly | Alice calls `BalanceCheckerContract` that executes `BALANCE` on Bob's account with insufficient gas for cold account access | BAL **MUST** include `BalanceCheckerContract` in `account_changes` but **MUST NOT** include Bob's account | 🟡 Planned |
22-
| `test_bal_oog_extcodesize` | Ensure BAL handles OOG before `EXTCODESIZE` execution correctly | Alice calls `CodeReaderContract` that executes `EXTCODESIZE` on `TargetContract` with insufficient gas for cold code access | BAL **MUST** include `CodeReaderContract` in `account_changes` but **MUST NOT** include `TargetContract` | 🟡 Planned |
23-
| `test_bal_oog_call` | Ensure BAL handles OOG before `CALL` execution correctly | Alice calls `CallerContract` that performs `CALL` to Bob's account with insufficient gas for cold account access | BAL **MUST** include `CallerContract` in `account_changes` but **MUST NOT** include Bob's account | 🟡 Planned |
24-
| `test_bal_oog_delegatecall` | Ensure BAL handles OOG before `DELEGATECALL` execution correctly | Alice calls `DelegatorContract` that performs `DELEGATECALL` to `TargetContract` with insufficient gas for target loading | BAL **MUST** include `DelegatorContract` in `account_changes` but **MUST NOT** include `TargetContract` | 🟡 Planned |
25-
| `test_bal_oog_extcodecopy` | Ensure BAL handles OOG before `EXTCODECOPY` execution correctly | Alice calls `CodeReaderContract` that executes `EXTCODECOPY` from `TargetContract` with insufficient gas for cold code access | BAL **MUST** include `CodeReaderContract` in `account_changes` but **MUST NOT** include `TargetContract` | 🟡 Planned |
26-
| `test_bal_oog_selfdestruct` | Ensure BAL handles OOG before `SELFDESTRUCT` execution correctly | Alice calls `SelfDestructContract` that executes `SELFDESTRUCT` with Bob as beneficiary but insufficient gas for cold beneficiary access | BAL **MUST** include `SelfDestructContract` in `account_changes` (not destroyed) but **MUST NOT** include Bob's account | 🟡 Planned |
19+
| `test_bal_oog_sstore` | Ensure BAL handles OOG at different stages of `SSTORE` execution correctly | Alice calls `StorageContract` with three scenarios: (1) OOG **before** reaching `SSTORE` opcode, (2) OOG **during** `SSTORE` execution (insufficient gas for the opcode itself), (3) OOG **after** successful `SSTORE` execution. Target: cold slot `0x01` | (1) & (2): BAL **MUST NOT** contain slot `0x01` in `storage_changes` since storage wasn't accessed. (3): BAL **MUST** contain slot `0x01` in `storage_changes` since `SSTORE` executed successfully | 🟡 Planned |
20+
| `test_bal_oog_sload` | Ensure BAL handles OOG at different stages of `SLOAD` execution correctly | Alice calls `StorageContract` with three scenarios: (1) OOG **before** reaching `SLOAD` opcode, (2) OOG **during** `SLOAD` execution (insufficient gas for the opcode itself), (3) OOG **after** successful `SLOAD` execution. Target: cold slot `0x01` | (1) & (2): BAL **MUST NOT** contain slot `0x01` in `storage_reads` since storage wasn't accessed. (3): BAL **MUST** contain slot `0x01` in `storage_reads` since `SLOAD` executed successfully | 🟡 Planned |
21+
| `test_bal_oog_balance` | Ensure BAL handles OOG at different stages of `BALANCE` execution correctly | Alice calls `BalanceCheckerContract` with three scenarios: (1) OOG **before** reaching `BALANCE` opcode, (2) OOG **during** `BALANCE` execution (insufficient gas for the opcode itself), (3) OOG **after** successful `BALANCE` execution. Target: Bob's cold account | (1) & (2): BAL **MUST** include `BalanceCheckerContract` in `account_changes` but **MUST NOT** include Bob's account. (3): BAL **MUST** include both `BalanceCheckerContract` and Bob's account in `account_changes` | 🟡 Planned |
22+
| `test_bal_oog_extcodesize` | Ensure BAL handles OOG at different stages of `EXTCODESIZE` execution correctly | Alice calls `CodeReaderContract` with three scenarios: (1) OOG **before** reaching `EXTCODESIZE` opcode, (2) OOG **during** `EXTCODESIZE` execution (insufficient gas for the opcode itself), (3) OOG **after** successful `EXTCODESIZE` execution. Target: cold `TargetContract` | (1) & (2): BAL **MUST** include `CodeReaderContract` in `account_changes` but **MUST NOT** include `TargetContract`. (3): BAL **MUST** include both `CodeReaderContract` and `TargetContract` in `account_changes` | 🟡 Planned |
23+
| `test_bal_oog_call` | Ensure BAL handles OOG at different stages of `CALL` execution correctly | Alice calls `CallerContract` with three scenarios: (1) OOG **before** reaching `CALL` opcode, (2) OOG **during** `CALL` execution (insufficient gas for the opcode itself), (3) OOG **after** successful `CALL` execution. Target: cold `TargetContract` | (1) & (2): BAL **MUST** include `CallerContract` in `account_changes` but **MUST NOT** include `TargetContract`. (3): BAL **MUST** include both `CallerContract` and `TargetContract` in `account_changes` | 🟡 Planned |
24+
| `test_bal_oog_delegatecall` | Ensure BAL handles OOG at different stages of `DELEGATECALL` execution correctly | Alice calls `DelegatorContract` with three scenarios: (1) OOG **before** reaching `DELEGATECALL` opcode, (2) OOG **during** `DELEGATECALL` execution (insufficient gas for the opcode itself), (3) OOG **after** successful `DELEGATECALL` execution. Target: cold `TargetContract` | (1) & (2): BAL **MUST** include `DelegatorContract` in `account_changes` but **MUST NOT** include `TargetContract`. (3): BAL **MUST** include both `DelegatorContract` and `TargetContract` in `account_changes` | 🟡 Planned |
25+
| `test_bal_oog_extcodecopy` | Ensure BAL handles OOG at different stages of `EXTCODECOPY` execution correctly | Alice calls `CodeReaderContract` with three scenarios: (1) OOG **before** reaching `EXTCODECOPY` opcode, (2) OOG **during** `EXTCODECOPY` execution (insufficient gas for the opcode itself), (3) OOG **after** successful `EXTCODECOPY` execution. Target: cold `TargetContract` | (1) & (2): BAL **MUST** include `CodeReaderContract` in `account_changes` but **MUST NOT** include `TargetContract`. (3): BAL **MUST** include both `CodeReaderContract` and `TargetContract` in `account_changes` | 🟡 Planned |
26+
| `test_bal_oog_selfdestruct` | Ensure BAL handles OOG at different stages of `SELFDESTRUCT` execution correctly | Alice calls `SelfDestructContract` with three scenarios: (1) OOG **before** reaching `SELFDESTRUCT` opcode, (2) OOG **during** `SELFDESTRUCT` execution (insufficient gas for the opcode itself), (3) OOG **after** successful `SELFDESTRUCT` execution. Target: Bob as cold beneficiary | (1) & (2): BAL **MUST** include `SelfDestructContract` in `account_changes` (not destroyed) but **MUST NOT** include Bob's account. (3): BAL **MUST** include both `SelfDestructContract` (destroyed) and Bob's account in `account_changes` | 🟡 Planned |
2727
| `test_bal_oog_7702_delegated_cold_cold` | Ensure BAL handles OOG during EIP-7702 delegated account loading when both accounts are cold | Alice calls cold delegated account Bob (7702) which delegates to cold `TargetContract` with insufficient gas for second cold load | BAL **MUST** include Bob in `account_changes` (first cold load succeeds) but **MUST NOT** include `TargetContract` (second cold load fails due to OOG) | 🟡 Planned |
2828
| `test_bal_oog_7702_delegated_warm_cold` | Ensure BAL handles OOG during EIP-7702 delegated account loading when first account is warm, second is cold | Alice calls warm delegated account Bob (7702) which delegates to cold `TargetContract` with insufficient gas for second cold load | BAL **MUST** include Bob in `account_changes` (warm load succeeds) but **MUST NOT** include `TargetContract` (cold load fails due to OOG) | 🟡 Planned |

0 commit comments

Comments
 (0)