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
Tests EIP-3855: PUSH0 Instruction
Tests for EIP-3855: PUSH0 Instruction.
Tests ported from:
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
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
|
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
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
|
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
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 |
|
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
116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 |
|
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
135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 |
|
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
163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 |
|
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
182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 |
|