Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ABCI ¶ added in v0.50.0
type ABCI interface { // Info returns application info Info(*abci.InfoRequest) (*abci.InfoResponse, error) // Query returns application state Query(context.Context, *abci.QueryRequest) (*abci.QueryResponse, error) // CheckTx validate a tx for the mempool CheckTx(*abci.CheckTxRequest) (*abci.CheckTxResponse, error) // InitChain Initialize blockchain w validators/other info from CometBFT InitChain(*abci.InitChainRequest) (*abci.InitChainResponse, error) PrepareProposal(*abci.PrepareProposalRequest) (*abci.PrepareProposalResponse, error) ProcessProposal(*abci.ProcessProposalRequest) (*abci.ProcessProposalResponse, error) // FinalizeBlock deliver the decided block with its txs to the Application FinalizeBlock(*abci.FinalizeBlockRequest) (*abci.FinalizeBlockResponse, error) // ExtendVote create application specific vote extension ExtendVote(context.Context, *abci.ExtendVoteRequest) (*abci.ExtendVoteResponse, error) // VerifyVoteExtension verify application's vote extension data VerifyVoteExtension(*abci.VerifyVoteExtensionRequest) (*abci.VerifyVoteExtensionResponse, error) // Commit the state and return the application Merkle root hash Commit() (*abci.CommitResponse, error) // ListSnapshots list available snapshots ListSnapshots(*abci.ListSnapshotsRequest) (*abci.ListSnapshotsResponse, error) // OfferSnapshot offer a snapshot to the application OfferSnapshot(*abci.OfferSnapshotRequest) (*abci.OfferSnapshotResponse, error) // LoadSnapshotChunk load a snapshot chunk LoadSnapshotChunk(*abci.LoadSnapshotChunkRequest) (*abci.LoadSnapshotChunkResponse, error) // ApplySnapshotChunk apply a snapshot chunk ApplySnapshotChunk(*abci.ApplySnapshotChunkRequest) (*abci.ApplySnapshotChunkResponse, error) }
ABCI is an interface that enables any finite, deterministic state machine to be driven by a blockchain-based replication engine via the ABCI.
type AppCreator ¶
type AppCreator[T Application] func(log.Logger, corestore.KVStoreWithBatch, io.Writer, AppOptions) T
AppCreator is a function that allows us to lazily initialize an application using various configurations.
type AppExporter ¶
type AppExporter func( logger log.Logger, db corestore.KVStoreWithBatch, traceWriter io.Writer, height int64, forZeroHeight bool, jailAllowedAddrs []string, opts AppOptions, modulesToExport []string, ) (ExportedApp, error)
AppExporter is a function that dumps all app state to JSON-serializable structure and returns the current validator set.
type AppOptions ¶
type AppOptions = server.DynamicConfig
AppOptions defines an interface that is passed into an application constructor, typically used to set BaseApp options that are either supplied via config file or through CLI arguments/flags. The underlying implementation is defined by the server package and is typically implemented via a Viper literal defined on the server Context. Note, casting Get calls may not yield the expected types and could result in type assertion errors. It is recommend to either use the cast package or perform manual conversion for safety.
type Application ¶
type Application interface { ABCI RegisterAPIRoutes(*api.Server, config.APIConfig) // RegisterGRPCServer registers gRPC services directly with the gRPC // server. RegisterGRPCServer(grpc.Server) // RegisterTxService registers the gRPC Query service for tx (such as tx // simulation, fetching txs by hash...). RegisterTxService(client.Context) // RegisterTendermintService registers the gRPC Query service for CometBFT queries. RegisterTendermintService(client.Context) // RegisterNodeService registers the node gRPC Query service. RegisterNodeService(client.Context, config.Config) // CommitMultiStore return the multistore instance CommitMultiStore() storetypes.CommitMultiStore // SnapshotManager return the snapshot manager SnapshotManager() *snapshots.Manager // ValidatorKeyProvider returns a function that generates a validator key ValidatorKeyProvider() func() (cmtcrypto.PrivKey, error) // Close is called in start cmd to gracefully cleanup resources. // Must be safe to be called multiple times. Close() error }
Application defines an application interface that wraps abci.Application. The interface defines the necessary contracts to be implemented in order to fully bootstrap and start an application.
type ExportedApp ¶
type ExportedApp struct { // AppState is the application state as JSON. AppState json.RawMessage // Validators is the exported validator set. Validators []sdk.GenesisValidator // Height is the app's latest block height. Height int64 // ConsensusParams are the exported consensus params for ABCI. ConsensusParams cmtproto.ConsensusParams }
ExportedApp represents an exported app state, along with validators, consensus params and latest app height.