-
Notifications
You must be signed in to change notification settings - Fork 60
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
Make Sortition Hash compliant with specification #917
Make Sortition Hash compliant with specification #917
Conversation
IMHO, |
6af2ffe
to
83f51d3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we are aiming to test compatibility between node and dusk-blockchain I'm gonna to block this merge until the same changes are reflected on dusk-blockchain too
No more dusk-blockchain compatibility is required
@fed-franz I've dismissed my blocking review. Please go on if this is still required |
83f51d3
to
5bcb3ec
Compare
Does this mean the mirror issue on |
5bcb3ec
to
6de3313
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This changes the hash from H(round||counter||step||seed) to H(seed||round||step||counter), to be compliant with Deterministic Sortition specification. Tests 'test_sortition_hash()' and 'test_generate_sortition_score()' are also updated.
Fixed tests: - test_collect_votes - test_deterministic_sortition_1 - test_deterministic_sortition_2 test_collect_votes code has been simplified.
6de3313
to
54c3aa4
Compare
Resolves #907
This PR changes the sortition hash from$H(round||counter||step||seed)$ to $H(seed||round||step||counter)$ ,
to be compliant with Deterministic Sortition specification.
The following tests are also updated:
test_sortition_hash
,test_generate_sortition_score
,test_collect_votes
,test_deterministic_sortition_1
,test_deterministic_sortition_2
.Note that
test_collect_votes
code has been also overhauled to make it simpler and easier to update in the future.