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

Rewriting the hash_to_range function #8

Merged
merged 3 commits into from
Aug 29, 2024

Conversation

olegfomenko
Copy link
Contributor

Rewriting the hash_to_range function to achieve better uniform distribution.

Now it uses seeded random based on ChaCha12Rng instead of DefaultHash as before. Also, it fixes distribution in range by executing selection several times to achieve uniform distribution when range != 2^k

…bution.

 Now it uses seeded random based on ChaCha12Rng instead of DefaultHash as before. Also, it fixes distribution in range by executing selection several times to achieve uniform distribution when range != 2^k
@NikitaMasych
Copy link
Member

Hey guys, I will be merging this PR to get a clear picture on the final epic, however feel free to write comments and we'll resolve them

@NikitaMasych NikitaMasych reopened this Aug 29, 2024
@NikitaMasych NikitaMasych merged commit f5b1111 into epic/config Aug 29, 2024
16 checks passed
@NikitaMasych NikitaMasych deleted the feature/new-range-random branch August 29, 2024 11:47
NikitaMasych added a commit that referenced this pull request Aug 29, 2024
* feat: moved leader computation to party, added ballot number to seed

* feat: add configuration of timebounds for events, async

* feat: use hash-based leader election instead of rand

* fix: resolved events sending

* feat: added status checks to update_state

* feat: add timeout handling for latency between parties

* feat: add opportunity to configure prior to launch timeout

* feat: changed logic for leader election

* feat: refactor leader election components

* Rewriting the hash_to_range function  (#8)

* rewriting the hash_to_range function to achieve better uniform distribution.

 Now it uses seeded random based on ChaCha12Rng instead of DefaultHash as before. Also, it fixes distribution in range by executing selection several times to achieve uniform distribution when range != 2^k

* Adding comments

* fix: resolved linter issues/failing tests

---------

Co-authored-by: Nikita Masych <[email protected]>

---------

Co-authored-by: Oleg Fomenko <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants