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

Add simulation for gov #1064

Merged
merged 12 commits into from
Nov 1, 2022
Merged

Conversation

GNaD13
Copy link
Contributor

@GNaD13 GNaD13 commented Oct 27, 2022

#1063
ad sims for gov proposal:

  • Instantiate contract
  • Execute contract
  • Update admin
  • Clear admin

@GNaD13 GNaD13 marked this pull request as ready for review October 28, 2022 14:04
@GNaD13 GNaD13 requested a review from alpe as a code owner October 28, 2022 14:04
Copy link
Member

@alpe alpe left a comment

Choose a reason for hiding this comment

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

Thanks a lot for your contribution! 👍

Unfortunately the simulations do fail now . The issue does not look related but please take a look.

Note: current main contains sdk v0.45.10 now which seem to not cause the error

}

// simulate store code proposal (unused now)
// Current problem: out of gas (defaul gaswanted config of gov SimulateMsgSubmitProposal is 10_000_000)
Copy link
Member

Choose a reason for hiding this comment

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

Do you have a proposal for a better gas value? We can open an issue/PR on the SDK to get this addressed

Copy link
Contributor Author

@GNaD13 GNaD13 Nov 1, 2022

Choose a reason for hiding this comment

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

I think we have 2 solution to solve this problem:

  • Open a PR to increase defaul gaswanted so that this proposal can easily pass
  • Write a simple .wasm code which size is smaller than current. So that it can decrease the gas used.

But the 2 solution quite difficult. Because this may change all the current sims test. One more thing, in the future, we need to implement sudo entry point for Sudo proposal (it will increase the size of .wasm contract)

Copy link
Member

Choose a reason for hiding this comment

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

Store code and sudo gov operations are well covered by integration tests already. Simulations are just for regression and fuzzing. They don't add super much value here IMHO. Let's have a follow up task to revisit the store code when we are on SDK v0.47. There is some work on the gov module.

@GNaD13
Copy link
Contributor Author

GNaD13 commented Nov 1, 2022

Thanks a lot for your contribution! +1

Unfortunately the simulations do fail now . The issue does not look related but please take a look.

Note: current main contains sdk v0.45.10 now which seem to not cause the error

Yeah, I have checked the issue. The errors occur in the sims of module authz (this issues). It will pass if we move to v0.45.10

@codecov
Copy link

codecov bot commented Nov 1, 2022

Codecov Report

Merging #1064 (aab2a6d) into main (84e24d3) will decrease coverage by 0.05%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1064      +/-   ##
==========================================
- Coverage   59.28%   59.22%   -0.06%     
==========================================
  Files          53       53              
  Lines        6722     6732      +10     
==========================================
+ Hits         3985     3987       +2     
- Misses       2442     2451       +9     
+ Partials      295      294       -1     
Impacted Files Coverage Δ
x/wasm/module.go 37.90% <0.00%> (ø)
x/wasm/types/proposal.go 61.31% <0.00%> (-1.81%) ⬇️
x/wasm/keeper/keeper.go 87.73% <0.00%> (+0.31%) ⬆️

@alpe alpe merged commit fe50854 into CosmWasm:main Nov 1, 2022
NoahSaso pushed a commit to NoahSaso/wasmd that referenced this pull request Dec 2, 2022
* add struct for sim gov

* add proposal for store contract

* change wasm file

* add proposal instantiate contract

* change admin account

* add sim gov proposals Update Admin

* add sim gov execute contract

* fix some bug

* add sim gov clear admin

* add comment

* fix lint
Magicloud pushed a commit to fpco/wasmd that referenced this pull request Jan 13, 2023
* add struct for sim gov

* add proposal for store contract

* change wasm file

* add proposal instantiate contract

* change admin account

* add sim gov proposals Update Admin

* add sim gov execute contract

* fix some bug

* add sim gov clear admin

* add comment

* fix lint
conorpp pushed a commit to wormhole-foundation/wasmd that referenced this pull request Feb 1, 2023
* add struct for sim gov

* add proposal for store contract

* change wasm file

* add proposal instantiate contract

* change admin account

* add sim gov proposals Update Admin

* add sim gov execute contract

* fix some bug

* add sim gov clear admin

* add comment

* fix lint
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.

2 participants