app

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2024 License: GPL-3.0 Imports: 121 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Bech32HRP is the human-readable-part of the Bech32 address format.
	Bech32HRP = "omni"
)
View Source
const Name = "halo"

Variables

This section is empty.

Functions

func LoadCometFilePV

func LoadCometFilePV(file string) (crypto.PrivKey, error)

LoadCometFilePV loads a CometBFT privval file and returns the private key.

func NewCmtLogger

func NewCmtLogger(ctx context.Context, levelStr string) (cmtlog.Logger, error)

func Rollback

func Rollback(ctx context.Context, cfg Config, rCfg RollbackConfig) error

func Run

func Run(ctx context.Context, cfg Config) error

Run runs the halo client until the context is canceled.

func Start

func Start(ctx context.Context, cfg Config) (<-chan error, func(context.Context) error, error)

Start starts the halo client returning a stop function or an error.

Note that the original context used to start the app must be canceled first before calling the stop function and a fresh context should be passed into the stop function.

Types

type App

type App struct {
	*runtime.App

	// keepers
	AccountKeeper         authkeeper.AccountKeeper
	BankKeeper            bankkeeper.Keeper
	StakingKeeper         *stakingkeeper.Keeper
	SlashingKeeper        slashingkeeper.Keeper
	DistrKeeper           distrkeeper.Keeper
	ConsensusParamsKeeper consensuskeeper.Keeper
	EVMEngKeeper          *evmengkeeper.Keeper
	AttestKeeper          *attestkeeper.Keeper
	ValSyncKeeper         *valsynckeeper.Keeper
	RegistryKeeper        registrykeeper.Keeper
	EvidenceKeeper        evidencekeeper.Keeper
	UpgradeKeeper         *upgradekeeper.Keeper

	SlashingEventProc evmslashing.EventProcessor
	StakingEventProc  evmstaking.EventProcessor
	UpgradeEventProc  evmupgrade.EventProcessor
	// contains filtered or unexported fields
}

App extends an ABCI application, but with most of its parameters exported. They are exported for convenience in creating helper functions, as object capabilities aren't needed for testing.

func (App) ExportAppStateAndValidators

func (App) ExportAppStateAndValidators(_ bool, _, _ []string) (servertypes.ExportedApp, error)

func (App) LegacyAmino

func (App) LegacyAmino() *codec.LegacyAmino

func (App) SetCometAPI

func (a App) SetCometAPI(api comet.API)

SetCometAPI sets the comet API client. TODO(corver): Figure out how to use depinject to set this.

func (App) SimulationManager

func (App) SimulationManager() *module.SimulationManager

SimulationManager implements the SimulationApp interface.

type Config

type Config struct {
	halocfg.Config
	Comet cmtcfg.Config
}

Config wraps the halo (app) and comet (client) configurations.

func (Config) BackendType

func (c Config) BackendType() dbm.BackendType

BackendType returns the halo config backend type or the comet backend type otherwise.

type RollbackConfig

type RollbackConfig struct {
	RemoveCometBlock bool
}

func DefaultRollbackConfig

func DefaultRollbackConfig() RollbackConfig

Jump to

Keyboard shortcuts

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