-
Notifications
You must be signed in to change notification settings - Fork 224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[light-client] Testing Regimen meta-issue #320
Comments
It would be good to have tests when the primary (or secondaries) are not responding. In this case we should timeout and FetchLightBlock should report timeout errors. In case of verification we just terminate with failure then. In the detection we remove the secondary from the peer list. Right now the tests consider only correct/faulty data. |
Just added support for timeouts to the |
Implemented removal of witness which timed out in 56bc022. |
Broken out into a separate issue: #331 |
In anticipation of the release of Tendermint-rs Light Client we outline here want we want to be tested. This issue is meant to collect a bunch of sub issues and provide an overview of how correctness will be codified in unit and integration tests. If you are interested in contributing to the test, simply create a break out issue of one of the items and update this issue with a reference☺️
NOTE: Everything should be tested against the branch in #302 which we expect to be merged shortly (11.6.2020)
Core Verification
light-client/src/light_client.rs
target_height < last_trusted_state.height
Verification
light-client/src/predicates.rs
Broken out into #330The verifier is composed of multiple predicates, each of which should be tested for both the positive and negative case using concrete types.
operations
should be mocked out.validator_sets_match
next_validators_match
header_matches_commit
valid_commit
is_within_trust_period
is_monotonic_bft_time
is_monotonic_height
has_sufficient_voting_power
(related light-client: consider optimizing voting power calculation by stopping after verifying +1/3 or +2/3 #235)has_sufficient_validators_overlap
has_sufficient_signers_overlap
valid_next_validator_set
Fork Detection:
light-client/src/fork_detector.rs
TODO
The Fork detector should be tested in isolation using concrete types to detect the following cases
Bisection:
light-client/tests/light_client.rs
Requires #290 but could use some help
commit/one_third_vals_don’t_sign.json
Operations:
light-client/src/operations/*
The operators provide an abstraction around crypto functions and allow traits to help mock them out during testing. Eventually these should be moved to the main crate but they should be moved there with accompanying tests. Each operator should be tested using concrete types.
Supervisor verify_to_target integration test:
light-client/src/supervisor.rs
#331
The supervisor provides verification using multiple peers. It integrates the io, verification, bisection scheduling, fork detection and evidence reporting. All of which can be mocked out to exercise complex scenarios including
Node Integration
Broken out into #373
It’s possible and even likely that this doesn’t cover everything we want to test. Please feel free to discuss in the comments and edit this description as need be.
The text was updated successfully, but these errors were encountered: