Tagging and Release Process
Creating a tagged release
First select a tag string based on the guidance in Monorepo Contracts Release Versioning
- Checkout the commit
- Run
git tag <tag-string> - Run
git push origin <tag-string>Repo rules require this is done by someone who is a release-manager. Once pushed a tag cannot be deleted, so please be sure it is correct. - Create release notes in Github:
- Go to the Releases page, enter or select
<tag-string>from the dropdown.
- Go to the Releases page, enter or select
- Populate the release notes. If the tag is a release candidate, check the
Set as a pre-releaseoption, and uncheck theSet as the latest releaseoption. - Deploy the OPCM using the following op-deployer just recipes (which call the
op-deployer bootstrap implementationscommand), this will write the addresses of the deployed contracts tostdout(or to disk if you provide an--outfileargument).
Deploy and verify contracts on both Sepolia and Mainnet.cd op-deployer just build // compiles contracts, builds go binary just deploy-opcm // deploys the implementations contracts bundle just verify-opcm // verifies contracts on block-explorer - In the superchain-registry edit the following files to add a new
[<tag-string>]entry, with the addresses from the previous step: - Once the changes are merged into the superchain-registry, you can follow the instructions
for creating a new release of
op-deployer.
Implications for audits
The process above should be followed to create an -rc.1 release prior to audit. This will be the target commit for
the audit. If any fixes are required by the audit results an Additional Release Candidate will be required.
Additional Release Candidates
Sometimes fixes or additional changes need to be added to a release candidate version. In that case we want to ensure fixes are made on both the release and the trunk branch, without stopping development efforts on the trunk branch.
The process is as follows:
- Make the fixes on
develop. Increment the contracts semver as normal. - Create a new release branch, named
proposal/op-contracts/vX.Y.Zoff of the rc tag (all subsequent-rctags will be made from this branch). - Cherry pick the fixes from
developinto the release branch, and increment the semver as normal. If this increment results in any of the modified contracts' semver being equal to or greater than it is ondevelop, then the semver should immediately be increased ondevelopto be greater than on the release branch. This avoids a situation where a given contract has two different implementations with the same version. - After merging the changes into the new release branch, tag the resulting commit on the proposal branch as
op-contracts/vX.Y.Z-rc.n. Create a new release for this tag per the instructions above.
Finalizing a release
Once a release has passed governance, a new tag should be created without the -rc.n suffix. To do this follow the
instructions in "Creating a tagged release" once again. It should not be necessary to redeploy the contracts with op-deployer,
but a new entry will be required in the superchain-registry's toml files regardless.
When creating release notes, uncheck the Set as a pre-release option, and uncheck the
Set as the latest release option (latest releases are reserved for non-contract packages).