bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 75쪽 중 48쪽
0,
"delta_time": 0,
"ecotone_time": 0,
"fjord_time": 0,
"granite_time": 0,
"holocene_time": 0,
"isthmus_time": 0,
"jovian_time": 0
},
"optimism": {
"eip1559Elasticity": 6,
"eip1559Denominator": 50,
"eip1559DenominatorCanyon": 250
},
"alt_da": null,
"genesis": {
"l1": {
"number": <L1_GENESIS_BLOCK>,
"hash": "<L1_GENESIS_HASH>"
},
"l2": {
"number": 0,
"hash": "<L2_GENESIS_HASH>"
},
"l2_time": <L2_GENESIS_TIMESTAMP>,
"system_config": {
"batcherAddr": "<BATCHER_ADDRESS>",
"overhead": "0x0000000000000000000000000000000000000000000000000000000000000000",
"scalar": "<SCALAR_HEX>",
"gasLimit": 60000000
}
},
"Roles": {
"SystemConfigOwner": "<SYSTEM_CONFIG_OWNER>",
"ProxyAdminOwner": "<PROXY_ADMIN_OWNER>",
"Guardian": "<GUARDIAN>",
"Challenger": "<CHALLENGER>",
"Proposer": "<PROPOSER>",
"UnsafeBlockSigner": "<UNSAFE_BLOCK_SIGNER>",
"BatchSubmitter": "<BATCH_SUBMITTER>"
},
"Addresses": {
"AddressManager": "<ADDRESS_MANAGER>",
"L1CrossDomainMessengerProxy": "<L1_CROSS_DOMAIN_MESSENGER_PROXY>",
"L1Erc721BridgeProxy": "<L1_ERC721_BRIDGE_PROXY>",
"L1StandardBridgeProxy": "<L1_STANDARD_BRIDGE_PROXY>",
"L2OutputOracleProxy": "0x0000000000000000000000000000000000000000",
"OptimismMintableErc20FactoryProxy": "<OPTIMISM_MINTABLE_ERC20_FACTORY_PROXY>",
"OptimismPortalProxy": "<OPTIMISM_PORTAL_PROXY>",
"SystemConfigProxy": "<SYSTEM_CONFIG_PROXY>",
"ProxyAdmin": "<PROXY_ADMIN>",
"AnchorStateRegistryProxy": "<ANCHOR_STATE_REGISTRY_PROXY>",
"DelayedWethProxy": "<DELAYED_WETH_PROXY>",
"DisputeGameFactoryProxy": "<DISPUTE_GAME_FACTORY_PROXY>",
"FaultDisputeGame": "<FAULT_DISPUTE_GAME>",
"PermissionedDisputeGame": "<PERMISSIONED_DISPUTE_GAME>"
}
}
]
}
]
}
```
</Tab>
</Tabs>
Source the values from your chain's existing artifacts:
* `genesis.*`, `block_time`, `seq_window_size`, `max_sequencer_drift`, `batch_inbox_address`, hardfork timestamps → your chain's `rollup.json`
* `Addresses.*` → your `op-deployer` state (`opChainDeployments[<i>]`)
* `Roles.*` → your `op-deployer` state's per-chain `roles` block
Cross-check each L1 contract address onchain (`cast call`) before committing.
</Step>
<Step title="Generate the absolute prestate">
From the root of the monorepo, point `KONA_CUSTOM_CONFIGS_DIR` at the directory you created in Step 2, then run the canonical build:
```bash theme={null}
export KONA_CUSTOM_CONFIGS_DIR="$PWD/rust/kona/crates/protocol/registry/etc/custom-configs/<chain-name>"
just reproducible-prestate-kona
jq -r .pre rust/kona/prestate-artifacts-cannon/prestate-proof.json
```
The hash printed is your chain's custom kona absolute prestate. The build also writes a hash-named gzipped binary at `rust/kona/prestate-artifacts-cannon/0x<hash>.bin.gz` — this is the file `op-challenger` needs to fetch at dispute time.
</Step>
<Step title="Verify your chain is embedded in the prestate">
A custom-config build that silently fails to merge your chain produces the *standard* prestate hash — and an `op-challenger` pointed at it will never agree with your games. Always confirm your chain actually made it in:
```bash theme={null}
# 1. The build log must list every custom chain that was merged:
# cargo:warning=...: inserting new custom chain <bucket>: [chain-a,chain-b]
# (or "merging custom chains <bucket>: [...]" if the bucket already exists)
#
# 2. The chain name must appear inside the prestate image itself:
gunzip -c rust/kona/prestate-artifacts-cannon/prestate.bin.gz | strings | grep "<chain-name>"
```
Run the `grep` once per chain in your `chainList.json` and confirm at least one match for **every** chain — a build that embeds chain A but drops chain B still produces a valid-looking hash. Zero matches means `KONA_CUSTOM_CONFIGS=true` was not set in the build shell, or `KONA_CUSTOM_CONFIGS_DIR` was a relative path.
</Step>
<Step title="Verify reproducibility">
From a fresh checkout of the same tag with the same custom-configs files in place, repeat the build and confirm the hash is bit-identical. Anyone who wants to participate as an honest challenger on your chain must be able to reproduce this hash from the same inputs.
</Step>
</Steps>
## Deploying and configuring with the custom prestate
<Steps>
<Step title="Host the prestate binary">
Upload `0x<hash>.bin.gz` to wherever you serve preimage files for `op-challenger` — typically a GCS bucket or HTTP endpoint. Files must be named by their absolute prestate hash so the challenger can resolve them on demand.
</Step>
<Step title="Register the custom prestate as game type 8">
On the current (v2.4+) dispute-game contracts the absolute prestate is **not** a constructor argument — it lives in the `DisputeGameFactory`'s per-game-type `gameArgs`, appended to each game via clones-with-immutable-args. So you do **not** deploy a new implementation for a new prestate. Reuse the existing permissionless `FaultDisputeGame` implementation (a fresh op-deployer chain deploys one but leaves it unregistered) and register it for game type 8 with `gameArgs` that carry your prestate.
`gameArgs` for a permissionless game is the packed encoding (124 bytes):
```
abi.encodePacked(absolutePrestate, vm, anchorStateRegistry, weth, l2ChainId)
```
Reuse `vm` / `anchorStateRegistry` / `weth` / `l2ChainId` from an existing registered game type (e.g. read `gameArgs(1)` and swap in your prestate), then register from the `DisputeGameFactory` owner:
```solidity theme={null}
// GAME_TYPE_CANNON_KONA == 8
DisputeGameFactory.setImplementation(8, faultDisputeGameImpl, gameArgs);
DisputeGameFactory.setInitBond(8, initBond); // 0 is fine for a dev/test chain
```
Then make game type 8 the respected type from the Guardian role — `respectedGameType` lives on the `AnchorStateRegistry`, not the `OptimismPortal` (the portal proxies to it):
```solidity theme={null}
AnchorStateRegistry.setRespectedGameType(8);
```
See [Migrating to permissionless fault proofs](/chain-operators/tutorials/migrating-permissionless) for the full role/transaction walkthrough. (On older, pre-v2.4 contracts where `absolutePrestate` was a constructor immutable, each prestate did require a fresh implementation deployment instead.)
</Step>
<Step title="Configure op-challenger">
Add the kona-specific env vars to your existing challenger config:
```bash theme={null}
OP_CHALLENGER_TRACE_TYPE=cannon-kona,permissioned
OP_CHALLENGER_CANNON_KONA_PRESTATES_URL=<HTTP_URL_PATH_TO_PRESTATES>
```
The challenger appends `/0x<hash>.bin.gz` to `*_PRESTATES_URL` to resolve the right binary per dispute. Your existing `OP_CHALLENGER_ROLLUP_CONFIG`, `OP_CHALLENGER_L2_GENESIS`, and `OP_CHALLENGER_GAME_FACTORY_ADDRESS` continue to apply unchanged.
</Step>
</Steps>
## Next Steps
* [Upgrade 19 notice](/notices/archive/upgrade-19) — the `cannon-kona` game type promotion and reference build commands for the standard prestate.
* [Generating absolute prestate and preimage files](/chain-operators/tutorials/absolute-prestate): the standard `kona-client` prestate flow for chains in the Superchain Registry.
* [Generating an op-program absolute prestate (archived)](/chain-operators/tutorials/archive/op-program-prestate): the legacy `op-program` flow, kept only for resolving in-flight `CANNON` (game type `0`) disputes created before [Upgrade 19](/notices/archive/upgrade-19). `op-program` has reached end-of-support; see [End of Support for op-geth and op-program](/notices/archive/op-geth-deprecation).
# Upgrade L1 contracts using op-deployer
Source: https://docs.optimism.io/chain-operators/tutorials/l1-contract-upgrades/op-deployer-upgrade
Version availability and migration paths for the op-deployer upgrade command, which supports L1 contract upgrades up to op-contracts/v5.0.0.
<Warning>
The `op-deployer upgrade` command can be used for upgrades up to `op-contracts/v5.0.0`. It does **not** support
upgrading from `op-contracts/v5.0.0` to `op-contracts/v6.0.0`. For upgrades beyond v5.0.0, use
[superchain-ops](/chain-operators/tutorials/l1-contract-upgrades/superchain-ops-guide) or interact with the
OPCM directly. See the [deprecation notice](/notices/archive/op-deployer-upgrade-deprecation) for details.
</Warning>
## Version availability
The `op-deployer upgrade` command supports the following contract upgrade paths (upgrades must be performed in steps):
| Upgrade path | op-deployer version | Status |
| - | - | - |
| op-contracts/v1.8.0 to op-contracts/v2.0.0 | v0.2.x | Available |
| op-contracts/v2.0.0 to op-contracts/v3.0.0 | v0.3.x | Available |
| op-contracts/v3.0.0 to op-contracts/v4.0.0 | v0.4.x | Available |
| op-contracts/v4.0.0 to op-contracts/v5.0.0 | v0.5.x | Available |
Each minor version of `op-deployer` supported a single release of the governance-approved smart contracts. See the [releases guide](/chain-operators/tools/op-deployer/reference/releases) for more information on versioning.
## Migration
For L1 contract upgrades beyond `op-contracts/v5.0.0`, use [superchain-ops](/chain-operators/tutorials/l1-contract-upgrades/superchain-ops-guide). For non-Optimism governed chains, you can interact with the OPCM directly using your own tooling.
# Upgrade using superchain-ops
Source: https://docs.optimism.io/chain-operators/tutorials/l1-contract-upgrades/superchain-ops-guide
Upgrade your chain's L1 contracts with superchain-ops by creating a task from a template, configuring and simulating it, then executing it or submitting it for review.
This guide outlines the process for upgrading Optimism chains using the `superchain-ops` repository. It's intended primarily for OP Stack chains managed by the Security Council, those with the Foundation or Security Council as signers, and/or chains requiring a highly secure process.
For chains that don't require the enhanced security of superchain-ops or security council signing, alternative upgrade tooling may be used. Note that the `op-deployer upgrade` command only supports upgrades [up to `op-contracts/v5.0.0`](/notices/archive/op-deployer-upgrade-deprecation).
For non-Optimism governed chains, you can use your own tooling to interact with the OPCM directly to upgrade your chain.
`superchain-ops` is a highly secure service designed for Optimism chains. It provides a structured and security-focused approach to chain upgrades. The process involves creating tasks that use predefined templates to generate the necessary upgrade transactions.
## Who should use `superchain-ops`
`superchain-ops` is primarily intended for:
1. **OP Stack chains managed by the Security Council**: For standard chains managed by the Optimism Security Council, upgrades are typically handled through `superchain-ops`.
2. **Chains with Foundation or Security Council as signers**: If your chain has the Foundation multi-sig or Security Council as signers, your upgrade tasks should go through `superchain-ops`.
3. **Chains requiring a highly secure process**: For chains that prioritize security over automation, `superchain-ops` provides an intentionally manual workflow with thorough verification steps (e.g. EVM state diff inspection).
For chains that don't fall into these categories, you'll need to generate appropriate call data for upgrades through other means or develop your own upgrade process for non-OPCM upgrades.
## Understanding templates and tasks
`superchain-ops` uses two key concepts:
* **Templates**: Define what the upgrade is and contain the code for specific upgrade paths (e.g., [`op-contracts/v1.8.0` to `op-contracts/v2.0.0`](https://github.com/ethereum-optimism/superchain-ops/blob/main/src/improvements/template/OPCMUpgradeV200.sol)). Templates are version-specific and live in the [/src/improvements/template](https://github.com/ethereum-optimism/superchain-ops/tree/main/src/improvements/template) directory.
* **Tasks**: Use a template to define a specific upgrade transaction for a chain. Multiple tasks can use the same template. Tasks are organized by network (`eth` or `sep`) in the [/src/improvements/tasks](https://github.com/ethereum-optimism/superchain-ops/tree/main/src/improvements/tasks) directory.
## General upgrade process
The following process outlines how to upgrade a chain using `superchain-ops`, using the [`op-contracts/v1.8.0` to `op-contracts/v2.0.0`](https://github.com/ethereum-optimism/superchain-ops/blob/main/src/improvements/template/OPCMUpgradeV200.sol) upgrade as an example. This same pattern applies to other OPCM-based upgrades (like [`op-contracts/v2.0.0` to `op-contracts/v3.0.0`](https://github.com/ethereum-optimism/superchain-ops/blob/main/src/improvements/template/OPCMUpgradeV300.sol)).
### Step 1: Clone the `superchain-ops` repository
```bash theme={null}
git clone https://github.com/ethereum-optimism/superchain-ops.git
cd superchain-ops/src/improvements
```
### Step 1a: One-time Install Dependencies Setup
Follow the 'Install Dependencies' instructions in the ['Quick Start'](https://github.com/ethereum-optimism/superchain-ops/blob/main/README.md#quick-start) section of the `README.md` file.
### Step 2: Create a new task using the quick start
```bash theme={null}
just new task
```
Follow the prompts to select the appropriate template (e.g., `OPCMUpgradeV200` for a `op-contracts/v1.8.0` to `op-contracts/v2.0.0` upgrade) and provide the necessary details.
This will create a new task directory containing a `config.toml` and `README` file. The config file will look like this:
```bash theme={null}
l2chains = [] # e.g. [{name = "OP Mainnet", chainId = 10}]
templateName = "OPCMUpgradeV200"
```
### Step 3: Configure the task
You'll have to add additional properties to your `config.toml` file to fully configure your task. For example, when upgrading from `op-contracts/v1.8.0` to `op-contracts/v2.0.0`, you can look at a previous task for reference: [src/improvements/tasks/eth/002-opcm-upgrade-v200/config.toml](https://github.com/ethereum-optimism/superchain-ops/blob/main/src/improvements/tasks/eth/002-opcm-upgrade-v200/config.toml):
<Info>
This is an example task. You must figure out which values you'll need for your own specific task. Ensure you replace all addresses and other values in the example below.
</Info>
```bash theme={null}
l2chains = [
{name = "Unichain", chainId = 130}
]
templateName = "OPCMUpgradeV200"
[opcmUpgrades]
absolutePrestates = [
{absolutePrestate = "0x039facea52b20c605c05efb0a33560a92de7074218998f75bcdf61e8989cb5d9", chainId = 130},
]
[addresses]
OPCM = "0x026b2F158255Beac46c1E7c6b8BbF29A4b6A7B76"
StandardValidatorV200 = "0xecabaeaa1d58261f1579232520c5b460ca58a164"
```
### Step 5: Simulate the task
Before executing the upgrade, simulate it to ensure everything is configured correctly:
```bash theme={null}
just --dotenv-path $(pwd)/.env simulate [child-safe-name-depth-1] [child-safe-name-depth-2]
# Both [child-safe-name-depth-1] and [child-safe-name-depth-2] are optional. You'll only need to specify
# [child-safe-name-depth-2] if it's a nested safe and [child-safe-name-depth-2] if it has multiple levels of nesting.
# Omit both arguments if it's a single safe.
```
This will run through the upgrade process without actually executing the transaction.
For more information on the simulate command, please reference the [README](https://github.com/ethereum-optimism/superchain-ops/blob/main/README.md#quick-start).
### Step 6: Execute or submit for review
For OP Stack chains managed by the Security Council, submit a pull request to have your task reviewed. If your chain is not managed by the Security Council, execute the transaction yourself.
# Upgrading Smart Contracts from v1.3.0 to v1.8.0
Source: https://docs.optimism.io/chain-operators/tutorials/l1-contract-upgrades/upgrade-op-contracts-1-3-1-8
Upgrade your OP Stack chain's L1 contracts from op-contracts/v1.3.0 to v1.8.0, moving from the L2 Output Oracle to the permissioned Fault Proof System.
This guide provides specific instructions for upgrading the OP Stack's Layer 1 contracts from `op-contracts/v1.3.0` to `op-contracts/v1.8.0`. This upgrade includes important changes to the system configuration and introduces the Fault Proof System.
## Overview of the Holocene upgrade
The Holocene upgrade is a protocol upgrade. Learn more about it in the [Holocene notice page](https://docs.optimism.io/notices/holocene-changes). This guide shows you how to take your OP Stack chain from the L2 Output Oracle System to a permissioned Fault Proof System contract version associated with the Holocene upgrade.
After upgrading to OP Stack contracts v1.8.0 and enabling permissioned fault proofs, all pending (unfinalized) withdrawal proofs created on L1 are invalidated. This means that withdrawals must be manually reproven by users after the upgrade; the process is not automatic.
### Formatting config files
You need your chain's `deployments.json` and `deploy-config.json`
Ensure both files are correctly formatted, using the exact field names shown in the below examples, with **ALL** values - particularly the relevant ones - updated for **your specific chain**:
`deployments.json`:
```json theme={null}
{
"AddressManager": "0xEF8115F2733fb2033a7c756402Fc1deaa56550Ef",
"L2OutputOracleProxy": "0x9E6204F750cD866b299594e2aC9eA824E2e5f95c",
"OptimismMintableERC20FactoryProxy": "0xc52BC7344e24e39dF1bf026fe05C4e6E23CfBcFf",
"L1StandardBridgeProxy": "0x3e2Ea9B92B7E48A52296fD261dc26fd995284631",
"ProxyAdmin": "0xD4ef175B9e72cAEe9f1fe7660a6Ec19009903b49",
"L1CrossDomainMessengerProxy": "0xdC40a14d9abd6F410226f1E6de71aE03441ca506",
"L1ERC721BridgeProxy": "0x83A4521A3573Ca87f3a971B169C5A0E1d34481c3",
"OptimismPortalProxy": "0x1a0ad011913A150f69f6A19DF447A0CfD9551054",
"SystemConfigProxy": "0xA3cAB0126d5F504B071b81a3e8A2BBBF17930d86"
}
```
`deploy-config.json`:
```json theme={null}
{
"l1StartingBlockTag": "0x10aa183",
"l1ChainID": 1,
"l2ChainID": 7777777,
"l2BlockTime": 2,
"finalizationPeriodSeconds": 604800,
"controller": "0xEe729F57F0111FD0F660867d0F522f983202a5aF",
"baseFeeVaultRecipient": "0xe900b3Edc1BA0430CFa9a204A1027B90825ac951",
"l1FeeVaultRecipient": "0xe900b3Edc1BA0430CFa9a204A1027B90825ac951",
"sequencerFeeVaultRecipient": "0xe900b3Edc1BA0430CFa9a204A1027B90825ac951",
"l2GenesisBlockBaseFeePerGas": "0x3b9aca00",
"governanceTokenOwner": "0xC72aE5c7cc9a332699305E29F68Be66c73b60542",
"governanceTokenSymbol": "OP",
"governanceTokenName": "Optimism",
"maxSequencerDrift": 600,
"sequencerWindowSize": 3600,
"channelTimeout": 300,
"p2pSequencerAddress": "0x3Dc8Dfd0709C835cAd15a6A27e089FF4cF4C9228",
"optimismL2FeeRecipient": "0x63AA492609175d1824dD668BDadF0042E74b0fC8",
"batchInboxAddress": "0x6F54Ca6F6EdE96662024Ffd61BFd18f3f4e34DFf",
"batchSenderAddress": "0x625726c858dBF78c0125436C943Bf4b4bE9d9033",
"l2GenesisRegolithTimeOffset": "0x0",
"l2OutputOracleSubmissionInterval": 180,
"l2OutputOracleStartingTimestamp": -1,
"l2OutputOracleStartingBlockNumber": "0x0",
"l2GenesisBlockGasLimit": "0x1c9c380",
"fundDevAccounts": false,
"gasPriceOracleOverhead": 188,
"gasPriceOracleScalar": 684000,
"eip1559Denominator": 50,
"eip1559Elasticity": 6,
"optimismBaseFeeRecipient": "0xea4591A6e5a31CF0b822A4f563163CeeBeEe4eb1",
"optimismL1FeeRecipient": "0xdD7aCF916c3E3Fb959CA3bB29beFffcAD2e90be6",
"l2CrossDomainMessengerOwner": "0xA53EF9bBec25fdA4b6Da7EF5617565794369A2A5",
"gasPriceOracleOwner": "0x9c3651E0B3CE47A0b17d775077E3d9B712582be0",
- RELEVANT VALUES
"systemConfigOwner": "0xC72aE5c7cc9a332699305E29F68Be66c73b60542",
"finalSystemOwner": "0xC72aE5c7cc9a332699305E29F68Be66c73b60542",
"superchainConfigGuardian": "0x9BA6e03D8B90dE867373Db8cF1A58d2F7F006b3A",
"portalGuardian": "0xC72aE5c7cc9a332699305E29F68Be66c73b60542",
"l2OutputOracleProposer": "0x48247032092e7b0ecf5dEF611ad89eaf3fC888Dd",
"l2OutputOracleOwner": "0xDA1F62857EA7f10444725c6c435235243D623540",
"proxyAdmin": "0x027860cA56cF779371461C14c3a483c94e1aA8a0",
"proxyAdminOwner": "0xb0cCdbD6fe09D2199171BE19450aF249250518A0",
"l2Ou프로젝트로 돌아가기