-
Notifications
You must be signed in to change notification settings - Fork 48
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
Add randomized Membership impls for testing #3863
Conversation
9adfb1c
to
2bb7f99
Compare
8693058
to
3464b81
Compare
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.
I haven't managed to review the whole PR yet.
The things I've noticed don't necessarily make the PR incorrect. I think what confused me the most is that for the even round (e.g. 2) we get odd numbers and vice versa.
3464b81
to
462d05e
Compare
8be316a
to
3c2b7c5
Compare
1dc6185
to
6533334
Compare
4d25a34
to
f190b5c
Compare
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.
Just a nit about possible typo.
crates/types/src/simple_vote.rs
Outdated
@@ -24,6 +24,9 @@ use crate::{ | |||
vote::{HasViewNumber, Vote}, | |||
}; | |||
|
|||
/// Marker that data should use the quorum cert type | |||
pub(crate) trait QuorumMaker {} |
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.
typo? Marker vs Maker?
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.
Not sure if that's a typo, @tbro let me know if it is. I've amended this PR to rename QuorumMaker->QuorumMarker but not positive that's your intent
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.
I'm not sure either. Just noticed a discrepancy between the trait name and the comment above.
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.
from context I think it's meant to be QuorumMarker
(it looks like it indicates that things need to be signed by the full quorum rather than DA)
f190b5c
to
44456f9
Compare
Delete Memberships and replace functionality. Add some methods to `Membership` trait to deal w/ collapsing into one type both kinds of memberships (stake and DA). * avoid passing membership into `is_valid_cert * for DA, avoid proxying threshold through `Threshold` trait * remove `Topic` param from `Membership::new * Split cert impls by marker (#3891) * add membership methods to Cert trait * remove non-existent tests from justfile
We can keep the old name where we only have one membership type to keep the diff smaller.
Always use quorum for leader selection
00e6acd
to
ca4e339
Compare
ca4e339
to
77a88f1
Compare
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.
looks good to me, not sure if the test was meant to be commented out or not
// cross_tests!( | ||
// TestName: test_epoch_success, | ||
// Impls: [MemoryImpl, Libp2pImpl, PushCdnImpl], | ||
// Types: [TestTypes, TestTypesRandomizedLeader, TestTypesRandomizedCommitteeMembers<StableQuorumFilterConfig<123, 2>>, TestTypesRandomizedCommitteeMembers<RandomOverlapQuorumFilterConfig<123, 4, 5, 0, 2>>], | ||
// Versions: [EpochsTestVersions], | ||
// Ignore: false, | ||
// Metadata: { | ||
// TestDescription { | ||
// // allow more time to pass in CI | ||
// completion_task_description: CompletionTaskDescription::TimeBasedCompletionTaskBuilder( | ||
// TimeBasedCompletionTaskDescription { | ||
// duration: Duration::from_secs(60), | ||
// }, | ||
// ), | ||
// ..TestDescription::default() | ||
// } | ||
// }, | ||
// ); | ||
|
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.
is this meant to be commented out?
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.
yep, that's for once the epoch change actually works
Closes #3826
This branch has been rebased against another PR (#3867) which introduces a bunch of other changes to Memberships
A separate branch pre-rebase has been saved off here, if that helps with reviewing: https://github.com/EspressoSystems/HotShot/tree/ps/test-randomized-committee-premerge
This PR:
This PR does not:
Key places to review:
The implementations in hotshot/traits/election/helpers.rs, make sure those are commented well enough to be understood
Review the way I'm passing filter configs into TestTypesRandomizedCommitteeMembers (*FilterConfig)
CI