Skip to content

Commit 8f1afc2

Browse files
Initial Euclid docs changes
1 parent 1388474 commit 8f1afc2

30 files changed

+1653
-400
lines changed

public/locales/en/translation.json

+6-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,12 @@
141141
"cpuProverRepo": "CPU Prover Repo",
142142
"security": "Security",
143143
"auditsAndBugBounty": "Audits & Bug Bounty",
144-
"l2BeatAssessment": "L2Beat Assessment"
144+
"l2BeatAssessment": "L2Beat Assessment",
145+
"euclidUpgrade": "Euclid Upgrade",
146+
"darwinV2Upgrade": "Darwin v2 Upgrade",
147+
"darwinUpgrade": "Darwin Upgrade",
148+
"curieUpgrade": "Curie Upgrade",
149+
"bernoulliUpgrade": "Bernoulli Upgrade"
145150
},
146151
"learn": {
147152
"ethereumAndProtocols": "Ethereum & Protocols",

public/locales/es/translation.json

+7-1
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,13 @@
142142

143143
"security": "Seguridad",
144144
"auditsAndBugBounty": "Auditorías y recompenzas por encontrar bugs",
145-
"l2BeatAssessment": "Análisis de L2Beat"
145+
"l2BeatAssessment": "Análisis de L2Beat",
146+
147+
"euclidUpgrade": "Actualización de Euclides",
148+
"darwinV2Upgrade": "Actualización de Darwin v2",
149+
"darwinUpgrade": "Actualización de Darwin",
150+
"curieUpgrade": "Actualización de Curie",
151+
"bernoulliUpgrade": "Actualización de Bernoulli"
146152
},
147153
"learn": {
148154
"ethereumAndProtocols": "Ethereum y Protocolos",

public/locales/tr/translation.json

+7-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,13 @@
143143

144144
"security": "Güvenlik",
145145
"auditsAndBugBounty": "Denetimler ve Hata Ödül Programı",
146-
"l2BeatAssessment": "L2Beat Değerlendirmesi"
146+
"l2BeatAssessment": "L2Beat Değerlendirmesi",
147+
148+
"euclidUpgrade": "Euclid Yükseltmesi",
149+
"darwinV2Upgrade": "Darwin v2 Yükseltmesi",
150+
"darwinUpgrade": "Darwin Yükseltmesi",
151+
"curieUpgrade": "Curie Yükseltmesi",
152+
"bernoulliUpgrade": "Bernoulli Yükseltmesi"
147153
},
148154
"learn": {
149155
"ethereumAndProtocols": "Ethereum & Protokoller",

public/locales/zh/translation.json

+7-1
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,13 @@
142142

143143
"security": "安全",
144144
"auditsAndBugBounty": "审计和漏洞赏金",
145-
"l2BeatAssessment": "L2Beat 评估"
145+
"l2BeatAssessment": "L2Beat 评估",
146+
147+
"euclidUpgrade": "Euclid 升级",
148+
"darwinV2Upgrade": "Darwin v2 升级",
149+
"darwinUpgrade": "Darwin 升级",
150+
"curieUpgrade": "Curie 升级",
151+
"bernoulliUpgrade": "Bernoulli 升级"
146152
},
147153
"learn": {
148154
"ethereumAndProtocols": "以太坊与协议",

src/config/sidebar.ts

+23-1
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,29 @@ export const getSidebar = () => {
202202
{ title: t("sidebar.technology.scrollArchitecture"), url: formatUrl("technology") },
203203
{
204204
title: t("sidebar.technology.scrollUpgrades"),
205-
url: "technology/overview/scroll-upgrades",
205+
url: formatUrl("technology/overview/scroll-upgrades"),
206+
children: [
207+
{
208+
title: t("sidebar.technology.euclidUpgrade"),
209+
url: formatUrl("technology/overview/scroll-upgrades/euclid-upgrade"),
210+
},
211+
{
212+
title: t("sidebar.technology.darwinV2Upgrade"),
213+
url: formatUrl("technology/overview/scroll-upgrades/darwin-v2-upgrade"),
214+
},
215+
{
216+
title: t("sidebar.technology.darwinUpgrade"),
217+
url: formatUrl("technology/overview/scroll-upgrades/darwin-upgrade"),
218+
},
219+
{
220+
title: t("sidebar.technology.curieUpgrade"),
221+
url: formatUrl("technology/overview/scroll-upgrades/curie-upgrade"),
222+
},
223+
{
224+
title: t("sidebar.technology.bernoulliUpgrade"),
225+
url: formatUrl("technology/overview/scroll-upgrades/bernoulli-upgrade"),
226+
},
227+
],
206228
},
207229
],
208230
},

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ For most developers, using [our official RPC endpoint](/en/developers/developer-
1919

2020
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.
2121

22-
For the remainder of this guide, `VERSION` will denote the version tag. For example, `scroll-v5.8.0`.
22+
For the remainder of this guide, `VERSION` will denote the version tag. For example, `scroll-v5.8.34`.
2323

2424
### Hardware Requirements
2525

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

+1-324
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
---
2+
section: technology
3+
date: Last Modified
4+
title: "Bernoulli Upgrade"
5+
lang: "en"
6+
permalink: "technology/overview/scroll-upgrades/bernoulli-upgrade"
7+
---
8+
9+
### Overview
10+
11+
This upgrade features a significant reduction in transaction costs by introducing support for EIP-4844 data blobs and supporting the SHA2-256 precompile.
12+
13+
### Timeline
14+
15+
- **Scroll Sepolia**
16+
- Network Upgrade: April 15th, 2024
17+
- **Scroll Mainnet**
18+
- Upgrade Initiation: April 15th, 2024
19+
- Timelock Completion & Upgrade: April 29th, 2024
20+
21+
### Technical Details
22+
23+
#### Contract changes
24+
25+
The contract changes for this upgrade are in [this PR](https://github.com/scroll-tech/scroll/pull/1179), along with the audit fixes [here](https://github.com/scroll-tech/scroll/pulls?q=is%3Apr+created%3A2024-04-10..2024-04-11+fix+in%3Atitle+label%3Abug). The main changes are as follows:
26+
27+
- `ScrollChain` now accepts batches with either calldata or blob encoding in `commitBatch`.
28+
- `ScrollChain` now supports finalizing blob-encoded batches through `finalizeBatchWithProof4844`.
29+
- `MultipleVersionRollupVerifier` can now manage different on-chain verifiers for each batch encoding version.
30+
31+
#### Node changes
32+
33+
The new node version is `v5.3.0`. See [here](https://github.com/scroll-tech/go-ethereum/releases/tag/scroll-v5.3.0) for the release log.
34+
35+
#### zkEVM circuit changes
36+
37+
The new version of zkevm circuits is `v0.10.3`. See [here](https://github.com/scroll-tech/zkevm-circuits/releases/tag/v0.10.3) for the release log.
38+
39+
#### Audits
40+
41+
- [OpenZeppelin](https://blog.openzeppelin.com/scroll-eip-4844-support-audit)
42+
- [TrailofBits](https://github.com/trailofbits/publications/blob/master/reviews/2024-04-scroll-4844-blob-securityreview.pdf)
43+
44+
### Compatibility
45+
46+
#### Sequencer and follower nodes (l2geth)
47+
48+
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.
49+
50+
#### Indexers and Bridges
51+
52+
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](/en/technology/chain/rollup/#codec), and check whether their decoders need to be adjusted. A summary of the new format:
53+
54+
- The format of [`BlockContext`](https://github.com/scroll-tech/scroll/blob/5362e28f744093495c1c09a6b68fc96a3264278b/common/types/encoding/codecv1/codecv1.go#L125) will not change.
55+
- `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.
56+
- `BatchHeader` now contains one new field, [`BlobVersionedHash`](https://github.com/scroll-tech/scroll/blob/5362e28f744093495c1c09a6b68fc96a3264278b/common/types/encoding/codecv1/codecv1.go#L405).
57+
58+
#### Provers
59+
60+
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.
61+
62+
63+
## Bridge Upgrade
64+
65+
### Overview
66+
67+
To reduce bridging costs, we implemented several gas optimizations on our bridge and rollup contract suite. The optimization techniques used include the following:
68+
69+
- We will now use constants to store some companion contract addresses, instead of using storage variables. This is possible since these values should (almost) never change. With this change we can save on a few storage load operations.
70+
- We updated the intrinsic gas estimation in `L1MessageQueue` to use a simple upper bound instead of an exact calculation. The two results will be similar for most bridge transactions but the new implementation is significantly cheaper.
71+
- We merged two contracts `L1MessageQueue` and `L2GasPriceOracle` to save on call costs from one contract to the other.
72+
73+
### Timeline
74+
75+
- **Scroll Sepolia:**
76+
- Network Upgrade: January 19, 2024
77+
- **Scroll Mainnet:**
78+
- Upgrade Initiation: February 7, 2024
79+
- Timelock Completion & Upgrade: February 21, 2024
80+
81+
### Technical Details
82+
83+
#### Code Changes
84+
- [Bridge Cost Optimization](https://github.com/scroll-tech/scroll/pull/1011)
85+
- [Audit Fixes](https://github.com/scroll-tech/scroll/pulls?q=OZ+is%3Apr+created%3A2024-01-27..2024-02-10)
86+
- [Previously deployed version](https://github.com/scroll-tech/scroll/tree/ff380141a8cbcc214dc65f17ffa44faf4be646b6) (commit `ff380141a8cbcc214dc65f17ffa44faf4be646b6`)
87+
- [Version deployed](https://github.com/scroll-tech/scroll/tree/6030927680a92d0285c2c13e6bb27ed27d1f32d1) (commit `6030927680a92d0285c2c13e6bb27ed27d1f32d1`)
88+
89+
#### Audits
90+
91+
- [OpenZeppelin](https://blog.openzeppelin.com/scroll-bridge-gas-optimizations-audit)
92+
93+
#### List of Changes
94+
95+
**Changes to L1 contracts:**
96+
97+
- In `ScrollChain`, change `messageQueue` and `verifier` to `immutable`.
98+
- In `L1ScrollMessenger`, change `counterpart`, `rollup`, and `messageQueue` to `immutable`.
99+
- In all token gateways, change `counterpart`, `router`, and `messenger` to `immutable`.
100+
- Merge `L1MessageQueue` and `L2GasPriceOracle` into a single contract `L1MessageQueueWithGasPriceOracle` (deployed on the same address as the previous `L1MessageQueue`). In this contract, we also change `messenger` and `scrollChain` to `immutable`, and simplify `calculateIntrinsicGasFee`.
101+
102+
**Changes to L2 contracts:**
103+
104+
- In `L2ScrollMessenger`, change `counterpart` to `immutable`.
105+
- In all token gateways, change `counterpart`, `router`, and `messenger` to `immutable`.
106+
107+
**Contracts affected:**
108+
109+
- **L1:** `L1MessageQueue`, `L2GasPriceOracle`, `ScrollChain`, `L1WETHGateway`, `L1StandardERC20Gateway`, `L1GatewayRouter`, `L1ScrollMessenger`, `L1CustomERC20Gateway`, `L1ERC721Gateway`, `L1ERC1155Gateway`.
110+
- **L2:** `L2ScrollMessenger`, `L2WETHGateway`, `L2StandardERC20Gateway`, `L2GatewayRouter`, `L2CustomERC20Gateway`, `L2ERC721Gateway`, `L2ERC1155Gateway`.
111+
112+
#### Compatibility
113+
114+
##### Sequencer and follower nodes (l2geth)
115+
116+
Operators running an `l2geth` node do not need to upgrade. The changes in this upgrade will not affect `l2geth`.
117+
118+
##### Dapps and indexers
119+
120+
Dapps and indexers (and similar off-chain infrastructure) that query contracts or rely on contract interfaces would, in most cases, not need to be changed. The majority of the contract changes are internal and/or backward compatible.
121+
122+
If your application depends on [`L2GasPriceOracle`](https://etherscan.io/address/0x987e300fDfb06093859358522a79098848C33852) to monitor how Scroll keeps track of the L2 gas price on L1, from the upgrade block number you will need to start monitoring [`L1MessageQueueWithGasPriceOracle`](https://etherscan.io/address/0x0d7E906BD9cAFa154b048cFa766Cc1E54E39AF9B).
123+
124+
The original gas price oracle contract will be deprecated: it will no longer be updated or used by the Scroll bridge.
125+
126+
- Ethereum:
127+
- `L2GasPriceOracle`: [`0x987e300fDfb06093859358522a79098848C33852`](https://etherscan.io/address/0x987e300fDfb06093859358522a79098848C33852)
128+
- `L1MessageQueueWithGasPriceOracle`: [`0x0d7E906BD9cAFa154b048cFa766Cc1E54E39AF9B`](https://etherscan.io/address/0x0d7E906BD9cAFa154b048cFa766Cc1E54E39AF9B)
129+
- Sepolia:
130+
- `L2GasPriceOracle`: [`0x247969F4fad93a33d4826046bc3eAE0D36BdE548`](https://sepolia.etherscan.io/address/0x247969F4fad93a33d4826046bc3eAE0D36BdE548)
131+
- `L1MessageQueueWithGasPriceOracle`: [`0xF0B2293F5D834eAe920c6974D50957A1732de763`](https://sepolia.etherscan.io/address/0xF0B2293F5D834eAe920c6974D50957A1732de763)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
---
2+
section: technology
3+
date: Last Modified
4+
title: "Curie Upgrade"
5+
lang: "en"
6+
permalink: "technology/overview/scroll-upgrades/curie-upgrade"
7+
---
8+
9+
### Overview
10+
11+
This significant upgrade will reduce gas fees on the Scroll chain by 1.5x. Highlights include:
12+
13+
- Compresses the data stored in blobs using the [zstd](https://github.com/scroll-tech/da-codec/tree/main/libzstd) algorithm. This compression reduces the data size, allowing each blob to store more transactions, thereby reducing data availability cost per transaction.
14+
- Adopts a modified version of the EIP-1559 pricing model which is compatible with the EIP-1559 transaction interface, bringing beneftis such as more accurate transaction pricing and a more predictable and stable fee structure.
15+
- Support for new EVM opcodes `TLOAD`, `TSTORE`, and `MCOPY`. Users can safely use the latest Solidity compiler version `0.8.26` to build the contracts.
16+
- Introduces a dynamic block time. During periods of traffic congestion, a block will be packed when the number of transactions reaches the circuit limit instead of waiting for the 3-second interval.
17+
18+
### Timeline
19+
20+
- **Scroll Sepolia**
21+
- Network Upgrade: June 17th, 2024
22+
- **Scroll Mainnet**
23+
- Upgrade Initiation: June 20th, 2024
24+
- Timelock Completion & Upgrade: July 3rd, 2024
25+
26+
### Technical Details
27+
28+
#### Contract Changes
29+
30+
The code changes for this upgrade are documented in the following PRs:
31+
32+
- [Accept compressed batches](https://github.com/scroll-tech/scroll/pull/1317)
33+
- [Update `L1GasPriceOracle`](https://github.com/scroll-tech/scroll/pull/1343)
34+
- [Change `MAX_COMMIT_SCALAR` and `MAX_BLOB_SCALAR` to 1e18](https://github.com/scroll-tech/scroll/pull/1354)
35+
- [Remove batch index check when updating a verifier](https://github.com/scroll-tech/scroll/pull/1372)
36+
37+
The main changes are as follows:
38+
39+
- The rollup contract (`ScrollChain`) will now accept batches with both versions 1 and 2. [Version 1](https://github.com/scroll-tech/da-codec/tree/main/encoding/codecv1) is used for uncompressed blobs (pre-Curie), while [version 2](https://github.com/scroll-tech/da-codec/tree/main/encoding/codecv2) is used for compressed blobs (post-Curie).
40+
- The `L1GasPriceOracle` contract will be updated to change the data fee formula to account for blob DA, providing a more accurate estimation of DA costs:
41+
- Original formula: `(l1GasUsed(txRlp) + overhead) * l1BaseFee * scalar`
42+
- New formula: `l1BaseFee * commitScalar + len(txRlp) * l1BlobBaseFee * blobScalar`
43+
44+
#### Node Changes
45+
46+
The new node version is `v5.5.0`. See the [release notes](https://github.com/scroll-tech/go-ethereum/releases/tag/scroll-v5.5.0) for the list of changes.
47+
48+
#### zkEVM circuit changes
49+
50+
The new version of zkevm circuits is `v0.11.4`. See [here](https://github.com/scroll-tech/zkevm-circuits/releases/tag/v0.11.4) for the release log.
51+
52+
#### Audits
53+
54+
- TrailofBits: coming soon!
55+
- [Zellic](https://github.com/Zellic/publications/blob/master/Scroll%20zkEVM%20-%20Zellic%20Audit%20Report.pdf)
56+
57+
### Compatibility
58+
59+
#### Sequencer and Follower Nodes (l2geth)
60+
61+
This upgrade is a hard fork, introducing the `TLOAD`, `TSTORE`, and `MCOPY` opcodes. Operators running an `l2geth` node are required to upgrade before the hard fork block. For more information, see the [node release note](https://github.com/scroll-tech/go-ethereum/releases/tag/scroll-v5.4.2).
62+
63+
#### Dapps and Indexers
64+
65+
For dApps, this upgrade is backward compatible. Developers should adjust the gas fee settings to incorporate the EIP-1559 pricing model. Note that dApps can no longer rely on the fixed 3-second block time in the application logic.
66+
67+
For indexers, the [data format](https://docs.scroll.io/en/technology/chain/rollup/#codec) remains the same. The will be however changes to the data content:
68+
69+
- The `version` field in `BatchHeader` will be changed to 2 since Curie block.
70+
- The data stored in blob will be compressed and can be decompressed by [zstd v1.5.6](https://github.com/facebook/zstd/releases/tag/v1.5.6).

0 commit comments

Comments
 (0)