|
146 | 146 | ), |
147 | 147 | id="EIP-198-case5-raw-input", |
148 | 148 | ), |
| 149 | + pytest.param( |
| 150 | + Bytes( |
| 151 | + "0000000000000000000000000000000000000000000000000000000000000001" |
| 152 | + "0000000000000000000000000000000000000000000000008000000000000020" |
| 153 | + "0000000000000000000000000000000000000000000000000000000000000001" |
| 154 | + "80" |
| 155 | + ), |
| 156 | + ModExpOutput( |
| 157 | + call_success=False, |
| 158 | + returned_data="0000000000000000000000000000000000000000000000000000000000000000", |
| 159 | + ), |
| 160 | + id="large-exponent-length-0x80000000-out-of-gas", |
| 161 | + ), |
| 162 | + pytest.param( |
| 163 | + Bytes( |
| 164 | + "0000000000000000000000000000000000000000000000000000000000000001" |
| 165 | + "0000000000000000000000000000000000000000000000004000000000000020" |
| 166 | + "0000000000000000000000000000000000000000000000000000000000000001" |
| 167 | + "80" |
| 168 | + ), |
| 169 | + ModExpOutput( |
| 170 | + call_success=False, |
| 171 | + returned_data="0000000000000000000000000000000000000000000000000000000000000000", |
| 172 | + ), |
| 173 | + id="large-exponent-length-0x40000000-out-of-gas", |
| 174 | + ), |
| 175 | + pytest.param( |
| 176 | + Bytes( |
| 177 | + "0000000000000000000000000000000000000000000000000000000000000001" |
| 178 | + "0000000000000000000000000000000000000000000000002000000000000020" |
| 179 | + "0000000000000000000000000000000000000000000000000000000000000001" |
| 180 | + "80" |
| 181 | + ), |
| 182 | + ModExpOutput( |
| 183 | + call_success=False, |
| 184 | + returned_data="0000000000000000000000000000000000000000000000000000000000000000", |
| 185 | + ), |
| 186 | + id="large-exponent-length-0x20000000-out-of-gas", |
| 187 | + ), |
| 188 | + pytest.param( |
| 189 | + Bytes( |
| 190 | + "0000000000000000000000000000000000000000000000000000000000000001" |
| 191 | + "0000000000000000000000000000000000000000000000001000000000000020" |
| 192 | + "0000000000000000000000000000000000000000000000000000000000000001" |
| 193 | + "80" |
| 194 | + ), |
| 195 | + ModExpOutput( |
| 196 | + call_success=False, |
| 197 | + returned_data="0000000000000000000000000000000000000000000000000000000000000000", |
| 198 | + ), |
| 199 | + id="large-exponent-length-0x10000000-out-of-gas", |
| 200 | + ), |
| 201 | + pytest.param( |
| 202 | + Bytes( |
| 203 | + "0000000000000000000000000000000000000000000000000000000000000001" |
| 204 | + "0000000000000000000000000000000000000000000000000000000080000020" |
| 205 | + "0000000000000000000000000000000000000000000000000000000000000001" |
| 206 | + "80" |
| 207 | + ), |
| 208 | + ModExpOutput( |
| 209 | + call_success=False, |
| 210 | + returned_data="0000000000000000000000000000000000000000000000000000000000000000", |
| 211 | + ), |
| 212 | + id="large-modulus-length-0x80000020-out-of-gas", |
| 213 | + ), |
| 214 | + pytest.param( |
| 215 | + Bytes( |
| 216 | + "0000000000000000000000000000000000000000000000000000000000000001" |
| 217 | + "0000000000000000000000000000000000000000000000000000000040000020" |
| 218 | + "0000000000000000000000000000000000000000000000000000000000000001" |
| 219 | + "80" |
| 220 | + ), |
| 221 | + ModExpOutput( |
| 222 | + call_success=False, |
| 223 | + returned_data="0000000000000000000000000000000000000000000000000000000000000000", |
| 224 | + ), |
| 225 | + id="large-modulus-length-0x40000020-out-of-gas", |
| 226 | + ), |
| 227 | + pytest.param( |
| 228 | + Bytes( |
| 229 | + "0000000000000000000000000000000000000000000000000000000000000001" |
| 230 | + "0000000000000000000000000000000000000000000000000000000020000020" |
| 231 | + "0000000000000000000000000000000000000000000000000000000000000001" |
| 232 | + "80" |
| 233 | + ), |
| 234 | + ModExpOutput( |
| 235 | + call_success=False, |
| 236 | + returned_data="0000000000000000000000000000000000000000000000000000000000000000", |
| 237 | + ), |
| 238 | + id="large-modulus-length-0x20000020-out-of-gas", |
| 239 | + ), |
| 240 | + pytest.param( |
| 241 | + Bytes( |
| 242 | + "0000000000000000000000000000000000000000000000000000000000000001" |
| 243 | + "0000000000000000000000000000000000000000000000000000000000000040" |
| 244 | + "00000000000000000000000000000000000000000000000000000000ffffffff" |
| 245 | + "80" |
| 246 | + ), |
| 247 | + ModExpOutput( |
| 248 | + call_success=False, |
| 249 | + returned_data="0000000000000000000000000000000000000000000000000000000000000000", |
| 250 | + ), |
| 251 | + id="large-modulus-length-0xffffffff-out-of-gas", |
| 252 | + ), |
| 253 | + pytest.param( |
| 254 | + Bytes( |
| 255 | + "fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9" |
| 256 | + "0000000000000000000000000000000000000000000000000000000000000001" |
| 257 | + "0000000000000000000000000000000000000000000000000000000000000001" |
| 258 | + ), |
| 259 | + ModExpOutput( |
| 260 | + call_success=False, |
| 261 | + returned_data="0000000000000000000000000000000000000000000000000000000000000000", |
| 262 | + ), |
| 263 | + # FIXME |
| 264 | + marks=pytest.mark.skip( |
| 265 | + reason=( |
| 266 | + "EELS bug: U256 overflow in modexp pointer arithmetic " |
| 267 | + "before Osaka - see github.com/ethereum/execution-specs/issues/1465" |
| 268 | + ) |
| 269 | + ), |
| 270 | + id="max-base-length-overflow-out-of-gas", |
| 271 | + ), |
| 272 | + pytest.param( |
| 273 | + Bytes("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa0"), |
| 274 | + ModExpOutput( |
| 275 | + call_success=False, |
| 276 | + returned_data="0000000000000000000000000000000000000000000000000000000000000000", |
| 277 | + ), |
| 278 | + # FIXME |
| 279 | + marks=pytest.mark.skip( |
| 280 | + reason=( |
| 281 | + "EELS bug: U256 overflow in modexp pointer arithmetic " |
| 282 | + "before Osaka - see github.com/ethereum/execution-specs/issues/1465" |
| 283 | + ) |
| 284 | + ), |
| 285 | + id="immunefi-38958-by-omik-overflow", |
| 286 | + ), |
149 | 287 | ], |
150 | 288 | ids=lambda param: param.__repr__(), # only required to remove parameter |
151 | 289 | # names (input/output) |
|
0 commit comments