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

Fix the roster ID generation #528

Merged
merged 2 commits into from
Mar 19, 2019
Merged

Fix the roster ID generation #528

merged 2 commits into from
Mar 19, 2019

Conversation

Gilthoniel
Copy link
Contributor

This sorts the service identities because it can happen the order
array change when writing/reading toml files. This makes sure it
doesn't impact the final ID.

This issue occurs when checking the roster sent back when creating a genesis block in dedis/cothority#1764

This sorts the service identities because it can happen the order
array change when writing/reading toml files. This makes sure it
doesn't impact the final ID.
@Gilthoniel Gilthoniel self-assigned this Mar 19, 2019
@Gilthoniel
Copy link
Contributor Author

It would be necessary to increase the patch version to use the fix in cothority

@jeffallen
Copy link
Contributor

Can you explain the backwards compatibility impacts of this again better in your comment above?

Copy link
Contributor

@jeffallen jeffallen left a comment

Choose a reason for hiding this comment

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

I agree with this code, but we are still discussing the compatibility of it.

This adds a function to generate the correct ID of the roster. This
should eventually be the way to know the ID as we can't compute it
from the list of server identities.
@Gilthoniel
Copy link
Contributor Author

So the first backwards compatibility was a bit shaky because the ID is usually transferred through protobuf so you don't recalculate it. But when you derive the roster you do. The order is not supposed to have changed because it happens when you read/write toml files, that's why we never had this issue. But to have 100% certainty of backwards compatibility, I updated the code so that we can gradually use the fix.

Copy link
Contributor

@jeffallen jeffallen left a comment

Choose a reason for hiding this comment

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

Oh, beautiful. That crystallised it for me. LGTM!

@jeffallen jeffallen merged commit 8102cea into master Mar 19, 2019
@jeffallen jeffallen deleted the roster_id_fix branch March 19, 2019 14:45
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