Skip to content

Commit 4071770

Browse files
isabelleweicolinlyguocolinlyguoSina PilehchihaThegaram
authored
Curie updates (#289)
* Curie updates (#271) * curie-update-libzkp-version * security nit * move contact info into highlight * change Aside type * Update running-a-scroll-node.mdx (#278) * nodeKey hashing are done with domain 512 not 256 Am currently making a storage prover in noir and found this error In the zktrie repo nodekeys are hashed with ToSecureKey() in type/util.go (afaik) https://github.com/scroll-tech/zktrie/blob/23181f209e94137f74337b150179aeb80c72e7c8/types/util.go#L107 ToSecureKey() uses Hash() in types/bytes32.go which uses HASH_DOMAIN_BYTE32 as domain which is 256 *2 (512) see here: https://github.com/scroll-tech/zktrie/blob/23181f209e94137f74337b150179aeb80c72e7c8/types/hash.go#L16 and here is where i did my test in noir :D (account leaf is lower in same file) https://github.com/jimjimvalkema/scrollZkStorageProofs/blob/bcdd922405e046e99787b8b47f374befac170779/ScrollStorageProver/src/main.nr#L168 * add get in touch button * Revert "add get in touch button" This reverts commit 5c695f2. * Curie update details (#286) * remove legacy flag for foundry * update Curie details * fix typo * oops * Add PR descriptions --------- Co-authored-by: colinlyguo <[email protected]> Co-authored-by: colin <[email protected]> Co-authored-by: Sina Pilehchiha <[email protected]> Co-authored-by: Péter Garamvölgyi <[email protected]> Co-authored-by: jimjimvalkema <[email protected]> Co-authored-by: Daniel Helm <[email protected]> Co-authored-by: zhengqi zhang <[email protected]>
1 parent ae172a2 commit 4071770

File tree

8 files changed

+165
-88
lines changed

8 files changed

+165
-88
lines changed

src/content/docs/en/developers/developer-quickstart.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ const config: HardhatUserConfig = {
113113
To deploy using the Scroll Sepolia Testnet Public RPC, run:
114114

115115
```bash
116-
forge create ... --rpc-url=https://sepolia-rpc.scroll.io/ --legacy
116+
forge create ... --rpc-url=https://sepolia-rpc.scroll.io/
117117
```
118118

119119
### Remix Web IDE

src/content/docs/en/developers/guides/contract-deployment-tutorial.mdx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ The Scroll Sepolia Testnet allows anyone to deploy a smart contract on Scroll. I
6363
--value <lock_amount> \
6464
--constructor-args <unlock_time> \
6565
--private-key <your_private_key> \
66-
--legacy \
6766
contracts/Lock.sol:Lock
6867
```
6968

@@ -77,7 +76,7 @@ The Scroll Sepolia Testnet allows anyone to deploy a smart contract on Scroll. I
7776
--value 0.00000000002ether \
7877
--constructor-args 1696118400 \
7978
--private-key 0xabc123abc123abc123abc123abc123abc123abc123abc123abc123abc123abc1 \
80-
--legacy contracts/Lock.sol:Lock
79+
contracts/Lock.sol:Lock
8180
```
8281

8382
## Questions and Feedback

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

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

1717
### Finding the latest version
1818

19-
We recommend using the latest release at https://github.com/scroll-tech/go-ethereum/releases. The required version for Scroll Mainnet is `scroll-v5.4.2` 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.
19+
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.4.2`.
21+
For the remainder of this guide, `VERSION` will denote the version tag. For example, `scroll-v5.5.0`.
2222

2323
### Hardware Requirements
2424

@@ -176,7 +176,7 @@ enode://c7b2d94e95da343db6e667a01cef90376a592f2d277fbcbf6e9c9186734ed8003d013895
176176
"archimedesBlock": 0,
177177
"shanghaiBlock": 0,
178178
"bernoulliBlock": 5220340,
179-
"curieBlock": 6924036,
179+
"curieBlock": 7096836,
180180
"clique": {
181181
"period": 3,
182182
"epoch": 30000

src/content/docs/en/developers/l1-and-l2-bridging/eth-and-erc20-token-bridge.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ Sends ERC20 tokens from L1 to L2.
119119
| token | The token address on L1. |
120120
| to | The address of recipient's account on L2. |
121121
| amount | The amount of token to transfer, in wei. |
122-
| gasLimit | Gas limit required to complete the deposit on L2. 20000 should be enough to process the transaction, depending on the Gateway, but unused funds are refunded. |
122+
| gasLimit | Gas limit required to complete the deposit on L2. 200000 should be enough to process the transaction, depending on the Gateway, but unused funds are refunded. |
123123

124124
### getL2ERC20Address
125125

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

Lines changed: 86 additions & 75 deletions
Large diffs are not rendered by default.

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

Lines changed: 66 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,71 @@ 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+
## Curie Upgrade
23+
24+
### Overview
25+
26+
This significant upgrade will reduce gas fees on the Scroll chain by 1.5x. Highlights include:
27+
28+
- 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.
29+
- 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.
30+
- 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.
31+
- 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.
32+
33+
### Timeline
34+
35+
- **Scroll Sepolia**
36+
- Network Upgrade: June 17th, 2024
37+
- **Scroll Mainnet**
38+
- Upgrade Initiation: June 20th, 2024
39+
- Timelock Completion & Upgrade: July 3rd, 2024
40+
41+
### Technical Details
42+
43+
#### Contract Changes
44+
45+
The code changes for this upgrade are documented in the following PRs:
46+
47+
- [Accept compressed batches](https://github.com/scroll-tech/scroll/pull/1317)
48+
- [Update `L1GasPriceOracle`](https://github.com/scroll-tech/scroll/pull/1343)
49+
- [Change `MAX_COMMIT_SCALAR` and `MAX_BLOB_SCALAR` to 1e18](https://github.com/scroll-tech/scroll/pull/1354)
50+
- [Remove batch index check when updating a verifier](https://github.com/scroll-tech/scroll/pull/1372)
51+
52+
The main changes are as follows:
53+
54+
- 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).
55+
- 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:
56+
- Original formula: `(l1GasUsed(txRlp) + overhead) * l1BaseFee * scalar`
57+
- New formula: `l1BaseFee * commitScalar + len(txRlp) * l1BlobBaseFee * blobScalar`
58+
59+
#### Node Changes
60+
61+
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.
62+
63+
#### zkEVM circuit changes
64+
65+
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.
66+
67+
#### Audits
68+
69+
- TrailofBits: coming soon!
70+
- [Zellic](https://github.com/Zellic/publications/blob/master/Scroll%20zkEVM%20-%20Zellic%20Audit%20Report.pdf)
71+
72+
### Compatibility
73+
74+
#### Sequencer and Follower Nodes (l2geth)
75+
76+
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).
77+
78+
#### Dapps and Indexers
79+
80+
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.
81+
82+
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:
83+
84+
- The `version` field in `BatchHeader` will be changed to 2 since Curie block.
85+
- 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).
86+
2287
## Bernoulli Upgrade
2388

2489
### Overview
@@ -54,7 +119,7 @@ The new version of zkevm circuits is `v0.10.3`. See [here](https://github.com/sc
54119
#### Audits
55120

56121
- [OpenZeppelin](https://blog.openzeppelin.com/scroll-eip-4844-support-audit)
57-
- TrailofBits (will be posted soon)
122+
- [TrailofBits](https://github.com/trailofbits/publications/blob/master/reviews/2024-04-scroll-4844-blob-securityreview.pdf)
58123

59124
### Compatibility
60125

@@ -87,14 +152,12 @@ To reduce bridging costs, we implemented several gas optimizations on our bridge
87152

88153
### Timeline
89154

90-
91155
- **Scroll Sepolia:**
92156
- Network Upgrade: January 19, 2024
93157
- **Scroll Mainnet:**
94158
- Upgrade Initiation: February 7, 2024
95159
- Timelock Completion & Upgrade: February 21, 2024
96160

97-
98161
### Technical Details
99162

100163
#### Code Changes

src/content/docs/en/technology/security/audits-and-bug-bounty.mdx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ permalink: "technology/security/audits-and-bug-bounty"
88

99
import Aside from "../../../../../components/Aside.astro"
1010

11+
<Aside>
12+
For any discoveries of critical vulnerabilities outside of the scope of the bug bounty program, please also send reports to [email protected].
13+
</Aside>
14+
1115
Scroll treats security as a top priority.
1216

1317
Aside from rigorous testing, an internal security team, and comprehensive code reviews, we have also engaged with multiple security audit firms to conduct audits on our codebase. We have also launched a bug bounty program to encourage the community to participate in the security of our protocol.
@@ -78,4 +82,4 @@ Rewards depend on the severity of reported vulnerabilities:
7882

7983
The scope of the bug bounty program covers the blockchain infrastructure and the smart contracts for bridging and rollup. For a detailed breakdown of bug categories, please refer to the bug bounty page.
8084

81-
Besides the listed scopes in the bug bounty program, we also encourage reporting any vulnerabilities identified to Immunefi, which we will still consider for rewards. For any discoveries of critical vulnerabilities outside of the scope of the bug bounty program, please also send reports to [email protected].
85+
Besides the listed scopes in the bug bounty program, we also encourage reporting any vulnerabilities identified to Immunefi, which we will still consider for rewards.

src/content/docs/en/technology/sequencer/zktrie.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ An Ethereum Account Leaf Node consists of an Ethereum address and a state accoun
106106
var address byte[20] // 20 bytes in big-endian
107107
valHi := address[0:16]
108108
valLo := address[16:20] * 2^96 // padding 12 bytes of 0 at the end
109-
nodeKey := h{256}(valHi, valLo)
109+
nodeKey := h{512}(valHi, valLo)
110110
```
111111

112112
A state account struct in the Scroll consists of the following fields (`Fr` indicates the finite field and is a 254-bit value)
@@ -182,7 +182,7 @@ A Storage Leaf Node encodes a key-value pair where both key and value are `u256`
182182
var storageKey byte[32] // 32 bytes in big-endian
183183
valHi := storageKey[0:16]
184184
valLo := storageKey[16:32]
185-
nodeKey := h{256}(valHi, valLo)
185+
nodeKey := h{512}(valHi, valLo)
186186
```
187187

188188
The storage value is a `u256` value. The `flag` for the storage value is 1, shown below.

0 commit comments

Comments
 (0)