A blazingly-fast implementation of a synchronous gossip protocol in Rust with PyO3 Python bindings.
cargo build --release
cargo run --release
Add crate-type = ["cdylib"]
under [lib]
to Cargo.toml
, then:
poetry install --no-root
poetry run maturin build --release
poetry add target/wheels/*.whl
>>> from gossip_protocol_rs import pyrun_gossip_protocol
>>> res = pyrun_gossip_protocol(num_honest_sample=3000, num_adversarial_sample=2000,
num_non_sample=100000, num_peers=8, cycles=50)
See dineshpinto/synchronous-gossip-protocol for a pure Python implementation, along with additional theoretical details.
Uses criterion
to benchmark the library.
cargo bench
Param | Value |
---|---|
num_non_sample | 1000 |
num_honest | 6 |
num_adversarial | 4 |
num_peers | 6 |
cycles | 200 |