diff --git a/pages/builders/chain-operators/management/operations.mdx b/pages/builders/chain-operators/management/operations.mdx index 40f4fd935..c082e5d39 100644 --- a/pages/builders/chain-operators/management/operations.mdx +++ b/pages/builders/chain-operators/management/operations.mdx @@ -62,7 +62,7 @@ Just wait until it is. ## Getting Your Rollup Config -Use this tool to get your rollup config from `op-node`. This will only work if your chain is **already** in the [superchain-registry](https://github.com/ethereum-optimism/superchain-registry/blob/main/superchain/configs/chainids.json) and `op-node` has been updated to pull those changes in from the registry. +Use this tool to get your rollup config from `op-node`. This will only work if your chain is **already** in the [superchain-registry](https://github.com/ethereum-optimism/superchain-registry/blob/main/superchain/configs/chainList.json) and `op-node` has been updated to pull those changes in from the registry. This script will NOT work for chain operators trying to generate this data in order to submit it to the registry. diff --git a/pages/builders/node-operators/management/blobs.mdx b/pages/builders/node-operators/management/blobs.mdx index 427366496..0eb6579fb 100644 --- a/pages/builders/node-operators/management/blobs.mdx +++ b/pages/builders/node-operators/management/blobs.mdx @@ -26,10 +26,10 @@ See the [Software Releases](/builders/node-operators/releases) page for the mini ### Configure the Ecotone Activation Date -* If you are operating a node for an OP Chain that has an entry in the [`superchain-registry`](https://github.com/ethereum-optimism/superchain-registry/blob/main/superchain/configs/chainids.json), +* If you are operating a node for an OP Chain that has an entry in the [`superchain-registry`](https://github.com/ethereum-optimism/superchain-registry/blob/main/superchain/configs/chainList.json), the Ecotone activation date is part of the `op-node` and `op-geth` nodes. So, no action is needed for the sequencer after upgrading to the latest release. -* For node operators of custom chains not included in the [`superchain-registry`](https://github.com/ethereum-optimism/superchain-registry/blob/main/superchain/configs/chainids.json), +* For node operators of custom chains not included in the [`superchain-registry`](https://github.com/ethereum-optimism/superchain-registry/blob/main/superchain/configs/chainList.json), the activation dates can be set in the `rollup.json` (set `ecotone_time`) or set the activation time via overrides (CLI) in both `op-node` and `op-geth`. These will need to be set on `op-node` and `op-geth` for the sequencer and all other nodes. diff --git a/pages/builders/node-operators/network-upgrades.mdx b/pages/builders/node-operators/network-upgrades.mdx index 4733398d2..5574cc91f 100644 --- a/pages/builders/node-operators/network-upgrades.mdx +++ b/pages/builders/node-operators/network-upgrades.mdx @@ -10,7 +10,7 @@ import { Steps, Callout } from 'nextra/components' # Network Upgrade Overview - Read this [notice](/builders/notices/ecotone-changes.mdx) to prepare for Ecotone. + Read this [notice](/builders/notices/fjord-changes.mdx) to prepare for Fjord. This section has information on how to upgrade your Mainnet and Testnet nodes @@ -39,7 +39,18 @@ activation. These are a reflection of the [Superchain Upgrades Specifications](h ### [Fjord](https://specs.optimism.io/protocol/superchain-upgrades.html#fjord) -Name of the next upgrade after Ecotone. Placeholder for development coordination. +The Fjord upgrade includes the RIP-7212 precompile, FastLZ gas pricing, Brotli channel compression, and several protocol parameter changes. + +* [RIP-7212: Precompile for secp256r1](https://specs.optimism.io/protocol/precompiles.html#P256VERIFY) +* [Brotli channel compression](https://specs.optimism.io/fjord/exec-engine.html#fees) +* FastLZ gas pricing + * [FastLZ L1 fee cost calculation](https://specs.optimism.io/fjord/exec-engine.html#fees) + * [Upgraded GasPriceOracle to compute FastLZ](https://specs.optimism.io/fjord/derivation.html#gaspriceoracle-deployment) + * [L1 gas cost changes](https://specs.optimism.io/fjord/predeploys.html#l1-gas-usage-estimation) +* Protocol parameter changes + * [Max sequencer drift becomes constant](https://specs.optimism.io/fjord/derivation.html#constant-maximum-sequencer-drift) + * [Channel constant increases](https://specs.optimism.io/fjord/derivation.html#increasing-max_rlp_bytes_per_channel-and-max_channel_bank_size) +* [Fjord hardfork activation block](https://specs.optimism.io/fjord/derivation.html#network-upgrade-automation-transactions) ### [Ecotone](https://specs.optimism.io/protocol/superchain-upgrades.html#ecotone) diff --git a/pages/builders/node-operators/releases.mdx b/pages/builders/node-operators/releases.mdx index 39a54b3c3..f80efd0c9 100644 --- a/pages/builders/node-operators/releases.mdx +++ b/pages/builders/node-operators/releases.mdx @@ -22,5 +22,5 @@ recommended to run the latest stable releases found on the GitHub release pages. | Network | op-node | op-geth | | ---------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ | -| OP Mainnet | [v1.7.5](https://github.com/ethereum-optimism/optimism/releases/tag/op-node%2Fv1.7.5) | [v1.101315.0](https://github.com/ethereum-optimism/op-geth/releases/tag/v1.101315.0) | -| OP Sepolia | [v1.7.5](https://github.com/ethereum-optimism/optimism/releases/tag/op-node%2Fv1.7.5) | [v1.101315.0](https://github.com/ethereum-optimism/op-geth/releases/tag/v1.101315.0) | +| OP Mainnet | [v1.7.7](https://github.com/ethereum-optimism/optimism/releases/tag/op-node%2Fv1.7.7) | [v1.101315.2](https://github.com/ethereum-optimism/op-geth/releases/tag/v1.101315.2) | +| OP Sepolia | [v1.7.7](https://github.com/ethereum-optimism/optimism/releases/tag/op-node%2Fv1.7.7) | [v1.101315.2](https://github.com/ethereum-optimism/op-geth/releases/tag/v1.101315.2) | diff --git a/pages/builders/notices/_meta.json b/pages/builders/notices/_meta.json index 17d5b9bea..769064261 100644 --- a/pages/builders/notices/_meta.json +++ b/pages/builders/notices/_meta.json @@ -1,3 +1,4 @@ { - "fp-changes": "Preparing for Fault Proofs Breaking Changes" + "fp-changes": "Preparing for Fault Proofs Breaking Changes", + "fjord-changes": "Preparing for Fjord Breaking Changes" } diff --git a/pages/builders/notices/fjord-changes.mdx b/pages/builders/notices/fjord-changes.mdx new file mode 100644 index 000000000..082eacfb1 --- /dev/null +++ b/pages/builders/notices/fjord-changes.mdx @@ -0,0 +1,137 @@ +--- +title: Preparing for Fjord Breaking Changes +lang: en-US +description: Learn how to prepare for Fjord upgrade breaking changes. +--- + +import { Steps, Callout } from 'nextra/components' + +# Preparing for Fjord Breaking Changes + +This page outlines breaking changes related to the Fjord network upgrade for wallets and front-end developers, chain operators, and node operators. +If you experience difficulty at any stage of this process, please reach out to [developer support](https://github.com/ethereum-optimism/developers/discussions). + + + The Fjord upgrade for OP Sepolia was activated on **1716998400 Wed May 29 16:00:00 UTC 2024**. The Fjord OP Mainnet upgrade will be optimistically activated **1720627201 Thu July 10 16:00:01 UTC 2024**, pending [governance approval](https://gov.optimism.io/t/upgrade-proposal-9-fjord-network-upgrade/8236). + + +## What's Included in Fjord + +The [Fjord network upgrade](https://specs.optimism.io/fjord/overview.html) includes the following: + +* [RIP-7212](https://specs.optimism.io/protocol/precompiles.html#P256VERIFY): Precompile for secp256r1 Curve Support, to reduce gas costs of many smart wallet applications. +* [Brotli](https://specs.optimism.io/fjord/derivation.html#brotli-channel-compression) as a channel compression option, for \~5-15% lower data availability costs. +* Parameter changes: + * [Max sequencer drift](https://specs.optimism.io/fjord/derivation.html#constant-maximum-sequencer-drift) becomes a constant with value increased to 1800 seconds + * 10x increased values for `MAX_RLP_BYTES_PER_CHANNEL` and `MAX_CHANNEL_BANK_SIZE` ([spec](https://specs.optimism.io/fjord/derivation.html#increasing-max_rlp_bytes_per_channel-and-max_channel_bank_size)) +* The [Fjord hardfork activation block](https://specs.optimism.io/fjord/derivation.html#network-upgrade-automation-transactions) includes several transactions to perform all L2 contract deployments, upgrades, enablements, and proxy updates. +* L1 Gas Cost changes: + * [FastLZ](https://specs.optimism.io/fjord/exec-engine.html#fees) based L1 fee [cost calculation](https://specs.optimism.io/fjord/exec-engine.html#fees) with an upgraded [`GasPriceOracle` L2 predeploy](https://specs.optimism.io/fjord/derivation.html#gaspriceoracle-deployment) to compute it + * `GasPriceOracle` gets a new function `getL1FeeUpperBound` as a cheap new way to calculate an upper bound for the max fee of a new transaction + * `getL1GasUsed` method of the `GasPriceOracle` contract ([spec](https://specs.optimism.io/fjord/predeploys.html#l1-gas-usage-estimation)) is being deprecated + * `L1GasUsed` field of the transaction receipt ([spec](https://specs.optimism.io/fjord/exec-engine.html)) is being deprecated + +## For Wallets and Front-End Developers + +The proposed Fjord upgrade to the OP Stack and OP Mainnet changes the formula for estimating the [L1 Data Fee](/stack/transactions/fees#l1-data-fee) component of the [OP Stack Transaction Fee](/stack/transactions/fees). + +* `getL1Fee` on the [GasPriceOracle contract](https://github.com/ethereum-optimism/optimism/blob/0dcb1b2c7dadec98a24f47e2e2d781a25800d9e1/packages/contracts-bedrock/src/L2/GasPriceOracle.sol#L54) has been updated. It now performs FastLZ compression on-chain, which is a better approximation of the compressibility of a transaction. Combined with a linear regression model, this gives a more accurate prediction of L1 data fees. +* `getL1GasUsed` and the corresponding `L1GasUsed` field of transaction receipts are being deprecated as they no longer accurately reflect gas usage as of Ecotone. The function and field will remain; however, their usefulness is limited as they still assume calldata batching. `getL1Fee` should be used when trying to predict L1 Data fees. +* `getL1FeeUpperBound` is a new method to estimate fee upper bounds when sending transactions. It is much cheaper, in gas costs, than previous methods. This is what wallets and front-ends should use in practice in most cases. +* Read the [Fjord Formula section](/stack/transactions/fees#fjord) of the [Transaction Fees](/stack/transactions/fees) page for more information about the new formula. + +Your application may need to be updated to account for this change. Read below to learn how specific changes in the Fjord upgrade require updates to your application. + +### Preparing Your Wallet or Front-End + +Changes to the L1 Data Fee formula may affect your application if you are computing this fee component on your own. It's strongly recommended that you use [existing tooling](/builders/app-developers/transactions/estimates#tooling) to estimate transaction fees instead of computing them yourself. + +* If you cannot use existing tooling, use the `getL1Fee` function on the `GasPriceOracle` smart contract to compute the L1 Data Fee component of the transaction fee. Avoid implementing the formula yourself, as it may change in the future. +* Alternatively, you should consider using `getL1FeeUpperBound` if you only need to estimate an upper bound of the L1 fee for the purpose of transaction sending. + +## For Chain Operators + +The proposed Fjord upgrade impacts OP chains and requires chain operators to upgrade their chain and configure the sequencer for Fjord. + +* [Max sequencer drift](https://specs.optimism.io/fjord/derivation.html#constant-maximum-sequencer-drift) becomes a constant with value increased to 1800 seconds. This gives chain operators more time to respond to L1 node issues without facing a potential L2 chain halt. +* [Brotli](https://specs.optimism.io/fjord/derivation.html#brotli-channel-compression) is now supported as a channel compression option, for \~5-15% lower data availability costs. +* An update of the fee scalars on the `SystemConfig` is necessary, similar to Ecotone. + + + ### Prepare `SystemConfig` Transaction + + An onchain transaction will be required to update the scalar for Fjord. This needs to be prepared days in advance before the activation to ensure chain operators don't operate at a loss when Fjord activates. + + * Encode the scalar value using the [ecotone scalar encoding tool](https://github.com/ethereum-optimism/optimism/tree/develop/op-chain-ops/cmd/ecotone-scalar) + * Send a `setGasConfig` transaction to `SystemConfig` + * Set `BaseFeeScalar` and `BlobBaseFeeScalar` values based on the [Fjord calculator](https://docs.google.com/spreadsheets/d/1V3CWpeUzXv5Iopw8lBSS8tWoSzyR4PDDwV9cu2kKOrs/edit#gid=186414307) + + ### Prepare Sequencer Node + + + If you are operating an OP Chain that has an entry in the [`superchain-registry`](https://github.com/ethereum-optimism/superchain-registry/blob/main/superchain/configs/chainList.json), the Fjord activation date is part of the `op-node` and `op-geth` nodes, and are using the [--network](/builders/node-operators/configuration/consensus-config#network) and [--op-network](/builders/node-operators/configuration/execution-config#op-network-betaop-network) flags. No action is needed for the sequencer after preparing the `SystemConfig` transaction. Please skip to [Step 3: Prepare Batcher](#prepare-batcher). + + + For custom chains not included in the [`superchain-registry`](https://github.com/ethereum-optimism/superchain-registry/blob/main/superchain/configs/chainList.json), you will need to manually configure the [activation timestamp](https://github.com/ethereum-optimism/superchain-registry/blob/main/superchain/configs/mainnet/superchain.yaml). You have two configuration options for your sequencer node: + + * **Option 1:** Set the Fjord activation date in your `rollup.json` config file. You will still need to set the `override.fjord` flag in `op-geth` with the UNIX timestamp. + * **Option 2:** Alternatively, chain operators can use the override flags to configure your sequencer node by specifying a time in the future when Fjord will activate. + * Set `override.fjord` in both `op-node` and `op-geth` to the UNIX timestamp of the block you want to activate the Fjord hardfork or corresponding env vars for this. + * In general, run `op-node --help` or `op-geth --help` to see flags, their descriptions and environment variables. + + ### Prepare Batcher + + Preparing your batcher to activate Brotli compression is optional but recommended to achieve better channel compression. + + * You can activate Brotli compression for your batcher by setting the `compression-algo` flag. + * `brotli-10` is the recommended Brotli level and works fine for most chain configurations. + * However, chain operators can experiment with `brotli-11` if it gives them better compression and their batcher can still keep up with the increased compression computation needs. + + + `brotli` defaults to `brotli-10`. If the flag is unset, it still defaults to `zlib`. + + + * You can also run the batcher help to see available options: `go run ./op-batcher/cmd --help |less` + + ```jsx + --compression-algo value (default: zlib) ($OP_BATCHER_COMPRESSION_ALGO) + The compression algorithm to use. Valid options: zlib, brotli, brotli-9, + brotli-10, brotli-11 + ``` + + + + To verify proper configuration, chain operators should confirm in the startup logs of their `op-node` and `op-geth` that the correct Fjord activation timestamps are set. + + +## For Node Operators + +Node operators will need to upgrade to Fjord before the activation date. For Sepolia, the op-node release [v1.7.7](https://github.com/ethereum-optimism/optimism/releases/tag/v1.7.7) and op-geth release [v1.101315.2](https://github.com/ethereum-optimism/op-geth/releases/tag/v1.101315.2) contain these changes. + +These following steps are necessary for EVERY node operator: + + + ### Update to the Latest Release + + * [`op-geth`](https://github.com/ethereum-optimism/op-geth/releases/tag/v1.101315.2) + * [`op-node`](https://github.com/ethereum-optimism/optimism/releases/tag/v1.7.7) + + ### Configure the Fjord Activation Date + + + If you are operating a node for an OP Chain that has an entry in the [`superchain-registry`](https://github.com/ethereum-optimism/superchain-registry/blob/main/superchain/configs/chainList.json), the Fjord activation date is part of the `op-node` and `op-geth` nodes. So, no action is needed for the sequencer after upgrading to the latest release. Please skip to [Step 3: Verify Your Configuration](#verify-your-configuration). + + + For node operators of custom chains not included in the [`superchain-registry`](https://github.com/ethereum-optimism/superchain-registry/blob/main/superchain/configs/chainList.json), you will need to manually configure the [activation timestamp](https://github.com/ethereum-optimism/superchain-registry/blob/main/superchain/configs/mainnet/superchain.yaml). This can be done one of two ways: + + * **Option 1:** Set the activation time in the `rollup.json` for `op-node`. You will still need to set the `override.fjord` flag in `op-geth` if you use this option. + * **Option 2:** Set the activation time via overrides (CLI) in both `op-node` and `op-geth`. These will need to be set on `op-node` and `op-geth` for the sequencer and all other nodes. + + ### Verify Your Configuration + + Make the following checks to verify that your node is properly configured. + + * `op-node` and `op-geth` will log their configurations at startup + * Check that the Fjord time is set to `activation-timestamp` in the op-node startup logs + * Check that the Fjord time is set to `activation-timestamp` in the op-geth startup logs + diff --git a/pages/stack/protocol/fault-proofs/mips.mdx b/pages/stack/protocol/fault-proofs/mips.mdx index 7657384eb..e58cff53c 100644 --- a/pages/stack/protocol/fault-proofs/mips.mdx +++ b/pages/stack/protocol/fault-proofs/mips.mdx @@ -257,7 +257,6 @@ The internal pure [`execute`](https://github.com/ethereum-optimism/optimism/blob * [Cannon Overview](https://github.com/ethereum-optimism/optimism/blob/546fb2c7a5796b7fe50b0b7edc7666d3bd281d6f/cannon/docs/README.md) * [Cannon FPVM Specification](https://specs.optimism.io/experimental/fault-proof/cannon-fault-proof-vm.html) -* [MIPS Reference Sheet](https://inst.eecs.berkeley.edu/~cs61c/resources/MIPS_Green_Sheet.pdf) * [MIPS IV ISA Specification](https://www.cs.cmu.edu/afs/cs/academic/class/15740-f97/public/doc/mips-isa.pdf) * [MIPS32 Architecture For Programmers Volume II (for SPECIAL2 opcodes)](https://www.cs.cornell.edu/courses/cs3410/2008fa/MIPS_Vol2.pdf) * [MIPS Assembly Wiki Book](https://en.wikibooks.org/wiki/MIPS_Assembly) diff --git a/pages/stack/transactions/fees.mdx b/pages/stack/transactions/fees.mdx index 4dfbbbf81..55ee02e7f 100644 --- a/pages/stack/transactions/fees.mdx +++ b/pages/stack/transactions/fees.mdx @@ -87,8 +87,8 @@ the L1 Data Fee are generally quite small and should not impact the average tran #### Bedrock -The L1 Data Fee formula changed with the Ecotone upgrade. -Refer to the [Network Upgrade Overview](/builders/node-operators/network-upgrades/overview) for network upgrade activation timestamps for OP Sepolia and OP Mainnet. + The L1 Data Fee formula changed with the Ecotone upgrade. + Refer to the [Network Upgrade Overview](/builders/node-operators/network-upgrades) for network upgrade activation timestamps for OP Sepolia and OP Mainnet. Prior to the Ecotone upgrade, the L1 Data Fee is calculated based on the following parameters: @@ -121,8 +121,8 @@ l1_data_fee = tx_total_gas * ethereum_base_fee #### Ecotone -The L1 Data Fee formula changed with the Ecotone upgrade. -Refer to the [Network Upgrade Overview](/builders/node-operators/network-upgrades/overview) for network upgrade activation timestamps for OP Sepolia and OP Mainnet. + The L1 Data Fee formula changed with the Ecotone upgrade. + Refer to the [Network Upgrade Overview](/builders/node-operators/network-upgrades) for network upgrade activation timestamps for OP Sepolia and OP Mainnet. The pricing function changes with Ecotone upgrade because of the introduction of the option to @@ -159,8 +159,43 @@ The l1 data fee is then: l1_data_fee = tx_compressed_size * weighted_gas_price ``` -Recall that base_fee_scalar is set to dynamic_overhead and blob_base_fee_scalar is 0 immediately +Recall that base\_fee\_scalar is set to dynamic\_overhead and blob\_base\_fee\_scalar is 0 immediately following the upgrade. Because the old overhead parameter becomes ignored, new L1 data prices will be (slightly, since overhead is typically a very small) lower than before the fork. Chain operators will likely want to retune the parameters appropriately after the fork, particularly if they plan on [enabling blobs](/builders/chain-operators/management/blobs). +Chain operators can use the [Ecotone fee parameter calculator](https://docs.google.com/spreadsheets/d/12VIiXHaVECG2RUunDSVJpn67IQp9NHFJqUsma2PndpE/edit#gid=186414307) to get a better estimate of scalar values to use for your chain. + +#### Fjord + + + The L1 Data Fee formula changed with the Fjord upgrade. Refer to the [Network Upgrade Overview](/builders/node-operators/network-upgrades) for network upgrade activation timestamps for OP Sepolia and OP Mainnet. + + +The pricing function changes with Fjord upgrade because of the FastLZ compression estimator, which more accurately charges for L1 data usage on a per transaction basis. +The updated function uses the following parameters: + +* The FastLZ-compressed size of the signed transaction. +* The current Ethereum base fee and/or blob base fee (trustlessly relayed from Ethereum). + +The Fjord L1 Data Fee calculation begins with estimating the transaction size using a linear model over the FastLZ-compressed transaction size. + +``` +estimatedSizeScaled = max(minTransactionSize * 1e6, intercept + fastlzCoef*fastlzSize) +``` + +The model parameters `intercept` and `fastlzCoef` were determined by performing a linear regression analysis over a dataset of previous L2 transactions minimizing the root mean square error against the change in batch size, when compressed with Brotli, over historical OP mainnet data. These parameters are fixed in Fjord. The `minTransactionSize`, `intercept`, and `fastlzCoef` values are scaled by 1e6. + +Next, the two chain parameters **base fee scalar** and **blob base fee scalar** are used to compute a weighted gas price multiplier. + +``` +l1FeeScaled = baseFeeScalar*l1BaseFee*16 + blobFeeScalar*l1BlobBaseFee +``` + +Both scalars are scaled by 1e6. The final L1 Data Fee is then + +``` +l1Cost = estimatedSizeScaled * l1FeeScaled / 1e12 +``` + +The new cost function takes into account the compression ratio, so chain operators will need to adjust their `baseFeeScalar` and `blobFeeScalar` to account for any previous compression ratios that they encountered on their chains. Chain operators can use the [Fjord fee parameter calculator](https://docs.google.com/spreadsheets/d/1V3CWpeUzXv5Iopw8lBSS8tWoSzyR4PDDwV9cu2kKOrs/edit#gid=186414307) to get a better estimate of scalar values to use for your chain. diff --git a/words.txt b/words.txt index 066e0d297..95b0e0a2c 100644 --- a/words.txt +++ b/words.txt @@ -37,6 +37,7 @@ BOOTNODES Bootnodes bootnodes bottlenecked +Brotli Callouts callouts CCIP @@ -71,6 +72,7 @@ discv DIVU ENABLEDEPRECATEDPERSONAL enabledeprecatedpersonal +enablements Erigon erigon ETHERBASE @@ -266,6 +268,7 @@ rpcprefix RPGF Rpgf rpgf +secp SELFDESTRUCT seqnr SEQUENCERHTTP