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
The sequencer supports a special recovery mode which allows it to continue the chain using data from the L1.
59
61
60
-
To enable this add the following flag:
62
+
To enable this, add the following flag:
61
63
62
64
```sh
63
65
`zkevm.l1-sync-start-block: [first l1 block with sequencer data]`.
@@ -66,9 +68,9 @@ To enable this add the following flag:
66
68
!!! important
67
69
Find the first block on the L1 from the sequencer contract that contains the `sequenceBatches` event.
68
70
69
-
When the node starts up it pulls the L1 data into the `cdk-erigon` database and uses this during execution rather than waiting for transactions from the transaction pool, effectively rebuilding the chain from the L1 data.
71
+
When the node starts up, it pulls the L1 data into the `cdk-erigon` database and uses it during execution, effectively rebuilding the chain from the L1 data rather than waiting for transactions from the transaction pool.
70
72
71
-
You can use this in tandem with unwinding the chain, or using the `zkevm.sync-limit` flag to limit the chain to a certain block height before starting the L1 recovery. This is useful if you have an RPC node available to speed up the process.
73
+
You can use this in tandem with unwinding the chain or by using the `zkevm.sync-limit` flag to limit the chain to a specific block height before starting the L1 recovery. This is useful if you have an RPC node available to speed up the process.
72
74
73
75
!!! warning
74
76
If using the `zkevm.sync-limit` flag, you need to go to the boundary of a `batch+1` block; so if batch `41` ends at block `99`thenset the flag to `100`.
@@ -103,15 +105,18 @@ In order to enable the `zkevm_ namespace`, add `zkevm` to the [`http.api`](#conf
103
105
104
106
- `zkevm_getBroadcastURI` - removed by zkEVM.
105
107
106
-
## Limitations/warnings
108
+
## Warnings
109
+
110
+
- The instantiation of Poseidon over the Goldilocks field is much faster on x86, but developers using MacOS M1/M2 chips may experience slower processing.
107
111
108
-
- The golden poseidon hashing is much faster on x86, so developers using MacOS M1/M2 chips may experience slower processing.
109
-
- Falling behind the network significantly causes an SMT rebuild which takes some time to complete on longer chains.
112
+
- Developers should avoid falling significantly behind the network, especially for longer chains, as this triggers an SMT rebuild, which takes a considerable amount of time to complete.
110
113
111
114
## Configuration files
112
115
113
-
- Config files are the easiest way to configure `cdk-erigon`.
116
+
- Config files are the easiest way to configure `cdk-erigon`.
117
+
114
118
- There are examples files in the repository for each network; e.g. [`hermezconfig-mainnet.yaml.example`](https://github.com/0xPolygonHermez/cdk-erigon/blob/1d56fb0a5a64160fd8c05e11ffc8b668bd70b9e8/hermezconfig-mainnet.yaml.example#L4).
119
+
115
120
- Depending on your RPC provider, you may wish to alter `zkevm.rpc-ratelimit`in the yaml file.
[Erigon](https://github.com/ledgerwatch/erigon), previously known as Turbo-Geth, is a high-performance Ethereum client designed to handle the growing demands of the Ethereum blockchain. It focuses on optimizing performance, disk space, and synchronization speed.
1
+
CDK Erigon is the implementation of Erigon adapted to be a specialized framework for creating and managing chains that run the Polygon zkEVM protocol. Its code repository can be found at [0xPolygonHermez/cdk-erigon](https://github.com/0xPolygonHermez/cdk-erigon).
2
+
3
+
## Erigon
2
4
3
-
Erigon has a modular architecture, which makes it highly efficient and customizable for various common blockchain tasks.
5
+
[Erigon](https://github.com/ledgerwatch/erigon), previously known as Turbo-Geth, is a high-performance Ethereum client designed to handle the growing demands of the Ethereum blockchain. It focuses on optimizing performance, disk space, and synchronization speed.
4
6
5
-
## Key features
7
+
Erigon is characterized by the following features: Modular architecture, optimized performance, reduced disk usage, and fast synchronization.
6
8
7
-
### Modular architecture
8
-
Erigon's modular design allows different components to be developed, optimized, and updated independently. This separation of concerns helps in improving the performance and reliability of each module.
9
+
- Erigon has a modular architecture, which makes it highly efficient and customizable for various common blockchain tasks. This allows different components to be developed, optimized, and updated independently. Such a separation of concerns helps in improving the performance and reliability of each module.
9
10
10
-
### Performance optimization
11
-
Erigon employs advanced techniques for data handling, such as memory-mapped files and optimized data structures, to ensure high-speed processing of blockchain data.
11
+
- Erigon employs advanced techniques for data handling, such as memory-mapped files and optimized data structures, to ensure high-speed processing of blockchain data.
12
12
13
-
### Reduced disk usage
14
-
By implementing a more efficient database schema, Erigon significantly reduces disk usage compared to other Ethereum clients.
13
+
- By implementing a more efficient database schema, Erigon significantly reduces disk usage compared to other Ethereum clients.
15
14
16
-
### Fast synchronization
17
-
Erigon's fast sync method allows nodes to catch up with the blockchain more quickly by downloading only the most recent state of the blockchain, rather than the entire history.
15
+
- Erigon's fast sync method allows nodes to catch up with the blockchain more quickly by downloading only the most recent state of the blockchain, rather than the entire history.
18
16
19
17
## Erigon as a sequencer
20
18
21
-
Blockchain sequencers play a critical role in ordering transactions and creating new blocks. Erigon's sequencer processes incoming transactions, organizes them into blocks, and propagates these blocks across the network.
19
+
L2 chains require sequencer nodes that play the critical role of ordering transactions and creating new blocks.
20
+
21
+
Erigon can act as a sequencer to process incoming transactions, organize them into blocks, and propagate the blocks across the network.
22
22
23
23
## RPC node
24
24
@@ -28,18 +28,16 @@ The following sequence diagram shows how a transaction is processed by the Erigo
The CDK implementation of Erigon, available at [0xPolygonHermez/cdk-erigon](https://github.com/0xPolygonHermez/cdk-erigon), is a specialized adaptation that provides a framework for creating and managing zkEVM networks with that run using the zkEVM protocol.
31
+
## CDK Erigon vs. Erigon
34
32
35
-
### Differences from the standard erigon
33
+
Next is a quick look at how CDK Erigon is different from standard Erigon.
36
34
37
-
-zkEVM consensus mechanisms: The CDK implementation integrates with zkEVM consensus protocols.
35
+
-The first difference between CDK Erigon and standard Erigon is the integration of Polygon zkEVM consensus protocols.
38
36
39
-
-Optimized for layer 2 solutions: This adaptation is optimized for layer 2 scaling solutions which focus on high throughput and reduced transaction costs.
37
+
-CDK Erigon is an adaptation of standard Erigon, optimized specifically for L2 scaling solutions where high throughput and reduced transaction costs are of paramount importance.
40
38
41
-
-Enhanced modular architecture: While Erigon is already modular, the CDK implementation extends this modularity, allowing developers to more easily customize and replace components, such as the consensus mechanism, transaction pool, and state management.
39
+
- While standard Erigon is modular by design, the CDK implementation further extends this architecture, enabling developers to easily customize and replace components. For instance, developers can customize the consensus mechanism, transaction pool, and state management.
42
40
43
-
-Integration with the Polygon ecosystem: CDK Erigon is designed to seamlessly integrate with the broader Polygon ecosystem, facilitating interoperability with Polygon products and services, scaling solutions and tools.
41
+
- CDK Erigon is designed to seamlessly integrate with the broader Polygon ecosystem, facilitating interoperability with Polygon's products, services, scaling solutions, and tools.
44
42
45
-
-Tailored RPC interface: The RPC interface in the CDK implementation is adapted to support the zkEVM protocol's functionalities and optimizations, enabling more efficient communication and interaction with the network.
43
+
- The RPC interface in the CDK implementation is adapted to support the functionalities and optimizations of the zkEVM protocol, enabling more efficient communication and interaction with the network.
Copy file name to clipboardExpand all lines: docs/zkEVM/architecture/unified-LxLy/index.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,7 @@ Version-1 consists mainly of three (3) smart contracts:
25
25
26
26
- The bridge contract ([PolygonZkEVMBridge.sol](https://github.com/0xPolygonHermez/zkevm-contracts/blob/feature/v2ForkID5/contracts/PolygonZkEVMBridge.sol)), which handles transfer of assets and messages between networks.
27
27
- The global exit root manager contract ([PolygonZkEVMGlobalExitRoot.sol](https://github.com/0xPolygonHermez/zkevm-contracts/blob/feature/v2ForkID5/contracts/PolygonZkEVMGlobalExitRoot.sol)), which facilitates synchronization of state-info between the L2 and the L1.
28
-
- The Polygon zkEVM consensus contract ([PolygonZkEVM.sol](https://github.com/0xPolygonHermez/zkevm-contracts/blob/feature/v2ForkID5/contracts/PolygonZkEVM.sol)), which handles the sequencing and verification of transactions in the form of batches.
28
+
- The Polygon zkEVM consensus contract ([PolygonZkEVMEtrog.sol](https://github.com/0xPolygonHermez/zkevm-contracts/blob/1ad7089d04910c319a257ff4f3674ffd6fc6e64e/contracts/v2/consensus/zkEVM/PolygonZkEVMEtrog.sol)), which handles the sequencing and verification of transactions in the form of batches.
29
29
30
30
### Global exit trees review
31
31
@@ -39,13 +39,13 @@ The root of the global exit tree is the single source of state-truth communicate
39
39
40
40
It is the global exit root manager contract's responsibility to update the global exit tree root and acts as a custodian for the global exit tree's history.
41
41
42
-
A complete transfer of assets in version-1 involves invoking three smart contracts; `PolygonZkEVM.sol`, `PolygonZkEVMBridge.sol` and `PolygonZkEVMGlobalExitRoot.sol`.
42
+
A complete transfer of assets in version-1 involves invoking three smart contracts; `PolygonZkEVMEtrog.sol`, `PolygonZkEVMBridge.sol` and `PolygonZkEVMGlobalExitRoot.sol`.
43
43
44
44
The below figure depicts a _bridge_ of assets and a _claim_ of assets;
45
45
46
46

47
47
48
-
Observe, in the above figure, that the consensus contract (`PolygonZkEVM.sol`) is able to:
48
+
Observe, in the above figure, that the consensus contract (`PolygonZkEVMEtrog.sol`) is able to:
49
49
50
50
- Retrieve the global exit root from the mainnet, and make it available in L2
51
51
- Update the exit tree root in the global exit tree root manager.
@@ -78,8 +78,8 @@ Once sequenced batches have been verified, the _global exit tree_ gets updated,
78
78
79
79
The rollup manager is in charge of the following lists of availability:
80
80
81
-
- Rollup consensus mechanisms: The list may consist of consensus contracts such as `PolygonZkEVM.sol` or `zkValidium.sol`.
82
-
- Verifier contracts: For example, the `PolygonZkEVM.sol` uses the `Verifier.sol` contract for verification of batches.
81
+
- Rollup consensus mechanisms: The list may consist of consensus contracts such as `PolygonZkEVMEtrog.sol` or `zkValidium.sol`.
82
+
- Verifier contracts: For example, the `PolygonZkEVMEtrog.sol` uses the `Verifier.sol` contract for verification of batches.
83
83
84
84
The governance contract oversees consensus mechanisms and verifiers that can be added to the respective lists.
0 commit comments