Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial refactor of OP Mainnet -> OP Stack #1243

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 76 additions & 0 deletions .cursorrules
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
// Primary Context

When assisting with this project:

Recognize this is a technical writing project for Optimism documentation
Default to Microsoft Style Guide conventions, specifically:
- Use sentence-style capitalization for headings
- Use active voice and plain language
- Structure lists clearly and concisely
- Avoid unnecessary jargon or complex phrasing
Align with Optimism’s style guide, focusing on:
- Consistent use of terminology
- Clear and direct explanations of technical concepts
- Accurate and up-to-date references to tools and resources
Maintain a professional yet approachable tone, prioritizing clarity and consistency

// Writing Style Rules

Ensure headings use sentence-style capitalization (e.g., "Writing style rules" instead of "Writing Style Rules")
Use active voice and concise technical language (e.g., "Deploy the contract" instead of "The contract was deployed")
Maintain consistent terminology across sections, referring to the Optimism glossary (e.g., always refer to "Layer 2 scaling" instead of "L2" unless defined)
Follow Microsoft guidelines for bulleted and numbered lists, ensuring parallel structure (e.g., each bullet in a list should start with a verb if others do)
Avoid idiomatic expressions or informal language
Ensure all tables, figures, and examples are correctly labeled and referenced
Validate cross-references to ensure accuracy (e.g., check that section numbers and hyperlinks point to the correct locations)
Ensure any changes to a term, reference, or hyperlink are reflected throughout the document

// Code Snippet Rules

Ensure code snippets are syntactically correct and properly formatted
Use consistent indentation and naming conventions within snippets
Provide comments explaining non-obvious code logic
Validate that all code examples are functional and tested
Ensure code snippets are referenced correctly in accompanying text

// Hyperlink and Reference Rules

Ensure all hyperlinks use descriptive text (e.g., “Learn more about Optimism” instead of “Click here”)
Verify all hyperlinks are valid and up to date
Follow Microsoft guidelines for citing external references, ensuring clarity and relevance

// Accessibility and Inclusivity Rules

Use gender-neutral language
Avoid cultural references that may not be universally understood
Ensure content is easily translatable by avoiding idioms and complex sentence structures
Provide alt text for all images and diagrams, describing their purpose and content

// Document Structure Rules

Maintain a clear and logical document hierarchy with appropriate use of headings
Use introductory paragraphs to outline the purpose of each section
Ensure transition sentences between sections for smooth reading flow

// Response Format

Provide direct, implementable suggestions for improvements
Highlight areas where consistency or accuracy issues may arise
Separate code, text, and LaTeX suggestions for clarity
Flag outdated or broken links and provide corrected URLs or suggestions for updates
Note any assumptions made in the response

// Quality Assurance

Validate adherence to the key Microsoft Style Guide principles listed
Check consistency of terminology, formatting, and references as per the Optimism style guide
Ensure all tables, figures, and code snippets are properly labeled and integrated
Verify cross-reference accuracy within the document

// Meta Instructions

Anticipate and suggest potential improvements for related sections
Maintain consistent tone and terminology throughout
Flag potential inconsistencies or deviations from the style guide
Proactively highlight areas for refinement or optimization

2 changes: 1 addition & 1 deletion pages/chain/addresses.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { SuperchainContractTable } from '@/components/SuperchainContractTable'

# Contract Addresses

