Skip to content

Commit

Permalink
Merge pull request #8 from aoraki-labs/update-for-arch
Browse files Browse the repository at this point in the history
update doc
  • Loading branch information
hugo-blue authored Aug 23, 2023
2 parents dfb9eeb + 687b992 commit b8599ee
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 61 deletions.
2 changes: 1 addition & 1 deletion docs/guides/_category_.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
"position": 5,
"link": {
"type": "generated-index",
"description": "Guides on how to run a prover, etc"
"description": ""
}
}
54 changes: 8 additions & 46 deletions docs/guides/how-to-run-prover.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,53 +5,15 @@ sidebar_position: 3

# How to Run a Prover

This document represent on how to run a standalone uniform ZK Pool prover build upon multiple ZKP circuit projects.
This document explains how to run a ZKPool prover.

### Environment requirements

* UNIX-like OS (Ubuntu 20.04,Ubuntu22.04 recommend)
* Rust 1.65.0+
* 16 core + 32G memory

### run zkpool-prover with one command

Notice: please replace the `<account_access_key>` and `<device_id>` with your own account access key and device id.

* Ubuntu
```bash
curl -sSf -L https://zkpool-connect-1318455074.cos.na-siliconvalley.myqcloud.com/prover-client/join_zkpool_ubuntu_cpu | sh -s -- --access-key <account_access_key> --device-id <device_id>
```

* MacOS
```bash
curl -sSf -L https://zkpool-connect-1318455074.cos.na-siliconvalley.myqcloud.com/prover-client/join_zkpool_macos-catalina_cpu | sh -s -- --access-key <account_access_key> --device-id <device_id>
```


### Compile and run zkpool-prover from source code

```bash
git clone https://github.com/aoraki-labs/zkpool-prover.git

cd zkpool-prover
cargo build --release
wget https://storage.googleapis.com/zkevm-circuits-keys/kzg_bn254_21.srs -P ./target/release

cd ./target/release
./zkpool-prover -k <account_access_key> -u <device_id> -p <scheduler_address>
```

* zkpool-prover parameters
```
-k: the prover access key
-u: the prover device id (optional,program will generate one automatically if not set )
-p: the zkpool scheduler pool address
```

### Run script
```bash
./run-prover.sh #Notice: remind to modify the ./zkpool-prover running parameters in the shell script
```
After logging into ZKPool, follow the guide on how to connect to ZKPool and run a prover.

!https://s3-us-west-2.amazonaws.com/secure.notion-static.com/75e795e7-49f7-43f2-b36d-c9412763b3ba/Untitled.png

The basic flow is as follows:

1. Choose your operating system: Ubuntu 20.04/22.04 or Mac OS Catalina.
2. Choose between CPU/GPU (coming soon).
3. Generate an access key for your account.
4. Follow one command to download your keys and prover binary, and then run the prover binary.
64 changes: 50 additions & 14 deletions docs/guides/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,65 @@ sidebar_position: 1
---

# Introduction
ZKPool A0-0 is dedicated to the Taiko A4 Testnet. As per the plan, ZKPool is set to expand into more ZKP projects soon.

ZKPool at the moment supports users to join as an individual prover worker or a group of prover workers of [Taiko Eldfell L3 (alpha-4) Testnet](https://taiko.mirror.xyz/HJCWBluTwmNyWRkhzIXXr0k5xAaalRNtmlyDMJTu_ws).
ZKPool aims to connect various ZKP applications and ZKP provers.

Taiko Alpha-4 testnets comes with a new staking based prover economics. Blocks will be distributed to top 32 staked provers. To be one of the top 32 provers, a substantial amount of Taiko token and capacity of prover workers (mininum 32) are required. It's very hard for smaller and solo provers to successfully compete in this staking contest.
Taiko is a decentralized, Ethereum-equivalent zk-rollup project with Type 1 zkEVM technology.

ZKPool aims to provide the following capabilities:
ZKPool A0 Phase 0 (ZKPool A0-0) is dedicated to the Taiko Alpha-4 (A4) Testnet, and supports users who want to join as individual provers. According to the plan, ZKPool will soon expand into more ZKP projects.

Taiko A4 Testnet comes with a new staking-based prover economics. Blocks will be distributed to the top 32 staked provers. To become one of the top 32 provers, a substantial amount of Test Taiko tokens (TTKO) and a minimum of 32 prover machines are required. It's very difficult for smaller and solo provers to successfully compete in this staking contest.

* ZKPool gathers smaller provers' capacity together and stake as a pool
* ZKPool operates to minimize the risks of being slashed
* ZKPool calculates the rewards of provers
* ZKPool makes it really easy for provers to join
ZKPool aims to provide the following capabilities:

At the first stage, ZKPool will stake by itself on behalf of all provers connected to the pool. Pool is open to registered provers to connect to.
- ZKPool gathers smaller provers' capacity together and stakes as a pool.
- ZKPool operates to minimize the risks of being slashed.
- ZKPool calculates and distributes the rewards of provers.
- ZKPool makes it really easy for provers to join.

Initially, ZKPool will assume the risk and stake on behalf of all the provers connected to the pool. The pool is open for registered provers to connect to.

## General flow
Currently, the general flow is the following:

1. Register on https://zkpool.io, generate the user account's unique access key
Currently, the general flow is as follows:

1. Register on [https://zkpool.io](https://zkpool.io/), generate the user account's unique access key.
2. Use the one command installation script to connect to ZKPool.
3. Login to [https://zkpool.io](https://zkpool.io/) to view prover machine status and rewards.

## Hardware requirements

The Taiko project supports various provers to join, CPU, GPU, and so on. To avoid dominance by hardware performance, it has a relatively long proof window that CPU devices can join as a prover.

ZKPool will provide both CPU and GPU binaries (coming soon), and it will also open-source the prover client codes to support 3rd party to build its hardware binary.

The hardware that meets the minimum requirements can run CPU prover binary:

- 8 or 16 core CPU
- 32 GB memory

In Taiko A4, the proof time on the above hardware may take more than 10 minutes.

Note from [Taiko](https://taiko.mirror.xyz/HJCWBluTwmNyWRkhzIXXr0k5xAaalRNtmlyDMJTu_ws): this is not representative of what a full ZK-EVM proof will eventually cost as not all circuits are included yet. More circuits are being integrated as we go.

In the future, the hardware requirements may be updated as Taiko covers more circuits.

## Reward distribution

According to [Taiko](https://taiko.mirror.xyz/HJCWBluTwmNyWRkhzIXXr0k5xAaalRNtmlyDMJTu_ws):

> Please note, reward or profit considerations (if any) will heavily depend on a variety of factors, and are in no way guaranteed. This holds for proposers, provers, and all network participants. Certain assumptions used may not reflect reality for the duration of the testnet period, protocol flaws can be found, and mainnet timing is uncertain. We reserve the right to adjust the program, with the ultimate goal of testing unprecedented permissionless proposing and proving in a ZK-Rollup. You should only participate if you are keen to help the network test a technical design. Basically, for science.
>
ZKPool will share the reward of TTKO with provers, and in ZKPool A0-0, the distribution rule is:

- ZKPool: 20%
- Prover: 80%

2. Use the one command installation script to connect to ZKPool
Note:

3. Login to https://zkpool.io to view prover workers status, rewards
1. The rewards are calculated based on a certain interval, for example, on a daily basis.
2. Currently, the reward cannot be withdrawn and will be recorded under the prover's wallet address. ZKPool will soon upgrade to support users in withdrawing the TTKO.
3. The reward's actual value is not guaranteed. We participate to help Taiko to test and become a successful zk-rollup.
4. ZKPool has the right to adjust the distribution rule in the future.

Note: the rewards are calculated based on a certain interval, for example on a daily basis.

0 comments on commit b8599ee

Please sign in to comment.