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

trusted-setup: Add target beacon randomness value #3220

Merged
merged 2 commits into from
Feb 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions ironfish-mpc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

Much of the code in this folder was originally forked from https://github.com/zcash-hackworks/sapling-mpc. The original licenses and copyright are retained in this folder.

## Beacon

Our final contribution will be seeded using the randomness generated from [The League of Entropy's drand network](https://drand.love/) in round #2759370.

## License

Licensed under either of
Expand Down
9 changes: 3 additions & 6 deletions ironfish-mpc/src/bin/beacon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,9 @@ fn main() {
use rand::SeedableRng;
use rand_chacha::ChaChaRng;

// Place beacon value here (2^42 SHA256 hash of Bitcoin block hash #534861)
let beacon_value: [u8; 32] =
decode_hex("2bf41a959668e5b9b688e58d613b3dcc99ee159a880cf764ec67e6488d8b8af3")
.as_slice()
.try_into()
.unwrap();
// Place beacon value here. The value will be the randomness generated by The League of Entropy's drand network
// (network chain hash: 8990e7a9aaed2ffed73dbd7092123d6f289930540d7651336225dc172e51b2ce) in round #2759370.
let beacon_value: [u8; 32] = decode_hex("").as_slice().try_into().unwrap();

print!("Final result of beacon: ");
for b in beacon_value.iter() {
Expand Down