Skip to content

Commit

Permalink
docs: improve network usage instructions (#941)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattstam authored Jun 18, 2024
1 parent 1c65d35 commit b0628f4
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 9 deletions.
Binary file added book/prover-network/key.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 19 additions & 7 deletions book/prover-network/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,42 @@ Succinct [has been building](https://blog.succinct.xyz/succinct-network/) the Su

## Get access

Currently the network is permissioned, so you need to gain access through Succinct. After you have completed the key setup below, you can submit your address in this [form](https://docs.google.com/forms/d/e/1FAIpQLSd-X9uH7G0bvXH_kjptnQtNil8L4dumrVPpFE4t8Ci1XT1GaQ/viewform) and we'll contact you shortly.
**[FILL OUT THIS FORM](https://forms.gle/rTUvhstS8PFfv9B3A)** to gain access to the Succinct
Network. Completing this form requires you to complete the [key setup](#key-setup) steps below.

### Key Setup

The prover network uses secp256k1 keypairs for authentication, like Ethereum wallets. You may generate a new keypair explicitly for use with the prover network, or use an existing keypair. Currently you do not need to hold any funds in this account, it is used solely for access control.

Prover network keypair credentials can be generated using the [cast](https://book.getfoundry.sh/cast/) CLI tool:
Prover network keypair credentials can be generated using the
[cast](https://book.getfoundry.sh/cast/) CLI tool.

[Install](https://book.getfoundry.sh/getting-started/installation#using-foundryup):
First [install Foundry](https://book.getfoundry.sh/getting-started/installation#using-foundryup):

```sh
curl -L https://foundry.paradigm.xyz | bash
```

Generate a new keypair:
Upon running this command, you will be prompted to source your shell profile and run `foundryup`. Afterwards you should have access to the `cast` command.

Use `cast` to generate a new keypair:

```sh
cast wallet new
```

Or, retrieve your address from an existing key:
which will give you an output similar to this:

![Screenshot from running 'cast wallet new' to generate an SP1_PRIVATE_KEY.](key.png)

The "Address" what you should submit in the [form](https://forms.gle/rTUvhstS8PFfv9B3A), in the example above this is `0x552f0FC6D736ed965CE07a3D71aA639De15B627b`. The "Private key" should be kept safe and
secure. When interacting with the network, you will set your `SP1_PRIVATE_KEY` environment variable
to this value.

### Retrieve an existing key

If you already have an existing key you would like to use, you can also use `cast` retrieve your address:

```sh
cast wallet address --private-key $PRIVATE_KEY
```

Make sure to keep your private key somewhere safe and secure, you'll need it to interact with the prover network.
4 changes: 2 additions & 2 deletions book/prover-network/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ SP1_PROVER=network SP1_PRIVATE_KEY=... RUST_LOG=info cargo run --release

- `SP1_PROVER` should be set to `network` when using the prover network.

- `SP1_PRIVATE_KEY` should be set to your [private key](#key-setup). You will need
to be using a [permissioned](#get-access) key to use the network.
- `SP1_PRIVATE_KEY` should be set to your [private key](./setup.md#key-setup). You will need
to be using a [permissioned](./setup.md#get-access) key to use the network.

When you call any of the prove functions in ProverClient now, it will first simulate your program, then wait for it to be proven through the network and finally return the proof.

Expand Down

0 comments on commit b0628f4

Please sign in to comment.