Skip to content
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

Push DRB result to Membership #2625

Merged
merged 1 commit into from
Feb 20, 2025
Merged

Push DRB result to Membership #2625

merged 1 commit into from
Feb 20, 2025

Conversation

pls148
Copy link
Contributor

@pls148 pls148 commented Feb 14, 2025

Closes #<ISSUE_NUMBER>

This PR:

This PR does not:

Key places to review:

@pls148 pls148 marked this pull request as draft February 14, 2025 23:24
@pls148 pls148 force-pushed the ps/drb-result branch 2 times, most recently from 0df1805 to 6ee5cc2 Compare February 18, 2025 20:37
@@ -81,18 +81,22 @@ pub fn compute_drb_result<TYPES: NodeType>(drb_seed_input: DrbSeedInput) -> DrbR
/// The DRB result is the output of a spawned `compute_drb_result` call.
#[must_use]
pub fn leader<TYPES: NodeType>(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this function actually used anywhere?

I feel like this one should be removed; it'll happen in the Membership implementation and I believe the logic should happen via that. I think I also have this function re-implemented in #2638.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed for this one, i added it back in the testing PR just so there's something to work with but will rebase once #2638 merges


/// Called to notify the Membership when a new DRB result has been calculated.
/// Observes the same semantics as add_epoch_root
async fn add_drb_result(&mut self, _epoch: TYPES::Epoch, _drb_result: DrbResult) {}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we remove the default no-op implementation here (also for add_epoch_root)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done!


(sk.clone(), leader)
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need this extra logic? I think previously key_pair_for_id used the fact that all keys were generated from pre-determined seeds (which made sense in the context of a test)

I'm just a bit worried about complicating the logic here any more, since I don't think we need to pass around the keys like this in the integration tests

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This partially gets us to the point where we can have some DRB tests working, as we frequently make guesses about which node hsould be the leader based on the leader being the VIEW-th one of the eligible set. By making it look things up, we can get SOME (but not all) of the tests working with a StaticCommitteeWithDrb Membership implementation.

@pls148 pls148 marked this pull request as ready for review February 19, 2025 00:29
Copy link
Contributor

@ss-es ss-es left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks fine to me

@pls148 pls148 merged commit 3a59ace into main Feb 20, 2025
52 checks passed
@pls148 pls148 deleted the ps/drb-result branch February 20, 2025 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants