Documentation ¶
Overview ¶
Server Defines types and interfaces which are shared between Consensus, Appmanager and Stf This package is not meant to be used directly by modules instead if an advanced user would like to create a custom server or replace a component in the server they will need to use the app package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnyResolver ¶
type AnyResolver = interface {
Resolve(typeUrl string) (transaction.Msg, error)
}
AnyResolver defines the interface for resolving interfaces This is used to avoid the gogoproto import in core
type BlockRequest ¶
type BlockRequest[T transaction.Tx] struct { Height uint64 Time time.Time Hash []byte ChainId string AppHash []byte Txs []T // IsGenesis indicates if this block is the first block of the chain. IsGenesis bool }
BlockRequest defines the request structure for a block coming from consensus server to the state transition function.
type BlockResponse ¶
type BlockResponse struct { ValidatorUpdates []appmodulev2.ValidatorUpdate PreBlockEvents []event.Event BeginBlockEvents []event.Event TxResults []TxResult EndBlockEvents []event.Event }
BlockResponse defines the response structure for a block coming from the state transition function to consensus server.
type DynamicConfig ¶
DynamicConfig defines an interface for configuration that can be dynamically fetched at runtime by an arbitrary key.
type InterfaceRegistry ¶
type InterfaceRegistry interface { AnyResolver ListImplementations(ifaceTypeURL string) []string ListAllInterfaces() []string }
InterfaceRegistry defines the interface for resolving interfaces The interface registry is used to resolve interfaces from type URLs, this is only used for the server and not for modules
type TxResult ¶
type TxResult struct { // Events produced by the transaction. Events []event.Event // Response messages produced by the transaction. Resp []transaction.Msg // Error produced by the transaction. Error error // Code produced by the transaction. // A non-zero code is an error that is either define by the module via the cosmossdk.io/errors/v2 package // or injected through the antehandler along the execution of the transaction. Code uint32 // GasWanted is the maximum units of work we allow this tx to perform. GasWanted uint64 // GasUsed is the amount of gas actually consumed. GasUsed uint64 }
TxResult defines the result of a transaction execution.
type VersionModifier ¶
type VersionModifier interface { SetAppVersion(context.Context, uint64) error AppVersion(context.Context) (uint64, error) }
VersionModifier defines the interface fulfilled by BaseApp which allows getting and setting its appVersion field. This in turn updates the consensus params that are sent to the consensus engine in EndBlock