diff --git a/CHANGELOG.md b/CHANGELOG.md index 146e80a51..e2f45b63a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -58,6 +58,7 @@ older clients. ### API Breaking Changes +* [\#6079](https://github.com/cosmos/cosmos-sdk/pull/6079) Remove `UpgradeOldPrivValFile` (deprecated in Tendermint Core v0.28). * (modules) [\#5664](https://github.com/cosmos/cosmos-sdk/pull/5664) Remove amino `Codec` from simulation `StoreDecoder`, which now returns a function closure in order to unmarshal the key-value pairs. * (x/auth) [\#6029](https://github.com/cosmos/cosmos-sdk/pull/6029) Module accounts have been moved from `x/supply` to `x/auth`. * (x/supply) [\#6010](https://github.com/cosmos/cosmos-sdk/pull/6010) All `x/supply` types and APIs have been moved to `x/bank`. diff --git a/server/start.go b/server/start.go index 4a859b4d7..70aaa7c4e 100644 --- a/server/start.go +++ b/server/start.go @@ -165,8 +165,6 @@ func startInProcess(ctx *Context, appCreator AppCreator) (*node.Node, error) { return nil, err } - UpgradeOldPrivValFile(cfg) - // create & start tendermint node tmNode, err := node.NewNode( cfg, diff --git a/server/tm_cmds.go b/server/tm_cmds.go index 44b0736d3..2772de40a 100644 --- a/server/tm_cmds.go +++ b/server/tm_cmds.go @@ -43,7 +43,6 @@ func ShowValidatorCmd(ctx *Context) *cobra.Command { Short: "Show this node's tendermint validator info", RunE: func(cmd *cobra.Command, args []string) error { cfg := ctx.Config - UpgradeOldPrivValFile(cfg) privValidator := pvm.LoadOrGenFilePV(cfg.PrivValidatorKeyFile(), cfg.PrivValidatorStateFile()) valPubKey, err := privValidator.GetPubKey() @@ -77,7 +76,6 @@ func ShowAddressCmd(ctx *Context) *cobra.Command { RunE: func(cmd *cobra.Command, args []string) error { cfg := ctx.Config - UpgradeOldPrivValFile(cfg) privValidator := pvm.LoadOrGenFilePV( cfg.PrivValidatorKeyFile(), cfg.PrivValidatorStateFile()) valConsAddr := (sdk.ConsAddress)(privValidator.GetAddress()) diff --git a/server/util.go b/server/util.go index 0f4f62945..a42161bcc 100644 --- a/server/util.go +++ b/server/util.go @@ -19,7 +19,6 @@ import ( "github.com/tendermint/tendermint/libs/cli" tmflags "github.com/tendermint/tendermint/libs/cli/flags" "github.com/tendermint/tendermint/libs/log" - pvm "github.com/tendermint/tendermint/privval" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/codec" @@ -217,16 +216,6 @@ func TrapSignal(cleanupFunc func()) { }() } -// UpgradeOldPrivValFile converts old priv_validator.json file (prior to Tendermint 0.28) -// to the new priv_validator_key.json and priv_validator_state.json files. -func UpgradeOldPrivValFile(config *cfg.Config) { - if _, err := os.Stat(config.OldPrivValidatorFile()); !os.IsNotExist(err) { - if oldFilePV, err := pvm.LoadOldFilePV(config.OldPrivValidatorFile()); err == nil { - oldFilePV.Upgrade(config.PrivValidatorKeyFile(), config.PrivValidatorStateFile()) - } - } -} - func skipInterface(iface net.Interface) bool { if iface.Flags&net.FlagUp == 0 { return true // interface down diff --git a/x/genutil/utils.go b/x/genutil/utils.go index b8c0d5313..4aea9d9fd 100644 --- a/x/genutil/utils.go +++ b/x/genutil/utils.go @@ -11,8 +11,6 @@ import ( "github.com/tendermint/tendermint/p2p" "github.com/tendermint/tendermint/privval" tmtypes "github.com/tendermint/tendermint/types" - - "github.com/cosmos/cosmos-sdk/server" ) // ExportGenesisFile creates and writes the genesis configuration to disk. An @@ -54,7 +52,6 @@ func InitializeNodeValidatorFiles(config *cfg.Config) (nodeID string, valPubKey } nodeID = string(nodeKey.ID()) - server.UpgradeOldPrivValFile(config) pvKeyFile := config.PrivValidatorKeyFile() if err := tmos.EnsureDir(filepath.Dir(pvKeyFile), 0777); err != nil {