Executive Summary
Hi I’m Roberto, an engineer at Coinbase working on the Base blockchain, and a core developer of the OP Stack. I reviewed this proposal in collaboration with Sebastian Stammler and Dragan Zurzin from the OP labs team.
Neither Coinbase nor I represent or speak on behalf of the Optimism Foundation.
This is a proposal for the Fjord network upgrade, which includes the EIP-7212 precompile to reduce gas costs of many smart wallet applications, supports Brotli batch compression for ~5-15% lower data availability costs, and improves the robustness of L1 data pricing. The upgrade also increases and hardcodes the max-sequencer-drift parameter, giving chain operators more time to respond to L1 node issues without facing a potential L2 chain halt.
Specifications
Technical Specification
We propose the Fjord network upgrade (spec overview), which activates:
- RIP-7212: Precompile for secp256r1 Curve Support (spec)
- Brotli as a channel compression option (spec)
- FastLZ based L1 data availability cost calculation (spec), including an upgraded
GasPriceOracle
L2 predeploy to compute it (spec). - Parameter changes:
- The Fjord hardfork activation block, which includes several transactions to perform all L2 contract deployments, upgrades, enablements, and proxy updates. (spec)
The upgrade also updates and deprecates:
getL1GasUsed
method of theGasPriceOracle
contract (spec)L1GasUsed
field of the transaction receipt (spec)
Security Considerations
Consistent with the OP Labs Audit Framework, we did not have the contents of Fjord audited; however, Coinbase and OP Labs engineers did perform a security review of these changes.
The Fjord upgrade’s inclusion of EIP-7212 involves use of the reference implementation that is already live on other blockchains, which we consider low risk.
Brotli compression is also a low-risk change since it is already used by other L2s and was evaluated for both its runtime performance and compression improvements across four different OP-stack chains. It’s usage is also optional and must be activated by the chain operator after the upgrade in order to be applied.
The introduction of the new L1 data fee cost function required updates to the GasPriceOracle L2 predeploy, and changes op-geth to compute the fee values. The contract extension allows developers to continue using the GasPriceOracle to compute the data fee, and affects only helper functions that are outside of consensus. We extensively evaluated the accuracy of this new function compared to multiple variants as well as the previous one across various timeslices of OP mainnet and Base mainnet transactions (analysis repo). The new function consistently produced significant improvements in mean-squared-error and mean-absolute-error across each, and we were unable to find any instances where the new function could wildly diverge from ground truth. (We computed ground truth by putting the transaction in a simulated batch, compressing the entire batch with Brotli-10, and returning the number of bytes occupied by the transaction in the result.) Bugs in the op-geth computation might still lead to under/over payment for L1 data fees by users. Significant underpayment could result in revenue loss for the chain operator, but the system provides parameters that can be updated quickly via the SystemConfig in order to quickly compensate for such scenarios. Overall we feel this change remains low risk.
Similar to the previous upgrade, Fjord uses a special upgrade block to perform the contract deployment and activation on the L2. Bugs in this code could lead to an incomplete fork with missing contracts or contract functionality expected by the upgrade, in the worst case leading to chain halt. Since this approach to automating the upgrade has been used successfully in the past, we consider this low risk.
Security considerations for the parameter changes are discussed in the upgrade specification here and here. These changes are also straightforward and we consider them low risk.
Impact Summary
We do not anticipate any downtime due to this upgrade.
Bringing EIP-7212 to the OP stack will benefit applications such as smart wallets that want to support many common authentication methods (such as Apple’s FaceID) that would otherwise be too gas intensive.
We evaluated Brotli compression compared to the previous compression algorithm (zlib) on 4 OP stack chains (OP mainnet, Base, Zora, and Mode) and found compression ratio improvements ranging from 5-15% under Brotli quality level 10. This will directly translate to a 5-15% reduction in L1 data availability costs, so we expect most chains will want to activate this feature immediately following the upgrade.
The FastLZ based L1 data fee function will more accurately charge for L1 data usage on a per transaction basis. Previously, highly incompressible transactions might be undercharged for L1 data usage, and a large number of such transactions might lead to an inability to recover revenue without the chain operator having to take action by re-tuning fee parameters. We expect this new function to far more accurately detect the (lack of) compressibility of each individual transaction and reduce the chance of revenue recovery drifting from its intended target.
The main impact of the parameter changes is that chain operators will have more time to respond to L1 node outage issues before the L2 chain stalls (30 minutes instead of 10 minutes).
Action Plan for this release
If this vote passes, the Fjord upgrade will be scheduled for execution on July 10th at 16:00:01 UTC. The upgrade will occur automatically for nodes on a release which contains the baked in activation time. Fjord is code complete in the optimism monorepo at commit f8143c8cbc4cc0c83922c53f17a1e47280673485
and op-geth at commit 7c2819836018bfe0ca07c4e4955754834ffad4e0
. The op-node release v1.7.7 and op-geth release v1.101315.2 contain these changes.
This upgrade has already been activated on internal devnets and the Sepolia Superchain in coordination with Base and Conduit.
Fault Proofs Update
This is the first protocol upgrade that will activate on mainnet following the launch of Fault Proofs, which has recently been accepted by governance. However, its version of the op-program and Fault Dispute Game doesn’t contain the Fjord mainnet activation yet, so we need to perform an update of the Fault Proofs L1 infrastructure before the Fjord activation on mainnet. This is the first time that we need to perform this exercise.
This update involves a new release of the op-program
(v1.2.0) that contains the Fjord activation and generate the so-called absolute pre-state for it, which is a commitment to the program and its starting state. It also requires deploying new FaultDisputeGame
and PerimissionedDisputeGame
contracts to L1 Mainnet with the new op-program pre-state hash. These are deployed at addresses 0xf691F8A6d908B58C534B624cF16495b491E633BA and 0xc307e93a7c530a184c98eade4545a412b857b62f respectively. After the veto period has ended, we will ask the Security Council to sign transactions to update the DisputeGameFactory
to begin using these new contract implementations. This transaction has to be executed before the actual Fjord activation to avoid a broken Fault Proofs system after the activation.
Emergency Cancellation
The optimistic mainnet releases will contain a Fjord activation at the above mentioned time. If there is a critical security issue found between approval and rollout, the Optimism Foundation and Security Council will work to coordinate an emergency cancellation. We have included functionality for node operators to quickly react by using the --override.fjord
flag on both op-node & op-geth.
Conclusion
This proposal outlines the network upgrade after Ecotone titled Fjord. This network upgrade brings reduced execution fees for certain (e.g. smart wallet) applications, lower data availability costs, and more robust L1 data pricing. We expect that this upgrade will not result in any downtime and will occur on Wednesday, July 10 2024 at 16:00:01 UTC.