Skip to content

Commit

Permalink
started a beacon trial run
Browse files Browse the repository at this point in the history
  • Loading branch information
weijiekoh committed Mar 4, 2020
1 parent 6c7e4df commit d7c3ad3
Showing 1 changed file with 65 additions and 5 deletions.
70 changes: 65 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,16 @@ setup.
The plan is to manually coordinate the ceremony while we complete a UI that
automates this process.

## Ceremony progress

| Participant ID | Identity | GPG key | Attestation |
|-|-|-|-|
| 0001 | Koh Wei Jie | [Keybase](https://keybase.io/contactkohweijie) | [0001_weijie_response](./0001_weijie_response/README.md) |

## How we will prepare for the ceremony

We will use [response
0022](https://github.com/weijiekoh/perpetualpowersoftau/tree/master/0022_roman_response)
We will use [challenge
0023](https://github.com/weijiekoh/perpetualpowersoftau/tree/master/0022_roman_response)
from Perpetual Powers of Tau as the starting point.

We will apply a random beacon. We use the VDF Alliance's verifiable delay
Expand All @@ -20,8 +26,9 @@ They simply pick the latest available block whenever they compute a VDF output.
As such, we will choose the VDF output of the blockhash of the block closest
and prior to block #____.

Finally, we will apply ___ rounds of the ___ hash
algorithm to the output and use the result as our random beacon.
Finally, we will apply ____ rounds of the SHA256 hash
algorithm to the output and use the result as our random beacon. The
`phase2-bn254` software's `beacon_constrained` binary will do this for us.

- Using the `ppot_fix` branch of
[phase2-bn254](https://github.com/kobigurk/phase2-bn254), we will modify
Expand Down Expand Up @@ -74,4 +81,57 @@ and `verifier.sol`.

## Instructions for each participant

TODO
First, set up a Linux machine and install Rust and Cargo following instructions [here](https://www.rust-lang.org).

Download and compile the required source code:

```bash
git clone https://github.com/kobigurk/phase2-bn254.git --branch semaphore-setup && \
cd phase2-bn254/phase2 && \
cargo build --release
```

Next, get the `circuit<n>.params` file from the coordinator.

In the `phase2` directory, run:

```bash
cargo run --release --bin contribute circom<n>.params circom<n+1>.params <random entropy>
```

Send the `circom<n+1>.params` file to the coordinator.

## Test run

1. Cloned `phase2-bn254` and switched to the `ppot_fix` branch

2. Ran `b2sum -b challenge` on challenge 0023

```
14e4fe7759391f2c6988e7902abd6343cc27d25980883aec39a88d1e415610b225e0aa5ac1ec9f5a40b699894767ac75983e5ca5441ebbc6ca66a61d049c9112 *../roman/new_challenge
```

3. Ran `beacon_constrained` with `challenge` 0023 in the current working directory.

```
ubuntu@ppotcoordinatorsea:/mnt/disk0/beacon_test$ ../ppot_fix/phase2-bn254/powersoftau/target/release/beacon_constrained
Will contribute a random beacon to accumulator for 2^28 powers of tau
In total will generate up to 536870911 powers
0: 0000000000000000000a558a61ddc8ee4e488d647a747fe4dcc362fe2026c620
1: 0659d0f689b355b876b46cb515fcbadf69506e66b069a85a737d6fcc9958ecce
...
1023: af25c73da6f0fa1de98b7d677026a57513056403260fd80cfe3f4b65c71bf3a0
Final result of beacon: bb8eef164289bf02058b42c4ca2ac72013deb099bc79067e5779c9f1728b1271
Done creating a beacon RNG
Calculating previous contribution hash...
Contributing on top of the hash:
dfcaaa51 9ada2419 256d73b4 1d944815
4ff1b687 5874d44c f4e18be8 e933966e
08db79db 40878856 78138e60 d3c82a9a
7d50735c 449af38a 76d9ac9c 81af7e2a
Computing and writing your contribution, this could take a while...
Done processing 2097151 powers of tau
```

<!--4. Ran `prepare_phase2`.-->

0 comments on commit d7c3ad3

Please sign in to comment.