Commit Graph

108 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
Sunny Aggarwal b7da2eaa33 Merge PR #2799: Account numbers and sequences to uint64 2018-11-26 12:29:21 +01:00
Sunny Aggarwal 8d6b0929fb Codespaces as Strings (#2821) 2018-11-16 09:12:24 -08:00
Sunny Aggarwal d1614ebb7e R4R: Query Gov Params (#2576)
* gov query params
2018-11-13 15:45:37 -08:00
rigelrozanski b1ba6a4455 add back in PeriodicInvariant 2018-11-09 10:31:56 -05:00
rigelrozanski bfc7944b55 val comments 2018-11-08 10:32:53 -05:00
rigelrozanski a9ef83bc4a compiling 2018-11-08 01:57:37 -05:00
rigelrozanski 5f289e5fdd event stats object, more general cleanup 2018-11-08 00:54:12 -05:00
rigelrozanski eb16a01666 util cleanup 2018-11-08 00:22:16 -05:00
rigelrozanski fee0763b5e mock tendermint 2018-11-08 00:12:51 -05:00
rigelrozanski ff327049ee assertAllInvarients changes, Operation reorg 2018-11-07 23:55:48 -05:00
rigelrozanski 1ee6c3295d operations functions 2018-11-07 23:26:02 -05:00
rigelrozanski 4970754338 fix some duplicate to get passing 2018-11-07 14:42:00 -05:00
rigelrozanski b5a205eb15 minimizing indentation 2018-11-07 12:19:58 -05:00
rigelrozanski 980dd78c62 rename ambig naming of queueOperations 2018-11-07 12:00:13 -05:00
rigelrozanski ea7a5ea1a8 reorganize more 2018-11-07 11:57:53 -05:00
rigelrozanski 78c3430bb3 moving stuff around a bit, trying to get rid of types 2018-11-07 11:00:24 -05:00
rigelrozanski 6a7c4d1c86 rand utile
...
2018-11-07 10:37:45 -05:00
rigelrozanski 74b2a90087 whitespacing 2018-11-07 10:28:18 -05:00
Jae Kwon 336415baea
Fix simulation bugs; Incorprates #2676 from Sunny (#2677)
* Fix simulation bugs; Incorprates #2676 from Sunny
* Address review feedback; Update PENDING
2018-11-04 22:11:03 -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 8e328c8706 Merge PR #2665: simulation: Remove header from Invariant
This got introduced recently, but wasn't actually needed, hence the reversion
2018-11-02 13:35:21 +01:00
ValarDragon 3cffe29da7 simulation: Make validator choice use validator set
This also had to change the default seed, since with the previous one it
actually got into a state where there were no validators left bonded, lol.

This also changes Unbond msgs from failing with almost 100% probability to now
only failing with 33% probability.
Thus more of the state machine is getting tested!
2018-11-01 12:45:22 -07:00
Christopher Goes fcf5b7764b
Merge PR #2622: Make simulation use a transition matrix for block size
Make simulation use a transition matrix for block size
This enables simulating periods of high load, and periods of low to no load.
(low load because future ops will still terminate in that time frame)
2018-10-31 20:10:35 +01:00
ValarDragon 835315dcaa move typedef 2018-10-31 10:11:41 -07:00
Aleksandr Bezobchuk 5e2efd999a perform minor doc and function cleanup 2018-10-31 17:37:50 +01:00
Dev Ojha 6316e1241e Merge PR #2644: Simulation: Print last block when there is an error
There was an off by one error in the log printing function previously
2018-10-31 12:04:46 +01:00
ValarDragon 206e51079c fix block offsets in printing simulation block number 2018-10-30 20:43:16 -07:00
ValarDragon 100f88800b address bez's comments 2018-10-29 09:37:42 -07:00
ValarDragon e4b5e2c9f3 Make simulation use a transition matrix for block size
This enables simulating periods of high load, and periods of low to no load.
(low load because future ops will still terminate in that time frame)
2018-10-28 21:37:19 -07:00
Rigel d71f38bdac Merge PR #2597: Add distribution accum invariants 2018-10-26 13:42:53 +02:00
Sunny Aggarwal d666658ca9 Merge PR #2553: Renamed msg.Name() and msg.Type() to msg.Type() and msg.Route() 2018-10-23 21:23:55 +02:00
Christopher Goes 6bf7e02a27 Back to on-operation=false, update PENDING.md 2018-10-23 18:10:06 +02:00
Christopher Goes 33c8238392 Merge branch 'develop' into cwgoes/check-supply-in-simulation 2018-10-23 17:54:58 +02:00
rigelrozanski 8999ee8797 re-enable simulation parameters 2018-10-23 00:53:06 -04:00
rigelrozanski 5a559f75c5 simulation stop early with no proposers 2018-10-22 23:55:49 -04:00
Alessio Treglia 6014089fa1
Rename AccountMapper to AccountKeeper
Closes: #2540
2018-10-20 23:22:48 -07:00
Christopher Goes 375e821e98 Merge branch 'develop' into cwgoes/check-supply-in-simulation 2018-10-19 20:02:48 +02:00
Alessio Treglia 593921d04d Merge PR #2524: Replace GenTx with StdTx
Rework the process of loading a genesis.json file to load a starting app state and set of initial transactions to process.

* New function to create genesis account from MsgCreateValidator
* Add arg to PrintUnsignedStdTx() to actually operate in offline mode
* New func processStdTxs()
* Remove gen-tx command
* Cleanup, return validators as they need to be written into genesis.json
* Modify gaiad init to allow auto-create of stdTx
* Remove server/testnet.go
* Don't load node_key.json, which might not be available
* Get the txs through DeliverTx
* Add app.slashingKeeper.AddValidators at the end of genesis
* On InitChain(), Signature's account number must be 0
* Add (tentative?) command to generate {node_key,priv_validator}.json files
* Reintroduce gaiad testnet
* Prompt user for passwords
* Update gaia to work with auth.StdTx
* Remove test_utils, NewTestGaiaAppGenState is now deprecated
* Combine --genesis-format and --generate-only
* Improve sign command's --offline flag documentation
* Moniker must be set
* Call app.slashingKeeper.AddValidators() even if len(txs) == 0
* Refactoring, introduce gaiad init --skip-genesis, code cleanup
* Drop unnecessary workaround to make lcd_tests pass
* Reintroduce gentx
* Simple name changes, GenesisState.Txs -> .GenTxs; OWK -> OverwriteKey; OverwriteKeys -> OverwriteKey
2018-10-19 20:00:27 +02:00
Christopher Goes d21f93afb0 Simulation debugging contd. 2018-10-19 03:55:14 +02:00
Christopher Goes 42ae2671c2 Simulation fixes work-in-progress 2018-10-19 03:08:25 +02:00
Christopher Goes 1d4b595006 Correctly set power in vote info 2018-10-17 00:34:16 +02:00
rigelrozanski ace19d9264 Merge branch 'rigel/fee-distribution' of https://github.com/cosmos/cosmos-sdk into rigel/fee-distribution 2018-10-09 20:37:47 -04:00
Christopher Goes 6d4975e2c2 R4R: Fix simulation proposer (#2460)
* Correctly set proposer in randomized simulation

* Return nil if no validators are present
2018-10-09 19:14:46 -04:00
Christopher Goes 482537e6c1
Merge PR #2430: Aggressive slashing simulation & fixes 2018-10-05 19:42:52 +02:00
Christopher Goes 48672c4c0b More comments, update sim for NextValSet 2018-10-04 18:22:51 +02:00
Rigel 324bdaf55d Merge PR #2394: Split up UpdateValidator into distinct state transitions applied only in EndBlock 2018-10-03 18:37:06 +02:00
Christopher Goes 17983460b8
Merge PR #2219: Update to Tendermint 0.24 (except NextValSet offsets) 2018-10-03 17:48:23 +02:00