Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
121 commits
Select commit Hold shift + click to select a range
fd1c86c
remove unnecessary timer check from ListenAndServeContext
Flocqst Aug 17, 2023
e2b717e
move op-node http package into op-service httputil + update related i…
Flocqst Aug 17, 2023
0a2ebc4
modified package name and removed unused imports
Flocqst Aug 17, 2023
0f1633e
fix op-node-lint
Flocqst Aug 17, 2023
0737ebb
Merge branch 'ethereum-optimism:develop' into op-service/http-util-cl…
Flocqst Aug 31, 2023
208731a
Fix dangling modified file on make devnet-up
jyellick Aug 29, 2023
8bbd98d
ci: Add additional CI tasks that weren't previously required as depen…
ajsutton Sep 1, 2023
ac1a0e6
ci: Remove space from 'op-heartbeat tests'
ajsutton Sep 1, 2023
08af0b5
docs: challenger typo
Sabnock01 Sep 3, 2023
a40781f
docs: add op-preimage to directory structure
Sabnock01 Sep 3, 2023
8b9acdd
Merge pull request #7095 from Sabnock01/sabnock/challenger-spec-typo
OptimismBot Sep 3, 2023
fab80ef
op-challenger: Fix error in make alphabet
ajsutton Sep 3, 2023
c3d04d3
op-program: Recreate preimage data dir if required
ajsutton Sep 3, 2023
c33e808
op-node: Default to no netrestrict instead of allow none
ajsutton Sep 4, 2023
65fe9cf
Merge pull request #7096 from ethereum-optimism/aj/fix-alphabet
OptimismBot Sep 4, 2023
8538d0b
Merge branch 'develop' into op-service/http-util-cleanup
mergify[bot] Sep 4, 2023
2f745cb
Merge pull request #6853 from Flocqst/op-service/http-util-cleanup
OptimismBot Sep 4, 2023
ff17f6c
build(deps-dev): bump @babel/eslint-parser from 7.22.10 to 7.22.15
dependabot[bot] Sep 4, 2023
4df80ce
Merge pull request #7098 from ethereum-optimism/aj/fix-netrestrict
OptimismBot Sep 4, 2023
fa2a69a
Dockerfiles: Run go mod download with just the go.mod and go.sum files
ajsutton Sep 4, 2023
524e7e2
op-e2e: Add test that deploys a contract using a deposit tx
ajsutton Sep 5, 2023
c3dd839
op-e2e: Add test for L2 transaction gossip
ajsutton Sep 5, 2023
96ac4c2
op-e2e: Extract out helper methods for connecting peers.
ajsutton Sep 5, 2023
4593a87
op-e2e: Skip tests that specify GethOptions when using external clients
ajsutton Sep 5, 2023
271008b
codecov: Disable posting comment on PRs (#7106)
ajsutton Sep 5, 2023
ab7496c
Merge pull request #7108 from ethereum-optimism/aj/e2e-tx-gossip
OptimismBot Sep 5, 2023
c7d53af
Merge branch 'develop' into aj/deposit-create-contract
mergify[bot] Sep 5, 2023
dbc719b
specs: span-batch spec fixes, issues found by @testinprod-io @ImTei
protolambda Jul 20, 2023
9b4b5c8
specs: extended span-batches fixes: fix off-by-one to allow L1 origin…
protolambda Jul 20, 2023
f2bc0a7
specs: span-batches spec - fix lint and add explicit check of L1 orig…
protolambda Jul 20, 2023
2ef2087
Merge pull request #7107 from ethereum-optimism/aj/deposit-create-con…
OptimismBot Sep 5, 2023
aefb7b4
Merge branch 'develop' into aj/recreate-dir
mergify[bot] Sep 5, 2023
70de8ae
specs: update span-batch format and rules
ImTei Sep 5, 2023
05bacdc
Merge pull request #7097 from ethereum-optimism/aj/recreate-dir
OptimismBot Sep 5, 2023
6436124
Merge branch 'develop' into aj/require-e2e
mergify[bot] Sep 5, 2023
37583a8
Merge pull request #7085 from ethereum-optimism/aj/require-e2e
OptimismBot Sep 5, 2023
79f5d26
Merge branch 'develop' into span-batch-spec-fixes
mergify[bot] Sep 5, 2023
2626dbe
Merge pull request #6363 from ethereum-optimism/span-batch-spec-fixes
OptimismBot Sep 5, 2023
a313e8b
Merge branch 'develop' into aj/faster-dockerfile
mergify[bot] Sep 5, 2023
1d861eb
Merge pull request #7105 from ethereum-optimism/aj/faster-dockerfile
OptimismBot Sep 5, 2023
07cf16d
Add Game Status Tracking GaugeVec
refcell Aug 31, 2023
1650070
Track in flight games inside the scheduler component.
refcell Sep 1, 2023
765e3eb
op-node: implement runtime config reloading
protolambda Sep 5, 2023
23d0635
Merge pull request #7080 from ethereum-optimism/refcell/game-gauge
OptimismBot Sep 5, 2023
bfa2f7e
Merge branch 'develop' into refcell/inflight-gauge
mergify[bot] Sep 5, 2023
9f926a6
Merge pull request #7086 from ethereum-optimism/refcell/inflight-gauge
OptimismBot Sep 5, 2023
462cc31
fix bridge processor height detection on startup
hamdiallam Sep 6, 2023
882e801
op-e2e: Move geth wait utils to e2eutils
ajsutton Sep 5, 2023
aeeb192
op-e2e: Move geth init utils to e2eutils
ajsutton Sep 5, 2023
932a9bc
Add initial documentation for fault proof alpha.
ajsutton Sep 4, 2023
702eb6b
Update FPA docs based on review feedback.
ajsutton Sep 6, 2023
9e055c3
Merge pull request #7109 from ethereum-optimism/aj/e2e-utils
OptimismBot Sep 6, 2023
fdfa5df
Create an e2e test showing cannon proving an output root is invalid
ajsutton Sep 6, 2023
b6cae65
feat(indexer): Add metrics to indexer/api
Aug 28, 2023
9bc31f6
feat(indexer): Connect api metrics to cli
Aug 28, 2023
9e1efe4
refactors
Aug 29, 2023
ea7e4f3
lowercase
roninjin10 Sep 6, 2023
5192ff2
:bug: bad rebase
Sep 6, 2023
3c6e59b
feat(indexer): add recoverer middleware
Aug 28, 2023
19876d5
Merge pull request #7038 from ethereum-optimism/08-28-feat_indexer_Ad…
OptimismBot Sep 6, 2023
99c5b8f
Merge branch 'develop' into 08-28-feat_indexer_add_recoverer_middleware
mergify[bot] Sep 6, 2023
1857d61
:recycle: chore: Make port configurable
Sep 1, 2023
896d516
:wrench: chore: update schema.prisma
Sep 1, 2023
a89b3dd
Merge pull request #7040 from ethereum-optimism/08-28-feat_indexer_ad…
OptimismBot Sep 6, 2023
b892679
Merge branch 'develop' into willc/port
mergify[bot] Sep 6, 2023
278a630
Merge pull request #7102 from ethereum-optimism/dependabot/npm_and_ya…
roninjin10 Sep 6, 2023
16b4ef3
Merge branch 'develop' into willc/port
mergify[bot] Sep 6, 2023
2012b3b
build(deps-dev): bump @vitest/coverage-istanbul from 0.34.1 to 0.34.3
dependabot[bot] Sep 6, 2023
b96f015
Merge pull request #7089 from ethereum-optimism/willc/port
OptimismBot Sep 6, 2023
d9a133c
Merge branch 'develop' into willc/update-prisma
mergify[bot] Sep 6, 2023
c576a7c
Merge pull request #7090 from ethereum-optimism/willc/update-prisma
OptimismBot Sep 6, 2023
ab15f32
Merge branch 'develop' into dependabot/npm_and_yarn/vitest/coverage-i…
mergify[bot] Sep 6, 2023
d396a9b
Merge pull request #7112 from ethereum-optimism/indexer.bridge.starti…
hamdiallam Sep 6, 2023
92b279a
Merge branch 'develop' into dependabot/npm_and_yarn/vitest/coverage-i…
mergify[bot] Sep 6, 2023
eb1d3f5
Merge pull request #7021 from ethereum-optimism/dependabot/npm_and_ya…
OptimismBot Sep 6, 2023
e552ede
Merge branch 'develop' into aj/cannon-invalid-output-root
mergify[bot] Sep 6, 2023
49c42ab
Merge pull request #7114 from ethereum-optimism/aj/cannon-invalid-out…
OptimismBot Sep 6, 2023
dfd06d3
Merge branch 'develop' into aj/fpa-docs
mergify[bot] Sep 6, 2023
415537c
Merge pull request #7099 from ethereum-optimism/aj/fpa-docs
OptimismBot Sep 6, 2023
be4a647
Fixes small markdown header.
refcell Sep 6, 2023
d35ffae
small bugfix
hamdiallam Sep 6, 2023
2fe6842
operators were right before
hamdiallam Sep 6, 2023
0784b3b
fix bridge startup
hamdiallam Sep 6, 2023
76b9fff
Merge pull request #7118 from ethereum-optimism/indexer.bridge.bugfix
OptimismBot Sep 6, 2023
20f85ba
build(deps): bump github.com/ethereum/go-ethereum in /op-exporter
dependabot[bot] Sep 6, 2023
f68505e
Merge branch 'develop' into refcell/small-manual-header-nits
mergify[bot] Sep 6, 2023
3e2236d
Merge pull request #7117 from ethereum-optimism/refcell/small-manual-…
OptimismBot Sep 6, 2023
e510ab1
Merge branch 'develop' into dependabot/go_modules/op-exporter/github.…
mergify[bot] Sep 6, 2023
df821cf
Add `TestStateHash`
clabby Sep 7, 2023
302500e
Merge pull request #7123 from ethereum-optimism/dependabot/go_modules…
OptimismBot Sep 7, 2023
7feb2e1
Merge branch 'develop' into fpvm-status
mergify[bot] Sep 7, 2023
db94109
Merge pull request #6913 from ethereum-optimism/fpvm-status
OptimismBot Sep 7, 2023
023b3d5
op-e2e: Update e2e tests to demonstrate issues with vm status.
ajsutton Sep 6, 2023
34d694c
op-node: update config-reloading comment
protolambda Sep 7, 2023
ce3d79a
op-e2e: use wait.ForReceiptOK helper instead of bind.WaitMined
protolambda Sep 7, 2023
1752ffc
Merge branch 'develop' into runtime-config-reloading
mergify[bot] Sep 7, 2023
cb06683
Merge pull request #7111 from ethereum-optimism/runtime-config-reloading
OptimismBot Sep 7, 2023
6024d20
Add `forge clean` to `op-bindings` Makefile
clabby Sep 7, 2023
2db03c7
Merge branch 'develop' into aj/fpvm-status-e2e
mergify[bot] Sep 7, 2023
ac5f806
Merge pull request #7134 from ethereum-optimism/aj/fpvm-status-e2e
OptimismBot Sep 7, 2023
98f24c5
Merge branch 'develop' into clabby/bindings/forge-clean
mergify[bot] Sep 7, 2023
a1a0df7
op-e2e: Add call to step that verifies it is reject when matching the…
ajsutton Sep 7, 2023
902c40a
Merge branch 'develop' into clabby/bindings/forge-clean
mergify[bot] Sep 7, 2023
ccf977b
chore: :broom: `foundry.toml`
clabby Sep 7, 2023
697d464
Merge pull request #7137 from ethereum-optimism/clabby/bindings/forge…
OptimismBot Sep 7, 2023
2b923b9
Merge branch 'develop' into clabby/ctb/clean-foundry-toml
mergify[bot] Sep 7, 2023
b73b7c2
Merge pull request #7138 from ethereum-optimism/clabby/ctb/clean-foun…
OptimismBot Sep 7, 2023
b8ef117
:bug: fix: update prisma schema
Sep 7, 2023
3b1a490
EAS v1.2.0: gas optimizations, minor improvements and fixes, and some…
lbeder Sep 7, 2023
958eeb5
op-e2e: Remove duplicate logic for playing through a game
ajsutton Sep 7, 2023
7e54d22
Merge branch 'develop' into update-prisma
mergify[bot] Sep 7, 2023
28a6c6c
Merge pull request #7139 from ethereum-optimism/update-prisma
OptimismBot Sep 7, 2023
0b828f3
Merge branch 'develop' into aj/e2e-duplication
mergify[bot] Sep 7, 2023
8d8597a
Merge pull request #7135 from ethereum-optimism/aj/e2e-duplication
OptimismBot Sep 7, 2023
2ab81ce
Merge branch 'develop' into cleanup-devnet-modified-file
ajsutton Sep 7, 2023
27cae8f
build(deps): bump viem from 1.3.1 to 1.10.7
dependabot[bot] Sep 7, 2023
efc2c7e
Merge pull request #7142 from ethereum-optimism/dependabot/npm_and_ya…
OptimismBot Sep 7, 2023
274f7e9
Merge branch 'develop' into aj/cleanup-devnet-modified-file
mergify[bot] Sep 7, 2023
5e93c16
Merge pull request #7140 from ethereum-optimism/aj/cleanup-devnet-mod…
OptimismBot Sep 7, 2023
76f4311
fix
Sep 26, 2023
040cb59
build(deps): bump github.com/hashicorp/golang-lru/v2 from 2.0.2 to 2.0.7
dependabot[bot] Oct 2, 2023
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
8 changes: 7 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1142,7 +1142,7 @@ workflows:
working_directory: proxyd
- indexer-tests
- go-lint-test-build:
name: op-heartbeat tests
name: op-heartbeat-tests
binary_name: op-heartbeat
working_directory: op-heartbeat
- semgrep-scan
Expand Down Expand Up @@ -1224,7 +1224,11 @@ workflows:
target: test-external-geth
- bedrock-go-tests:
requires:
- go-mod-tidy
- cannon-build-test-vectors
- cannon-go-lint-and-test
- check-generated-mocks-op-node
- check-generated-mocks-op-service
- op-batcher-lint
- op-bootnode-lint
- op-bindings-lint
Expand All @@ -1238,13 +1242,15 @@ workflows:
- op-batcher-tests
- op-bindings-tests
- op-chain-ops-tests
- op-heartbeat-tests
- op-node-tests
- op-proposer-tests
- op-challenger-tests
- op-program-tests
- op-service-tests
- op-e2e-WS-tests
- op-e2e-HTTP-tests
- op-e2e-ext-geth-tests
- docker-build:
name: op-node-docker-build
docker_file: op-node/Dockerfile
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ Refer to the Directory Structure section below to understand which packages are
├── <a href="./op-exporter">op-exporter</a>: Prometheus exporter client
├── <a href="./op-heartbeat">op-heartbeat</a>: Heartbeat monitor service
├── <a href="./op-node">op-node</a>: rollup consensus-layer client
├── <a href="./op-preimage">op-preimage</a>: Go bindings for Preimage Oracle
├── <a href="./op-program">op-program</a>: Fault proof program
├── <a href="./op-proposer">op-proposer</a>: L2-Output Submitter, submits proposals to L1
├── <a href="./op-service">op-service</a>: Common codebase utilities
Expand Down
26 changes: 17 additions & 9 deletions bedrock-devnet/devnet/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,9 @@ def main():
deployment_dir = pjoin(contracts_bedrock_dir, 'deployments', 'devnetL1')
op_node_dir = pjoin(args.monorepo_dir, 'op-node')
ops_bedrock_dir = pjoin(monorepo_dir, 'ops-bedrock')
deploy_config_dir = pjoin(contracts_bedrock_dir, 'deploy-config'),
devnet_config_path = pjoin(contracts_bedrock_dir, 'deploy-config', 'devnetL1.json')
deploy_config_dir = pjoin(contracts_bedrock_dir, 'deploy-config')
devnet_config_path = pjoin(deploy_config_dir, 'devnetL1.json')
devnet_config_template_path = pjoin(deploy_config_dir, 'devnetL1-template.json')
ops_chain_ops = pjoin(monorepo_dir, 'op-chain-ops')
sdk_dir = pjoin(monorepo_dir, 'packages', 'sdk')

Expand All @@ -69,6 +70,7 @@ def main():
l1_deployments_path=pjoin(deployment_dir, '.deploy'),
deploy_config_dir=deploy_config_dir,
devnet_config_path=devnet_config_path,
devnet_config_template_path=devnet_config_template_path,
op_node_dir=op_node_dir,
ops_bedrock_dir=ops_bedrock_dir,
ops_chain_ops=ops_chain_ops,
Expand Down Expand Up @@ -124,10 +126,16 @@ def deploy_contracts(paths):
'--rpc-url', 'http://127.0.0.1:8545'
], env={}, cwd=paths.contracts_bedrock_dir)


