-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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 Simulation Bug #4714
Fix Simulation Bug #4714
Conversation
While reintroducing the contract tests a little discrepancy was noted: * type from integer to string in the swagger definition for supply/total/{denominator} * remove slash from supply/total route in the implementation
Codecov Report
@@ Coverage Diff @@
## supply-genesis #4714 +/- ##
==================================================
- Coverage 54.12% 54.12% -0.01%
==================================================
Files 272 273 +1
Lines 17386 17399 +13
==================================================
+ Hits 9411 9417 +6
- Misses 7290 7297 +7
Partials 685 685 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for finding this bug @colin-axner @AdityaSripal !
I think that this logic can be simplified if we avoid returning a blacklisted account on the RandomAcc
function from x/simulation/account.go
as that's ultimately where the account is selected from the array.
Also, on GenGenesisAccounts
we create the genesis accounts (vesting or base accounts) based on randomness but we should also create the genesis accounts from the blacklisted module accounts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK - Fede's comments should be addressed first
also, let's rebase this to the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK
The simulation will currently use the ModuleAccount addresses for standard operations such as delegate, send, etc.
To fix this the module account addresses were added to a map in simapp. Then random accounts are checked against this map to ensure the address does not match. Also, after pulling from genesis, accounts who have a module account address are removed from the accounts used for random activity.
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.
Wrote tests
Updated relevant documentation (
docs/
)Added a relevant changelog entry:
clog add [section] [stanza] [message]
rereviewed
Files changed
in the github PR explorerFor Admin Use: