bootstrap

package
v1.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 19, 2024 License: MIT Imports: 25 Imported by: 1

Documentation

Index

Constants

View Source
const (
	ArtifactsLocatorFlagName                = "artifacts-locator"
	WithdrawalDelaySecondsFlagName          = "withdrawal-delay-seconds"
	MinProposalSizeBytesFlagName            = "min-proposal-size-bytes"
	ChallengePeriodSecondsFlagName          = "challenge-period-seconds"
	ProofMaturityDelaySecondsFlagName       = "proof-maturity-delay-seconds"
	DisputeGameFinalityDelaySecondsFlagName = "dispute-game-finality-delay-seconds"
	MIPSVersionFlagName                     = "mips-version"
	GameKindFlagName                        = "game-kind"
	GameTypeFlagName                        = "game-type"
	AbsolutePrestateFlagName                = "absolute-prestate"
	MaxGameDepthFlagName                    = "max-game-depth"
	SplitDepthFlagName                      = "split-depth"
	ClockExtensionFlagName                  = "clock-extension"
	MaxClockDurationFlagName                = "max-clock-duration"
	DelayedWethProxyFlagName                = "delayed-weth-proxy"
	AnchorStateRegistryProxyFlagName        = "anchor-state-registry-proxy"
	L2ChainIdFlagName                       = "l2-chain-id"
	ProposerFlagName                        = "proposer"
	ChallengerFlagName                      = "challenger"
	PreimageOracleFlagName                  = "preimage-oracle"
)

Variables

View Source
var (
	ArtifactsLocatorFlag = &cli.StringFlag{
		Name:    ArtifactsLocatorFlagName,
		Usage:   "Locator for artifacts.",
		EnvVars: deployer.PrefixEnvVar("ARTIFACTS_LOCATOR"),
	}
	WithdrawalDelaySecondsFlag = &cli.Uint64Flag{
		Name:    WithdrawalDelaySecondsFlagName,
		Usage:   "Withdrawal delay in seconds.",
		EnvVars: deployer.PrefixEnvVar("WITHDRAWAL_DELAY_SECONDS"),
		Value:   standard.WithdrawalDelaySeconds,
	}
	MinProposalSizeBytesFlag = &cli.Uint64Flag{
		Name:    MinProposalSizeBytesFlagName,
		Usage:   "Minimum proposal size in bytes.",
		EnvVars: deployer.PrefixEnvVar("MIN_PROPOSAL_SIZE_BYTES"),
		Value:   standard.MinProposalSizeBytes,
	}
	ChallengePeriodSecondsFlag = &cli.Uint64Flag{
		Name:    ChallengePeriodSecondsFlagName,
		Usage:   "Challenge period in seconds.",
		EnvVars: deployer.PrefixEnvVar("CHALLENGE_PERIOD_SECONDS"),
		Value:   standard.ChallengePeriodSeconds,
	}
	ProofMaturityDelaySecondsFlag = &cli.Uint64Flag{
		Name:    ProofMaturityDelaySecondsFlagName,
		Usage:   "Proof maturity delay in seconds.",
		EnvVars: deployer.PrefixEnvVar("PROOF_MATURITY_DELAY_SECONDS"),
		Value:   standard.ProofMaturityDelaySeconds,
	}
	DisputeGameFinalityDelaySecondsFlag = &cli.Uint64Flag{
		Name:    DisputeGameFinalityDelaySecondsFlagName,
		Usage:   "Dispute game finality delay in seconds.",
		EnvVars: deployer.PrefixEnvVar("DISPUTE_GAME_FINALITY_DELAY_SECONDS"),
		Value:   standard.DisputeGameFinalityDelaySeconds,
	}
	MIPSVersionFlag = &cli.Uint64Flag{
		Name:    MIPSVersionFlagName,
		Usage:   "MIPS version.",
		EnvVars: deployer.PrefixEnvVar("MIPS_VERSION"),
		Value:   standard.MIPSVersion,
	}
	GameKindFlag = &cli.StringFlag{
		Name:    GameKindFlagName,
		Usage:   "Game kind (FaultDisputeGame or PermissionedDisputeGame).",
		EnvVars: deployer.PrefixEnvVar("GAME_KIND"),
		Value:   "FaultDisputeGame",
	}
	GameTypeFlag = &cli.StringFlag{
		Name:    GameTypeFlagName,
		Usage:   "Game type (integer or fractional).",
		EnvVars: deployer.PrefixEnvVar("GAME_TYPE"),
	}
	AbsolutePrestateFlag = &cli.StringFlag{
		Name:    AbsolutePrestateFlagName,
		Usage:   "Absolute prestate.",
		EnvVars: deployer.PrefixEnvVar("ABSOLUTE_PRESTATE"),
		Value:   standard.DisputeAbsolutePrestate.Hex(),
	}
	MaxGameDepthFlag = &cli.Uint64Flag{
		Name:    MaxGameDepthFlagName,
		Usage:   "Max game depth.",
		EnvVars: deployer.PrefixEnvVar("MAX_GAME_DEPTH"),
		Value:   standard.DisputeMaxGameDepth,
	}
	SplitDepthFlag = &cli.Uint64Flag{
		Name:    SplitDepthFlagName,
		Usage:   "Split depth.",
		EnvVars: deployer.PrefixEnvVar("SPLIT_DEPTH"),
		Value:   standard.DisputeSplitDepth,
	}
	ClockExtensionFlag = &cli.Uint64Flag{
		Name:    ClockExtensionFlagName,
		Usage:   "Clock extension.",
		EnvVars: deployer.PrefixEnvVar("CLOCK_EXTENSION"),
		Value:   standard.DisputeClockExtension,
	}
	MaxClockDurationFlag = &cli.Uint64Flag{
		Name:    MaxClockDurationFlagName,
		Usage:   "Max clock duration.",
		EnvVars: deployer.PrefixEnvVar("MAX_CLOCK_DURATION"),
		Value:   standard.DisputeMaxClockDuration,
	}
	DelayedWethProxyFlag = &cli.StringFlag{
		Name:    DelayedWethProxyFlagName,
		Usage:   "Delayed WETH proxy.",
		EnvVars: deployer.PrefixEnvVar("DELAYED_WETH_PROXY"),
	}
	AnchorStateRegistryProxyFlag = &cli.StringFlag{
		Name:    AnchorStateRegistryProxyFlagName,
		Usage:   "Anchor state registry proxy.",
		EnvVars: deployer.PrefixEnvVar("ANCHOR_STATE_REGISTRY_PROXY"),
	}
	L2ChainIdFlag = &cli.Uint64Flag{
		Name:    L2ChainIdFlagName,
		Usage:   "L2 chain ID.",
		EnvVars: deployer.PrefixEnvVar("L2_CHAIN_ID"),
	}
	ProposerFlag = &cli.StringFlag{
		Name:    ProposerFlagName,
		Usage:   "Proposer address (permissioned game only).",
		EnvVars: deployer.PrefixEnvVar("PROPOSER"),
		Value:   common.Address{}.Hex(),
	}
	ChallengerFlag = &cli.StringFlag{
		Name:    ChallengerFlagName,
		Usage:   "Challenger address (permissioned game only).",
		EnvVars: deployer.PrefixEnvVar("CHALLENGER"),
		Value:   common.Address{}.Hex(),
	}
	PreimageOracleFlag = &cli.StringFlag{
		Name:    PreimageOracleFlagName,
		Usage:   "Preimage oracle address.",
		EnvVars: deployer.PrefixEnvVar("PREIMAGE_ORACLE"),
		Value:   common.Address{}.Hex(),
	}
)
View Source
var Commands = []*cli.Command{
	{
		Name:   "opcm",
		Usage:  "Bootstrap an instance of OPCM.",
		Flags:  cliapp.ProtectFlags(OPCMFlags),
		Action: OPCMCLI,
	},
	{
		Name:   "delayedweth",
		Usage:  "Bootstrap an instance of DelayedWETH.",
		Flags:  cliapp.ProtectFlags(DelayedWETHFlags),
		Action: DelayedWETHCLI,
	},
	{
		Name:   "disputegame",
		Usage:  "Bootstrap an instance of a FaultDisputeGame or PermissionedDisputeGame.",
		Flags:  cliapp.ProtectFlags(DisputeGameFlags),
		Action: DisputeGameCLI,
	},
	{
		Name:   "mips",
		Usage:  "Bootstrap an instance of MIPS.",
		Flags:  cliapp.ProtectFlags(MIPSFlags),
		Action: MIPSCLI,
	},
}

