app

package
v1.6.44 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2022 License: Apache-2.0 Imports: 94 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FlagMasterDomain = "master_domain"

	FlagValidatorKey = "validator_key"
)
View Source
const (
	INITCHAINKEY = "isInitChain"
	FIRSTSHARD   = "1"
)
View Source
const AppName = "ci123"
View Source
const HomeFlag = "home"
View Source
const (
	StoreKey = "main"
)

Variables

View Source
var (
	GasPriceConfig *config.GasPriceConfig
)

Functions

func AppGenStateJSON

func AppGenStateJSON(validators []tmtypes.GenesisValidator) (json.RawMessage, error)

func CreatePVWithKey added in v1.6.8

func CreatePVWithKey(cdc *amino.Codec, validatorKeyStr string) (ed25519.PrivKey, error)

func ExportGenesisFile

func ExportGenesisFile(genDoc *tmtypes.GenesisDoc, genFile string) error

func GenesisStateFromGenDoc

func GenesisStateFromGenDoc(cdc *codec.Codec, genDoc tmtypes.GenesisDoc,
) (genesisState map[string]json.RawMessage, err error)

func GenesisStateFromGenFile

func GenesisStateFromGenFile(cdc *codec.Codec, genFile string) (genesisState map[string]json.RawMessage, genDoc *tmtypes.GenesisDoc, err error)

func GetRDB

func GetRDB(stateDB string, logger log.Logger) (db dbm.DB, err error)

func SetupContext

func SetupContext(ctx *Context, level string) error

Types

type AppCreator

type AppCreator func(home string, logger log.Logger, statedb, traceStore string) (Application, error)

func ConstructAppCreator

func ConstructAppCreator(appFn AppCreatorInit, name string) AppCreator

type AppCreatorInit

type AppCreatorInit func(logger log.Logger, ldb dbm.DB, cdb dbm.DB, writer io.Writer) Application

type AppExporter

type AppExporter func(log.Logger, string, io.Writer, int64, bool, []string, AppOptions) (ExportedApp, error)

AppExporter is a function that dumps all app state to JSON-serializable structure and returns the current validator set.

func ConstructAppExporter

func ConstructAppExporter(name string) AppExporter

type AppExporterInit

type AppExporterInit func(logger log.Logger, ldb dbm.DB, cdb dbm.DB, writer io.Writer) (json.RawMessage, []tmtypes.GenesisValidator, error)

type AppGenTx

type AppGenTx struct {
	// currently takes address as string because unmarshaling Ether address fails
	Address string `json:"address"`
}

type AppInit

type AppInit struct {
	// AppGenState creates the collactor parameters initialization. It takes in a
	// pubkey meant to represent the pubkey of the validator of this machine.
	AppGenState func(validators []types.GenesisValidator) (appState json.RawMessage, err error)

	GetValidator func(pk crypto.PubKey, name string) types.GenesisValidator
}

Core functionality passed from the application to the server init command

func NewAppInit

func NewAppInit() AppInit

type AppOptions added in v1.5.23

type AppOptions interface {
	Get(string) interface{}
}

type Application added in v1.5.28

type Application interface {
	sdk.Application

	// RegisterTxService registers the gRPC Query service for tx (such as tx
	// simulation, fetching txs by hash...).
	RegisterTxService(clientCtx client.Context)
}

func NewApp added in v1.6.3

func NewApp(lg log.Logger, ldb tmdb.DB, cdb tmdb.DB, traceStore io.Writer) Application

type Chain

type Chain struct {
	*baseapp.BaseApp

	// keys to access the substores
	//capKeyMainStore *sdk.KVStoreKey
	//txIndexStore    *sdk.TransientStoreKey
	AccountKeeper        account.AccountKeeper
	AuthKeeper           auth.AuthKeeper
	ParamsKeepr          params.Keeper
	StakingKeeper        keeper2.StakingKeeper
	SupplyKeeper         supply.Keeper
	SlashingKeeper       slashing.Keeper
	MintKeeper           mint.Keeper
	DistrKeeper          distr.Keeper
	InfrastructureKeeper infrastructure.Keeper
	CapabilityKeeper     *capabilitykeeper.Keeper
	ScopedIBCKeeper      capabilitykeeper.ScopedKeeper
	ScopedTransferKeeper capabilitykeeper.ScopedKeeper
	PrestakingKeeper     prestaking.Keeper
	RegistryKeeper       registry.Keeper
	IBCKeeper            ibc.Keeper
	VMKeeper             vm.Keeper
	GravityKeeper        gravity.Keeper
	UpgradeKeeper        upgrade.Keeper
	// contains filtered or unexported fields
}

func NewChain

func NewChain(logger log.Logger, ldb tmdb.DB, cdb tmdb.DB, traceStore io.Writer, baseAppOptions ...func(*baseapp.BaseApp)) *Chain

func (*Chain) BeginBlocker

func (c *Chain) BeginBlocker(ctx types.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock

func (*Chain) EndBlocker

func (c *Chain) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock

func (*Chain) ExportAppStateJSON

func (c *Chain) ExportAppStateJSON() (ExportedApp, error)

func (*Chain) GetSubspace

func (app *Chain) GetSubspace(moduleName string) params.Subspace

NOTE: This is solely to be used for testing purposes.

func (*Chain) InitChainer

func (c *Chain) InitChainer(ctx sdk.Context, req tmabci.RequestInitChain) tmabci.ResponseInitChain

func (*Chain) LoadStartVersion added in v1.6.8

func (app *Chain) LoadStartVersion(height int64) error

func (*Chain) RegisterTxService added in v1.5.28

func (app *Chain) RegisterTxService(clientCtx client.Context)

type Context

type Context struct {
	Config *cfg.Config
	Logger log.Logger
}

func NewContext

func NewContext(config *cfg.Config, logger log.Logger) *Context

func NewDefaultContext

func NewDefaultContext() *Context

type ExportedApp added in v1.5.23

type ExportedApp struct {
	// AppState is the application state as JSON.
	AppState json.RawMessage
	// Validators is the exported validator set.
	Validators []stypes.Validator
	// Height is the app's latest block height.
	Height int64
	// ConsensusParams are the exported consensus params for ABCI.
	ConsensusParams *sdk.ConsensusParams
}

ExportedApp represents an exported app state, along with validators, consensus params and latest app height.

type GenesisState

type GenesisState map[string]json.RawMessage

type GenesisTx

type GenesisTx struct {
	NodeID    string                 `json:"node_id"`
	IP        string                 `json:"ip"`
	Validator types.GenesisValidator `json:"validator"`
	AppGenTx  json.RawMessage        `json:"app_gen_tx"`
}

simple genesis tx

Directories

Path Synopsis
service
Package service is a reverse proxy.
Package service is a reverse proxy.

Jump to

Keyboard shortcuts

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