Documentation ¶
Index ¶
- Constants
- func Bridges(kern *Kernel) process.Launcher
- func DatabaseLauncher(kern *Kernel) process.Launcher
- func DefaultProcessLaunchers(kern *Kernel, rpcConfig *rpc.RPCConfig, keysConfig *keys.KeysConfig) []process.Launcher
- func GRPCLauncher(kern *Kernel, conf *rpc.ServerConfig, keyConfig *keys.KeysConfig) process.Launcher
- func InfoLauncher(kern *Kernel, conf *rpc.ServerConfig) process.Launcher
- func MetricsLauncher(kern *Kernel, conf *rpc.MetricsConfig) process.Launcher
- func NoConsensusLauncher(kern *Kernel) process.Launcher
- func ProfileLauncher(kern *Kernel, conf *rpc.ServerConfig) process.Launcher
- func StartupLauncher(kern *Kernel) process.Launcher
- func TendermintLauncher(kern *Kernel) process.Launcher
- func Web3Launcher(kern *Kernel, conf *rpc.ServerConfig) process.Launcher
- type Kernel
- func (kern *Kernel) AddExecutionOptions(opts ...execution.Option)
- func (kern *Kernel) AddProcesses(pl ...process.Launcher)
- func (kern *Kernel) Boot() (err error)
- func (kern *Kernel) GRPCListenAddress() net.Addr
- func (kern *Kernel) GetNodeView() (*tendermint.NodeView, error)
- func (kern *Kernel) InfoListenAddress() net.Addr
- func (kern *Kernel) LoadDump(genesisDoc *genesis.GenesisDoc, restoreFile string, silent bool) (err error)
- func (kern *Kernel) LoadExecutionOptionsFromConfig(conf *execution.ExecutionConfig) error
- func (kern *Kernel) LoadKeysFromConfig(conf *keys.KeysConfig) (err error)
- func (kern *Kernel) LoadLoggerFromConfig(conf *logconfig.LoggingConfig) error
- func (kern *Kernel) LoadState(genesisDoc *genesis.GenesisDoc) (err error)
- func (kern *Kernel) LoadTendermintFromConfig(conf *config.BurrowConfig, privVal tmTypes.PrivValidator) (err error)
- func (kern *Kernel) MetricsListenAddress() net.Addr
- func (kern *Kernel) Panic(err error)
- func (kern *Kernel) PrivValidator(validator crypto.Address) (tmTypes.PrivValidator, error)
- func (kern *Kernel) SetKeyClient(client keys.KeyClient)
- func (kern *Kernel) SetKeyStore(store *keys.FilesystemKeyStore)
- func (kern *Kernel) SetLogger(logger *logging.Logger)
- func (kern *Kernel) Shutdown(ctx context.Context) (err error)
- func (kern *Kernel) ShutdownAndExit()
- func (kern *Kernel) String() string
- func (kern *Kernel) WaitForShutdown()
Constants ¶
const ( CooldownTime = 1000 * time.Millisecond ServerShutdownTimeout = 5000 * time.Millisecond LoggingCallerDepth = 5 AccountsRingMutexCount = 100 HiveSmartChainDBName = "hsc_state" )
const ( ProfilingProcessName = "Profiling" DatabaseProcessName = "Database" NoConsensusProcessName = "NoConsensusExecution" TendermintProcessName = "Tendermint" StartupProcessName = "StartupAnnouncer" Web3ProcessName = "rpcConfig/web3" InfoProcessName = "rpcConfig/info" GRPCProcessName = "rpcConfig/GRPC" MetricsProcessName = "rpcConfig/metrics" BridgeHIVEProcessName = "Bridges" )
Variables ¶
This section is empty.
Functions ¶
func DatabaseLauncher ¶
func DefaultProcessLaunchers ¶
func GRPCLauncher ¶
func GRPCLauncher(kern *Kernel, conf *rpc.ServerConfig, keyConfig *keys.KeysConfig) process.Launcher
func InfoLauncher ¶
func InfoLauncher(kern *Kernel, conf *rpc.ServerConfig) process.Launcher
func MetricsLauncher ¶
func MetricsLauncher(kern *Kernel, conf *rpc.MetricsConfig) process.Launcher
func NoConsensusLauncher ¶
Run a single uncoordinated local state
func ProfileLauncher ¶
func ProfileLauncher(kern *Kernel, conf *rpc.ServerConfig) process.Launcher
func StartupLauncher ¶
func TendermintLauncher ¶
func Web3Launcher ¶
func Web3Launcher(kern *Kernel, conf *rpc.ServerConfig) process.Launcher
Types ¶
type Kernel ¶
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 HiveSmartChain is started Logger *logging.Logger Hive *bridges.HiveBridge // contains filtered or unexported fields }
Kernel is the root structure of HiveSmartChain
func LoadKernelFromConfig ¶
func LoadKernelFromConfig(conf *config.BurrowConfig) (*Kernel, error)
LoadKernelFromConfig builds and returns a Kernel based solely on the supplied configuration
func (*Kernel) AddExecutionOptions ¶
AddExecutionOptions extends our execution options
func (*Kernel) AddProcesses ¶
AddProcesses extends the services that we launch at boot
func (*Kernel) GRPCListenAddress ¶
func (*Kernel) GetNodeView ¶
func (kern *Kernel) GetNodeView() (*tendermint.NodeView, error)
GetNodeView builds and returns a wrapper of our tendermint node
func (*Kernel) InfoListenAddress ¶
func (*Kernel) LoadDump ¶
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 ¶
func (kern *Kernel) LoadExecutionOptionsFromConfig(conf *execution.ExecutionConfig) error
LoadExecutionOptionsFromConfig builds the execution options for the kernel
func (*Kernel) LoadKeysFromConfig ¶
func (kern *Kernel) LoadKeysFromConfig(conf *keys.KeysConfig) (err error)
LoadKeysFromConfig sets the keyClient & keyStore based on the given config
func (*Kernel) LoadLoggerFromConfig ¶
func (kern *Kernel) LoadLoggerFromConfig(conf *logconfig.LoggingConfig) error
LoadLoggerFromConfig adds a logging configuration to the kernel
func (*Kernel) LoadState ¶
func (kern *Kernel) LoadState(genesisDoc *genesis.GenesisDoc) (err error)
LoadState starts from scratch or previous chain
func (*Kernel) LoadTendermintFromConfig ¶
func (kern *Kernel) LoadTendermintFromConfig(conf *config.BurrowConfig, privVal tmTypes.PrivValidator) (err error)
LoadTendermintFromConfig loads our consensus engine into the kernel
func (*Kernel) MetricsListenAddress ¶
func (*Kernel) PrivValidator ¶
Generates an in-memory Tendermint PrivValidator (suitable for passing to LoadTendermintFromConfig)
func (*Kernel) SetKeyClient ¶
SetKeyClient explicitly sets the key client
func (*Kernel) SetKeyStore ¶
func (kern *Kernel) SetKeyStore(store *keys.FilesystemKeyStore)
SetKeyStore explicitly sets the key store
func (*Kernel) Shutdown ¶
Shutdown stops the kernel allowing for a graceful shutdown of components in order
func (*Kernel) ShutdownAndExit ¶
func (kern *Kernel) ShutdownAndExit()