Commit Graph

123 Commits

Author SHA1 Message Date
frog power 4000 df4394185e
Merge PR #3656: Broken-Invar Tx - aka. Crisis module
* beginning thinking on issue

* ...

* working

* working

* working fee pool distribution

* spek outline

* spec update

* gas refund calculations

* simulation saved to ~/.gaiad/simulations/

* lean simulation output

int

* cleanup bank simulation messages

* operation messges

int

* lint

* move simulation to its own module

* move simulation log code to log.go

* logger overhaul

int

* distribution comments

* fix compiling

* cleanup modifications to x/distribution/keeper/allocation.go

int

int

int

* gov bug

* result.IsOK() minimization

* importExport typo bug

* pending

* address @alexanderbez comments

* simple @cwgoes comments addressed

* event logging unified approach

* distr module name constant

* implementing

* compiles

* gaia integration

* proper constant fee removal

* crisis genesis

* go.sum update

* ...

* debugging

* fix sum errors

* missing err checks

* working implementing CLI

* remove query command

* crisis expected keepers in other modules

* crisis testing infrastructure

* working

* tests complete

* modify handler to still panic if not enough pool coins, docs working

* spec tags

* docs complete

* CL

* assert invariants on a blockly basis gaiad functionality

* gaiad CL

* transaction details in runtime invariance panic

* Apply suggestions from code review

Co-Authored-By: rigelrozanski <rigel.rozanski@gmail.com>

* sender tags

* @mossid suggestions

int

* @cwgoes comments final

* Apply suggestions from code review

Co-Authored-By: rigelrozanski <rigel.rozanski@gmail.com>

