Commit Graph

72 Commits

Author SHA1 Message Date
Christopher Goes b2b026b5e0
Merge PR #2930: Simulation spring cleaning
* Update PENDING.md
* Add simple period for expensive invariants
* Remove individual module simulations
* Simulate a few more blocks
* Add README explaining reason for shell scripts
* Deduplicate scripts, log exact replication command on failure
* Refactor invariants to take sdk.Context instead of baseapp.BaseApp
* Reference all issues in PENDING.md entry
* Remove no longer used simulation.RandSetup
* Bug fixes
* Address @rigelrozanski comments
* Fix typo
2018-11-29 16:17:10 +01:00
Jae Kwon d1e76221d8
Jae/simulator improvements (#2900)
* Make simulator operations predetermined
* Use new dbm.ReverseIterator API
* Simulation speed improvements
* Pin exact revisions, not branches
* Rename 'MountStoresIAVL' to 'MountStores'
* Zero Power Block fees to community pool
2018-11-27 00:14:22 -08:00
Christopher Goes ad121f1498 Add a flag to export for zero-height start (#2827)
Closes #2812

This PR adds the flag --for-zero-height to gaiad export, which runs several alterations to the application state to prepare for restarting a new chain in a consistent fashion.

It also:

* Moves Gaia's export code to cmd/gaia/app/export.go for cleaner separation.
* Fixes an inconsistency where we treated the initChainer as happening at height -1 - it should now happen at height 0, since the first header sent by Tendermint has height 1.
* Runs the runtime invariant checks on start (in initChainer)
* Adds a few auxiliary functions to clear slashing periods
* Removes the Height field from Delegation objects in x/stake, which was not used anywhere
2018-11-26 04:21:23 -08:00
frog power 4000 7cb1ba625e blockly minting (#2825)
* update mechanism to use average block time
* correctly sets accum height for zero-delegations
* update Decimal Format()
* clip withdrawal tokens
* PositiveDelegationInvariant
* DelegatorSharesInvariant
* DelAccumInvariants
2018-11-26 04:13:47 -08:00
Alexander Bezobchuk 41fc538ac7 Add Safety Measures to Coin/Coins (#2797) 2018-11-20 01:22:35 -08:00
Alessio Treglia 70826495b8 Merge PR #2752: Don't hardcode bondable denom 2018-11-12 19:54:18 +01:00
Christopher Goes 94f45311a0 Fix state export/import, add to CI (#2690)
* Update slashing import/export
* More slashing.WriteGenesis
* Add test import/export to CI
* Store equality comparison.
* Fix validator bond intra-tx counter
* Set timeslices for unbonding validators
* WriteGenesis => ExportGenesis
* Delete validators from unbonding queue when re-bonded
* Hook for validator deletion, fix staking genesis tests
2018-11-08 16:28:28 -08:00
Sunny Aggarwal 1d3a04a61c Switch gov proposal-queues to use iterators (#2638)
* switched gov proposals queue to use iterators
* update gov spec
* update proposal.Equal
* Amino api change
* switched proposalID to uint64
* renamed Gov Procedures to Params
* s/ActiveProposalQueueProposalKey/KeyActiveProposalQueueProposal/g
* numLatestProposals -> Limit
* fixed staking invariant breakage because of gov deposits
* Send deposits to DepositedCoinsAccAddr or BurnedDepositCoinsAccAddr
2018-11-06 23:33:18 -08:00
Christopher Goes 256ec0f07b Simulation improvements (logging fix, random genesis parameters) (#2617)
* Print out initial update on every block
* Randomize simulation parameters
* Randomize initial liveness weightings
* Randomize genesis parameters
* fixed power store invariant
* IterateValidatorsBonded -> IterateBondedValidatorsByPower
* WriteValidators uses IterateLastValidators rather than IterateBondedValidatorsByPower
* fixed democoin interface

Closes #2556
Closes #2396

Via #2671:
closes #2669
closes #2670
closes #2620

Offshoot issues:
#2618
#2619
#2620
#2661
2018-11-04 20:44:43 -08:00
Dev Ojha 0d8325b859 Merge PR #2623: Speedup simulator by switching to goleveldb
Due to requiring app.Commit() at the moment, golevel db is significantly faster than a memdb
2018-10-30 00:10:39 +01:00
Rigel d71f38bdac Merge PR #2597: Add distribution accum invariants 2018-10-26 13:42:53 +02:00
Christopher Goes cd9373d6f3 Make linter happy 2018-10-23 20:34:09 +02:00
Christopher Goes 306fb8fb6d Address @rigelrozanski comments 2018-10-23 20:33:39 +02:00
Christopher Goes edd56be952 Cleanup, additional item in PENDING.md 2018-10-23 18:29:39 +02:00
Christopher Goes 604de8599a Remove unnecessary change, clarify amt in sim_test.go 2018-10-23 18:24:06 +02:00
Christopher Goes 33c8238392 Merge branch 'develop' into cwgoes/check-supply-in-simulation 2018-10-23 17:54:58 +02:00
Christopher Goes c14fa12b0c Back to 50 initially bonded 2018-10-23 15:55:06 +02:00
rigelrozanski 8999ee8797 re-enable simulation parameters 2018-10-23 00:53:06 -04:00
Jae Kwon fa3730a5d2 WIP looking for bug... 2018-10-22 19:48:28 -07:00
Jae Kwon 1630c0f0f3 WIP intermediate... 2018-10-22 19:02:52 -07:00
Jae Kwon c3008d585b Add more useful logging 2018-10-22 16:24:19 -07:00
Alessio Treglia 6014089fa1
Rename AccountMapper to AccountKeeper
Closes: #2540
2018-10-20 23:22:48 -07:00
Christopher Goes 1afb5bf9d2 Simulate minting, fix bug where pool was not updated 2018-10-19 23:01:23 +02:00
Christopher Goes 22cb6983b7 Merge branch 'develop' into cwgoes/check-supply-in-simulation 2018-10-19 20:36:55 +02:00
Rigel b48d0d5623 Merge PR #2527: Minting 2018-10-19 20:36:00 +02:00
Christopher Goes 4779359e29 Linter, enable simulated distribution msgs again 2018-10-19 03:21:11 +02:00
Christopher Goes 42ae2671c2 Simulation fixes work-in-progress 2018-10-19 03:08:25 +02:00
Christopher Goes e099491daa
Merge PR #2526: Distribution fixes from simulation 2018-10-18 21:58:57 +02:00
Christopher Goes b700107bec Add simulated distribution msgs 2018-10-17 00:25:31 +02:00
rigelrozanski 5de0c9a1f8 Merge remote-tracking branch 'origin/develop' into rigel/fee-distribution 2018-10-15 02:43:36 -04:00
mossid 03975407ba Merge branch 'develop' into joon/paramstore-refactor-base 2018-10-10 21:20:59 +09:00
rigelrozanski 600532575b Merge remote-tracking branch 'origin/develop' into rigel/fee-distribution 2018-10-08 20:15:17 -04:00
Sunny Aggarwal cd21427a7b Merge PR #2405: Unbonding and Redelegations Queue 2018-10-08 06:43:47 +02:00
mossid 4bf14c5650 apply request finalize, fix lint 2018-10-07 01:12:01 +09:00
mossid 37ce8d51c6 apply requests 2018-10-07 01:12:00 +09:00
mossid cc0e2c9523 paramstore refactor base
rm debug code

fix lint

fix hack.go
2018-10-07 01:11:59 +09:00
rigelrozanski e304b9c600 debugging simulation 2018-10-05 20:32:06 -04:00
Dev Ojha 9410b6287c Merge PR #2425: simulation: Make bank testing auth configurable 2018-10-02 14:01:18 +02:00
ValarDragon bb624b36aa simulation: Use a simulation.Account struct
This removes privkeys and addresses from function signatures.
This comes with a 11% performance improvement to the simulator,
as we no longer keep recomputing the pubkeys.
Once we move the transient store clearing to endblock, we can
further raise the size of make test_sim_gaia_fast

concretely, `make test_sim_gaia_fast` went from 16.8 seconds to 13.5 seconds on my system.
2018-09-22 20:33:32 -07:00
Rigel 5bf9401e87
Merge PR #2310: staking transient store for Tendermint Updates
* working

* non-tests compile

* fix mounting error, working on testing

* stumped using transient store

* joon comments

* remove old comments

* resolve ibc error

* lint/sim_test

* fix determinism sim test

* sim enable commit

* docs and pending
2018-09-13 00:53:55 -04:00
Dev Ojha e5e7c4fa0f Merge PR #2303: simulation: Add weighted operation 2018-09-12 15:16:52 +08:00
Dev Ojha 962b04d985 Merge PR #2285: simulation: Write logs on panic 2018-09-11 17:18:58 +08:00
Dev Ojha 173ed6a63d Merge PR #2282: simulation: Switch the log method from a single string to string builders 2018-09-09 23:34:09 +08:00
ValarDragon e812919649 Rename coinKeeper -> bankKeeper
Closes #2267
2018-09-07 22:34:32 -07:00
Christopher Goes 44b695c3c0
Merge PR #2226: simulation: Make governance simulation use future operations to schedule votes 2018-09-07 19:01:33 +02:00
ValarDragon 5ed24e44d2 simulation: Minor changes
Now that we properly initialize governance, a ton of governance slashing
doesn't happen in the first few blocks. Because of this, we can run through
blocks in the range (0,200) quite rapidly. This PR acknowledges that and
increases many of the default block heights.
2018-09-03 19:15:51 -07:00
ValarDragon 753e58bac0 simulation: Make governance simulation use future operations to schedule
votes.

In a future PR, functionality to test that slashing occured properly should be added.
2018-09-03 18:30:18 -07:00
ValarDragon 8a452b940a simulation: display db size at end of simulation, add makefile entries 2018-09-01 19:09:27 -07:00
Dev Ojha 5643c0801b Merge branch 'develop' into dev/benchmark_simulation 2018-09-01 12:37:50 -07:00
ValarDragon 3c2100793e Address @cwgoes comments 2018-09-01 12:32:24 -07:00