-
Notifications
You must be signed in to change notification settings - Fork 180
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
[BFT] Epoch Recovery integration test #6823
[BFT] Epoch Recovery integration test #6823
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## feature/efm-recovery #6823 +/- ##
========================================================
- Coverage 41.81% 41.72% -0.09%
========================================================
Files 1588 2033 +445
Lines 144098 181223 +37125
========================================================
+ Hits 60251 75613 +15362
- Misses 78887 99381 +20494
- Partials 4960 6229 +1269
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
integration/tests/epochs/cohort2/epoch_recover_from_efm_test.go
Outdated
Show resolved
Hide resolved
integration/tests/epochs/cohort2/epoch_recover_from_efm_test.go
Outdated
Show resolved
Hide resolved
3000, | ||
false, | ||
dkgIndexMap, | ||
dkg.KeyShares()[:nConsensusNodes], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dkg.KeyShares()[:nConsensusNodes], | |
dkgKeyShares, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Amazing work. My suggestions are mostly focused on clarifying and documenting the intricacies of this test.
integration/tests/epochs/cohort2/epoch_recover_from_efm_test.go
Outdated
Show resolved
Hide resolved
integration/tests/epochs/cohort2/epoch_recover_from_efm_test.go
Outdated
Show resolved
Hide resolved
integration/tests/epochs/cohort2/epoch_recover_from_efm_test.go
Outdated
Show resolved
Hide resolved
integration/tests/epochs/cohort2/epoch_recover_from_efm_test.go
Outdated
Show resolved
Hide resolved
integration/tests/epochs/cohort2/epoch_recover_from_efm_test.go
Outdated
Show resolved
Hide resolved
integration/tests/epochs/cohort2/epoch_recover_from_efm_test.go
Outdated
Show resolved
Hide resolved
// At this point we have a node which is part of the consensus committee but not part of the Random Beacon committee and | ||
// another node which is part of the Random Beacon committee but not part of the consensus committee. | ||
txArgs, err := run.GenerateRecoverTxArgsWithDKG( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we move step 2 to here, the test would be easier for me to understand as it would more closely emulate a real-world scenario.
If that is possible, we could summarize the test as follows in the documentation (changes highlighted in bold font)
This test will do the following:
- Triggers EFM by turning off the sole collection node before the end of the DKG forcing the DKG to fail.
- Eject the first consensus node by modifying the epoch snapshot.
- Drop the last consensus node from the Random Beacon committee. This hack works only for threshold systems with an even number of participants,
without changing the threshold - hence we need to start this test with 4 consensus nodes.- Generates epoch recover transaction args using the tooling [run.GenerateRecoverTxArgsWithDKG] provided for the governance committee.
- Submit recover epoch transaction.
- Ensure expected EpochRecover event is emitted.
- Ensure the network transitions into the recovery epoch and finalizes the first view of the recovery epoch.
Co-authored-by: Alexander Hentschel <[email protected]> Co-authored-by: Jordan Schalm <[email protected]>
#6645
Context
This PR implements the most general case where Random beacon committee and consensus committee form a symmetric difference with cardinality 1. More details in the attached issue.