Skip to content

Commit 79c690e

Browse files
authored
Merge pull request #227 from scroll-tech/isabellewei/bernoulli-sepolia
Bernoulli upgrade - Sepolia updates
2 parents a30b9bb + bdf5809 commit 79c690e

File tree

5 files changed

+137
-40
lines changed

5 files changed

+137
-40
lines changed

src/content/docs/en/developers/ethereum-and-scroll-differences.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ For open-source contributors and infrastructure builders, please contact our tea
3333

3434
## EVM Precompiles
3535

36-
The `SHA2-256` (address `0x2`), `RIPEMD-160` (address `0x3`), and `blake2f` (address `0x9`) precompiles are currently not supported. Calls to these precompiled contracts will revert. We plan to enable these three precompiles in a future hard fork.
36+
The `RIPEMD-160` (address `0x3`) and `blake2f` (address `0x9`) precompiles are currently not supported. The `SHA2-256` (address `0x2`) is currently supported on Scroll Sepolia, but will soon be supported on Scroll Mainnet. Calls to unsupported precompiled contracts will revert. We plan to enable these precompiles in future hard forks.
3737

3838
The `modexp` precompile is supported but only supports inputs of size less than or equal to 32 bytes (i.e. `u256`).
3939

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ For most developers, using [our official RPC endpoint](../developer-quickstart#n
1616

1717
### Finding the latest version
1818

19-
We recommend using the latest release at https://github.com/scroll-tech/go-ethereum/releases. For Scroll Mainnet, the required version is `scroll-v5.0.0` 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.
20-
21-
For the remainder of this guide, `VERSION` will denote the version tag. For example, `scroll-v5.1.10`.
19+
We recommend using the latest release at https://github.com/scroll-tech/go-ethereum/releases. The required version is `scroll-v5.2.0` 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.
20+
{/* TODO: update min required version for mainnet after Bernoulli upgrade, also update mainnet genesis info */}
21+
For the remainder of this guide, `VERSION` will denote the version tag. For example, `scroll-v5.2.0`.
2222

2323
### Hardware Requirements
2424

@@ -288,6 +288,7 @@ enode://dd1ac5433c5c2b04ca3166f4cb726f8ff6d2da83dbc16d9b68b1ea83b7079b371eb16ef4
288288
"londonBlock": 0,
289289
"archimedesBlock": 0,
290290
"shanghaiBlock": 0,
291+
"bernoulliBlock": 3747132,
291292
"clique": {
292293
"period": 3,
293294
"epoch": 30000

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ whatsnext: { "Bridge": "/en/technology/bridge/cross-domain-messaging/" }
2121

2222
| Address | Name | Scroll behavior |
2323
| ------- | ------------ | ----------------------------------------------------------------------------------------------- |
24-
| `0x02` | `SHA2-256` | Currently not supported. |
24+
| `0x02` | `SHA2-256` | Supported on Scroll Sepolia, and will soon be supported on Scroll Mainnet. |
2525
| `0x03` | `RIPEMD-160` | Currently not supported. |
2626
| `0x05` | `modexp` | Restrict the input values `B, E, M` to unsigned integers less than $2^{256}$. |
2727
| `0x08` | `ecPairing` | The inputs are still multiple of 6 32-byte values, but limit the number of tuples to at most 4. |

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

Lines changed: 76 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ whatsnext: { "EVM Differences from Ethereum": "/en/technology/chain/differences/
99

1010
import ClickToZoom from "../../../../../components/ClickToZoom.astro"
1111
import RollupProcess from "../_images/rollup.png"
12+
import NetworkTabs from "../../../../../components/Tabs/NetworkTabs.astro"
13+
import { Tabs } from "../../../../../components/Tabs/Tabs.tsx"
1214

1315
This document describes the rollup process in Scroll.
1416

@@ -119,37 +121,77 @@ At this stage, the state root of the latest finalized batch can be used trustles
119121

120122
This section describes the codec of three data structures in the Rollup contract: `BatchHeader`, `Chunk`, and `BlockContext`.
121123

122-
### `BatchHeader` Codec
123-
124-
| Field | Bytes | Type | Offset | Description |
125-
| ------------------------ | ------- | ----------- | ------ | --------------------------------------------------------------- |
126-
| `version` | 1 | `uint8` | 0 | The batch header version |
127-
| `batchIndex` | 8 | `uint64` | 1 | The index of the batch |
128-
| `l1MessagePopped` | 8 | `uint64` | 9 | The number of L1 messages poped in the batch |
129-
| `totalL1MessagePopped` | 8 | `uint64` | 17 | The number of total L1 messages popped after the batch |
130-
| `dataHash` | 32 | `bytes32` | 25 | The data hash of the batch |
131-
| `parentBatchHash` | 32 | `bytes32` | 57 | The parent batch hash |
132-
| `skippedL1MessageBitmap` | dynamic | `uint256[]` | 89 | A bitmap to indicate which L1 messages are skipped in the batch |
133-
134-
### `Chunk` Codec
135-
136-
| Field | Bytes | Type | Offset | Description |
137-
| ---------------- | ------- | -------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
138-
| `numBlocks` | 1 | `uint8` | 0 | The number of blocks in the chunk |
139-
| `block[0]` | 60 | `BlockContext` | 1 | The block information of the 1st block |
140-
| ... | ... | ... | ... | ... |
141-
| `block[i]` | 60 | `BlockContext` | `60*i+1` | The block information of `i+1`-th block |
142-
| ... | ... | ... | ... | ... |
143-
| `block[n-1]` | 60 | `BlockContext` | `60*n-59` | The block information of the last block |
144-
| `l2Transactions` | dynamic | `bytes` | `60*n+1` | The concatenated RLP encoding of L2 transactions with signatures. The byte length (`uint32`) of RLP encoding is inserted before each transaction. |
145-
146-
### `BlockContext` Codec
147-
148-
| Field | Bytes | Type | Offset | Description |
149-
| ----------------- | ----- | --------- | ------ | ----------------------------------------------------------------------------------- |
150-
| `blockNumber` | 8 | `uint64` | 0 | The block number |
151-
| `timestamp` | 8 | `uint64` | 8 | The block time |
152-
| `baseFee` | 32 | `uint256` | 16 | The base fee of this block. Currently, it is always 0, because we disable EIP-1559. |
153-
| `gasLimit` | 8 | `uint64` | 48 | The gas limit of this block |
154-
| `numTransactions` | 2 | `uint16` | 56 | The number of transactions in this block, including both L1 & L2 txs |
155-
| `numL1Messages` | 2 | `uint16` | 58 | The number of L1 messages in this block |
124+
### Scroll Mainnet
125+
#### `BatchHeader` Codec
126+
127+
| Field | Bytes | Type | Offset | Description |
128+
| ------------------------ | ------- | ----------- | ------ | --------------------------------------------------------------- |
129+
| `version` | 1 | `uint8` | 0 | The batch header version |
130+
| `batchIndex` | 8 | `uint64` | 1 | The index of the batch |
131+
| `l1MessagePopped` | 8 | `uint64` | 9 | The number of L1 messages poped in the batch |
132+
| `totalL1MessagePopped` | 8 | `uint64` | 17 | The number of total L1 messages popped after the batch |
133+
| `dataHash` | 32 | `bytes32` | 25 | The data hash of the batch |
134+
| `parentBatchHash` | 32 | `bytes32` | 57 | The parent batch hash |
135+
| `skippedL1MessageBitmap` | dynamic | `uint256[]` | 89 | A bitmap to indicate which L1 messages are skipped in the batch |
136+
137+
#### `Chunk` Codec
138+
139+
| Field | Bytes | Type | Offset | Description |
140+
| ---------------- | ------- | -------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
141+
| `numBlocks` | 1 | `uint8` | 0 | The number of blocks in the chunk |
142+
| `block[0]` | 60 | `BlockContext` | 1 | The block information of the 1st block |
143+
| ... | ... | ... | ... | ... |
144+
| `block[i]` | 60 | `BlockContext` | `60*i+1` | The block information of `i+1`-th block |
145+
| ... | ... | ... | ... | ... |
146+
| `block[n-1]` | 60 | `BlockContext` | `60*n-59` | The block information of the last block
147+
| `l2Transactions` | dynamic | `bytes` | `60*n+1` | The concatenated RLP encoding of L2 transactions with signatures. The byte length (`uint32`) of RLP encoding is inserted before each transaction. | |
148+
149+
#### `BlockContext` Codec
150+
151+
| Field | Bytes | Type | Offset | Description |
152+
| ----------------- | ----- | --------- | ------ | ----------------------------------------------------------------------------------- |
153+
| `blockNumber` | 8 | `uint64` | 0 | The block number |
154+
| `timestamp` | 8 | `uint64` | 8 | The block time |
155+
| `baseFee` | 32 | `uint256` | 16 | The base fee of this block. Currently, it is always 0, because we disable EIP-1559. |
156+
| `gasLimit` | 8 | `uint64` | 48 | The gas limit of this block |
157+
| `numTransactions` | 2 | `uint16` | 56 | The number of transactions in this block, including both L1 & L2 txs |
158+
| `numL1Messages` | 2 | `uint16` | 58 | The number of L1 messages in this block
159+
160+
### Scroll Sepolia
161+
162+
#### `BatchHeader` Codec
163+
164+
| Field | Bytes | Type | Offset | Description |
165+
| ------------------------ | ------- | ----------- | ------ | --------------------------------------------------------------- |
166+
| `version` | 1 | `uint8` | 0 | The batch header version |
167+
| `batchIndex` | 8 | `uint64` | 1 | The index of the batch |
168+
| `l1MessagePopped` | 8 | `uint64` | 9 | The number of L1 messages poped in the batch |
169+
| `totalL1MessagePopped` | 8 | `uint64` | 17 | The number of total L1 messages popped after the batch |
170+
| `dataHash` | 32 | `bytes32` | 25 | The data hash of the batch |
171+
| `blobVersionedHash` | 32 | `bytes32` | 57 | The versioned hash of the blob with this batch’s data |
172+
| `parentBatchHash` | 32 | `bytes32` | 89 | The parent batch hash |
173+
| `skippedL1MessageBitmap` | dynamic | `uint256[]` | 121 | A bitmap to indicate which L1 messages are skipped in the batch |
174+
175+
#### `Chunk` Codec
176+
177+
| Field | Bytes | Type | Offset | Description |
178+
| ---------------- | ------- | -------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
179+
| `numBlocks` | 1 | `uint8` | 0 | The number of blocks in the chunk |
180+
| `block[0]` | 60 | `BlockContext` | 1 | The block information of the 1st block |
181+
| ... | ... | ... | ... | ... |
182+
| `block[i]` | 60 | `BlockContext` | `60*i+1` | The block information of `i+1`-th block |
183+
| ... | ... | ... | ... | ... |
184+
| `block[n-1]` | 60 | `BlockContext` | `60*n-59` | The block information of the last block |
185+
186+
#### `BlockContext` Codec
187+
188+
| Field | Bytes | Type | Offset | Description |
189+
| ----------------- | ----- | --------- | ------ | ----------------------------------------------------------------------------------- |
190+
| `blockNumber` | 8 | `uint64` | 0 | The block number |
191+
| `timestamp` | 8 | `uint64` | 8 | The block time |
192+
| `baseFee` | 32 | `uint256` | 16 | The base fee of this block. Currently, it is always 0, because we disable EIP-1559. |
193+
| `gasLimit` | 8 | `uint64` | 48 | The gas limit of this block |
194+
| `numTransactions` | 2 | `uint16` | 56 | The number of transactions in this block, including both L1 & L2 txs |
195+
| `numL1Messages` | 2 | `uint16` | 58 | The number of L1 messages in this block
196+
197+

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

Lines changed: 55 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,61 @@ The following contracts are used to initiate upgrades and execute upgrades after
1717
| L2 Scroll Multisig | Scroll| [`0xEfc9D1096fb65c832207E5e7F13C2D1102244dbe`](https://scrollscan.com/address/0xEfc9D1096fb65c832207E5e7F13C2D1102244dbe)|
1818
| L2 Timelock | Scroll | [`0xf6069DB81239E5194bb53f83aF564d282357bc99`](https://scrollscan.com/address/0xf6069DB81239E5194bb53f83aF564d282357bc99)|
1919

20-
## February 2024 Bridge Upgrade
20+
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.
21+
22+
## Bernoulli Upgrade
23+
24+
### Overview
25+
26+
This upgrade features a significant reduction in transaction costs by introducing support for EIP-4844 data blobs and supporting the SHA2-256 precompile.
27+
28+
### Timeline
29+
30+
- **Scroll Sepolia**
31+
- Network Upgrade: April 15th, 2024
32+
- **Scroll Mainnet**
33+
- TBD
34+
35+
### Technical Details
36+
37+
#### Contract changes
38+
39+
The contract changes for this upgrade are in [this PR](https://github.com/scroll-tech/scroll/pull/1179).
40+
41+
{/* As well as the audit fixes listed here [TODO] */}
42+
43+
#### Node changes
44+
45+
The new node version is v5.2.0. See [here](https://github.com/scroll-tech/go-ethereum/releases/tag/scroll-v5.2.0) for the changelog.
46+
47+
{/* #### Prover changes
48+
49+
[TODO]
50+
51+
#### Audits
52+
53+
- OpenZeppelin [TODO]
54+
- TrailofBits [TODO] */}
55+
56+
### Compatibility
57+
58+
#### Sequencer and follower nodes (l2geth)
59+
60+
This upgrade is a hard fork as it introduces the new blob data type and the SHA2-256 precompiled contract. Operators running an `l2geth` node are required to upgrade before the hard fork block. See the [node releases](https://github.com/scroll-tech/go-ethereum/releases) for more information.
61+
62+
#### Indexers and Bridges
63+
64+
This upgrade changes the format that Scroll uses to publish data to Ethereum. Projects that rely on this data should carefully review [the new data format](https://docs.scroll.io/en/technology/chain/rollup/#codec), and check whether their decoders need to be adjusted. A summary of the new format:
65+
66+
- The format of [`BlockContext`](https://github.com/scroll-tech/scroll/blob/5362e28f744093495c1c09a6b68fc96a3264278b/common/types/encoding/codecv1/codecv1.go#L125) will not change.
67+
- `Chunks` will [no longer include](https://github.com/scroll-tech/scroll/blob/5362e28f744093495c1c09a6b68fc96a3264278b/common/types/encoding/codecv1/codecv1.go#L162) the L2 transaction data. This will instead be [stored in a blob](https://github.com/scroll-tech/scroll/blob/5362e28f744093495c1c09a6b68fc96a3264278b/common/types/encoding/codecv1/codecv1.go#L284) attached to the `commitBatch` transaction.
68+
- `BatchHeader` now contains one new field, [`BlobVersionedHash`](https://github.com/scroll-tech/scroll/blob/5362e28f744093495c1c09a6b68fc96a3264278b/common/types/encoding/codecv1/codecv1.go#L405).
69+
70+
#### Provers
71+
72+
This upgrade involves a breaking change in [zkevm-circuits](https://github.com/scroll-tech/zkevm-circuits). Operators running a prover node are required to upgrade.
73+
74+
## Bridge Upgrade
2175

2276
### Overview
2377

0 commit comments

Comments
 (0)