Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(op-challenger): Update kona native mode flag #13023

Merged
merged 1 commit into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
9 changes: 4 additions & 5 deletions op-challenger/game/fault/trace/vm/kona_server_executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ import (
)

type KonaExecutor struct {
nativeMode bool
clientBinPath string
nativeMode bool
}

var _ OracleServerExecutor = (*KonaExecutor)(nil)
Expand All @@ -19,8 +18,8 @@ func NewKonaExecutor() *KonaExecutor {
return &KonaExecutor{nativeMode: false}
}

func NewNativeKonaExecutor(clientBinPath string) *KonaExecutor {
return &KonaExecutor{nativeMode: true, clientBinPath: clientBinPath}
func NewNativeKonaExecutor() *KonaExecutor {
return &KonaExecutor{nativeMode: true}
}

func (s *KonaExecutor) OracleCommand(cfg Config, dataDir string, inputs utils.LocalGameInputs) ([]string, error) {
Expand All @@ -37,7 +36,7 @@ func (s *KonaExecutor) OracleCommand(cfg Config, dataDir string, inputs utils.Lo
}

if s.nativeMode {
args = append(args, "--exec", s.clientBinPath)
args = append(args, "--native")
} else {
args = append(args, "--server")
args = append(args, "--data-dir", dataDir)
Expand Down
7 changes: 3 additions & 4 deletions op-e2e/actions/proofs/helpers/kona.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,14 @@ import (
"github.com/stretchr/testify/require"
)

var konaHostPath, konaClientPath string
var konaHostPath string

func init() {
konaHostPath = os.Getenv("KONA_HOST_PATH")
konaClientPath = os.Getenv("KONA_CLIENT_PATH")
}

func IsKonaConfigured() bool {
return konaHostPath != "" && konaClientPath != ""
return konaHostPath != ""
}

func RunKonaNative(
Expand Down Expand Up @@ -57,7 +56,7 @@ func RunKonaNative(
L2Claim: fixtureInputs.L2Claim,
L2BlockNumber: big.NewInt(int64(fixtureInputs.L2BlockNumber)),
}
hostCmd, err := vm.NewNativeKonaExecutor(konaClientPath).OracleCommand(vmCfg, workDir, inputs)
hostCmd, err := vm.NewNativeKonaExecutor().OracleCommand(vmCfg, workDir, inputs)
require.NoError(t, err)

cmd := exec.Command(hostCmd[0], hostCmd[1:]...)
Expand Down