Commit e7a25442 authored by OptimismBot's avatar OptimismBot Committed by GitHub

Merge pull request #6406 from ethereum-optimism/refcell/challenger-cannon-tp-cli

feat(op-challenger): Trace Type Flags for Cannon TraceProvider
parents e02cd73e 734b76ec
...@@ -16,6 +16,7 @@ FAULT_GAME_ADDRESS="0x8daf17a20c9dba35f005b6324f493785d239719d" ...@@ -16,6 +16,7 @@ FAULT_GAME_ADDRESS="0x8daf17a20c9dba35f005b6324f493785d239719d"
./bin/op-challenger \ ./bin/op-challenger \
--l1-eth-rpc http://localhost:8545 \ --l1-eth-rpc http://localhost:8545 \
--trace-type="alphabet" \
--alphabet "abcdefgh" \ --alphabet "abcdefgh" \
--game-address $FAULT_GAME_ADDRESS \ --game-address $FAULT_GAME_ADDRESS \
--private-key $CHARLIE_KEY \ --private-key $CHARLIE_KEY \
......
...@@ -6,6 +6,7 @@ import ( ...@@ -6,6 +6,7 @@ import (
"testing" "testing"
"github.com/ethereum-optimism/optimism/op-challenger/config" "github.com/ethereum-optimism/optimism/op-challenger/config"
"github.com/ethereum-optimism/optimism/op-challenger/flags"
"github.com/ethereum-optimism/optimism/op-service/txmgr" "github.com/ethereum-optimism/optimism/op-service/txmgr"
"github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/log"
...@@ -15,6 +16,7 @@ import ( ...@@ -15,6 +16,7 @@ import (
var ( var (
l1EthRpc = "http://example.com:8545" l1EthRpc = "http://example.com:8545"
gameAddressValue = "0xaa00000000000000000000000000000000000000" gameAddressValue = "0xaa00000000000000000000000000000000000000"
cannonDatadir = "./test_data"
alphabetTrace = "abcdefghijz" alphabetTrace = "abcdefghijz"
agreeWithProposedOutput = "true" agreeWithProposedOutput = "true"
gameDepth = "4" gameDepth = "4"
...@@ -37,12 +39,12 @@ func TestLogLevel(t *testing.T) { ...@@ -37,12 +39,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, true, 4) defaultCfg := config.NewConfig(l1EthRpc, common.HexToAddress(gameAddressValue), flags.TraceTypeAlphabet, alphabetTrace, cannonDatadir, true, 4)
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, true, 4) cfg := config.NewConfig(l1EthRpc, common.HexToAddress(gameAddressValue), flags.TraceTypeAlphabet, alphabetTrace, cannonDatadir, true, 4)
require.NoError(t, cfg.Check()) require.NoError(t, cfg.Check())
} }
...@@ -59,15 +61,21 @@ func TestL1ETHRPCAddress(t *testing.T) { ...@@ -59,15 +61,21 @@ func TestL1ETHRPCAddress(t *testing.T) {
}) })
} }
func TestAlphabetTrace(t *testing.T) { func TestTraceType(t *testing.T) {
t.Run("Required", func(t *testing.T) { t.Run("Required", func(t *testing.T) {
verifyArgsInvalid(t, "flag alphabet is required", addRequiredArgsExcept("--alphabet")) verifyArgsInvalid(t, "flag trace-type is required", addRequiredArgsExcept("--trace-type"))
}) })
t.Run("Valid", func(t *testing.T) { for _, traceType := range flags.TraceTypes {
value := "abcde" traceType := traceType
cfg := configForArgs(t, addRequiredArgsExcept("--alphabet", "--alphabet="+value)) t.Run("Valid_"+traceType.String(), func(t *testing.T) {
require.Equal(t, value, cfg.AlphabetTrace) cfg := configForArgs(t, addRequiredArgsExcept("--trace-type", "--trace-type", traceType.String()))
require.Equal(t, traceType, cfg.TraceType)
})
}
t.Run("Invalid", func(t *testing.T) {
verifyArgsInvalid(t, "unknown trace type: \"foo\"", addRequiredArgsExcept("--trace-type", "--trace-type=foo"))
}) })
} }
...@@ -164,7 +172,9 @@ func requiredArgs() map[string]string { ...@@ -164,7 +172,9 @@ func requiredArgs() map[string]string {
"--agree-with-proposed-output": agreeWithProposedOutput, "--agree-with-proposed-output": agreeWithProposedOutput,
"--l1-eth-rpc": l1EthRpc, "--l1-eth-rpc": l1EthRpc,
"--game-address": gameAddressValue, "--game-address": gameAddressValue,
"--trace-type": flags.TraceTypeAlphabet.String(),
"--alphabet": alphabetTrace, "--alphabet": alphabetTrace,
"--cannon-datadir": cannonDatadir,
} }
} }
......
...@@ -2,6 +2,7 @@ package config ...@@ -2,6 +2,7 @@ package config
import ( import (
"errors" "errors"
"strings"
"github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v2"
...@@ -12,9 +13,11 @@ import ( ...@@ -12,9 +13,11 @@ import (
) )
var ( var (
ErrMissingTraceType = errors.New("missing trace type")
ErrMissingCannonDatadir = errors.New("missing cannon datadir")
ErrMissingAlphabetTrace = errors.New("missing alphabet trace")
ErrMissingL1EthRPC = errors.New("missing l1 eth rpc url") ErrMissingL1EthRPC = errors.New("missing l1 eth rpc url")
ErrMissingGameAddress = errors.New("missing game address") ErrMissingGameAddress = errors.New("missing game address")
ErrMissingAlphabetTrace = errors.New("missing alphabet trace")
) )
// Config is a well typed config that is parsed from the CLI params. // Config is a well typed config that is parsed from the CLI params.
...@@ -23,27 +26,37 @@ var ( ...@@ -23,27 +26,37 @@ var (
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
AgreeWithProposedOutput bool // Temporary config if we agree or disagree with the posted output AgreeWithProposedOutput bool // Temporary config if we agree or disagree with the posted output
GameDepth int // Depth of the game tree GameDepth int // Depth of the game tree
TraceType flags.TraceType // Type of trace
AlphabetTrace string // String for the AlphabetTraceProvider
CannonDatadir string // Cannon Data Directory for the CannonTraceProvider
TxMgrConfig txmgr.CLIConfig TxMgrConfig txmgr.CLIConfig
} }
func NewConfig( func NewConfig(
l1EthRpc string, l1EthRpc string,
GameAddress common.Address, gameAddress common.Address,
AlphabetTrace string, traceType flags.TraceType,
AgreeWithProposedOutput bool, alphabetTrace string,
GameDepth int, cannonDatadir string,
agreeWithProposedOutput bool,
gameDepth int,
) Config { ) Config {
return Config{ return Config{
L1EthRpc: l1EthRpc, L1EthRpc: l1EthRpc,
GameAddress: GameAddress, GameAddress: gameAddress,
AlphabetTrace: AlphabetTrace,
TxMgrConfig: txmgr.NewCLIConfig(l1EthRpc), AgreeWithProposedOutput: agreeWithProposedOutput,
AgreeWithProposedOutput: AgreeWithProposedOutput, GameDepth: gameDepth,
GameDepth: GameDepth,
TraceType: traceType,
AlphabetTrace: alphabetTrace,
CannonDatadir: cannonDatadir,
TxMgrConfig: txmgr.NewCLIConfig(l1EthRpc),
} }
} }
...@@ -54,7 +67,13 @@ func (c Config) Check() error { ...@@ -54,7 +67,13 @@ func (c Config) Check() error {
if c.GameAddress == (common.Address{}) { if c.GameAddress == (common.Address{}) {
return ErrMissingGameAddress return ErrMissingGameAddress
} }
if c.AlphabetTrace == "" { if c.TraceType == "" {
return ErrMissingTraceType
}
if c.TraceType == flags.TraceTypeCannon && c.CannonDatadir == "" {
return ErrMissingCannonDatadir
}
if c.TraceType == flags.TraceTypeAlphabet && c.AlphabetTrace == "" {
return ErrMissingAlphabetTrace return ErrMissingAlphabetTrace
} }
if err := c.TxMgrConfig.Check(); err != nil { if err := c.TxMgrConfig.Check(); err != nil {
...@@ -75,11 +94,15 @@ func NewConfigFromCLI(ctx *cli.Context) (*Config, error) { ...@@ -75,11 +94,15 @@ func NewConfigFromCLI(ctx *cli.Context) (*Config, error) {
txMgrConfig := txmgr.ReadCLIConfig(ctx) txMgrConfig := txmgr.ReadCLIConfig(ctx)
traceTypeFlag := flags.TraceType(strings.ToLower(ctx.String(flags.TraceTypeFlag.Name)))
return &Config{ return &Config{
// Required Flags // Required Flags
L1EthRpc: ctx.String(flags.L1EthRpcFlag.Name), L1EthRpc: ctx.String(flags.L1EthRpcFlag.Name),
TraceType: traceTypeFlag,
GameAddress: dgfAddress, GameAddress: dgfAddress,
AlphabetTrace: ctx.String(flags.AlphabetFlag.Name), AlphabetTrace: ctx.String(flags.AlphabetFlag.Name),
CannonDatadir: ctx.String(flags.CannonDatadirFlag.Name),
AgreeWithProposedOutput: ctx.Bool(flags.AgreeWithProposedOutputFlag.Name), AgreeWithProposedOutput: ctx.Bool(flags.AgreeWithProposedOutputFlag.Name),
GameDepth: ctx.Int(flags.GameDepthFlag.Name), GameDepth: ctx.Int(flags.GameDepthFlag.Name),
TxMgrConfig: txMgrConfig, TxMgrConfig: txMgrConfig,
......
...@@ -3,6 +3,7 @@ package config ...@@ -3,6 +3,7 @@ package config
import ( import (
"testing" "testing"
"github.com/ethereum-optimism/optimism/op-challenger/flags"
"github.com/ethereum-optimism/optimism/op-service/txmgr" "github.com/ethereum-optimism/optimism/op-service/txmgr"
"github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
...@@ -12,47 +13,58 @@ var ( ...@@ -12,47 +13,58 @@ var (
validL1EthRpc = "http://localhost:8545" validL1EthRpc = "http://localhost:8545"
validGameAddress = common.HexToAddress("0x7bdd3b028C4796eF0EAf07d11394d0d9d8c24139") validGameAddress = common.HexToAddress("0x7bdd3b028C4796eF0EAf07d11394d0d9d8c24139")
validAlphabetTrace = "abcdefgh" validAlphabetTrace = "abcdefgh"
validCannonDatadir = "/tmp/cannon"
agreeWithProposedOutput = true agreeWithProposedOutput = true
gameDepth = 4 gameDepth = 4
) )
func validConfig() Config { func validConfig(traceType flags.TraceType) Config {
cfg := NewConfig(validL1EthRpc, validGameAddress, validAlphabetTrace, agreeWithProposedOutput, gameDepth) cfg := NewConfig(validL1EthRpc, validGameAddress, traceType, validAlphabetTrace, validCannonDatadir, agreeWithProposedOutput, gameDepth)
return cfg return cfg
} }
// TestValidConfigIsValid checks that the config provided by validConfig is actually valid // TestValidConfigIsValid checks that the config provided by validConfig is actually valid
func TestValidConfigIsValid(t *testing.T) { func TestValidConfigIsValid(t *testing.T) {
err := validConfig().Check() err := validConfig(flags.TraceTypeCannon).Check()
require.NoError(t, err) require.NoError(t, err)
} }
func TestTxMgrConfig(t *testing.T) { func TestTxMgrConfig(t *testing.T) {
t.Run("Invalid", func(t *testing.T) { t.Run("Invalid", func(t *testing.T) {
config := validConfig() config := validConfig(flags.TraceTypeCannon)
config.TxMgrConfig = txmgr.CLIConfig{} config.TxMgrConfig = txmgr.CLIConfig{}
err := config.Check() require.Equal(t, config.Check().Error(), "must provide a L1 RPC url")
require.Equal(t, err.Error(), "must provide a L1 RPC url")
}) })
} }
func TestL1EthRpcRequired(t *testing.T) { func TestL1EthRpcRequired(t *testing.T) {
config := validConfig() config := validConfig(flags.TraceTypeCannon)
config.L1EthRpc = "" config.L1EthRpc = ""
err := config.Check() require.ErrorIs(t, config.Check(), ErrMissingL1EthRPC)
require.ErrorIs(t, err, ErrMissingL1EthRPC) config.L1EthRpc = validL1EthRpc
require.NoError(t, config.Check())
} }
func TestGameAddressRequired(t *testing.T) { func TestGameAddressRequired(t *testing.T) {
config := validConfig() config := validConfig(flags.TraceTypeCannon)
config.GameAddress = common.Address{} config.GameAddress = common.Address{}
err := config.Check() require.ErrorIs(t, config.Check(), ErrMissingGameAddress)
require.ErrorIs(t, err, ErrMissingGameAddress) config.GameAddress = validGameAddress
require.NoError(t, config.Check())
} }
func TestAlphabetTraceRequired(t *testing.T) { func TestAlphabetTraceRequired(t *testing.T) {
config := validConfig() config := validConfig(flags.TraceTypeAlphabet)
config.AlphabetTrace = "" config.AlphabetTrace = ""
err := config.Check() require.ErrorIs(t, config.Check(), ErrMissingAlphabetTrace)
require.ErrorIs(t, err, ErrMissingAlphabetTrace) config.AlphabetTrace = validAlphabetTrace
require.NoError(t, config.Check())
}
func TestCannonTraceRequired(t *testing.T) {
config := validConfig(flags.TraceTypeCannon)
config.CannonDatadir = ""
require.ErrorIs(t, config.Check(), ErrMissingCannonDatadir)
config.CannonDatadir = validCannonDatadir
require.NoError(t, config.Check())
} }
...@@ -7,7 +7,6 @@ import ( ...@@ -7,7 +7,6 @@ import (
"os" "os"
"path/filepath" "path/filepath"
"github.com/ethereum-optimism/optimism/op-challenger/fault"
"github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/common/hexutil"
) )
...@@ -77,5 +76,3 @@ func (p *CannonTraceProvider) loadProof(i uint64) (*proofData, error) { ...@@ -77,5 +76,3 @@ func (p *CannonTraceProvider) loadProof(i uint64) (*proofData, error) {
} }
return &proof, nil return &proof, nil
} }
var _ fault.TraceProvider = (*CannonTraceProvider)(nil)
...@@ -6,6 +6,8 @@ import ( ...@@ -6,6 +6,8 @@ import (
"github.com/ethereum-optimism/optimism/op-bindings/bindings" "github.com/ethereum-optimism/optimism/op-bindings/bindings"
"github.com/ethereum-optimism/optimism/op-challenger/config" "github.com/ethereum-optimism/optimism/op-challenger/config"
"github.com/ethereum-optimism/optimism/op-challenger/fault/cannon"
"github.com/ethereum-optimism/optimism/op-challenger/flags"
"github.com/ethereum-optimism/optimism/op-service/txmgr" "github.com/ethereum-optimism/optimism/op-service/txmgr"
"github.com/ethereum-optimism/optimism/op-service/txmgr/metrics" "github.com/ethereum-optimism/optimism/op-service/txmgr/metrics"
"github.com/ethereum/go-ethereum/ethclient" "github.com/ethereum/go-ethereum/ethclient"
...@@ -50,7 +52,15 @@ func NewService(ctx context.Context, logger log.Logger, cfg *config.Config) (*se ...@@ -50,7 +52,15 @@ func NewService(ctx context.Context, logger log.Logger, cfg *config.Config) (*se
return nil, fmt.Errorf("failed to create the responder: %w", err) return nil, fmt.Errorf("failed to create the responder: %w", err)
} }
trace := NewAlphabetProvider(cfg.AlphabetTrace, uint64(cfg.GameDepth)) var trace TraceProvider
switch cfg.TraceType {
case flags.TraceTypeCannon:
trace = cannon.NewCannonTraceProvider(cfg.CannonDatadir)
case flags.TraceTypeAlphabet:
trace = NewAlphabetProvider(cfg.AlphabetTrace, uint64(cfg.GameDepth))
default:
return nil, fmt.Errorf("unsupported trace type: %v", cfg.TraceType)
}
agent := NewAgent(loader, cfg.GameDepth, trace, responder, cfg.AgreeWithProposedOutput, gameLogger) agent := NewAgent(loader, cfg.GameDepth, trace, responder, cfg.AgreeWithProposedOutput, gameLogger)
......
...@@ -2,7 +2,9 @@ package flags ...@@ -2,7 +2,9 @@ package flags
import ( import (
"fmt" "fmt"
"strings"
openum "github.com/ethereum-optimism/optimism/op-service/enum"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v2"
opservice "github.com/ethereum-optimism/optimism/op-service" opservice "github.com/ethereum-optimism/optimism/op-service"
...@@ -10,12 +12,44 @@ import ( ...@@ -10,12 +12,44 @@ import (
txmgr "github.com/ethereum-optimism/optimism/op-service/txmgr" txmgr "github.com/ethereum-optimism/optimism/op-service/txmgr"
) )
const envVarPrefix = "OP_CHALLENGER" const (
envVarPrefix = "OP_CHALLENGER"
)
func prefixEnvVars(name string) []string { func prefixEnvVars(name string) []string {
return opservice.PrefixEnvVar(envVarPrefix, name) return opservice.PrefixEnvVar(envVarPrefix, name)
} }
type TraceType string
const (
TraceTypeAlphabet TraceType = "alphabet"
TraceTypeCannon TraceType = "cannon"
)
var TraceTypes = []TraceType{TraceTypeAlphabet, TraceTypeCannon}
func (t TraceType) String() string {
return string(t)
}
func (t *TraceType) Set(value string) error {
if !ValidTraceType(TraceType(value)) {
return fmt.Errorf("unknown trace type: %q", value)
}
*t = TraceType(value)
return nil
}
func ValidTraceType(value TraceType) bool {
for _, t := range TraceTypes {
if t == value {
return true
}
}
return false
}
var ( var (
// Required Flags // Required Flags
L1EthRpcFlag = &cli.StringFlag{ L1EthRpcFlag = &cli.StringFlag{
...@@ -28,10 +62,14 @@ var ( ...@@ -28,10 +62,14 @@ var (
Usage: "Address of the Fault Game contract.", Usage: "Address of the Fault Game contract.",
EnvVars: prefixEnvVars("GAME_ADDRESS"), EnvVars: prefixEnvVars("GAME_ADDRESS"),
} }
AlphabetFlag = &cli.StringFlag{ TraceTypeFlag = &cli.GenericFlag{
Name: "alphabet", Name: "trace-type",
Usage: "Alphabet Trace (temporary)", Usage: "The trace type. Valid options: " + openum.EnumString(TraceTypes),
EnvVars: prefixEnvVars("ALPHABET"), EnvVars: prefixEnvVars("TRACE_TYPE"),
Value: func() *TraceType {
out := TraceType("") // No default value
return &out
}(),
} }
AgreeWithProposedOutputFlag = &cli.BoolFlag{ AgreeWithProposedOutputFlag = &cli.BoolFlag{
Name: "agree-with-proposed-output", Name: "agree-with-proposed-output",
...@@ -44,19 +82,32 @@ var ( ...@@ -44,19 +82,32 @@ var (
EnvVars: prefixEnvVars("GAME_DEPTH"), EnvVars: prefixEnvVars("GAME_DEPTH"),
} }
// Optional Flags // Optional Flags
AlphabetFlag = &cli.StringFlag{
Name: "alphabet",
Usage: "Alphabet Trace (temporary)",
EnvVars: prefixEnvVars("ALPHABET"),
}
CannonDatadirFlag = &cli.StringFlag{
Name: "cannon-datadir",
Usage: "Cannon Data Directory",
EnvVars: prefixEnvVars("CANNON_DATADIR"),
}
) )
// requiredFlags are checked by [CheckRequired] // requiredFlags are checked by [CheckRequired]
var requiredFlags = []cli.Flag{ var requiredFlags = []cli.Flag{
L1EthRpcFlag, L1EthRpcFlag,
DGFAddressFlag, DGFAddressFlag,
AlphabetFlag, TraceTypeFlag,
AgreeWithProposedOutputFlag, AgreeWithProposedOutputFlag,
GameDepthFlag, GameDepthFlag,
} }
// optionalFlags is a list of unchecked cli flags // optionalFlags is a list of unchecked cli flags
var optionalFlags = []cli.Flag{} var optionalFlags = []cli.Flag{
AlphabetFlag,
CannonDatadirFlag,
}
func init() { func init() {
optionalFlags = append(optionalFlags, oplog.CLIFlags(envVarPrefix)...) optionalFlags = append(optionalFlags, oplog.CLIFlags(envVarPrefix)...)
...@@ -74,5 +125,18 @@ func CheckRequired(ctx *cli.Context) error { ...@@ -74,5 +125,18 @@ func CheckRequired(ctx *cli.Context) error {
return fmt.Errorf("flag %s is required", f.Names()[0]) return fmt.Errorf("flag %s is required", f.Names()[0])
} }
} }
gameType := TraceType(strings.ToLower(ctx.String(TraceTypeFlag.Name)))
switch gameType {
case TraceTypeCannon:
if !ctx.IsSet(CannonDatadirFlag.Name) {
return fmt.Errorf("flag %s is required", "cannon-datadir")
}
case TraceTypeAlphabet:
if !ctx.IsSet(AlphabetFlag.Name) {
return fmt.Errorf("flag %s is required", "alphabet")
}
default:
return fmt.Errorf("invalid trace type. must be one of %v", TraceTypes)
}
return nil return nil
} }
...@@ -16,6 +16,7 @@ FAULT_GAME_ADDRESS="0x8daf17a20c9dba35f005b6324f493785d239719d" ...@@ -16,6 +16,7 @@ FAULT_GAME_ADDRESS="0x8daf17a20c9dba35f005b6324f493785d239719d"
./bin/op-challenger \ ./bin/op-challenger \
--l1-eth-rpc http://localhost:8545 \ --l1-eth-rpc http://localhost:8545 \
--trace-type="alphabet" \
--alphabet "abcdexyz" \ --alphabet "abcdexyz" \
--game-address $FAULT_GAME_ADDRESS \ --game-address $FAULT_GAME_ADDRESS \
--private-key $MALLORY_KEY \ --private-key $MALLORY_KEY \
......
...@@ -38,6 +38,7 @@ func NewChallenger(t *testing.T, ctx context.Context, l1Endpoint string, name st ...@@ -38,6 +38,7 @@ func NewChallenger(t *testing.T, ctx context.Context, l1Endpoint string, name st
option(cfg) option(cfg)
} }
require.NotEmpty(t, cfg.TxMgrConfig.PrivateKey, "Missing private key for TxMgrConfig") require.NotEmpty(t, cfg.TxMgrConfig.PrivateKey, "Missing private key for TxMgrConfig")
require.NoError(t, cfg.Check(), "op-challenger config should be valid")
errCh := make(chan error, 1) errCh := make(chan error, 1)
ctx, cancel := context.WithCancel(ctx) ctx, cancel := context.WithCancel(ctx)
......
...@@ -11,6 +11,7 @@ import ( ...@@ -11,6 +11,7 @@ import (
"github.com/ethereum-optimism/optimism/op-chain-ops/deployer" "github.com/ethereum-optimism/optimism/op-chain-ops/deployer"
"github.com/ethereum-optimism/optimism/op-challenger/config" "github.com/ethereum-optimism/optimism/op-challenger/config"
"github.com/ethereum-optimism/optimism/op-challenger/fault" "github.com/ethereum-optimism/optimism/op-challenger/fault"
"github.com/ethereum-optimism/optimism/op-challenger/flags"
"github.com/ethereum-optimism/optimism/op-e2e/e2eutils/challenger" "github.com/ethereum-optimism/optimism/op-e2e/e2eutils/challenger"
"github.com/ethereum-optimism/optimism/op-service/client/utils" "github.com/ethereum-optimism/optimism/op-service/client/utils"
"github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/accounts/abi/bind"
...@@ -106,6 +107,7 @@ func (g *FaultGameHelper) StartChallenger(ctx context.Context, l1Endpoint string ...@@ -106,6 +107,7 @@ func (g *FaultGameHelper) StartChallenger(ctx context.Context, l1Endpoint string
func(c *config.Config) { func(c *config.Config) {
c.GameAddress = g.addr c.GameAddress = g.addr
c.GameDepth = alphabetGameDepth c.GameDepth = alphabetGameDepth
c.TraceType = flags.TraceTypeAlphabet
// By default the challenger agrees with the root claim (thus disagrees with the proposed output) // By default the challenger agrees with the root claim (thus disagrees with the proposed output)
// This can be overridden by passing in options // This can be overridden by passing in options
c.AlphabetTrace = g.claimedAlphabet c.AlphabetTrace = g.claimedAlphabet
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment