MCPcopy
hub / github.com/ethereum-optimism/optimism

github.com/ethereum-optimism/optimism @op-revm-v20.0.0 sqlite

repository ↗ · DeepWiki ↗ · release op-revm-v20.0.0 ↗
34,122 symbols 154,493 edges 2,772 files 12,652 documented · 37%
README

Optimism

Optimism is Ethereum, scaled.

Table of Contents

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 that powers scalable blockchains and aims to address key governance and economic challenges in the wider Ethereum 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. The OP Stack is designed to be aggressively open-source — you are welcome to explore, modify, and extend this code.

Documentation

Specification

Detailed specifications for the OP Stack can be found within the OP Stack Specs repository.

Community

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

Contributing

The OP Stack is a collaborative project. 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.

CONTRIBUTING.md contains a detailed explanation of the contributing process for this repository. Make sure to use the Developer Quick Start to properly set up your development environment.

Good First Issues are a great place to look for tasks to tackle if you're not sure where to start, and see CONTRIBUTING.md for info on larger projects.

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.

Directory Structure

├── cannon: Onchain MIPS instruction emulator for fault proofs
├── docs: A collection of documents including audits and post-mortems
│   └── public-docs: Public developer documentation for docs.optimism.io
├── op-acceptance-tests: Acceptance tests and configuration for OP Stack
├── op-alt-da: Alternative Data Availability mode (beta)
├── op-batcher: L2-Batch Submitter, submits bundles of batches to L1
├── op-chain-ops: State surgery utilities
├── op-challenger: Dispute game challenge agent
├── op-conductor: High-availability sequencer service
├── op-deployer: CLI tool for deploying and upgrading OP Stack smart contracts
├── op-devstack: Flexible test frontend for integration and acceptance testing
├── op-dispute-mon: Off-chain service to monitor dispute games
├── op-dripper: Controlled token distribution service
├── op-e2e: End-to-End testing of all bedrock components in Go
├── op-faucet: Dev-faucet with support for multiple chains
├── op-fetcher: Data fetching utilities
├── op-interop-mon: Interoperability monitoring service
├── op-node: Rollup consensus-layer client
├── op-preimage: Go bindings for Preimage Oracle
├── op-program: Fault proof program
├── op-proposer: L2-Output Submitter, submits proposals to L1
├── op-service: Common codebase utilities
├── op-supervisor: Service to monitor chains and determine cross-chain message safety
├── op-sync-tester: Sync testing utilities
├── op-test-sequencer: Test sequencer for development
├── op-up: Deployment and management utilities
├── op-validator: Tool for validating Optimism chain configurations and deployments
├── op-wheel: Database utilities
├── ops: Various operational packages
├── packages
│   ├── contracts-bedrock: OP Stack smart contracts

Development and Release Process

Overview

Please read this section carefully if you're planning to fork or make frequent PRs into this repository.

Production Releases

Production releases are always tags, versioned as <component-name>/v<semver>. For example, an op-node release might be versioned as op-node/v1.1.2, and smart contract releases might be versioned as op-contracts/v1.0.0. Release candidates are versioned in the format op-node/v1.1.2-rc.1. We always start with rc.1 rather than rc.

For contract releases, refer to the GitHub release notes for a given release which will list the specific contracts being released. Not all contracts are considered production ready within a release and many are under active development.

Tags of the form v<semver>, such as v1.1.4, indicate releases of all Go code only, and DO NOT include smart contracts. This naming scheme is required by Golang. In the above list, this means these v<semver> releases contain all op-* components and exclude all contracts-* components.

op-geth embeds upstream geth’s version inside its own version as follows: vMAJOR.GETH_MAJOR GETH_MINOR GETH_PATCH.PATCH. Basically, geth’s version is our minor version. For example if geth is at v1.12.0, the corresponding op-geth version would be v1.101200.0. Note that we pad out to three characters for the geth minor version and two characters for the geth patch version. Since we cannot left-pad with zeroes, the geth major version is not padded.

See the Node Software Releases page of the documentation for more information about releases for the latest node components.

The full set of components that have releases are:

  • op-batcher
  • op-contracts
  • op-challenger
  • op-node
  • op-proposer

All other components and packages should be considered development components only and do not have releases.

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-bedrock/src are usually NOT considered backwards compatible. Some exceptions to this rule exist for cases in which we absolutely must deploy some new contract after a tag 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 a feature branch. Feature branches are typically used when there are conflicts between 2 projects touching the same code, to avoid conflicts from merging both into develop.

Downloading & Shallow-Cloning the Monorepo

