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

New simapp with 0.47 code and persistenceCore structure #405

Closed
wants to merge 6 commits into from

Conversation

xlab
Copy link
Contributor

@xlab xlab commented Jul 13, 2023

1. Overview

This PR supercedes previous one #403 extracting only useful part that we wish to have here. All other changes from the old PR became obsolete before merge.

In this PR it's only simapp being updated, that is: the simapp code matches Cosmos SDK simapp from 0.47.3, but the module and keepers wiring layout adapted to match persistenceCore.

This simapp allows to run simulations closer to the newest way of testing thins.

Note: this PR also wasm, wasmbindings support as well as IBC wiring, which will greately assist in simulating wasm / ibc related modules, e.g. x/oracle.

2. Implementation details

Few commits copying the new simapp and fixing some leftovers.

3. How to test/use

make test # runs unit-tests
make test-sim # runs simulation tests

NOTE: at this moment sim tests failing on x/stake, not related to this PR.

Max added 4 commits July 14, 2023 00:19
This ignores app_v2 with deepinject which is not ready to be used with IBC
and other modules, for now we are sticking to app_v1 that is similar to what we had there.

The commit is a merged version from superceded PR #403
@xlab xlab requested a review from ajeet97 July 13, 2023 22:44
@github-actions
Copy link

Coverage after merging f/new-simapp into master

18.19%

Coverage Report
FileBranchesFuncsLinesUncovered Lines
simapp
   app.go100%100%79.21%..., 458, 461, 462, 463
   modules.go100%100%100%
   test_helpers.go100%100%28.07%..., 51, 52, 53, 99
   ante_handler.go100%100%71.43%..., 45, 46, 50, 51
   export.go100%100%13.43%..., 96, 97, 98, 99
   genesis_account.go100%100%100%
   test_suite.go100%100%0%..., 58, 59, 60, 62
simapp/simd/cmd
   root.go100%100%80.44%..., 73, 74, 77, 78
   testnet.go100%100%69.54%..., 535, 536, 93, 94
x/epochs/client/cli
   query.go100%100%0%..., 95, 96, 97, 98
x/epochs/keeper
   epoch.go100%100%85.71%..., 25, 61, 87, 92
   grpc_query.go100%100%38.46%..., 51, 53, 54, 55
   hooks.go100%100%100%
   genesis.go100%100%90.91%14
   keeper.go100%100%92.86%30
   abci.go100%100%100%
x/epochs/types
   query.pb.go100%100%2.24%..., 96, 97, 98, 99
   query.pb.gw.go100%100%0%..., 96, 97, 98, 99
   genesis.pb.go100%100%28.80%..., 96, 97, 98, 99
   genesis.go100%100%59.18%..., 57, 58, 61, 62
   hooks.go100%100%100%
x/halving/simulation
   genesis.go100%100%70%17, 18, 19
x/halving/types
   genesis.pb.go100%100%2.55%..., 68, 69, 98, 99
   genesis.go100%100%86.67%25, 26
   halving.pb.go100%100%2.76%..., 96, 97, 98, 99
   params.go100%100%85.29%24, 25, 26, 44, 45
   query.pb.go100%100%1.91%..., 96, 97, 98, 99
   query.pb.gw.go100%100%0%..., 95, 96, 97, 98
x/interchainquery
   handler.go100%100%0%15, 16, 17, 18, 19
   module.go100%100%63.38%..., 84, 87, 88, 89
   genesis.go100%100%54.55%21, 22, 23, 24, 25
x/interchainquery/keeper
   queries.go100%100%98%67
   keeper.go100%100%67.59%..., 43, 66, 67, 89
   msg_server.go100%100%55.74%..., 76, 79, 87, 88
   abci.go100%100%92.68%58, 59, 60
   grpc_query.go100%100%74.07%..., 33, 40, 43, 44
x/interchainquery/types
   query.pb.go100%100%1.32%..., 996, 997, 998, 999
   msgs.go100%100%54.17%..., 39, 45, 46, 47
   messages.pb.go100%100%3.58%..., 96, 97, 98, 99
   query.pb.gw.go100%100%0%..., 96, 97, 98, 99
   codec.go100%100%100%
   genesis.go100%100%63.64%15, 16, 17, 18
   genesis.pb.go100%100%0.76%..., 996, 997, 998, 999
   keys.go100%100%0%22, 23, 24
   messages.pb.gw.go100%100%0%..., 92, 93, 95, 99
x/oracle/keeper
   msg_server.go100%100%75.83%..., 81, 82, 85, 86
   ballot.go100%100%100%
   tally.go100%100%93.55%..., 113, 114, 60, 61
   params.go100%100%68.89%..., 75, 79, 80, 81
   utils.go100%100%77.78%10, 9
   genesis.go100%100%93.33%..., 34, 43, 52, 63
   keeper.go100%100%93.45%..., 47, 68, 69, 70
   alias_functions.go100%100%100%
   slash.go100%100%97.44%41
   reward.go100%100%91.67%14, 15, 72, 88
   grpc_query.go100%100%15.29%..., 96, 97, 98, 99
x/oracle/types
   hash.go100%100%68.42%..., 65, 66, 68, 69
   oracle.pb.go100%100%0.76%..., 995, 996, 997, 998
   denom.go100%100%100%
   query.pb.go100%100%0.83%..., 969, 97, 98, 99
   vote.go100%100%100%
   ballot.go100%100%96.61%110, 111, 195, 196
   genesis.pb.go100%100%0.93%..., 993, 994, 998, 999
   codec.go100%100%52.38%..., 45, 46, 47, 48
   query.pb.gw.go100%100%0%..., 95, 97, 98, 99
   tx.pb.go100%100%0.90%..., 993, 994, 996, 999
   msgs.go100%100%76.19%..., 37, 54, 55, 90
   keys.go100%100%0%..., 52, 53, 54, 55
   params.go100%100%88.59%..., 296, 297, 298, 300
   genesis.go100%100%66.67%..., 23, 24, 25, 26

@github-actions
Copy link

Coverage after merging f/new-simapp into master

18.19%

Coverage Report
FileBranchesFuncsLinesUncovered Lines
simapp
   test_helpers.go100%100%28.07%..., 51, 52, 53, 99
   ante_handler.go100%100%71.43%..., 45, 46, 50, 51
   modules.go100%100%100%
   genesis_account.go100%100%100%
   test_suite.go100%100%0%..., 58, 59, 60, 62
   app.go100%100%79.21%..., 458, 461, 462, 463
   export.go100%100%13.43%..., 96, 97, 98, 99
simapp/simd/cmd
   testnet.go100%100%69.54%..., 535, 536, 93, 94
   root.go100%100%80.44%..., 73, 74, 77, 78
x/epochs/client/cli
   query.go100%100%0%..., 95, 96, 97, 98
x/epochs/keeper
   hooks.go100%100%100%
   abci.go100%100%100%
   keeper.go100%100%92.86%30
   genesis.go100%100%90.91%14
   grpc_query.go100%100%38.46%..., 51, 53, 54, 55
   epoch.go100%100%85.71%..., 25, 61, 87, 92
x/epochs/types
   query.pb.go100%100%2.24%..., 96, 97, 98, 99
   genesis.go100%100%59.18%..., 57, 58, 61, 62
   hooks.go100%100%100%
   query.pb.gw.go100%100%0%..., 96, 97, 98, 99
   genesis.pb.go100%100%28.80%..., 96, 97, 98, 99
x/halving/simulation
   genesis.go100%100%70%17, 18, 19
x/halving/types
   query.pb.gw.go100%100%0%..., 95, 96, 97, 98
   genesis.go100%100%86.67%25, 26
   halving.pb.go100%100%2.76%..., 96, 97, 98, 99
   query.pb.go100%100%1.91%..., 96, 97, 98, 99
   genesis.pb.go100%100%2.55%..., 68, 69, 98, 99
   params.go100%100%85.29%24, 25, 26, 44, 45
x/interchainquery
   handler.go100%100%0%15, 16, 17, 18, 19
   genesis.go100%100%54.55%21, 22, 23, 24, 25
   module.go100%100%63.38%..., 84, 87, 88, 89
x/interchainquery/keeper
   msg_server.go100%100%55.74%..., 76, 79, 87, 88
   keeper.go100%100%67.59%..., 43, 66, 67, 89
   grpc_query.go100%100%74.07%..., 33, 40, 43, 44
   abci.go100%100%92.68%58, 59, 60
   queries.go100%100%98%67
x/interchainquery/types
   query.pb.gw.go100%100%0%..., 96, 97, 98, 99
   messages.pb.go100%100%3.58%..., 96, 97, 98, 99
   genesis.pb.go100%100%0.76%..., 996, 997, 998, 999
   keys.go100%100%0%22, 23, 24
   genesis.go100%100%63.64%15, 16, 17, 18
   codec.go100%100%100%
   query.pb.go100%100%1.32%..., 996, 997, 998, 999
   messages.pb.gw.go100%100%0%..., 92, 93, 95, 99
   msgs.go100%100%54.17%..., 39, 45, 46, 47
x/oracle/keeper
   reward.go100%100%91.67%14, 15, 72, 88
   keeper.go100%100%93.45%..., 47, 68, 69, 70
   params.go100%100%68.89%..., 75, 79, 80, 81
   msg_server.go100%100%75.83%..., 81, 82, 85, 86
   alias_functions.go100%100%100%
   ballot.go100%100%100%
   genesis.go100%100%93.33%..., 34, 43, 52, 63
   utils.go100%100%77.78%10, 9
   tally.go100%100%93.55%..., 113, 114, 60, 61
   grpc_query.go100%100%15.29%..., 96, 97, 98, 99
   slash.go100%100%97.44%41
x/oracle/types
   codec.go100%100%52.38%..., 45, 46, 47, 48
   genesis.pb.go100%100%0.93%..., 993, 994, 998, 999
   keys.go100%100%0%..., 52, 53, 54, 55
   oracle.pb.go100%100%0.76%..., 995, 996, 997, 998
   vote.go100%100%100%
   params.go100%100%88.59%..., 296, 297, 298, 300
   query.pb.gw.go100%100%0%..., 95, 97, 98, 99
   hash.go100%100%68.42%..., 65, 66, 68, 69
   msgs.go100%100%76.19%..., 37, 54, 55, 90
   denom.go100%100%100%
   tx.pb.go100%100%0.90%..., 993, 994, 996, 999
   genesis.go100%100%66.67%..., 23, 24, 25, 26
   ballot.go100%100%96.61%110, 111, 195, 196
   query.pb.go100%100%0.83%..., 969, 97, 98, 99

@puneet2019 puneet2019 closed this Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants