state

package
v1.19.6 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2026 License: MIT Imports: 34 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VMTypeAlphabet   = "ALPHABET"
	VMTypeCannon     = "CANNON"      // Corresponds to the currently released Cannon StateVersion. See: https://github.com/ethereum-optimism/optimism/blob/4c05241bc534ae5837007c32995fc62f3dd059b6/cannon/mipsevm/versions/version.go
	VMTypeCannonNext = "CANNON-NEXT" // Corresponds to the next in-development Cannon StateVersion. See: https://github.com/ethereum-optimism/optimism/blob/4c05241bc534ae5837007c32995fc62f3dd059b6/cannon/mipsevm/versions/version.go
	VMTypeZK         = "ZK"          // ZK dispute game — uses a ZK verifier instead of a MIPS VM, with super-root semantics.
)
View Source
const FaultGameAbsolutePrestateOverrideKey = "faultGameAbsolutePrestate"

FaultGameAbsolutePrestateOverrideKey names the absolute prestate override.

Variables

View Source
var (
	ErrL1ContractsLocatorUndefined = errors.New("L1ContractsLocator undefined")
	ErrL2ContractsLocatorUndefined = errors.New("L2ContractsLocator undefined")
	ErrPAOMustBeSpecified          = errors.New("l1ProxyAdminOwner and l2ProxyAdminOwner must be specified in intent.toml - they are not set by default")
)
View Source
var ErrEip1559ZeroValue = fmt.Errorf("eip1559 param is set to zero value")
View Source
var ErrFeeVaultZeroAddress = fmt.Errorf("chain has a fee vault set to zero address")
View Source
var ErrGasLimitZeroValue = fmt.Errorf("chain has a gas limit set to zero value")
View Source
var ErrIncompatibleValue = fmt.Errorf("chain contains incompatible config value")
View Source
var ErrNonStandardValue = fmt.Errorf("chain contains non-standard config value")
View Source
var ErrZKDisputeGameMissingParams = fmt.Errorf("ZK dispute game is missing required params")
View Source
var ErrZKDisputeGameParamOutOfRange = fmt.Errorf("ZK dispute game param is out of range")
View Source
var PinnedOverrideKeys = []string{"l1StartingBlockTag", "l2GenesisBlockTimestamp"}

PinnedOverrideKeys are DeployConfig JSON keys whose values are committed into ChainState at anchor selection. Once pinned, deploy overrides **MUST NOT** replace them. The genesis block, rollup config and prestate are all derived from the committed pair and would silently diverge from it.

Functions

func CombineDeployConfig

func CombineDeployConfig(intent *Intent, chainIntent *ChainIntent, state *State, chainState *ChainState) (genesis.DeployConfig, error)

func FindPinnedOverrideKey added in v1.19.5

func FindPinnedOverrideKey(overrides map[string]any) (string, bool)

FindPinnedOverrideKey returns the override key colliding with a pinned override key, if any.

func GetStandardSuperchainRoles

func GetStandardSuperchainRoles(l1ChainId uint64) (*addresses.SuperchainRoles, error)

Types

type AdditionalDisputeGame

type AdditionalDisputeGame struct {
	ChainProofParams
	VMType        VMType
	MakeRespected bool
	// ZKDisputeGame holds ZK-specific configuration. Only used when VMType == VMTypeZK.
	ZKDisputeGame *ZKDisputeGameParams `json:"zkDisputeGame,omitempty" toml:"zkDisputeGame,omitempty"`
}

type AdditionalDisputeGameState

type AdditionalDisputeGameState struct {
	GameType      uint32
	GameAddress   common.Address
	VMAddress     common.Address
	OracleAddress common.Address
	VMType        VMType
}

type Base64Bytes

type Base64Bytes []byte

func (Base64Bytes) MarshalJSON

func (b Base64Bytes) MarshalJSON() ([]byte, error)

func (*Base64Bytes) UnmarshalJSON

func (b *Base64Bytes) UnmarshalJSON(data []byte) error

type ChainIntent

