agent0.hyperfuzz.unit_fuzz.helpers.setup_fuzz
Setup an interactive environment for fuzz testing.
Functions
|
Setup the fuzz experiment. |
Module Contents
- agent0.hyperfuzz.unit_fuzz.helpers.setup_fuzz.setup_fuzz(chain_config: agent0.core.hyperdrive.interactive.LocalChain.Config, log_to_rollbar: bool = True, crash_log_level: int | None = None, fuzz_test_name: str | None = None, curve_fee: fixedpointmath.FixedPoint | None = None, flat_fee: fixedpointmath.FixedPoint | None = None, governance_lp_fee: fixedpointmath.FixedPoint | None = None, governance_zombie_fee: fixedpointmath.FixedPoint | None = None, var_interest: fixedpointmath.FixedPoint | None = None, steth: bool = False) tuple[agent0.core.hyperdrive.interactive.LocalChain, int, numpy.random.Generator, agent0.core.hyperdrive.interactive.LocalHyperdrive]
Setup the fuzz experiment.
- Parameters:
chain_config (LocalChain.Config, optional) – Configuration options for the local chain.
log_to_rollbar (bool, optional) – If True, log errors rollbar. Defaults to True.
crash_log_level (int | None, optional) – The log level to log crashes at. Defaults to critical.
fuzz_test_name (str | None, optional) – The prefix to prepend to rollbar exception messages
curve_fee (FixedPoint | None, optional) – The curve fee for the test. Defaults to using the default fee
flat_fee (FixedPoint | None, optional) – The flat fee for the test. Defaults to using the default fee
governance_lp_fee (FixedPoint | None, optional) – The governance lp fee for the test. Defaults to using the default fee
governance_zombie_fee (FixedPoint | None, optional) – The governance zombie fee for the test. Defaults to using the default fee
var_interest (FixedPoint | None, optional) – The variable interest rate. Defaults to using the default variable interest rate defined in interactive hyperdrive.
steth (bool, optional) – If True, use steth. Defaults to False.
- Returns:
- A tuple containing:
- chain: LocalChain
An instantiated LocalChain.
- random_seed: int
The random seed used to construct the Generator.
- rng: Generator
The numpy Generator provides access to a wide range of distributions, and stores the random state.
- interactive_hyperdrive: InteractiveHyperdrive
An instantiated InteractiveHyperdrive object.
- Return type:
tuple[str, LocalChain, int, Generator, InteractiveHyperdrive]