refactor: bring cometbft back to v0.38.x family (#25285)

This commit is contained in:
Alex | Interchain Labs
2025-08-29 15:58:04 -04:00
committed by GitHub
parent a37940077e
commit 727faf0484
446 changed files with 15286 additions and 103152 deletions
+15 -15
View File
@@ -3,35 +3,35 @@ package types
import (
"context"
abci "github.com/cometbft/cometbft/v2/abci/types"
abci "github.com/cometbft/cometbft/abci/types"
)
// ABCI is an interface that enables any finite, deterministic state machine
// to be driven by a blockchain-based replication engine via the ABCI.
type ABCI interface {
// Info/Query Connection
Info(*abci.InfoRequest) (*abci.InfoResponse, error) // Return application info
Query(context.Context, *abci.QueryRequest) (*abci.QueryResponse, error) // Query for state
Info(*abci.RequestInfo) (*abci.ResponseInfo, error) // Return application info
Query(context.Context, *abci.RequestQuery) (*abci.ResponseQuery, error) // Query for state
// Mempool Connection
CheckTx(*abci.CheckTxRequest) (*abci.CheckTxResponse, error) // Validate a tx for the mempool
CheckTx(*abci.RequestCheckTx) (*abci.ResponseCheckTx, error) // Validate a tx for the mempool
// Consensus Connection
InitChain(*abci.InitChainRequest) (*abci.InitChainResponse, error) // Initialize blockchain with validators/other info from CometBFT
PrepareProposal(*abci.PrepareProposalRequest) (*abci.PrepareProposalResponse, error)
ProcessProposal(*abci.ProcessProposalRequest) (*abci.ProcessProposalResponse, error)
InitChain(*abci.RequestInitChain) (*abci.ResponseInitChain, error) // Initialize blockchain w validators/other info from CometBFT
PrepareProposal(*abci.RequestPrepareProposal) (*abci.ResponsePrepareProposal, error)
ProcessProposal(*abci.RequestProcessProposal) (*abci.ResponseProcessProposal, error)
// Deliver the decided block with its txs to the Application
FinalizeBlock(*abci.FinalizeBlockRequest) (*abci.FinalizeBlockResponse, error)
FinalizeBlock(*abci.RequestFinalizeBlock) (*abci.ResponseFinalizeBlock, error)
// Create application specific vote extension
ExtendVote(context.Context, *abci.ExtendVoteRequest) (*abci.ExtendVoteResponse, error)
ExtendVote(context.Context, *abci.RequestExtendVote) (*abci.ResponseExtendVote, error)
// Verify application's vote extension data
VerifyVoteExtension(*abci.VerifyVoteExtensionRequest) (*abci.VerifyVoteExtensionResponse, error)
VerifyVoteExtension(*abci.RequestVerifyVoteExtension) (*abci.ResponseVerifyVoteExtension, error)
// Commit the state and return the application Merkle root hash
Commit() (*abci.CommitResponse, error)
Commit() (*abci.ResponseCommit, error)
// State Sync Connection
ListSnapshots(*abci.ListSnapshotsRequest) (*abci.ListSnapshotsResponse, error) // List available snapshots
OfferSnapshot(*abci.OfferSnapshotRequest) (*abci.OfferSnapshotResponse, error) // Offer a snapshot to the application
LoadSnapshotChunk(*abci.LoadSnapshotChunkRequest) (*abci.LoadSnapshotChunkResponse, error) // Load a snapshot chunk
ApplySnapshotChunk(*abci.ApplySnapshotChunkRequest) (*abci.ApplySnapshotChunkResponse, error) // Apply a snapshot chunk
ListSnapshots(*abci.RequestListSnapshots) (*abci.ResponseListSnapshots, error) // List available snapshots
OfferSnapshot(*abci.RequestOfferSnapshot) (*abci.ResponseOfferSnapshot, error) // Offer a snapshot to the application
LoadSnapshotChunk(*abci.RequestLoadSnapshotChunk) (*abci.ResponseLoadSnapshotChunk, error) // Load a snapshot chunk
ApplySnapshotChunk(*abci.RequestApplySnapshotChunk) (*abci.ResponseApplySnapshotChunk, error) // Apply a shapshot chunk
}
+3 -3
View File
@@ -4,8 +4,8 @@ import (
"encoding/json"
"io"
cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v2"
cmttypes "github.com/cometbft/cometbft/v2/types"
cmtproto "github.com/cometbft/cometbft/proto/tendermint/types"
cmttypes "github.com/cometbft/cometbft/types"
dbm "github.com/cosmos/cosmos-db"
"github.com/cosmos/gogoproto/grpc"
"github.com/spf13/cobra"
@@ -56,7 +56,7 @@ type (
// CommitMultiStore returns the multistore instance
CommitMultiStore() storetypes.CommitMultiStore
// Returns the snapshot manager
// SnapshotManager returns the snapshot manager
SnapshotManager() *snapshots.Manager
// Close is called in start cmd to gracefully cleanup resources.