* bug seems fixed (#3998)

* delete unused line in zero height export bug
2019-03-28 19:27:47 -04:00
Jack Zampolin 38b7c0705c Implement client functionality for the community pool (#3939)
Fixes: #3937
2019-03-28 01:05:36 +00:00
Alexander Bezobchuk 59765cecb1 Merge PR #3857: Remove Shares Concept from Unbond/Redelegate UX
* Remove shares concept from unbonding and redelegation

* Remove redundant staking REST type declerations

* Rename staking REST request types

* Fix slashing tests

* Fix staking tests

* Fix integration tests

* Add safety checks for when validator tokens are zero

* Attempt to fix simulation

* Add pending log entry

* Update docs

* Implement and use SharesFromTokens

* Rename ShareTokens and ShareTokensTruncated

* Rename Delegation to Amount in DelegateRequest

* Implement and use SharesFromTokensTruncated

* Update MsgDelegate to use Amount instead of Value

* Use constructors in staking sim messages

* Implement and use ValidateUnbondAmount
2019-03-25 17:13:02 -04:00
frog power 4000 f0d1efa43c Merge PR #3819: Simulation Refactor 2019-03-14 19:13:15 +01:00
Alexander Bezobchuk b316c477c1 Merge PR #3836: Fix WithdrawValidatorCommission 2019-03-12 16:10:20 +01:00
Alessio Treglia fbd79d0cad Merge PR #3818: Introduce sdk.NewCoins 2019-03-07 16:55:08 -08:00
Christopher Goes 4c50380181
Merge PR #3750: Outstanding per-validator rewards; correctly handle same-BeginBlock redelegation-double-slash 2019-03-06 19:54:12 +01:00
Jae Kwon 10bd98e58e Merge PR #3717: Allow the undelegation of more coins than were delegated; More validity checks. 2019-02-27 22:09:26 +01:00
Jae Kwon 7e08b62f4e Merge PR #3726: Cap(clip) reward to remaining coins in AllocateTokens 2019-02-27 21:38:57 +01:00
Christopher Goes 7cddda7b05 Merge PR #3728: Alternative negative coins fix (floor multiplication) 2019-02-26 10:23:11 -08:00
Alexander Bezobchuk b9be1166f7 Merge PR #3673: Message & Codec Registration Consistency 2019-02-25 16:16:52 +01:00
frog power 4000 a814e5ce66
Merge PR #3679: Consistent Operators
* Minus->Sub Plus->Add Div->Quo

* pending

* Update PENDING.md

Co-Authored-By: rigelrozanski <rigel.rozanski@gmail.com>

* fix

* typo
2019-02-21 12:35:55 -05:00
frog power 4000 ab9de3a7f1
Merge PR #3680: Convenience ToDec()
* NewDecFromInt -> ToDec

* pending

* Update PENDING.md

Co-Authored-By: rigelrozanski <rigel.rozanski@gmail.com>

* test typo

* typo
2019-02-21 03:05:31 -05:00
Alexander Bezobchuk 26c13b28cd Merge PR #3607: Reconcile DecCoin/s API with Coin/s API 2019-02-15 16:33:23 +01:00
frog power 4000 d66db6a772 Merge PR #3621: module inter-dependency cleanup 2019-02-13 15:01:50 -08:00
Sunny Aggarwal cff985ffc5 Merge PR #3546: Min Self Delegation 2019-02-08 12:44:19 -08:00
Christopher Goes 38068a59ea Merge PR #3507: Results from x/staking & x/slashing peer review 2019-02-07 17:41:23 -08:00
frog power 4000 52f2ec71a9
Merge PR #3400: power reduction for Tendermint
* add uncompiled power functionality

* fix some compile errors

* Power -> TendermintPower

* tests rename GetTendermintPower

* test fix

* working

* fix delegation tests

* fix slash tests

* staking/keeper tests passing

* docs reversion

* debuggin workin

* x/staking test pass

* fix gov tests

* fix x/slashing tests

* working distribution test fixes

* fix distribution tests

* lint

* fix lcd tests

* fix gov test

* lint

* CLI fixes, rm stakingTypes

* typos

* working cli fixes

* cli test fix

* cli tests fixed

* testnet creation modification

* typo

* pending

* Sanitize Dec.Roundint64 (#3475)

* merge fixes

* @cwgoes comments

* fix tests

* change power reduction to 10^-6

* option to turn off minting for LCD tests
2019-02-05 21:30:48 -08:00
Joon f15ad04a57 Merge PR #2605: Paramstore Subkey 2019-02-04 18:13:04 -08:00
Alessio Treglia a2b73c8ab4 Merge PR #3460: Implement fee distribution RESTful endpoints 2019-02-04 16:45:18 -08:00
Alexander Bezobchuk 3864d5b1bd Query all Delegator Distribution Rewards (#3433) 2019-01-29 16:06:38 -08:00
Alessio Treglia f16cc31919 Merge PR #3403: Implement parameter-controlled bank/send switch-off 2019-01-29 04:06:48 +01:00
Jack Zampolin af60c75dd3 Merge PR #3352: Reenable simulation tests 2019-01-24 22:01:32 +01:00
Christopher Goes b5e245fee3
Merge PR #3333: F1 storage efficiency improvements 2019-01-23 12:37:03 +01:00
frog power 4000 7f789d2ed3
Merge PR #3281: Staking Spec Upgrade
* remove kv seperation for marshalling

* pending

* cleanup

* cleanup x2

* pending

* working

* minor refactors

* entry structs defined

* uncompiled mechanism written

* add many compile fixes

* code compiles

* fix test compile errors

* test cover passes

* ...

* multiple entries fix

* ...

* more design fix

* working

* fix test cover bug

* Update PENDING.md

* update comment around queue completion for redelegations/ubds

* basic spec updates

* spec folder cleanup

* cleanup docs folder cont.

* ...

* find-replace and folder rename

* supplimentary find/replace

* pending

* supplimentary

* pending

* few undos, stakingd -> staked

* to staking -> to stake

* undos

* most staking -> most stake

* ...

* undos

* simplestake->simplestaking

* ...

* pending update

* capital letter replacements

* ...

* working

* staking doc updates from rigel/delegation-index branch

* spec-spec

* spec-spec

* LooseTokens -> NotBondedTokens

* staking state.md updates

* updates to hook and endblock spec

* Update docs/gaia/gaiacli.md

Co-Authored-By: rigelrozanski <rigel.rozanski@gmail.com>

* Update docs/gaia/validators/validator-setup.md

Co-Authored-By: rigelrozanski <rigel.rozanski@gmail.com>

* Update docs/gaia/validators/validator-setup.md

Co-Authored-By: rigelrozanski <rigel.rozanski@gmail.com>

* comment undo

* remove ErrConflictingRedelegation

* @cwgoes comments are resolved

* further updates to endblock and state

* msg json update

* working transaction updates

* working

* complete transaction rewrite

* PENDING.md

* typo

* add todo

* address @jackzampolin @cwgoes comments

* couple leftover comments, rename

* Update x/staking/types/pool.go

Co-Authored-By: rigelrozanski <rigel.rozanski@gmail.com>

* cwgoes additions

* cwgoes suggestions x2
2019-01-21 19:52:03 -05:00
Christopher Goes f65ae49356
Merge PR #3319: Distribution Queriers & CLI query commands 2019-01-18 20:38:40 +01:00
Christopher Goes 0684a42d9f
Merge PR #3292: Enable/disable withdraw addresses with a parameter 2019-01-16 23:17:56 +01:00
Christopher Goes 2942f83ff5
Merge PR #3099: F1 fee distribution 2019-01-16 22:38:05 +01:00
frog power 4000 78a21353da Rename stake/ to staking/ (#3280) 2019-01-11 12:08:01 -08:00
Jack Zampolin b16af44271 Merge PR #3076: Rename hooks from Before -> Pre and On -> Post
* Rename hooks from Before -> Pre and On -> Post

* Fix lint error

* Update x/slashing/hooks.go

Co-Authored-By: jackzampolin <jack.zampolin@gmail.com>

* Ignore linter warnings on hooks file

* swap 171, 172 for clarity (my own comment)
2019-01-09 00:28:46 -05:00
frog power 4000 a98a5a056a
Merge PR #2958: Validator Power Dec-> Int
* Validator Power Dec-> Int, working

* non-test code compiles

* working, many test compile fixes

* all test compile errors resolved

* ...

* slashing test fixes minor

* test cover passes

* invariant rounding issue

* comment update

* PENDING and doc updates

* @cwgoes comments

* RemoveDelShares trimmings to the final delegation share

* fixes

* ...

* fix the oopsie

* @alexanderbez comments

* merge fixes

* address @cwgoes comments
2019-01-02 15:29:47 -05:00
Alexander Bezobchuk 217a2925dc Auth Module Param Store (#2998) 2018-12-20 11:09:43 -08:00
Jae Kwon 192ad58431
Merge pull request #3166 from cosmos/cwgoes/gos-patch-1
Merge GoS point release back to develop
2018-12-19 16:43:02 -08:00
Christopher Goes 3387261e6b Add comment outlining safety of commission-withdraw (#3175) 2018-12-19 14:36:25 -08:00
Jack Zampolin 14ebc65daf Merge PR #3119: Move all store keys into constants
* Move all store keys into constants
* Fix lint issue
* Add Pending.md
* QuerierKey -> QuerierRoute
2018-12-19 20:58:30 +01:00
Hendrik Hofstadt 2be19b9d33 Merge PR #3163: Withdraw commission on self bond removal
* Withdraw commission on self bond removal
* Update PENDING.md
2018-12-19 17:05:33 +01:00
Alessio Treglia 24a1670cf0 Run make format 2018-12-10 14:27:25 +00:00
Jae Kwon bc51fa93b6
Fix updateValidatorDistInfoFromPool (#3046)
Fixes regression introduced by #2984.
Continuiation of #3033 , which didn't fix the simulation issues.
(candidate) Complete solution for #3019, 9002 halt bug.

From #2984, it isn't sufficient to take the fee pool rewards of a validator. Since we don't track delegator accums (as we do with validator accums), and because onValidatorModified >updateValidatorDistInfoFromPool is also being called upon delegation updates (or at least I believe this is the reason), it is necessary to also withdraw self delegation.

TODO: I don't think self-delegation should be required to be modified here... consider using a delegation hook to do the self-delegation withdraw part instead, e.g. splitting the updateValidatorDistInfoFromPool function into two. It might not result in cleaner code, however. Think hard.
2018-12-08 07:18:04 -08:00
Alexander Bezobchuk 6395e2a7ab Merge PR #2984: Removal of Mandatory Self-Delegation Reward
* Some minor cleanup and reformatting to make things easier to understand

* Update onDelegationSharesModified hook

* Add pending log

* Address PR comments

* Fix linting
2018-12-04 17:53:52 -05: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
Jae Kwon 7ec2b9a72b Fix merge conflict issues from previous squash commit 2018-11-26 04:27:23 -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
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
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
Alexander Bezobchuk 50926fffff Update to TM v0.26.0 - Part I (#2679)
* Update to TM v0.26.0
2018-11-04 18:28:38 -08:00
Rigel d71f38bdac Merge PR #2597: Add distribution accum invariants 2018-10-26 13:42:53 +02:00
Jae Kwon 0f1fb179c4 Merge PR #2599 from cosmos/jae/dist_refactor
* Rename Pool -> DelRewards; PoolCommission -> ValCommision
* FeePool.Pool -> FeePool.ValPool
* WithdrawalHeight->DelPoolWithdrawalHeight
* OnValidatorBeginUnbonding
* Caught the bug's tail
* Update vi.FeePoolWithdrawalHeight upon bonding
* Fix staking slashUnbondingDelegation bug; fixes simulator failure #9
2018-10-26 13:27:55 +02:00
Christopher Goes 2a279e954f Remove logs from prior debugging 2018-10-25 13:22:54 +02:00
Jae Kwon f756b40a01 LastValidatorPower is also an Int 2018-10-24 00:04:06 -07:00