Documentation
¶
Index ¶
- Constants
- type ActivationConfig
- type DependencySet
- type DependencySetSource
- type JSONDependencySetLoader
- type LinkCheckFn
- type LinkChecker
- type LinkCheckerImpl
- type LinkerConfig
- type StaticConfigDependency
- type StaticConfigDependencySet
- func (ds *StaticConfigDependencySet) Chains() []eth.ChainID
- func (ds *StaticConfigDependencySet) Dependencies() map[eth.ChainID]*StaticConfigDependency
- func (ds *StaticConfigDependencySet) HasChain(chainID eth.ChainID) bool
- func (ds *StaticConfigDependencySet) LoadDependencySet() (DependencySet, error)
- func (ds *StaticConfigDependencySet) MarshalJSON() ([]byte, error)
- func (ds *StaticConfigDependencySet) MarshalTOML() ([]byte, error)
- func (ds *StaticConfigDependencySet) MessageExpiryWindow() uint64
- func (ds *StaticConfigDependencySet) UnmarshalJSON(data []byte) error
- func (ds *StaticConfigDependencySet) UnmarshalTOML(v interface{}) error
Constants ¶
const MessageExpiryTimeSecondsInterop uint64 = 604800
MessageExpiryTimeSecondsInterop is a post-Interop constant for the minimum age of a message before it can be considered executable.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActivationConfig ¶
type ActivationConfig interface {
// IsInterop returns true if interop is active for the given chain at the
// given timestamp.
// It panics if the chain is not part of the rollup config set.
IsInterop(chainID eth.ChainID, ts uint64) bool
// IsInteropActivationBlock returns true if the given timestamp is the first
// block at which interop is active for the given chain.
// It panics if the chain is not part of the rollup config set.
IsInteropActivationBlock(chainID eth.ChainID, ts uint64) bool
}
ActivationConfig answers per-chain interop activation queries. It is satisfied by the rollup config set kept alongside the dependency set.
type DependencySet ¶
type DependencySet interface {
// Chains returns the list of chains that are part of the dependency set.
Chains() []eth.ChainID
// HasChain determines if a chain is being tracked for interop purposes.
// See CanExecuteAt and CanInitiateAt to check if a chain may message at a given time.
HasChain(chainID eth.ChainID) bool
// MessageExpiryWindow returns the message expiry window to use for this dependency set.
MessageExpiryWindow() uint64
}
DependencySet is an initialized dependency set, ready to answer queries of what is and what is not part of the dependency set.
func FromRegistry ¶
func FromRegistry(chainID eth.ChainID) (DependencySet, error)
FromRegistry loads a dependency set from the superchain-registry. Returns error of type superchain.ErrUnknownChain if the chain is not available in the superchain registry.
func ParseJSONDependencySet ¶
func ParseJSONDependencySet(f io.Reader) (DependencySet, error)
type DependencySetSource ¶
type DependencySetSource interface {
LoadDependencySet() (DependencySet, error)
}
type JSONDependencySetLoader ¶
type JSONDependencySetLoader struct {
Path string
}
JSONDependencySetLoader loads a dependency set from a file-path.
func (*JSONDependencySetLoader) LoadDependencySet ¶
func (j *JSONDependencySetLoader) LoadDependencySet() (DependencySet, error)
type LinkCheckFn ¶
type LinkCheckFn func(execInChain eth.ChainID, execInTimestamp uint64, initChainID eth.ChainID, initTimestamp uint64) bool
LinkCheckFn is a function-type that implements LinkChecker, for testing and other special case definitions
func (LinkCheckFn) CanExecute ¶
type LinkChecker ¶
type LinkChecker interface {
// CanExecute determines if an executing message is valid w.r.t. chain and timestamp constraints.
// I.e. if the chain may be executing messages at the given timestamp,
// from the given chain at the given initiating timestamp.
// I.e. this does not check a full message, it merely checks some linking constraints.
CanExecute(execInChain eth.ChainID, execInTimestamp uint64, initChainID eth.ChainID, initTimestamp uint64) bool
}
type LinkCheckerImpl ¶
type LinkCheckerImpl struct {
// contains filtered or unexported fields
}
LinkCheckerImpl implements a LinkChecker using the provided config
func LinkerFromConfig ¶
func LinkerFromConfig(cfg LinkerConfig) *LinkCheckerImpl
func (*LinkCheckerImpl) CanExecute ¶
type LinkerConfig ¶
type LinkerConfig interface {
ActivationConfig
DependencySet
}
LinkerConfig represents the config dependencies that are needed to create the default LinkChecker implementation LinkCheckerImpl.
type StaticConfigDependency ¶
type StaticConfigDependency struct {
}
type StaticConfigDependencySet ¶
type StaticConfigDependencySet struct {
// contains filtered or unexported fields
}
StaticConfigDependencySet statically declares a DependencySet. It can be used as a DependencySetSource itself, by simply returning the itself when loading the set.
func NewStaticConfigDependencySet ¶
func NewStaticConfigDependencySet(dependencies map[eth.ChainID]*StaticConfigDependency) (*StaticConfigDependencySet, error)
func NewStaticConfigDependencySetWithMessageExpiryOverride ¶
func NewStaticConfigDependencySetWithMessageExpiryOverride(dependencies map[eth.ChainID]*StaticConfigDependency, overrideMessageExpiryWindow uint64) (*StaticConfigDependencySet, error)
NewStaticConfigDependencySetWithMessageExpiryOverride creates a new StaticConfigDependencySet with a message expiry window override. To be used only for testing.
func (*StaticConfigDependencySet) Chains ¶
func (ds *StaticConfigDependencySet) Chains() []eth.ChainID
func (*StaticConfigDependencySet) Dependencies ¶
func (ds *StaticConfigDependencySet) Dependencies() map[eth.ChainID]*StaticConfigDependency
Dependencies returns a deep copy of the dependencies map
func (*StaticConfigDependencySet) HasChain ¶
func (ds *StaticConfigDependencySet) HasChain(chainID eth.ChainID) bool
func (*StaticConfigDependencySet) LoadDependencySet ¶
func (ds *StaticConfigDependencySet) LoadDependencySet() (DependencySet, error)
func (*StaticConfigDependencySet) MarshalJSON ¶
func (ds *StaticConfigDependencySet) MarshalJSON() ([]byte, error)
func (*StaticConfigDependencySet) MarshalTOML ¶
func (ds *StaticConfigDependencySet) MarshalTOML() ([]byte, error)
func (*StaticConfigDependencySet) MessageExpiryWindow ¶
func (ds *StaticConfigDependencySet) MessageExpiryWindow() uint64
func (*StaticConfigDependencySet) UnmarshalJSON ¶
func (ds *StaticConfigDependencySet) UnmarshalJSON(data []byte) error
func (*StaticConfigDependencySet) UnmarshalTOML ¶
func (ds *StaticConfigDependencySet) UnmarshalTOML(v interface{}) error