Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(deps)!: bump cosmos sdk to v0.50.3 #1246

Open
wants to merge 110 commits into
base: master
Choose a base branch
from

Conversation

dadamu
Copy link
Contributor

@dadamu dadamu commented Sep 22, 2023

Description

Closes: #XXXX
This PR bumps cosmos-sdk to v0.50.0, ibc-go to v8 and wasmd to v0.50.0.


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • included the correct type prefix in the PR title
  • added ! to the type prefix if API or client breaking change
  • targeted the correct branch (see PR Targeting)
  • provided a link to the relevant issue or specification
  • followed the guidelines for building modules
  • included the necessary unit and integration tests
  • added a changelog entry to CHANGELOG.md
  • included comments for documenting Go code
  • updated the relevant documentation or specification
  • reviewed "Files changed" and left comments if necessary
  • confirmed all CI checks have passed

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.

I have...

  • confirmed the correct type prefix in the PR title
  • confirmed ! in the type prefix if API or client breaking change
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic
  • reviewed API design and naming
  • reviewed documentation is accurate
  • reviewed tests and test coverage
  • manually tested (if applicable)

@github-actions github-actions bot added x/profiles Module that allows to create and manage decentralized social profiles x/subspaces Issue on the x/subspaces module x/CLI kind/build Related to the build of the project x/relationships labels Sep 22, 2023
@dadamu dadamu force-pushed the paul/DCD-415/bump-cosmos-sdk-to-0.50.0 branch 4 times, most recently from cc1acbf to 90d6c17 Compare September 27, 2023 11:25
@dadamu dadamu changed the title build(deps): bump cosmos sdk to 0.50.0 build(deps)!: bump cosmos sdk to 0.50.0 Sep 27, 2023
@dadamu dadamu force-pushed the paul/DCD-415/bump-cosmos-sdk-to-0.50.0 branch 4 times, most recently from 1a6a59a to 68287ee Compare September 28, 2023 10:51
@github-actions github-actions bot added the kind/ci Improve the CI/CD label Sep 28, 2023
Comment on lines +79 to +82