type ChainIntent struct {
	ID                         common.Hash               `json:"id" toml:"id"`
	BaseFeeVaultRecipient      common.Address            `json:"baseFeeVaultRecipient" toml:"baseFeeVaultRecipient"`
	L1FeeVaultRecipient        common.Address            `json:"l1FeeVaultRecipient" toml:"l1FeeVaultRecipient"`
	SequencerFeeVaultRecipient common.Address            `json:"sequencerFeeVaultRecipient" toml:"sequencerFeeVaultRecipient"`
	OperatorFeeVaultRecipient  common.Address            `json:"operatorFeeVaultRecipient" toml:"operatorFeeVaultRecipient"`
	Eip1559DenominatorCanyon   uint64                    `json:"eip1559DenominatorCanyon" toml:"eip1559DenominatorCanyon"`
	Eip1559Denominator         uint64                    `json:"eip1559Denominator" toml:"eip1559Denominator"`
	Eip1559Elasticity          uint64                    `json:"eip1559Elasticity" toml:"eip1559Elasticity"`
	GasLimit                   uint64                    `json:"gasLimit" toml:"gasLimit"`
	Roles                      ChainRoles                `json:"roles" toml:"roles"`
	DeployOverrides            map[string]any            `json:"deployOverrides" toml:"deployOverrides"`
	DangerousAltDAConfig       genesis.AltDADeployConfig `json:"dangerousAltDAConfig,omitempty" toml:"dangerousAltDAConfig,omitempty"`
	AdditionalDisputeGames     []AdditionalDisputeGame   `json:"dangerousAdditionalDisputeGames" toml:"dangerousAdditionalDisputeGames,omitempty"`
	OperatorFeeScalar          uint32                    `json:"operatorFeeScalar,omitempty" toml:"operatorFeeScalar,omitempty"`
	OperatorFeeConstant        uint64                    `json:"operatorFeeConstant,omitempty" toml:"operatorFeeConstant,omitempty"`
	L1StartBlockHash           *common.Hash              `json:"l1StartBlockHash,omitempty" toml:"l1StartBlockHash,omitempty"`
	MinBaseFee                 uint64                    `json:"minBaseFee,omitempty" toml:"minBaseFee,omitempty"`
	DAFootprintGasScalar       uint16                    `json:"daFootprintGasScalar,omitempty" toml:"daFootprintGasScalar,omitempty"`
	CustomGasToken             CustomGasToken            `json:"customGasToken" toml:"customGasToken"`

	// Optional. For development purposes only. Only enabled if the operation mode targets a genesis-file output.
	L2DevGenesisParams *L2DevGenesisParams `json:"l2DevGenesisParams,omitempty" toml:"l2DevGenesisParams,omitempty"`
}

func (*ChainIntent) Check

func (c *ChainIntent) Check() error

func (*ChainIntent) GetInitialLiquidity

func (c *ChainIntent) GetInitialLiquidity() *big.Int

GetInitialLiquidity returns the native asset liquidity amount for the chain. If not set and custom gas token is enabled, returns type(uint248).max as the default. Otherwise returns zero.

func (*ChainIntent) GetLiquidityControllerOwner

func (c *ChainIntent) GetLiquidityControllerOwner() common.Address

GetLiquidityControllerOwner returns the owner of the LiquidityController. If not set in CustomGasToken config, defaults to L2ProxyAdminOwner.

func (*ChainIntent) IsCustomGasTokenEnabled

func (c *ChainIntent) IsCustomGasTokenEnabled() bool

IsCustomGasTokenEnabled returns true if custom gas token is enabled. It's enabled when both Name and Symbol are provided.

type ChainProofParams

