Skip to content

Commit 4edcfb9

Browse files
committed
add darwin to upgrades page
1 parent 24f28e9 commit 4edcfb9

File tree

1 file changed

+103
-0
lines changed

1 file changed

+103
-0
lines changed

src/content/docs/en/technology/overview/scroll-upgrades.mdx

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,109 @@ The following contracts are used to initiate upgrades and execute upgrades after
1919

2020
You can join our [Telegram channel for technical updates](https://t.me/scroll_tech_updates), which includes future upgrade announcements and on-chain operation events.
2121

22+
## Darwin Upgrade
23+
24+
### Overview
25+
26+
This upgrade will reduce gas fees by 34% by using a single aggregated proof for multiple batches, eliminating the need to finalize each batch individually.
27+
28+
- Darwin uses a new [V3 batch codec](https://github.com/scroll-tech/da-codec/tree/main/encoding/codecv3).
29+
- In addition to the previous notions of `chunk` and `batch`, we have introduced a new concept called `bundle`.
30+
- `Chunk`: A unit of zkEVM proving, consisting of a list of L2 blocks.
31+
- `Batch`: A collection of chunks encoded into one EIP-4844 blob, serving as the unit of Data Availability.
32+
- `Bundle`: A series of batches that functions as the unit of finalization.
33+
34+
The main difference compared to Curie is that Scroll will now finalize multiple batches using a single aggregated bundle proof.
35+
36+
- The on-chain bundle proof verifier uses a new public input layout.
37+
38+
### Timeline
39+
40+
- **Scroll Sepolia**
41+
- Network Upgrade: August 14th, 2024
42+
- **Scroll Mainnet**
43+
- Upgrade Initiation: August 5th, 2024
44+
- Timelock Completion & Upgrade: August 21st, 2024
45+
46+
### Technical Details
47+
48+
#### Contract Changes
49+
50+
*Note: Since the previous Curie upgrade, we have migrated the Scroll contracts to a new repo at [scroll-contracts](https://github.com/scroll-tech/scroll-contracts).*
51+
52+
The code changes for this upgrade are implemented in [this PR](https://github.com/scroll-tech/scroll-contracts/pull/4). The key changes are as follows:
53+
54+
- We have introduced a new `BatchHeaderV3Codec`.
55+
- We have changed how messages are processed in the `L1MessageQueue` contract. Prior to Darwin, we would process messages when a batch is finalized. After Darwin, most of this processing is moved to the commit step.
56+
- We have introduced a new public input format for bundle proofs. This is implemented in a new contract `IZkEvmVerifierV2`, which is in turn added to `MultipleVersionRollupVerifier`.
57+
- In the `ScrollChain` contract `version=3` batches will now be committed through a new function called `commitBatchWithBlobProof`. Bundles will be finalized using a new function called `finalizeBundleWithProof`.
58+
59+
See the contract [release notes](https://github.com/scroll-tech/scroll-contracts/releases/tag/v1.0.0) for more information.
60+
61+
#### Node Changes
62+
63+
The new node version is `v5.6.0`. See the [release notes](https://github.com/scroll-tech/go-ethereum/releases/tag/scroll-v5.6.0) for more information.
64+
65+
The main changes are:
66+
67+
- Implementation of timestamp-based hard forks.
68+
- Processing V3 batch codec in rollup-verifier.
69+
70+
#### zkEVM circuit changes
71+
72+
The new version of zkevm circuits is `v0.12.0`. See [here](https://github.com/scroll-tech/zkevm-circuits/releases/tag/v0.12.0) for the release log.
73+
74+
We have introduced a `RecursionCircuit` that will bundle multiple sequential batches by recursively aggregating the SNARKs from the `BatchCircuit` (previously `AggregationCircuit`). The previously 5 layer proving system is now 7 layers as we introduce:
75+
76+
- 6th Layer (layer5): `RecursionCircuit` that recursively aggregates `BatchCircuit` SNARKs.
77+
- 7th Layer (layer6): `CompressionCircuit` that compresses the `RecursionCircuit` SNARK and produce an EVM-verifiable validity proof.
78+
79+
The public input to the `BatchCircuit` is now context-aware of the “previous” `batch`, which allows us to implement the recursion scheme we adopted (described [here](https://scrollzkp.notion.site/Upgrade-4-Darwin-Documentation-05a3ecb59e9d4f288254701f8c888173) in-depth).
80+
81+
#### Audits
82+
83+
- TrailofBits: coming soon!
84+
85+
### Compatibility
86+
87+
#### Sequencer and Follower Nodes (l2geth)
88+
89+
This upgrade does not alter the state transition function and is therefore backward-compatible. However, we strongly recommend node operators to upgrade to [v5.6.0](https://github.com/scroll-tech/go-ethereum/releases/tag/scroll-v5.6.0).
90+
91+
#### Dapps and Indexers
92+
93+
There are some major changes to how we commit and finalize batches after Darwin.
94+
95+
- Batches will be encoded using the new [V3 batch codec](https://github.com/scroll-tech/da-codec/tree/main/encoding/codecv3). This version adds two new fields:
96+
1. `lastBlockTimestamp` (the timestamp of the last block in this batch).
97+
2. `blobDataProof` (the KZG challenge point evaluation proof).
98+
99+
This version removes `skippedL1MessageBitmap`. There will be no changes to how the blob data is encoded and compressed.
100+
- Batches will be committed using the `commitBatchWithBlobProof` function (instead of the previous `commitBatch`).
101+
102+
New function signature:
103+
104+
```solidity
105+
function commitBatchWithBlobProof(uint8 _version, bytes calldata _parentBatchHeader, bytes[] memory _chunks, bytes calldata _skippedL1MessageBitmap, bytes calldata _blobDataProof)
106+
```
107+
108+
- Batches will be finalized using the `finalizeBundleWithProof` function (instead of the previous `finalizeBatchWithProof4844`).
109+
110+
New function signature:
111+
112+
```solidity
113+
function finalizeBundleWithProof(bytes calldata _batchHeader, bytes32 _postStateRoot, bytes32 _withdrawRoot, bytes calldata _aggrProof)
114+
```
115+
116+
- The semantics of the `FinalizeBatch` event will change: It will now mean that all batches between the last finalized batch and the event’s `_batchIndex` have been finalized. The event’s stateRoot and withdrawRoot values belong to the last finalized batch in the bundle. Finalized roots for intermediate batches are no longer available.
117+
118+
The semantics of the `CommitBatch` and `RevertBatch` events will not change.
119+
120+
Recommendations:
121+
122+
- Indexers that decode committed batch data should be adjusted to use the new codec and the new function signature.
123+
- Indexers that track batch finalization status should be adjusted to consider the new event semantics.
124+
22125
## Curie Upgrade
23126

24127
### Overview

0 commit comments

Comments
 (0)