Skip to content

Commit 7be645f

Browse files
commit all files
1 parent 43c6b37 commit 7be645f

File tree

2 files changed

+46
-54
lines changed

2 files changed

+46
-54
lines changed

docs/cdk/how-to/deploy-t1-prover-devnet.md

Lines changed: 45 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
This document provides a [docker-compose file](https://github.com/0xPolygonZero/eth-pos-devnet-provable/blob/959da56673c25c2094b1a23bc9e1fa9ae9a9db6e/docker-compose.yml) for running a fully-functional, local development network (devnet) for Ethereum with proof-of-stake enabled.
1+
This document shows you how to deploy a [docker-compose file](https://github.com/0xPolygonZero/eth-pos-devnet-provable/blob/959da56673c25c2094b1a23bc9e1fa9ae9a9db6e/docker-compose.yml) for running a fully-functional, local development network (devnet) for Ethereum with proof-of-stake enabled.
22

33
The configuration uses [Prysm](https://github.com/prysmaticlabs/prysm) as a consensus client, with either [geth](https://github.com/ethereum/go-ethereum) or [erigon](https://github.com/ledgerwatch/erigon) as an execution client.
44

@@ -10,45 +10,45 @@ The devnet is fully functional and allows for deployment of smart contracts and
1010

1111
Running a devnet like this provides the best way to understand Ethereum proof-of-stake under the hood, and gives allowance for devs to tinker with various settings that suit their system design.
1212

13-
# Running the devnet
13+
## Running the devnet
1414

15-
First, checkout this [repository](https://github.com/0xPolygonZero/eth-pos-devnet-provable/tree/344fff4ee1032a0b095ab0c8d757e0ede72da156) and install docker.
15+
1. Checkout this [repository](https://github.com/0xPolygonZero/eth-pos-devnet-provable/tree/344fff4ee1032a0b095ab0c8d757e0ede72da156) and install docker.
1616

17-
Then run the following command to fire up the devnet containers:
17+
2. Run the following command to fire up the devnet containers:
1818

19-
``` bash
20-
docker compose up -d
21-
```
22-
23-
The statuses of the containers will be displayed as shown below:
19+
``` bash
20+
docker compose up -d
21+
```
2422

25-
``` example
26-
$ docker compose up -d
27-
[+] Running 7/7
28-
[+] Running 10/10
29-
✔ Container eth-pos-devnet-create-beacon-chain-genesis-1 Exited
30-
✔ Container eth-pos-devnet-create-beacon-node-keys-1 Exited
31-
✔ Container eth-pos-devnet-beacon-chain-2-1 Started
32-
✔ Container eth-pos-devnet-beacon-chain-1-1 Started
33-
✔ Container eth-pos-devnet-geth-genesis-1 Exited
34-
✔ Container eth-pos-devnet-geth-import-1 Exited
35-
✔ Container eth-pos-devnet-erigon-genesis-1 Started
36-
✔ Container eth-pos-devnet-validator-1 Started
37-
✔ Container eth-pos-devnet-erigon-1 Started
38-
✔ Container eth-pos-devnet-geth-1 Started
39-
```
23+
You should see the statuses of the containers as shown below:
24+
25+
``` example
26+
$ docker compose up -d
27+
[+] Running 7/7
28+
[+] Running 10/10
29+
✔ Container eth-pos-devnet-create-beacon-chain-genesis-1 Exited
30+
✔ Container eth-pos-devnet-create-beacon-node-keys-1 Exited
31+
✔ Container eth-pos-devnet-beacon-chain-2-1 Started
32+
✔ Container eth-pos-devnet-beacon-chain-1-1 Started
33+
✔ Container eth-pos-devnet-geth-genesis-1 Exited
34+
✔ Container eth-pos-devnet-geth-import-1 Exited
35+
✔ Container eth-pos-devnet-erigon-genesis-1 Started
36+
✔ Container eth-pos-devnet-validator-1 Started
37+
✔ Container eth-pos-devnet-erigon-1 Started
38+
✔ Container eth-pos-devnet-geth-1 Started
39+
```
4040

41-
The containers can be stopped with this command: `docker compose stop`.
41+
3. Stop the containers with this command: `docker compose stop`.
4242

43-
It's advisable for each restart to be preceded with wiping old data. Use `make clean` for that.
43+
4. Before each restart, wiping old data with `make clean`.
4444

45-
Logs of launched services can be inspected with this command:
45+
5. Inspect the logs of launched services with this command:
4646

47-
``` bash
48-
docker logs eth-pos-devnet-geth-1 -f
49-
```
47+
``` bash
48+
docker logs eth-pos-devnet-geth-1 -f
49+
```
5050

51-
# Available features
51+
## Available features
5252

5353
- Starts from the Capella Ethereum hard fork.
5454
- The network launches with a [Validator Deposit Contract](https://github.com/ethereum/consensus-specs/blob/dev/solidity_deposit_contract/deposit_contract.sol) deployed at the address `0x4242424242424242424242424242424242424242`. This can be used to onboard new validators into the network by depositing 32 ETH into the contract.
@@ -58,11 +58,11 @@ docker logs eth-pos-devnet-geth-1 -f
5858
- The Prysm client's REST APIs are available at `http://beacon-chain:3500`. For more info on what these APIs are, see [here](https://ethereum.github.io/beacon-APIs/)
5959
- The Prysm client also exposes a gRPC API at `http://beacon-chain:4000`.
6060
61-
# Type 1 prover testing procedure
61+
## Type-1 prover testing procedure
6262
63-
The aim of this devnet setup is to use Polygon Type-1 Prover to test Erigon state witnesses.
63+
The aim of this devnet setup is to use Polygon CDK type-1 prover to test Erigon state witnesses.
6464
65-
Next is a procedure for creating some test data.
65+
The following steps create some test data.
6666
6767
1. Start the devnet up with `docker compose up`. If you had previously run this command, you might want to wipe old data with a `make clean` to avoid running from a previous state.
6868
2. Wait for blocks to start being produced. This should only take a few seconds. You can use `polycli monitor` to quickly check that blocks are being created.
@@ -124,37 +124,29 @@ Next is a procedure for creating some test data.
124124
seq 2 240 | awk '{print "./leader --arithmetic 16..23 --byte-packing 9..21 --cpu 12..25 --keccak 14..20 --keccak-sponge 9..15 --logic 12..18 --memory 17..28 --runtime in-memory -n 4 jerigon --rpc-url http://127.0.0.1:8545 --block-number " $1 " --proof-output-path " $1 ".json --previous-proof " ($1 - 1) ".json"}'
125125
```
126126

127+
### Operational notes
127128

128-
## Operational notes
129-
130-
- Pay attention to memory usage on the system running
131-
`zero-bin`. Certain transactions can consume a lot of memory and
132-
lead to an out-of-memory (OOM) error.
129+
- Pay attention to memory usage on the system running `zero-bin`. Certain transactions can consume a lot of memory and lead to an out-of-memory (OOM) error.
133130
- You'll want to run `zero-bin` on a system with at least 32GB of RAM.
134-
- When you run `zero-bin`, a local file will be created with a name
135-
like `prover_state_*`. This file needs to be deleted if any of the
136-
[circuit sizes are changed](https://github.com/0xPolygonZero/zero-bin#leader-usage).
131+
- When you run `zero-bin`, a local file will be created with a name like `prover_state_*`. This file needs to be deleted if any of the [circuit sizes are changed](https://github.com/0xPolygonZero/zero-bin#leader-usage).
137132
- There is a [useful script](https://github.com/0xPolygonZero/zero-bin/blob/assorted_fixes/tools/prove_blocks.sh) in `zero-bin` to run a range of proofs.
138133
134+
!!! important
135+
Both the state witness generation and decoding logic are actively being improved.
139136
140-
Both the state witness generation and decoding logic are actively being improved.
141-
142-
We expect that the following transaction types or use-cases should to be proved without any issues:
137+
We expect that the following transaction types or use-cases to prove without any issues:
143138
144139
- Empty blocks (important use case)
145140
- EOA transfers
146141
- ERC-20 mints & transfers
147142
- ERC-721 mintes & transfers
148143
149-
### Short cuts
150-
151-
This is a shortcut to create the genesis file allocations for our
152-
mnemonic. This has already been hard-coded into the genesis file.
144+
### Shortcuts
153145
154-
But if you want to use a different testing account, you can use the one below.
146+
1. There is a shortcut that creates the genesis file allocations for our mnemonic which has already been hard-coded into the genesis file. However, if you want to use a different testing account, use the one below.
155147
156-
``` bash
157-
polycli wallet inspect --mnemonic "code code code code code code code code code code code quality" | jq '.Addresses[] | {"key": .ETHAddress, "value": { "balance": "0x21e19e0c9bab2400000"}}' | jq -s 'from_entries'
158-
```
148+
``` bash
149+
polycli wallet inspect --mnemonic "code code code code code code code code code code code quality" | jq '.Addresses[] | {"key": .ETHAddress, "value": { "balance": "0x21e19e0c9bab2400000"}}' | jq -s 'from_entries'
150+
```
159151
160152
[^1]: See Line# 11 of the docker-compose.yml https://github.com/0xPolygonZero/eth-pos-devnet-provable/blob/959da56673c25c2094b1a23bc9e1fa9ae9a9db6e/docker-compose.yml#L11

mkdocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ nav:
8181
- Start services: cdk/get-started/deploy-rollup/start-services.md
8282
- Connect to CDK testnet: cdk/get-started/connect-testnet.md
8383
- How to:
84-
- Deploy type-1 prover: cdk/how-to/deploy-t1-prover.md
84+
- Run type-1 prover quickly: cdk/how-to/deploy-t1-prover.md
8585
- Deploy type-1 prover on devnet: cdk/how-to/deploy-t1-prover-devnet.md
8686
- Manage allowlists with policies: cdk/how-to/manage-policies.md
8787
- Architecture:

0 commit comments

Comments
 (0)