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

chore: release v2.1.0-testnet #657

Merged
merged 16 commits into from
Oct 21, 2021
Merged

Conversation

RiccardoM
Copy link
Contributor

@RiccardoM RiccardoM commented Oct 20, 2021

Description

This PR implements the changes needed in order to tag v2.1.0-testnet of Desmos.

Due to the current Desmos status being different in the testnet and mainnet, we will need two versions for v2.1.0:

  • v2.1.0-testnet will be used inside the testnet
  • v2.1.0-mainnet will be used inside the mainnet

The changes will be identical, we will only have two different upgrade handlers due to the fact that Morpheus has already undergone an on-chain upgrade while the mainnet has not.


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)

Signed-off-by: Riccardo Montagnin <riccardo.montagnin@gmail.com>
Signed-off-by: Riccardo Montagnin <riccardo.montagnin@gmail.com>
Signed-off-by: Riccardo Montagnin <riccardo.montagnin@gmail.com>
Signed-off-by: Riccardo Montagnin <riccardo.montagnin@gmail.com>
Signed-off-by: Riccardo Montagnin <riccardo.montagnin@gmail.com>
Signed-off-by: Riccardo Montagnin <riccardo.montagnin@gmail.com>
Signed-off-by: Riccardo Montagnin <riccardo.montagnin@gmail.com>
@RiccardoM RiccardoM added the requires-upgrade Test the on-chain upgrade for this PR label Oct 20, 2021
@github-actions github-actions bot added kind/ci Improve the CI/CD x/profiles Module that allows to create and manage decentralized social profiles labels Oct 20, 2021
Comment on lines +25 to +27
GENESIS_DESMOS_VERSION: "v2.0.0"
GENESIS_URL: "https://raw.githubusercontent.com/RiccardoM/desmos-states/master/morpheus-apollo-2-2500000.json"
UPGRADE_NAME: "v2.1.0"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These are just to make sure the upgrade goes properly when running it inside the CI.


