Skip to content

Commit

Permalink
adding first draft
Browse files Browse the repository at this point in the history
  • Loading branch information
sbvegan committed Sep 26, 2024
1 parent 1810438 commit 05234fa
Show file tree
Hide file tree
Showing 5 changed files with 108 additions and 2 deletions.
3 changes: 2 additions & 1 deletion pages/builders/chain-operators/tools/_meta.json
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"
}
64 changes: 64 additions & 0 deletions pages/builders/chain-operators/tools/op-deployer.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
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>

### Initalize chain

Initializes a chain intent and state file with the following command:

```bash
todo: confirm the command and any necessary parameters
./op-deployer init
```

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.

## Next Steps

* For more details checkout the tool and documnetation 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).
3 changes: 2 additions & 1 deletion pages/stack/_meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@
"protocol": "Protocol",
"transactions": "Transactions",
"security": "Security",
"operators": "Operators"
"operators": "Operators",
"experimental": "Experimental"
}
3 changes: 3 additions & 0 deletions pages/stack/experimental/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"opcm": "OP Contracts Manager"
}
37 changes: 37 additions & 0 deletions pages/stack/experimental/opcm.mdx
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.

## 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.
1. **Deploy Shared Implementation Contracts.** This occurs once per contracts release in production, but is needed for every OP chain deployment in devnet and testnet.
1. **Deploy OP Chain Contracts.** This occurs for every OP chain deployment in production, devnet, and testnet.

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)

0 comments on commit 05234fa

Please sign in to comment.