Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
d9c62cd1
Unverified
Commit
d9c62cd1
authored
Sep 01, 2023
by
Adrian Sutton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
op-challenger: Add instructions for running against the devnet.
parent
ef48f2ff
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
6 deletions
+45
-6
README.md
op-challenger/README.md
+45
-6
No files found.
op-challenger/README.md
View file @
d9c62cd1
...
@@ -7,13 +7,18 @@ games, and validity games. To learn more about dispute games, visit the
...
@@ -7,13 +7,18 @@ games, and validity games. To learn more about dispute games, visit the
## Quickstart
## Quickstart
First, clone this repo. Then, run
`make`
, which will build all required targets.
First, clone this repo. Then run:
Alternatively, run
`make devnet`
to bring up the
[
devnet
](
../ops-bedrock/devnet-up.sh
)
which deploys the
[
mock dispute game contracts
](
./contracts
)
as well as an
`op-challenger`
instance.
Alternatively, you can build the
`op-challenger`
binary locally using the pre-configured
```
shell
[
Makefile
](
./Makefile
)
target by running
`make build`
, and then running
`./op-challenger --help`
cd
op-challenger
make alphabet
```
This creates a local devnet, starts a dispute game using the simple alphabet trace type and runs two op-challenger
instances with differing views of the correct alphabet to play the game.
Alternatively, you can build the
`op-challenger`
binary directly using the pre-configured
[
Makefile
](
./Makefile
)
target by running
`make build`
, and then running
`./bin/op-challenger --help`
to see a list of available options.
to see a list of available options.
## Usage
## Usage
...
@@ -21,6 +26,40 @@ to see a list of available options.
...
@@ -21,6 +26,40 @@ to see a list of available options.
`op-challenger`
is configurable via command line flags and environment variables. The help menu
`op-challenger`
is configurable via command line flags and environment variables. The help menu
shows the available config options and can be accessed by running
`./op-challenger --help`
.
shows the available config options and can be accessed by running
`./op-challenger --help`
.
### Running with Cannon on Local Devnet
To run
`op-challenger`
against the local devnet, first ensure the required components are built and the devnet is running.
From the top level of the repository run:
```
shell
make devnet-clean
make cannon-prestate op-challenger
make devnet-up
```
Then start
`op-challenger`
with:
```
shell
DISPUTE_GAME_FACTORY
=
$(
jq
-r
.DisputeGameFactoryProxy .devnet/addresses.json
)
./op-challenger/bin/op-challenger
\
--trace-type
cannon
\
--l1-eth-rpc
http://localhost:8545
\
--game-factory-address
$DISPUTE_GAME_FACTORY
\
--agree-with-proposed-output
=
true
\
--datadir
temp/challenger-data
\
--cannon-rollup-config
.devnet/rollup.json
\
--cannon-l2-genesis
.devnet/genesis-l2.json
\
--cannon-bin
./cannon/bin/cannon
\
--cannon-server
./op-program/bin/op-program
\
--cannon-prestate
./op-program/bin/prestate.json
\
--cannon-l2
http://localhost:9545
\
--mnemonic
"test test test test test test test test test test test junk"
\
--hd-path
"m/44'/60'/0'/0/8"
\
--num-confirmations
1
```
The mnemonic and hd-path above is a prefunded address on the devnet. The challenger respond to any created games by
posting the correct trace as the counter-claim. The scripts below can then be used to create and interact with games.
## Scripts
## Scripts
The
[
scripts
](
scripts
)
directory contains a collection of scripts to assist with manually creating and playing games.
The
[
scripts
](
scripts
)
directory contains a collection of scripts to assist with manually creating and playing games.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment