Skip to content

Commit

Permalink
Fix the sim tests. (#2015)
Browse files Browse the repository at this point in the history
* [1760]: Fix the non-determinism sim.

* [1760]: Update the import-export sim to look more like what the SDK has. Upgrade and wasm seem to have problems, though.

* [1760]: Add some TODOs to app.go for some stuff that needs to be done.

* [1760]: In app.go New, use NewSimulationManagerFromAppModules to create the simulation manager.

* [1760]: In app.go New, reorganize things a little bit to more closely match the sdk's example SimApp.

* [1760]: Clean up the begin and end block orders.

* [1760]: Tweak the import-export sim test to always check all the stores rather than stopping at the first problematic one. Also make it output more info when stuff is in one store but not the other.

* [1760]: Reorganize the sim_test.go file to put the helpers at the top. Make the helpers in there private.

* [1760]: Remove some args from app.New that should already be provided in the app options.

* [1760]: Set the init-version-map in the upgrade keeper during app.New. The upgrade keeper uses it during InitGenesis to write the version map to state. We also write the version map to state during InitChainer. But we don't call InitChainer during the import-export sim test, so the second app was missing all of those entries.

* [1760]: Finish fixing the import-export test by making sure the wasm sequences are always set.

* [1760]: Fix the after-import sim test.

* [1760]: Fix the full sim.

* [1760]: Fix the simple sim.

* [1760]: Fix the invariant benchmark sim.

* [1760]: Fix the full benchmark sim.

* [1760]: Fix a couple lint errors and properly set the invCheckPeriod during the app setup helper.

* [1760]: Move the proto annotation check out of New and into a unit test where it makes way more sense.

* [1760]: Add option (cosmos.msg.v1.service) = true; to all of the msg service protos.

* [1760]: Add comment to the proto annotation test about the expected error.

* [1760]: Add cosmossk.io/api to the list of legal imports.

* [1760]: Clean up the allow-list of library imports.

* [1760]: Move a log line up in the import-export test.

* [1760]: Tweak the comment in TestMsgServerProtoAnnotations to make it less likely that the test gets deleted once async-icq is fixed.

* [1760]: Add changelog entries.

* [1760]: Fix the trigger hasSigners func. We can't use sigCtx.GetSigners there because the newly wrapped protov2 message ends up with different references to the signers field descriptor than what was previously created which causes a panic.

* [1760]: Remove an empty line that the linter was complaining about.

* [1760]: Clean up appStateWithWasmSeqs to use a new sequenceExists function.
  • Loading branch information
SpicyLemon authored Jun 6, 2024
1 parent 857d79a commit 7f6bb26
Show file tree
Hide file tree
Showing 39 changed files with 1,301 additions and 1,248 deletions.
23 changes: 4 additions & 19 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,40 +83,25 @@ linters-settings:

- github.com/armon/go-metrics

- cosmossdk.io/api
- cosmossdk.io/client/v2/autocli
- cosmossdk.io/core
- cosmossdk.io/errors
- cosmossdk.io/log
- cosmossdk.io/math
- cosmossdk.io/store
- cosmossdk.io/x/evidence
- cosmossdk.io/x/evidence/keeper
- cosmossdk.io/x/evidence/types
- cosmossdk.io/x/feegrant
- cosmossdk.io/x/feegrant/keeper
- cosmossdk.io/x/feegrant/module
- cosmossdk.io/x/tx/signing
- cosmossdk.io/x/upgrade
- cosmossdk.io/x/upgrade/keeper
- cosmossdk.io/x/upgrade/types
- github.com/cosmos/cosmos-db
- github.com/cosmos/cosmos-sdk
- github.com/cosmos/go-bip39
- github.com/cosmos/ibc-apps/modules/async-icq/v8
- github.com/cosmos/ibc-apps/modules/async-icq/v8/keeper
- github.com/cosmos/ibc-apps/modules/async-icq/v8/types
- github.com/cosmos/ibc-go/modules/capability
- github.com/cosmos/ibc-go/modules/capability/keeper
- github.com/cosmos/ibc-go/modules/capability/types
- github.com/cosmos/ibc-go/v8
- github.com/cosmos/ibc-apps
- github.com/cosmos/ibc-go

- github.com/CosmWasm/wasmd
- github.com/CosmWasm/wasmvm/types

# used for interchain queries
- github.com/cosmos/ibc-apps/modules/async-icq/v6
- github.com/cosmos/ibc-apps/modules/async-icq/v6/types
- github.com/cosmos/ibc-apps/modules/async-icq/v6/keeper
- github.com/CosmWasm/wasmvm

- github.com/cosmos/gogoproto

Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ Ref: https://keepachangelog.com/en/1.0.0/
* Implement the ProposalMsgs module interface for the internal/provwasm, ibcratelimit, oracle, and sanction modules [#1993](https://github.com/provenance-io/provenance/pull/1993).
* Update ibcnet relayer to v2.5.2 and fix chain ids for localnet and ibcnet [#2021](https://github.com/provenance-io/provenance/pull/2021).
* Breakdown internal/helpers into multiple internal packages [#2019](https://github.com/provenance-io/provenance/pull/2019).
* Update `app.New` to get the home directory, invariant check period, and skip-upgrade heights from the appOptions instead of arguments [#2015](https://github.com/provenance-io/provenance/pull/2015).
* Simplify the module lists (e.g. `SetOrderEndBlockers`) by removing unneeded entries [#2015](https://github.com/provenance-io/provenance/pull/2015).

### Client Breaking

Expand All @@ -114,6 +116,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
### Bug Fixes

* The `add-net-asset-values` command now correctly uses the from `flag`'s `AccAddress` [#1995](https://github.com/provenance-io/provenance/issues/1995).
* Fix the sim tests [#2015](https://github.com/provenance-io/provenance/pull/2015).

### Deprecated

Expand Down
Loading

0 comments on commit 7f6bb26

Please sign in to comment.