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/zkEVM/architecture/zknode/index.md
+53Lines changed: 53 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,3 +20,56 @@ Polygon zkEVM achieves this by utilizing several actors. Here is a list of the m
20
20
- 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.
21
21
22
22
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.
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.
0 commit comments