-
Notifications
You must be signed in to change notification settings - Fork 53
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
#3967 Option<Epoch> for everybody #4007
Conversation
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.
Sorry, I haven't gone through the whole PR yet. I'll try to do it today but I need to first finish some other stuff.
b9b1eb3
to
64559d9
Compare
4feccd4
to
71ab918
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.
There's a lot of comments but that's mainly because I either missed some discussions or we haven't discussed some topics yet.
There are two things unclear to me:
- What conditions need to be fulfilled for a node to use epochs.
- What is the desired behaviour when we have a mix of nodes with and without epochs enabled communicating together.
/// #3967 REVIEW NOTE: This type is kinda ugly, should we Result<Option<Epoch>> instead? | ||
pub fn epoch(&self) -> Option<Option<TYPES::Epoch>> { |
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.
yeah, I agree. Let's do that.
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.
This function gets used in one place, and when I made it with Result<> it just added a bunch of extra ugliness without much point. I'm thinking it makes the most sense to punt on this for now.
a89a250
to
6abf4bc
Compare
2acccd1
to
2b60f1b
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 hope I didn't miss anything. There's some changes still needed I guess so I'll probably give it another pass.
@@ -71,7 +71,7 @@ impl<TYPES: NodeType> Default for TestStorageState<TYPES> { | |||
next_epoch_high_qc2: None, | |||
high_qc2: None, | |||
action: TYPES::View::genesis(), | |||
epoch: TYPES::Epoch::genesis(), | |||
epoch: None, |
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.
maybe genesis_epoch_from_version
?
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.
That one creates a lot of dependency, we should probably talk about. In order to make that work I need to end up with Versions as an argument to NodeImplementation, unless i'm missing something. That seems like it's antithetical to how things are designed. Possible I'm missing something though.
1a9b798
to
30447e2
Compare
b947a82
to
518b8fc
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 now. Maybe just remove the extra comments before merging.
I'll now have a look at the test failures to help with that.
Closes #3967
This PR:
This PR does not:
Key places to review: