Skip to content

Commit adf996a

Browse files
Merge branch 'main' of https://github.com/0xPolygon/polygon-docs into km/cdk-qs-rollup
2 parents 34f6f2d + 3e19c44 commit adf996a

File tree

3 files changed

+99
-46
lines changed

3 files changed

+99
-46
lines changed

docs/zkEVM/architecture/zknode/index.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,56 @@ Polygon zkEVM achieves this by utilizing several actors. Here is a list of the m
2020
- The **Prover** is a complex cryptographic tool capable of producing ZK-proofs of hundreds of batches, and aggregating these into a single ZK-proof which is published as the validity proof.
2121

2222
Users can set up their own _local zkNode_ by following this guide [here](../../get-started/setup-nodes/local-node.md), or a production zkNode as detailed [here](../../get-started/setup-nodes/production-node.md).
23+
24+
## zkNode roles
25+
26+
The zkNode software is designed to support execution of multiple roles. Each role requires different services to work. Although most of the services can run in different instances, the JSON RPC can run in many instances (all the other services must have a single instance).
27+
28+
### RPC endpoints
29+
30+
Any user can participate in this role, as an RPC node.
31+
32+
Required services and components:
33+
34+
- JSON RPC: can run in a separated instance, and can have multiple instances
35+
- Synchronizer: single instance that can run on a separate instance
36+
- Executor & Merkletree: service that can run on a separate instance
37+
- State DB: Postgres SQL that can be run in a separate instance
38+
39+
There must be only one synchronizer, and it's recommended that it must have exclusive access to an executor instance, though not necessarily.
40+
41+
The synchronizer role can be run perfectly in a single instance, but the JSON RPC and executor services can benefit from running in multiple instances, if the performance decreases due to the number of received requests.
42+
43+
- [`zkEVM RPC endpoints`](https://github.com/0xPolygonHermez/zkevm-node/blob/develop/docs/json-rpc-endpoints.md)
44+
- [`zkEVM RPC Custom endpoints documentation`](https://github.com/0xPolygonHermez/zkevm-node/blob/develop/docs/zkEVM-custom-endpoints.md)
45+
46+
### Trusted sequencer
47+
48+
This role can only be performed by a single entity. This is enforced in the smart contract, as the related methods of the trusted sequencer can only be performed by the owner of a particular private key.
49+
50+
Required services and components:
51+
52+
- JSON RPC: can run in a separated instance, and can have multiple instances
53+
- Sequencer & Synchronizer: single instance that needs to run together
54+
- Executor & Merkletree: service that can run on a separate instance
55+
- Pool DB: Postgres SQL that can be run in a separate instance
56+
- State DB: Postgres SQL that can be run in a separate instance
57+
58+
Note that the JSON RPC is required to receive transactions. It's recommended that the JSON RPC runs on separated instances, and potentially more than one (depending on the load of the network). It's also recommended that the JSON RPC and the Sequencer don't share the same executor instance, to make sure that the sequencer has exclusive access to an executor
59+
60+
### Aggregator
61+
62+
This role can be performed by anyone.
63+
64+
Required services and components:
65+
66+
- Synchronizer: single instance that can run on a separated instance
67+
- Executor & Merkletree: service that can run on a separate instance
68+
- State DB: Postgres SQL that can be run in a separate instance
69+
- Aggregator: single instance that can run on a separated instance
70+
- Prover: single instance that can run on a separated instance
71+
- Executor: single instance that can run on a separated instance
72+
73+
It's recommended that the prover is run on a separate instance, as it has important hardware requirements. On the other hand, all the other components can run on a single instance.
74+
75+

docs/zkEVM/get-started/deploy-zkevm/install-dependencies.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Next, add these to your `.profile`:
3636
3737
[ -d "/usr/local/go/bin" ] && PATH="/usr/local/go/bin:$PATH"
3838
' >> ~/.profile
39-
source .profile
39+
source ~/.profile
4040
```
4141

4242
Lastly, confirm the installation of Golang by running this command: `$ go version`

docs/zkEVM/get-started/deploy-zkevm/setup-goerli-node.md

Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -40,51 +40,51 @@ mkdir -p ~/goerli-node/docker-volumes/{geth,prysm}
4040
3. Copy and paste the following content into the `docker-compose.yml` file:
4141

4242
```yaml
43-
services:
44-
geth:
45-
image: "ethereum/client-go:stable"
46-
container_name: goerli-execution
47-
command: |
48-
--goerli
49-
--http
50-
--http.vhosts=*
51-
--http.rpcprefix=/
52-
--http.corsdomain=*
53-
--http.addr 0.0.0.0
54-
--http.api eth,net,engine,admin
55-
--config=/app/config.toml
56-
volumes:
57-
- "./docker-volumes/geth:/root/.ethereum"
58-
- "./config.toml:/app/config.toml"
59-
ports:
60-
- "0.0.0.0:${L1_RPC_PORT}:8545"
61-
- "0.0.0.0:30303:30303/udp"
62-
63-
prysm:
64-
image: "gcr.io/prysmaticlabs/prysm/beacon-chain:stable"
65-
66-
container_name: goerli-consensus
67-
command: |
68-
--prater
69-
--datadir=/data
70-
--jwt-secret=/geth/goerli/geth/jwtsecret
71-
--rpc-host=0.0.0.0
72-
--grpc-gateway-host=0.0.0.0
73-
--monitoring-host=0.0.0.0
74-
--execution-endpoint=/geth/goerli/geth.ipc
75-
--accept-terms-of-use
76-
--suggested-fee-recipient=${L1_SUGGESTED_FEE_RECIPIENT_ADDR}
77-
--checkpoint-sync-url=${L1_CHECKPOINT_URL}
78-
volumes:
79-
- "./docker-volumes/prysm:/data"
80-
- "./docker-volumes/geth:/geth"
81-
ports:
82-
- "0.0.0.0:3500:3500"
83-
- "0.0.0.0:4000:4000"
84-
- "0.0.0.0:12000:12000/udp"
85-
- "0.0.0.0:13000:13000"
86-
depends_on:
87-
- geth
43+
services:
44+
geth:
45+
image: "ethereum/client-go:stable"
46+
container_name: goerli-execution
47+
command: |
48+
--goerli
49+
--http
50+
--http.vhosts=*
51+
--http.rpcprefix=/
52+
--http.corsdomain=*
53+
--http.addr 0.0.0.0
54+
--http.api eth,net,engine,admin
55+
--config=/app/config.toml
56+
volumes:
57+
- "./docker-volumes/geth:/root/.ethereum"
58+
- "./config.toml:/app/config.toml"
59+
ports:
60+
- "0.0.0.0:${L1_RPC_PORT}:8545"
61+
- "0.0.0.0:30303:30303/udp"
62+
63+
prysm:
64+
image: "gcr.io/prysmaticlabs/prysm/beacon-chain:stable"
65+
66+
container_name: goerli-consensus
67+
command: |
68+
--prater
69+
--datadir=/data
70+
--jwt-secret=/geth/goerli/geth/jwtsecret
71+
--rpc-host=0.0.0.0
72+
--grpc-gateway-host=0.0.0.0
73+
--monitoring-host=0.0.0.0
74+
--execution-endpoint=/geth/goerli/geth.ipc
75+
--accept-terms-of-use
76+
--suggested-fee-recipient=${L1_SUGGESTED_FEE_RECIPIENT_ADDR}
77+
--checkpoint-sync-url=${L1_CHECKPOINT_URL}
78+
volumes:
79+
- "./docker-volumes/prysm:/data"
80+
- "./docker-volumes/geth:/geth"
81+
ports:
82+
- "0.0.0.0:3500:3500"
83+
- "0.0.0.0:4000:4000"
84+
- "0.0.0.0:12000:12000/udp"
85+
- "0.0.0.0:13000:13000"
86+
depends_on:
87+
- geth
8888
```
8989
9090
4. Save and Close the `docker-compose.yml` file.

0 commit comments

Comments
 (0)