Skip to content

Commit 260c792

Browse files
authored
feat(tests): add case for large exp with zero mod/base length. (#2005)
1 parent 880f8d8 commit 260c792

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

tests/osaka/eip7823_modexp_upper_bounds/test_modexp_upper_bounds.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,30 @@ def precompile_gas(fork: Fork, mod_exp_input: ModExpInput) -> int:
5959
),
6060
id="excess_length_modulus",
6161
),
62+
pytest.param(
63+
ModExpInput(
64+
base=b"",
65+
exponent=b"\0" * (MAX_LENGTH_BYTES + 1),
66+
modulus=b"",
67+
),
68+
id="exp_1025_base_0_mod_0",
69+
),
70+
pytest.param(
71+
ModExpInput(
72+
base=b"\0" * (MAX_LENGTH_BYTES + 1),
73+
exponent=b"",
74+
modulus=b"",
75+
),
76+
id="exp_0_base_1025_mod_0",
77+
),
78+
pytest.param(
79+
ModExpInput(
80+
base=b"",
81+
exponent=b"",
82+
modulus=b"\0" * (MAX_LENGTH_BYTES + 1),
83+
),
84+
id="exp_0_base_0_mod_1025",
85+
),
6286
],
6387
)
6488
def test_modexp_upper_bounds(

0 commit comments

Comments
 (0)