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

Add forkdiff comparison to op-geth #7

Merged
merged 4 commits into from
Aug 22, 2023
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
5 changes: 1 addition & 4 deletions .github/workflows/pages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ permissions:
on:
push:
branches:
- optimism
- celo[0-9]+
jobs:
deploy:
concurrency: ci-${{ github.ref }}
Expand All @@ -25,9 +25,6 @@ jobs:
mkdir -p tmp/pages
mv index.html tmp/pages/index.html
touch tmp/pages/.nojekyll
if [ "$GITHUB_REPOSITORY" == "ethereum-optimism/op-geth" ]; then
echo "op-geth.optimism.io" > tmp/pages/CNAME
fi;

- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4
Expand Down
201 changes: 20 additions & 181 deletions fork.yaml
Original file line number Diff line number Diff line change
@@ -1,198 +1,37 @@
title: "op-geth - go-ethereum fork diff overview"
title: "CELO <> OP op-geth forkdiff"
footer: |
Fork-diff overview of [`op-geth`](https://github.com/ethereum-optimism/op-geth), a fork of [`go-ethereum`](https://github.com/ethereum/go-ethereum).
and execution-engine of the [OP-stack](https://github.com/ethereum-optimism/optimism).
Fork-diff overview of changes made in [Celo's `op-geth`](https://github.com/celo-org/op-geth),
a fork of [Optimism's `op-geth`](https://github.com/ethereum-optimism/op-geth).
base:
name: go-ethereum
url: https://github.com/ethereum/go-ethereum
hash: e501b3b05db8e169f67dc78b7b59bc352b3c638d
fork:
name: op-geth
name: OP
url: https://github.com/ethereum-optimism/op-geth
ref: refs/heads/optimism
hash: 628d30034201ea3ec4585f3c6c22fda581541549 # tracks the last rebased commit
fork:
name: CELO
url: https://github.com/celo-org/op-geth
ref: HEAD
def:
title: "op-geth"
title: "Celo's op-geth"
description: |
This is an overview of the changes in [`op-geth`](https://github.com/ethereum-optimism/op-geth),
a fork of [`go-ethereum`](https://github.com/ethereum/go-ethereum), part of the OP-stack.

The OP-stack architecture is modular, following the Consensus/Execution split of post-Merge Ethereum L1:

- [`op-node`](https://github.com/ethereum-optimism/optimism/tree/develop/op-node) implements most rollup-specific functionality as Consensus-Layer, similar to a L1 beacon-node.
- [`op-geth`](https://github.com/ethereum-optimism/op-geth) implements the Execution-Layer, with **minimal changes** for a secure Ethereum-equivalent application environment.
This is an overview of the changes in [Celo's `op-geth` implementation](https://github.com/celo-org/op-geth),
a fork of [Optimism's `op-geth`](https://github.com/ethereum-optimism/op-geth).

Related [op-stack specifications](https://github.com/ethereum-optimism/optimism/tree/develop/specs):
For differences between the base `op-geth` and `go-ethereum`, check out Optimism's
[fork-diff overview of changes](https://op-geth.optimism.io/).

- [L2 Execution Engine spec](https://github.com/ethereum-optimism/optimism/blob/develop/specs/exec-engine.md)
- [Deposit Transaction spec](https://github.com/ethereum-optimism/optimism/blob/develop/specs/deposits.md)
sub:
- title: "Core modifications"
- title: "Celo-specific features"
sub:
- title: "State-transition modifications"
description: ""
sub:
- title: "Deposit Transaction type"
description: |
The Bedrock upgrade introduces a `Deposit` transaction-type (`0x7E`) to enable both users and the
rollup system itself to change the L2 state based on L1 events and system rules as
[specified](https://github.com/ethereum-optimism/optimism/blob/develop/specs/deposits.md).
globs:
- "core/types/deposit_tx.go"
- "core/types/transaction_marshalling.go"
- "core/types/transaction_signing.go"
- title: "Transaction properties"
description: |
The `Transaction` type now exposes the deposit-transaction and L1-cost properties required for the rollup.
globs:
- "core/types/transaction.go"
- "core/types/tx_access_list.go"
- "core/types/tx_dynamic_fee.go"
- "core/types/tx_legacy.go"
- title: "L1 cost computation"
description: |
Transactions must pay an additional L1 cost based on the amount of rollup-data-gas they consume,
estimated based on gas-price-oracle information and encoded tx size."
globs:
- "core/vm/evm.go"
- "core/types/rollup_l1_cost.go"
- "core/state_processor.go"
- "core/state_prefetcher.go"
- title: Transaction processing
description: |
Deposit transactions have special processing rules: gas is pre-paid on L1,
and deposits with EVM-failure are included with rolled back changes (except mint).
For regular transactions, at the end of the transition, the 1559 burn and L1 cost are routed to vaults.
globs:
- "core/state_transition.go"
- title: "Gaslimit"
description: |
The gaslimit is free to be set by the Engine API caller, instead of enforcing adjustments of the
gaslimit in increments of 1/1024 of the previous gaslimit.
The gaslimit is changed (and limited) through the `SystemConfig` contract.
globs:
- "consensus/misc/eip1559.go"
- title: "Consensus tweaks"
description: |
The Engine API is activated at the Merge transition, with a Total Terminal Difficulty (TTD).
The rollup starts post-merge, and thus sets the TTD to 0.
globs:
- "consensus/beacon/consensus.go"
- title: "Celo token duality"
description: "The Celo token is both the native token and ERC-20 compatible."
globs:
- "common/celo-types/*"
- title: "Chain config"
description: |
The rollup functionality is enabled with the `optimism` field in the chain config.
The EIP-1559 parameters are configurable to adjust for faster more frequent and smaller blocks.
The parameters can be overriden for testing.
description: ""
globs:
- "params/config.go"
- "params/protocol_params.go"
- "core/genesis.go"
- title: "Chain config cleanup"
description: |
The optimism Goerli testnet used clique-config data to make geth internals accept blocks.
Post-bedrock the beacon-consensus (i.e. follow Engine API) is now used, and the clique config is removed.
globs:
- "core/rawdb/accessors_metadata.go"
- title: "Engine API modifications"
description: |
The Engine API is extended to insert transactions into the block and optionally exclude the tx-pool,
to reproduce the exact block of the sequencer from just the inputs, as derived from L1 by the rollup-node.
See [L2 execution engine specs](https://github.com/ethereum-optimism/optimism/blob/develop/specs/exec-engine.md).
globs:
- "beacon/engine/types.go"
- "beacon/engine/gen_blockparams.go"
- "eth/catalyst/api.go"
- title: "Block-building modifications"
description: |
The block-building code (in the "miner" package because of Proof-Of-Work legacy of ethereum) implements the
changes to support the transaction-inclusion, tx-pool toggle and gaslimit parameters of the Engine API.
globs:
- "miner/*"
- title: "Tx-pool tx cost updates"
description: |
Transaction queueing and inclusion needs to account for the L1 cost component.
globs:
- "core/txpool/*"
- title: "Node modifications"
description: Changes to the node configuration and services.
sub:
- title: "CLI"
sub:
- title: "Flags"
description: |
Flag changes:
- Transactions can be forwarded to an RPC for sequencing.
- Historical calls can be forwarded to a legacy node.
- The tx pool propagation can be enabled/disabled.
- The Optimism bedrock fork activation can be changed for testing.
globs:
- "cmd/utils/flags.go"
- "cmd/geth/main.go"
- "internal/flags/categories.go"
- "cmd/geth/config.go"
- title: "Versioning"
description: List the op-geth and upstream go-ethereum versions.
globs:
- "cmd/geth/misccmd.go"
- "params/version.go"
- "build/ci.go"
- title: Node config
globs:
- "eth/ethconfig/config.go"
- title: Tx gossip disable option
globs:
- "eth/handler.go"
- "eth/handler_eth.go"
- title: "User API enhancements"
description: "Encode the Deposit Tx properties, the L1 costs, and daisy-chain RPC-calls for pre-Bedrock historical data"
sub:
- title: "Receipts metadata"
description: |
Pre-Bedrock L1-cost receipt data is loaded from the database if available, and post-Bedrock the L1-cost
metadata is hydrated on-the-fly based on the L1 fee information in the corresponding block.
globs:
- "core/types/receipt.go"
- "core/types/gen_receipt_json.go"
- title: "API Backend"
description: |
Forward transactions to the sequencer if configured.
globs:
- "eth/api_backend.go"
- "eth/backend.go"
- "internal/ethapi/backend.go"
- title: "Apply L1 cost in API responses"
globs:
- "eth/state_accessor.go"
- title: API frontend
description: Format deposit and L1-cost data in transaction responses. Add `debug_chainConfig` API.
globs:
- "internal/ethapi/api.go"
- "rpc/errors.go"
- title: Tracer RPC daisy-chain
description: Forward pre-bedrock tracing calls to legacy node.
globs:
- "eth/tracers/api.go"
- title: "Light Ethereum Subprotocol (LES) RPC"
description: Match the RPC changes in the LES RPC
globs:
- "les/*"
- title: "Daisy Chain tests"
globs:
- "internal/ethapi/transaction_args_test.go"
- "ethclient/ethclient_test.go"
- "eth/tracers/api_test.go"
- title: "Geth extras"
description: Extend the tools available in geth to improve external testing and tooling.
sub:
- title: Simulated Backend
globs:
- "accounts/abi/bind/backends/simulated.go"
- title: diff-included testing testing
description: |
Most of the op-geth changes are tested in the Optimism Monorepo and not part of the geth diff,
but some testing like the Deposit TX encoding and API interactions are embedded in the op-geth diff instead.
globs:
- "core/types/transaction_marshalling_test.go"
- "internal/ethapi/api_test.go"

# ignored globally, does not count towards line count
ignore:
Expand Down