Skip to content

Commit

Permalink
feat: implementing configuration for ballots (#7)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
NikitaMasych and olegfomenko committed Aug 29, 2024
1 parent bdb2534 commit 4322a91
Show file tree
Hide file tree
Showing 3 changed files with 501 additions and 181 deletions.
1 change: 1 addition & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
pull_request:
branches:
- main
- epic/*
push:
branches:
- main
Expand Down
4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
rand = "0.9.0-alpha.2"
log = "0.4.22"
rkyv = { version = "0.7.44", features = ["validation"]}
serde = { version = "1.0.207", features = ["derive"] }
bincode = "1.3.3"
tokio = { version = "1.39.2", features = ["full", "test-util"] }
rand = "0.9.0-alpha.2"
seeded-random = "0.6.0"
Loading

0 comments on commit 4322a91

Please sign in to comment.