Skip to content

Port internal knowledge base info to doc #998

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

Merged
merged 8 commits into from
Nov 2, 2024
Merged
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
1 change: 0 additions & 1 deletion pages/chain/_meta.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"getting-started": "Getting started: OP Mainnet",
"differences": "Differences between Ethereum and OP Mainnet",
"networks": "Networks and RPC Endpoints",
"addresses": "Contract addresses",
"tokenlist": "Bridged token addresses",
Expand Down
77 changes: 0 additions & 77 deletions pages/chain/differences.mdx

This file was deleted.

33 changes: 29 additions & 4 deletions pages/stack/differences.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Differences between Ethereum and OP Stack Chains
lang: en-US
tags: ["eng-protocol"]
description: Learn the minor differences between the behavior of Ethereum and OP Stack chains.
---

Expand All @@ -11,6 +12,16 @@ import { Callout } from 'nextra/components'
OP Stack chains are designed to be [EVM equivalent](https://web.archive.org/web/20231127160757/https://medium.com/ethereum-optimism/introducing-evm-equivalence-5c2021deb306) and introduces as few changes as possible to the Ethereum protocol.
However, there are some minor differences between the behavior of Ethereum and OP Stack chains that developers should be aware of.

## Bridging

### Bridging - Deposit Transactions

Deposit transactions don't exist on L1's, and are how transactions on an L2 can be initiated from the L1. Importantly, this is how bridge applications can get L1 ETH or tokens into an L2 OP Stack chain. You can read more on deposit transactions [here](/stack/protocol/rollup/deposit-flow).

### Bridging - Withdrawal Transactions and Fault Proofs

Withdrawal transactions are how the state of the L2 rollup can be proven to the L1. Often this involves users withdrawing tokens or ETH to the L1. Fault proofs are the mechanism by which withdrawal transactions are currently proven to the L1. You can read more about fault proofs [here](/stack/protocol/fault-proofs/explainer).

## Opcodes

| Opcode | Solidity Equivalent | Behavior |
Expand Down Expand Up @@ -55,13 +66,27 @@ In all other cases, the transaction sender address is set according to the same
Transactions on OP Stack chains must pay for an [L1 data fee](/stack/transactions/fees#the-l1-data-fee) on top of the standard [execution gas fee](/stack/transactions/fees#execution-gas-fee) you would expect on Ethereum.
Refer to the guide on [OP Stack Transaction Fees](/stack/transactions/fees) for more information.

### EIP-1559 Parameters
You can use the [JS library viem](https://viem.sh/op-stack) to estimate the entire transaction gas costs, including the L1 Data Fee.

### EIP-1559 parameters

The base fee on OP Stack is, like Ethereum, computed via the [EIP-1559](https://notes.ethereum.org/@vbuterin/eip-1559-faq) mechanism.
The EIP-1559 parameters used by OP Stack differ per chain.

### Mempool rules

By default, OP Stack chains do not have a large public mempool like Ethereum.
OP Stack mempools are typically only visible to the Sequencer of the given chain and transactions are generally executed in priority fee order (highest fee first).
This is not a required behavior and certain chains may choose to have a public mempool.
Unlike Ethereum, OP Stack chains do not have a public mempool.
The OP Stack mempool is currently only visible to the Sequencer.
The Sequencer executes transactions from the mempool in priority fee order (highest fee first).

## Chain Finality

Unlike L1s such as Ethereum, OP Stack chains have Unsafe, Safe, and Finalized Heads which indicate the state of finality for a given L2 block. Fault proofs do not impact the finalization of the L2 rollup, only the finalization of withdrawal transactions to the L1. You can read more about these [in the docs glossary](/resources/glossary#unsafe-l2-block).

## What's Next

There are various useful tools linked above. Here are a few more tools and links you may want to check out:

* [OP-viem](https://viem.sh/op-stack): JS framework that can handle many of these unique functions on OP Chains. It is similar to Ethers.js for OP Stack chains.

* [Specs](https://specs.optimism.io/root.html): For more in-depth technical explanations and examples.
3 changes: 2 additions & 1 deletion public/_redirects
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,5 @@
/stack/operators/features/op-txproxy /builders/chain-operators/tools/op-txproxy
/stack/operators/features/proxyd /builders/chain-operators/tools/proxyd
/builders/notices/granite-changes https://github.com/ethereum-optimism/docs/blob/ef619668ae44276edecdfd657157254b9809e2d6/pages/builders/notices/granite-changes.mdx
/builders/notices/fp-changes https://github.com/ethereum-optimism/docs/blob/ef619668ae44276edecdfd657157254b9809e2d6/pages/builders/notices/fp-changes.mdx
/builders/notices/fp-changes https://github.com/ethereum-optimism/docs/blob/ef619668ae44276edecdfd657157254b9809e2d6/pages/builders/notices/fp-changes.mdx
/chain/differences /stack/differences
Loading