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, cometbft cometbft-db #1124

Merged
merged 10 commits into from
May 2, 2023

Conversation

RiccardoM
Copy link
Contributor

@RiccardoM RiccardoM commented Apr 27, 2023

Description

This PR

  • bumps github.com/cosmos/cosmos-sdk to v0.47.2
  • bumps github.com/cometbft/cometbft to v0.37.1
  • bumps github.com/cometbft/cometbft-db to v0.8.0

Closes #1122
Closes #1123


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)

@RiccardoM RiccardoM requested a review from a team as a code owner April 27, 2023 20:23
@codecov
Copy link

codecov bot commented Apr 27, 2023

Codecov Report

Patch coverage: 71.26% and no project coverage change.

Comparison is base (6f56e96) 80.92% compared to head (adc75db) 80.93%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1124   +/-   ##
=======================================
  Coverage   80.92%   80.93%           
=======================================
  Files         194      198    +4     
  Lines       16901    16966   +65     
=======================================
+ Hits        13677    13731   +54     
- Misses       2629     2638    +9     
- Partials      595      597    +2     
Impacted Files Coverage Δ
x/profiles/module.go 9.63% <0.00%> (-0.62%) ⬇️
x/profiles/types/models_params.go 90.06% <ø> (+6.11%) ⬆️
x/profiles/types/models_params_legacy.go 0.00% <0.00%> (ø)
x/profiles/keeper/keeper_params.go 75.00% <66.66%> (-25.00%) ⬇️
x/profiles/legacy/v9/store.go 76.92% <76.92%> (ø)
app/app.go 87.60% <100.00%> (ø)
x/profiles/keeper/keeper.go 91.60% <100.00%> (-0.13%) ⬇️
x/profiles/keeper/msg_server_params.go 100.00% <100.00%> (ø)
x/profiles/types/codec.go 100.00% <100.00%> (ø)
x/profiles/types/msgs_params.go 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@github-actions github-actions bot added kind/build Related to the build of the project kind/ci Improve the CI/CD labels Apr 28, 2023
Comment on lines +170 to +179
// Create export folder
if config.ExportStatePath != "" {
err = os.MkdirAll(path.Dir(config.ExportStatePath), 0755)
require.NoError(t, err)
}
if config.ExportParamsPath != "" {
println(path.Dir(config.ExportParamsPath))
err = os.MkdirAll(path.Dir(config.ExportParamsPath), 0755)
require.NoError(t, err)
}
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 CheckExportSimulation assumes the folders exist, we should make sure that they are present before being used. This should solve any possible problem about folders not existing

@@ -248,8 +258,6 @@ func TestAppImportExport(t *testing.T) {
{app.keys[poststypes.StoreKey], newApp.keys[poststypes.StoreKey], [][]byte{}},
{app.keys[reportstypes.StoreKey], newApp.keys[reportstypes.StoreKey], [][]byte{}},
{app.keys[reactionstypes.StoreKey], newApp.keys[reactionstypes.StoreKey], [][]byte{}},

{app.keys[wasm.StoreKey], newApp.keys[wasm.StoreKey], [][]byte{wasmtypes.TXCounterPrefix}},
Copy link
Contributor Author

Choose a reason for hiding this comment

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

If we don't remove this, some tests might fail with the following error:

compared 2 different key/value pairs between KVStoreKey{0xc001159ba0, wasm} and KVStoreKey{0xc00327f700, wasm}
    sim_test.go:275: 
                Error Trace:    /home/riccardo/Coding/Desmos/Desmos/app/sim_test.go:275
                Error:          Not equal: 
                                expected: 2
                                actual  : 0
                Test:           TestAppImportExport
                Messages:       store A  => 
                                
                                store B lastContractId => 
                                store A  => 
                                store B  =>

This is the case of a test that can be reproduced by running

cd app && go test . -run TestAppImportExport -Enabled=true -NumBlocks=50 -Genesis= -Verbose=true -Commit=true -Seed=981928 -Period=5 -ExportParamsPath /tmp/sim-logs-2838039267/sim_params-981928.json -ExportStatePath /tmp/sim-logs-2838039267/sim_state-981928.json -v -timeout 24h

Copy link
Contributor

@dadamu dadamu May 2, 2023

Choose a reason for hiding this comment

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

It is because the x/wasm simulation does not generate the proper LastInstanceID for genesis state. I created an issue on wasmd repo. I think we can add it back after the issue is fixed.
CosmWasm/wasmd#1372

@@ -144,8 +143,6 @@ func (suite *TestSuite) SetupTest() {
suite.ctx = sdk.NewContext(ms, tmproto.Header{ChainID: "test-chain"}, false, log.NewNopLogger())
suite.cdc, suite.legacyAminoCdc = app.MakeCodecs()

paramsKeeper := paramskeeper.NewKeeper(suite.cdc, suite.legacyAminoCdc, keys[paramstypes.StoreKey], tKeys[paramstypes.TStoreKey])
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 and all other paramsKeeper are no longer necessary, so we should remove them to make sure the linting passes

test-race: ARGS=-race -tags='cgo ledger test_ledger_mock'
test-unit: test_tags += cgo ledger test_ledger_mock norace
test-unit-amino: test_tags += ledger test_ledger_mock test_amino norace
test-ledger: test_tags += cgo ledger norace
test-ledger-mock: test_tags += ledger test_ledger_mock norace
test-race: test_tags += cgo ledger test_ledger_mock
test-race: ARGS=-race
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 changes are to make sure we use the same scheme as the Cosmos SDK so it's going to be easier for us to check any differences in the future

Comment on lines +10 to +12
concurrency:
group: ci-${{ github.ref }}-sims
cancel-in-progress: true
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Taken from the Cosmos SDK repo, it aviods any concurrency between simulation tests. It should make sure we don't have multiple simulation tests running for the same PR/branch/commit at the same time

github.com/cosmos/cosmos-proto v1.0.0-beta.2
github.com/cosmos/cosmos-sdk v0.47.1
github.com/cosmos/cosmos-sdk v0.47.2
Copy link
Contributor

Choose a reason for hiding this comment

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

It is would be better to upgrade desmos-cosmos-sdk to 0.47.2 as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, updated it!

@RiccardoM RiccardoM requested a review from dadamu May 2, 2023 14:57
@RiccardoM RiccardoM added the automerge Automatically merge PR once all prerequisites pass label May 2, 2023
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.

LGTM

@mergify mergify bot merged commit 71633dd into master May 2, 2023
@mergify mergify bot deleted the riccardom/upgrde-cosmos branch May 2, 2023 16:44
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants