• Stars
    star
    5,098
  • Rank 7,841 (Top 0.2 %)
  • Language
    Go
  • License
    MIT License
  • Created over 4 years ago
  • Updated 28 days ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Optimism is Ethereum, scaled.


Optimism

Optimism is Ethereum, scaled.


What is Optimism?

Optimism is a project dedicated to scaling Ethereum's technology and expanding its ability to coordinate people from across the world to build effective decentralized economies and governance systems. The Optimism Collective builds open-source software for running L2 blockchains and aims to address key governance and economic challenges in the wider cryptocurrency ecosystem. Optimism operates on the principle of impact=profit, the idea that individuals who positively impact the Collective should be proportionally rewarded with profit. Change the incentives and you change the world.

In this repository, you'll find numerous core components of the OP Stack, the decentralized software stack maintained by the Optimism Collective that powers Optimism and forms the backbone of blockchains like OP Mainnet and Base. Designed to be "aggressively open source," the OP Stack encourages you to explore, modify, extend, and test the code as needed. Although not all elements of the OP Stack are contained here, many of its essential components can be found within this repository. By collaborating on free, open software and shared standards, the Optimism Collective aims to prevent siloed software development and rapidly accelerate the development of the Ethereum ecosystem. Come contribute, build the future, and redefine power, together.

Documentation

Community

General discussion happens most frequently on the Optimism discord. Governance discussion can also be found on the Optimism Governance Forum.

Contributing

Read through CONTRIBUTING.md for a general overview of the contributing process for this repository. Use the Developer Quick Start to get your development environment set up to start working on the Optimism Monorepo. Then check out the list of Good First Issues to find something fun to work on!

Security Policy and Vulnerability Reporting

Please refer to the canonical Security Policy document for detailed information about how to report vulnerabilities in this codebase. Bounty hunters are encouraged to check out the Optimism Immunefi bug bounty program. The Optimism Immunefi program offers up to $2,000,042 for in-scope critical vulnerabilities.

The Bedrock Upgrade

OP Mainnet is currently preparing for its next major upgrade, Bedrock. You can find detailed specifications for the Bedrock upgrade within the specs folder in this repository.

Please note that a significant number of packages and folders within this repository are part of the Bedrock upgrade and are NOT currently running in production. Refer to the Directory Structure section below to understand which packages are currently running in production and which are intended for use as part of the Bedrock upgrade.

Directory Structure

~~ Production ~~
├── packages
│   ├── common-ts: Common tools for building apps in TypeScript
│   ├── contracts: L1 and L2 smart contracts for Optimism
│   ├── contracts-periphery: Peripheral contracts for Optimism
│   ├── core-utils: Low-level utilities that make building Optimism easier
│   ├── data-transport-layer: Service for indexing Optimism-related L1 data
│   ├── chain-mon: Chain monitoring services
│   ├── fault-detector: Service for detecting Sequencer faults
│   ├── message-relayer: Tool for automatically relaying L1<>L2 messages in development
│   ├── replica-healthcheck: Service for monitoring the health of a replica node
│   └── sdk: provides a set of tools for interacting with Optimism
├── batch-submitter: Service for submitting batches of transactions and results to L1
├── bss-core: Core batch-submitter logic and utilities
├── gas-oracle: Service for updating L1 gas prices on L2
├── indexer: indexes and syncs transactions
├── infra/op-replica: Deployment examples and resources for running an Optimism replica
├── integration-tests: Various integration tests for the Optimism network
├── l2geth: Optimism client software, a fork of geth v1.9.10
├── l2geth-exporter: A prometheus exporter to collect/serve metrics from an L2 geth node
├── op-exporter: A prometheus exporter to collect/serve metrics from an Optimism node
├── proxyd: Configurable RPC request router and proxy
├── technical-documents: audits and post-mortem documents

~~ BEDROCK upgrade - Not production-ready yet, part of next major upgrade ~~
├── packages
│   └── contracts-bedrock: Bedrock smart contracts. To be merged with ./packages/contracts.
├── op-bindings: Go bindings for Bedrock smart contracts.
├── op-batcher: L2-Batch Submitter, submits bundles of batches to L1
├── op-e2e: End-to-End testing of all bedrock components in Go
├── op-node: rollup consensus-layer client.
├── op-proposer: L2-Output Submitter, submits proposals to L1
├── ops-bedrock: Bedrock devnet work
└── specs: Specs of the rollup starting at the Bedrock upgrade

Branching Model

Active Branches

Branch Status
master Accepts PRs from develop when intending to deploy to production.
develop Accepts PRs that are compatible with master OR from release/X.X.X branches.
release/X.X.X Accepts PRs for all changes, particularly those not backwards compatible with develop and master.

Overview

This repository generally follows this Git branching model. Please read the linked post if you're planning to make frequent PRs into this repository.

Production branch

The production branch is master. The master branch contains the code for latest "stable" releases. Updates from master always come from the develop branch.

Development branch

The primary development branch is develop. develop contains the most up-to-date software that remains backwards compatible with the 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 candidate branches

Branches marked release/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 release/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.

Releases

Changesets

We use changesets to mark packages for new releases. When merging commits to the develop branch you MUST include a changeset file if your change would require that a new version of a package be released.

To add a changeset, run the command yarn changeset in the root of this monorepo. You will be presented with a small prompt to select the packages to be released, the scope of the release (major, minor, or patch), and the reason for the release. Comments within changeset files will be automatically included in the changelog of the package.

Triggering Releases

Releases can be triggered using the following process:

  1. Create a PR that merges the develop branch into the master branch.
  2. Wait for the auto-generated Version Packages PR to be opened (may take several minutes).
  3. Change the base branch of the auto-generated Version Packages PR from master to develop and merge into develop.
  4. Create a second PR to merge the develop branch into the master branch.

