From 37ad288a77861bcea948b592b2989299fbbb0e75 Mon Sep 17 00:00:00 2001 From: isabelle Date: Tue, 23 Apr 2024 18:43:15 -0400 Subject: [PATCH 1/7] add mainnet dates --- src/content/docs/en/technology/overview/scroll-upgrades.mdx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/content/docs/en/technology/overview/scroll-upgrades.mdx b/src/content/docs/en/technology/overview/scroll-upgrades.mdx index 857701567..08956ca86 100644 --- a/src/content/docs/en/technology/overview/scroll-upgrades.mdx +++ b/src/content/docs/en/technology/overview/scroll-upgrades.mdx @@ -30,7 +30,8 @@ This upgrade features a significant reduction in transaction costs by introducin - **Scroll Sepolia** - Network Upgrade: April 15th, 2024 - **Scroll Mainnet** - - TBD + - Upgrade Initiation: April 15th, 2024 + - Timelock Completion & Upgrade: April 29th, 2024 ### Technical Details From b06a7b454673889371882d8fd6a644292a36391d Mon Sep 17 00:00:00 2001 From: isabelle Date: Wed, 24 Apr 2024 16:34:27 -0400 Subject: [PATCH 2/7] bernoulli mainnet upgrade --- .../ethereum-and-scroll-differences.mdx | 2 +- .../guides/running-a-scroll-node.mdx | 6 +- .../docs/en/technology/chain/differences.mdx | 1 - .../docs/en/technology/chain/rollup.mdx | 108 ++++++------------ .../technology/overview/scroll-upgrades.mdx | 17 +-- 5 files changed, 48 insertions(+), 86 deletions(-) diff --git a/src/content/docs/en/developers/ethereum-and-scroll-differences.mdx b/src/content/docs/en/developers/ethereum-and-scroll-differences.mdx index c7ffa3a78..cf728988e 100644 --- a/src/content/docs/en/developers/ethereum-and-scroll-differences.mdx +++ b/src/content/docs/en/developers/ethereum-and-scroll-differences.mdx @@ -38,7 +38,7 @@ Opcodes from the Cancun upgrade are not yet available on Scroll, including `MCOP ## EVM Precompiles -The `RIPEMD-160` (address `0x3`) `blake2f` (address `0x9`), and `point evaluation` (address `0x0a`) 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. +The `RIPEMD-160` (address `0x3`) `blake2f` (address `0x9`), and `point evaluation` (address `0x0a`) precompiles are currently not supported. Calls to unsupported precompiled contracts will revert. We plan to enable these precompiles in future hard forks. The `modexp` precompile is supported but only supports inputs of size less than or equal to 32 bytes (i.e. `u256`). diff --git a/src/content/docs/en/developers/guides/running-a-scroll-node.mdx b/src/content/docs/en/developers/guides/running-a-scroll-node.mdx index b6cc01562..da411f9b6 100644 --- a/src/content/docs/en/developers/guides/running-a-scroll-node.mdx +++ b/src/content/docs/en/developers/guides/running-a-scroll-node.mdx @@ -16,9 +16,9 @@ For most developers, using [our official RPC endpoint](../developer-quickstart#n ### Finding the latest version -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. -{/* TODO: update min required version for mainnet after Bernoulli upgrade, also update mainnet genesis info */} -For the remainder of this guide, `VERSION` will denote the version tag. For example, `scroll-v5.2.0`. +We recommend using the latest release at https://github.com/scroll-tech/go-ethereum/releases. The required version for Scroll Mainnet is `scroll-v5.3.0` or higher, and for Scroll Sepolia it 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. + +For the remainder of this guide, `VERSION` will denote the version tag. For example, `scroll-v5.3.0`. ### Hardware Requirements diff --git a/src/content/docs/en/technology/chain/differences.mdx b/src/content/docs/en/technology/chain/differences.mdx index d0ce1cfdf..ad02ed0a8 100644 --- a/src/content/docs/en/technology/chain/differences.mdx +++ b/src/content/docs/en/technology/chain/differences.mdx @@ -23,7 +23,6 @@ import Aside from "../../../../../components/Aside.astro" | Address | Name | Scroll behavior | | ------- | ------------ | ----------------------------------------------------------------------------------------------- | -| `0x02` | `SHA2-256` | Supported on Scroll Sepolia, and will soon be supported on Scroll Mainnet. | | `0x03` | `RIPEMD-160` | Currently not supported. | | `0x05` | `modexp` | Restrict the input values `B, E, M` to unsigned integers less than $2^{256}$. | | `0x08` | `ecPairing` | The inputs are still multiple of 6 32-byte values, but limit the number of tuples to at most 4. | diff --git a/src/content/docs/en/technology/chain/rollup.mdx b/src/content/docs/en/technology/chain/rollup.mdx index 614076693..33f998c29 100644 --- a/src/content/docs/en/technology/chain/rollup.mdx +++ b/src/content/docs/en/technology/chain/rollup.mdx @@ -121,77 +121,37 @@ At this stage, the state root of the latest finalized batch can be used trustles This section describes the codec of three data structures in the Rollup contract: `BatchHeader`, `Chunk`, and `BlockContext`. -### Scroll Mainnet - #### `BatchHeader` Codec - - | Field | Bytes | Type | Offset | Description | - | ------------------------ | ------- | ----------- | ------ | --------------------------------------------------------------- | - | `version` | 1 | `uint8` | 0 | The batch header version | - | `batchIndex` | 8 | `uint64` | 1 | The index of the batch | - | `l1MessagePopped` | 8 | `uint64` | 9 | The number of L1 messages poped in the batch | - | `totalL1MessagePopped` | 8 | `uint64` | 17 | The number of total L1 messages popped after the batch | - | `dataHash` | 32 | `bytes32` | 25 | The data hash of the batch | - | `parentBatchHash` | 32 | `bytes32` | 57 | The parent batch hash | - | `skippedL1MessageBitmap` | dynamic | `uint256[]` | 89 | A bitmap to indicate which L1 messages are skipped in the batch | - - #### `Chunk` Codec - - | Field | Bytes | Type | Offset | Description | - | ---------------- | ------- | -------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | - | `numBlocks` | 1 | `uint8` | 0 | The number of blocks in the chunk | - | `block[0]` | 60 | `BlockContext` | 1 | The block information of the 1st block | - | ... | ... | ... | ... | ... | - | `block[i]` | 60 | `BlockContext` | `60*i+1` | The block information of `i+1`-th block | - | ... | ... | ... | ... | ... | - | `block[n-1]` | 60 | `BlockContext` | `60*n-59` | The block information of the last block - | `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. | | - - #### `BlockContext` Codec - - | Field | Bytes | Type | Offset | Description | - | ----------------- | ----- | --------- | ------ | ----------------------------------------------------------------------------------- | - | `blockNumber` | 8 | `uint64` | 0 | The block number | - | `timestamp` | 8 | `uint64` | 8 | The block time | - | `baseFee` | 32 | `uint256` | 16 | The base fee of this block. Currently, it is always 0, because we disable EIP-1559. | - | `gasLimit` | 8 | `uint64` | 48 | The gas limit of this block | - | `numTransactions` | 2 | `uint16` | 56 | The number of transactions in this block, including both L1 & L2 txs | - | `numL1Messages` | 2 | `uint16` | 58 | The number of L1 messages in this block - -### Scroll Sepolia - - #### `BatchHeader` Codec - - | Field | Bytes | Type | Offset | Description | - | ------------------------ | ------- | ----------- | ------ | --------------------------------------------------------------- | - | `version` | 1 | `uint8` | 0 | The batch header version | - | `batchIndex` | 8 | `uint64` | 1 | The index of the batch | - | `l1MessagePopped` | 8 | `uint64` | 9 | The number of L1 messages poped in the batch | - | `totalL1MessagePopped` | 8 | `uint64` | 17 | The number of total L1 messages popped after the batch | - | `dataHash` | 32 | `bytes32` | 25 | The data hash of the batch | - | `blobVersionedHash` | 32 | `bytes32` | 57 | The versioned hash of the blob with this batch’s data | - | `parentBatchHash` | 32 | `bytes32` | 89 | The parent batch hash | - | `skippedL1MessageBitmap` | dynamic | `uint256[]` | 121 | A bitmap to indicate which L1 messages are skipped in the batch | - - #### `Chunk` Codec - - | Field | Bytes | Type | Offset | Description | - | ---------------- | ------- | -------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | - | `numBlocks` | 1 | `uint8` | 0 | The number of blocks in the chunk | - | `block[0]` | 60 | `BlockContext` | 1 | The block information of the 1st block | - | ... | ... | ... | ... | ... | - | `block[i]` | 60 | `BlockContext` | `60*i+1` | The block information of `i+1`-th block | - | ... | ... | ... | ... | ... | - | `block[n-1]` | 60 | `BlockContext` | `60*n-59` | The block information of the last block | - - #### `BlockContext` Codec - - | Field | Bytes | Type | Offset | Description | - | ----------------- | ----- | --------- | ------ | ----------------------------------------------------------------------------------- | - | `blockNumber` | 8 | `uint64` | 0 | The block number | - | `timestamp` | 8 | `uint64` | 8 | The block time | - | `baseFee` | 32 | `uint256` | 16 | The base fee of this block. Currently, it is always 0, because we disable EIP-1559. | - | `gasLimit` | 8 | `uint64` | 48 | The gas limit of this block | - | `numTransactions` | 2 | `uint16` | 56 | The number of transactions in this block, including both L1 & L2 txs | - | `numL1Messages` | 2 | `uint16` | 58 | The number of L1 messages in this block - - +#### `BatchHeader` Codec + +| Field | Bytes | Type | Offset | Description | +| ------------------------ | ------- | ----------- | ------ | --------------------------------------------------------------- | +| `version` | 1 | `uint8` | 0 | The batch header version | +| `batchIndex` | 8 | `uint64` | 1 | The index of the batch | +| `l1MessagePopped` | 8 | `uint64` | 9 | The number of L1 messages poped in the batch | +| `totalL1MessagePopped` | 8 | `uint64` | 17 | The number of total L1 messages popped after the batch | +| `dataHash` | 32 | `bytes32` | 25 | The data hash of the batch | +| `blobVersionedHash` | 32 | `bytes32` | 57 | The versioned hash of the blob with this batch’s data | +| `parentBatchHash` | 32 | `bytes32` | 89 | The parent batch hash | +| `skippedL1MessageBitmap` | dynamic | `uint256[]` | 121 | A bitmap to indicate which L1 messages are skipped in the batch | + +#### `Chunk` Codec + +| Field | Bytes | Type | Offset | Description | +| ---------------- | ------- | -------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | +| `numBlocks` | 1 | `uint8` | 0 | The number of blocks in the chunk | +| `block[0]` | 60 | `BlockContext` | 1 | The block information of the 1st block | +| ... | ... | ... | ... | ... | +| `block[i]` | 60 | `BlockContext` | `60*i+1` | The block information of `i+1`-th block | +| ... | ... | ... | ... | ... | +| `block[n-1]` | 60 | `BlockContext` | `60*n-59` | The block information of the last block | + +#### `BlockContext` Codec + +| Field | Bytes | Type | Offset | Description | +| ----------------- | ----- | --------- | ------ | ----------------------------------------------------------------------------------- | +| `blockNumber` | 8 | `uint64` | 0 | The block number | +| `timestamp` | 8 | `uint64` | 8 | The block time | +| `baseFee` | 32 | `uint256` | 16 | The base fee of this block. Currently, it is always 0, because we disable EIP-1559. | +| `gasLimit` | 8 | `uint64` | 48 | The gas limit of this block | +| `numTransactions` | 2 | `uint16` | 56 | The number of transactions in this block, including both L1 & L2 txs | +| `numL1Messages` | 2 | `uint16` | 58 | The number of L1 messages in this block diff --git a/src/content/docs/en/technology/overview/scroll-upgrades.mdx b/src/content/docs/en/technology/overview/scroll-upgrades.mdx index 08956ca86..081073293 100644 --- a/src/content/docs/en/technology/overview/scroll-upgrades.mdx +++ b/src/content/docs/en/technology/overview/scroll-upgrades.mdx @@ -37,22 +37,24 @@ This upgrade features a significant reduction in transaction costs by introducin #### Contract changes -The contract changes for this upgrade are in [this PR](https://github.com/scroll-tech/scroll/pull/1179). +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: -{/* As well as the audit fixes listed here [TODO] */} +- `ScrollChain` now accepts batches with either calldata or blob encoding in `commitBatch`. +- `ScrollChain` now supports finalizing blob-encoded batches through `finalizeBatchWithProof4844`. +- `MultipleVersionRollupVerifier` can now manage different on-chain verifiers for each batch encoding version. #### Node changes -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. +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. -{/* #### Prover changes +#### ZKEVM circuit changes -[TODO] +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. #### Audits -- OpenZeppelin [TODO] -- TrailofBits [TODO] */} +- OpenZeppelin [https://blog.openzeppelin.com/scroll-eip-4844-support-audit] +- TrailofBits (will be posted soon) ### Compatibility @@ -72,6 +74,7 @@ This upgrade changes the format that Scroll uses to publish data to Ethereum. Pr 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. + ## Bridge Upgrade ### Overview From b1d93b42677faf3442d4d672b941460e209dec9c Mon Sep 17 00:00:00 2001 From: isabelle Date: Wed, 24 Apr 2024 17:52:11 -0400 Subject: [PATCH 3/7] fix typo --- src/content/docs/en/developers/transaction-fees-on-scroll.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/docs/en/developers/transaction-fees-on-scroll.mdx b/src/content/docs/en/developers/transaction-fees-on-scroll.mdx index ec14b7528..31785a135 100644 --- a/src/content/docs/en/developers/transaction-fees-on-scroll.mdx +++ b/src/content/docs/en/developers/transaction-fees-on-scroll.mdx @@ -178,7 +178,7 @@ On Sepolia, an upgraded `L1MessageQueueWithGasPriceOracle` should be used, deplo If your system supports off-chain mechanisms, you can also call `eth_estimateGas` and `eth_gasPrice` on any Scroll RPC node to get an estimate of the gas required for a given transaction.