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
88a693c8
Unverified
Commit
88a693c8
authored
Jul 14, 2023
by
mergify[bot]
Committed by
GitHub
Jul 14, 2023
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into refcell/preimage-styling
parents
192357c0
16190071
Changes
17
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
201 additions
and
119 deletions
+201
-119
challenger.go
op-challenger/challenger.go
+1
-1
charlie.sh
op-challenger/charlie.sh
+1
-1
main_test.go
op-challenger/cmd/main_test.go
+31
-11
config.go
op-challenger/config/config.go
+17
-12
config_test.go
op-challenger/config/config_test.go
+5
-4
agent.go
op-challenger/fault/agent.go
+17
-15
full.go
op-challenger/fault/cmd/examples/full.go
+1
-1
solver.go
op-challenger/fault/cmd/examples/solver.go
+3
-3
game.go
op-challenger/fault/game.go
+26
-8
game_test.go
op-challenger/fault/game_test.go
+35
-11
orchestrator.go
op-challenger/fault/orchestrator.go
+2
-2
solver.go
op-challenger/fault/solver.go
+35
-47
solver_test.go
op-challenger/fault/solver_test.go
+20
-2
flags.go
op-challenger/flags/flags.go
+6
-0
init_game.sh
op-challenger/init_game.sh
+0
-0
mallory.sh
op-challenger/mallory.sh
+1
-1
visualize.sh
op-challenger/visualize.sh
+0
-0
No files found.
op-challenger/challenger.go
View file @
88a693c8
...
@@ -38,7 +38,7 @@ func Main(logger log.Logger, cfg *config.Config) error {
...
@@ -38,7 +38,7 @@ func Main(logger log.Logger, cfg *config.Config) error {
gameDepth
:=
4
gameDepth
:=
4
trace
:=
fault
.
NewAlphabetProvider
(
cfg
.
AlphabetTrace
,
uint64
(
gameDepth
))
trace
:=
fault
.
NewAlphabetProvider
(
cfg
.
AlphabetTrace
,
uint64
(
gameDepth
))
agent
:=
fault
.
NewAgent
(
loader
,
gameDepth
,
trace
,
responder
,
logger
)
agent
:=
fault
.
NewAgent
(
loader
,
gameDepth
,
trace
,
responder
,
cfg
.
AgreeWithProposedOutput
,
logger
)
logger
.
Info
(
"Fault game started"
)
logger
.
Info
(
"Fault game started"
)
...
...
op-challenger/charlie
→
op-challenger/charlie
.sh
View file @
88a693c8
...
@@ -14,4 +14,4 @@ MALLORY_KEY="28d7045146193f5f4eeb151c4843544b1b0d30a7ac1680c845a416fac65a7715"
...
@@ -14,4 +14,4 @@ MALLORY_KEY="28d7045146193f5f4eeb151c4843544b1b0d30a7ac1680c845a416fac65a7715"
FAULT_GAME_ADDRESS
=
"0x8daf17a20c9dba35f005b6324f493785d239719d"
FAULT_GAME_ADDRESS
=
"0x8daf17a20c9dba35f005b6324f493785d239719d"
./bin/op-challenger
--l1-eth-rpc
http://localhost:8545
--alphabet
"abcdefgh"
--game-address
$FAULT_GAME_ADDRESS
--private-key
$CHARLIE_KEY
--num-confirmations
1
./bin/op-challenger
--l1-eth-rpc
http://localhost:8545
--alphabet
"abcdefgh"
--game-address
$FAULT_GAME_ADDRESS
--private-key
$CHARLIE_KEY
--num-confirmations
1
--agree-with-proposed-output
=
true
op-challenger/cmd/main_test.go
View file @
88a693c8
package
main
package
main
import
(
import
(
"fmt"
"testing"
"testing"
"github.com/ethereum-optimism/optimism/op-challenger/config"
"github.com/ethereum-optimism/optimism/op-challenger/config"
...
@@ -11,9 +12,10 @@ import (
...
@@ -11,9 +12,10 @@ import (
)
)
var
(
var
(
l1EthRpc
=
"http://example.com:8545"
l1EthRpc
=
"http://example.com:8545"
gameAddressValue
=
"0xaa00000000000000000000000000000000000000"
gameAddressValue
=
"0xaa00000000000000000000000000000000000000"
alphabetTrace
=
"abcdefghijz"
alphabetTrace
=
"abcdefghijz"
agreeWithProposedOutput
=
"true"
)
)
func
TestLogLevel
(
t
*
testing
.
T
)
{
func
TestLogLevel
(
t
*
testing
.
T
)
{
...
@@ -33,12 +35,12 @@ func TestLogLevel(t *testing.T) {
...
@@ -33,12 +35,12 @@ func TestLogLevel(t *testing.T) {
func
TestDefaultCLIOptionsMatchDefaultConfig
(
t
*
testing
.
T
)
{
func
TestDefaultCLIOptionsMatchDefaultConfig
(
t
*
testing
.
T
)
{
cfg
:=
configForArgs
(
t
,
addRequiredArgs
())
cfg
:=
configForArgs
(
t
,
addRequiredArgs
())
defaultCfg
:=
config
.
NewConfig
(
l1EthRpc
,
common
.
HexToAddress
(
gameAddressValue
),
alphabetTrace
)
defaultCfg
:=
config
.
NewConfig
(
l1EthRpc
,
common
.
HexToAddress
(
gameAddressValue
),
alphabetTrace
,
true
)
require
.
Equal
(
t
,
defaultCfg
,
cfg
)
require
.
Equal
(
t
,
defaultCfg
,
cfg
)
}
}
func
TestDefaultConfigIsValid
(
t
*
testing
.
T
)
{
func
TestDefaultConfigIsValid
(
t
*
testing
.
T
)
{
cfg
:=
config
.
NewConfig
(
l1EthRpc
,
common
.
HexToAddress
(
gameAddressValue
),
alphabetTrace
)
cfg
:=
config
.
NewConfig
(
l1EthRpc
,
common
.
HexToAddress
(
gameAddressValue
),
alphabetTrace
,
true
)
require
.
NoError
(
t
,
cfg
.
Check
())
require
.
NoError
(
t
,
cfg
.
Check
())
}
}
...
@@ -89,6 +91,24 @@ func TestTxManagerFlagsSupported(t *testing.T) {
...
@@ -89,6 +91,24 @@ func TestTxManagerFlagsSupported(t *testing.T) {
require
.
Equal
(
t
,
uint64
(
7
),
cfg
.
TxMgrConfig
.
NumConfirmations
)
require
.
Equal
(
t
,
uint64
(
7
),
cfg
.
TxMgrConfig
.
NumConfirmations
)
}
}
func
TestAgreeWithProposedOutput
(
t
*
testing
.
T
)
{
t
.
Run
(
"MustBeProvided"
,
func
(
t
*
testing
.
T
)
{
verifyArgsInvalid
(
t
,
"flag agree-with-proposed-output is required"
,
addRequiredArgsExcept
(
"--agree-with-proposed-output"
))
})
t
.
Run
(
"Enabled"
,
func
(
t
*
testing
.
T
)
{
cfg
:=
configForArgs
(
t
,
addRequiredArgs
(
"--agree-with-proposed-output"
))
require
.
True
(
t
,
cfg
.
AgreeWithProposedOutput
)
})
t
.
Run
(
"EnabledWithArg"
,
func
(
t
*
testing
.
T
)
{
cfg
:=
configForArgs
(
t
,
addRequiredArgs
(
"--agree-with-proposed-output=true"
))
require
.
True
(
t
,
cfg
.
AgreeWithProposedOutput
)
})
t
.
Run
(
"Disabled"
,
func
(
t
*
testing
.
T
)
{
cfg
:=
configForArgs
(
t
,
addRequiredArgs
(
"--agree-with-proposed-output=false"
))
require
.
False
(
t
,
cfg
.
AgreeWithProposedOutput
)
})
}
func
verifyArgsInvalid
(
t
*
testing
.
T
,
messageContains
string
,
cliArgs
[]
string
)
{
func
verifyArgsInvalid
(
t
*
testing
.
T
,
messageContains
string
,
cliArgs
[]
string
)
{
_
,
_
,
err
:=
runWithArgs
(
cliArgs
)
_
,
_
,
err
:=
runWithArgs
(
cliArgs
)
require
.
ErrorContains
(
t
,
err
,
messageContains
)
require
.
ErrorContains
(
t
,
err
,
messageContains
)
...
@@ -103,7 +123,7 @@ func configForArgs(t *testing.T, cliArgs []string) config.Config {
...
@@ -103,7 +123,7 @@ func configForArgs(t *testing.T, cliArgs []string) config.Config {
func
runWithArgs
(
cliArgs
[]
string
)
(
log
.
Logger
,
config
.
Config
,
error
)
{
func
runWithArgs
(
cliArgs
[]
string
)
(
log
.
Logger
,
config
.
Config
,
error
)
{
cfg
:=
new
(
config
.
Config
)
cfg
:=
new
(
config
.
Config
)
var
logger
log
.
Logger
var
logger
log
.
Logger
fullArgs
:=
append
([]
string
{
"op-
program
"
},
cliArgs
...
)
fullArgs
:=
append
([]
string
{
"op-
challenger
"
},
cliArgs
...
)
err
:=
run
(
fullArgs
,
func
(
log
log
.
Logger
,
config
*
config
.
Config
)
error
{
err
:=
run
(
fullArgs
,
func
(
log
log
.
Logger
,
config
*
config
.
Config
)
error
{
logger
=
log
logger
=
log
cfg
=
config
cfg
=
config
...
@@ -126,17 +146,17 @@ func addRequiredArgsExcept(name string, optionalArgs ...string) []string {
...
@@ -126,17 +146,17 @@ func addRequiredArgsExcept(name string, optionalArgs ...string) []string {
func
requiredArgs
()
map
[
string
]
string
{
func
requiredArgs
()
map
[
string
]
string
{
return
map
[
string
]
string
{
return
map
[
string
]
string
{
"--l1-eth-rpc"
:
l1EthRpc
,
"--agree-with-proposed-output"
:
agreeWithProposedOutput
,
"--game-address"
:
gameAddressValue
,
"--l1-eth-rpc"
:
l1EthRpc
,
"--alphabet"
:
alphabetTrace
,
"--game-address"
:
gameAddressValue
,
"--alphabet"
:
alphabetTrace
,
}
}
}
}
func
toArgList
(
req
map
[
string
]
string
)
[]
string
{
func
toArgList
(
req
map
[
string
]
string
)
[]
string
{
var
combined
[]
string
var
combined
[]
string
for
name
,
value
:=
range
req
{
for
name
,
value
:=
range
req
{
combined
=
append
(
combined
,
name
)
combined
=
append
(
combined
,
fmt
.
Sprintf
(
"%s=%s"
,
name
,
value
))
combined
=
append
(
combined
,
value
)
}
}
return
combined
return
combined
}
}
op-challenger/config/config.go
View file @
88a693c8
...
@@ -21,22 +21,26 @@ var (
...
@@ -21,22 +21,26 @@ var (
// This also contains config options for auxiliary services.
// This also contains config options for auxiliary services.
// It is used to initialize the challenger.
// It is used to initialize the challenger.
type
Config
struct
{
type
Config
struct
{
L1EthRpc
string
// L1 RPC Url
L1EthRpc
string
// L1 RPC Url
GameAddress
common
.
Address
// Address of the fault game
GameAddress
common
.
Address
// Address of the fault game
AlphabetTrace
string
// String for the AlphabetTraceProvider
AlphabetTrace
string
// String for the AlphabetTraceProvider
AgreeWithProposedOutput
bool
// Temporary config if we agree or disagree with the posted output
TxMgrConfig
txmgr
.
CLIConfig
TxMgrConfig
txmgr
.
CLIConfig
}
}
func
NewConfig
(
l1EthRpc
string
,
func
NewConfig
(
l1EthRpc
string
,
GameAddress
common
.
Address
,
GameAddress
common
.
Address
,
AlphabetTrace
string
,
AlphabetTrace
string
,
AgreeWithProposedOutput
bool
,
)
Config
{
)
Config
{
return
Config
{
return
Config
{
L1EthRpc
:
l1EthRpc
,
L1EthRpc
:
l1EthRpc
,
GameAddress
:
GameAddress
,
GameAddress
:
GameAddress
,
AlphabetTrace
:
AlphabetTrace
,
AlphabetTrace
:
AlphabetTrace
,
TxMgrConfig
:
txmgr
.
NewCLIConfig
(
l1EthRpc
),
TxMgrConfig
:
txmgr
.
NewCLIConfig
(
l1EthRpc
),
AgreeWithProposedOutput
:
AgreeWithProposedOutput
,
}
}
}
}
...
@@ -70,9 +74,10 @@ func NewConfigFromCLI(ctx *cli.Context) (*Config, error) {
...
@@ -70,9 +74,10 @@ func NewConfigFromCLI(ctx *cli.Context) (*Config, error) {
return
&
Config
{
return
&
Config
{
// Required Flags
// Required Flags
L1EthRpc
:
ctx
.
String
(
flags
.
L1EthRpcFlag
.
Name
),
L1EthRpc
:
ctx
.
String
(
flags
.
L1EthRpcFlag
.
Name
),
GameAddress
:
dgfAddress
,
GameAddress
:
dgfAddress
,
AlphabetTrace
:
ctx
.
String
(
flags
.
AlphabetFlag
.
Name
),
AlphabetTrace
:
ctx
.
String
(
flags
.
AlphabetFlag
.
Name
),
TxMgrConfig
:
txMgrConfig
,
AgreeWithProposedOutput
:
ctx
.
Bool
(
flags
.
AgreeWithProposedOutputFlag
.
Name
),
TxMgrConfig
:
txMgrConfig
,
},
nil
},
nil
}
}
op-challenger/config/config_test.go
View file @
88a693c8
...
@@ -9,13 +9,14 @@ import (
...
@@ -9,13 +9,14 @@ import (
)
)
var
(
var
(
validL1EthRpc
=
"http://localhost:8545"
validL1EthRpc
=
"http://localhost:8545"
validGameAddress
=
common
.
HexToAddress
(
"0x7bdd3b028C4796eF0EAf07d11394d0d9d8c24139"
)
validGameAddress
=
common
.
HexToAddress
(
"0x7bdd3b028C4796eF0EAf07d11394d0d9d8c24139"
)
validAlphabetTrace
=
"abcdefgh"
validAlphabetTrace
=
"abcdefgh"
agreeWithProposedOutput
=
true
)
)
func
validConfig
()
Config
{
func
validConfig
()
Config
{
cfg
:=
NewConfig
(
validL1EthRpc
,
validGameAddress
,
validAlphabetTrace
)
cfg
:=
NewConfig
(
validL1EthRpc
,
validGameAddress
,
validAlphabetTrace
,
agreeWithProposedOutput
)
return
cfg
return
cfg
}
}
...
...
op-challenger/fault/agent.go
View file @
88a693c8
...
@@ -9,22 +9,24 @@ import (
...
@@ -9,22 +9,24 @@ import (
)
)
type
Agent
struct
{
type
Agent
struct
{
solver
*
Solver
solver
*
Solver
trace
TraceProvider
trace
TraceProvider
loader
Loader
loader
Loader
responder
Responder
responder
Responder
maxDepth
int
maxDepth
int
log
log
.
Logger
agreeWithProposedOutput
bool
log
log
.
Logger
}
}
func
NewAgent
(
loader
Loader
,
maxDepth
int
,
trace
TraceProvider
,
responder
Responder
,
log
log
.
Logger
)
Agent
{
func
NewAgent
(
loader
Loader
,
maxDepth
int
,
trace
TraceProvider
,
responder
Responder
,
agreeWithProposedOutput
bool
,
log
log
.
Logger
)
Agent
{
return
Agent
{
return
Agent
{
solver
:
NewSolver
(
maxDepth
,
trace
),
solver
:
NewSolver
(
maxDepth
,
trace
),
trace
:
trace
,
trace
:
trace
,
loader
:
loader
,
loader
:
loader
,
responder
:
responder
,
responder
:
responder
,
maxDepth
:
maxDepth
,
maxDepth
:
maxDepth
,
log
:
log
,
agreeWithProposedOutput
:
agreeWithProposedOutput
,
log
:
log
,
}
}
}
}
...
@@ -59,7 +61,7 @@ func (a *Agent) newGameFromContracts(ctx context.Context) (Game, error) {
...
@@ -59,7 +61,7 @@ func (a *Agent) newGameFromContracts(ctx context.Context) (Game, error) {
if
len
(
claims
)
==
0
{
if
len
(
claims
)
==
0
{
return
nil
,
errors
.
New
(
"no claims"
)
return
nil
,
errors
.
New
(
"no claims"
)
}
}
game
:=
NewGameState
(
claims
[
0
],
uint64
(
a
.
maxDepth
))
game
:=
NewGameState
(
a
.
agreeWithProposedOutput
,
claims
[
0
],
uint64
(
a
.
maxDepth
))
if
err
:=
game
.
PutAll
(
claims
[
1
:
]);
err
!=
nil
{
if
err
:=
game
.
PutAll
(
claims
[
1
:
]);
err
!=
nil
{
return
nil
,
fmt
.
Errorf
(
"failed to load claims into the local state: %w"
,
err
)
return
nil
,
fmt
.
Errorf
(
"failed to load claims into the local state: %w"
,
err
)
}
}
...
@@ -68,7 +70,7 @@ func (a *Agent) newGameFromContracts(ctx context.Context) (Game, error) {
...
@@ -68,7 +70,7 @@ func (a *Agent) newGameFromContracts(ctx context.Context) (Game, error) {
// move determines & executes the next move given a claim
// move determines & executes the next move given a claim
func
(
a
*
Agent
)
move
(
claim
Claim
,
game
Game
)
error
{
func
(
a
*
Agent
)
move
(
claim
Claim
,
game
Game
)
error
{
nextMove
,
err
:=
a
.
solver
.
NextMove
(
claim
)
nextMove
,
err
:=
a
.
solver
.
NextMove
(
claim
,
game
.
AgreeWithClaimLevel
(
claim
)
)
if
err
!=
nil
{
if
err
!=
nil
{
a
.
log
.
Warn
(
"Failed to execute the next move"
,
"err"
,
err
)
a
.
log
.
Warn
(
"Failed to execute the next move"
,
"err"
,
err
)
return
err
return
err
...
...
op-challenger/fault/cmd/examples/full.go
View file @
88a693c8
...
@@ -26,6 +26,6 @@ func FullGame() {
...
@@ -26,6 +26,6 @@ func FullGame() {
},
},
}
}
o
:=
fault
.
NewOrchestrator
(
maxDepth
,
[]
fault
.
TraceProvider
{
canonicalProvider
,
disputedProvider
},
[]
string
{
"charlie"
,
"mallory"
},
root
)
o
:=
fault
.
NewOrchestrator
(
maxDepth
,
[]
fault
.
TraceProvider
{
canonicalProvider
,
disputedProvider
},
[]
string
{
"charlie"
,
"mallory"
},
[]
bool
{
false
,
true
},
root
)
o
.
Start
()
o
.
Start
()
}
}
op-challenger/fault/cmd/examples/solver.go
View file @
88a693c8
...
@@ -53,19 +53,19 @@ func SolverExampleOne() {
...
@@ -53,19 +53,19 @@ func SolverExampleOne() {
fmt
.
Println
()
fmt
.
Println
()
PrettyPrintAlphabetClaim
(
"Root claim"
,
root
)
PrettyPrintAlphabetClaim
(
"Root claim"
,
root
)
claim1
,
err
:=
cannonicalSolver
.
NextMove
(
root
)
claim1
,
err
:=
cannonicalSolver
.
NextMove
(
root
,
false
)
if
err
!=
nil
{
if
err
!=
nil
{
fmt
.
Printf
(
"error getting claim from provider: %v"
,
err
)
fmt
.
Printf
(
"error getting claim from provider: %v"
,
err
)
}
}
PrettyPrintAlphabetClaim
(
"Cannonical move"
,
*
claim1
)
PrettyPrintAlphabetClaim
(
"Cannonical move"
,
*
claim1
)
claim2
,
err
:=
disputedSolver
.
NextMove
(
*
claim1
)
claim2
,
err
:=
disputedSolver
.
NextMove
(
*
claim1
,
false
)
if
err
!=
nil
{
if
err
!=
nil
{
fmt
.
Printf
(
"error getting claim from provider: %v"
,
err
)
fmt
.
Printf
(
"error getting claim from provider: %v"
,
err
)
}
}
PrettyPrintAlphabetClaim
(
"Disputed moved"
,
*
claim2
)
PrettyPrintAlphabetClaim
(
"Disputed moved"
,
*
claim2
)
claim3
,
err
:=
cannonicalSolver
.
NextMove
(
*
claim2
)
claim3
,
err
:=
cannonicalSolver
.
NextMove
(
*
claim2
,
false
)
if
err
!=
nil
{
if
err
!=
nil
{
fmt
.
Printf
(
"error getting claim from provider: %v"
,
err
)
fmt
.
Printf
(
"error getting claim from provider: %v"
,
err
)
}
}
...
...
op-challenger/fault/game.go
View file @
88a693c8
...
@@ -33,6 +33,9 @@ type Game interface {
...
@@ -33,6 +33,9 @@ type Game interface {
// PostStateClaim gets the claim which commits to the post-state of this specific claim.
// PostStateClaim gets the claim which commits to the post-state of this specific claim.
// This will return an error if it is called with a non-leaf claim.
// This will return an error if it is called with a non-leaf claim.
PostStateClaim
(
claim
Claim
)
(
Claim
,
error
)
PostStateClaim
(
claim
Claim
)
(
Claim
,
error
)
// AgreeWithLevel returns if the game state agrees with the provided claim level.
AgreeWithClaimLevel
(
claim
Claim
)
bool
}
}
type
extendedClaim
struct
{
type
extendedClaim
struct
{
...
@@ -43,23 +46,37 @@ type extendedClaim struct {
...
@@ -43,23 +46,37 @@ type extendedClaim struct {
// gameState is a struct that represents the state of a dispute game.
// gameState is a struct that represents the state of a dispute game.
// The game state implements the [Game] interface.
// The game state implements the [Game] interface.
type
gameState
struct
{
type
gameState
struct
{
root
ClaimData
agreeWithProposedOutput
bool
claims
map
[
ClaimData
]
*
extendedClaim
root
ClaimData
depth
uint64
claims
map
[
ClaimData
]
*
extendedClaim
depth
uint64
}
}
// NewGameState returns a new game state.
// NewGameState returns a new game state.
// The provided [Claim] is used as the root node.
// The provided [Claim] is used as the root node.
func
NewGameState
(
root
Claim
,
depth
uint64
)
*
gameState
{
func
NewGameState
(
agreeWithProposedOutput
bool
,
root
Claim
,
depth
uint64
)
*
gameState
{
claims
:=
make
(
map
[
ClaimData
]
*
extendedClaim
)
claims
:=
make
(
map
[
ClaimData
]
*
extendedClaim
)
claims
[
root
.
ClaimData
]
=
&
extendedClaim
{
claims
[
root
.
ClaimData
]
=
&
extendedClaim
{
self
:
root
,
self
:
root
,
children
:
make
([]
ClaimData
,
0
),
children
:
make
([]
ClaimData
,
0
),
}
}
return
&
gameState
{
return
&
gameState
{
root
:
root
.
ClaimData
,
agreeWithProposedOutput
:
agreeWithProposedOutput
,
claims
:
claims
,
root
:
root
.
ClaimData
,
depth
:
depth
,
claims
:
claims
,
depth
:
depth
,
}
}
// AgreeWithLevel returns if the game state agrees with the provided claim level.
func
(
g
*
gameState
)
AgreeWithClaimLevel
(
claim
Claim
)
bool
{
isOddLevel
:=
claim
.
Depth
()
%
2
==
1
// If we agree with the proposed output, we agree with odd levels
// If we disagree with the proposed output, we agree with the root claim level & even levels
if
g
.
agreeWithProposedOutput
{
return
isOddLevel
}
else
{
return
!
isOddLevel
}
}
}
}
...
@@ -79,7 +96,8 @@ func (g *gameState) Put(claim Claim) error {
...
@@ -79,7 +96,8 @@ func (g *gameState) Put(claim Claim) error {
if
claim
.
IsRoot
()
||
g
.
IsDuplicate
(
claim
)
{
if
claim
.
IsRoot
()
||
g
.
IsDuplicate
(
claim
)
{
return
ErrClaimExists
return
ErrClaimExists
}
}
if
parent
,
ok
:=
g
.
claims
[
claim
.
Parent
];
!
ok
{
parent
,
ok
:=
g
.
claims
[
claim
.
Parent
]
if
!
ok
{
return
errors
.
New
(
"no parent claim"
)
return
errors
.
New
(
"no parent claim"
)
}
else
{
}
else
{
parent
.
children
=
append
(
parent
.
children
,
claim
.
ClaimData
)
parent
.
children
=
append
(
parent
.
children
,
claim
.
ClaimData
)
...
...
op-challenger/fault/game_test.go
View file @
88a693c8
...
@@ -48,7 +48,7 @@ func createTestClaims() (Claim, Claim, Claim, Claim) {
...
@@ -48,7 +48,7 @@ func createTestClaims() (Claim, Claim, Claim, Claim) {
func
TestIsDuplicate
(
t
*
testing
.
T
)
{
func
TestIsDuplicate
(
t
*
testing
.
T
)
{
// Setup the game state.
// Setup the game state.
root
,
top
,
middle
,
bottom
:=
createTestClaims
()
root
,
top
,
middle
,
bottom
:=
createTestClaims
()
g
:=
NewGameState
(
root
,
testMaxDepth
)
g
:=
NewGameState
(
false
,
root
,
testMaxDepth
)
require
.
NoError
(
t
,
g
.
Put
(
top
))
require
.
NoError
(
t
,
g
.
Put
(
top
))
// Root + Top should be duplicates
// Root + Top should be duplicates
...
@@ -65,7 +65,7 @@ func TestIsDuplicate(t *testing.T) {
...
@@ -65,7 +65,7 @@ func TestIsDuplicate(t *testing.T) {
func
TestGame_Put_RootAlreadyExists
(
t
*
testing
.
T
)
{
func
TestGame_Put_RootAlreadyExists
(
t
*
testing
.
T
)
{
// Setup the game state.
// Setup the game state.
top
,
_
,
_
,
_
:=
createTestClaims
()
top
,
_
,
_
,
_
:=
createTestClaims
()
g
:=
NewGameState
(
top
,
testMaxDepth
)
g
:=
NewGameState
(
false
,
top
,
testMaxDepth
)
// Try to put the root claim into the game state again.
// Try to put the root claim into the game state again.
err
:=
g
.
Put
(
top
)
err
:=
g
.
Put
(
top
)
...
@@ -77,7 +77,7 @@ func TestGame_Put_RootAlreadyExists(t *testing.T) {
...
@@ -77,7 +77,7 @@ func TestGame_Put_RootAlreadyExists(t *testing.T) {
func
TestGame_PutAll_RootAlreadyExists
(
t
*
testing
.
T
)
{
func
TestGame_PutAll_RootAlreadyExists
(
t
*
testing
.
T
)
{
// Setup the game state.
// Setup the game state.
root
,
_
,
_
,
_
:=
createTestClaims
()
root
,
_
,
_
,
_
:=
createTestClaims
()
g
:=
NewGameState
(
root
,
testMaxDepth
)
g
:=
NewGameState
(
false
,
root
,
testMaxDepth
)
// Try to put the root claim into the game state again.
// Try to put the root claim into the game state again.
err
:=
g
.
PutAll
([]
Claim
{
root
})
err
:=
g
.
PutAll
([]
Claim
{
root
})
...
@@ -88,7 +88,7 @@ func TestGame_PutAll_RootAlreadyExists(t *testing.T) {
...
@@ -88,7 +88,7 @@ func TestGame_PutAll_RootAlreadyExists(t *testing.T) {
// instance errors when the given claim already exists in state.
// instance errors when the given claim already exists in state.
func
TestGame_PutAll_AlreadyExists
(
t
*
testing
.
T
)
{
func
TestGame_PutAll_AlreadyExists
(
t
*
testing
.
T
)
{
root
,
top
,
middle
,
bottom
:=
createTestClaims
()
root
,
top
,
middle
,
bottom
:=
createTestClaims
()
g
:=
NewGameState
(
root
,
testMaxDepth
)
g
:=
NewGameState
(
false
,
root
,
testMaxDepth
)
err
:=
g
.
PutAll
([]
Claim
{
top
,
middle
})
err
:=
g
.
PutAll
([]
Claim
{
top
,
middle
})
require
.
NoError
(
t
,
err
)
require
.
NoError
(
t
,
err
)
...
@@ -101,7 +101,7 @@ func TestGame_PutAll_AlreadyExists(t *testing.T) {
...
@@ -101,7 +101,7 @@ func TestGame_PutAll_AlreadyExists(t *testing.T) {
func
TestGame_PutAll_ParentsAndChildren
(
t
*
testing
.
T
)
{
func
TestGame_PutAll_ParentsAndChildren
(
t
*
testing
.
T
)
{
// Setup the game state.
// Setup the game state.
root
,
top
,
middle
,
bottom
:=
createTestClaims
()
root
,
top
,
middle
,
bottom
:=
createTestClaims
()
g
:=
NewGameState
(
root
,
testMaxDepth
)
g
:=
NewGameState
(
false
,
root
,
testMaxDepth
)
// We should not be able to get the parent of the root claim.
// We should not be able to get the parent of the root claim.
parent
,
err
:=
g
.
getParent
(
root
)
parent
,
err
:=
g
.
getParent
(
root
)
...
@@ -127,7 +127,7 @@ func TestGame_PutAll_ParentsAndChildren(t *testing.T) {
...
@@ -127,7 +127,7 @@ func TestGame_PutAll_ParentsAndChildren(t *testing.T) {
func
TestGame_Put_AlreadyExists
(
t
*
testing
.
T
)
{
func
TestGame_Put_AlreadyExists
(
t
*
testing
.
T
)
{
// Setup the game state.
// Setup the game state.
top
,
middle
,
_
,
_
:=
createTestClaims
()
top
,
middle
,
_
,
_
:=
createTestClaims
()
g
:=
NewGameState
(
top
,
testMaxDepth
)
g
:=
NewGameState
(
false
,
top
,
testMaxDepth
)
// Put the next claim into state.
// Put the next claim into state.
err
:=
g
.
Put
(
middle
)
err
:=
g
.
Put
(
middle
)
...
@@ -142,7 +142,7 @@ func TestGame_Put_AlreadyExists(t *testing.T) {
...
@@ -142,7 +142,7 @@ func TestGame_Put_AlreadyExists(t *testing.T) {
func
TestGame_Put_ParentsAndChildren
(
t
*
testing
.
T
)
{
func
TestGame_Put_ParentsAndChildren
(
t
*
testing
.
T
)
{
// Setup the game state.
// Setup the game state.
root
,
top
,
middle
,
bottom
:=
createTestClaims
()
root
,
top
,
middle
,
bottom
:=
createTestClaims
()
g
:=
NewGameState
(
root
,
testMaxDepth
)
g
:=
NewGameState
(
false
,
root
,
testMaxDepth
)
// We should not be able to get the parent of the root claim.
// We should not be able to get the parent of the root claim.
parent
,
err
:=
g
.
getParent
(
root
)
parent
,
err
:=
g
.
getParent
(
root
)
...
@@ -175,7 +175,7 @@ func TestGame_Put_ParentsAndChildren(t *testing.T) {
...
@@ -175,7 +175,7 @@ func TestGame_Put_ParentsAndChildren(t *testing.T) {
func
TestGame_ClaimPairs
(
t
*
testing
.
T
)
{
func
TestGame_ClaimPairs
(
t
*
testing
.
T
)
{
// Setup the game state.
// Setup the game state.
root
,
top
,
middle
,
bottom
:=
createTestClaims
()
root
,
top
,
middle
,
bottom
:=
createTestClaims
()
g
:=
NewGameState
(
root
,
testMaxDepth
)
g
:=
NewGameState
(
false
,
root
,
testMaxDepth
)
// Add top claim to the game state.
// Add top claim to the game state.
err
:=
g
.
Put
(
top
)
err
:=
g
.
Put
(
top
)
...
@@ -199,7 +199,7 @@ func TestGame_ClaimPairs(t *testing.T) {
...
@@ -199,7 +199,7 @@ func TestGame_ClaimPairs(t *testing.T) {
// those functions return an error.
// those functions return an error.
func
TestPrePostStateOnlyOnLeafClaim
(
t
*
testing
.
T
)
{
func
TestPrePostStateOnlyOnLeafClaim
(
t
*
testing
.
T
)
{
root
,
top
,
middle
,
bottom
:=
createTestClaims
()
root
,
top
,
middle
,
bottom
:=
createTestClaims
()
g
:=
NewGameState
(
root
,
testMaxDepth
)
g
:=
NewGameState
(
false
,
root
,
testMaxDepth
)
require
.
NoError
(
t
,
g
.
PutAll
([]
Claim
{
top
,
middle
,
bottom
}))
require
.
NoError
(
t
,
g
.
PutAll
([]
Claim
{
top
,
middle
,
bottom
}))
_
,
err
:=
g
.
PreStateClaim
(
middle
)
_
,
err
:=
g
.
PreStateClaim
(
middle
)
...
@@ -210,7 +210,7 @@ func TestPrePostStateOnlyOnLeafClaim(t *testing.T) {
...
@@ -210,7 +210,7 @@ func TestPrePostStateOnlyOnLeafClaim(t *testing.T) {
func
TestPreStateClaim
(
t
*
testing
.
T
)
{
func
TestPreStateClaim
(
t
*
testing
.
T
)
{
root
,
top
,
middle
,
bottom
:=
createTestClaims
()
root
,
top
,
middle
,
bottom
:=
createTestClaims
()
g
:=
NewGameState
(
root
,
testMaxDepth
)
g
:=
NewGameState
(
false
,
root
,
testMaxDepth
)
require
.
NoError
(
t
,
g
.
Put
(
top
))
require
.
NoError
(
t
,
g
.
Put
(
top
))
require
.
NoError
(
t
,
g
.
Put
(
middle
))
require
.
NoError
(
t
,
g
.
Put
(
middle
))
require
.
NoError
(
t
,
g
.
Put
(
bottom
))
require
.
NoError
(
t
,
g
.
Put
(
bottom
))
...
@@ -224,7 +224,7 @@ func TestPreStateClaim(t *testing.T) {
...
@@ -224,7 +224,7 @@ func TestPreStateClaim(t *testing.T) {
func
TestPostStateClaim
(
t
*
testing
.
T
)
{
func
TestPostStateClaim
(
t
*
testing
.
T
)
{
root
,
top
,
middle
,
bottom
:=
createTestClaims
()
root
,
top
,
middle
,
bottom
:=
createTestClaims
()
g
:=
NewGameState
(
root
,
testMaxDepth
)
g
:=
NewGameState
(
false
,
root
,
testMaxDepth
)
require
.
NoError
(
t
,
g
.
Put
(
top
))
require
.
NoError
(
t
,
g
.
Put
(
top
))
require
.
NoError
(
t
,
g
.
Put
(
middle
))
require
.
NoError
(
t
,
g
.
Put
(
middle
))
require
.
NoError
(
t
,
g
.
Put
(
bottom
))
require
.
NoError
(
t
,
g
.
Put
(
bottom
))
...
@@ -234,3 +234,27 @@ func TestPostStateClaim(t *testing.T) {
...
@@ -234,3 +234,27 @@ func TestPostStateClaim(t *testing.T) {
require
.
NoError
(
t
,
err
)
require
.
NoError
(
t
,
err
)
require
.
Equal
(
t
,
middle
,
post
)
require
.
Equal
(
t
,
middle
,
post
)
}
}
func
TestAgreeWithClaimLevelDisagreeWithOutput
(
t
*
testing
.
T
)
{
// Setup the game state.
root
,
top
,
middle
,
bottom
:=
createTestClaims
()
g
:=
NewGameState
(
false
,
root
,
testMaxDepth
)
require
.
NoError
(
t
,
g
.
PutAll
([]
Claim
{
top
,
middle
,
bottom
}))
require
.
True
(
t
,
g
.
AgreeWithClaimLevel
(
root
))
require
.
False
(
t
,
g
.
AgreeWithClaimLevel
(
top
))
require
.
True
(
t
,
g
.
AgreeWithClaimLevel
(
middle
))
require
.
False
(
t
,
g
.
AgreeWithClaimLevel
(
bottom
))
}
func
TestAgreeWithClaimLevelAgreeWithOutput
(
t
*
testing
.
T
)
{
// Setup the game state.
root
,
top
,
middle
,
bottom
:=
createTestClaims
()
g
:=
NewGameState
(
true
,
root
,
testMaxDepth
)
require
.
NoError
(
t
,
g
.
PutAll
([]
Claim
{
top
,
middle
,
bottom
}))
require
.
False
(
t
,
g
.
AgreeWithClaimLevel
(
root
))
require
.
True
(
t
,
g
.
AgreeWithClaimLevel
(
top
))
require
.
False
(
t
,
g
.
AgreeWithClaimLevel
(
middle
))
require
.
True
(
t
,
g
.
AgreeWithClaimLevel
(
bottom
))
}
op-challenger/fault/orchestrator.go
View file @
88a693c8
...
@@ -15,7 +15,7 @@ type Orchestrator struct {
...
@@ -15,7 +15,7 @@ type Orchestrator struct {
claimLen
,
stepLen
,
step
int
claimLen
,
stepLen
,
step
int
}
}
func
NewOrchestrator
(
maxDepth
uint64
,
traces
[]
TraceProvider
,
names
[]
string
,
root
Claim
)
Orchestrator
{
func
NewOrchestrator
(
maxDepth
uint64
,
traces
[]
TraceProvider
,
names
[]
string
,
agreeWithProposedOutput
[]
bool
,
root
Claim
)
Orchestrator
{
o
:=
Orchestrator
{
o
:=
Orchestrator
{
agents
:
make
([]
Agent
,
len
(
traces
)),
agents
:
make
([]
Agent
,
len
(
traces
)),
claims
:
[]
Claim
{
root
},
claims
:
[]
Claim
{
root
},
...
@@ -23,7 +23,7 @@ func NewOrchestrator(maxDepth uint64, traces []TraceProvider, names []string, ro
...
@@ -23,7 +23,7 @@ func NewOrchestrator(maxDepth uint64, traces []TraceProvider, names []string, ro
}
}
log
.
Info
(
"Starting game"
,
"root_letter"
,
string
(
root
.
Value
[
31
:
]))
log
.
Info
(
"Starting game"
,
"root_letter"
,
string
(
root
.
Value
[
31
:
]))
for
i
,
trace
:=
range
traces
{
for
i
,
trace
:=
range
traces
{
o
.
agents
[
i
]
=
NewAgent
(
&
o
,
int
(
maxDepth
),
trace
,
&
o
,
log
.
New
(
"role"
,
names
[
i
]))
o
.
agents
[
i
]
=
NewAgent
(
&
o
,
int
(
maxDepth
),
trace
,
&
o
,
agreeWithProposedOutput
[
i
],
log
.
New
(
"role"
,
names
[
i
]))
}
}
return
o
return
o
}
}
...
...
op-challenger/fault/solver.go
View file @
88a693c8
...
@@ -21,7 +21,11 @@ func NewSolver(gameDepth int, traceProvider TraceProvider) *Solver {
...
@@ -21,7 +21,11 @@ func NewSolver(gameDepth int, traceProvider TraceProvider) *Solver {
}
}
// NextMove returns the next move to make given the current state of the game.
// NextMove returns the next move to make given the current state of the game.
func
(
s
*
Solver
)
NextMove
(
claim
Claim
)
(
*
Claim
,
error
)
{
func
(
s
*
Solver
)
NextMove
(
claim
Claim
,
agreeWithClaimLevel
bool
)
(
*
Claim
,
error
)
{
if
agreeWithClaimLevel
{
return
nil
,
nil
}
// Special case of the root claim
// Special case of the root claim
if
claim
.
IsRoot
()
{
if
claim
.
IsRoot
()
{
return
s
.
handleRoot
(
claim
)
return
s
.
handleRoot
(
claim
)
...
@@ -29,6 +33,36 @@ func (s *Solver) NextMove(claim Claim) (*Claim, error) {
...
@@ -29,6 +33,36 @@ func (s *Solver) NextMove(claim Claim) (*Claim, error) {
return
s
.
handleMiddle
(
claim
)
return
s
.
handleMiddle
(
claim
)
}
}
func
(
s
*
Solver
)
handleRoot
(
claim
Claim
)
(
*
Claim
,
error
)
{
agree
,
err
:=
s
.
agreeWithClaim
(
claim
.
ClaimData
)
if
err
!=
nil
{
return
nil
,
err
}
// Attack the root claim if we do not agree with it
// Note: We always disagree with the claim level at this point,
// so if we agree with claim maybe we should also attack?
if
!
agree
{
return
s
.
attack
(
claim
)
}
else
{
return
nil
,
nil
}
}
func
(
s
*
Solver
)
handleMiddle
(
claim
Claim
)
(
*
Claim
,
error
)
{
claimCorrect
,
err
:=
s
.
agreeWithClaim
(
claim
.
ClaimData
)
if
err
!=
nil
{
return
nil
,
err
}
if
claim
.
Depth
()
==
s
.
gameDepth
{
return
nil
,
errors
.
New
(
"game depth reached"
)
}
if
claimCorrect
{
return
s
.
defend
(
claim
)
}
else
{
return
s
.
attack
(
claim
)
}
}
type
StepData
struct
{
type
StepData
struct
{
LeafClaim
Claim
LeafClaim
Claim
IsAttack
bool
IsAttack
bool
...
@@ -57,52 +91,6 @@ func (s *Solver) AttemptStep(claim Claim) (StepData, error) {
...
@@ -57,52 +91,6 @@ func (s *Solver) AttemptStep(claim Claim) (StepData, error) {
},
nil
},
nil
}
}
func
(
s
*
Solver
)
handleRoot
(
claim
Claim
)
(
*
Claim
,
error
)
{
agree
,
err
:=
s
.
agreeWithClaim
(
claim
.
ClaimData
)
if
err
!=
nil
{
return
nil
,
err
}
// Attack the root claim if we do not agree with it
if
!
agree
{
return
s
.
attack
(
claim
)
}
else
{
return
nil
,
nil
}
}
func
(
s
*
Solver
)
handleMiddle
(
claim
Claim
)
(
*
Claim
,
error
)
{
parentCorrect
,
err
:=
s
.
agreeWithClaim
(
claim
.
Parent
)
if
err
!=
nil
{
return
nil
,
err
}
claimCorrect
,
err
:=
s
.
agreeWithClaim
(
claim
.
ClaimData
)
if
err
!=
nil
{
return
nil
,
err
}
if
claim
.
Depth
()
==
s
.
gameDepth
{
return
nil
,
errors
.
New
(
"game depth reached"
)
}
if
parentCorrect
&&
claimCorrect
{
// We agree with the parent, but the claim is disagreeing with it.
// Since we agree with the claim, the difference must be to the right of the claim
return
s
.
defend
(
claim
)
}
else
if
parentCorrect
&&
!
claimCorrect
{
// We agree with the parent, but the claim disagrees with it.
// Since we disagree with the claim, the difference must be to the left of the claim
return
s
.
attack
(
claim
)
}
else
if
!
parentCorrect
&&
claimCorrect
{
// Do nothing, we disagree with the parent, but this claim has correctly countered it
return
nil
,
nil
}
else
if
!
parentCorrect
&&
!
claimCorrect
{
// We disagree with the parent so want to counter it (which the claim is doing)
// but we also disagree with the claim so there must be a difference to the left of claim
// Note that we will create the correct counter-claim for parent when it is evaluated, no need to do it here
return
s
.
attack
(
claim
)
}
// This should not be reached
return
nil
,
errors
.
New
(
"no next move"
)
}
// attack returns a response that attacks the claim.
// attack returns a response that attacks the claim.
func
(
s
*
Solver
)
attack
(
claim
Claim
)
(
*
Claim
,
error
)
{
func
(
s
*
Solver
)
attack
(
claim
Claim
)
(
*
Claim
,
error
)
{
position
:=
claim
.
Attack
()
position
:=
claim
.
Attack
()
...
...
op-challenger/fault/solver_test.go
View file @
88a693c8
...
@@ -74,18 +74,36 @@ func TestSolver_NextMove_Opponent(t *testing.T) {
...
@@ -74,18 +74,36 @@ func TestSolver_NextMove_Opponent(t *testing.T) {
}
}
for
_
,
test
:=
range
indices
{
for
_
,
test
:=
range
indices
{
res
,
err
:=
solver
.
NextMove
(
test
.
claim
)
res
,
err
:=
solver
.
NextMove
(
test
.
claim
,
false
)
require
.
NoError
(
t
,
err
)
require
.
NoError
(
t
,
err
)
require
.
Equal
(
t
,
test
.
response
,
res
.
ClaimData
)
require
.
Equal
(
t
,
test
.
response
,
res
.
ClaimData
)
}
}
}
}
func
TestNoMoveAgainstOwnLevel
(
t
*
testing
.
T
)
{
maxDepth
:=
3
mallory
:=
NewAlphabetProvider
(
"abcdepqr"
,
uint64
(
maxDepth
))
solver
:=
NewSolver
(
maxDepth
,
mallory
)
claim
:=
Claim
{
ClaimData
:
ClaimData
{
Value
:
alphabetClaim
(
7
,
"z"
),
Position
:
NewPosition
(
0
,
0
),
},
// Root claim has no parent
}
move
,
err
:=
solver
.
NextMove
(
claim
,
true
)
require
.
Nil
(
t
,
move
)
require
.
Nil
(
t
,
err
)
}
func
TestAttemptStep
(
t
*
testing
.
T
)
{
func
TestAttemptStep
(
t
*
testing
.
T
)
{
maxDepth
:=
3
maxDepth
:=
3
canonicalProvider
:=
NewAlphabetProvider
(
"abcdefgh"
,
uint64
(
maxDepth
))
canonicalProvider
:=
NewAlphabetProvider
(
"abcdefgh"
,
uint64
(
maxDepth
))
solver
:=
NewSolver
(
maxDepth
,
canonicalProvider
)
solver
:=
NewSolver
(
maxDepth
,
canonicalProvider
)
root
,
top
,
middle
,
bottom
:=
createTestClaims
()
root
,
top
,
middle
,
bottom
:=
createTestClaims
()
g
:=
NewGameState
(
root
,
testMaxDepth
)
g
:=
NewGameState
(
false
,
root
,
testMaxDepth
)
require
.
NoError
(
t
,
g
.
Put
(
top
))
require
.
NoError
(
t
,
g
.
Put
(
top
))
require
.
NoError
(
t
,
g
.
Put
(
middle
))
require
.
NoError
(
t
,
g
.
Put
(
middle
))
require
.
NoError
(
t
,
g
.
Put
(
bottom
))
require
.
NoError
(
t
,
g
.
Put
(
bottom
))
...
...
op-challenger/flags/flags.go
View file @
88a693c8
...
@@ -33,6 +33,11 @@ var (
...
@@ -33,6 +33,11 @@ var (
Usage
:
"Alphabet Trace (temporary)"
,
Usage
:
"Alphabet Trace (temporary)"
,
EnvVars
:
prefixEnvVars
(
"ALPHABET"
),
EnvVars
:
prefixEnvVars
(
"ALPHABET"
),
}
}
AgreeWithProposedOutputFlag
=
&
cli
.
BoolFlag
{
Name
:
"agree-with-proposed-output"
,
Usage
:
"Temporary hardcoded flag if we agree or disagree with the proposed output."
,
EnvVars
:
prefixEnvVars
(
"AGREE_WITH_PROPOSED_OUTPUT"
),
}
// Optional Flags
// Optional Flags
)
)
...
@@ -41,6 +46,7 @@ var requiredFlags = []cli.Flag{
...
@@ -41,6 +46,7 @@ var requiredFlags = []cli.Flag{
L1EthRpcFlag
,
L1EthRpcFlag
,
DGFAddressFlag
,
DGFAddressFlag
,
AlphabetFlag
,
AlphabetFlag
,
AgreeWithProposedOutputFlag
,
}
}
// optionalFlags is a list of unchecked cli flags
// optionalFlags is a list of unchecked cli flags
...
...
op-challenger/init_game
→
op-challenger/init_game
.sh
View file @
88a693c8
File moved
op-challenger/mallory
→
op-challenger/mallory
.sh
View file @
88a693c8
...
@@ -15,4 +15,4 @@ MALLORY_KEY="28d7045146193f5f4eeb151c4843544b1b0d30a7ac1680c845a416fac65a7715"
...
@@ -15,4 +15,4 @@ MALLORY_KEY="28d7045146193f5f4eeb151c4843544b1b0d30a7ac1680c845a416fac65a7715"
FAULT_GAME_ADDRESS
=
"0x8daf17a20c9dba35f005b6324f493785d239719d"
FAULT_GAME_ADDRESS
=
"0x8daf17a20c9dba35f005b6324f493785d239719d"
./bin/op-challenger
--l1-eth-rpc
http://localhost:8545
--alphabet
"abcdexyz"
--game-address
$FAULT_GAME_ADDRESS
--private-key
$MALLORY_KEY
--num-confirmations
1
./bin/op-challenger
--l1-eth-rpc
http://localhost:8545
--alphabet
"abcdexyz"
--game-address
$FAULT_GAME_ADDRESS
--private-key
$MALLORY_KEY
--num-confirmations
1
--agree-with-proposed-output
=
false
op-challenger/visualize
→
op-challenger/visualize
.sh
View file @
88a693c8
File moved
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