chore: bump TM to v0.35.0 release candidate (#10210)
Integrate Tendermint v0.35.0, including changes to build and test plumbing necessary to make everything build. This change does not update any SDK APIs to make use of new features. Co-authored-by: marbar3778 <marbar3778@yahoo.com> Co-authored-by: tycho garen <garen@tychoish.com> Co-authored-by: M. J. Fromberger <michael.j.fromberger@gmail.com> Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com> Co-authored-by: Callum Waters <cmwaters19@gmail.com>
This commit is contained in:
co-authored by
marbar3778
tycho garen
M. J. Fromberger
Amaury
Callum Waters
parent
3f368577ed
commit
af8ad3d20d
+8
-6
@@ -2,7 +2,6 @@ package simapp
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/golang/mock/gomock"
|
||||
@@ -39,8 +38,9 @@ import (
|
||||
func TestSimAppExportAndBlockedAddrs(t *testing.T) {
|
||||
encCfg := MakeTestEncodingConfig()
|
||||
db := dbm.NewMemDB()
|
||||
logger, _ := log.NewDefaultLogger("plain", "info", false)
|
||||
app := NewSimappWithCustomOptions(t, false, SetupOptions{
|
||||
Logger: log.NewTMLogger(log.NewSyncWriter(os.Stdout)),
|
||||
Logger: logger,
|
||||
DB: db,
|
||||
InvCheckPeriod: 0,
|
||||
EncConfig: encCfg,
|
||||
@@ -59,8 +59,9 @@ func TestSimAppExportAndBlockedAddrs(t *testing.T) {
|
||||
|
||||
app.Commit()
|
||||
|
||||
logger2, _ := log.NewDefaultLogger("plain", "info", false)
|
||||
// Making a new app object with the db, so that initchain hasn't been called
|
||||
app2 := NewSimApp(log.NewTMLogger(log.NewSyncWriter(os.Stdout)), db, nil, true, map[int64]bool{}, DefaultNodeHome, 0, encCfg, EmptyAppOptions{})
|
||||
app2 := NewSimApp(logger2, db, nil, true, map[int64]bool{}, DefaultNodeHome, 0, encCfg, EmptyAppOptions{})
|
||||
_, err := app2.ExportAppStateAndValidators(false, []string{})
|
||||
require.NoError(t, err, "ExportAppStateAndValidators should not have an error")
|
||||
}
|
||||
@@ -73,7 +74,7 @@ func TestGetMaccPerms(t *testing.T) {
|
||||
func TestRunMigrations(t *testing.T) {
|
||||
db := dbm.NewMemDB()
|
||||
encCfg := MakeTestEncodingConfig()
|
||||
logger := log.NewTMLogger(log.NewSyncWriter(os.Stdout))
|
||||
logger, _ := log.NewDefaultLogger("plain", "info", false)
|
||||
app := NewSimApp(logger, db, nil, true, map[int64]bool{}, DefaultNodeHome, 0, encCfg, EmptyAppOptions{})
|
||||
|
||||
// Create a new baseapp and configurator for the purpose of this test.
|
||||
@@ -202,7 +203,7 @@ func TestRunMigrations(t *testing.T) {
|
||||
func TestInitGenesisOnMigration(t *testing.T) {
|
||||
db := dbm.NewMemDB()
|
||||
encCfg := MakeTestEncodingConfig()
|
||||
logger := log.NewTMLogger(log.NewSyncWriter(os.Stdout))
|
||||
logger, _ := log.NewDefaultLogger("plain", "info", false)
|
||||
app := NewSimApp(logger, db, nil, true, map[int64]bool{}, DefaultNodeHome, 0, encCfg, EmptyAppOptions{})
|
||||
ctx := app.NewContext(true, tmproto.Header{Height: app.LastBlockHeight()})
|
||||
|
||||
@@ -246,8 +247,9 @@ func TestInitGenesisOnMigration(t *testing.T) {
|
||||
func TestUpgradeStateOnGenesis(t *testing.T) {
|
||||
encCfg := MakeTestEncodingConfig()
|
||||
db := dbm.NewMemDB()
|
||||
logger, _ := log.NewDefaultLogger("plain", "info", false)
|
||||
app := NewSimappWithCustomOptions(t, false, SetupOptions{
|
||||
Logger: log.NewTMLogger(log.NewSyncWriter(os.Stdout)),
|
||||
Logger: logger,
|
||||
DB: db,
|
||||
InvCheckPeriod: 0,
|
||||
EncConfig: encCfg,
|
||||
|
||||
@@ -6,6 +6,7 @@ import (
|
||||
"bufio"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"net"
|
||||
"os"
|
||||
"path/filepath"
|
||||
@@ -14,8 +15,8 @@ import (
|
||||
tmconfig "github.com/tendermint/tendermint/config"
|
||||
tmos "github.com/tendermint/tendermint/libs/os"
|
||||
tmrand "github.com/tendermint/tendermint/libs/rand"
|
||||
tmtime "github.com/tendermint/tendermint/libs/time"
|
||||
"github.com/tendermint/tendermint/types"
|
||||
tmtime "github.com/tendermint/tendermint/types/time"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/client"
|
||||
"github.com/cosmos/cosmos-sdk/client/flags"
|
||||
@@ -199,11 +200,9 @@ func initTestnetFiles(
|
||||
genBalIterator banktypes.GenesisBalancesIterator,
|
||||
args initArgs,
|
||||
) error {
|
||||
|
||||
if args.chainID == "" {
|
||||
args.chainID = "chain-" + tmrand.NewRand().Str(6)
|
||||
args.chainID = "chain-" + tmrand.Str(6)
|
||||
}
|
||||
|
||||
nodeIDs := make([]string, args.numValidators)
|
||||
valPubKeys := make([]cryptotypes.PubKey, args.numValidators)
|
||||
|
||||
@@ -229,15 +228,15 @@ func initTestnetFiles(
|
||||
gentxsDir := filepath.Join(args.outputDir, "gentxs")
|
||||
|
||||
nodeConfig.SetRoot(nodeDir)
|
||||
nodeConfig.Moniker = nodeDirName
|
||||
nodeConfig.RPC.ListenAddress = "tcp://0.0.0.0:26657"
|
||||
nodeConfig.Mode = tmconfig.ModeValidator
|
||||
|
||||
if err := os.MkdirAll(filepath.Join(nodeDir, "config"), nodeDirPerm); err != nil {
|
||||
_ = os.RemoveAll(args.outputDir)
|
||||
return err
|
||||
}
|
||||
|
||||
nodeConfig.Moniker = nodeDirName
|
||||
|
||||
ip, err := getIP(i, args.startingIPAddress)
|
||||
if err != nil {
|
||||
_ = os.RemoveAll(args.outputDir)
|
||||
@@ -332,7 +331,7 @@ func initTestnetFiles(
|
||||
return err
|
||||
}
|
||||
|
||||
srvconfig.WriteConfigFile(filepath.Join(nodeDir, "config/app.toml"), simappConfig)
|
||||
srvconfig.WriteConfigFile(filepath.Join(nodeDir, "config", "app.toml"), simappConfig)
|
||||
}
|
||||
|
||||
if err := initGenFiles(clientCtx, mbm, args.chainID, genAccounts, genBalances, genFiles, args.numValidators); err != nil {
|
||||
@@ -480,7 +479,7 @@ func writeFile(name string, dir string, contents []byte) error {
|
||||
return err
|
||||
}
|
||||
|
||||
err = tmos.WriteFile(file, contents, 0644)
|
||||
err = ioutil.WriteFile(file, contents, 0644) // nolint: gosec
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package simapp
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"encoding/hex"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
@@ -38,8 +39,8 @@ import (
|
||||
|
||||
// DefaultConsensusParams defines the default Tendermint consensus params used in
|
||||
// SimApp testing.
|
||||
var DefaultConsensusParams = &abci.ConsensusParams{
|
||||
Block: &abci.BlockParams{
|
||||
var DefaultConsensusParams = &tmproto.ConsensusParams{
|
||||
Block: &tmproto.BlockParams{
|
||||
MaxBytes: 200000,
|
||||
MaxGas: 2000000,
|
||||
},
|
||||
@@ -81,7 +82,7 @@ func NewSimappWithCustomOptions(t *testing.T, isCheckTx bool, options SetupOptio
|
||||
t.Helper()
|
||||
|
||||
privVal := mock.NewPV()
|
||||
pubKey, err := privVal.GetPubKey()
|
||||
pubKey, err := privVal.GetPubKey(context.TODO())
|
||||
require.NoError(t, err)
|
||||
// create validator set with single validator
|
||||
validator := tmtypes.NewValidator(pubKey, 1)
|
||||
@@ -122,7 +123,7 @@ func Setup(t *testing.T, isCheckTx bool) *SimApp {
|
||||
t.Helper()
|
||||
|
||||
privVal := mock.NewPV()
|
||||
pubKey, err := privVal.GetPubKey()
|
||||
pubKey, err := privVal.GetPubKey(context.TODO())
|
||||
require.NoError(t, err)
|
||||
|
||||
// create validator set with single validator
|
||||
@@ -245,7 +246,7 @@ func SetupWithGenesisAccounts(t *testing.T, genAccs []authtypes.GenesisAccount,
|
||||
t.Helper()
|
||||
|
||||
privVal := mock.NewPV()
|
||||
pubKey, err := privVal.GetPubKey()
|
||||
pubKey, err := privVal.GetPubKey(context.TODO())
|
||||
require.NoError(t, err)
|
||||
|
||||
// create validator set with single validator
|
||||
@@ -261,7 +262,7 @@ func GenesisStateWithSingleValidator(t *testing.T, app *SimApp) GenesisState {
|
||||
t.Helper()
|
||||
|
||||
privVal := mock.NewPV()
|
||||
pubKey, err := privVal.GetPubKey()
|
||||
pubKey, err := privVal.GetPubKey(context.TODO())
|
||||
require.NoError(t, err)
|
||||
|
||||
// create validator set with single validator
|
||||
|
||||
Reference in New Issue
Block a user