feat: Update Cosmos SDK to CometBFT v2 (#24837)

Co-authored-by: aljo242 <alex@interchainlabs.io>
This commit is contained in:
Zachary Becker
2025-06-04 17:34:20 +00:00
committed by GitHub
co-authored by aljo242
parent b78a6c660e
commit fd170b5140
341 changed files with 9024 additions and 7892 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ import (
"sync"
"time"
cmtrpcserver "github.com/cometbft/cometbft/rpc/jsonrpc/server"
cmtrpcserver "github.com/cometbft/cometbft/v2/rpc/jsonrpc/server"
gateway "github.com/cosmos/gogogateway"
"github.com/golang/protobuf/proto" //nolint:staticcheck // grpc-gateway uses deprecated golang/protobuf
"github.com/gorilla/handlers"
+1 -1
View File
@@ -3,7 +3,7 @@ package cmd
import (
"context"
cmtcli "github.com/cometbft/cometbft/libs/cli"
cmtcli "github.com/cometbft/cometbft/v2/libs/cli"
"github.com/rs/zerolog"
"github.com/spf13/cobra"
+1 -1
View File
@@ -3,7 +3,7 @@ package server
import (
"context"
abci "github.com/cometbft/cometbft/abci/types"
abci "github.com/cometbft/cometbft/v2/abci/types"
servertypes "github.com/cosmos/cosmos-sdk/server/types"
)
+6 -6
View File
@@ -7,12 +7,12 @@ import (
"strconv"
"strings"
cmtcfg "github.com/cometbft/cometbft/config"
cmtjson "github.com/cometbft/cometbft/libs/json"
"github.com/cometbft/cometbft/node"
"github.com/cometbft/cometbft/p2p"
pvm "github.com/cometbft/cometbft/privval"
cmtversion "github.com/cometbft/cometbft/version"
cmtcfg "github.com/cometbft/cometbft/v2/config"
cmtjson "github.com/cometbft/cometbft/v2/libs/json"
"github.com/cometbft/cometbft/v2/node"
"github.com/cometbft/cometbft/v2/p2p"
pvm "github.com/cometbft/cometbft/v2/privval"
cmtversion "github.com/cometbft/cometbft/v2/version"
"github.com/spf13/cobra"
"sigs.k8s.io/yaml"
+3 -3
View File
@@ -10,9 +10,9 @@ import (
"testing"
"time"
cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1"
cmtcfg "github.com/cometbft/cometbft/config"
cmttypes "github.com/cometbft/cometbft/types"
cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v2"
cmtcfg "github.com/cometbft/cometbft/v2/config"
cmttypes "github.com/cometbft/cometbft/v2/types"
dbm "github.com/cosmos/cosmos-db"
"github.com/rs/zerolog"
"github.com/spf13/viper"
+1 -1
View File
@@ -1,7 +1,7 @@
package server
import (
cmtlog "github.com/cometbft/cometbft/libs/log"
cmtlog "github.com/cometbft/cometbft/v2/libs/log"
"cosmossdk.io/log"
)
+1 -1
View File
@@ -7,7 +7,7 @@ import (
"fmt"
"path/filepath"
abci "github.com/cometbft/cometbft/abci/types"
abci "github.com/cometbft/cometbft/v2/abci/types"
db "github.com/cosmos/cosmos-db"
"google.golang.org/grpc"
"google.golang.org/protobuf/proto"
+1 -1
View File
@@ -6,7 +6,7 @@ import (
"testing"
"time"
abci "github.com/cometbft/cometbft/abci/types"
abci "github.com/cometbft/cometbft/v2/abci/types"
"github.com/stretchr/testify/require"
"cosmossdk.io/log"
+1 -1
View File
@@ -3,7 +3,7 @@ package server
import (
"fmt"
cmtcmd "github.com/cometbft/cometbft/cmd/cometbft/commands"
cmtcmd "github.com/cometbft/cometbft/v2/cmd/cometbft/commands"
"github.com/spf13/cobra"
"github.com/cosmos/cosmos-sdk/client/flags"
+17 -17
View File
@@ -14,21 +14,21 @@ import (
"strings"
"time"
"github.com/cometbft/cometbft/abci/server"
cmtstate "github.com/cometbft/cometbft/api/cometbft/state/v1"
cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1"
cmtcmd "github.com/cometbft/cometbft/cmd/cometbft/commands"
cmtcfg "github.com/cometbft/cometbft/config"
cmtjson "github.com/cometbft/cometbft/libs/json"
"github.com/cometbft/cometbft/node"
"github.com/cometbft/cometbft/p2p"
pvm "github.com/cometbft/cometbft/privval"
"github.com/cometbft/cometbft/proxy"
rpchttp "github.com/cometbft/cometbft/rpc/client/http"
"github.com/cometbft/cometbft/rpc/client/local"
sm "github.com/cometbft/cometbft/state"
"github.com/cometbft/cometbft/store"
cmttypes "github.com/cometbft/cometbft/types"
cmtstate "github.com/cometbft/cometbft/api/cometbft/state/v2"
cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v2"
"github.com/cometbft/cometbft/v2/abci/server"
cmtcmd "github.com/cometbft/cometbft/v2/cmd/cometbft/commands"
cmtcfg "github.com/cometbft/cometbft/v2/config"
cmtjson "github.com/cometbft/cometbft/v2/libs/json"
"github.com/cometbft/cometbft/v2/node"
"github.com/cometbft/cometbft/v2/p2p"
pvm "github.com/cometbft/cometbft/v2/privval"
"github.com/cometbft/cometbft/v2/proxy"
rpchttp "github.com/cometbft/cometbft/v2/rpc/client/http"
"github.com/cometbft/cometbft/v2/rpc/client/local"
sm "github.com/cometbft/cometbft/v2/state"
"github.com/cometbft/cometbft/v2/store"
cmttypes "github.com/cometbft/cometbft/v2/types"
dbm "github.com/cosmos/cosmos-db"
"github.com/hashicorp/go-metrics"
"github.com/spf13/cobra"
@@ -906,7 +906,7 @@ func testnetify(ctx *Context, testnetAppCreator types.AppCreator, db dbm.DB, tra
Signature: []byte{},
}
// Sign the vote, and copy the proto changes from the act of signing to the vote itself
// Sign the vote and copy the proto changes from the act of signing to the vote itself
voteProto := vote.ToProto()
err = privValidator.SignVote(newChainID, voteProto, false)
if err != nil {
@@ -933,7 +933,7 @@ func testnetify(ctx *Context, testnetAppCreator types.AppCreator, db dbm.DB, tra
return nil, err
}
// Create ValidatorSet struct containing just our valdiator.
// Create ValidatorSet struct containing just our validator.
newVal := &cmttypes.Validator{
Address: validatorAddress,
PubKey: userPubKey,
+1 -1
View File
@@ -3,7 +3,7 @@ package types
import (
"context"
abci "github.com/cometbft/cometbft/abci/types"
abci "github.com/cometbft/cometbft/v2/abci/types"
)
// ABCI is an interface that enables any finite, deterministic state machine
+2 -2
View File
@@ -4,8 +4,8 @@ import (
"encoding/json"
"io"
cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1"
cmttypes "github.com/cometbft/cometbft/types"
cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v2"
cmttypes "github.com/cometbft/cometbft/v2/types"
dbm "github.com/cosmos/cosmos-db"
"github.com/cosmos/gogoproto/grpc"
"github.com/spf13/cobra"
+2 -8
View File
@@ -12,10 +12,9 @@ import (
"path/filepath"
"strings"
"syscall"
"time"
cmtcmd "github.com/cometbft/cometbft/cmd/cometbft/commands"
cmtcfg "github.com/cometbft/cometbft/config"
cmtcmd "github.com/cometbft/cometbft/v2/cmd/cometbft/commands"
cmtcfg "github.com/cometbft/cometbft/v2/config"
dbm "github.com/cosmos/cosmos-db"
"github.com/rs/zerolog"
"github.com/spf13/cast"
@@ -263,11 +262,6 @@ func interceptConfigs(rootViper *viper.Viper, customAppTemplate string, customCo
}
defaultCometCfg := cmtcfg.DefaultConfig()
// The SDK is opinionated about those comet values, so we set them here.
// We verify first that the user has not changed them for not overriding them.
if conf.Consensus.TimeoutCommit == defaultCometCfg.Consensus.TimeoutCommit {
conf.Consensus.TimeoutCommit = 5 * time.Second
}
if conf.RPC.PprofListenAddress == defaultCometCfg.RPC.PprofListenAddress {
conf.RPC.PprofListenAddress = "localhost:6060"
}
+1 -1
View File
@@ -10,7 +10,7 @@ import (
"strings"
"testing"
cmtcfg "github.com/cometbft/cometbft/config"
cmtcfg "github.com/cometbft/cometbft/v2/config"
db "github.com/cosmos/cosmos-db"
"github.com/spf13/cobra"
"github.com/spf13/viper"