TL;DR
This is the primary place where Optimism works on stuff related to Optimistic Ethereum.
Documentation
Extensive documentation is available here.
Community
Contributing
Read through CONTRIBUTING.md for a general overview of our contribution process.
Directory Structure
packages
: Contains all the typescript packages and contractscontracts
: Solidity smart contracts implementing the OVMcore-utils
: Low-level utilities and encoding packagescommon-ts
: Common tools for TypeScript code that runs in Nodedata-transport-layer
: Event indexer, allowing thel2geth
node to access L1 databatch-submitter
: Daemon for submitting L2 transaction and state root batches to L1message-relayer
: Service for relaying L2 messages to L1replica-healthcheck
: Service to monitor the health of different replica deployments
l2geth
: Fork of go-ethereum v1.9.10 implementing the OVM.integration-tests
: Integration tests between a L1 testnet,l2geth
,ops
: Contains Dockerfiles for containerizing each service involved in the protocol, as well as a docker-compose file for bringing up local testnets easily
Branching Model and Releases
Active Branches
Branch | Status |
---|---|
master | Accepts PRs from develop when we intend to deploy to mainnet. |
develop | Accepts PRs that are compatible with master OR from regenesis/X.X.X branches. |
regenesis/X.X.X | Accepts PRs for all changes, particularly those not backwards compatible with develop and master . |
Overview
We generally follow this Git branching model. Please read the linked post if you're planning to make frequent PRs into this repository (e.g., people working at/with Optimism).
master
branch
The The master
branch contains the code for our latest "stable" releases. Updates from master
always come from the develop
branch. We only ever update the master
branch when we intend to deploy code within the develop
to the Optimistic Ethereum mainnet. Our update process takes the form of a PR merging the develop
branch into the master
branch.
develop
branch
The Our primary development branch is develop
. develop
contains the most up-to-date software that remains backwards compatible with our latest experimental network deployments. If you're making a backwards compatible change, please direct your pull request towards develop
.
Changes to contracts within packages/contracts/contracts
are usually NOT considered backwards compatible and SHOULD be made against a release candidate branch. Some exceptions to this rule exist for cases in which we absolutely must deploy some new contract after a release candidate branch has already been fully deployed. If you're changing or adding a contract and you're unsure about which branch to make a PR into, default to using the latest release candidate branch. See below for info about release candidate branches.
Release new versions
Developers can release new versions of the software by adding changesets to their pull requests using yarn changeset
. Changesets will persist over time on the develop
branch without triggering new version bumps to be proposed by the Changesets bot. Once changesets are merged into master
, the bot will create a new pull request called "Version Packages" which bumps the versions of packages. The correct flow for triggering releases is to re-base these pull requests onto develop
and merge them, and then create a new pull request to merge develop
onto master
. Then, the release
workflow will trigger the actual publishing to npm
and Docker hub.
Release candidate branches
Branches marked regenesis/X.X.X
are release candidate branches. Changes that are not backwards compatible and all changes to contracts within packages/contracts/contracts
MUST be directed towards a release candidate branch. Release candidates are merged into develop
and then into master
once they've been fully deployed. We may sometimes have more than one active regenesis/X.X.X
branch if we're in the middle of a deployment. See table in the Active Branches section above to find the right branch to target.
License
Code forked from go-ethereum
under the name l2geth
is licensed under the GNU GPLv3 in accordance with the original license.
All other files within this repository are licensed under the MIT License unless stated otherwise.