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
+2 -3
View File
@@ -17,8 +17,8 @@ import (
"testing"
"time"
"github.com/cometbft/cometbft/node"
cmtclient "github.com/cometbft/cometbft/rpc/client"
"github.com/cometbft/cometbft/v2/node"
cmtclient "github.com/cometbft/cometbft/v2/rpc/client"
dbm "github.com/cosmos/cosmos-db"
"github.com/spf13/cobra"
"golang.org/x/sync/errgroup"
@@ -381,7 +381,6 @@ func New(l Logger, baseDir string, cfg Config) (*Network, error) {
ctx := server.NewDefaultContext()
cmtCfg := ctx.Config
cmtCfg.Consensus.TimeoutCommit = cfg.TimeoutCommit
// Only allow the first validator to expose an RPC, API and gRPC
// server/client due to CometBFT in-process constraints.
+25 -8
View File
@@ -2,19 +2,20 @@ package network
import (
"context"
"crypto/sha256"
"encoding/json"
"fmt"
"net"
"os"
"path/filepath"
cmtcfg "github.com/cometbft/cometbft/config"
"github.com/cometbft/cometbft/node"
"github.com/cometbft/cometbft/p2p"
pvm "github.com/cometbft/cometbft/privval"
"github.com/cometbft/cometbft/proxy"
"github.com/cometbft/cometbft/rpc/client/local"
cmttime "github.com/cometbft/cometbft/types/time"
cmtcfg "github.com/cometbft/cometbft/v2/config"
"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"
"github.com/cometbft/cometbft/v2/rpc/client/local"
cmttime "github.com/cometbft/cometbft/v2/types/time"
"golang.org/x/sync/errgroup"
"cosmossdk.io/log"
@@ -59,7 +60,23 @@ func startInProcess(cfg Config, val *Validator) error {
Sha256Checksum: []byte{},
}, err
}
return node.ChecksummedGenesisDoc{GenesisDoc: gen, Sha256Checksum: make([]byte, 0)}, nil
genbz, err := gen.AppState.MarshalJSON()
if err != nil {
return node.ChecksummedGenesisDoc{
Sha256Checksum: []byte{},
}, err
}
bz, err := json.Marshal(genbz)
if err != nil {
return node.ChecksummedGenesisDoc{
Sha256Checksum: []byte{},
}, err
}
sum := sha256.Sum256(bz)
return node.ChecksummedGenesisDoc{GenesisDoc: gen, Sha256Checksum: sum[:]}, nil
}
cmtApp := server.NewCometABCIWrapper(app)