Test Push0¶
Documentation for tests/shanghai/eip3855_push0/test_push0.py
.
Generate fixtures for these test cases with:
fill -v tests/shanghai/eip3855_push0/test_push0.py
abstract: Tests EIP-3855: PUSH0 Instruction
Tests for [EIP-3855: PUSH0 Instruction](https://eips.ethereum.org/EIPS/eip-3855).
note: Tests ported from:
- [ethereum/tests/pull/1033](https://github.com/ethereum/tests/pull/1033).
test_push0_key_sstore(state_test, env, pre, post, tx, addr_1)
¶
Use PUSH0 to set a key for SSTORE.
Source code in tests/shanghai/eip3855_push0/test_push0.py
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
|
test_push0_fill_stack(state_test, env, pre, post, tx, addr_1)
¶
Fill stack with PUSH0, then OR all values and save using SSTORE.
Source code in tests/shanghai/eip3855_push0/test_push0.py
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 |
|
test_push0_stack_overflow(state_test, env, pre, post, tx, addr_1)
¶
Stack overflow by using PUSH0 1025 times.
Source code in tests/shanghai/eip3855_push0/test_push0.py
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
|
test_push0_storage_overwrite(state_test, env, pre, post, tx, addr_1)
¶
Update an already existing storage value.
Source code in tests/shanghai/eip3855_push0/test_push0.py
118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 |
|
test_push0_during_staticcall(state_test, env, pre, post, tx, addr_1)
¶
Test PUSH0 during STATICCALL.
Source code in tests/shanghai/eip3855_push0/test_push0.py
137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 |
|
test_push0_before_jumpdest(state_test, env, pre, post, tx, addr_1)
¶
Jump to a JUMPDEST next to a PUSH0, must succeed.
Source code in tests/shanghai/eip3855_push0/test_push0.py
165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 |
|
test_push0_gas_cost(state_test, env, pre, post, tx, addr_1)
¶
Test PUSH0 gas cost.
Source code in tests/shanghai/eip3855_push0/test_push0.py
184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 |
|