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

Bump Synedrion to latest master #946

Merged
merged 15 commits into from
Jul 18, 2024
Merged

Bump Synedrion to latest master #946

merged 15 commits into from
Jul 18, 2024

Conversation

HCastano
Copy link
Collaborator

The latest HEAD of Synedrion includes child key derivation functionality that I need
for the new registration flow, so I had to update the dependency.

Two things to note:

  • I'm using my own branch of Synedrion until
    Implement serde for CGGMP21 params synedrion#133 gets merged since that adds some
    serde support that I need
  • There are one or two TODOs in places where I want to double check that functionality
    remained the same, but I'll do that tomorrow. I'd still consider the PR as a whole
    ready for review

Copy link
Member

@JesseAbram JesseAbram left a comment

Choose a reason for hiding this comment

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

looks good from my end but should also check with @fjarri before merging

Copy link
Contributor

@ameba23 ameba23 left a comment

Choose a reason for hiding this comment

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

Looks great. And once this is merged we get some other nice things such as being able to get the session id from a synedrion protocol message.

Normally i would discourage using different versions of synedrion in different crates but since you are planning to fix as soon i am approving.

@@ -206,24 +209,26 @@ pub async fn execute_dkg(
tracing::debug!("Executing DKG");
let broadcaster = chans.0.clone();

let mut party_ids: Vec<PartyId> =
let party_ids: BTreeSet<PartyId> =
Copy link
Contributor

Choose a reason for hiding this comment

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

+1 for a set rather than a mutable vector

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

🙌 thank mr bogdan 🙌

) -> Result<(Vec<PartyId>, bool), ProtocolExecutionErr> {
let mut parties = vec![];
) -> Result<(BTreeSet<PartyId>, bool), ProtocolExecutionErr> {
let validators = validators.iter().cloned().collect::<Vec<PartyId>>();
Copy link
Contributor

Choose a reason for hiding this comment

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

i guess for this to work we need this to turn the set into a vector with consistent ordering. Since the tests pass this must be the case.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I believe this works because BTreeSet requires that any item inserted into the set implements Ord, meaning that the contents of the set will be ordered at any point in time.

crates/protocol/tests/protocol.rs Outdated Show resolved Hide resolved
@HCastano HCastano merged commit ed47af1 into master Jul 18, 2024
13 checks passed
@HCastano HCastano deleted the hc/bump-synedrion branch July 18, 2024 18:58
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.

3 participants