Skip to content

Update prod for Bernoulli on mainnet #240

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Apr 29, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -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`).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ For most developers, using [our official RPC endpoint](/en/developers/developer-

### 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

Expand Down
30 changes: 30 additions & 0 deletions src/content/docs/en/developers/scroll-contracts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,21 @@ Use the table below to configure your Ethereum tools to the Scroll mainnet.
- v3StakerAddress: [`0xFdFbE973c9ecB036Ecfb7af697FcACe789D3f928`](https://scrollscan.com/address/0xFdFbE973c9ecB036Ecfb7af697FcACe789D3f928)
- quoterV2Address: [`0x2566e082Cb1656d22BCbe5644F5b997D194b5299`](https://scrollscan.com/address/0x2566e082Cb1656d22BCbe5644F5b997D194b5299)

### Safe

You can access Safe on Scroll [here](https://safe.scroll.xyz/), and the transaction service API is at https://transaction.safe.scroll.xyz.

- CompatibilityFallbackHandler: [`0xf48f2B2d2a534e402487b3ee7C18c33Aec0Fe5e4`](https://scrollscan.com/address/0xf48f2B2d2a534e402487b3ee7C18c33Aec0Fe5e4)
- CreateCall: [`0x7cbB62EaA69F79e6873cD1ecB2392971036cFAa4`](https://scrollscan.com/address/0x7cbB62EaA69F79e6873cD1ecB2392971036cFAa4)
- DefaultCallbackHandler: [`0x1AC114C2099aFAf5261731655Dc6c306bFcd4Dbd`](https://scrollscan.com/address/0x1AC114C2099aFAf5261731655Dc6c306bFcd4Dbd)
- GnosisSafe: [`0xd9Db270c1B5E3Bd161E8c8503c55cEABeE709552`](https://scrollscan.com/address/0xd9Db270c1B5E3Bd161E8c8503c55cEABeE709552)
- GnosisSafeL2: [`0x3E5c63644E683549055b9Be8653de26E0B4CD36E`](https://scrollscan.com/address/0x3E5c63644E683549055b9Be8653de26E0B4CD36E)
- GnosisSafeProxyFactory: [`0xa6B71E26C5e0845f74c812102Ca7114b6a896AB2`](https://scrollscan.com/address/0xa6B71E26C5e0845f74c812102Ca7114b6a896AB2)
- MultiSend: [`0xA238CBeb142c10Ef7Ad8442C6D1f9E89e07e7761`](https://scrollscan.com/address/0xA238CBeb142c10Ef7Ad8442C6D1f9E89e07e7761)
- MultiSendCallOnly: [`0x40A2aCCbd92BCA938b02010E17A5b8929b49130D`](https://scrollscan.com/address/0x40A2aCCbd92BCA938b02010E17A5b8929b49130D)
- SignMessageLib: [`0xA65387F16B013cf2Af4605Ad8aA5ec25a2cbA3a2`](https://scrollscan.com/address/0xA65387F16B013cf2Af4605Ad8aA5ec25a2cbA3a2)
- SimulateTxAccessor: [`0x59AD6735bCd8152B84860Cb256dD9e96b85F69Da`](https://scrollscan.com/address/0x59AD6735bCd8152B84860Cb256dD9e96b85F69Da)

#### Ethereum Attestation Service (EAS)

- EAS: [`0xC47300428b6AD2c7D03BB76D05A176058b47E6B0`](https://scrollscan.com/address/0xC47300428b6AD2c7D03BB76D05A176058b47E6B0)
Expand Down Expand Up @@ -224,6 +239,21 @@ See this [Github gist](https://gist.github.com/dghelm/7fe68f0a524f30846e1142721c
- EIP712Proxy: [`0xB3574f76b1720E61FdA98702c7016674CD6Eaa7b`](https://sepolia.scrollscan.com/address/0xB3574f76b1720E61FdA98702c7016674CD6Eaa7b)
- Indexer: [`0x7C2cb1eDC328491da52de2a0afc44D3B0Ae7ee17`](https://sepolia.scrollscan.com/address/0x7C2cb1eDC328491da52de2a0afc44D3B0Ae7ee17)

### Safe

You can access Safe on Scroll [here](https://safe.scroll.xyz/), and the transaction service API is at https://transaction-sepolia.safe.scroll.xyz.

- CompatibilityFallbackHandler: [`0xf48f2B2d2a534e402487b3ee7C18c33Aec0Fe5e4`](https://sepolia.scrollscan.com/address/0xf48f2B2d2a534e402487b3ee7C18c33Aec0Fe5e4)
- CreateCall: [`0x7cbB62EaA69F79e6873cD1ecB2392971036cFAa4`](https://sepolia.scrollscan.com/address/0x7cbB62EaA69F79e6873cD1ecB2392971036cFAa4)
- DefaultCallbackHandler: [`0x1AC114C2099aFAf5261731655Dc6c306bFcd4Dbd`](https://sepolia.scrollscan.com/address/0x1AC114C2099aFAf5261731655Dc6c306bFcd4Dbd)
- GnosisSafe: [`0xd9Db270c1B5E3Bd161E8c8503c55cEABeE709552`](https://sepolia.scrollscan.com/address/0xd9Db270c1B5E3Bd161E8c8503c55cEABeE709552)
- GnosisSafeL2: [`0x3E5c63644E683549055b9Be8653de26E0B4CD36E`](https://sepolia.scrollscan.com/address/0x3E5c63644E683549055b9Be8653de26E0B4CD36E)
- GnosisSafeProxyFactory: [`0xa6B71E26C5e0845f74c812102Ca7114b6a896AB2`](https://sepolia.scrollscan.com/address/0xa6B71E26C5e0845f74c812102Ca7114b6a896AB2)
- MultiSend: [`0xA238CBeb142c10Ef7Ad8442C6D1f9E89e07e7761`](https://sepolia.scrollscan.com/address/0xA238CBeb142c10Ef7Ad8442C6D1f9E89e07e7761)
- MultiSendCallOnly: [`0x40A2aCCbd92BCA938b02010E17A5b8929b49130D`](https://sepolia.scrollscan.com/address/0x40A2aCCbd92BCA938b02010E17A5b8929b49130D)
- SignMessageLib: [`0xA65387F16B013cf2Af4605Ad8aA5ec25a2cbA3a2`](https://sepolia.scrollscan.com/address/0xA65387F16B013cf2Af4605Ad8aA5ec25a2cbA3a2)
- SimulateTxAccessor: [`0x59AD6735bCd8152B84860Cb256dD9e96b85F69Da`](https://sepolia.scrollscan.com/address/0x59AD6735bCd8152B84860Cb256dD9e96b85F69Da)

### Additional Useful Contracts

- Multicall3: [`0xcA11bde05977b3631167028862bE2a173976CA11`](https://sepolia.scrollscan.com/address/0xcA11bde05977b3631167028862bE2a173976CA11)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.

<Aside type="danger" title="Upgrade Notice">
After the February 2024 Bridge Upgrade, `L1GasPriceOracle` will be deprecated in favor of `L1MessageQueueWithGasPriceOracle`, which will be available at [`0x0d7E906BD9cAFa154b048cFa766Cc1E54E39AF9B`](https://etherscan.io/address/0x0d7E906BD9cAFa154b048cFa766Cc1E54E39AF9B).
After the February 2024 Bridge Upgrade, `L2GasPriceOracle` will be deprecated in favor of `L1MessageQueueWithGasPriceOracle`, which will be available at [`0x0d7E906BD9cAFa154b048cFa766Cc1E54E39AF9B`](https://etherscan.io/address/0x0d7E906BD9cAFa154b048cFa766Cc1E54E39AF9B).

The upgrade is expected to be finalized on February 21, 2024, after a two-week timelock. Scroll Sepolia has already undergone this upgrade. Read more [here](https://scroll.io/blog/protocol-upgrade-bridging-cost-reduction).

Expand Down
1 change: 0 additions & 1 deletion src/content/docs/en/technology/chain/differences.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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. |
Expand Down
32 changes: 16 additions & 16 deletions src/content/docs/en/technology/chain/rollup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ chunk.dataHash := keccak(blockContext[0] || ... || blockContext[k-1] ||

, 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).

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 a 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.
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.

## Finalize Transaction

Expand Down Expand Up @@ -121,18 +121,22 @@ 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
The latest update to the codec was introduced in the Bernoulli upgrade.

### Bernoulli

#### `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 |
| `l1MessagePopped` | 8 | `uint64` | 9 | The number of L1 messages popped 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 |
| `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

Expand All @@ -143,8 +147,7 @@ This section describes the codec of three data structures in the Rollup contract
| ... | ... | ... | ... | ... |
| `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. | |
| `block[n-1]` | 60 | `BlockContext` | `60*n-59` | The block information of the last block |

#### `BlockContext` Codec

Expand All @@ -157,20 +160,18 @@ This section describes the codec of three data structures in the Rollup contract
| `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

### Archimedes
#### `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 |
| `l1MessagePopped` | 8 | `uint64` | 9 | The number of L1 messages popped 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 |
| `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

Expand All @@ -181,7 +182,8 @@ This section describes the codec of three data structures in the Rollup contract
| ... | ... | ... | ... | ... |
| `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 |
| `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

Expand All @@ -193,5 +195,3 @@ This section describes the codec of three data structures in the Rollup contract
| `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


Loading