You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/cdk/how-to/deploy-t1-prover-devnet.md
+45-53Lines changed: 45 additions & 53 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff 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.
2
2
3
3
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.
4
4
@@ -10,45 +10,45 @@ The devnet is fully functional and allows for deployment of smart contracts and
10
10
11
11
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.
12
12
13
-
# Running the devnet
13
+
##Running the devnet
14
14
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.
16
16
17
-
Then run the following command to fire up the devnet containers:
17
+
2. Run the following command to fire up the devnet containers:
18
18
19
-
```bash
20
-
docker compose up -d
21
-
```
22
-
23
-
The statuses of the containers will be displayed as shown below:
✔ 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
+
```
40
40
41
-
The containers can be stopped with this command: `docker compose stop`.
41
+
3. Stop the containers with this command: `docker compose stop`.
42
42
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`.
44
44
45
-
Logs of launched services can be inspected with this command:
45
+
5. Inspect the logs of launched services with this command:
46
46
47
-
```bash
48
-
docker logs eth-pos-devnet-geth-1 -f
49
-
```
47
+
``` bash
48
+
docker logs eth-pos-devnet-geth-1 -f
49
+
```
50
50
51
-
# Available features
51
+
## Available features
52
52
53
53
- Starts from the Capella Ethereum hard fork.
54
54
- 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.
- 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/)
59
59
- The Prysm client also exposes a gRPC API at `http://beacon-chain:4000`.
60
60
61
-
# Type1 prover testing procedure
61
+
## Type-1 prover testing procedure
62
62
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.
64
64
65
-
Next is a procedure for creating some test data.
65
+
The following steps create some test data.
66
66
67
67
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.
68
68
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.
- 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.
133
130
- 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).
137
132
- 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.
138
133
134
+
!!! important
135
+
Both the state witness generation and decoding logic are actively being improved.
139
136
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:
143
138
144
139
- Empty blocks (important use case)
145
140
- EOA transfers
146
141
- ERC-20 mints & transfers
147
142
- ERC-721 mintes & transfers
148
143
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
153
145
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.
[^1]: See Line# 11 of the docker-compose.yml https://github.com/0xPolygonZero/eth-pos-devnet-provable/blob/959da56673c25c2094b1a23bc9e1fa9ae9a9db6e/docker-compose.yml#L11
0 commit comments