Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrMissingRollupConfig = errors.New("missing rollup config") ErrMissingL2Genesis = errors.New("missing l2 genesis") ErrInvalidL1Head = errors.New("invalid l1 head") ErrInvalidL2Head = errors.New("invalid l2 head") ErrInvalidL2OutputRoot = errors.New("invalid l2 output root") ErrL1AndL2Inconsistent = errors.New("l1 and l2 options must be specified together or both omitted") ErrInvalidL2Claim = errors.New("invalid l2 claim") ErrInvalidL2ClaimBlock = errors.New("invalid l2 claim block number") ErrDataDirRequired = errors.New("datadir must be specified when in non-fetching mode") ErrNoExecInServerMode = errors.New("exec command must not be set when in server mode") )
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Rollup *rollup.Config
// DataDir is the directory to read/write pre-image data from/to.
//If not set, an in-memory key-value store is used and fetching data must be enabled
DataDir string
// L1Head is the block has of the L1 chain head block
L1Head common.Hash
L1URL string
L1TrustRPC bool
L1RPCKind sources.RPCProviderKind
// L2Head is the l2 block hash contained in the L2 Output referenced by the L2OutputRoot
// TODO(inphi): This can be made optional with hardcoded rollup configs and output oracle addresses by searching the oracle for the l2 output root
L2Head common.Hash
// L2OutputRoot is the agreed L2 output root to start derivation from
L2OutputRoot common.Hash
L2URL string
// L2Claim is the claimed L2 output root to verify
L2Claim common.Hash
// L2ClaimBlockNumber is the block number the claimed L2 output root is from
// Must be above 0 and to be a valid claim needs to be above the L2Head block.
L2ClaimBlockNumber uint64
// L2ChainConfig is the op-geth chain config for the L2 execution engine
L2ChainConfig *params.ChainConfig
// ExecCmd specifies the client program to execute in a separate process.
// If unset, the fault proof client is run in the same process.
ExecCmd string
// ServerMode indicates that the program should run in pre-image server mode and wait for requests.
// No client program is run.
ServerMode bool
// IsCustomChainConfig indicates that the program uses a custom chain configuration
IsCustomChainConfig bool
}
func NewConfig ¶
func NewConfig( rollupCfg *rollup.Config, l2Genesis *params.ChainConfig, l1Head common.Hash, l2Head common.Hash, l2OutputRoot common.Hash, l2Claim common.Hash, l2ClaimBlockNum uint64, ) *Config
NewConfig creates a Config with all optional values set to the CLI default value
func (*Config) FetchingEnabled ¶
Click to show internal directories.
Click to hide internal directories.