synctest

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2026 License: GPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidELLogLevel              = errors.New("invalid execution client log level")
	ErrInvalidCLLogLevel              = errors.New("invalid consensus client log level")
	ErrInvalidMetricsExporterLogLevel = errors.New("invalid metrics exporter log level")
	ErrInvalidMetricsExporterPort     = errors.New("invalid metrics exporter port")
	ErrInvalidMetricsExporterInterval = errors.New("invalid metrics exporter disk usage interval")
	ErrInvalidEthereumPackageFormat   = errors.New("invalid ethereum package format: expected format 'repo@version'")
	ErrEmptyEthereumPackageComponent  = errors.New("invalid ethereum package format: both repo and version must be non-empty")
)

Config validation errors

View Source
var ErrSyncTimeout = errors.New("sync operation timed out")

ErrSyncTimeout is returned when the sync operation times out

Functions

This section is empty.

Types

type Config

type Config struct {
	CheckInterval         time.Duration
	RunTimeout            time.Duration
	ELClient              string
	CLClient              string
	ELImage               string
	CLImage               string
	ELExtraArgs           []string
	CLExtraArgs           []string
	ELEnvVars             map[string]string // Environment variables for execution layer client
	CLEnvVars             map[string]string // Environment variables for consensus layer client
	Network               string
	EnclaveName           string
	ReportDir             string
	Labels                map[string]string
	ServerURL             string // e.g., "https://api.syncoor.example"
	ServerAuth            string // Bearer token for authentication
	ClientLogs            bool   // Enable EL and CL client log output
	Supernode             bool   // Enable supernode (should only be used with peerdas)
	CheckpointSyncEnabled bool   // Enable checkpoint sync across the network
	CheckpointSyncURL     string // Checkpoint sync URL
	PublicPorts           bool   // Enable public port publishing
	PublicPortEL          uint32 // Public port for execution layer client (default: 8545)
	PublicPortCL          uint32 // Public port for consensus layer client (default: 4000)
	PublicIP              string // Public IP for port publishing (default: 'auto')
	ClientLogsLevelEL     string // Log level for execution layer client (default: 'info')
	ClientLogsLevelCL     string // Log level for consensus layer client (default: 'info')
	EthereumPackage       string // Ethereum package to use (default: 'github.com/ethpandaops/ethereum-package@main')

	// Metrics Exporter Options
	MetricsExporterImage     string `json:"metrics_exporter_image"      yaml:"metrics_exporter_image"`
	MetricsExporterPort      int    `json:"metrics_exporter_port"       yaml:"metrics_exporter_port"`
	MetricsExporterLogLevel  string `json:"metrics_exporter_log_level"  yaml:"metrics_exporter_log_level"`
	MetricsExporterConfigDir string `json:"metrics_exporter_config_dir" yaml:"metrics_exporter_config_dir"`
}

Config contains the configuration for the synctest service

func (*Config) GetMetricsExporterConfig added in v0.2.0

func (c *Config) GetMetricsExporterConfig() map[string]interface{}

GetMetricsExporterConfig returns the metrics exporter configuration

func (*Config) ParseEthereumPackage added in v0.2.0

func (c *Config) ParseEthereumPackage() (string, string, error)

ParseEthereumPackage parses the ethereum package string and returns repo and version

func (*Config) SetDefaults

func (c *Config) SetDefaults()

SetDefaults sets default values for unspecified configuration fields

func (*Config) Validate

func (c *Config) Validate() error

Validate validates the configuration

type ContainerCrashError

type ContainerCrashError struct {
	ServiceName string
	ServiceType string
	State       string
	ExitCode    int
	Timestamp   time.Time
}

ContainerCrashError represents an error that occurs when a container crashes

func (*ContainerCrashError) Error

func (e *ContainerCrashError) Error() string

Error implements the error interface for ContainerCrashError

type Service

type Service interface {
	Start(ctx context.Context) error
	Stop() error
	WaitForSync(ctx context.Context) error

	// Recovery methods
	EnableRecovery(recovery.Service)
	SaveTempReport(ctx context.Context) error
}

Service defines the interface for the sync test service

func NewService

func NewService(
	log logrus.FieldLogger,
	cfg Config,
	version string,
) Service

NewService creates a new sync test service

Jump to

Keyboard shortcuts

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