After merging the second PR into the master branch, packages will be automatically released to their respective locations according to the set of changeset files in the develop branch at the start of the process. Please carry this process out exactly as listed to avoid develop and master falling out of sync.

NOTE: PRs containing changeset files merged into develop during the release process can cause issues with changesets that can require manual intervention to fix. It's strongly recommended to avoid merging PRs into develop during an active release.

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.

More Repositories

1

optimism-tutorial

Build your first app on Optimism!
Solidity
733
star
2

cannon

On chain interactive fault prover for Ethereum
Solidity
572
star
3

community-hub

Optimism Governance Docs
Vue
300
star
4

ecosystem-contributions

Find ways to contribute to the Optimism Collective
TypeScript
278
star
5

contracts

[Optimism] Smart Contracts
Solidity
251
star
6

ethereum-optimism.github.io

Unified token list for OP Mainnet, Base, and other OP Chains
TypeScript
228
star
7

optimism-starter

A boilerplate for getting started with optimism
Solidity
181
star
8

optimistic-specs

Optimistic: Bedrock, is a protocol that strives to be an extremely simple optimistic rollup that maintains 1:1 compatibility with Ethereum
Go
167
star
9

op-geth

Go
129
star
10

OPerating-manual

OPerating Manual of the Optimism Collective. https://optimism.io/vision
128
star
11

optimism-project-ideas

Ways to contribute to the Optimism Collective
112
star
12

asterisc

Work in progress RISC-V interactive fraud-proof tech
Go
81
star
13

smock

[Optimism] Solidity mock contracts in JavaScript
TypeScript
73
star
14

brand-kit

Brand assets for Optimism
67
star
15

op-analytics

Onchain Data, Utilities, References, and other Analytics on Optimism
Jupyter Notebook
57
star
16

docs

Optimism Developer Docs
MDX
52
star
17

developers

This repository is to serve as a place where builders on every level of the OP Stack can come to collaborate.
52
star
18

kona

A suite of libraries and build pipelines for developing verifiable Rust programs targeting Fault Proof VMs.
Rust
49
star
19

optimism-integration

[Optimism] Service Integration & Rapid Development
Shell
48
star
20

go-ethereum

[Optimism] Go implementation of the Optimistic Ethereum protocol
Go
39
star
21

solidity

[Optimism] (Slightly) modified Solidity compiler
C++
37
star
22

axos

Portable no-std Derivation Pipeline engineered in pure Rust
Rust
25
star
23

superchain-ops

Solidity
25
star
24

ecosystem

Optimism is Ethereum, scaled.
TypeScript
24
star
25

minigeth

Stripped-down oracle-augmented version of geth for use in fault proofs.
Go
23
star
26

Truffle-ERC20-Example

A simple ERC20 token project in Truffle to get started with the OVM
JavaScript
22
star
27

verifier

[Optimism] Layer 2 Verifier
JavaScript
21
star
28

lib-keccak

Keccak-f[1600] permutation in the EVM
Solidity
20
star
29

merch

official optimism merch instructions
19
star
30

superchain-relayer

Interface to relay messages from L2 to L1 for OP Chains using the Optimism SDK
Solidity
18
star
31

optimism-mud-starter

A MUD based starterkit by optimism
TypeScript
17
star
32

reference-optimistic-geth

Go
16
star
33

optimism-ts-services

[Optimism] Client-Side Services
TypeScript
15
star
34

superchain-registry

Go
14
star
35

Waffle-ERC20-Example

A simple ERC20 token project in Waffle to get started with the OVM
Solidity
14
star
36

batch-submitter

[Optimism] Batches go zoom
TypeScript
11
star
37

plugins

[Optimism] Plugins!
TypeScript
11
star
38

data-transport-layer

[Optimism] Shuttling data from L1 all day.
TypeScript
11
star
39

regenesis

[Optimism] State Dumps & Regenesis Automation
JavaScript
10
star
40

optimistic-pm

Modeled after https://github.com/ethereum/eth2.0-pm
9
star
41

.github

[Optimism] Default GitHub configuration files
9
star
42

integration-tests

[Optimism] Service Integration Tests
TypeScript
8
star
43

tx-overload

Go
7
star
44

chug-splash

Chuggin' and splashin', splashin' and chuggin'. Chugslash!
TypeScript
7
star
45

rainbowkit

The best way to connect a wallet 🌈 🧰
TypeScript
4
star
46

stack-docs

OP Stack documentation
Vue
4
star
47

infra

Optimistic infrastructure
Shell
4
star
48

workshops

Workshops that we teach
Solidity
3
star
49

docker

[Optimism] Dockerfiles and Entrypoints
Shell
2
star
50

design-docs

2
star
51

changelog

HTML
2
star
52

optimism-legacy

Legacy Optimism Monorepo
Go
2
star
53

solc-bin

Current and historical (emscripten) binaries for Solidity
2
star
54

service-base

[Optimism] A simple framework for stateful JS services
TypeScript
2
star
55

optimism-faq-bot

Optimism FAQ bot for Discord. A fork of Rari-Capital's FAQ bot :0
Python
2
star
56

l2-geth-state-dumper

A small utility for generating an L2 genesis state
Go
2
star
57

ovm-subgraphs

TypeScript
1
star
58

keygeneration

[Optimism] Airgapped Key Generation
Shell
1
star
59

ganache-cli

Fast Ethereum RPC client for testing and development
JavaScript
1
star
60

scripts

[Optimism] Various misc. scripts
JavaScript
1
star