-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
36 changed files
with
469 additions
and
254 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 |
---|---|---|
|
@@ -175,6 +175,8 @@ <h1 class="menu-title">OP Stack Specification</h1> | |
<main> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css" integrity="sha384-AfEj0r4/OFrOo5t7NnNe46zW/tFgW6x/bCJG8FqQCEo3+Aro6EYUG4+cU+KJWu/X" crossorigin="anonymous"> | ||
<h1 id="cannon-fault-proof-virtual-machine"><a class="header" href="#cannon-fault-proof-virtual-machine">Cannon Fault Proof Virtual Machine</a></h1> | ||
<!-- START doctoc generated TOC please keep comment here to allow auto update --> | ||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --> | ||
<p><strong>Table of Contents</strong></p> | ||
<ul> | ||
<li><a href="#overview">Overview</a></li> | ||
|
@@ -203,6 +205,7 @@ <h1 id="cannon-fault-proof-virtual-machine"><a class="header" href="#cannon-faul | |
</li> | ||
<li><a href="#exceptions">Exceptions</a></li> | ||
</ul> | ||
<!-- END doctoc generated TOC please keep comment here to allow auto update --> | ||
<h2 id="overview"><a class="header" href="#overview">Overview</a></h2> | ||
<p>This is a description of the Cannon Fault Proof Virtual Machine (FPVM). The Cannon FPVM emulates | ||
a minimal Linux-based system running on big-endian 32-bit MIPS32 architecture. | ||
|
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 |
---|---|---|
|
@@ -175,13 +175,16 @@ <h1 class="menu-title">OP Stack Specification</h1> | |
<main> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css" integrity="sha384-AfEj0r4/OFrOo5t7NnNe46zW/tFgW6x/bCJG8FqQCEo3+Aro6EYUG4+cU+KJWu/X" crossorigin="anonymous"> | ||
<h1 id="dispute-game-interface"><a class="header" href="#dispute-game-interface">Dispute Game Interface</a></h1> | ||
<!-- START doctoc generated TOC please keep comment here to allow auto update --> | ||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --> | ||
<p><strong>Table of Contents</strong></p> | ||
<ul> | ||
<li><a href="#overview">Overview</a></li> | ||
<li><a href="#types">Types</a></li> | ||
<li><a href="#disputegamefactory-interface"><code>DisputeGameFactory</code> Interface</a></li> | ||
<li><a href="#disputegame-interface"><code>DisputeGame</code> Interface</a></li> | ||
</ul> | ||
<!-- END doctoc generated TOC please keep comment here to allow auto update --> | ||
<h2 id="overview"><a class="header" href="#overview">Overview</a></h2> | ||
<p>A dispute game is played between multiple parties when contesting the truthiness | ||
of a claim. In the context of an optimistic rollup, claims are made about the | ||
|
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 |
---|---|---|
|
@@ -175,6 +175,8 @@ <h1 class="menu-title">OP Stack Specification</h1> | |
<main> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css" integrity="sha384-AfEj0r4/OFrOo5t7NnNe46zW/tFgW6x/bCJG8FqQCEo3+Aro6EYUG4+cU+KJWu/X" crossorigin="anonymous"> | ||
<h1 id="fault-dispute-game"><a class="header" href="#fault-dispute-game">Fault Dispute Game</a></h1> | ||
<!-- START doctoc generated TOC please keep comment here to allow auto update --> | ||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --> | ||
<p><strong>Table of Contents</strong></p> | ||
<ul> | ||
<li><a href="#overview">Overview</a></li> | ||
|
@@ -209,6 +211,7 @@ <h1 id="fault-dispute-game"><a class="header" href="#fault-dispute-game">Fault D | |
</ul> | ||
</li> | ||
</ul> | ||
<!-- END doctoc generated TOC please keep comment here to allow auto update --> | ||
<!-- Glossary References --> | ||
<h2 id="overview"><a class="header" href="#overview">Overview</a></h2> | ||
<p>The Fault Dispute Game (FDG) is a specific type of <a href="dispute-game-interface.html">dispute game</a> that verifies the | ||
|
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 |
---|---|---|
|
@@ -175,6 +175,8 @@ <h1 class="menu-title">OP Stack Specification</h1> | |
<main> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css" integrity="sha384-AfEj0r4/OFrOo5t7NnNe46zW/tFgW6x/bCJG8FqQCEo3+Aro6EYUG4+cU+KJWu/X" crossorigin="anonymous"> | ||
<h1 id="honest-challenger-fault-dispute-game"><a class="header" href="#honest-challenger-fault-dispute-game">Honest Challenger (Fault Dispute Game)</a></h1> | ||
<!-- START doctoc generated TOC please keep comment here to allow auto update --> | ||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --> | ||
<p><strong>Table of Contents</strong></p> | ||
<ul> | ||
<li><a href="#overview">Overview</a></li> | ||
|
@@ -187,13 +189,14 @@ <h1 id="honest-challenger-fault-dispute-game"><a class="header" href="#honest-ch | |
</li> | ||
<li><a href="#resolution">Resolution</a></li> | ||
</ul> | ||
<!-- END doctoc generated TOC please keep comment here to allow auto update --> | ||
<h2 id="overview"><a class="header" href="#overview">Overview</a></h2> | ||
<p>The honest challenger is an agent interacting in the <a href="fault-dispute-game.html">Fault Dispute Game</a> | ||
(FDG) that supports honest claims and disputes false claims. | ||
An honest challenger strives to ensure a correct, truthful, game resolution. | ||
The honest challenger is also <em>rational</em> as any deviation from its behavior will result in | ||
negative outcomes. | ||
This document specifies the expected behavior of an honest challenger.</p> | ||
<h2 id="overview"><a class="header" href="#overview">Overview</a></h2> | ||
<p>The Honest Challenger has two primary duties:</p> | ||
<ol> | ||
<li>Support valid root claims in Fault Dispute Games.</li> | ||
|
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 |
---|---|---|
|
@@ -175,6 +175,8 @@ <h1 class="menu-title">OP Stack Specification</h1> | |
<main> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css" integrity="sha384-AfEj0r4/OFrOo5t7NnNe46zW/tFgW6x/bCJG8FqQCEo3+Aro6EYUG4+cU+KJWu/X" crossorigin="anonymous"> | ||
<h1 id="fault-proof"><a class="header" href="#fault-proof">Fault Proof</a></h1> | ||
<!-- START doctoc generated TOC please keep comment here to allow auto update --> | ||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --> | ||
<p><strong>Table of Contents</strong></p> | ||
<ul> | ||
<li><a href="#overview">Overview</a></li> | ||
|
@@ -217,6 +219,7 @@ <h1 id="fault-proof"><a class="header" href="#fault-proof">Fault Proof</a></h1> | |
<li><a href="#fault-proof-vm">Fault Proof VM</a></li> | ||
<li><a href="#fault-proof-interactive-dispute-game">Fault Proof Interactive Dispute Game</a></li> | ||
</ul> | ||
<!-- END doctoc generated TOC please keep comment here to allow auto update --> | ||
<h2 id="overview"><a class="header" href="#overview">Overview</a></h2> | ||
<p>A fault proof, also known as fraud proof or interactive game, consists of 3 components:</p> | ||
<ul> | ||
|
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 |
---|---|---|
|
@@ -175,6 +175,8 @@ <h1 class="menu-title">OP Stack Specification</h1> | |
<main> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css" integrity="sha384-AfEj0r4/OFrOo5t7NnNe46zW/tFgW6x/bCJG8FqQCEo3+Aro6EYUG4+cU+KJWu/X" crossorigin="anonymous"> | ||
<h1 id="glossary"><a class="header" href="#glossary">Glossary</a></h1> | ||
<!-- START doctoc generated TOC please keep comment here to allow auto update --> | ||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --> | ||
<p><strong>Table of Contents</strong></p> | ||
<ul> | ||
<li><a href="#general-terms">General Terms</a> | ||
|
@@ -272,6 +274,7 @@ <h1 id="glossary"><a class="header" href="#glossary">Glossary</a></h1> | |
</ul> | ||
</li> | ||
</ul> | ||
<!-- END doctoc generated TOC please keep comment here to allow auto update --> | ||
<hr /> | ||
<h1 id="general-terms"><a class="header" href="#general-terms">General Terms</a></h1> | ||
<h2 id="layer-1-l1"><a class="header" href="#layer-1-l1">Layer 1 (L1)</a></h2> | ||
|
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
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 |
---|---|---|
|
@@ -175,6 +175,11 @@ <h1 class="menu-title">OP Stack Specification</h1> | |
<main> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css" integrity="sha384-AfEj0r4/OFrOo5t7NnNe46zW/tFgW6x/bCJG8FqQCEo3+Aro6EYUG4+cU+KJWu/X" crossorigin="anonymous"> | ||
<h1 id="introduction"><a class="header" href="#introduction">Introduction</a></h1> | ||
<p>Optimism is an <em>EVM equivalent</em>, <em>optimistic rollup</em> protocol designed to <em>scale Ethereum</em> while remaining maximally | ||
compatible with existing Ethereum infrastructure. This document provides an overview of the protocol to provide context | ||
for the rest of the specification.</p> | ||
<!-- START doctoc generated TOC please keep comment here to allow auto update --> | ||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --> | ||
<p><strong>Table of Contents</strong></p> | ||
<ul> | ||
<li><a href="#foundations">Foundations</a> | ||
|
@@ -201,9 +206,7 @@ <h1 id="introduction"><a class="header" href="#introduction">Introduction</a></h | |
</li> | ||
<li><a href="#next-steps">Next Steps</a></li> | ||
</ul> | ||
<p>Optimism is an <em>EVM equivalent</em>, <em>optimistic rollup</em> protocol designed to <em>scale Ethereum</em> while remaining maximally | ||
compatible with existing Ethereum infrastructure. This document provides an overview of the protocol to provide context | ||
for the rest of the specification.</p> | ||
<!-- END doctoc generated TOC please keep comment here to allow auto update --> | ||
<h2 id="foundations"><a class="header" href="#foundations">Foundations</a></h2> | ||
<h3 id="what-is-ethereum-scalability"><a class="header" href="#what-is-ethereum-scalability">What is Ethereum scalability?</a></h3> | ||
<p>Scaling Ethereum means increasing the number of useful transactions the Ethereum network can process. Ethereum's | ||
|
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 |
---|---|---|
|
@@ -175,9 +175,11 @@ <h1 class="menu-title">OP Stack Specification</h1> | |
<main> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css" integrity="sha384-AfEj0r4/OFrOo5t7NnNe46zW/tFgW6x/bCJG8FqQCEo3+Aro6EYUG4+cU+KJWu/X" crossorigin="anonymous"> | ||
<h1 id="meta-processes"><a class="header" href="#meta-processes">Meta Processes</a></h1> | ||
<!-- START doctoc generated TOC please keep comment here to allow auto update --> | ||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --> | ||
<!-- END doctoc generated TOC please keep comment here to allow auto update --> | ||
<p>This directory describes processes that we use to lint/test the specification.</p> | ||
<ul> | ||
<li><a href="linting.html">Linting</a>: how to lint source files.</li> | ||
<li><a href="markdown-style.html">Markdown Style Guide</a>: how to format and structure Markdown files.</li> | ||
<li><a href="versioning.html">Versioning</a></li> | ||
</ul> | ||
|
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 |
---|---|---|
|
@@ -175,53 +175,6 @@ <h1 class="menu-title">OP Stack Specification</h1> | |
<main> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css" integrity="sha384-AfEj0r4/OFrOo5t7NnNe46zW/tFgW6x/bCJG8FqQCEo3+Aro6EYUG4+cU+KJWu/X" crossorigin="anonymous"> | ||
<h1 id="linting"><a class="header" href="#linting">Linting</a></h1> | ||
<p><strong>Table of Contents</strong></p> | ||
<ul> | ||
<li><a href="#markdown">Markdown</a></li> | ||
<li><a href="#go">Go</a></li> | ||
</ul> | ||
<h2 id="markdown"><a class="header" href="#markdown">Markdown</a></h2> | ||
<p>See</p> | ||
<ul> | ||
<li><a href="https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md">markdownlint rule reference</a></li> | ||
<li><a href="https://github.com/DavidAnson/markdownlint/blob/main/schema/.markdownlint.jsonc">example .markdownlint.json file</a></li> | ||
</ul> | ||
<p>Justification for linting rules in | ||
<a href="https://github.com/ethereum-optimism/specs/blob/main/.markdownlint.json">.markdownlint.json</a>:</p> | ||
<ul> | ||
<li><em>line_length</em> (<code>!strict && stern</code>): don't trip up on url lines</li> | ||
<li><em>no-blanks-blockquote</em>: enable multiple consecutive blockquotes separated by white lines</li> | ||
<li><em>single-title</em>: enable reusing <code><h1></code> for content</li> | ||
<li><em>no-emphasis-as-heading</em>: enable emphasized paragraphs</li> | ||
</ul> | ||
<pre><code class="language-shell">pnpm i # Install dependencies | ||
pnpm lint:specs:check # Run linter | ||
pnpm lint:specs:fix # Fix lint issues | ||
|
||
# Check links | ||
docker run --init -it -v `pwd`:/input lycheeverse/lychee --verbose --no-progress --exclude-loopback --exclude twitter.com --exclude-mail /input/README.md "/input/specs/**/*.md" | ||
</code></pre> | ||
<p>To check links, you'll need to install <a href="https://github.com/lycheeverse/lychee">lychee</a>. The <a href="https://github.com/lycheeverse/lychee-action/blob/f76b8412c668f78311212d16d33c4784a7d8762c/Dockerfile">version ran in CI</a> is 0.8.1, but | ||
you should install lychee 0.8.2 locally with <code>cargo install --version 0.8.2 lychee</code> (there are some | ||
reported build problems with 0.8.1).</p> | ||
<p>You can install cargo (the Rust package manager) via <a href="https://www.rust-lang.org/tools/install">rustup</a>.</p> | ||
<h1 id="go"><a class="header" href="#go">Go</a></h1> | ||
<p>See</p> | ||
<ul> | ||
<li><a href="https://golangci-lint.run/usage/install/#local-installation">golangci-lint docs</a></li> | ||
<li><a href="https://github.com/golangci/golangci-lint">golangci-lint github</a></li> | ||
<li><a href="https://github.com/golangci/golangci-lint-action">github action github</a></li> | ||
</ul> | ||
<p>Justification for linting rules:</p> | ||
<ul> | ||
<li><em>asciicheck</em>: no symbol names with invisible unicode and such</li> | ||
<li><em>goimports</em>: group local and external import</li> | ||
</ul> | ||
<pre><code class="language-shell"># Install linter globally (should not affect go.mod) | ||
go install github.com/golangci/golangci-lint/cmd/[email protected] | ||
# run linter, add --fix option to fix problems (where supported) | ||
golangci-lint run -E goimports,sqlclosecheck,bodyclose,asciicheck,misspell,errorlint --timeout 2m -e "errors.As" -e "errors.Is" ./... | ||
</code></pre> | ||
|
||
</main> | ||
|
||
|
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 |
---|---|---|
|
@@ -175,6 +175,8 @@ <h1 class="menu-title">OP Stack Specification</h1> | |
<main> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css" integrity="sha384-AfEj0r4/OFrOo5t7NnNe46zW/tFgW6x/bCJG8FqQCEo3+Aro6EYUG4+cU+KJWu/X" crossorigin="anonymous"> | ||
<h1 id="markdown-style-guide"><a class="header" href="#markdown-style-guide">Markdown Style Guide</a></h1> | ||
<!-- START doctoc generated TOC please keep comment here to allow auto update --> | ||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --> | ||
<p><strong>Table of Contents</strong></p> | ||
<ul> | ||
<li><a href="#linting">Linting</a></li> | ||
|
@@ -185,6 +187,7 @@ <h1 id="markdown-style-guide"><a class="header" href="#markdown-style-guide">Mar | |
</li> | ||
<li><a href="#internal-in-file-links">Internal (In-File) Links</a></li> | ||
</ul> | ||
<!-- END doctoc generated TOC please keep comment here to allow auto update --> | ||
<h2 id="linting"><a class="header" href="#linting">Linting</a></h2> | ||
<p>Respect the <a href="linting.html#markdown">linting rules</a> (you can run the linter with <code>pnpm lint</code>).</p> | ||
<p>Notably:</p> | ||
|
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 |
---|---|---|
|
@@ -175,6 +175,8 @@ <h1 class="menu-title">OP Stack Specification</h1> | |
<main> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css" integrity="sha384-AfEj0r4/OFrOo5t7NnNe46zW/tFgW6x/bCJG8FqQCEo3+Aro6EYUG4+cU+KJWu/X" crossorigin="anonymous"> | ||
<h1 id="versioning"><a class="header" href="#versioning">Versioning</a></h1> | ||
<!-- START doctoc generated TOC please keep comment here to allow auto update --> | ||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --> | ||
<p><strong>Table of Contents</strong></p> | ||
<ul> | ||
<li><a href="#go-modules">Go modules</a> | ||
|
@@ -184,6 +186,7 @@ <h1 id="versioning"><a class="header" href="#versioning">Versioning</a></h1> | |
</li> | ||
<li><a href="#typescript">Typescript</a></li> | ||
</ul> | ||
<!-- END doctoc generated TOC please keep comment here to allow auto update --> | ||
<h2 id="go-modules"><a class="header" href="#go-modules">Go modules</a></h2> | ||
<p>Go modules that are currently versioned:</p> | ||
<pre><code class="language-text">./op-service | ||
|
Oops, something went wrong.