Preparing for Pectra breaking changes
This page outlines breaking changes related to the Ethereum Pectra (Prague-Electra) hard fork for chain operators and node operators on OP Stack chains. The OP Stack is dividing the Pectra upgrade into two parts:
- Make the necessary upgrades to make sure OP Stack chains do not break when the L1 Pectra upgrade activates. We will release new versions of the OP Stack to ensure that OP Stack chains remain functional after the L1 Pectra upgrade. If you're running a fault proof enabled chain, you will need to follow additional steps outlined below.
- Upgrade OP Stack chains to support Pectra's new features that apply to L2s. We will implement all the features of Pectra that apply to L2s and will release a new version of the OP Stack that includes these features. We will provide more information as engineering work wraps up. We are tracking the spec work in this issue (opens in a new tab). The upcoming Isthmus hardfork will contain all Prague features, you can track our progress in this project board (opens in a new tab).
If you experience difficulty at any stage of this process, please reach out to developer support (opens in a new tab).
This page will be updated continuously with information on upgrade runbooks and timelines as they come. Here's the tentative L1 Pectra hard fork times per the ACDC that happened on Feb 6th:
L1 Client testnet releases out by Feb 13 (ACDE):
- Holesky slot:
1740434112
(Mon, Feb 24 at 21:55:12 UTC) - Sepolia slot:
1741159776
(Wed, Mar 5 at 07:29:36 UTC) - +30 day mainnet slot:
1744154711
(Tue, Apr 8 at 23:25:11 UTC)
What's included in Pectra?
Pectra contains a variety of EIPs, some of which apply to the OP Stack; others do not. The following EIPs are included in Pectra as outlined in the Pectra Devnet 5 notes (opens in a new tab):
- EIP-2537: Precompile for BLS12-381 curve operations (opens in a new tab)
- EIP-2935: Save historical block hashes in state (opens in a new tab)
- EIP-6110: Supply validator deposits on chain (opens in a new tab)
- EIP-7002: Execution layer triggerable withdrawals (opens in a new tab)
- EIP-7251: Increase the MAX_EFFECTIVE_BALANCE (opens in a new tab)
- EIP-7549: Move committee index outside Attestation (opens in a new tab)
- EIP-7623: Increase calldata cost (opens in a new tab)
- EIP-7685: General purpose execution layer requests (opens in a new tab)
- EIP-7691: Blob throughput increase (opens in a new tab)
- EIP-7702: Set EOA account code (opens in a new tab)
- EIP-7840: Add blob schedule to EL config files (opens in a new tab)
For node operators
Node operators will need to upgrade to the respective releases before the activation dates.These following steps are necessary for every node operator:
Update to the latest release
Full node operators, meaning those who are running op-geth with gc-mode=full
, will need to reference the op-geth v1.101411.8
release notes (opens in a new tab) to handle an intermediate upgrade step before upgrading to the latest release. Archive node operators, gc-mode=archive
, can skip this step and upgrade directly to the latest release.
op-node
atv1.11.1
(opens in a new tab)op-geth
atv1.101500.0
(opens in a new tab)op-reth
atv1.1.5
(opens in a new tab) also includes L1 Pectra support.
For chain operators
The following sections are how chain operators can prepare the first part of the OP Stack's Pectra L1 support. This ensures OP Stack chains do not break when the L1 Pectra upgrade activates. Every chain operator will need to:
Update your node binaries
Follow the guidance outlined in the Node Operator section to update your nodes to the latest releases.
Update your batcher
Then update your batcher to op-batcher/v1.11.1
(opens in a new tab).
For fault proof enabled chains
The following instructions assume your chain is on the latest contract release op-contracts/v1.8.0
and has Holocene activated.
The following steps are to update your absolute prestate with new dispute game contracts. This is absolutely necessary for chains running permissionless fault proofs. For chains running the Fault Proof System with permissioned games you can skip this section because games will not be played out and the absolute prestate is not used.
The Pectra upgrade changes the derivation rules, permissionless fault proof chains need to upgrade the op-program
version used in the fault proof system to support these changes. The op-program
version used is specified via the faultGameAbsolutePrestate
setting, deployed as part of FaultDisputeGame
and PermissionedDisputeGame
contracts.
Update your op-challenger
Update your op-challenger
binary to op-challenger/v1.3.1
(opens in a new tab).
Verify the new absolute prestate
The absolute prestate is generated with the op-program/v1.5.0-rc.2 (opens in a new tab). You can use this new absolute prestate (0x035ac388b5cb22acf52a2063cfde108d09b1888655d21f02f595f9c3ea6cbdcd
) for the following chains:
- Sepolia: Base, OP, Metal, Mode, Zora, Ethernity, Unichain, Ink, Minato (Soneium)
- Mainnet: Base, OP, Orderly, Lyra, Metal, Mode, Zora, Lisk, Ethernity, Binary, Ink, Unichain, Soneium
You can verify this absolute prestate by running the following command (opens in a new tab) in the root of the monorepo on the op-program/v1.5.0-rc.2
tag:
make reproducible-prestate
You should expect the following output at the end of the command:
Cannon Absolute prestate hash:
0x035ac388b5cb22acf52a2063cfde108d09b1888655d21f02f595f9c3ea6cbdcd
Cannon64 Absolute prestate hash:
0x03a7d967025dc434a9ca65154acdb88a7b658147b9b049f0b2f5ecfb9179b0fe
CannonInterop Absolute prestate hash:
0x0379d61de1833af6766f07b4ed931d85b3f6282508bbcbf9f4637398d97b61c1
Upload your new preimage file
During the previous step, you also generated the preimage of the absolute prestate, which is basically the op-program serialized into a binary file. You'll find that new file at optimism/op-program/bin/prestate.bin.gz
. Rename that file to have the absolute prestate hash as the filename so it looks like 0x035ac388b5cb22acf52a2063cfde108d09b1888655d21f02f595f9c3ea6cbdcd.bin.gz
.
Upload that file to where you're storing your other absolute preimage files. This should be the location where you're pointing your --cannon-prestates-url
at. The op-challenger
will grab this file and use it when it needs to challenge games.
Deploy new dispute game contracts
You will then take the absolute prestate and deploy new FaultDisputeGame
and PermissionedDisputeGame
contracts with that value. You can reuse the Holocene script (opens in a new tab) to deploy the new contracts. The only change you will need to make is to update the absolutePrestate
value in your deploy-config (opens in a new tab). Alternatively we will be releasing an OPPrestateUpdater
that can be used to deploy the new contracts.
Update the DisputeGameFactory
You will then need to update the DisputeGameFactory
to point to the new FaultDisputeGame
and PermissionedDisputeGame
contracts by calling DisputeGameFactory.setImplementation
. You can utilize this template (opens in a new tab) to generate the transaction and validation script for this step. Before executing, you will need to update your op-challenger.
Execute the upgrade
Once your op-challenger
is ready with the new preimage, you can execute the "Set Dispute Game Implementation" transaction. Please simulate and validate that the expected output prior to executing the transaction.
For OP Stack forks
We are working on a PR that will include the ability to sync L1 after the Pectra upgrade. The commits from the new node releases will need to be applied to your chain before Pectra goes live on L1. We will provide a link to the PR after it is complete.