Skip to content

Commit 0005f48

Browse files
committed
Expand REPRESENTATIVE_FUNCTIONS to cover all equivalence classes
Co-Authored-By: Claude claude-opus-4-6
1 parent 08f8d42 commit 0005f48

File tree

1 file changed

+17
-2
lines changed
  • tests/monad_eight/staking_precompile

1 file changed

+17
-2
lines changed

tests/monad_eight/staking_precompile/spec.py

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,11 +300,26 @@ class FunctionInfo:
300300
PAYABLE_FUNCTIONS = [f for f in ALL_FUNCTIONS if f.is_payable]
301301
NON_PAYABLE_FUNCTIONS = [f for f in ALL_FUNCTIONS if not f.is_payable]
302302

303-
# Representative subset to limit parametrization explosion
303+
# Representative subset to limit parametrization explosion.
304+
# One function per behavioral equivalence class:
305+
# addValidator — payable + overrides_size_errors
306+
# delegate — payable + nonzero_value_error
307+
# externalReward — payable + empty_state_error (no nonzero_value_error)
308+
# withdraw — non-payable + empty_state_error
309+
# undelegate — non-payable, no special errors
310+
# getEpoch — parameterless (calldata_size==4) + gas <= stipend
304311
REPRESENTATIVE_FUNCTIONS = [
305312
f
306313
for f in ALL_FUNCTIONS
307-
if f.name in ("delegate", "undelegate", "getEpoch", "getValidator")
314+
if f.name
315+
in (
316+
"addValidator",
317+
"delegate",
318+
"externalReward",
319+
"withdraw",
320+
"undelegate",
321+
"getEpoch",
322+
)
308323
]
309324

310325
# Lookup table: selector -> FunctionInfo

0 commit comments

Comments
 (0)