type ChainProofParams struct {
	DisputeGameType                         uint32      `json:"respectedGameType" toml:"respectedGameType"`
	DisputeAbsolutePrestate                 common.Hash `json:"faultGameAbsolutePrestate" toml:"faultGameAbsolutePrestate"`
	DisputeMaxGameDepth                     uint64      `json:"faultGameMaxDepth" toml:"faultGameMaxDepth"`
	DisputeSplitDepth                       uint64      `json:"faultGameSplitDepth" toml:"faultGameSplitDepth"`
	DisputeClockExtension                   uint64      `json:"faultGameClockExtension" toml:"faultGameClockExtension"`
	DisputeMaxClockDuration                 uint64      `json:"faultGameMaxClockDuration" toml:"faultGameMaxClockDuration"`
	DangerouslyAllowCustomDisputeParameters bool        `json:"dangerouslyAllowCustomDisputeParameters" toml:"dangerouslyAllowCustomDisputeParameters"`
}

type ChainRoles

type ChainRoles struct {
	L1ProxyAdminOwner common.Address `json:"l1ProxyAdminOwner" toml:"l1ProxyAdminOwner"`
	L2ProxyAdminOwner common.Address `json:"l2ProxyAdminOwner" toml:"l2ProxyAdminOwner"`
	SystemConfigOwner common.Address `json:"systemConfigOwner" toml:"systemConfigOwner"`
	UnsafeBlockSigner common.Address `json:"unsafeBlockSigner" toml:"unsafeBlockSigner"`
	Batcher           common.Address `json:"batcher" toml:"batcher"`
	Proposer          common.Address `json:"proposer" toml:"proposer"`
	Challenger        common.Address `json:"challenger" toml:"challenger"`
}

type ChainState

type ChainState struct {
	ID common.Hash `json:"id"`

	addresses.OpChainContracts

	// Deployed indicates whether the addresses in this chain have been deployed or are just addresses produced
	// by the prediction step of the prepare command.
	Deployed *bool `json:"deployed,omitempty"`

	// Prestate is the selected absolute prestate for permissionless games.
	Prestate common.Hash `json:"prestate,omitzero"`

	// StartingAnchorRoot is produced by the proposal-producing stage and consumed
	// when building the continuation deploy input.
	StartingAnchorRoot *StartingAnchorProposal `json:"startingAnchorRoot,omitempty"`

	// InitialGameType records the game type used by prepare to detect intent drift.
	// Legacy states without it must be prepared again before continuation.
	InitialGameType *uint32 `json:"initialGameType,omitempty"`

	AdditionalDisputeGames []AdditionalDisputeGameState `json:"additionalDisputeGames"`

	Allocs *GzipData[foundry.ForgeAllocs] `json:"allocs"`

	StartBlock *L1BlockRefJSON `json:"startBlock"`

	// GenesisTime is the L2 genesis timestamp pinned with StartBlock.
	// Nil leaves deploy config to derive it from L1StartingBlockTag.
	GenesisTime *hexutil.Uint64 `json:"genesisTime,omitempty"`

	Continuation *ContinuationState `json:"continuation,omitempty"`

	// GenesisBlockHash is the L2 genesis block hash computed from Allocs, the combined deploy
	// config, and the pinned StartBlock/GenesisTime. Used by post-deploy validation to confirm
	// on-chain seeding matches the predicted genesis.
	GenesisBlockHash *common.Hash `json:"genesisBlockHash,omitempty"`
}

func (*ChainState) ClearDerivedArtifacts added in v1.19.5

func (c *ChainState) ClearDerivedArtifacts()

ClearDerivedArtifacts clears every value derived from the chain's predicted L1 addresses.

type ContinuationState added in v1.19.5

type ContinuationState struct{}

ContinuationState marks a chain recorded by the continuation workflow.

type CustomGasToken

type CustomGasToken struct {
	Name                     string         `json:"name,omitempty" toml:"name,omitempty"`
	Symbol                   string         `json:"symbol,omitempty" toml:"symbol,omitempty"`
	InitialLiquidity         *hexutil.Big   `json:"initialLiquidity" toml:"initialLiquidity"`
	LiquidityControllerOwner common.Address `json:"liquidityControllerOwner" toml:"liquidityControllerOwner"`
}

type GzipData

type GzipData[T any] struct {
	Data *T
}

func (*GzipData[T]) MarshalJSON

func (g *GzipData[T]) MarshalJSON() ([]byte, error)

func (*GzipData[T]) UnmarshalJSON

func (g *GzipData[T]) UnmarshalJSON(b []byte) error

type Intent

type Intent struct {
	ConfigType            IntentType                 `json:"configType" toml:"configType"`
	OpDeployerVersion     string                     `json:"opDeployerVersion" toml:"opDeployerVersion"`
	L1ChainID             uint64                     `json:"l1ChainID" toml:"l1ChainID"`
	OPCMAddress           *common.Address            `json:"opcmAddress" toml:"opcmAddress"`
	SuperchainConfigProxy *common.Address            `json:"superchainConfigProxy" toml:"superchainConfigProxy"`
	SuperchainRoles       *addresses.SuperchainRoles `json:"superchainRoles" toml:"superchainRoles,omitempty"`
	FundDevAccounts       bool                       `json:"fundDevAccounts" toml:"fundDevAccounts"`
	L1ContractsLocator    *artifacts.Locator         `json:"l1ContractsLocator" toml:"l1ContractsLocator"`
	L2ContractsLocator    *artifacts.Locator         `json:"l2ContractsLocator" toml:"l2ContractsLocator"`
	Chains                []*ChainIntent             `json:"chains" toml:"chains"`
	GlobalDeployOverrides map[string]any             `json:"globalDeployOverrides" toml:"globalDeployOverrides"`
	UseInterop            bool                       `json:"useInterop" toml:"useInterop"`

	// L1DevGenesisParams is optional. This may be used to customize the L1 genesis when
	// the deployer output is directed to produce a L1 genesis state for development.
	L1DevGenesisParams *L1DevGenesisParams `json:"l1DevGenesisParams"`
}

func NewIntent

func NewIntent(configType IntentType, l1ChainId uint64, l2ChainIds []common.Hash) (intent Intent, err error)

func NewIntentCustom

func NewIntentCustom(l1ChainId uint64, l2ChainIds []common.Hash) (Intent, error)

Sets all Intent fields to their zero value with the expectation that the user will populate the values before running 'apply'

func NewIntentStandard

func NewIntentStandard(l1ChainId uint64, l2ChainIds []common.Hash) (Intent, error)

func NewIntentStandardOverrides

func NewIntentStandardOverrides(l1ChainId uint64, l2ChainIds []common.Hash) (Intent, error)

func (*Intent) Chain

func (c *Intent) Chain(id common.Hash) (*ChainIntent, error)

func (*Intent) Check

func (c *Intent) Check() error

func (*Intent) Clone added in v1.19.5

func (c *Intent) Clone() (*Intent, error)

Clone returns a deep copy of the intent, detached from the receiver's pointers.

func (*Intent) L1ChainIDBig

func (c *Intent) L1ChainIDBig() *big.Int

func (*Intent) WriteToFile

func (c *Intent) WriteToFile(path string) error

type IntentType

type IntentType string
const (
	IntentTypeStandard          IntentType = "standard"
	IntentTypeCustom            IntentType = "custom"
	IntentTypeStandardOverrides IntentType = "standard-overrides"
)

type L1BlockRefJSON

type L1BlockRefJSON struct {
	Hash       common.Hash    `json:"hash"`
	ParentHash common.Hash    `json:"parentHash"`
	Number     hexutil.Uint64 `json:"number"`
	Time       hexutil.Uint64 `json:"timestamp"`
}

func BlockRefJsonFromBlockRef

func BlockRefJsonFromBlockRef(br *eth.BlockRef) *L1BlockRefJSON

func BlockRefJsonFromHeader

func BlockRefJsonFromHeader(h *types.Header) *L1BlockRefJSON

func (*L1BlockRefJSON) ToBlockRef

func (b *L1BlockRefJSON) ToBlockRef() *eth.BlockRef

type L1DevGenesisBlockParams

type L1DevGenesisBlockParams struct {
	// Warning: the genesis timestamp will default to time.Now().
	Timestamp uint64 `json:"timestamp"`
	// Gas limit, uses default if 0
	GasLimit uint64 `json:"gasLimit"`
	// Optional. Dencun is always active in L1 dev genesis, so 0 is used as-is if not modified.
	// This may be used to start the chain with high blob fees.
	ExcessBlobGas uint64 `json:"excessBlobGas"`
}

type L1DevGenesisParams

type L1DevGenesisParams struct {
	// BlockParams is the set of genesis-block parameters to use.
	BlockParams L1DevGenesisBlockParams `json:"blockParams" toml:"blockParams"`

	// PragueTimeOffset configures Prague (aka Pectra) to be activated at the given time after L1 dev genesis time.
	PragueTimeOffset *uint64 `json:"pragueTimeOffset" toml:"pragueTimeOffset"`

	// OsakaTimeOffset configures Osaka (the EL changes in the Fusaka Ethereum fork) to be
	// activated at the given time after L1 dev genesis time.
	OsakaTimeOffset *uint64 `json:"osakaTimeOffset" toml:"osakaTimeOffset"`

	// BPO1TimeOffset configures the BPO1 fork to be activated at the given time after L1 dev
	// genesis time.
	BPO1TimeOffset *uint64 `json:"bpo1TimeOffset" toml:"bpo1TimeOffset"`

	// BPO2TimeOffset configures the BPO2 fork to be activated at the given time after L1 dev
	// genesis time.
	BPO2TimeOffset *uint64 `json:"bpo2TimeOffset" toml:"bpo2TimeOffset"`

	// BPO3TimeOffset configures the BPO3 fork to be activated at the given time after L1 dev
	// genesis time.
	BPO3TimeOffset *uint64 `json:"bpo3TimeOffset" toml:"bpo3TimeOffset"`

	// BPO4TimeOffset configures the BPO4 fork to be activated at the given time after L1 dev
	// genesis time.
	BPO4TimeOffset *uint64 `json:"bpo4TimeOffset" toml:"bpo4TimeOffset"`

	// BPO5TimeOffset configures the BPO5 fork to be activated at the given time after L1 dev
	// genesis time.
	BPO5TimeOffset *uint64 `json:"bpo5TimeOffset" toml:"bpo5TimeOffset"`

	// AmsterdamTimeOffset configures Amsterdam (the EL changes in the Glamsterdam Ethereum
	// fork) to be activated at the given time after L1 dev genesis time.
	AmsterdamTimeOffset *uint64 `json:"amsterdamTimeOffset" toml:"amsterdamTimeOffset"`

	BlobSchedule *params.BlobScheduleConfig `json:"blobSchedule"`

	// Prefund is a map of addresses to balances (in wei), to prefund in the L1 dev genesis state.
	// This is independent of the "Prefund" functionality that may fund a default 20 test accounts.
	Prefund map[common.Address]*hexutil.U256 `json:"prefund" toml:"prefund"`
}

type L2DevGenesisParams

type L2DevGenesisParams struct {
	// Prefund is a map of addresses to balances (in wei), to prefund in the L2 dev genesis state.
	// This is independent of the "Prefund" functionality that may fund a default 20 test accounts.
	Prefund map[common.Address]*hexutil.U256 `json:"prefund" toml:"prefund"`
}

type PreparedArtifact added in v1.19.5

type PreparedArtifact struct {
	Locator       *artifacts.Locator `json:"locator"`
	ContentDigest common.Hash        `json:"contentDigest"`
}

PreparedArtifact binds an artifact locator to the bundle contents resolved during prepare.

type PreparedChainState added in v1.19.5

type PreparedChainState struct {
	ID common.Hash `json:"id"`

	addresses.OpChainContracts

	StartBlock  *L1BlockRefJSON `json:"startBlock"`
	GenesisTime *hexutil.Uint64 `json:"genesisTime"`
}

PreparedChainState freezes prediction output and timing for one undeployed chain.

type PreparedDeployment added in v1.19.5

type PreparedDeployment struct {
	Intent      *Intent               `json:"intent"`
	Deployer    common.Address        `json:"deployer"`
	OPCM        common.Address        `json:"opcm"`
	L1Artifacts PreparedArtifact      `json:"l1Artifacts"`
	L2Artifacts PreparedArtifact      `json:"l2Artifacts"`
	Chains      []*PreparedChainState `json:"chains"`
}

PreparedDeployment freezes the inputs and predictions for chains awaiting deployment.

func (*PreparedDeployment) Chain added in v1.19.5

Chain returns the frozen state for a chain included in the prepared deployment.

func (*PreparedDeployment) Clone added in v1.19.5

Clone returns a deep copy of the prepared deployment, detached from the receiver's pointers.

type StartingAnchorProposal added in v1.19.5

type StartingAnchorProposal struct {
	Root             common.Hash    `json:"root"`
	L2SequenceNumber hexutil.Uint64 `json:"l2SequenceNumber"`
}

StartingAnchorProposal is the committed starting-anchor proposal for a permissionless chain.

type State

type State struct {
	// Version versions the state so we can update it later.
	Version int `json:"version"`

	// OpDeployerVersion is the version of op-deployer that was used to create the state
	OpDeployerVersion string `json:"opDeployerVersion"`

	// Create2Salt is the salt used for CREATE2 deployments.
	Create2Salt common.Hash `json:"create2Salt"`

	// PreparedDeployment freezes inputs and predictions for chains awaiting deployment.
	// Values committed by other stages, such as Prestate and StartingAnchorRoot, remain in ChainState.
	PreparedDeployment *PreparedDeployment `json:"preparedDeployment,omitempty"`

	// AppliedIntent contains the chain intent that was last
	// successfully applied. It is diffed against new intent
	// in order to determine what deployment steps to take.
	// This field is nil for new deployments.
	AppliedIntent *Intent `json:"appliedIntent"`

	// InteropDepSet contains the interop dependency set generated from all intent chains during prepare.
	InteropDepSet *depset.StaticConfigDependencySet `json:"interopDepSet,omitempty"`

	// SuperchainDeployment contains the addresses of the Superchain
	// deployment. It only contains the proxies because the implementations
	// can be looked up on chain.
	SuperchainDeployment *addresses.SuperchainContracts `json:"superchainContracts"`

	// SuperchainRoles contains the addresses of the Superchain roles.
	SuperchainRoles *addresses.SuperchainRoles `json:"superchainRoles"`

	// ImplementationsDeployment contains the addresses of the common implementation
	// contracts required for the Superchain to function.
	ImplementationsDeployment *addresses.ImplementationsContracts `json:"implementationsDeployment"`

	// SP1Verifier is the raw verifier selected when deploying the implementations bundle.
	SP1Verifier *common.Address `json:"sp1Verifier,omitempty"`

	// Chains contains data about L2 chain deployments.
	Chains []*ChainState `json:"opChainDeployments"`

	// L1StateDump contains the complete L1 state dump of the deployment.
	L1StateDump *GzipData[foundry.ForgeAllocs] `json:"l1StateDump"`

	// L1DevGenesis contains the dev L1 genesis, and may be nil if this is not a genesis-strategy deployment.
	// Warning: the Allocs part of the genesis is not included. Instead, the stateHash attribute is set.
	// The allocs are included in L1StateDump.
	// The stateHash can be used for consistency checks and faster block-hash computation.
	L1DevGenesis *core.Genesis `json:"-"`

	// DeploymentCalldata contains the calldata of each transaction in the deployment. This is only
	// populated if apply is called with --deployment-target=calldata.
	DeploymentCalldata []broadcaster.CalldataDump
}

State contains the data needed to recreate the deployment as it progresses and once it is fully applied.

func (*State) Chain

func (s *State) Chain(id common.Hash) (*ChainState, error)

func (*State) CheckL1PredictInputs added in v1.19.5

func (s *State) CheckL1PredictInputs(deployer common.Address, opcm common.Address) error

CheckL1PredictInputs verifies that the deployer and OPCM match the values pinned during the prepare dry-run. States outside the prepare flow have no snapshot.

func (*State) CheckNotApplied added in v1.19.5

func (s *State) CheckNotApplied() error

CheckNotApplied returns an error if the state was produced by the apply pipeline.

func (*State) CheckNotPrepared added in v1.19.5

func (s *State) CheckNotPrepared() error

CheckNotPrepared returns an error if the state was produced by the prepare pipeline.

func (*State) EnsureCreate2Salt added in v1.19.5

func (s *State) EnsureCreate2Salt() error

EnsureCreate2Salt generates a random CREATE2 salt if one has not been set yet. If a salt has been already set then it is preserved.

func (*State) IsChainDeployed added in v1.19.5

func (s *State) IsChainDeployed(id common.Hash) bool

IsChainDeployed reports whether the chain's addresses have been broadcast. States from older pipelines have no flag and are treated as deployed, any unknown chain is treated as not yet deployed.

func (*State) PinChainAnchor added in v1.19.5

func (s *State) PinChainAnchor(id common.Hash, anchor *L1BlockRefJSON, genesisTime hexutil.Uint64)

PinChainAnchor records a chain's L1 anchor block and derived L2 genesis time. Downstream stages must reuse this pair so generated artifacts agree and reruns remain idempotent. New entries are marked undeployed, while updates preserve fields written by other stages.

func (*State) SetChainContracts added in v1.19.5

func (s *State) SetChainContracts(id common.Hash, contracts addresses.OpChainContracts, deployed bool)

SetChainContracts records the L1 contract addresses for a chain. It creates the chain entry if it does not exist and otherwise updates it in place, preserving any other fields already set by other stages. deployed indicates whether the addresses have been already broadcast or are just predicted addresses from the prepare stage.

func (*State) WriteToFile

func (s *State) WriteToFile(path string) error

type SuperchainProofParams

type SuperchainProofParams struct {
	WithdrawalDelaySeconds          uint64      `json:"faultGameWithdrawalDelay" toml:"faultGameWithdrawalDelay"`
	MinProposalSizeBytes            uint64      `json:"preimageOracleMinProposalSize" toml:"preimageOracleMinProposalSize"`
	ChallengePeriodSeconds          uint64      `json:"preimageOracleChallengePeriod" toml:"preimageOracleChallengePeriod"`
	ProofMaturityDelaySeconds       uint64      `json:"proofMaturityDelaySeconds" toml:"proofMaturityDelaySeconds"`
	DisputeGameFinalityDelaySeconds uint64      `json:"disputeGameFinalityDelaySeconds" toml:"disputeGameFinalityDelaySeconds"`
	DisputeMaxGameDepth             uint64      `json:"faultGameMaxDepth" toml:"faultGameMaxDepth"`
	DisputeSplitDepth               uint64      `json:"faultGameSplitDepth" toml:"faultGameSplitDepth"`
	DisputeClockExtension           uint64      `json:"faultGameClockExtension" toml:"faultGameClockExtension"`
	DisputeMaxClockDuration         uint64      `json:"faultGameMaxClockDuration" toml:"faultGameMaxClockDuration"`
	MIPSVersion                     uint64      `json:"mipsVersion" toml:"mipsVersion"`
	DevFeatureBitmap                common.Hash `json:"devFeatureBitmap" toml:"devFeatureBitmap"`
}

type VMType

type VMType string

func (VMType) MipsVersion

func (v VMType) MipsVersion() uint64

type ZKDisputeGameParams added in v1.17.0

type ZKDisputeGameParams struct {
	AbsolutePrestate     common.Hash  `json:"absolutePrestate" toml:"absolutePrestate"`
	MaxChallengeDuration uint64       `json:"maxChallengeDuration" toml:"maxChallengeDuration"`
	MaxProveDuration     uint64       `json:"maxProveDuration" toml:"maxProveDuration"`
	ChallengerBond       *hexutil.Big `json:"challengerBond" toml:"challengerBond"`
}

ZKDisputeGameParams holds the configuration for a ZK dispute game in the upgrade pipeline.

Jump to

Keyboard shortcuts

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