-
Notifications
You must be signed in to change notification settings - Fork 904
Add more range sync tests #6872
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
Conversation
This pull request has merge conflicts. Could you please resolve them @dapplion? 🙏 |
2327ccc
to
7c39d17
Compare
|
||
// Unikely that the single peer we added has enough columns for us. Find a way to make this test | ||
// deterministic. | ||
r.add_random_peer_not_supernode(remote_info.clone()); |
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.
We could just thread a fixed seed rng to these functions when generating peers?
StdRng::seed_from_u64(0xDEADBEEF0BAD5EEDu64)
For all peerdas tests we should probably make them deterministric, otherwise we could end up with flaky tests.
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.
Made tests deterministic 2021abc
Switched to ChaCha20 rng as Xor does not implement CryptoRng, required by the enr crate
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.
Nice, just a small suggestion to make the test deterministic.
This pull request has merge conflicts. Could you please resolve them @dapplion? 🙏 |
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.
Nice, LGTM!
Ready for merge once release process is done. |
Currently we have very poor coverage of range sync with unit tests. With the event driven test framework we could cover much more ground and be confident when modifying the code. Add two basic cases: - Happy path, complete a finalized sync for 2 epochs - Post-PeerDAS case where we start without enough custody peers and later we find enough⚠️ If you have ideas for more test cases, please let me know! I'll write them
Currently we have very poor coverage of range sync with unit tests. With the event driven test framework we could cover much more ground and be confident when modifying the code. Add two basic cases: - Happy path, complete a finalized sync for 2 epochs - Post-PeerDAS case where we start without enough custody peers and later we find enough⚠️ If you have ideas for more test cases, please let me know! I'll write them
Issue Addressed
Currently we have very poor coverage of range sync with unit tests. With the event driven test framework we could cover much more ground and be confident when modifying the code.
Proposed Changes
Add two basic cases: