Skip to content

Commit 278f61a

Browse files
authored
Merge pull request #216 from scroll-tech/update/post-dencun-clarification
Adds dencun / cancun info and precompile limits
2 parents 79c690e + 7f258ce commit 278f61a

File tree

3 files changed

+33
-1
lines changed

3 files changed

+33
-1
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,10 @@ Use the table below to configure your Ethereum tools to the Scroll Sepolia Testn
8383
Contracts](/developers/verifying-smart-contracts).
8484
</Aside>
8585

86+
<Aside type="danger" title="">
87+
Features from the Dencun upgrade are not yet available on Scroll. Please use `shanghai` as your EVM target and avoid using a Solidity version higher than `0.8.23`.
88+
</Aside>
89+
8690
### Hardhat
8791

8892
Modify your Hardhat config file `hardhat.config.ts` to point at the Scroll Sepolia Testnet public RPC.

src/content/docs/en/developers/ethereum-and-scroll-differences.mdx

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ For open-source contributors and infrastructure builders, please contact our tea
2020

2121
## EVM Opcodes
2222

23+
2324
| Opcode | Solidity equivalent | Scroll Behavior |
2425
| --------------------------- | ------------------- | ---------------------------------------------------------------------------------------------------------- |
2526
| `BLOCKHASH` | `block.blockhash` | Returns `keccak(chain_id \|\| block_number)` for the last 256 blocks. |
@@ -28,19 +29,38 @@ For open-source contributors and infrastructure builders, please contact our tea
2829
| `BASEFEE` | `block.basefee` | Disabled.[^eip1559] If the opcode is encountered, the transaction will be reverted. |
2930
| `SELFDESTRUCT` | `selfdestruct` | Disabled. If the opcode is encountered, the transaction will be reverted.[^willadpot] |
3031

32+
<Aside type="caution" title="">
33+
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`.
34+
</Aside>
35+
3136
[^eip1559]: We have currently disabled EIP-1559 on Scroll.
3237
[^willadpot]: Will change to adopt Ethereum’s solution in the future.
3338

3439
## EVM Precompiles
3540

36-
The `RIPEMD-160` (address `0x3`) and `blake2f` (address `0x9`) 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.
41+
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.
3742

3843
The `modexp` precompile is supported but only supports inputs of size less than or equal to 32 bytes (i.e. `u256`).
3944

4045
The `ecPairing` precompile is supported, but the number of points(sets, pairs) is limited to 4, instead of 6.
4146

4247
The other EVM precompiles are all supported: `ecRecover`, `identity`, `ecAdd`, `ecMul`.
4348

49+
### Precompile Limits
50+
51+
Because of a bounded size of the zkEVM circuits, there is an upper limit on the number of calls that can be made for some precompiles. These transactions will not revert, but simply be skipped by the sequencer if they cannot fit into the space of the circuit. Read more about the [Circuit Capacity Checker](/en/technology/sequencer/execution-node#circuit-capacity-checker).
52+
53+
| Precompile / Opcode | Limit |
54+
| ------------------- | ----- |
55+
| `keccak256` | 3157 |
56+
| `ecRecover` | 119 |
57+
| `modexp` | 23 |
58+
| `ecAdd` | 50 |
59+
| `ecMul` | 50 |
60+
| `ecPairing` | 2 |
61+
{/* TODO: Add SHA256 after upgrade */}
62+
63+
4464
## State Account
4565

4666
### **Additional Fields**

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ permalink: "technology/chain/differences"
77
whatsnext: { "Bridge": "/en/technology/bridge/cross-domain-messaging/" }
88
---
99

10+
import Aside from "../../../../../components/Aside.astro"
11+
1012
## Opcodes
1113

1214
| Opcode | Scroll Behavior |
@@ -26,6 +28,7 @@ whatsnext: { "Bridge": "/en/technology/bridge/cross-domain-messaging/" }
2628
| `0x05` | `modexp` | Restrict the input values `B, E, M` to unsigned integers less than $2^{256}$. |
2729
| `0x08` | `ecPairing` | The inputs are still multiple of 6 32-byte values, but limit the number of tuples to at most 4. |
2830
| `0x09` | `blake2f` | Currently not supported. |
31+
| `0x0a` | `point evaluation` | Currently not supported. |
2932

3033
The remaining precompiled contracts have the same behavior as Ethereum. However, their maximum usage within a block is constrained by a limit tied to the zkEVM circuit capacity.
3134

@@ -44,3 +47,8 @@ EIPs imported from the Shanghai fork:
4447
- [EIP-3651](https://eips.ethereum.org/EIPS/eip-3651): Warm `COINBASE`
4548
- [EIP-3855](https://eips.ethereum.org/EIPS/eip-3855): `PUSH0` instruction
4649
- [EIP-3860](https://eips.ethereum.org/EIPS/eip-3860): Limit and meter initcode
50+
51+
52+
<Aside type="tip" title="">
53+
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.
54+
</Aside>

0 commit comments

Comments
 (0)