This page is for people developing OP Deployer itself. If you only need to pick the right OP Deployer release
for your contract version, see the releases reference.
Publish a Release
Pushing anop-deployer/vX.Y.Z tag runs the release-op-deployer GitHub Actions workflow, which builds the binaries and
attaches them to a draft GitHub release. If the tagged commit doesn’t contain the workflow, run it from develop with
the tag as its input.
Wait until the workflow run succeeds, then add the release notes and publish the draft:
Backport a Fix to an Earlier Version
From time to time, we may backport bugfixes from develop onto earlier versions of OP Deployer. The process for this is as follows:- If one doesn’t exist already, make a new branch for the version lineage you’re patching (e.g.
v0.2.x). This branch should be protected (not deletable) and should be based on the latest release of that lineage. The branch should be named as follows:backports/op-deployer/<lineage, i.e. v0.2.0>. - Open a PR with the backport against that branch. Be sure to reference the original commit in the backport.
- Make and push a new tag on that lineage.
develop to create a new release op-deployer/v0.2.1:
Cut a Test Release
To get a test build of OP Deployer before a proposal branch exists, tag adevelop commit as
op-deployer/v<next minor>-dev-test.<N>. Start N at 1 and increment it for each new test build of that minor
version:
release-op-deployer marks the draft as a pre-release.
Wait for them to finish, then publish the draft.
To test a feature, cut from that feature’s branch rather than develop and tag it as
op-deployer/v<next minor>-<feature label>-test.<N>. For example, the op-deployer/v0.8.0-pcd-test.N tags were cut from the chore/pcd-deployer-release* branches.
A test release has no superchain-registry entry, so its users select the OPCM themselves. See
Release Without a Registry Entry.
Add Support for a New Contract Version
Adding support for a new contract version is a multi-step process. Here’s a high-level overview. For the sake of simplicity we will assume you are adding support for a newrc release.
OP Deployer is released from the same proposal/op-contracts/vX.Y.Z branch as the contracts it supports, so the two
stay compatible while contract development continues on develop. The contract artifacts are embedded in the binary
at build time from that checkout, so there is nothing to publish or pin for them.
Step 1: Add Support on Develop
First, you need to add support for the new contract version on thedevelop branch. This means ensuring that the
deployment pipeline supports whatever changes are required for the new version. Typically, this means passing in new
deployment variables, and responding to ABI changes in the Solidity scripts/OPCM.
Step 2: Tag the Contracts Release
The contracts team tags the release asop-contracts/vX.Y.Z-rc.n and deploys the OPCM, following the
contracts release process.
The OP Deployer release is cut from the same commit.
Step 3: Update the SR With the New Release
A test release, or a variant that should not become the standard release, can skip this step and Step 4. See Release Without a Registry Entry. Add the new RC to the standard versions in the superchain-registry, with the addresses from the OPCM deployment.Step 4: Update the Validation Package and the Current Tag
The SR is pulled into OP Deployer via thevalidation package. On the proposal branch, update it:
op-deployer/pkg/deployer/standard/standard.go, add a constant for the new tag and point CurrentTag at it:
CurrentTag is how OP Deployer resolves the standard OPCM address from the registry. Open a PR against the proposal
branch. Once it merges, cherry-pick the OP Deployer changes to develop.
Step 5: Tag the Release
The OP Deployer minor version tracks the contracts major version: contractsvX.0.0 pairs with op-deployer/v0.X.0.
Check that the required CircleCI checks, ci-gate-proposals and required-contracts-ci, are green on the head of the
proposal branch. Then tag that commit and push the tag:
Build images, which publishes the docker images, and
release-op-deployer, which attaches the binaries to a draft GitHub release and marks a release candidate as a
pre-release. Wait for both to finish, then add the release notes and publish the draft. Announce
the release in #proj-op-deployer and #solutions.
Release Without a Registry Entry
A test release, or a variant that should not become the standard release, can leave its deployment addresses out of the superchain-registry and leaveCurrentTag (see Step 4) unchanged. Users then pick the new OPCM by setting
opcmAddress in their intent:
custom or standard-overrides intent type. A standard intent accepts only the OPCM that the
registry lists for CurrentTag. op-deployer init writes that address into standard and standard-overrides intents,
so a chain that doesn’t replace it keeps the registry’s release. An intent that sets opcmAddress must leave
superchainRoles unset.
Because the registry doesn’t list the release, the release notes must give the OPCM address for each L1 network and tell
users to set opcmAddress. Release candidates and final releases go through Steps 3 and 4.