Optimism 백서

Optimism

원문

bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 75쪽 중 34쪽

mum base fee (in GWei) to assume when determining tx fees. 1 GWei by default. | `1` | `OP_CHALLENGER_TXMGR_MIN_BASEFEE` | | `--txmgr.min-tip-cap` | Enforces a minimum tip cap (in GWei) to use when determining tx fees. 1 GWei by default. | `1` | `OP_CHALLENGER_TXMGR_MIN_TIP_CAP` | | `--txmgr.not-in-mempool-timeout` | Timeout for aborting a tx send if the tx does not make it to the mempool. | `1m0s` | `OP_CHALLENGER_TXMGR_TX_NOT_IN_MEMPOOL_TIMEOUT` | | `--txmgr.rebroadcast-interval` | Interval at which a published transaction will be rebroadcasted if it has not yet been mined. Should be less than ResubmissionTimeout to have an effect. | `0s` | `OP_CHALLENGER_TXMGR_REBROADCAST_INTERVAL` | | `--txmgr.receipt-query-interval` | Frequency to poll for receipts | `12s` | `OP_CHALLENGER_TXMGR_RECEIPT_QUERY_INTERVAL` | | `--txmgr.retry-interval` | Duration we will wait before resubmitting a transaction to L1 on a transient error. Values \<= 0 will result in retrying immediately. Should be less than ResubmissionTimeout to have an effect. | `1s` | `OP_CHALLENGER_TXMGR_RETRY_INTERVAL` | | `--txmgr.send-timeout` | Timeout for sending transactions. If 0 it is disabled. | `2m0s` | `OP_CHALLENGER_TXMGR_TX_SEND_TIMEOUT` | ## Notes on selected flags ### Conditionally required flags The required table above lists the flags op-challenger always checks at startup. Additional flags become required depending on the configuration: the chain must be identified by `--network` or by `--game-factory-address`, and each enabled game type requires its trace-execution flags (for example the `cannon-kona` game type requires the kona server and an absolute prestate via `--cannon-kona-prestate` or `--cannon-kona-prestates-url`). ### network When `--network` is set to a chain bundled from the superchain-registry, the `--game-factory-address` is resolved automatically from the registry and does not need to be set. ### game-types Selects which dispute game types the challenger plays. Which type defends your chain depends on the protocol version it runs; see the [challenger configuration guide](/chain-operators/guides/configuration/op-challenger-config-guide) for choosing game types, trace types, and the matching prestates. ### cannon-\* and cannon-kona-\* The `cannon-*` flags apply only when a cannon-based game type is enabled, and the `cannon-kona-*` variants only to the `cannon-kona` game type. Each of these settings has a default variant plus a game-type-specific variant that overrides it (the `(<game type> game type only)` suffix in the table above). Note that op-program, the fault proof program the non-kona cannon game types execute, has [reached end of support](/notices/archive/op-geth-deprecation), so only the kona variants are still being maintained. ## Utility subcommands Beyond running the challenger service, the `op-challenger` binary provides utility subcommands for inspecting and interacting with dispute games: `list-games`, `list-claims`, `list-credits`, `create-game`, `move`, `resolve`, `resolve-claim`, and `run-trace`. Each takes its own flags; run `op-challenger <subcommand> --help` for details. # How the DA footprint block limit works Source: https://docs.optimism.io/chain-operators/reference/da-footprint Understand the Data Availability (DA) footprint block limit introduced in the Jovian hardfork, how the DA footprint is calculated, and why the default gas scalar is 400. The **Data Availability (DA) Footprint Block Limit** was introduced in the **[Jovian hardfork](https://docs.optimism.io/notices/upgrade-17)** to limit the total amount of transaction data that can fit into a block based on a scaled estimate of the compressed size (or "data availability footprint") of that data. This page explains the problem the limit solves, how the DA footprint is calculated, and how the `daFootprintGasScalar` parameter shapes the limit. To change the scalar on your chain, follow the [DA footprint setup guide](/chain-operators/guides/features/setting-da-footprint). ## Why a DA footprint limit exists When an OP Stack chain receives more calldata-heavy transactions than can fit into the L1's available blob space, the [batcher can throttle the chain's throughput](https://docs.optimism.io/chain-operators/guides/configuration/batcher#batcher-sequencer-throttling). However, continuous batcher throttling may cause the base fee to drop to the [minimum base fee](https://docs.optimism.io/chain-operators/guides/features/setting-min-base-fee), causing unnecessary losses for the chain operator and negative user experiences such as priority fee auctions. And without throttling, the batcher runs the risk of becoming overwhelmed with chain data to batch to the blob space. Limiting the amount of (estimated compressed) calldata taken up by transactions in a block using their total DA footprint can reduce the need for batcher throttling and its related issues. ## How the DA footprint is calculated For all [non-deposit transactions](https://docs.optimism.io/reference/glossary#deposited-transaction) processed by an OP Stack chain, a DA footprint value is recorded alongside the transaction's gas usage. The DA footprint can be configured via the `daFootprintGasScalar` variable in the `SystemConfig` contract on the L1 chain. The DA footprint is automatically calculated for every transaction first by calculating a `daUsageEstimate` for that transaction: ```python theme={null} daUsageEstimate = max( minTransactionSize, (intercept + fastlzCoef * tx.fastlzSize) // 1e6 ) ``` where the `minTransactionSize`, `intercept`, `fastlzCoef`, and `tx.fastlzSize` are as specified in the [Fjord specs](https://specs.optimism.io/protocol/fjord/exec-engine.html#fees). Then the `daUsageEstimate` is multiplied by the `daFootprintGasScalar` to get the `daFootprint` for that individual transaction. ```python theme={null} daFootprint += daUsageEstimate * daFootprintGasScalar ``` The `daFootprint` for all the transactions in a block are then added together to calculate that block's total `daFootprint`. With the block's total `daFootprint` calculated: <Info> * The block's total `daFootprint` must stay below its `gasLimit`. * The `blobGasUsed` property of each block header is set to that block's `daFootprint`. * The base fee update calculation then uses `gasMetered := max(gasUsed, blobGasUsed)` as a replacement for the `gasUsed` variable. </Info> From Jovian, transaction receipts also record the transaction's DA Footprint in the receipt's `blobGasUsed` field, as well as the block's `daFootprintGasScalar` in a new field with the same name. ## What the DA footprint gas scalar controls The *DA footprint gas scalar* scales the *estimated DA usage in bytes* to the gas dimension, and this scaled estimate of the DA usage is what we call the *DA footprint*. This allows us to limit the estimated DA usage using the block's `gasLimit`: the effective limit of estimated DA usage per block is `gasLimit / daFootprintGasScalar` bytes. So *increasing* this scalar makes DA usage more gas-heavy, so *decreases* the limit, and vice versa. This is closely related to how the calldata (floor) cost of `40` gas per non-zero byte limits the total amount of calldata in a block. A DA footprint gas scalar of `400` effectively limits *incompressible* calldata by a factor of `10` compared to its limit without a DA footprint block limit. As such, the feature can be seen as an extension of the existing calldata limit. But instead of repricing the calldata (floor) gas cost, the limit is accounted in parallel to EVM execution gas, and is based on the more relevant FastLZ-based DA usage estimate instead of simply counting zero and non-zero bytes. ## Why the default value is 400 The default scalar of `400` was chosen so that it protects chains in worst-case DA spam scenarios, but has negligible to no impact during normal operation. Careful [analyses](https://github.com/ethereum-optimism/design-docs/blob/main/protocol/da-footprint-block-limit.md) have been done to estimate the impact on current OP Stack chains and pick the right default. Only high-throughput chains would occasionally even see a small impact from the resulting DA footprint limit (as slightly faster rising base fees). The DA footprint limit is mostly invisible. On mid to low-throughput chains, the feature is expected to have no impact under normal usage conditions. It acts more like an insurance to protect against worst-case *incompressible* DA spam. <Info> A `daFootprintGasScalar` value of `0` in the `SystemConfig` is treated as the default of `400`. To effectively disable the limit, set the scalar to a very low value such as `1`. </Info> ## Next steps * To set or change the scalar on your chain, follow [Set the DA Footprint Gas Scalar](/chain-operators/guides/features/setting-da-footprint). * For the full set of fee-related `SystemConfig` parameters, see the [fee parameters reference](/chain-operators/reference/fee-parameters). ## References * [DA Footprint Configuration Spec](https://specs.optimism.io/protocol/jovian/system-config.html#da-footprint-configuration) * [Jovian Upgrade Spec](https://specs.optimism.io/protocol/jovian/overview.html) * [SystemConfig Contract Spec](https://specs.optimism.io/protocol/system-config.html) * [Design Doc](https://github.com/ethereum-optimism/design-docs/blob/main/protocol/da-footprint-block-limit.md) # Fee parameters Source: https://docs.optimism.io/chain-operators/reference/fee-parameters Reference for the fee-related SystemConfig parameters on an OP Stack chain — what each parameter controls, its setter and getter, and the OP Mainnet values. This page catalogues the fee-related parameters a chain operator can set on the `SystemConfig` contract, from the Jovian hardfork onward. For how fees are calculated and charged, see [transaction fees on OP Mainnet](https://docs.optimism.io/op-stack/transactions/fees#transaction-fees-on-op-mainnet). For when and how to adjust these parameters, see the [fee tuning guide](/chain-operators/guides/management/transaction-fees-101). <Info> Only the [SystemConfig owner](/op-stack/protocol/privileged-roles) can call the setter methods listed below. </Info> ## Fee formulas On an OP Stack chain a transaction's **Total Fee** is made of three main components: `Total Fee = L2 Fee + L1 Fee + Operator Fee` | Component | Formula | | - | - | | L2 fee | `gasUsed * (baseFee + priorityFee)` | | L1 fee | `estimatedSizeScaled * l1FeeScaled / 1e12` (see below) | | Operator fee | `(gasUsed * operatorFeeScalar * 100) + operatorFeeConstant` | The L1 fee charges for posting L2 data to L1, based on the transaction's estimated compressed (FastLZ) size: ```ts theme={null} l1FeeScaled = baseFeeScalar * 16 * l1BaseFee + blobBaseFeeScalar * l1BlobBaseFee estimatedSizeScaled = max( minTransactionSize * 1e6, intercept + fastlzCoef * fastlzSize ) l1Fee = estimatedSizeScaled * l1FeeScaled / 1e12 ``` <Info> **Pre-Jovian (Isthmus) operator fee formula:** `operatorFee = (gasUsed * operatorFeeScalar / 1e6) + operatorFeeConstant` </Info> ## Parameters All parameters live on the `SystemConfig` contract on L1 (see the [`ISystemConfig` interface](https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts-bedrock/interfaces/L1/ISystemConfig.sol)). Each getter below is a `view` method with the same name as the parameter. | Parameter | Type | What it controls | Setter | OP Mainnet value | | - | - | - | - | - | | `eip1559Denominator` | `uint32` | EIP-1559 max-change denominator: appears in the denominator of the per-block base fee delta. Lower = faster base fee response, more volatility. | `setEIP1559Params(uint32,uint32)` | `250` | | `eip1559Elasticity` | `uint32` | Elasticity multiplier: sets the gas target relative to the gas limit (`gas_target = gasLimit / elasticity`). Larger elasticity = smaller target, so base fee increases sooner under load. | `setEIP1559Params(uint32,uint32)` | `2` | | `gasLimit` | `uint64` | Maximum gas per block. Lower limit = less supply per block, making base fees more sensitive to demand. | `setGasLimit(uint64)` | `40,000,000` | | `minBaseFee` | `uint64` | Minimum floor on the base fee, in wei (can be 0). See [setting the minimum base fee](/chain-operators/guides/features/setting-min-base-fee). | `setMinBaseFee(uint64)` | `0` | | `basefeeScalar` | `uint32` | Scales the `l1BaseFee` (per-byte) contribution to the L1 data fee. | `setGasConfigEcotone(uint32,uint32)` | `5227` | | `blobbasefeeScalar` | `uint32` | Scales the `l1BlobBaseFee` (per-blob) contribution to the L1 data fee. | `setGasConfigEcotone(uint32,uint32)` | `1014213` | | `operatorFeeScalar` | `uint32` | Per-gas operator margin. See [setting the operator fee](/chain-operators/guides/features/setting-operator-fee). | `setOperatorFeeScalars(uint32,uint64)` | `0` | | `operatorFeeConstant` | `uint64` | Flat per-transaction operator fee, in wei. | `setOperatorFeeScalars(uint32,uint64)` | `0` | | `daFootprintGasScalar` | `uint16` | Scales estimated DA usage to the gas dimension to limit DA-heavy blocks. See [how the DA footprint block limit works](/chain-operators/reference/da-footprint). | `setDAFootprintGasScalar(uint16)` | `0` (treated as `400`) | <Warning> * Any non-zero operator fee makes the chain configuration [non-standard](/op-stack/protocol/superchain-registry#what-is-a-standard-chain). * A `daFootprintGasScalar` of `0` is treated as the default of `400`; set it to `1` to effectively disable the DA footprint limit. </Warning> The OP Mainnet values can be verified against the [OP Mainnet SystemConfig contract on Etherscan](https://etherscan.io/address/0x229047fed2591dbec1eF1118d64F7aF3dB9EB290#readProxyContract). ## Fee vault recipients Fees are gathered in dedicated contract [fee vaults](/op-stack/transactions/fee-vaults). See the [fee vault operations guide](/chain-operators/guides/management/fee-vaults) for how to manage and withdraw from these vaults. | Fee component | Recipient vault | | - | - | | `baseFee` | `BaseFeeVault` | | `priorityFee` | `SequencerFeeVault` | | `l1Fee` | `L1FeeVault` | | `operatorFee` | `OperatorFeeVault` | ## Reading current values Each parameter has a getter with the same name on the `SystemConfig` contract: ```bash theme={null} export L1_RPC=<L1_RPC> export SYSTEM_CONFIG=<SYSTEM_CONFIG_ADDRESS> cast call --rpc-url $L1_RPC $SYSTEM_CONFIG "eip1559Denominator()" cast call --rpc-url $L1_RPC $SYSTEM_CONFIG "eip1559Elasticity()" cast call --rpc-url $L1_RPC $SYSTEM_CONFIG "gasLimit()" cast call --rpc-url $L1_RPC $SYSTEM_CONFIG "minBaseFee()" cast call --rpc-url $L1_RPC $SYSTEM_CONFIG "basefeeScalar()" cast call --rpc-url $L1_RPC $SYSTEM_CONFIG "blobbasefeeScalar()" cast call --rpc-url $L1_RPC $SYSTEM_CONFIG "operatorFeeScalar()" cast call --rpc-url $L1_RPC $SYSTEM_CONFIG "operatorFeeConstant()" cast call --rpc-url $L1_RPC $SYSTEM_CONFIG "daFootprintGasScalar()" ``` ## References * [Transaction fees on OP Mainnet](https://docs.optimism.io/op-stack/transactions/fees#transaction-fees-on-op-mainnet) * [Operator fee](https://docs.optimism.io/op-stack/transactions/fees#operator-fee) * [L1 data fee](https://docs.optimism.io/op-stack/transactions/fees#l1-data-fee) * [`ISystemConfig` interface](https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts-bedrock/interfaces/L1/ISystemConfig.sol) * [DA footprint](https://docs.optimism.io/notices/archive/upgrade-17#block-header-changes) * [EIP-1559 parameters](https://docs.optimism.io/op-stack/protocol/differences#eip-1559-parameters) # OP Contracts Manager Source: https://docs.optimism.io/chain-operators/reference/opcm Understand what OP Contracts Manager is, why it exists, and how it deploys and upgrades the L1 contracts for OP Stack chains in a single transaction. The OP Contracts Manager is a contract that deploys the L1 contracts for an OP Stack chain in a single transaction. It provides a minimal set of user-configurable parameters to ensure that the resulting chain meets the standard configuration requirements. Additionally, as of [Upgrade 13](https://gov.optimism.io/t/upgrade-proposal-13-opcm-and-incident-response-improvements/9739), instances of OPCM can upgrade existing OP Stack chains. The version deployed is always a governance-approved contract release. The set of governance approved contract releases can be found on the Optimism Monorepo releases page, and is the set of releases named `op-contracts/vX.Y.Z`. It deploys the [Fault Proof System](/op-stack/fault-proofs/explainer), using the [PermissionedDisputeGame](/op-stack/protocol/smart-contracts#proposals-and-fault-proofs). ## Purpose OPCM simplifies the L1 contract deployments for new OP Stack chains. For each smart contract release there will be a new OPCM instance. It addresses three aspects of deploying the OP Stack's L1 contracts: 1. **Deploy Shared Contracts.** Shared contracts are used between many OP chains, so this occurs only occasionally in production. 2. **Deploy Shared Implementation Contracts.** This occurs once per contracts release in production. 3. **Deploy OP Chain Contracts.** This occurs for every OP chain deployment in production. Additionally, after the Upgrade 13 network upgrade, OPCM instances will be used to upgrade existing OP Stack chains. ## Learn more * Checkout the [OPCM specs](https://specs.optimism.io/experimental/op-contracts-manager.html?utm_source=op-docs\&utm_medium=docs) * Checkout the [OPCM design document](https://github.com/ethereum-optimism/design-docs/blob/main/protocol/op-contracts-manager-arch.md) # Rollup deployment configuration Source: https://docs.optimism.io/chain-operators/reference/rollup-deployment-configuration Reference for the OP Stack rollup deployment configuration values. This page is the reference for the values in the `DeployConfig` — the flat JSON configuration that sets the L1 contract parameters and the L2 genesis state when an OP Stack chain is deployed. The schema tables below are generated directly from the `DeployConfig` Go struct tree in the monorepo (`op-chain-ops/genesis`) at a finalized op-deployer release, so the field list, JSON keys, types, and descriptions cannot silently fall behind the source. Recommended values and standard-configuration requirements are policy rather than code, and are maintained by hand in the [guidance section](#guidance-and-standard-configuration-requirements) below. <Info> **The recommended way to deploy an OP Stack chain is [OP Deployer](/chain-operators/tools/op-deployer/overview).** OP Deployer takes a declarative [intent file](/chain-operators/tools/op-deployer/usage/init) (`intent.toml`) rather than a hand-written `DeployConfig` JSON, and derives the `DeployConfig` documented here from that intent as part of its deployment pipeline. Most chain operators set the intent file and never edit a `DeployConfig` directly. This page documents the underlying `DeployConfig` surface: the exhaustive set of values a deployment ultimately resolves to. Use it to understand what an intent setting maps to, to interpret the `DeployConfig` that OP Deployer can emit for an applied deployment (via `op-deployer inspect deploy-config`), or as background for the lower-level [custom deployments](/chain-operators/tools/op-deployer/usage/custom-deployments) OP Deployer also supports. </Info> <Info> Deploy-config values are largely immutable after a chain is deployed, so this page targets the values you set at genesis. The output-oracle proposal fields (the [`l2OutputOracle*` values](#legacy-output-oracle)) describe the legacy `L2OutputOracle` proposal system and apply only to chains still on that system. Chains using [permissionless fault proofs](/op-stack/fault-proofs/explainer) — the standard configuration for new OP Stack chains — set the [fault-proof deployment values](#fault-proofs) instead: `useFaultProofs` together with the `faultGame*`, `preimageOracle*`, `proofMaturityDelaySeconds`, `disputeGame
프로젝트로 돌아가기