// MsgSaveProfile represents a message to save a profile.
message MsgSaveProfile {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

structures of MsgServices must be inside the same file as MsgServices, or cosmos.msg.v1.signer cannot be detected properly.

@@ -1,25 +1,35 @@
module github.com/desmos-labs/desmos/v6

go 1.19
go 1.21
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently, cosmos-sdk, wasmd and ibc-go are set 1.21 as minimal version. Additionally, ibc-go applies features go 1.20 package.

@dadamu dadamu force-pushed the paul/DCD-415/bump-cosmos-sdk-to-0.50.0 branch from 89ecc6e to 6bdb126 Compare September 28, 2023 15:15
Comment on lines -166 to -169
upgradeclient.LegacyProposalHandler,
upgradeclient.LegacyCancelProposalHandler,
ibcclientclient.UpdateClientProposalHandler,
ibcclientclient.UpgradeProposalHandler,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

govv1beta1 proposal handler are deprecated

@@ -30,7 +30,7 @@ func NewAccountChainLinkJSONBuilder(getter getter.MultiSignatureAccountReference
}

// BuildChainLinkJSON implements ChainLinkJSONBuilder
func (b *AccountChainLinkJSONBuilder) BuildChainLinkJSON(_ codec.Codec, chain types.Chain) (utils.ChainLinkJSON, error) {
func (b *AccountChainLinkJSONBuilder) BuildChainLinkJSON(ctx client.Context, chain types.Chain) (utils.ChainLinkJSON, error) {
Copy link
Contributor Author

@dadamu dadamu Sep 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

inject client.Context for signing data since client.Context is required for signing bytes in this version

//
// CONTRACT: Validator array must be provided in the order expected by Tendermint.
// i.e. sorted first by power and then lexicographically by address.
func NewTestChainWithValSet(tb testing.TB, coord *ibctesting.Coordinator, chainID string, valSet *cmttypes.ValidatorSet, signers map[string]cmttypes.PrivValidator) *ibctesting.TestChain {
Copy link
Contributor Author

@dadamu dadamu Sep 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FinalizeBlock is applied in cosmos-sdk v0.50, it breaks the ibctesting tool features, so I decided to wrap the existing tool from ibc-go, instead of maintaining it by ourselves.

Comment on lines 86 to 115
var (
amino = codec.NewLegacyAmino()

// AminoCdc references the global x/relationships module codec. Note, the codec should
// ONLY be used in certain instances of tests and for JSON encoding as Amino is
// still used for that purpose.
//
// The actual codec used for serialization should be provided to x/relationships and
// defined at the application level.
AminoCdc = codec.NewAminoCodec(amino)

ModuleCdc = codec.NewProtoCodec(types.NewInterfaceRegistry())
)

func init() {
RegisterLegacyAminoCodec(amino)
cryptocodec.RegisterCrypto(amino)
sdk.RegisterLegacyAminoCodec(amino)

// Register all Amino interfaces and concrete types on the authz Amino codec so that this can later be
// used to properly serialize MsgGrant and MsgExec instances
RegisterLegacyAminoCodec(authzcodec.Amino)

// Register all Amino interfaces and concrete types on the gov Amino codec so that this can later be
// used to properly serialize MsgSubmitProposal instances
RegisterLegacyAminoCodec(govcodec.Amino)
}
Copy link
Contributor Author

@dadamu dadamu Sep 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AminoCodec and init() function is deprecated
https://docs.cosmos.network/v0.50/build/migrations/upgrading#modules

Messages no longer need to implement the LegacyMsg interface and implementations of GetSignBytes can be deleted. Because of this change, global legacy Amino codec definitions and their registration in init() can safely be removed as well.

Comment on lines -129 to -132
// GetSignBytes implements sdk.Msg.
func (msg *MsgUnlinkApplication) GetSignBytes() []byte {
return sdk.MustSortJSON(AminoCdc.MustMarshalJSON(msg))
}
Copy link
Contributor Author

@dadamu dadamu Sep 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is deprecated, see: https://docs.cosmos.network/v0.50/build/migrations/upgrading#modules

Messages no longer need to implement the LegacyMsg interface and implementations of GetSignBytes can be deleted. Because of this change, global legacy Amino codec definitions and their registration in init() can safely be removed as well.

@dadamu dadamu changed the title build(deps)!: bump cosmos sdk to 0.50.0 build(deps)!: bump cosmos sdk to v0.50.0 Sep 28, 2023
@dadamu dadamu marked this pull request as ready for review September 28, 2023 15:52
@dadamu dadamu requested a review from a team as a code owner September 28, 2023 15:52
@codecov
Copy link

codecov bot commented Sep 28, 2023

Codecov Report

Attention: 96 lines in your changes are missing coverage. Please review.

Comparison is base (bc175e5) 81.04% compared to head (568b329) 17.63%.
Report is 1 commits behind head on master.

Files Patch % Lines
app/app.go 69.66% 26 Missing and 1 partial ⚠️
app/export.go 6.89% 26 Missing and 1 partial ⚠️
x/posts/simulation/operations.go 0.00% 11 Missing ⚠️
x/profiles/simulation/operations.go 0.00% 9 Missing ⚠️
x/profiles/simulation/utils.go 0.00% 6 Missing ⚠️
x/profiles/module.go 0.00% 5 Missing ⚠️
tests/wasm/helpers.go 90.62% 2 Missing and 1 partial ⚠️
app/desmos/cmd/sign/sign.go 33.33% 2 Missing ⚠️
x/posts/keeper/alias_functions.go 81.81% 2 Missing ⚠️
app/utils.go 0.00% 1 Missing ⚠️
... and 3 more
Additional details and impacted files
@@             Coverage Diff             @@
##           master    #1246       +/-   ##
===========================================
- Coverage   81.04%   17.63%   -63.41%     
===========================================
  Files         218      372      +154     
  Lines       17880   105987    +88107     
===========================================
+ Hits        14490    18695     +4205     
- Misses       2778    85974    +83196     
- Partials      612     1318      +706     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dadamu dadamu marked this pull request as draft September 28, 2023 17:08
@dadamu dadamu force-pushed the paul/DCD-415/bump-cosmos-sdk-to-0.50.0 branch from 76aed35 to 568b329 Compare January 17, 2024 09:24
@dadamu dadamu changed the title build(deps)!: bump cosmos sdk to v0.50.2 build(deps)!: bump cosmos sdk to v0.50.3 Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/build Related to the build of the project kind/ci Improve the CI/CD x/CLI x/profiles Module that allows to create and manage decentralized social profiles x/relationships x/subspaces Issue on the x/subspaces module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant