-
Notifications
You must be signed in to change notification settings - Fork 264
op-deployer + opcm documentation #934
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 2 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
05234fa
adding first draft
sbvegan 2db308b
linting
sbvegan eb9d990
Apply suggestions from code review
sbvegan 55ba456
add more docs
mslipper 6148655
adding tags and fixing link
sbvegan 9b9359b
Update pages/stack/experimental/opcm.mdx
sbvegan d53f6d5
fix installation steps
mslipper 8acc82f
removing problem statement section
sbvegan db530a6
carving out experimental section
sbvegan 0e148df
updates from review
mslipper ee9e13e
fixing internal link
sbvegan 2f9f18a
Apply suggestions from code review
sbvegan 6a41011
Apply suggestions from code review
sbvegan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
{ | ||
"op-challenger": "Configure Challenger For Your Chain", | ||
"op-conductor": "op-conductor", | ||
"op-conductor": "Conductor", | ||
"op-deployer": "Deployer", | ||
"explorer": "Block Explorer" | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
--- | ||
title: Deployer | ||
lang: en-US | ||
tags: ["op-deployer"] | ||
description: Learn how op-deployer can simplify deployment of the OP Stack. | ||
--- | ||
|
||
import { Callout, Steps } from 'nextra/components' | ||
|
||
# Deployer | ||
|
||
This page will teach you what the `op-deployer` tool is and how it works on a high level. The purpose of this tool is to simplify the smart contract deployment process and the genesis file creation process for new OP Stack chains. It is similar to [Terrafrom](https://www.terraform.io/) where you can create intent files to describe how you want your chain to be configured. | ||
|
||
## Contract Deployment | ||
|
||
The `op-deployer` is a golang wrapper around [OP Contracts Manager](/stack/experimental/opcm). Here's a sample of its usage: | ||
|
||
<Steps> | ||
### Initialize chain | ||
|
||
Initializes a chain intent and state file with the following command: | ||
|
||
```bash | ||
todo: confirm the command and any necessary parameters | ||
./op-deployer init | ||
sbvegan marked this conversation as resolved.
Show resolved
Hide resolved
|
||
``` | ||
|
||
You can then modify the configuration files. Here's an example file with a standard configuration: | ||
|
||
```yaml | ||
todo: add sample file | ||
``` | ||
|
||
### Applies chain intent | ||
|
||
Use the following command to apply a chain intent to your network: | ||
|
||
```bash | ||
todo: confirm the command and any necessary parameters | ||
./op-deployer apply | ||
``` | ||
|
||
### Inspect deployment | ||
|
||
Use the following command to inspect the details of your deployment: | ||
|
||
``` | ||
todo: confirm the command and any necessary parameters | ||
./op-deployer inspect | ||
``` | ||
</Steps> | ||
|
||
## Genesis Creation | ||
|
||
todo: is this baked into the commands above? | ||
|
||
The `op-deployer` will take the smart contract deployment artifacts and to generate the genesis file for your layer two network. | ||
mslipper marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
## Next Steps | ||
|
||
* For more details checkout the tool and docs in the [monorepo](https://github.com/ethereum-optimism/optimism/tree/develop/op-chain-ops/cmd/op-deployer) | ||
* For more details on OP Contracts Manger checkout these [opcm docs](/stack/experimental/opcm). | ||
sbvegan marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"opcm": "OP Contracts Manager" | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- | ||
title: OP Contracts Manager | ||
lang: en-US | ||
tags: ["opcm"] | ||
description: Learn how OP Contracts Manager deploys of the OP Stack with one transaction. | ||
--- | ||
|
||
import { Callout, Tabs, Steps } from 'nextra/components' | ||
|
||
# OP Contracts Manager | ||
|
||
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. | ||
|
||
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`. | ||
|
||
## Problem statement | ||
|
||
The current L2 chain deployment approach originates from a time with Hardhat, single L1 target, and a single monolithic set of features. Since then the system has migrated to Foundry and extended for more features, but remains centered around a single monolithic deploy-config for all its features. | ||
|
||
The interop team needs a way to configure new multi-L2 deployments: The number of ways to compose L2s in tests grows past what a single legacy config template can support. | ||
|
||
Outside of interop, deployment also seems increasingly complex and opaque, while it does not have to be, due to the same configuration and composability troubles. | ||
sbvegan marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
## Purpose | ||
|
||
OPCM simplifies the L1 contract deployments for new OP Stack chains. It addresses three aspects of deploying the OP Stack's L1 contracts: | ||
|
||
1. **Deploy Superchain Contracts.** Superchain contracts are shared between many OP chains, so this occurs only occasionally in production, but is needed for every OP chain deployment in devnet and testnet. | ||
2. **Deploy Shared Implementation Contracts.** This occurs once per contracts release in production, but is needed for every OP chain deployment in devnet and testnet. | ||
3. **Deploy OP Chain Contracts.** This occurs for every OP chain deployment in production, devnet, and testnet. | ||
sbvegan marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
In a future iteration, it also is meant to handle upgrading the smart contracts. | ||
|
||
## Learn more | ||
|
||
* Checkout the [OPCM specs](https://specs.optimism.io/experimental/op-contracts-manager.html) | ||
* Checkout the [OPCM design document](https://github.com/ethereum-optimism/design-docs/blob/main/protocol/op-contracts-manager-arch.md) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.