This reference guide lists all the contract addresses for Mainnet and Testnet, as found on the [superchain-registry](https://github.com/ethereum-optimism/superchain-registry/tree/main).
This reference guide lists all the contract addresses for OP Stack chains, as found on the [superchain-registry](https://github.com/ethereum-optimism/superchain-registry/tree/main).
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do we do with this file? Is there a way to expand it to include all contract addresses across the Superchain?

See the [Smart Contracts Overview](/stack/smart-contracts) for high-level details and access to the source code.

<Callout>
Expand Down
22 changes: 11 additions & 11 deletions pages/chain/getting-started.mdx
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
---
title: Getting started developing for OP Mainnet
title: Getting started developing for OP Stack chains
lang: en-US
description: Learn the basics of OP Mainnet development.
description: Learn the basics of OP Stack development.
---

import { Steps } from 'nextra/components'

# Getting started developing for OP Mainnet
# Getting started developing for OP Stack chains

This guide explains the basics of OP Mainnet development.
OP Mainnet is [EVM equivalent](https://web.archive.org/web/20231127160757/https://medium.com/ethereum-optimism/introducing-evm-equivalence-5c2021deb306), meaning we run a slightly modified version of the same `geth` you run on mainnet.
Therefore, the differences between OP Mainnet development and Ethereum development are minor.
This guide explains the basics of OP Stack development.
OP Stack chains are [EVM equivalent](https://web.archive.org/web/20231127160757/https://medium.com/ethereum-optimism/introducing-evm-equivalence-5c2021deb306), meaning they run a slightly modified version of the same `geth` you run on mainnet.
Therefore, the differences between OP Stack development and Ethereum development are minor.
But a few differences [do exist](/stack/differences).

## OP Mainnet and OP Sepolia endpoint URLs
## OP Stack chains endpoint URLs

To access any Ethereum type network you need an endpoint. [These providers](/builders/tools/connect/rpc-providers) support our networks.

Expand All @@ -23,14 +23,14 @@ For development purposes we recommend you use either a local development node or
That way you don't need to spend real money.
If you need ETH on OP Sepolia for testing purposes, [you can use this faucet](https://console.optimism.io/faucet?utm_source=docs).

## Interacting with contracts on OP Mainnet or OP Sepolia
## Interacting with contracts on OP Stack chains

We have Hardhat's Greeter contract on OP Sepolia at address [0x9d334aFBa83865E67a9219830ADA57aaA9406681](https://sepolia-optimism.etherscan.io/address/0x9d334aFBa83865E67a9219830ADA57aaA9406681#code).
You can verify your development stack configuration by interacting with it.

## Development stacks

As you can see in the different development stacks below, the way you deploy contracts and interact with them on OP Mainnet or OP Sepolia is almost identical to the way you do it with L1 Ethereum.
As you can see in the different development stacks below, the way you deploy contracts and interact with them on OP Stack chains is almost identical to the way you do it with L1 Ethereum.
The most visible difference is that you have to specify a different endpoint (of course).
The list of other differences is [here](differences).

Expand All @@ -52,7 +52,7 @@ Not only is it faster, but such EVMs often have extra features, such as the [abi
### Debug before deploying

After you are done with that development, debug your decentralized application using either a [development node](/chain/testing/dev-node) or the [Sepolia test network](/chain/networks).
This lets you debug parts that are OP Mainnet specific such as calls to bridges to transfer ETH or tokens between layers.
This lets you debug parts that are OP Stack chains specific such as calls to bridges to transfer ETH or tokens between layers.

Only when you have a version that works well on a test network should you deploy to the production network, where every transaction has a cost.

Expand All @@ -62,4 +62,4 @@ You don't have to upload your source code to [block explorers](/builders/tools/b
On the test network, it lets you issue queries and transactions from the explorer's user interface.
On the production network, it lets users know exactly what your contract does, which is conducive to trust.

Just remember, if you use [the Etherscan API](https://explorer.optimism.io/apis), you need one API key for OP Mainnet and a separate one for OP Sepolia.
Just remember, if you use [the Etherscan API](https://explorer.optimism.io/apis), you need one API key for OP Stack chains and a separate one for OP Sepolia.
8 changes: 4 additions & 4 deletions pages/chain/networks.mdx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
title: OP networks and public RPC endpoints
title: OP Stack networks and public RPC endpoints
lang: en-US
description: Learn about the different OP networks and public RPC endpoints.
description: Learn about the different OP Stack networks and public RPC endpoints.
---

import { Callout } from 'nextra/components'

# OP networks and public RPC endpoints
# OP Stack networks and public RPC endpoints

This reference guide provides a listing of the different OP networks and public RPC endpoints.
This reference guide provides a listing of the different OP Stack networks and public RPC endpoints.

<Callout>
The public RPC URLs provided below are rate limited and do not support websocket connections.
Expand Down
46 changes: 23 additions & 23 deletions pages/chain/security/faq.mdx
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
---
title: OP Mainnet security model
title: OP Stack security model
lang: en-US
description: Learn about the OP Mainnet security model and answers to common questions.
description: Learn about the OP Stack security model and answers to common questions.
---

import { Callout } from 'nextra/components'

# OP Mainnet security model
# OP Stack security model

OP Mainnet is a work in progress.
Constant, iterative improvement of the security mechanisms that safeguard OP Mainnet users is a top priority for the entire [Optimism Collective](https://community.optimism.io/docs/governance/).
The Optimism Collective strives to be clear and transparent about the security of OP Mainnet and the OP Stack as a whole.
Many OP Stack chains, such as OP Mainnet, are a work in progress.
Constant, iterative improvement of the security mechanisms that safeguard OP Stack users is a top priority for the entire [Optimism Collective](https://community.optimism.io/docs/governance/).
The Optimism Collective strives to be clear and transparent about the security of OP Stack chains and the OP Stack as a whole.

## Bottom line

The security model of any blockchain system is only as strong as its lowest common denominator.
At the moment, **it's important to understand that the security of OP Mainnet is dependent on a [multisig](https://etherscan.io/address/0x5a0Aae59D09fccBdDb6C6CcEB07B7279367C3d2A)** managed jointly by the [Optimism Security Council](https://gov.optimism.io/t/intro-to-optimisms-security-council/6885) and the Optimism Foundation.
OP Mainnet and the OP Stack in general **may also contain unknown bugs that could lead to the loss of some or all of the ETH or tokens held within the system**.
At the moment, **it's important to understand that the security of OP Stack chains is dependent on a [multisig](https://etherscan.io/address/0x5a0Aae59D09fccBdDb6C6CcEB07B7279367C3d2A)** managed jointly by the [Optimism Security Council](https://gov.optimism.io/t/intro-to-optimisms-security-council/6885) and the Optimism Foundation.
OP Stack chains **may also contain unknown bugs that could lead to the loss of some or all of the ETH or tokens held within the system**.

## OP Mainnet multisig
## OP Stack multisig

The security of OP Mainnet is currently dependent on a multisig managed jointly by the [Optimism Security Council](https://gov.optimism.io/t/intro-to-optimisms-security-council/6885) and the Optimism Foundation.
The security of OP Stack chains is currently dependent on a multisig managed jointly by the [Optimism Security Council](https://gov.optimism.io/t/intro-to-optimisms-security-council/6885) and the Optimism Foundation.
This multisig is a [2-of-2 nested multisig](https://etherscan.io/address/0x5a0Aae59D09fccBdDb6C6CcEB07B7279367C3d2A) which is in turn governed by a [10-of-13 multisig](https://etherscan.io/address/0xc2819DC788505Aac350142A7A707BF9D03E3Bd03) managed by the Optimism Security Council and a [5-of-7 multisig](https://etherscan.io/address/0x847B5c174615B1B7fDF770882256e2D3E95b9D92) managed by the Optimism Foundation.

This multisig can be used to upgrade core OP Mainnet smart contracts **without upgrade delays** to allow for quick responses to potential security concerns.
All upgrades to the OP Mainnet system must be approved by both component multisigs and either can veto an upgrade.
This multisig can be used to upgrade core OP Stack smart contracts **without upgrade delays** to allow for quick responses to potential security concerns.
All upgrades to the OP Stack system must be approved by both component multisigs and either can veto an upgrade.

## Fault proofs

<Callout>
It is important to understand that **fault proofs are not a silver bullet** and that **fault proofs provide limited improvements to the security of a system if the system still has a multisig or security council that can instantly upgrade the system**.
OP Mainnet is following a multi-client and multi-proof approach designed to eventually remove the need for instant upgrades entirely.
OP Stack chains are following a multi-client and multi-proof approach designed to eventually remove the need for instant upgrades entirely.
</Callout>

Users can withdraw ETH and tokens from OP Mainnet to Ethereum by submitting a withdrawal proof that shows the withdrawal was actually included inside of OP Mainnet.
Withdrawals are proven against proposals about the state of OP Mainnet that are published through the [`DisputeGameFactory`](https://github.com/ethereum-optimism/optimism/blob/363c5d7f4fb14180a0e2a28cc948fe2146f03dce/packages/contracts-bedrock/src/dispute/DisputeGameFactory.sol) contract.
Users can withdraw ETH and tokens from OP Stack chains to Ethereum by submitting a withdrawal proof that shows the withdrawal was actually included inside of the OP Stack chain.
Withdrawals are proven against proposals about the state of the chain that are published through the [`DisputeGameFactory`](https://github.com/ethereum-optimism/optimism/blob/363c5d7f4fb14180a0e2a28cc948fe2146f03dce/packages/contracts-bedrock/src/dispute/DisputeGameFactory.sol) contract.

Proposals can be submitted to the `DisputeGameFactory` contract by any user and submissions do not require any special permissions.
Each submitted proposal creates a [`FaultDisputeGame`](https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts-bedrock/src/dispute/FaultDisputeGame.sol) contract that allows any other user to challenge the validity of a proposal by participating in a "fault proof" process.
Expand All @@ -49,31 +49,31 @@ The Guardian can also choose to shift the system to use a `PermissionedDisputeGa
Please also keep in mind that just like any other system, **the Optimism codebase may contain unknown bugs** that could lead to the loss of some or all of the ETH or tokens held within the system.
The OP Stack has been audited [on many occasions](https://github.com/ethereum-optimism/optimism/tree/v1.1.4/technical-documents/security-reviews), but **audits are not a stamp of approval** and **a completed audit does not mean that the audited codebase is free of bugs.**

It's important to understand that using OP Mainnet inherently exposes you to the risk of bugs within the Optimism codebase, and that you use OP Mainnet at your own risk.
It's important to understand that using OP Stack chains inherently exposes you to the risk of bugs within the Optimism codebase, and that you use these chains at your own risk.

## Work in progress

### Sequencer decentralization

The Optimism Foundation currently operates the sole sequencer on OP Mainnet.
The Optimism Foundation currently operates the sole sequencer on OP Stack chains.
Although users can always bypass the Sequencer by sending transactions directly to the [`OptimismPortal`](https://github.com/ethereum-optimism/optimism/blob/5877ee24cc9aaef5848c1372e0e196707fb336a0/packages/contracts-bedrock/src/L1/OptimismPortal.sol) contract, sequencer decentralization can still help mitigate the effect of short-term outages for users.

## Security model FAQ

### Does OP Mainnet have fault proofs?
### Do OP Stack chains have fault proofs?

**Yes**, OP Mainnet has fault proofs.
**Yes**, fault proofs are available to OP Stack chains.
It is important to note that **fault proofs are not a silver bullet** and that **fault proofs provide limited improvements to the security of a system if the system still has a multisig or security council that can instantly upgrade the system**.
A system with fast upgrade keys, such as OP Mainnet, is fully dependent on the upgrade keys for security.
OP Mainnet's goal is to be the first system that deploys fault proofs that can secure the system by themselves, without fast upgrade keys.
The goal is to be the first system that deploys fault proofs that can secure the system by themselves, without fast upgrade keys.

### How is Optimism planning to remove the multisig?

Check out Optimism's detailed [Pragmatic Path to Decentralization](https://web.archive.org/web/20230331065342/https://medium.com/ethereum-optimism/our-pragmatic-path-to-decentralization-cb5805ca43c1) post for a detailed view into how the multisig may be removed in a way that makes OP Mainnet the first chain with true fault proof security.
Check out Optimism's detailed [Pragmatic Path to Decentralization](https://web.archive.org/web/20230331065342/https://medium.com/ethereum-optimism/our-pragmatic-path-to-decentralization-cb5805ca43c1) post for a detailed view into how the multisig may be removed in a way that makes OP Stack chains the first with true fault proof security.

### How can I help make OP Mainnet more secure?
### How can I help make OP Stack chains more secure?

[OP Mainnet has one of the biggest bug bounties (ever)](/chain/security/security-policy).
[OP Stack has one of the biggest bug bounties (ever)](/chain/security/security-policy).
You can earn up to $2,000,042 by finding critical bugs in the Optimism codebase.
You can also run your own verifier node to detect network faults.

Expand Down
Loading