forked from ethereum/go-ethereum
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fork.yaml: document op-geth changes with forkdiff (ethereum#35)
* fork.yaml: document op-geth changes * forkdiff gh-pages action Co-authored-by: Matthew Slipper <[email protected]>
- Loading branch information
1 parent
ffcd75b
commit e2e6188
Showing
2 changed files
with
218 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Build and publish forkdiff github-pages | ||
permissions: | ||
contents: write | ||
on: | ||
push: | ||
branches: | ||
- optimism-history | ||
jobs: | ||
deploy: | ||
concurrency: ci-${{ github.ref }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 1000 # make sure to fetch the old commit we diff against | ||
|
||
- name: Build forkdiff | ||
uses: "docker://protolambda/forkdiff:latest" | ||
with: | ||
args: -repo=/github/workspace -fork=/github/workspace/fork.yaml -out=/github/workspace/index.html | ||
|
||
- name: Build pages | ||
run: | | ||
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 | ||
with: | ||
folder: tmp/pages | ||
clean: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,182 @@ | ||
title: "op-geth - go-ethereum fork diff overview" | ||
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). | ||
base: | ||
name: go-ethereum | ||
url: https://github.com/ethereum/go-ethereum | ||
hash: 6d55908347cac7463dd6a2cb236f30ec26c9a121 | ||
fork: | ||
name: op-geth | ||
url: https://github.com/ethereum-optimism/op-geth | ||
ref: refs/heads/optimism-history | ||
def: | ||
title: "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. | ||
Related [op-stack specifications](https://github.com/ethereum-optimism/optimism/tree/develop/specs): | ||
- [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" | ||
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: "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. | ||
globs: | ||
- "params/config.go" | ||
- "params/protocol_params.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: | ||
- "core/beacon/types.go" | ||
- "core/beacon/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: | | ||
Transactions can be forwarded to an RPC for sequencing, | ||
historical calls can be forwarded to a legacy node, | ||
and the tx pool propagation can be enabled/disabled. | ||
globs: | ||
- "cmd/utils/flags.go" | ||
- "cmd/geth/main.go" | ||
- "internal/flags/categories.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. | ||
globs: | ||
- "internal/ethapi/api.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" | ||
# ignored globally, does not count towards line count | ||
ignore: | ||
- ".circleci/*" | ||
- "*.sum" | ||
- "fork.yaml" | ||
- ".github/workflows/*" |