Skip to content

Commit c430bb9

Browse files
authored
Merge pull request #321 from scroll-tech/develop
Update Prod: 08/21/2024 (Darwin Upgrade)
2 parents 213805a + 13747f9 commit c430bb9

File tree

7 files changed

+160
-8
lines changed

7 files changed

+160
-8
lines changed

src/content/docs/en/developers/guides/running-a-scroll-node.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ For most developers, using [our official RPC endpoint](/en/developers/developer-
1818

1919
We recommend using the latest release at https://github.com/scroll-tech/go-ethereum/releases. The required version for Scroll Mainnet is `scroll-v5.5.0` or higher, and for Scroll Sepolia it is `scroll-v5.4.2` or higher. If you'd like to keep up with new node releases, go to https://github.com/scroll-tech/go-ethereum, click on **Watch**, **Custom**, and make sure that **Releases** is selected.
2020

21-
For the remainder of this guide, `VERSION` will denote the version tag. For example, `scroll-v5.5.0`.
21+
For the remainder of this guide, `VERSION` will denote the version tag. For example, `scroll-v5.6.0`.
2222

2323
### Hardware Requirements
2424

@@ -118,7 +118,7 @@ Running the node in Docker might have a significant impact on node performance.
118118
--http --http.addr "0.0.0.0" --http.port 8545 --http.api "eth,net,web3,debug,scroll" \
119119
--l1.endpoint "$L2GETH_L1_ENDPOINT" --rollup.verify
120120
```
121-
For Scroll Sepolia, set the chain ID to 534351.
121+
For Scroll Sepolia, set the chain ID to 534351 and use `--scroll-sepolia` instead of `--scroll`.
122122

123123
2. In a separate shell, you can now attach to `l2geth`.
124124

src/content/docs/en/technology/chain/rollup.mdx

Lines changed: 47 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,18 +52,19 @@ The rollup process can be broken down into three phases: transaction execution,
5252

5353
## Commit Transaction
5454

55-
The Commit Transaction submits the block information and transaction data to L1 for data availability. The transaction includes the parent batch header, chunk data, and a bitmap of skipped L1 messages. The parent batch header designates the previous batch that this batch links to. The parent batch must be committed before; otherwise, the transaction will be reverted. See the `commitBatch` function signature below.
55+
The Commit Transaction submits the block information and transaction data to L1 for data availability. The transaction includes the parent batch header, chunk data, and a bitmap of skipped L1 messages. The parent batch header designates the previous batch that this batch links to. The parent batch must be committed before; otherwise, the transaction will be reverted. See the `commitBatchWithBlobProof` function signature below.
5656

5757
```solidity
58-
function commitBatch(
58+
function commitBatchWithBlobProof(
5959
uint8 version,
6060
bytes calldata parentBatchHeader,
6161
bytes[] memory chunks,
62-
bytes calldata skippedL1MessageBitmap
63-
) external override OnlySequencer
62+
bytes calldata skippedL1MessageBitmap,
63+
bytes calldata blobDataProof
64+
) external;
6465
```
6566

66-
After the `commitBatch` function verifies the parent batch is committed before, it constructs the batch header of the batch and stores the hash of the batch header in the `ScrollChain` contract.
67+
After the `commitBatchWithBlobProof` function verifies the parent batch is committed before, it constructs the batch header of the batch and stores the hash of the batch header in the `ScrollChain` contract.
6768

6869
```solidity
6970
mapping(uint256 => bytes32) public committedBatches;
@@ -85,7 +86,7 @@ chunk.dataHash := keccak(blockContext[0] || ... || blockContext[k-1] ||
8586

8687
, where `block.l1TxHashes` are the concatenated transaction hashes of the L1 transactions in this block and `block.l2TxHashes` are the concatenated transaction hashes of the L2 transactions in this block. Note that the transaction hashes of L1 transactions are not uploaded by the rollup node, but instead directly loaded from the `L1MessageQueue` contract given the index range of included L1 messages in this block. The L2 transaction hashes are calculated from the RLP-encoded bytes in the `l2Transactions` field in the [`Chunk`](#Chunk-Codec).
8788

88-
In addition, the `commitBatch` function contains a bitmap of skipped L1 messages. Unfortunately, this is due to the problem of proof overflow. If the L1 transaction corresponding to an L1 message exceeds the circuit capacity limit, we won't be able to generate a valid proof for this transaction and thus cannot finalize it on L1. Scroll is working actively to eliminate the proof overflow problem through upgrades to our proving system.
89+
In addition, the `commitBatchWithBlobProof` function contains a bitmap of skipped L1 messages. Unfortunately, this is due to the problem of proof overflow. If the L1 transaction corresponding to an L1 message exceeds the circuit capacity limit, we won't be able to generate a valid proof for this transaction and thus cannot finalize it on L1. Scroll is working actively to eliminate the proof overflow problem through upgrades to our proving system.
8990

9091
## Finalize Transaction
9192

@@ -123,8 +124,48 @@ This section describes the codec of three data structures in the Rollup contract
123124
The latest update to the codec was introduced in the [Bernoulli upgrade](/technology/overview/scroll-upgrades#bernoulli-upgrade).
124125

125126
<Tabs sharedStore="upgrades" client:visible>
127+
<Fragment slot="tab.darwin">darwin</Fragment>
126128
<Fragment slot="tab.bernoulli">bernoulli</Fragment>
127129
<Fragment slot="tab.archimedes">archimedes</Fragment>
130+
<Fragment slot="panel.darwin">
131+
<slot name="darwin" />
132+
#### `BatchHeader` Codec
133+
134+
| Field | Bytes | Type | Offset | Description |
135+
| ------------------------ | ------- | ----------- | ------ | --------------------------------------------------------------- |
136+
| `version` | 1 | `uint8` | 0 | The batch header version |
137+
| `batchIndex` | 8 | `uint64` | 1 | The index of the batch |
138+
| `l1MessagePopped` | 8 | `uint64` | 9 | The number of L1 messages popped in the batch |
139+
| `totalL1MessagePopped` | 8 | `uint64` | 17 | The number of total L1 messages popped after the batch |
140+
| `dataHash` | 32 | `bytes32` | 25 | The data hash of the batch |
141+
| `blobVersionedHash` | 32 | `bytes32` | 57 | The versioned hash of the blob with this batch’s data |
142+
| `parentBatchHash` | 32 | `bytes32` | 89 | The parent batch hash |
143+
| `lastBlockTimestamp` | 8 | `uint64` | 121 | The timestamp of the last block in this batch |
144+
| `blobDataProof` | 64 | `bytes32[2]` | 129 | The KZG challenge point evaluation proof |
145+
146+
#### `Chunk` Codec
147+
148+
| Field | Bytes | Type | Offset | Description |
149+
| ---------------- | ------- | -------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
150+
| `numBlocks` | 1 | `uint8` | 0 | The number of blocks in the chunk |
151+
| `block[0]` | 60 | `BlockContext` | 1 | The block information of the 1st block |
152+
| ... | ... | ... | ... | ... |
153+
| `block[i]` | 60 | `BlockContext` | `60*i+1` | The block information of `i+1`-th block |
154+
| ... | ... | ... | ... | ... |
155+
| `block[n-1]` | 60 | `BlockContext` | `60*n-59` | The block information of the last block |
156+
157+
#### `BlockContext` Codec
158+
159+
| Field | Bytes | Type | Offset | Description |
160+
| ----------------- | ----- | --------- | ------ | ----------------------------------------------------------------------------------- |
161+
| `blockNumber` | 8 | `uint64` | 0 | The block number |
162+
| `timestamp` | 8 | `uint64` | 8 | The block time |
163+
| `baseFee` | 32 | `uint256` | 16 | The base fee of this block. Currently, it is always 0, because we disable EIP-1559. |
164+
| `gasLimit` | 8 | `uint64` | 48 | The gas limit of this block |
165+
| `numTransactions` | 2 | `uint16` | 56 | The number of transactions in this block, including both L1 & L2 txs |
166+
| `numL1Messages` | 2 | `uint16` | 58 | The number of L1 messages in this block
167+
168+
</Fragment>
128169
<Fragment slot="panel.bernoulli">
129170
<slot name="bernoulli" />
130171

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

src/content/docs/en/user-guide/faucet.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ Most faucets only allow requests for test tokens once every 24 hours.
3434

3535
If you don't want to interact with the bridge, some faucets directly distribute Scroll Sepolia ETH.
3636

37+
- [https://thirdweb.com/scroll-sepolia-testnet](https://thirdweb.com/scroll-sepolia-testnet)
38+
- [https://www.hackquest.io/en/faucets/534351](https://www.hackquest.io/en/faucets/534351)
3739
- [https://scroll.l2scan.co/faucet](https://scroll.l2scan.co/faucet)
3840
- [https://www.covalenthq.com/faucet/](https://www.covalenthq.com/faucet)
3941
- [https://faucet.quicknode.com/scroll/sepolia](https://faucet.quicknode.com/scroll/sepolia)

src/content/docs/es/user-guide/faucet.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ La mayoría de los faucets sólo permiten solicitar tokens de prueba una vez cad
3232

3333
Si no quieres interactuar con el bridge, algunos faucets distribuyen ETH directamente a Scroll Sepolia . -->
3434

35+
- [https://thirdweb.com/scroll-sepolia-testnet](https://thirdweb.com/scroll-sepolia-testnet)
36+
- [https://www.hackquest.io/en/faucets/534351](https://www.hackquest.io/en/faucets/534351)
3537
- [https://scroll.l2scan.co/faucet](https://scroll.l2scan.co/faucet)
3638
- [https://www.covalenthq.com/faucet/](https://www.covalenthq.com/faucet/)
3739
- [https://faucet.quicknode.com/scroll/sepolia](https://faucet.quicknode.com/scroll/sepolia)

src/content/docs/tr/user-guide/faucet.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ Sepolia'da ETH aldıktan sonra, bunları cüzdanınızda _Sepolia Ağı_ üzerin
3232

3333
Köprü ile etkileşime geçmek istemiyorsanız, bazı musluklar doğrudan Scroll Sepolia ETH dağıtır.
3434

35+
- [https://thirdweb.com/scroll-sepolia-testnet](https://thirdweb.com/scroll-sepolia-testnet)
36+
- [https://www.hackquest.io/en/faucets/534351](https://www.hackquest.io/en/faucets/534351)
3537
- [https://scroll.l2scan.co/faucet](https://scroll.l2scan.co/faucet)
3638
- [https://www.covalenthq.com/faucet/](https://www.covalenthq.com/faucet)
3739
- [https://faucet.quicknode.com/scroll/sepolia](https://faucet.quicknode.com/scroll/sepolia)

src/content/docs/zh/user-guide/faucet.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ excerpt: "To interact with our testnet, you first need to acquire Sepolia ETH. T
3131

3232
如果您不想与跨链桥互动,一些水龙头可以直接发送 Scroll Sepolia ETH。
3333

34+
- [https://thirdweb.com/scroll-sepolia-testnet](https://thirdweb.com/scroll-sepolia-testnet)
35+
- [https://www.hackquest.io/en/faucets/534351](https://www.hackquest.io/en/faucets/534351)
3436
- [https://scroll.l2scan.co/faucet](https://scroll.l2scan.co/faucet)
3537
- [https://www.covalenthq.com/faucet/](https://www.covalenthq.com/faucet)
3638
- [https://faucet.quicknode.com/scroll/sepolia](https://faucet.quicknode.com/scroll/sepolia)

0 commit comments

Comments
 (0)