If you want to use the monorepo as a dependency, e.g. in CI, you can greatly speed up the fetching process by either downloading it directly as an archive from Github instead of cloning as a git repository or shallow-cloning it. This avoids downloading the full monorepo git history, which is unfortunately a few GBs in size, but which also isn't needed for many use cases, like CI.

To fetch the monorepo at a specific commit/branch/tag $REF, download and unpack with

curl -L https://github.com/ethereum-optimism/optimism/archive/$REF.tar.gz | tar xz

Note that if you need any of its submodules, you'd need to manually download those too.

If you want a shallow git clone of latest develop, you can just do

git clone --depth 1 --shallow-submodules https://github.com/ethereum-optimism/optimism.git

which takes only a few seconds on a good internet connection.

If you want to shallow-checkout a specific branch or tag $REF, do

git clone --no-checkout --depth 1 --shallow-submodules https://github.com/ethereum-optimism/optimism.git
cd optimism
git fetch --depth 1 origin "$REF"
git checkout "$REF"

which should also only take a few seconds.

License

All other files within this repository are licensed under the MIT License unless stated otherwise.

Extension points exported contracts — how you extend this code

Validator (Interface)
Validator is used for all validation contracts [6 implementers]
op-validator/pkg/validations/validations.go
CycleCheckDeps (Interface)
CycleCheckDeps is an interface for checking cyclical dependencies between logs. [16 implementers]
op-supervisor/supervisor/backend/cross/cycle.go
NodeAdminProxyAPI (Interface)
NodeAdminProxyAPI defines the methods proxied to the node 'admin_' rpc backend This should include all methods that are [10 …
op-conductor/rpc/api.go
SupervisorHealthAPI (Interface)
SupervisorHealthAPI defines the interface for the supervisor's health check. [37 implementers]
op-conductor/health/supervisor.go
Hint (Interface)
Hint is an interface to enable any program type to function as a hint, when passed to the Hinter interface, returning a [12 …
op-preimage/iface.go
L1FollowSource (Interface)
L1FollowSource provides access to L1 block references for upstream following. [17 implementers]
op-node/rollup/driver/follow_source.go
Scores (Interface)
go:generate mockery --name Scores --output mocks/ --with-expecter=true [6 implementers]
op-node/p2p/gating/scoring.go
Loader (Interface)
Loader specifies how to load a faucets config file [20 implementers]
op-faucet/faucet/backend/config/iface.go

Core symbols most depended-on inside this repo

Equal
called by 5351
op-conductor/conductor/service.go
Errorf
called by 5122
op-devstack/devtest/common.go
Run
called by 2080
op-devstack/devtest/testing.go
New
called by 1979
op-service/apis/test_sequencer.go
Info
called by 1336
op-service/sources/types.go
Error
called by 1109
op-devstack/devtest/common.go
Hash
called by 953
op-service/eth/block_info.go
Err
called by 857
op-service/plan/node.go

Shape

Method 18,172
Function 10,637
Struct 3,966
Interface 827
FuncType 267
TypeAlias 243
Class 10

Languages

Go91%
TypeScript8%
Python1%

Modules by API surface

packages/contracts-bedrock/book/mermaid.min.js2,838 symbols
op-chain-ops/script/console2_gen.go376 symbols
op-e2e/bindings/safel2_v130.go257 symbols
op-e2e/bindings/safe_v130.go241 symbols
op-e2e/bindings/safe.go238 symbols
op-e2e/bindings/systemconfig.go226 symbols
op-e2e/bindings/faultdisputegame.go172 symbols
op-e2e/bindings/entrypoint.go170 symbols
op-e2e/bindings/l1standardbridge.go166 symbols
op-chain-ops/crossdomain/bindings/l1standardbridge.go166 symbols
op-e2e/bindings/delayedweth.go153 symbols
op-e2e/bindings/governancetoken.go147 symbols

Used by 2 indexed graphs manifest dependencies, hub-wide

Dependencies from manifests, versioned

codeberg.org/go-fonts/liberationv0.5.0 · 1×
codeberg.org/go-latex/latexv0.1.0 · 1×
codeberg.org/go-pdf/fpdfv0.10.0 · 1×
github.com/DataDog/zstdv1.5.6-0.20230824185 · 1×
github.com/Masterminds/semver/v3v3.3.1 · 1×
github.com/Microsoft/go-winiov0.6.2 · 1×
github.com/ProjectZKM/Ziren/crates/go-runtime/zkvm_runtimev0.0.0-2025100102160 · 1×
github.com/adrg/xdgv0.4.0 · 1×
github.com/ajstarks/svgov0.0.0-2021102423504 · 1×
github.com/allegro/bigcachev1.2.1 · 1×

For agents

$ claude mcp add optimism \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact