Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientType ¶
type ClientType string
ClientType represents supported EL clients.
const ( ClientGeth ClientType = "geth" ClientNethermind ClientType = "nethermind" ClientBesu ClientType = "besu" ClientErigon ClientType = "erigon" ClientNimbus ClientType = "nimbus" ClientReth ClientType = "reth" )
type RPCRollbackSpec ¶
type RPCRollbackSpec struct {
Method RollbackMethodType
RPCMethod string // e.g. "debug_setHead", "debug_resetHead"
}
RPCRollbackSpec describes a client's rollback RPC method and parameter format.
type Registry ¶
type Registry interface {
Get(clientType ClientType) (Spec, error)
Register(spec Spec)
List() []ClientType
}
Registry manages client specifications.
func NewRegistry ¶
func NewRegistry() Registry
NewRegistry creates a registry with all supported clients.
type RollbackMethodType ¶
type RollbackMethodType string
RollbackMethodType identifies how a client performs state rollback.
const ( // RollbackMethodSetHeadHex uses debug_setHead with a hex string param (Geth, Besu). RollbackMethodSetHeadHex RollbackMethodType = "debug_setHead_hex" // RollbackMethodSetHeadInt uses debug_setHead with a raw integer param (Reth). RollbackMethodSetHeadInt RollbackMethodType = "debug_setHead_int" // RollbackMethodResetHeadHash uses debug_resetHead with a block hash param (Nethermind). RollbackMethodResetHeadHash RollbackMethodType = "debug_resetHead_hash" )
type Spec ¶
type Spec interface {
// Type returns the client type.
Type() ClientType
// DefaultImage returns the default Docker image.
DefaultImage() string
// DefaultCommand returns the default command arguments.
DefaultCommand() []string
// GenesisFlag returns the genesis flag format (e.g., "--genesis-file=").
// Returns empty string if client doesn't use a genesis flag (e.g., Erigon uses init container).
GenesisFlag() string
// RequiresInit returns true if client needs init container.
RequiresInit() bool
// InitCommand returns the init container command (if RequiresInit is true).
InitCommand() []string
// DataDir returns the data directory path inside container.
DataDir() string
// GenesisPath returns the genesis file path inside container.
GenesisPath() string
// JWTPath returns the JWT secret file path inside container.
JWTPath() string
// RPCPort returns the JSON-RPC port.
RPCPort() int
// EnginePort returns the Engine API port.
EnginePort() int
// MetricsPort returns the metrics port.
MetricsPort() int
// DefaultEnvironment returns default environment variables for the client.
DefaultEnvironment() map[string]string
// RPCRollbackSpec returns the client's rollback RPC method and parameter format.
// Returns nil if the client does not support rollback.
RPCRollbackSpec() *RPCRollbackSpec
}
Spec provides client-specific container configuration.
func NewErigonSpec ¶
func NewErigonSpec() Spec
NewErigonSpec creates a new Erigon client specification.
func NewNethermindSpec ¶
func NewNethermindSpec() Spec
NewNethermindSpec creates a new Nethermind client specification.
func NewNimbusSpec ¶
func NewNimbusSpec() Spec
NewNimbusSpec creates a new Nimbus client specification.
Click to show internal directories.
Click to hide internal directories.