github.com/cosmos/cosmos-sdk@v0.50.10/server/types/abci.go (about) 1 package types 2 3 import ( 4 "context" 5 6 abci "github.com/cometbft/cometbft/abci/types" 7 ) 8 9 // ABCI is an interface that enables any finite, deterministic state machine 10 // to be driven by a blockchain-based replication engine via the ABCI. 11 type ABCI interface { 12 // Info/Query Connection 13 Info(*abci.RequestInfo) (*abci.ResponseInfo, error) // Return application info 14 Query(context.Context, *abci.RequestQuery) (*abci.ResponseQuery, error) // Query for state 15 16 // Mempool Connection 17 CheckTx(*abci.RequestCheckTx) (*abci.ResponseCheckTx, error) // Validate a tx for the mempool 18 19 // Consensus Connection 20 InitChain(*abci.RequestInitChain) (*abci.ResponseInitChain, error) // Initialize blockchain w validators/other info from CometBFT 21 PrepareProposal(*abci.RequestPrepareProposal) (*abci.ResponsePrepareProposal, error) 22 ProcessProposal(*abci.RequestProcessProposal) (*abci.ResponseProcessProposal, error) 23 // Deliver the decided block with its txs to the Application 24 FinalizeBlock(*abci.RequestFinalizeBlock) (*abci.ResponseFinalizeBlock, error) 25 // Create application specific vote extension 26 ExtendVote(context.Context, *abci.RequestExtendVote) (*abci.ResponseExtendVote, error) 27 // Verify application's vote extension data 28 VerifyVoteExtension(*abci.RequestVerifyVoteExtension) (*abci.ResponseVerifyVoteExtension, error) 29 // Commit the state and return the application Merkle root hash 30 Commit() (*abci.ResponseCommit, error) 31 32 // State Sync Connection 33 ListSnapshots(*abci.RequestListSnapshots) (*abci.ResponseListSnapshots, error) // List available snapshots 34 OfferSnapshot(*abci.RequestOfferSnapshot) (*abci.ResponseOfferSnapshot, error) // Offer a snapshot to the application 35 LoadSnapshotChunk(*abci.RequestLoadSnapshotChunk) (*abci.ResponseLoadSnapshotChunk, error) // Load a snapshot chunk 36 ApplySnapshotChunk(*abci.RequestApplySnapshotChunk) (*abci.ResponseApplySnapshotChunk, error) // Apply a shapshot chunk 37 }