Skip to main content

Module test_helpers

Module test_helpers 

Source

Structs§

TestNetwork
TestNetworkConfig
TestNetworkConfigBuilder

Constants§

STAKE_TABLE_CAPACITY_FOR_TEST

Functions§

assert_node_live
Asserts the node is live: it must advance epochs_ahead epochs (at least 1) past its current decided epoch, and, when the chain runs the self-building new protocol, sequence a newly submitted transaction. Inclusion is not asserted on legacy versions because the test-only legacy builder stops producing non-empty blocks after roughly a hundred views, independent of any stake table activity.
assert_nodes_agree
Asserts every node has decided at least min_height, and that nodes which have decided the same height agree on the leaf.
catchup_test_helper
Test the catchup API with custom options.
committee_is
Predicate for wait_for_committee: the committee is exactly the expected set of validator accounts.
delegate_new
Funds a fresh delegator account (ETH via anvil, ESP from the deployer) and delegates amount to validator. Returns the delegator’s provider so the test can later undelegate.
deregister_validators
Deregisters the validators at the given node indices, each exit sent from that validator’s own funded provider.
register_validators
Registers and delegates to a batch of new validators mid-run, funding their L1 accounts from the network’s deployer signer.
staking_addresses
The L1 accounts of the validators at the given node indices.
state_signature_test_helper
Test the state signature API.
status_test_helper
Test the status API with custom options.
submit_test_helper
Test the submit API with custom options.
wait_for_committee
Waits epoch by epoch, starting at start_epoch, until the committee reported by node/validators/{epoch} satisfies pred. Returns the first matching epoch and its committee; panics after max_epochs epochs without a match.