return app.mm.RunMigrations(ctx, app.configurator, fromVM)
app.upgradeKeeper.SetUpgradeHandler("v2.1.0", func(ctx sdk.Context, plan upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) {
app.IBCKeeper.ConnectionKeeper.SetParams(ctx, ibcconnectiontypes.DefaultParams())
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since we forgot to add this line inside the latest Morpheus upgrade, we need to do this now. Ref: cosmos/cosmos-sdk#10398 (comment)

return app.mm.RunMigrations(ctx, app.configurator, fromVM)
app.upgradeKeeper.SetUpgradeHandler("v2.1.0", func(ctx sdk.Context, plan upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) {
app.IBCKeeper.ConnectionKeeper.SetParams(ctx, ibcconnectiontypes.DefaultParams())
return app.mm.RunMigrations(ctx, app.configurator, vm)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since the testnet has already undergone an upgrade, we need to pass the provided vm here instead of creating a custom one

Added: []string{authz.ModuleName, feegrant.ModuleName},
}
if upgradeInfo.Name == "v2.1.0" && !app.upgradeKeeper.IsSkipHeight(upgradeInfo.Height) {
storeUpgrades := storetypes.StoreUpgrades{}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We will not have any store upgrade this version for the testnet

@@ -59,6 +59,7 @@

chain_state['app_state']['slashing'] = genesis['app_state']['slashing']

chain_state['app_state']['gov']['deposit_params']['max_deposit_period'] = '120s'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is to make sure that all upgrade proposals have a decent deposit period during the CI runs

@@ -63,7 +63,7 @@ sleep 6s

echo ""
echo "===> Getting proposal id"
PROPOSAL_ID=$(desmos q tx $TX_HASH --output json 2>&1 | jq .logs[0].events[2].attributes[0].value -r)
PROPOSAL_ID=$(desmos q tx $TX_HASH --output json 2>&1 | jq .logs[0].events[4].attributes[0].value -r)
Copy link
Contributor Author

@RiccardoM RiccardoM Oct 20, 2021

Choose a reason for hiding this comment

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

Cosmos changed the positions of the attributes. Now the proposal ID can be found inside the 5th event instead of the 3rd one

@codecov
Copy link

codecov bot commented Oct 20, 2021

Codecov Report

Merging #657 (2b64f06) into master (71960c8) will increase coverage by 0.08%.
The diff coverage is 70.76%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #657      +/-   ##
==========================================
+ Coverage   15.70%   15.79%   +0.08%     
==========================================
  Files         168      169       +1     
  Lines       45954    45990      +36     
==========================================
+ Hits         7218     7264      +46     
+ Misses      38119    38105      -14     
- Partials      617      621       +4     
Impacted Files Coverage Δ
app/app.go 82.23% <0.00%> (+4.53%) ⬆️
x/profiles/keeper/migrations.go 55.55% <0.00%> (-15.88%) ⬇️
x/profiles/types/models_app_links.pb.go 0.61% <ø> (ø)
x/profiles/types/models_chain_links.pb.go 33.81% <ø> (ø)
x/profiles/legacy/v210/store.go 79.31% <79.31%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 71960c8...2b64f06. Read the comment docs.

Signed-off-by: Riccardo Montagnin <riccardo.montagnin@gmail.com>
Signed-off-by: Riccardo Montagnin <riccardo.montagnin@gmail.com>
Signed-off-by: Riccardo Montagnin <riccardo.montagnin@gmail.com>
Copy link
Contributor

@dadamu dadamu left a comment

Choose a reason for hiding this comment

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

🚀


return nil
}

Copy link
Contributor

Choose a reason for hiding this comment

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

@RiccardoM I guess these two functions below are tested with the on chain upgrade action right?
If so, this is ready to go 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@bragaz I forgot to add a test, you're right. Will do asap

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@bragaz Thanks for the heads up about the test 🙏 While implementing it I actually discovered a bug inside the migration process. It should be fixed and ready to go now hopefully

Signed-off-by: Riccardo Montagnin <riccardo.montagnin@gmail.com>
Signed-off-by: Riccardo Montagnin <riccardo.montagnin@gmail.com>
@RiccardoM RiccardoM changed the title build: version v2.1.0-testnet chore: release v2.1.0-testnet Oct 20, 2021
@RiccardoM RiccardoM added the automerge Automatically merge PR once all prerequisites pass label Oct 21, 2021
Signed-off-by: Riccardo Montagnin <riccardo.montagnin@gmail.com>
Signed-off-by: Riccardo Montagnin <riccardo.montagnin@gmail.com>
@github-actions github-actions bot added the kind/build Related to the build of the project label Oct 21, 2021
@@ -1,5 +1,5 @@
ARG DESMOS_VERSION="v0.17.2"
FROM golang:1.15-alpine AS build-env
FROM golang:1.17-alpine AS build-env
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is now required by Cosmovisor to build properly

@@ -41,6 +41,7 @@ func migrateAppLinks(store sdk.KVStore, cdc codec.BinaryCodec) error {
iterator := sdk.KVStorePrefixIterator(store, types.UserApplicationLinkPrefix)
defer iterator.Close()

var keys [][]byte
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've changed this to make sure we do not incur in any possible bug when re-computing the keys. This is just a precaution I added after I discovered I was computing the links keys wrongly inside v2.1.0

Copy link
Contributor

@leobragaz leobragaz left a comment

Choose a reason for hiding this comment

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

Ready to go 🚀

@mergify mergify bot merged commit 17a5bff into master Oct 21, 2021
@mergify mergify bot deleted the riccardo/release/v2.1.0-testnet branch October 21, 2021 06:45
@RiccardoM RiccardoM mentioned this pull request Oct 26, 2021
19 tasks
mergify bot pushed a commit that referenced this pull request Nov 10, 2021
## Description
This PR implements the changes needed in order to tag `v2.1.0-mainnet` of Desmos. Refer to #657 for major details.

---

### 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...

- [x] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] added `!` to the type prefix if API or client breaking change
- [x] targeted the correct branch (see [PR Targeting](https://github.com/desmos-labs/desmos/blob/master/CONTRIBUTING.md#pr-targeting))
- [ ] provided a link to the relevant issue or specification
- [ ] followed the guidelines for [building modules](https://docs.cosmos.network/v0.44/building-modules/intro.html)
- [ ] included the necessary unit and integration [tests](https://github.com/desmos-labs/desmos/blob/master/CONTRIBUTING.md#testing)
- [x] added a changelog entry to `CHANGELOG.md`
- [ ] included comments for [documenting Go code](https://blog.golang.org/godoc)
- [ ] 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](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Automatically merge PR once all prerequisites pass kind/build Related to the build of the project kind/ci Improve the CI/CD requires-upgrade Test the on-chain upgrade for this PR x/profiles Module that allows to create and manage decentralized social profiles
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants