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

fix hardcoded auth sims #7135

Merged
merged 7 commits into from
Aug 24, 2020
Merged

fix hardcoded auth sims #7135

merged 7 commits into from
Aug 24, 2020

Conversation

fedekunze
Copy link
Collaborator

Description

closes: #7129


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Targeted PR against correct branch (see CONTRIBUTING.md)
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the module structure standards.
  • Wrote unit and integration tests
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • Added relevant godoc comments.
  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer
  • Review Codecov Report in the comment section below once CI passes

@codecov
Copy link

codecov bot commented Aug 21, 2020

Codecov Report

Merging #7135 into master will decrease coverage by 3.53%.
The diff coverage is 51.61%.

@@            Coverage Diff             @@
##           master    #7135      +/-   ##
==========================================
- Coverage   58.50%   54.96%   -3.54%     
==========================================
  Files         408      560     +152     
  Lines       27996    38188   +10192     
==========================================
+ Hits        16378    20989    +4611     
- Misses      10314    15495    +5181     
- Partials     1304     1704     +400     

@fedekunze fedekunze added the A:automerge Automatically merge PR once all prerequisites pass. label Aug 24, 2020
@mergify mergify bot merged commit 3e148a9 into master Aug 24, 2020
@mergify mergify bot deleted the fedekunze/7129-custom-auth-sim-keys branch August 24, 2020 10:55
@colin-axner
Copy link
Contributor

sims are failing on test-sim-after-import locally I get

--- FAIL: TestAppSimulationAfterImport (65.02s)
panic: vesting amount 15991078449stake cannot be greater than total amount 1539444263stake [recovered]
	panic: vesting amount 15991078449stake cannot be greater than total amount 1539444263stake

goroutine 9 [running]:
testing.tRunner.func1.1(0x14af260, 0xc001883c20)
	/usr/local/go/src/testing/testing.go:941 +0x3d0
testing.tRunner.func1(0xc000f626c0)
	/usr/local/go/src/testing/testing.go:944 +0x3f9
panic(0x14af260, 0xc001883c20)
	/usr/local/go/src/runtime/panic.go:967 +0x166
github.com/cosmos/cosmos-sdk/x/bank/keeper.BaseKeeper.InitGenesis(0x7fc750139068, 0xc000077d00, 0x1b163e0, 0xc000609de0, 0x1b4bb80, 0xc00064a5a0, 0x7fc750139068, 0xc000077d00, 0x1b4bb80, 0xc00064a5a0, ...)
	/home/colinaxner/go/src/github.com/cosmos/cosmos-sdk/x/bank/keeper/genesis.go:19 +0x5e5
github.com/cosmos/cosmos-sdk/x/bank.AppModule.InitGenesis(0x1b4c600, 0xc000077d00, 0x1b5c1e0, 0xc0000cd340, 0x1b4bb80, 0xc00064a990, 0x1b312c0, 0xc0000460d0, 0x1b48100, 0xc00298fe00, ...)
	/home/colinaxner/go/src/github.com/cosmos/cosmos-sdk/x/bank/module.go:131 +0x143
github.com/cosmos/cosmos-sdk/types/module.(*Manager).InitGenesis(0xc0000cef50, 0x1b312c0, 0xc0000460d0, 0x1b48100, 0xc00298fe00, 0x0, 0x0, 0x16a251e, 0xe, 0x0, ...)
	/home/colinaxner/go/src/github.com/cosmos/cosmos-sdk/types/module/module.go:294 +0x2a4
github.com/cosmos/cosmos-sdk/simapp.(*SimApp).InitChainer(0xc000f8a300, 0x1b312c0, 0xc0000460d0, 0x1b48100, 0xc00298fe00, 0x0, 0x0, 0x16a251e, 0xe, 0x0, ...)
	/home/colinaxner/go/src/github.com/cosmos/cosmos-sdk/simapp/app.go:421 +0x16d
github.com/cosmos/cosmos-sdk/baseapp.(*BaseApp).InitChain(0xc0000cc000, 0x0, 0x0, 0x0, 0x16a251e, 0xe, 0xc003b52a40, 0x0, 0x0, 0x0, ...)
	/home/colinaxner/go/src/github.com/cosmos/cosmos-sdk/baseapp/abci.go:46 +0x2ab
github.com/cosmos/cosmos-sdk/x/simulation.initChain(0xc004861b30, 0x3fed679087915380, 0x394, 0x3fcee5c9ad1a6d4c, 0xc0047d2700, 0x3, 0x3, 0x1affe00, 0xc000f28380, 0x1affe00, ...)
	/home/colinaxner/go/src/github.com/cosmos/cosmos-sdk/x/simulation/simulate.go:37 +0x22b
github.com/cosmos/cosmos-sdk/x/simulation.SimulateFromSeed(0x1b4f7e0, 0xc000f626c0, 0x1aff460, 0xc000010018, 0xc0000cc000, 0xc0048636a0, 0x18b5700, 0xc000503c80, 0x11, 0x18, ...)
	/home/colinaxner/go/src/github.com/cosmos/cosmos-sdk/x/simulation/simulate.go:70 +0x48a
github.com/cosmos/cosmos-sdk/simapp.TestAppSimulationAfterImport(0xc000f626c0)
	/home/colinaxner/go/src/github.com/cosmos/cosmos-sdk/simapp/sim_test.go:255 +0xea7
testing.tRunner(0xc000f626c0, 0x18b5630)
	/usr/local/go/src/testing/testing.go:992 +0xdc
created by testing.(*T).Run
	/usr/local/go/src/testing/testing.go:1043 +0x357
FAIL	github.com/cosmos/cosmos-sdk/simapp	65.066s

@alexanderbez
Copy link
Contributor

@colin-axner what seed was that?

@fedekunze are you looking into this?

@colin-axner
Copy link
Contributor

colin-axner commented Aug 24, 2020

@alexanderbez seed 7

go test ./simapp -run TestAppSimulationAfterImport -Enabled=true -NumBlocks=50 -Genesis= -Verbose=true -Commit=true -Seed=7 -Period=5

I used the to reproduce on the github build

@colin-axner colin-axner mentioned this pull request Aug 25, 2020
9 tasks
@colin-axner
Copy link
Contributor

@alexanderbez @fedekunze I think I figured it out. newApp got changed to app in the tests. Will open a pr shortly

larry0x pushed a commit to larry0x/cosmos-sdk that referenced this pull request May 22, 2023
* fix hardcoded auth sims

* changelog

Co-authored-by: Alexander Bezobchuk <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A:automerge Automatically merge PR once all prerequisites pass. C:Simulations C:x/auth T:Bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SDK simulation doesn't support custom keys
4 participants