server

package
v0.0.0-...-051ef74 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AppStateStore = "app"
	BlockStore    = "block"
	TxStore       = "tx"
	PayloadStore  = "payload"
)
View Source
const GoLevelDBBackend = cmdb.GoLevelDBBackend

Variables

View Source
var DefaultLogger = func() Logger {
	return tmlog.NewTMLogger(tmlog.NewSyncWriter(os.Stdout))
}

Functions

func AddCpuProfileCommandFlags

func AddCpuProfileCommandFlags(cmd *cobra.Command)

func AddDefaultFlags

func AddDefaultFlags(cmd *cobra.Command)

func AddExportCommandFlags

func AddExportCommandFlags(cmd *cobra.Command)

func AddIavlCommandFlags

func AddIavlCommandFlags(cmd *cobra.Command)

func AddInitCommandFlags

func AddInitCommandFlags(cmd *cobra.Command)

func AddProfileRollbackCommandFlags

func AddProfileRollbackCommandFlags(cmd *cobra.Command)

func AddSealCommandFlags

func AddSealCommandFlags(cmd *cobra.Command)

func AddStandaloneCommandFlags

func AddStandaloneCommandFlags(cmd *cobra.Command)

func AddStartCommandFlags

func AddStartCommandFlags(cmd *cobra.Command)

func OpenDB

func OpenDB(name string, config *Config) tmdb.DB

func OpenDBextended

func OpenDBextended(name string, home string, dbtype DbBackendType) tmdb.DB

func StartCpuProfiler

func StartCpuProfiler(config *Config) (func(), error)

Types

type ApiEnabledMask

type ApiEnabledMask uint64

func EnableAllApis

func EnableAllApis() ApiEnabledMask

func (ApiEnabledMask) IsAdminApiEnabled

func (a ApiEnabledMask) IsAdminApiEnabled() bool

type CompositeService

type CompositeService struct {
	service.BaseService
	// contains filtered or unexported fields
}

func NewCompositeService

func NewCompositeService(services ...service.Service) *CompositeService

NewCompositeService creates a new CompositeService with the given services.

func (*CompositeService) OnStart

func (s *CompositeService) OnStart() error

try to start all services, if any fails, stop all already started services and return the error

func (*CompositeService) OnStop

func (s *CompositeService) OnStop()

stop started services

type Config

type Config struct {
	HomeDir                 string
	AbciServerRpc           Endpoint
	AbciServerGrpc          Endpoint
	PeptideCometServerRpc   Endpoint
	PeptideEngineServerRpc  Endpoint
	GenesisConfig           rollup.Genesis
	GenesisTime             time.Time
	CpuProfile              string
	PprofRpc                Endpoint
	DbBackend               DbBackendType
	Logger                  Logger
	L1                      eth.BlockID
	Override                bool
	ChainId                 string
	Output                  *os.File
	BlockTime               time.Duration
	PrometheusRetentionTime int64
	Apis                    ApiEnabledMask
	BlocksInStore           int64
	RollbackBlocks          int64
	RollbackStore           string
	IavlDisableFastNode     bool
	IavlLazyLoading         bool
	// contains filtered or unexported fields
}

func NewConfig

func NewConfig(cmd *cobra.Command) *Config

TODO load config file here and use it as the base config that can be overwritten by cli options

func (*Config) WithAbciServerGrpc

func (c *Config) WithAbciServerGrpc() *Config

func (*Config) WithAbciServerRpc

func (c *Config) WithAbciServerRpc() *Config

func (*Config) WithAdminApi

func (c *Config) WithAdminApi() *Config

func (*Config) WithBlockTime

func (c *Config) WithBlockTime() *Config

func (*Config) WithBlocks

func (c *Config) WithBlocks() *Config

func (*Config) WithChainId

func (c *Config) WithChainId() *Config

func (*Config) WithCpuProfile

func (c *Config) WithCpuProfile() *Config

func (*Config) WithDbBackend

func (c *Config) WithDbBackend() *Config

func (*Config) WithGenesisConfig

func (c *Config) WithGenesisConfig(genesisConfig rollup.Genesis) *Config

func (*Config) WithGenesisTime

func (c *Config) WithGenesisTime() *Config

func (*Config) WithHomeDir

func (c *Config) WithHomeDir() *Config

func (*Config) WithIavlDisableFastNode

func (c *Config) WithIavlDisableFastNode() *Config

func (*Config) WithIavlLazyLoading

func (c *Config) WithIavlLazyLoading() *Config

func (*Config) WithL1

func (c *Config) WithL1() *Config

func (*Config) WithLogger

func (c *Config) WithLogger(logger Logger) *Config

func (*Config) WithOuput

func (c *Config) WithOuput() *Config

func (*Config) WithOverride

func (c *Config) WithOverride() *Config

func (*Config) WithPeptideCometServerRpc

func (c *Config) WithPeptideCometServerRpc() *Config

func (*Config) WithPeptideEngineServerRpc

func (c *Config) WithPeptideEngineServerRpc() *Config

func (*Config) WithPprofRpc

func (c *Config) WithPprofRpc() *Config

func (*Config) WithPrometheusRetentionTime

func (c *Config) WithPrometheusRetentionTime() *Config

func (*Config) WithRollbackBlocks

func (c *Config) WithRollbackBlocks() *Config

func (*Config) WithRollbackStore

func (c *Config) WithRollbackStore() *Config

type DbBackendType

type DbBackendType = cmdb.BackendType

type Endpoint

type Endpoint struct {
	Host     string // host:port
	Protocol string // tcp, unix, etc
}

func NewEndpoint

func NewEndpoint(address string) Endpoint

func (*Endpoint) FullAddress

func (e *Endpoint) FullAddress(proto ...string) string

func (*Endpoint) IsValid

func (e *Endpoint) IsValid() bool

func (*Endpoint) Port

func (e *Endpoint) Port() int64

type Logger

type Logger = tmlog.Logger

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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