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 eviction of absent participant #20

Merged
merged 4 commits into from
Sep 28, 2020
Merged

Fix eviction of absent participant #20

merged 4 commits into from
Sep 28, 2020

Conversation

nikkolasg
Copy link

Linked to drand/drand#752

@nikkolasg
Copy link
Author

nikkolasg commented Sep 24, 2020

Well Actually lets not merge right now - this fixes the bug we had but it's not fixing it in the case where we dont have fastsync, it's not general enough - I'll refactor the fix tmr

@nikkolasg nikkolasg marked this pull request as draft September 24, 2020 20:31
@nikkolasg nikkolasg marked this pull request as ready for review September 25, 2020 07:20
@nikkolasg
Copy link
Author

Ready to review

Copy link
Member

@willscott willscott left a comment

Choose a reason for hiding this comment

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

test appears to validate the right case

share/dkg/dkg.go Outdated
// we only need to look at the nodes that did not sent any response,
// since the invalid one are already markes as evicted
allSent := append(validAuthors, d.evictedHolders...)
isPresent := isEvicted
Copy link
Member

Choose a reason for hiding this comment

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

this is counter-intuitive. from what i can see, this method is only used in this if block. can you directly call 'isEvicted' in the loop below. Renaming it to a variable named the inverse property makes it more confusing what is being checked.

@nikkolasg nikkolasg merged commit 8efc5d4 into master Sep 28, 2020
@nikkolasg nikkolasg deleted the fix/714 branch September 28, 2020 12:16
Robingoumaz pushed a commit to Robingoumaz/kyber-drand that referenced this pull request Apr 4, 2024
* test + correction on fast sync

* removing useless test

* adapted to general case

* better function name
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.

None yet

2 participants