diff --git a/src/content/docs/en/developers/developer-quickstart.mdx b/src/content/docs/en/developers/developer-quickstart.mdx index a87acf6a1..3da6c8786 100644 --- a/src/content/docs/en/developers/developer-quickstart.mdx +++ b/src/content/docs/en/developers/developer-quickstart.mdx @@ -83,6 +83,10 @@ Use the table below to configure your Ethereum tools to the Scroll Sepolia Testn Contracts](/developers/verifying-smart-contracts). + + ### Hardhat Modify your Hardhat config file `hardhat.config.ts` to point at the Scroll Sepolia Testnet public RPC. 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 dd57485c5..c7ffa3a78 100644 --- a/src/content/docs/en/developers/ethereum-and-scroll-differences.mdx +++ b/src/content/docs/en/developers/ethereum-and-scroll-differences.mdx @@ -20,6 +20,7 @@ For open-source contributors and infrastructure builders, please contact our tea ## EVM Opcodes + | Opcode | Solidity equivalent | Scroll Behavior | | --------------------------- | ------------------- | ---------------------------------------------------------------------------------------------------------- | | `BLOCKHASH` | `block.blockhash` | Returns `keccak(chain_id \|\| block_number)` for the last 256 blocks. | @@ -28,12 +29,16 @@ For open-source contributors and infrastructure builders, please contact our tea | `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] | + + [^eip1559]: We have currently disabled EIP-1559 on Scroll. [^willadpot]: Will change to adopt Ethereum’s solution in the future. ## EVM Precompiles -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. +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 `modexp` precompile is supported but only supports inputs of size less than or equal to 32 bytes (i.e. `u256`). @@ -41,6 +46,21 @@ The `ecPairing` precompile is supported, but the number of points(sets, pairs) i The other EVM precompiles are all supported: `ecRecover`, `identity`, `ecAdd`, `ecMul`. +### Precompile Limits + +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). + +| Precompile / Opcode | Limit | +| ------------------- | ----- | +| `keccak256` | 3157 | +| `ecRecover` | 119 | +| `modexp` | 23 | +| `ecAdd` | 50 | +| `ecMul` | 50 | +| `ecPairing` | 2 | +{/* TODO: Add SHA256 after upgrade */} + + ## State Account ### **Additional Fields** diff --git a/src/content/docs/en/technology/chain/differences.mdx b/src/content/docs/en/technology/chain/differences.mdx index 80cd13b78..d0ce1cfdf 100644 --- a/src/content/docs/en/technology/chain/differences.mdx +++ b/src/content/docs/en/technology/chain/differences.mdx @@ -7,6 +7,8 @@ permalink: "technology/chain/differences" whatsnext: { "Bridge": "/en/technology/bridge/cross-domain-messaging/" } --- +import Aside from "../../../../../components/Aside.astro" + ## Opcodes | Opcode | Scroll Behavior | @@ -26,6 +28,7 @@ whatsnext: { "Bridge": "/en/technology/bridge/cross-domain-messaging/" } | `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. | | `0x09` | `blake2f` | Currently not supported. | +| `0x0a` | `point evaluation` | Currently not supported. | 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. @@ -44,3 +47,8 @@ EIPs imported from the Shanghai fork: - [EIP-3651](https://eips.ethereum.org/EIPS/eip-3651): Warm `COINBASE` - [EIP-3855](https://eips.ethereum.org/EIPS/eip-3855): `PUSH0` instruction - [EIP-3860](https://eips.ethereum.org/EIPS/eip-3860): Limit and meter initcode + + +