-
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
Remove NodeImplementation
Generics from Network Types
#2073
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bfish713
requested review from
dailinsubjam,
shenkeyao,
elliedavidson,
rob-maron and
DieracDelta
November 16, 2023 03:58
Closed
elliedavidson
previously approved these changes
Nov 17, 2023
bfish713
dismissed
elliedavidson’s stale review
November 17, 2023 21:00
The merge-base changed after approval.
elliedavidson
previously approved these changes
Nov 20, 2023
bfish713
dismissed
elliedavidson’s stale review
November 20, 2023 18:49
The merge-base changed after approval.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR does 2 things primarily.
NodeType
. This means that we specify 1Membership
type for everything. Just because aMembership
is the same type doesn't mean it describes the same thing. So we can still have a Quorum with 1000s of nodes and a committee of 10 nodes. What this describes is that anything describing membership uses the same types throughout the system. Currently this fits our model completely ,we use the same membership type for everyExchange
right now (the type isGeneralStaticCommittee
). When we implement Variable stake I can foresee us using just one type as well. If we do need to create a differentMembership
impl for DA, or VID, or something, I propose we simply add this type toNodeType
. That change should be very simple to do after this PR.NodeImplementation
generic parameters for a ton of stuff. We had been passing this all over the code, specifically the newtork stack (Messages
,ConnectedNetworks
, andCommunicationChannels
) mostly just to pull out variousMemberships
Removing this was mostly a side effect of the first change.Both of these changes will make removing the Exchanges traits much easier.
This depends on: #2071 so review that one first because this branch includes those changes as well.
For reviewing this I would focus on the changes to in node_implementation.rs, vote2.rs, and simple_vote.rs. Also note the remove of the generic parameters from various structs/traits. The rest is simply finding and removing the parameters everywhere.