Functions

func DelayedWETH

func DelayedWETH(ctx context.Context, cfg DelayedWETHConfig) error

func DelayedWETHCLI

func DelayedWETHCLI(cliCtx *cli.Context) error

func DisputeGame

func DisputeGame(ctx context.Context, cfg DisputeGameConfig) error

func DisputeGameCLI

func DisputeGameCLI(cliCtx *cli.Context) error

func MIPS

func MIPS(ctx context.Context, cfg MIPSConfig) error

func MIPSCLI

func MIPSCLI(cliCtx *cli.Context) error

func OPCM

func OPCM(ctx context.Context, cfg OPCMConfig) error

func OPCMCLI

func OPCMCLI(cliCtx *cli.Context) error

Types

type DelayedWETHConfig

type DelayedWETHConfig struct {
	L1RPCUrl         string
	PrivateKey       string
	Logger           log.Logger
	ArtifactsLocator *artifacts2.Locator
	// contains filtered or unexported fields
}

func (*DelayedWETHConfig) Check

func (c *DelayedWETHConfig) Check() error

type DisputeGameConfig

type DisputeGameConfig struct {
	L1RPCUrl         string
	PrivateKey       string
	Logger           log.Logger
	ArtifactsLocator *artifacts2.Locator

	MinProposalSizeBytes     uint64
	ChallengePeriodSeconds   uint64
	MipsVersion              uint64
	GameKind                 string
	GameType                 uint32
	AbsolutePrestate         common.Hash
	MaxGameDepth             uint64
	SplitDepth               uint64
	ClockExtension           uint64
	MaxClockDuration         uint64
	DelayedWethProxy         common.Address
	AnchorStateRegistryProxy common.Address
	L2ChainId                uint64
	Proposer                 common.Address
	Challenger               common.Address
	// contains filtered or unexported fields
}

func (*DisputeGameConfig) Check

func (c *DisputeGameConfig) Check() error

type MIPSConfig

type MIPSConfig struct {
	L1RPCUrl         string
	PrivateKey       string
	Logger           log.Logger
	ArtifactsLocator *artifacts2.Locator

	PreimageOracle common.Address
	MipsVersion    uint64
	// contains filtered or unexported fields
}

func (*MIPSConfig) Check

func (c *MIPSConfig) Check() error

type OPCMConfig

type OPCMConfig struct {
	pipeline.SuperchainProofParams

	L1RPCUrl         string
	PrivateKey       string
	Logger           log.Logger
	ArtifactsLocator *artifacts2.Locator
	// contains filtered or unexported fields
}

func (*OPCMConfig) Check

func (c *OPCMConfig) Check() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL