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

feat: add experimental L2 source flag to runner #12829

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from
Draft
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: 9 additions & 0 deletions op-challenger/flags/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,11 @@ var (
Usage: "L2 Address of L2 JSON-RPC endpoint to use (eth and debug namespace required) (cannon/asterisc trace type only)",
EnvVars: prefixEnvVars("L2_ETH_RPC"),
}
L2ExperimentalEthRpcFlag = &cli.StringFlag{
Name: "l2-experimental-eth-rpc",
Usage: "L2 Address of L2 JSON-RPC endpoint to use (eth and debug namespace required with execution witness support) (cannon/asterisc trace type only)",
EnvVars: prefixEnvVars("L2_EXPERIMENTAL_ETH_RPC"),
}
MaxPendingTransactionsFlag = &cli.Uint64Flag{
Name: "max-pending-tx",
Usage: "The maximum number of pending transactions. 0 for no limit.",
Expand Down Expand Up @@ -541,6 +546,7 @@ func NewConfigFromCLI(ctx *cli.Context, logger log.Logger) (*config.Config, erro
}
l1EthRpc := ctx.String(L1EthRpcFlag.Name)
l1Beacon := ctx.String(L1BeaconFlag.Name)
l2Experimental := ctx.String(L2ExperimentalEthRpcFlag.Name)
return &config.Config{
// Required Flags
L1EthRpc: l1EthRpc,
Expand All @@ -560,6 +566,7 @@ func NewConfigFromCLI(ctx *cli.Context, logger log.Logger) (*config.Config, erro
L1: l1EthRpc,
L1Beacon: l1Beacon,
L2: l2Rpc,
L2Experimental: l2Experimental,
VmBin: ctx.String(CannonBinFlag.Name),
Server: ctx.String(CannonServerFlag.Name),
Network: cannonNetwork,
Expand All @@ -578,6 +585,7 @@ func NewConfigFromCLI(ctx *cli.Context, logger log.Logger) (*config.Config, erro
L1: l1EthRpc,
L1Beacon: l1Beacon,
L2: l2Rpc,
L2Experimental: l2Experimental,
VmBin: ctx.String(AsteriscBinFlag.Name),
Server: ctx.String(AsteriscServerFlag.Name),
Network: asteriscNetwork,
Expand All @@ -594,6 +602,7 @@ func NewConfigFromCLI(ctx *cli.Context, logger log.Logger) (*config.Config, erro
L1: l1EthRpc,
L1Beacon: l1Beacon,
L2: l2Rpc,
L2Experimental: l2Experimental,
VmBin: ctx.String(AsteriscBinFlag.Name),
Server: ctx.String(AsteriscKonaServerFlag.Name),
Network: asteriscNetwork,
Expand Down
1 change: 1 addition & 0 deletions op-challenger/game/fault/trace/vm/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ type Config struct {
L1 string
L1Beacon string
L2 string
L2Experimental string
Server string // Path to the executable that provides the pre-image oracle server
Network string
RollupConfigPath string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ func (s *OpProgramServerExecutor) OracleCommand(cfg Config, dataDir string, inpu
if cfg.L2GenesisPath != "" {
args = append(args, "--l2.genesis", cfg.L2GenesisPath)
}
if cfg.L2Experimental != "" {
args = append(args, "--l2.experimental", cfg.L2Experimental)
}
var logLevel string
if s.logger.Enabled(context.Background(), log.LevelTrace) {
logLevel = "TRACE"
Expand Down