diff --git a/CHANGELOG.md b/CHANGELOG.md index c26197ffe..48cb2db9f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,20 +1,28 @@ # Changelog +*June 22, 2021* + +## v2.1.0 +This version is based on Cosmos SDK 0.42.6 and Tendermint 0.34.11 which, among other changes, contain state sync-related fixes. + +### Features +- [565](https://github.com/crypto-org-chain/chain-main/pull/565) NFT module query denom by name + *May 18, 2021* ## v2.0.1 -This pre-release version is the same as v2.0.0, but contains an upgrade-critical fix. +This released version is the same as v2.0.0, but contains an upgrade-critical fix. NOTE that the upgrade plan name is still expected to be "v2.0.0". -*WARNING*: DO NOT UPGRADE to this binary yet; the upgrade instructions are to be provided later. +*WARNING*: please follow the upgrade instructions described here: https://crypto.org/docs/getting-started/upgrade_guide.html#the-canis-major-upgrade-guide-v1-to-v2-0-0 ### Bug Fixes -- [552](https://github.com/crypto-org-chain/chain-main/pull/552) nft module store initialized after upgrade +- [552](https://github.com/crypto-org-chain/chain-main/pull/552) NFT module store initialized after upgrade *May 14, 2021* ## v2.0.0 This pre-release version contains the scope of [ADR-003](https://github.com/crypto-org-chain/chain-main/blob/master/doc/architecture/adr-003.md) for the mainnet upgrade. It also upgrades to the latest version of Tendermint (0.34.10). -*WARNING*: DO NOT UPGRADE to this binary yet; the upgrade instructions are to be provided later. +*WARNING*: please follow the upgrade instructions described here: https://crypto.org/docs/getting-started/upgrade_guide.html#the-canis-major-upgrade-guide-v1-to-v2-0-0 ### Breaking changes - [516](https://github.com/crypto-org-chain/chain-main/pull/516) NFT module added diff --git a/app/app.go b/app/app.go index 1081e5f78..f299fb7e0 100644 --- a/app/app.go +++ b/app/app.go @@ -150,6 +150,8 @@ var ( // ChainApp extends an ABCI application, but with most of its parameters exported. // They are exported for convenience in creating helper functions, as object // capabilities aren't needed for testing. +// (Amino is still needed for Ledger at the moment) +// nolint: staticcheck type ChainApp struct { *baseapp.BaseApp legacyAmino *codec.LegacyAmino @@ -499,6 +501,8 @@ func (app *ChainApp) ModuleAccountAddrs() map[string]bool { // // NOTE: This is solely to be used for testing purposes as it may be desirable // for modules to register their own custom testing types. +// (Amino is still needed for Ledger at the moment) +// nolint: staticcheck func (app *ChainApp) LegacyAmino() *codec.LegacyAmino { return app.legacyAmino } @@ -603,6 +607,8 @@ func GetMaccPerms() map[string][]string { } // initParamsKeeper init params keeper and its subspaces +// (Amino is still needed for Ledger at the moment) +// nolint: staticcheck func initParamsKeeper(appCodec codec.BinaryMarshaler, legacyAmino *codec.LegacyAmino, key, tkey sdk.StoreKey) paramskeeper.Keeper { paramsKeeper := paramskeeper.NewKeeper(appCodec, legacyAmino, key, tkey) diff --git a/app/params/encoding.go b/app/params/encoding.go index 698408daf..52a99ec34 100644 --- a/app/params/encoding.go +++ b/app/params/encoding.go @@ -8,6 +8,8 @@ import ( // EncodingConfig specifies the concrete encoding types to use for a given app. // This is provided for compatibility between protobuf and amino implementations. +// (Amino is still needed for Ledger at the moment) +// nolint: staticcheck type EncodingConfig struct { InterfaceRegistry types.InterfaceRegistry Marshaler codec.Marshaler diff --git a/app/types.go b/app/types.go index ff821ab10..f35e9e740 100644 --- a/app/types.go +++ b/app/types.go @@ -10,6 +10,8 @@ import ( // App implements the common methods for a Cosmos SDK-based application // specific blockchain. +// (Amino is still needed for Ledger at the moment) +// nolint: staticcheck type App interface { // The assigned name of the app. Name() string diff --git a/cmd/chain-maind/app/app.go b/cmd/chain-maind/app/app.go index f71dcc224..5a22df515 100644 --- a/cmd/chain-maind/app/app.go +++ b/cmd/chain-maind/app/app.go @@ -53,7 +53,6 @@ func NewRootCmd() (*cobra.Command, params.EncodingConfig) { WithLegacyAmino(encodingConfig.Amino). WithInput(os.Stdin). WithAccountRetriever(types.AccountRetriever{}). - WithBroadcastMode(flags.BroadcastBlock). WithHomeDir(app.DefaultNodeHome). WithViper("CRO") diff --git a/go.mod b/go.mod index 00f7a670b..ee5be610a 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.16 require ( github.com/confluentinc/bincover v0.1.0 - github.com/cosmos/cosmos-sdk v0.42.5 + github.com/cosmos/cosmos-sdk v0.42.6 github.com/cosmos/ledger-go v0.9.2 // indirect github.com/gogo/protobuf v1.3.3 github.com/golang/protobuf v1.5.2 @@ -17,7 +17,7 @@ require ( github.com/spf13/cobra v1.1.3 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.7.0 - github.com/tendermint/tendermint v0.34.10 + github.com/tendermint/tendermint v0.34.11 github.com/tendermint/tm-db v0.6.4 github.com/tidwall/gjson v1.7.5 google.golang.org/genproto v0.0.0-20210114201628-6edceaf6022f diff --git a/go.sum b/go.sum index 4c8583aa0..a3260f672 100644 --- a/go.sum +++ b/go.sum @@ -99,8 +99,8 @@ github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7 github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/cosmos/cosmos-sdk v0.42.5 h1:tXttRklrAUUrFopfe9aMXpfiArF6MH2QRRqq0Lxyd5w= -github.com/cosmos/cosmos-sdk v0.42.5/go.mod h1:3JyT+Ud7QRTO1/ikncNqVhaF526ZKNqh2HGMqXn+QHE= +github.com/cosmos/cosmos-sdk v0.42.6 h1:ps1QWfvaX6VLNcykA7wzfii/5IwBfYgTIik6NOVDq/c= +github.com/cosmos/cosmos-sdk v0.42.6/go.mod h1:kh37gwYQoWdgR7N/9zeqW2rJ7cnP2W4A7nqIaf6m3zg= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= @@ -572,8 +572,9 @@ github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoM github.com/tendermint/tendermint v0.34.0-rc4/go.mod h1:yotsojf2C1QBOw4dZrTcxbyxmPUrT4hNuOQWX9XUwB4= github.com/tendermint/tendermint v0.34.0-rc6/go.mod h1:ugzyZO5foutZImv0Iyx/gOFCX6mjJTgbLHTwi17VDVg= github.com/tendermint/tendermint v0.34.0/go.mod h1:Aj3PIipBFSNO21r+Lq3TtzQ+uKESxkbA3yo/INM4QwQ= -github.com/tendermint/tendermint v0.34.10 h1:wBOc/It8sh/pVH9np2V5fBvRmIyFN/bUrGPx+eAHexs= github.com/tendermint/tendermint v0.34.10/go.mod h1:aeHL7alPh4uTBIJQ8mgFEE8VwJLXI1VD3rVOmH2Mcy0= +github.com/tendermint/tendermint v0.34.11 h1:q1Yh76oG4QbS07xhmIJh5iAE0fYpJ8P8YKYtjnWfJRY= +github.com/tendermint/tendermint v0.34.11/go.mod h1:aeHL7alPh4uTBIJQ8mgFEE8VwJLXI1VD3rVOmH2Mcy0= github.com/tendermint/tm-db v0.6.2/go.mod h1:GYtQ67SUvATOcoY8/+x6ylk8Qo02BQyLrAs+yAcLvGI= github.com/tendermint/tm-db v0.6.3/go.mod h1:lfA1dL9/Y/Y8wwyPp2NMLyn5P5Ptr/gvDFNWtrCWSf8= github.com/tendermint/tm-db v0.6.4 h1:3N2jlnYQkXNQclQwd/eKV/NzlqPlfK21cpRRIx80XXQ= diff --git a/gomod2nix.toml b/gomod2nix.toml index e63cd721c..d679619c2 100644 --- a/gomod2nix.toml +++ b/gomod2nix.toml @@ -511,12 +511,12 @@ sha256 = "0nxbn0m7lr4dg0yrwnvlkfiyg3ndv8vdpssjx7b714nivpc6ar0y" ["github.com/cosmos/cosmos-sdk"] - sumVersion = "v0.42.5" + sumVersion = "v0.42.6" ["github.com/cosmos/cosmos-sdk".fetch] type = "git" url = "https://github.com/cosmos/cosmos-sdk" - rev = "842b06003f97d31e4ec83847e9fe8185d51a1fc7" - sha256 = "1wrkqmngdjdxaxz5hrcdihj5clvmf62pqjl0gq648nbfwbmwbzi5" + rev = "a7e19ad4588bcceeeeab522f5807b9ff22e91a8c" + sha256 = "1ysk7bqivhg5d3dcgksl91jmcc3nakvfkgfiry408v66vk8hbpx6" ["github.com/cosmos/go-bip39"] sumVersion = "v1.0.0" @@ -2215,12 +2215,12 @@ sha256 = "1zcms3l5fihzg8nf4vhdk18qpn1jkbm3rpkjfpskfcrgzlxk6vi5" ["github.com/tendermint/tendermint"] - sumVersion = "v0.34.10" + sumVersion = "v0.34.11" ["github.com/tendermint/tendermint".fetch] type = "git" url = "https://github.com/tendermint/tendermint" - rev = "68eceda0b57ec1d2db6bf9254355bb092a8dcb85" - sha256 = "124xiqxa2f4pnhsz173wr40wk31wf4xl3r9ixqa6d0myff86l64v" + rev = "c2908ef785bb5ca6e015910368e4b7a32821b9ff" + sha256 = "0x9hf09qqdjf77fwk8sdc1dzr7akndwbpylnhi6aaihg4an0aqvp" ["github.com/tendermint/tm-db"] sumVersion = "v0.6.4" diff --git a/third_party/cosmos-sdk b/third_party/cosmos-sdk index 842b06003..a7e19ad45 160000 --- a/third_party/cosmos-sdk +++ b/third_party/cosmos-sdk @@ -1 +1 @@ -Subproject commit 842b06003f97d31e4ec83847e9fe8185d51a1fc7 +Subproject commit a7e19ad4588bcceeeeab522f5807b9ff22e91a8c diff --git a/x/chainmain/module.go b/x/chainmain/module.go index ec31f8f76..66515259f 100644 --- a/x/chainmain/module.go +++ b/x/chainmain/module.go @@ -47,6 +47,8 @@ func (AppModuleBasic) Name() string { } // RegisterLegacyAminoCodec does nothing. IBC does not support amino. +// (Amino is still needed for Ledger at the moment) +// nolint: staticcheck func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {} // RegisterInterfaces registers the module's interface types @@ -115,6 +117,8 @@ func (AppModule) Route() sdk.Route { return sdk.Route{} } func (AppModule) QuerierRoute() string { return "" } // LegacyQuerierHandler returns the capability module's Querier. +// (Amino is still needed for Ledger at the moment) +// nolint: staticcheck func (am AppModule) LegacyQuerierHandler(*codec.LegacyAmino) sdk.Querier { return nil } // RegisterQueryService registers a GRPC query service to respond to the diff --git a/x/nft/keeper/keeper_test.go b/x/nft/keeper/keeper_test.go index a5f12dbfe..de3cf57a5 100644 --- a/x/nft/keeper/keeper_test.go +++ b/x/nft/keeper/keeper_test.go @@ -47,6 +47,8 @@ var ( isCheckTx = false ) +// (Amino is still needed for Ledger at the moment) +// nolint: staticcheck type KeeperSuite struct { suite.Suite diff --git a/x/nft/keeper/querier.go b/x/nft/keeper/querier.go index 80477e923..c4dc98b7f 100644 --- a/x/nft/keeper/querier.go +++ b/x/nft/keeper/querier.go @@ -15,6 +15,8 @@ import ( ) // NewQuerier is the module level router for state queries +// (Amino is still needed for Ledger at the moment) +// nolint: staticcheck func NewQuerier(k Keeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier { return func(ctx sdk.Context, path []string, req abci.RequestQuery) (res []byte, err error) { switch path[0] { @@ -38,6 +40,8 @@ func NewQuerier(k Keeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier { } } +// (Amino is still needed for Ledger at the moment) +// nolint: staticcheck func querySupply(ctx sdk.Context, req abci.RequestQuery, k Keeper, legacyQuerierCdc *codec.LegacyAmino) ([]byte, error) { var params types.QuerySupplyParams @@ -58,6 +62,8 @@ func querySupply(ctx sdk.Context, req abci.RequestQuery, k Keeper, legacyQuerier return bz, nil } +// (Amino is still needed for Ledger at the moment) +// nolint: staticcheck func queryOwner(ctx sdk.Context, req abci.RequestQuery, k Keeper, legacyQuerierCdc *codec.LegacyAmino) ([]byte, error) { var params types.QueryOwnerParams @@ -80,6 +86,8 @@ func queryOwner(ctx sdk.Context, req abci.RequestQuery, k Keeper, legacyQuerierC return bz, nil } +// (Amino is still needed for Ledger at the moment) +// nolint: staticcheck func queryCollection(ctx sdk.Context, req abci.RequestQuery, k Keeper, legacyQuerierCdc *codec.LegacyAmino) ([]byte, error) { var params types.QueryCollectionParams @@ -101,6 +109,8 @@ func queryCollection(ctx sdk.Context, req abci.RequestQuery, k Keeper, legacyQue return bz, nil } +// (Amino is still needed for Ledger at the moment) +// nolint: staticcheck func queryDenom(ctx sdk.Context, req abci.RequestQuery, k Keeper, legacyQuerierCdc *codec.LegacyAmino) ([]byte, error) { var params types.QueryDenomParams @@ -122,6 +132,8 @@ func queryDenom(ctx sdk.Context, req abci.RequestQuery, k Keeper, legacyQuerierC return bz, nil } +// (Amino is still needed for Ledger at the moment) +// nolint: staticcheck func queryDenomByName(ctx sdk.Context, req abci.RequestQuery, k Keeper, legacyQuerierCdc *codec.LegacyAmino) ([]byte, error) { var params types.QueryDenomByNameParams @@ -143,6 +155,8 @@ func queryDenomByName(ctx sdk.Context, req abci.RequestQuery, k Keeper, legacyQu return bz, nil } +// (Amino is still needed for Ledger at the moment) +// nolint: staticcheck func queryDenoms(ctx sdk.Context, req abci.RequestQuery, k Keeper, legacyQuerierCdc *codec.LegacyAmino) ([]byte, error) { denoms := k.GetDenoms(ctx) @@ -154,6 +168,8 @@ func queryDenoms(ctx sdk.Context, req abci.RequestQuery, k Keeper, legacyQuerier return bz, nil } +// (Amino is still needed for Ledger at the moment) +// nolint: staticcheck func queryNFT(ctx sdk.Context, req abci.RequestQuery, k Keeper, legacyQuerierCdc *codec.LegacyAmino) ([]byte, error) { var params types.QueryNFTParams diff --git a/x/nft/module.go b/x/nft/module.go index f77d80e66..eba5c8eb5 100644 --- a/x/nft/module.go +++ b/x/nft/module.go @@ -43,6 +43,8 @@ type AppModuleBasic struct { func (AppModuleBasic) Name() string { return types.ModuleName } // RegisterLegacyAminoCodec registers the NFT module's types on the LegacyAmino codec. +// (Amino is still needed for Ledger at the moment) +// nolint: staticcheck func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { types.RegisterLegacyAminoCodec(cdc) } @@ -133,6 +135,8 @@ func (am AppModule) Route() sdk.Route { func (AppModule) QuerierRoute() string { return types.RouterKey } // LegacyQuerierHandler returns the NFT module sdk.Querier. +// (Amino is still needed for Ledger at the moment) +// nolint: staticcheck func (am AppModule) LegacyQuerierHandler(legacyQuerierCdc *codec.LegacyAmino) sdk.Querier { return keeper.NewQuerier(am.keeper, legacyQuerierCdc) } diff --git a/x/nft/types/codec.go b/x/nft/types/codec.go index 384727057..f13b1e79c 100644 --- a/x/nft/types/codec.go +++ b/x/nft/types/codec.go @@ -28,6 +28,8 @@ func init() { } // RegisterLegacyAminoCodec concrete types on codec +// (Amino is still needed for Ledger at the moment) +// nolint: staticcheck func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { cdc.RegisterConcrete(&MsgIssueDenom{}, "chainmain/nft/MsgIssueDenom", nil) cdc.RegisterConcrete(&MsgTransferNFT{}, "chainmain/nft/MsgTransferNFT", nil) diff --git a/x/supply/module.go b/x/supply/module.go index 1aae40e72..43b5cb2a2 100644 --- a/x/supply/module.go +++ b/x/supply/module.go @@ -48,6 +48,8 @@ func (AppModuleBasic) Name() string { } // RegisterLegacyAminoCodec does nothing. IBC does not support amino. +// (Amino is still needed for Ledger at the moment) +// nolint: staticcheck func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {} // RegisterInterfaces registers the module's interface types @@ -121,6 +123,8 @@ func (AppModule) Route() sdk.Route { return sdk.Route{} } func (AppModule) QuerierRoute() string { return types.RouterKey } // LegacyQuerierHandler returns the capability module's Querier. +// (Amino is still needed for Ledger at the moment) +// nolint: staticcheck func (am AppModule) LegacyQuerierHandler(legacyQuerierCdc *codec.LegacyAmino) sdk.Querier { return nil }