#contributors #randomness #untrusted #consensus #generate #commonware #bias-resistant

app commonware-vrf

Generate bias-resistant randomness with untrusted contributors using commonware-cryptography and commonware-p2p

20 releases

0.0.21 Feb 13, 2025
0.0.20 Feb 13, 2025
0.0.17 Jan 20, 2025
0.0.14 Dec 15, 2024
0.0.5 Aug 31, 2024

#879 in Magic Beans

Download history 128/week @ 2024-10-29 139/week @ 2024-11-05 2/week @ 2024-11-12 4/week @ 2024-11-19 35/week @ 2024-12-03 264/week @ 2024-12-10 16/week @ 2024-12-17 59/week @ 2024-12-31 79/week @ 2025-01-07 154/week @ 2025-01-14 64/week @ 2025-01-21 1/week @ 2025-01-28 218/week @ 2025-02-04 333/week @ 2025-02-11

668 downloads per month

MIT/Apache

715KB
15K SLoC

commonware-vrf

Crates.io Docs.rs

Generate bias-resistant randomness with untrusted contributors using commonware-cryptography and commonware-p2p.

Usage (3 of 4 Threshold)

To run this example, you must first install Rust and protoc.

Arbiter

cargo run --release -- --me 0@3000 --participants 0,1,2,3,4 --contributors 1,2,3,4

Contributor 1

cargo run --release -- --bootstrappers 0@127.0.0.1:3000 --me 1@3001 --participants 0,1,2,3,4  --arbiter 0 --contributors 1,2,3,4

Contributor 2

cargo run --release -- --bootstrappers 0@127.0.0.1:3000 --me 2@3002 --participants 0,1,2,3,4  --arbiter 0 --contributors 1,2,3,4

Contributor 3

cargo run --release -- --bootstrappers 0@127.0.0.1:3000 --me 3@3003 --participants 0,1,2,3,4  --arbiter 0 --contributors 1,2,3,4

Contributor 4 (Corrupt)

Send invalid dealings to contributors.

cargo run --release -- --corrupt --bootstrappers 0@127.0.0.1:3000 --me 4@3004 --participants 0,1,2,3,4 --arbiter 0 --contributors 1,2,3,4

Contributor 4 (Lazy)

Only send 2f dealings to contributors (force reveal f).

cargo run --release -- --lazy --bootstrappers 0@127.0.0.1:3000 --me 4@3004 --participants 0,1,2,3,4 --arbiter 0 --contributors 1,2,3,4

Contributor 4 (Forger)

Forge acknowledgements from contributors.

cargo run --release -- --forger --bootstrappers 0@127.0.0.1:3000 --me 4@3004 --participants 0,1,2,3,4 --arbiter 0 --contributors 1,2,3,4

Dependencies

~20–31MB
~577K SLoC