Skip to content

Commit

Permalink
update info on opcodes
Browse files Browse the repository at this point in the history
  • Loading branch information
isabellewei committed Jul 10, 2024
1 parent af03e20 commit 31da4f0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ For open-source contributors and infrastructure builders, please contact our tea
| `BLOCKHASH` | `block.blockhash` | Returns `keccak(chain_id \|\| block_number)` for the last 256 blocks. |
| `COINBASE` | `block.coinbase` | Returns the pre-deployed fee vault contract address. See [Scroll Contracts](/developers/scroll-contracts). |
| `DIFFICULTY` / `PREVRANDAO` | `block.difficulty` | Returns 0. |
| `BASEFEE` | `block.basefee` | Disabled.[^eip1559] If the opcode is encountered, the transaction will be reverted. |
| `SELFDESTRUCT` | `selfdestruct` | Disabled. If the opcode is encountered, the transaction will be reverted.[^willadpot] |

<Aside type="caution" title="">
Opcodes from the Cancun upgrade are not yet available on Scroll, including `MCOPY`, `TSTORE`, `TLOAD`, `BLOBHASH` and `BLOBBASEFEE`. Additionally, [EIP-4788](https://eips.ethereum.org/EIPS/eip-4788) for accessing the Beacon Chain block root is not supported. We recommend using `shanghai` as your EVM target and avoiding using a Solidity version higher than `0.8.23`.
Opcodes related to EIP-4844, like `BLOBHASH` and `BLOBBASEFEE`, are not yet available on Scroll. Additionally, [EIP-4788](https://eips.ethereum.org/EIPS/eip-4788) for accessing the Beacon Chain block root is not supported.
</Aside>

[^eip1559]: We have currently disabled EIP-1559 on Scroll.
We support the `cancun` EVM target and the latest Solidity version `0.8.26`.

[^willadpot]: Will change to adopt Ethereum’s solution in the future.

## EVM Precompiles
Expand Down Expand Up @@ -91,12 +91,7 @@ When verifying `EXTCODESIZE`, it is expensive to load the whole contract data in

## Block Time

Scroll aims for a constant block time of 3 seconds. This is shorter and more consistent than the 12 seconds used in the Ethereum under ideal conditions.

This was chosen for two reasons:

- Having faster, constant block time results in quicker feedback and a better user experience.
- As we optimize the zkEVM circuits in our testnets, even if we maintain a smaller gas limit per block or batch, we can still reach higher throughput than Ethereum.
To improve the throughput of the Scroll chain, we introduced a dynamic block time in our [Curie upgrade](/technology/overview/scroll-upgrades#curie-upgrade). During the congestion period, a block will be sealed once the transactions in the block reach the circuit limit instead of waiting for the 3-second interval. During normal hours, blocks will still be sealed at 3-second interval to ensure a consistent user experience.

## Transaction Ordering

Expand Down
8 changes: 3 additions & 5 deletions src/content/docs/en/technology/chain/differences.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import Aside from "../../../../../components/Aside.astro"
| `BLOCKHASH` | Returns `keccak(chain_id \|\| block_number)` for the last 256 blocks. |
| `COINBASE` | Returns the fee vault address (predeployed contract `0x5300000000000000000000000000000000000005`). |
| `DIFFICULTY` / `PREVRANDAO` | Always return 0. |
| `BASEFEE` | Disabled because currently we disabled EIP-1559. If the opcode is encountered, the transaction will be reverted. |
| `SELFDESTRUCT` | Disabled. If the opcode is encountered, the transaction will be reverted. |

## Precompiled Contracts
Expand All @@ -39,7 +38,6 @@ Disabled EIPs until the London fork:

- [EIP-1559](https://eips.ethereum.org/EIPS/eip-1559): Fee market change and EIP-1559 transaction type
- [EIP-2930](https://eips.ethereum.org/EIPS/eip-2930): Optional access lists
- [EIP-3198](https://eips.ethereum.org/EIPS/eip-3198): `BASEFEE` opcode

EIPs imported from the Shanghai fork:

Expand All @@ -48,6 +46,6 @@ EIPs imported from the Shanghai fork:
- [EIP-3860](https://eips.ethereum.org/EIPS/eip-3860): Limit and meter initcode


<Aside type="tip" title="">
Opcodes from the Cancun upgrade are not yet available on Scroll, including `MCOPY`, `TSTORE`, `TLOAD`, `BLOBHASH` and `BLOBBASEFEE`. Additionally, [EIP-4788](https://eips.ethereum.org/EIPS/eip-4788) for accessing the Beacon Chain block root is not supported.
</Aside>
<Aside type="caution" title="">
Opcodes related to EIP-4844, like `BLOBHASH` and `BLOBBASEFEE`, are not yet available on Scroll. Additionally, [EIP-4788](https://eips.ethereum.org/EIPS/eip-4788) for accessing the Beacon Chain block root is not supported.
</Aside>

0 comments on commit 31da4f0

Please sign in to comment.