Skip to content

Commit 9c7d97d

Browse files
committed
Type-1 prover - deploy guide added
2 parents 428fda1 + 53a7f6e commit 9c7d97d

File tree

1 file changed

+13
-29
lines changed

1 file changed

+13
-29
lines changed
Lines changed: 13 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
11
# Etrog upgrade
22

3-
This document provides details of the Etrog upgrade, which is Polygon zkEVM's upgrade that succeeds the dragonfruit upgrade.
3+
This document provides details of the Etrog upgrade, which is Polygon zkEVM's upgrade that succeeds the Dragonfruit upgrade.
44

55
Although the Dragonfruit upgrade had some advantages over previous zkEVM versions, it has its own pain points. We take a look at what these pain points are, and how the Etrog upgrade resolves them.
66

77
Before discussing all these, we present the newly launched testnet that coincides with the Etrog upgrade.
88

9-
10-
119
## Cardona testnet
1210

13-
In addition to the Goërli testnet, a second testnet is launched on Sepolia and it is dubbed Cardona.
11+
In addition to the Goërli testnet, we launched a second testnet on Sepolia dubbed Cardona.
1412

1513
Due to the looming deprecation of the Goërli testnet, the Polygon team had to put in place a second testnet. This ensures that the zkEVM can continue running even beyond the Goërli's discontinuation.
1614

17-
Cardona testnet is ready for developers and users to connect wallets, and begin testing the Etrog upgrade of Polygon zkEVM.
15+
The Cardona testnet is ready for developers and users to connect wallets, and begin testing the Etrog upgrade of Polygon zkEVM.
1816

1917
Use the following details to connect wallets to Cardona:
2018

@@ -32,9 +30,6 @@ Use the following details to connect wallets to Cardona:
3230

3331
We use the same faucet for testnet tokens, here: https://faucet.polygon.technology/
3432

35-
36-
37-
3833
## zkEVM is type-2
3934

4035
The Etrog upgrade comes with support for most of the EVM's [precompiled contracts](https://www.evm.codes/precompiled?fork=shanghai); ecRecover, SHA-256, identity, modexp, ecAdd, ecMul, and ecPairing. This only leaves out the barely used RIPEMD-160 and blake2f.
@@ -45,59 +40,48 @@ The below table displays Polygon zkEVM's precompiled status.
4540

4641
![Figure: etrog-precompiled](../../../img/zkEVM/etrog-precompiled.png)
4742

48-
49-
5043
## Dragonfruit issues
5144

52-
Dragonfruit upgrade inherited from its predecessors, the configuration that each block in the zkEVM is equivalent to one L2 transaction.
45+
Dragonfruit upgrade inherited from its predecessors the configuration that each block in the zkEVM is equivalent to one L2 transaction.
5346

5447
The justification for the _one block per transaction_ configuration was that it achieves minimum delay when creating blocks.
5548

5649
It however results in a few issues when blocks are processed.
5750

5851
The first issue is that it generates a lot of data in the database due to the huge amount of L2 blocks being created.
5952

60-
The second being, the approach lacks a way to provide different timestamps for blocks within a batch. So, all blocks in a batch have the same timestamp.
61-
62-
However, attaching one timestamp to several blocks causes breaks in dApps that rely on timestamps for proper timing of smart contracts' actions.
53+
The second being, the approach lacks a way to provide different timestamps for blocks within a batch. So, all blocks in a batch have the same timestamp. However, attaching one timestamp to several blocks causes breaks in dApps that rely on timestamps for proper timing of smart contracts' actions.
6354

6455
The crucial alterations made in the Etrog upgrade are therefore on; the _one block per transaction_ approach, and the _one timestamp for many blocks_ problem.
56+
## Etrog blocks
6557

66-
67-
68-
## Etrog Blocks
69-
70-
Up until the dragonfruit upgrade, each L2 block contains a single transaction. The same approach taken by Optimism.
58+
Up until the Dragonfruit upgrade, each L2 block contained a single transaction. This is the same approach taken by Optimism.
7159

7260
Since a block is formed when the sequencer decides to include a transaction in a batch, prior to the Etrog upgrade, every batch contained as many blocks as transactions. As mentioned above, this resulted in bloated databases.
7361

7462
Due to this problem, blocks in the Etrog upgrade have been reconstructed to contain more than one transaction.
7563

7664
Blocks with several transactions are achieved by using a small timeout of a few seconds, or a number of milliseconds, when creating the block and waiting for transactions to be added.
7765

78-
The below figure displays blocks of the Etrog upgrade vis-à-vis those of the Dragonfruit upgrade.
66+
The figure below shows the structure of the blocks in Etrog versus those of the Dragonfruit upgrade.
7967

8068
![Figure: etrog-blocks-vs-dragonfruit](../../../img/zkEVM/etrog-blocks-vs-dragonfruit.png)
8169

82-
83-
84-
## Etrog Timestamps
70+
## Etrog timestamps
8571

8672
In order to circumvent the above-mentioned issue related to the _one timestamp for many blocks_ problem, each block in the Etrog upgrade's batch receives its own unique timestamp. This is in addition to allowing more than one transaction per block.
8773

88-
The solution is achieved by enabling the sequencer to change the timestamp for different blocks within a batch. To do so, a special transaction or marker called `changeL2Block`, is introduced within a batch to mark whenever there is a block change.
74+
The solution is achieved by enabling the sequencer to change the timestamp for different blocks within a batch. To do so, a special transaction or marker, called `changeL2Block`, is introduced within a batch to mark whenever there is a block change.
8975

90-
The below figure shows how `changeL2Block` is used to change the timestamp whenever a new block is formed.
76+
The figure below shows how `changeL2Block` is used to change the timestamp whenever a new block is formed.
9177

9278
![Figure: etrog-changel2block](../../../img/zkEVM/etrog-changel2block.png)
9379

94-
9580
## Conclusion
9681

97-
The Etrog upgrade comes with groundbreaking amendments aimed at improving UX and developer experience. The most important additions with this upgrade are the two adjustments that solve the above two issues:
82+
The Etrog upgrade comes with groundbreaking amendments aimed at improving UX and developer experience. The most important additions with this upgrade are the two adjustments that solve the two issues mentioned-above:
9883

9984
- Being able to add multiple transactions to one block.
10085
- Allowing granularity on the timestamp within a batch.
10186

102-
103-
87+
Attaining the Type-2 status is remarkable.

0 commit comments

Comments
 (0)