Optimism 백서

Optimism

원문

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

| | Confirm set | `--cannon-kona-prestates-url` (`OP_CHALLENGER_CANNON_KONA_PRESTATES_URL`) | The prestate-server URL you validated in the preconditions | | Confirm set | `--cannon-kona-network` (`OP_CHALLENGER_CANNON_KONA_NETWORK`) or `--cannon-kona-depset-config` (`OP_CHALLENGER_CANNON_KONA_DEPSET_CONFIG`) | One must be set so kona can resolve the dependency set for `SUPER_CANNON_KONA`. | On a permissionless chain, confirm the startup log lists `super-cannon-kona` as registered and shows no connection errors against the single-chain super-root RPC endpoint. On a permissioned chain, confirm the existing trace types remain registered; do not configure a `SUPER_PERMISSIONED` trace type. `op-challenger` is still required on permissioned chains to update the `AnchorStateRegistry` as `SUPER_PERMISSIONED` games finalize. ### Update op-dispute-mon Update the running `op-dispute-mon` for the chain. | Action | Flag (env var) | Value | | - | - | - | | Add | `--superroot-rpc` (`OP_DISPUTE_MON_SUPERROOT_RPC`) | `$SUPER_ROOT_RPC` | Keep `--rollup-rpc`. `op-dispute-mon` discovers games from the existing `DisputeGameFactory` and does not need a game-type filter change. After the restart, confirm the existing-games metrics keep populating. ### Leave op-proposer Unchanged for Now Skip `op-proposer` until cutover. Its configuration changes in [Switch op-proposer to Super Roots](#switch-op-proposer-to-super-roots). ## Generate the Starting Anchor Super Root The upgrade must re-initialise `<ASR>` with a super-root-shaped starting anchor. The existing on-chain `startingAnchorRoot` is in output-root form (its `l2SequenceNumber` is an L2 block number), so the template must inject a fresh super-root value via `overrides.cfg.startingAnchorRoot` in `extraInstructions`. Confirm in the precondition above that the template has been extended to read this from TOML and pass it through. Compute the value using `superroot_atTimestamp`. Pick the current finalized timestamp (or any recent finalized timestamp), then ask the single-chain RPC endpoint for the super root at that timestamp. ```bash theme={null} # .finalized_l2.timestamp is a JSON number (decimal Unix seconds). TS=$(cast rpc optimism_syncStatus --rpc-url $SUPER_ROOT_RPC | jq -r '.finalized_l2.timestamp') # superroot_atTimestamp expects a hex-encoded JSON string (hexutil.Uint64); cast 2h handles the conversion. cast rpc superroot_atTimestamp "$(cast 2h $TS)" --rpc-url $SUPER_ROOT_RPC | jq -r '.data.super_root' echo "timestamp=$TS" ``` Capture two values: * `super_root` (a `bytes32` hash from `.data.super_root`) — passed as `Proposal.root` in `overrides.cfg.startingAnchorRoot`. * `timestamp` (the uint64 you passed in) — passed as `Proposal.l2SequenceNumber`. This field is the timestamp itself, not a block number or sequence index. ## Build the superchain-ops Task Author a new task directory under `superchain-ops/src/tasks/<network>/<NNN-name>/` using the `OPCMUpgradeV800` template. The schema below assumes the template has been extended (per the precondition above) to also read a starting super-root anchor and inject it as `overrides.cfg.startingAnchorRoot`. ### Configure config.toml ```toml theme={null} l2chains = [ {name = "<chain name>", chainId = <chain id>}, ] templateName = "OPCMUpgradeV800" [[opcmUpgrades]] chainId = <chain id> # Kona-interop super prestate, used by SUPER_CANNON_KONA. The `-interop` variant # supports super roots and works whether # or not interop is enabled or scheduled on the chain. cannonKonaPrestate = "0x<kona-interop super prestate>" expectedValidationErrors = "" # fill in after the dry run initBond = 80000000000000000 # 0.08 ether, applied to `SUPER_CANNON_KONA` games; the template always forces SUPER_PERMISSIONED to 0 startingRespectedGameType = <9 or 5> # 9 permissionless, 5 permissioned # Pending template extension — see the "Generate the Starting Anchor Super Root" section. startingAnchorRoot = { root = "0x<super root hash>", l2SequenceNumber = <timestamp> } [addresses] OPCM = "0x<OPCM v8.x.y address>" ``` The template derives everything else (per-game-type config, `SuperchainConfig`, validator, etc.) automatically — no further TOML required. ### Capture expectedValidationErrors Run the task in simulation mode against an L1 fork from inside the task directory: ```bash theme={null} cd superchain-ops/src/tasks/<network>/<NNN-name> just simulate ``` If the validator's output does not match `expectedValidationErrors` in TOML, the simulation reverts with a message of the form `Unexpected errors: <actual>; expected: <expectedValidationErrors>`. Read the actual codes from that revert message. The default expectation is **no errors** — `expectedValidationErrors = ""` and a clean simulation. Any non-empty error string must be reviewed code by code, not copy-pasted. For each code: * **Resolve it** if it points at a fixable input — a wrong address, a wrong prestate, a template release mismatch, a missing override, or a registry entry that needs updating. * **Add it to `expectedValidationErrors` only after justifying it** with an inline comment in the TOML explaining why it is structurally expected for this chain. The simulation passes once every printed code has been either resolved or knowingly added with justification. Treat any code you cannot explain as a hard stop. ## Execute the Upgrade 1. **Stop `op-proposer` for the chain.** Existing games continue to resolve; only new proposals halt. 2. **Leave `op-challenger` and `op-dispute-mon` running.** Both were configured earlier and pick up super-root games automatically. 3. **Sign and broadcast the task** using your team's standard `superchain-ops` signing workflow. 4. **Wait for the L1 transaction to confirm.** The on-chain effect: * `<ASR>` is re-initialised with the supplied anchor and respected game type. The retirement timestamp is not bumped, so existing in-flight games stay valid. * The super dispute game implementation or implementations are installed on `<DGF>`. * Implementation pointers for the game types passed with `enabled = false` are cleared, blocking creation of new games of those types. ## Verify the Upgrade On-Chain Run the checks below before you cut `op-proposer` over. <Warning>If any check fails, stop, do not start the new proposer, and escalate via your standard incident-response channel. Recovery from a half-cut state with a misbehaving proposer is materially harder than recovery from a paused proposer.</Warning> ### Common Checks ```bash theme={null} # Respected game type cast call <ASR> 'respectedGameType()(uint32)' --rpc-url $L1_RPC # Expect: 9 (permissionless) or 5 (permissioned) # Anchor root and timestamp cast call <ASR> 'getAnchorRoot()(bytes32,uint256)' --rpc-url $L1_RPC # Expect: (<super root hash>, <timestamp>) from the previous step # Retirement timestamp unchanged cast call <ASR> 'retirementTimestamp()(uint64)' --rpc-url $L1_RPC # Expect: same value as before the upgrade # Pre-migration impls cleared cast call <DGF> 'gameImpls(uint32)(address)' 0 --rpc-url $L1_RPC # CANNON cast call <DGF> 'gameImpls(uint32)(address)' 1 --rpc-url $L1_RPC # PERMISSIONED_CANNON cast call <DGF> 'gameImpls(uint32)(address)' 8 --rpc-url $L1_RPC # CANNON_KONA # Expect each: 0x0000000000000000000000000000000000000000 ``` ### Permissionless Chain Checks ```bash theme={null} cast call <DGF> 'gameImpls(uint32)(address)' 5 --rpc-url $L1_RPC # SUPER_PERMISSIONED cast call <DGF> 'gameImpls(uint32)(address)' 9 --rpc-url $L1_RPC # SUPER_CANNON_KONA # Expect both: non-zero cast call <DGF> 'initBonds(uint32)(uint256)' 5 --rpc-url $L1_RPC # Expect: 0 cast call <DGF> 'initBonds(uint32)(uint256)' 9 --rpc-url $L1_RPC # Expect: 80000000000000000, or the configured SUPER_CANNON_KONA bond ``` ### Permissioned Chain Checks ```bash theme={null} cast call <DGF> 'gameImpls(uint32)(address)' 5 --rpc-url $L1_RPC # SUPER_PERMISSIONED # Expect: non-zero cast call <DGF> 'initBonds(uint32)(uint256)' 5 --rpc-url $L1_RPC # Expect: 0 cast call <DGF> 'gameImpls(uint32)(address)' 9 --rpc-url $L1_RPC # SUPER_CANNON_KONA # Expect: 0x0000000000000000000000000000000000000000 ``` ## Switch op-proposer to Super Roots Start `op-proposer` with the new configuration. | Flag (env var) | Old | New | | - | - | - | | `--rollup-rpc` (`OP_PROPOSER_ROLLUP_RPC`) | set | **remove** | | `--superroot-rpcs` (`OP_PROPOSER_SUPERROOT_RPCS`) | unset | `$SUPER_ROOT_RPC`, or a list of high-availability endpoints that each return a super root containing only this chain | | `--game-type` (`OP_PROPOSER_GAME_TYPE`) | `0` or `1` | numeric: `9` for permissionless, `5` for permissioned | | `--game-factory-address` (`OP_PROPOSER_GAME_FACTORY_ADDRESS`) | unchanged | unchanged (same `<DGF>`) | Other flags such as `--proposal-interval` and `--poll-interval` stay the same. After start-up, verify: * The logs show the proposer polling the configured single-chain super-root RPC endpoint and contain no references to `--rollup-rpc`. * Within one `--proposal-interval`, the proposer submits a new game. Inspect it: ```bash theme={null} COUNT=$(cast call <DGF> 'gameCount()(uint256)' --rpc-url $L1_RPC) # Expect: increased by 1 since the upgrade echo "gameCount=$COUNT" read -r GAME_TYPE CREATED_AT GAME_PROXY < <(cast call <DGF> 'gameAtIndex(uint256)(uint32,uint64,address)' $((COUNT-1)) --rpc-url $L1_RPC) # Expect: gameType matches the configured super type (5 or 9) and gameProxy is non-zero. echo "gameType=$GAME_TYPE createdAt=$CREATED_AT gameProxy=$GAME_PROXY" cast call $GAME_PROXY 'rootClaim()(bytes32)' --rpc-url $L1_RPC cast call $GAME_PROXY 'l2SequenceNumber()(uint256)' --rpc-url $L1_RPC ``` * Recompute the super root for the proposed timestamp and confirm it matches the proposal: ```bash theme={null} cast rpc superroot_atTimestamp "$(cast 2h <l2SequenceNumber from above>)" \ --rpc-url $SUPER_ROOT_RPC | jq -r '.data.super_root' # Expect: equals rootClaim from above ``` This confirms `op-proposer` is correctly configured and passing valid super roots. ## Verify After the Upgrade Run these checks once the proposer is stable. * **Pre-migration game still resolves.** Pick a still-in-flight pre-migration game (use `op-dispute-mon` dashboards or `gameAtIndex` to find one) and watch its status until it resolves: ```bash theme={null} cast call <gameProxy> 'status()(uint8)' --rpc-url $L1_RPC # 0 = IN_PROGRESS, 1 = CHALLENGER_WINS, 2 = DEFENDER_WINS ``` * **`op-challenger` traces `SUPER_CANNON_KONA` when enabled.** On a permissionless chain, verify the startup log lists `super-cannon-kona` and ongoing logs contain no scheduler or game-poll errors as type-9 games appear. On a permissioned chain, `op-challenger` continues to update the `AnchorStateRegistry` when `SUPER_PERMISSIONED` games finalize but does not need to post claims. * **`op-dispute-mon` reports super-root games.** Confirm `op_dispute_mon_games` reports the enabled super game types and `op_dispute_mon_failed_games` remains zero. On a permissioned chain, alert on `op_dispute_mon_games_agreement{status="disagree_defender_wins"}` and `Unexpected game result` logs for `SUPER_PERMISSIONED`. * **No new pre-migration games can be created.** Optionally call `DisputeGameFactory.create` with one of the disabled game types and confirm it reverts. * **Anchor advances on first super-game finalisation.** The first anchor update typically lands \~7 days after the first super-root game is created (game duration plus `DISPUTE_GAME_FINALITY_DELAY_SECONDS`). Do not block the rollout on this — schedule a follow-up to re-run `getAnchorRoot()` after that window and confirm it returns the new game's claim instead of the starting root. Track via `op-dispute-mon` rather than waiting in-line. # EAS contracts and attestation schemas Source: https://docs.optimism.io/governance/attestation-schemas Contract addresses for the Ethereum Attestation Service and the attestation schemas used across the Optimism Collective. This page catalogues the [Ethereum Attestation Service ("EAS")](https://attest.sh/) contract addresses on OP Mainnet and OP Sepolia, the ways to read and write attestations, and the attestation schemas used across the Optimism Collective. For how attestations underpin identity in the Collective, see [How identity works in the Optimism Collective](/governance/eas-attestations). For details on the EAS predeploys themselves, see the [smart contracts overview](/op-stack/protocol/smart-contracts#eas-ethereum-attestation-service). ## EAS contract addresses The [Ethereum Attestation Service](https://docs.attest.sh/docs/welcome) is deployed on these addresses: | **Network** | **Attestation Contract** | **Schema Registry Contract** | | - | - | - | | OP Sepolia | [0x4200000000000000000000000000000000000021](https://sepolia-optimism.etherscan.io/address/0x4200000000000000000000000000000000000021) | [0x4200000000000000000000000000000000000020](https://sepolia-optimism.etherscan.io/address/0x4200000000000000000000000000000000000020) | | OP Mainnet | [0x4200000000000000000000000000000000000021](https://optimistic.etherscan.io/address/0x4200000000000000000000000000000000000021) | [0x4200000000000000000000000000000000000020](https://optimistic.etherscan.io/address/0x4200000000000000000000000000000000000020) | ## How to read and write attestations You can read and write attestations in several ways: * [EAS scan user interface (OP Mainnet)](https://optimism.easscan.org/) * [EAS scan user interface (OP Sepolia)](https://optimism-sepolia.easscan.org/) * [JavaScript SDK](https://docs.attest.sh/docs/developer-tools/eas-sdk) * [Access directly onchain](https://github.com/ethereum-attestation-service/eas-contracts/blob/master/contracts/EAS.sol) (if you need to attest from a smart contract) ## Indexing Indexing is available via: * [GraphQL endpoint](https://docs.attest.sh/docs/developer-tools/api) * [Ponder graph](https://github.com/ethereum-attestation-service/eas-ponder-graph) * [Open source indexer](https://github.com/ethereum-attestation-service/eas-indexing-service) ## Schemas Schemas define the structure and type of data that can be included in an attestation. Below you will find a list of relevant schemas that are being used on OP Mainnet. Schemas are built using the [Ethereum Attestation Service](https://docs.attest.sh/docs/welcome). ### General schemas * [**Gitcoin Passport V1 scores schema UID**](https://optimism.easscan.org/schema/view/0x6ab5d34260fca0cfcf0e76e96d439cace6aa7c3c019d7c4580ed52c6845e9c89): `0x6ab5d34260fca0cfcf0e76e96d439cace6aa7c3c019d7c4580ed52c6845e9c89` * [**Superchain Faucet schema UID**](https://optimism.easscan.org/schema/view/0x98ef220cd2f94de79fbc343ef982bfa8f5b315dec6a08f413680ecb7085624d7): `0x98ef220cd2f94de79fbc343ef982bfa8f5b315dec6a08f413680ecb7085624d7` ### Schemas related to project creation and Retro Funding application [**Project and organization identifier**](https://optimism.easscan.org/schema/view/0xff0b916851c1c5507406cfcaa60e5d549c91b7f642eb74e33b88143cae4b47d0) Used as the unique identifier for projects and organizations created on or after 23 August 2024. For projects created earlier, please see the [archived schemas](#archived-schemas) at the bottom of this page. | **Schema UID** | **`0xff0b916851c1c5507406cfcaa60e5d549c91b7f642eb74e33b88143cae4b47d0`** | | - | - | | Issuer | Attestations issued as part of Retro Funding sign up are issued by `0xF6872D315CC2E1AfF6abae5dd814fd54755fE97C` | | farcasterID | The Farcaster id of the individual who created the project or organization | | type | "Project" or "Organization" | [**Organization metadata**](https://optimism.easscan.org/schema/view/0xc2b376d1a140287b1fa1519747baae1317cf37e0d27289b86f85aa7cebfd649f) Used to associate metadata to an organization. Re-issued each time there is a change to metadata | **Schema UID** | **`0xc2b376d1a140287b1fa1519747baae1317cf37e0d27289b86f85aa7cebfd649f`** | | - | - | | Issuer | Attestations issued as part of Retro Funding sign up are issued by `0xF6872D315CC2E1AfF6abae5dd814fd54755fE97C` | | Recipient | Null | | RefUID | The attestation UID of the organization this metadata relates to | | farcasterID | The Farcaster id of the individual who published the organization metadata | | name | The name of the organization | | projects | The array of projects that belong to this organization | | parentOrgUID | The attestation UID of this organization's parent, in case it has one | | metadataType | How the metadata can be accessed. 1 for ipfs, 2 for http | | metadataUrl | The storage location where the metadata can be retrieved | [**Project metadata**](https://optimism.easscan.org/schema/view/0xe035e3fe27a64c8d7291ae54c6e85676addcbc2d179224fe7fc1f7f05a8c6eac) Used to associate metadata to a project. Re-issued each time there is a change to metadata. | **Schema UID** | **`0xe035e3fe27a64c8d7291ae54c6e85676addcbc2d179224fe7fc1f7f05a8c6eac`** | | - | - | | Issuer | Attestations issued as part of Retro Funding sign up are issued by `0xF6872D315CC2E1AfF6abae5dd814fd54755fE97C` | | Recipient | Null | | projectRefUID | The attestation UID of the project this metadata relates to | | farcasterID | The Farcaster id of the individual who published the project metadata | | name | The name of the project | | category | The category of the project | | parentProject RefUID | The attestation UID of this project's parent project, in case it has a parent | | metadataType | How the metadata can be accessed. 1 for ipfs, 2 for http | | metadataUrl | The storage location where the metadata can be retrieved | [**Retro funding application**](https://optimism.easscan.org/schema/view/0x2169b74bfcb5d10a6616bbc8931dc1c56f8d1c305319a9eeca77623a991d4b80) Used to identify a project's application to a specific Retro Funding Round. This attestation is used for Retro Funding Round 6 and beyond. | **Schema UID** | **`0x2169b74bfcb5d10a6616bbc8931dc1c56f8d1c305319a9eeca77623a991d4b80`** | | - | - | | Issuer | Attestations issued as part of Retro Funding sign up are issued by: `0xF6872D315CC2E1AfF6abae5dd814fd54755fE97C` | | Recipient | Null | | round | The round number for which this application was submitted | | metadataType | How the metadata can be accessed. 1 for ipfs, 2 for http | | metadataUrl | The storage location where the metadata can be retrieved | | farcasterID | The individual that submitted this application on behalf of the project. | | metadataSnapshot RefUID | The project metadata at the time the application was submitted. | [**Retro funding application approval/rejection**](https://optimism.easscan.org/schema/view/0x683b1b399d47aabed79c9aa8f2674729021174b6e5cce1e20675eab404fc82d6) Used to identify which Retro Funding applications have been approved or rejected. | **Schema UID** | **`0x683b1b399d47aabed79c9aa8f2674729021174b6e5cce1e20675eab404fc82d6`** | | - | - | | Issuer | Currently, the Optimism Foundation issues these from the following address: `0xE4553b743E74dA3424Ac51f8C1E586fd43aE226F` | | Recipient | Null | | projectApplicationUID | The unique identifier of the projects Retro Funding application. | | Status | The status of the Retro Funding application. | | Reason | Identifier for the reason an application was rejected. 1 = "Duplicate Application", 2 = "Deceiving Badgeholders", 3 = "Spam", 4 = "Not meeting eligibility criteria" | [**Retro funding rewards**](https://optimism.easscan.org/schema/view/0x670ad6e6ffb842d37e050ea6d3a5ab308195c6f584cf2121076067e0d8adde18) Used to identify the reward amount each approved project received in a Retro Funding round | **Schema UID** | **`0x670ad6e6ffb842d37e050ea6d3a5ab308195c6f584cf2121076067e0d8adde18`** | | - | - | | Issuer | Currently, the Optimism Foundation issues these from the following address: `0xE4553b743E74dA3424Ac51f8C1E586fd43aE226F` | | Recipient | Null | | refUID | The UID of the Retro Funding application | | projectRefUID | The unique identifier of the project | | round | The re
프로젝트로 돌아가기