core

package
v0.34.4 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2021 License: Apache-2.0 Imports: 50 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CooldownTime           = 1000 * time.Millisecond
	ServerShutdownTimeout  = 5000 * time.Millisecond
	LoggingCallerDepth     = 5
	AccountsRingMutexCount = 100
	BurrowDBName           = "burrow_state"
)
View Source
const (
	ProfilingProcessName   = "Profiling"
	DatabaseProcessName    = "Database"
	NoConsensusProcessName = "NoConsensusExecution"
	TendermintProcessName  = "Tendermint"
	StartupProcessName     = "StartupAnnouncer"
	Web3ProcessName        = "rpcConfig/web3"
	InfoProcessName        = "rpcConfig/info"
	GRPCProcessName        = "rpcConfig/GRPC"
	MetricsProcessName     = "rpcConfig/metrics"
)

Variables

This section is empty.

Functions

func DatabaseLauncher added in v0.25.0

func DatabaseLauncher(kern *Kernel) process.Launcher

func DefaultProcessLaunchers added in v0.25.0

func DefaultProcessLaunchers(kern *Kernel, rpcConfig *rpc.RPCConfig, keysConfig *keys.KeysConfig) []process.Launcher

func GRPCLauncher added in v0.25.0

func GRPCLauncher(kern *Kernel, conf *rpc.ServerConfig, keyConfig *keys.KeysConfig) process.Launcher

func InfoLauncher added in v0.25.0

func InfoLauncher(kern *Kernel, conf *rpc.ServerConfig) process.Launcher

func MetricsLauncher added in v0.25.0

func MetricsLauncher(kern *Kernel, conf *rpc.MetricsConfig) process.Launcher

func NoConsensusLauncher added in v0.25.0

func NoConsensusLauncher(kern *Kernel) process.Launcher

Run a single uncoordinated local state

func ProfileLauncher added in v0.25.0

func ProfileLauncher(kern *Kernel, conf *rpc.ServerConfig) process.Launcher

func StartupLauncher added in v0.25.0

func StartupLauncher(kern *Kernel) process.Launcher

func TendermintLauncher added in v0.25.0

func TendermintLauncher(kern *Kernel) process.Launcher

func Web3Launcher added in v0.34.4

func Web3Launcher(kern *Kernel, conf *rpc.ServerConfig) process.Launcher

Types

type Kernel added in v0.18.0

type Kernel struct {
	// Expose these public-facing interfaces to allow programmatic extension of the Kernel by other projects
	Emitter    *event.Emitter
	Service    *rpc.Service
	EthService *web3.EthService
	Launchers  []process.Launcher
	State      *state.State
	Blockchain *bcm.Blockchain
	Node       *tendermint.Node
	Transactor *execution.Transactor
	RunID      simpleuuid.UUID // Time-based UUID randomly generated each time Burrow is started
	Logger     *logging.Logger
	// contains filtered or unexported fields
}

Kernel is the root structure of Burrow

func LoadKernelFromConfig added in v0.25.0

func LoadKernelFromConfig(conf *config.BurrowConfig) (*Kernel, error)

LoadKernelFromConfig builds and returns a Kernel based solely on the supplied configuration

func NewKernel added in v0.18.0

func NewKernel(dbDir string) (*Kernel, error)

NewKernel initializes an empty kernel

func (*Kernel) AddExecutionOptions added in v0.25.0

func (kern *Kernel) AddExecutionOptions(opts ...execution.Option)

AddExecutionOptions extends our execution options

func (*Kernel) AddProcesses added in v0.25.0

func (kern *Kernel) AddProcesses(pl ...process.Launcher)

AddProcesses extends the services that we launch at boot

func (*Kernel) Boot added in v0.18.0

func (kern *Kernel) Boot() (err error)

Boot the kernel starting Tendermint and RPC layers

func (*Kernel) GRPCListenAddress added in v0.25.0

func (kern *Kernel) GRPCListenAddress() net.Addr

func (*Kernel) GetNodeView added in v0.25.0

func (kern *Kernel) GetNodeView() (*tendermint.NodeView, error)

GetNodeView builds and returns a wrapper of our tendermint node

func (*Kernel) InfoListenAddress added in v0.25.0

func (kern *Kernel) InfoListenAddress() net.Addr

func (*Kernel) LoadDump added in v0.25.0

func (kern *Kernel) LoadDump(genesisDoc *genesis.GenesisDoc, restoreFile string, silent bool) (err error)

LoadDump restores chain state from the given dump file

func (*Kernel) LoadExecutionOptionsFromConfig added in v0.25.0

func (kern *Kernel) LoadExecutionOptionsFromConfig(conf *execution.ExecutionConfig) error

LoadExecutionOptionsFromConfig builds the execution options for the kernel

func (*Kernel) LoadKeysFromConfig added in v0.25.0

func (kern *Kernel) LoadKeysFromConfig(conf *keys.KeysConfig) (err error)

LoadKeysFromConfig sets the keyClient & keyStore based on the given config

func (*Kernel) LoadLoggerFromConfig added in v0.25.0

func (kern *Kernel) LoadLoggerFromConfig(conf *logconfig.LoggingConfig) error

LoadLoggerFromConfig adds a logging configuration to the kernel

func (*Kernel) LoadState added in v0.25.0

func (kern *Kernel) LoadState(genesisDoc *genesis.GenesisDoc) (err error)

LoadState starts from scratch or previous chain

func (*Kernel) LoadTendermintFromConfig added in v0.25.0

func (kern *Kernel) LoadTendermintFromConfig(conf *config.BurrowConfig, privVal tmTypes.PrivValidator) (err error)

LoadTendermintFromConfig loads our consensus engine into the kernel

func (*Kernel) MetricsListenAddress added in v0.25.0

func (kern *Kernel) MetricsListenAddress() net.Addr

func (*Kernel) Panic added in v0.20.0

func (kern *Kernel) Panic(err error)

func (*Kernel) PrivValidator added in v0.25.0

func (kern *Kernel) PrivValidator(validator crypto.Address) (tmTypes.PrivValidator, error)

Generates an in-memory Tendermint PrivValidator (suitable for passing to LoadTendermintFromConfig)

func (*Kernel) SetKeyClient added in v0.25.0

func (kern *Kernel) SetKeyClient(client keys.KeyClient)

SetKeyClient explicitly sets the key client

func (*Kernel) SetKeyStore added in v0.25.0

func (kern *Kernel) SetKeyStore(store *keys.FilesystemKeyStore)

SetKeyStore explicitly sets the key store

func (*Kernel) SetLogger added in v0.25.0

func (kern *Kernel) SetLogger(logger *logging.Logger)

SetLogger initializes the kernel with the provided logger

func (*Kernel) Shutdown added in v0.18.0

func (kern *Kernel) Shutdown(ctx context.Context) (err error)

Shutdown stops the kernel allowing for a graceful shutdown of components in order

func (*Kernel) ShutdownAndExit added in v0.25.0

func (kern *Kernel) ShutdownAndExit()

func (*Kernel) String added in v0.25.0

func (kern *Kernel) String() string

func (*Kernel) WaitForShutdown added in v0.18.0

func (kern *Kernel) WaitForShutdown()

Wait for a graceful shutdown

Jump to

Keyboard shortcuts

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