def init_devnet_l1_deploy_config(paths, update_timestamp=False):
deploy_config = read_json(paths.devnet_config_template_path)
if update_timestamp:
deploy_config['l1GenesisBlockTimestamp'] = '{:#x}'.format(int(time.time()))
write_json(paths.devnet_config_path, deploy_config)

def devnet_l1_genesis(paths):
log.info('Generating L1 genesis state')
init_devnet_l1_deploy_config(paths)

geth = subprocess.Popen([
'geth', '--dev', '--http', '--http.api', 'eth,debug',
'--verbosity', '4', '--gcmode', 'archive', '--dev.gaslimit', '30000000'
Expand Down Expand Up @@ -157,13 +165,13 @@ def devnet_deploy(paths):
if os.path.exists(paths.allocs_path) == False:
devnet_l1_genesis(paths)

devnet_config_backup = pjoin(paths.devnet_dir, 'devnetL1.json.bak')
shutil.copy(paths.devnet_config_path, devnet_config_backup)
deploy_config = read_json(paths.devnet_config_path)
deploy_config['l1GenesisBlockTimestamp'] = '{:#x}'.format(int(time.time()))
write_json(paths.devnet_config_path, deploy_config)
# It's odd that we want to regenerate the devnetL1.json file with
# an updated timestamp different than the one used in the devnet_l1_genesis
# function. But, without it, CI flakes on this test rather consistently.
# If someone reads this comment and understands why this is being done, please
# update this comment to explain.
init_devnet_l1_deploy_config(paths, update_timestamp=True)
outfile_l1 = pjoin(paths.devnet_dir, 'genesis-l1.json')

run_command([
'go', 'run', 'cmd/main.go', 'genesis', 'l1',
'--deploy-config', paths.devnet_config_path,
Expand Down
47 changes: 47 additions & 0 deletions cannon/mipsevm/state_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,53 @@ func TestState(t *testing.T) {
}
}

// Run through all permutations of `exited` / `exitCode` and ensure that the
// correct witness, state hash, and VM Status is produced.
func TestStateHash(t *testing.T) {
cases := []struct {
exited bool
exitCode uint8
}{
{exited: false, exitCode: 0},
{exited: false, exitCode: 1},
{exited: false, exitCode: 2},
{exited: false, exitCode: 3},
{exited: true, exitCode: 0},
{exited: true, exitCode: 1},
{exited: true, exitCode: 2},
{exited: true, exitCode: 3},
}

exitedOffset := 32*2 + 4*6
for _, c := range cases {
state := &State{
Memory: NewMemory(),
Exited: c.exited,
ExitCode: c.exitCode,
}

actualWitness := state.EncodeWitness()
actualStateHash, err := StateWitness(actualWitness).StateHash()
require.NoError(t, err, "Error hashing witness")
require.Equal(t, len(actualWitness), StateWitnessSize, "Incorrect witness size")

expectedWitness := make(StateWitness, 226)
memRoot := state.Memory.MerkleRoot()
copy(expectedWitness[:32], memRoot[:])
expectedWitness[exitedOffset] = c.exitCode
var exited uint8
if c.exited {
exited = 1
}
expectedWitness[exitedOffset+1] = uint8(exited)
require.Equal(t, expectedWitness[:], actualWitness[:], "Incorrect witness")

expectedStateHash := crypto.Keccak256Hash(actualWitness)
expectedStateHash[0] = vmStatus(c.exited, c.exitCode)
require.Equal(t, expectedStateHash, actualStateHash, "Incorrect state hash")
}
}

func TestHello(t *testing.T) {
elfProgram, err := elf.Open("../example/bin/hello.elf")
require.NoError(t, err, "open ELF file")
Expand Down
5 changes: 1 addition & 4 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
comment:
layout: "reach, diff, flags, files"
behavior: default
require_changes: true # only post the comment if coverage changes
comment: false
ignore:
- "op-e2e"
- "**/*.t.sol"
Expand Down
1 change: 1 addition & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ The directory layout is divided into the following sub-directories.

- [`postmortems/`](./postmortems/): Timestamped post-mortem documents.
- [`security-reviews`](./security-reviews/): Audit summaries and other security review documents.
- [`fault-proof-alpha`](./fault-proof-alpha): Information on the alpha version of the fault proof system.
16 changes: 16 additions & 0 deletions docs/fault-proof-alpha/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
## Fault Proofs Alpha

The fault proof alpha is a pre-release version of the OP Stack fault proof system.
This documentation provides an overview of the system and instructions on how to help
test the fault proof system.

The overall design of this system along with the APIs and interfaces it exposes are not
finalized and may change without notice.

### Contents

* Overview
* [Deployment Details](./deployments.md)
* [Manual Usage](./manual.md)
* [Creating Traces with Cannon](./cannon.md)
* [Automation with `op-challenger`](./run-challenger.md)
92 changes: 92 additions & 0 deletions docs/fault-proof-alpha/cannon.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
## Generate Traces with `cannon` and `op-program`

Normally, `op-challenger` handles creating the required traces as part of responding to games. However, for manual
testing it may be useful to manually generate the trace. This can be done by running `cannon` directly.

### Prerequisites

- The cannon pre-state downloaded from [Goerli deployment](./deployments.md#goerli).
- A Goerli L1 node.
- An archive node is not required.
- Public RPC providers can be used, however a significant number of requests will need to be made which may exceed
rate limits for free plans.
- An OP-Goerli L2 archive node with `debug` APIs enabled.
- An archive node is required to ensure world-state pre-images remain available.
- Public RPC providers are generally not usable as they don’t support the `debug_dbGet` RPC method.

### Compilation

To compile the required programs, in the top level of the monorepo run:

```bash
make cannon-prestate
```

This will compile the `cannon` executable to `cannon/bin/cannon` as well as the `op-program` executable used to fetch
pre-image data to `op-program/bin/op-program`.

### Run Cannon

To run cannon to generate a proof use:

```bash
mkdir -p temp/cannon/proofs temp/cannon/snapshots temp/cannon/preimages

./cannon/bin/cannon run \
--pprof.cpu \
--info-at '%10000000' \
--proof-at '=<TRACE_INDEX>' \
--stop-at '=<STOP_INDEX>' \
--proof-fmt 'temp/cannon/proofs/%d.json' \
--snapshot-at '%1000000000' \
--snapshot-fmt 'temp/cannon/snapshots/%d.json.gz' \
--input <PRESTATE> \
--output temp/cannon/stop-state.json \
-- \
./op-program/bin/op-program \
--network goerli \
--l1 <L1_URL> \
--l2 <L2_URL> \
--l1.head <L1_HEAD> \
--l2.claim <L2_CLAIM> \
--l2.head <L2_HEAD> \
--l2.blocknumber <L2_BLOCK_NUMBER> \
--datadir temp/cannon/preimages \
--log.format terminal \
--server
```

The placeholders are:

- `<TRACE_INDEX>` the index in the trace to generate a proof for
- `<STOP_INDEX>` the index to stop execution at. Typically this is one instruction after `<TRACE_INDEX>` to stop as soon
as the required proof has been generated.
- `<PRESTATE>` the prestate.json downloaded above. Note that this needs to precisely match the prestate used on-chain so
must be the downloaded version and not a version built locally.
- `<L1_URL>` the Goerli L1 JSON RPC endpoint
- `<L2_URL>` the OP-Goerli L2 archive node JSON RPC endpoint
- `<L1_HEAD>` the hash of the L1 head block used for the dispute game
- `<L2_CLAIM>` the output root immediately prior to the disputed root in the L2 output oracle
- `<L2_HEAD>` the hash of the L2 block that `<L2_CLAIM>`is from
- `<L2_BLOCK_NUMBER>` the block number that `<L2_CLAIM>` is from

The generated proof will be stored in the `temp/cannon/proofs/` directory. The hash to use as the claim value is
the `post` field of the generated proof which provides the hash of the cannon state witness after execution of the step.

Since cannon can be very slow to execute, the above command uses the `--snapshot-at` option to generate a snapshot of
the cannon state every 1000000000 instructions. Once generated, these snapshots can be used as the `--input` to begin
execution at that step rather than from the very beginning. Generated snapshots are stored in
the `temp/cannon/snapshots` directory.

See `./cannon/bin/cannon --help` for further information on the options available.

### Trace Extension

Fault dispute games always use a trace with a fixed length of `2 ^ MAX_GAME_DEPTH`. The trace generated by `cannon`
stops when the client program exits, so this trace must be extended by repeating the hash of the final state in the
actual trace for all remaining steps. Cannon does not perform this trace extension automatically.

If cannon stops execution before the trace index you requested a proof at, it simply will not generate a proof. When it
stops executing, it will write its final state to `temp/cannon/stop-state.json` (controlled by the `--output` option).
The `step` field of this state contains the last step cannon executed. Once the final step is known, rerun cannon to
generate the proof at that final step and use the `post` hash as the claim value for all later trace indices.
24 changes: 24 additions & 0 deletions docs/fault-proof-alpha/deployments.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
## Fault Proof Alpha Deployment Information

### Goerli

Information on the fault proofs alpha deployment to Goerli is not yet available.

### Local Devnet

The local devnet includes a deployment of the fault proof alpha. To start the devnet, in the top level of this repo,
run:

```bash
make devnet-up
```

| Input | Value |
|----------------------|-------------------------------------------------------------|
| Dispute Game Factory | Run `jq -r .DisputeGameFactoryProxy .devnet/addresses.json` |
| Absolute Prestate | `op-program/bin/prestate.json` |
| Max Depth | 30 |
| Max Game Duration | 1200 (20 minutes) |

See the [op-challenger README](../../op-challenger#running-with-cannon-on-local-devnet) for information on
running `op-challenger` against the local devnet.
Loading