Commit Graph

476 Commits

Author SHA1 Message Date
mossid 9d809d7855 Merge branch 'develop' into joon/2406-move-linear 2018-10-16 03:18:04 +09:00
rigelrozanski 5de0c9a1f8 Merge remote-tracking branch 'origin/develop' into rigel/fee-distribution 2018-10-15 02:43:36 -04:00
Sunny Aggarwal 6c9e71b654 Merge PR #2451: implement validator queue
* unbonding redelegation queue

* address some of bez and chris review

* delete old timeslices from queue

* added Rigel's test case

* added end-time to tags

* fixed bug in staking

* removed prints

* Get -> Queue

* called Endblocker in test

* implement validator queue

* Docs and PENDING

* address federicos comments

* unexposed UnbondingToUnbonded

* no copying unbonded val array to memory
2018-10-14 20:37:06 -04:00
rigelrozanski 06fa518e30 address @cwgoes comments, add in precommit calculation 2018-10-12 07:15:13 -04:00
rigelrozanski f3c0496c99 TestWithdrawDelegationRewardsAll 2018-10-12 04:11:09 -04:00
rigelrozanski 3b5e57be08 ctx with proposer, working through allocation test 2018-10-10 17:43:47 -04:00
mossid 03975407ba Merge branch 'develop' into joon/paramstore-refactor-base 2018-10-10 21:20:59 +09:00
mossid 0c92477b4d mv types/lib/* store/ 2018-10-09 22:23:22 +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
Dev Ojha 869d85fba5 Merge PR #2453: Update to tm version v0.25.0 2018-10-08 06:08:20 +02:00
mossid 7a68b376bd apply requests in progress 2018-10-07 01:12:01 +09:00
Aleksandr Bezobchuk 2aad1bd1b0 Minor doc and formatting updates 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 45f0dd0e3b Merge remote-tracking branch 'origin/develop' into rigel/fee-distribution 2018-10-04 18:33:12 -04:00
rigelrozanski 1e74da1abe validator_info tests 2018-10-04 03:00:24 -04:00
Christopher Goes 17983460b8
Merge PR #2219: Update to Tendermint 0.24 (except NextValSet offsets) 2018-10-03 17:48:23 +02:00
rigelrozanski 0436f50c00 ... 2018-09-27 19:54:41 -04:00
Alexander Bezobchuk 8ca8acf638 Merge PR #2357: Refactor Iterator Gas Consumption 2018-09-26 22:02:56 +08:00
Dev Ojha 9e27e4bac5 Merge PR #2386: types/coins: Add benchmarks for coins addition 2018-09-26 21:15:37 +08:00
Dev Ojha e11c52e873 Merge PR #2408: decimal: Add a method to multiply a decimal by an Int
This is for usage within the slash function, to minimize operations
required to slash each unbonded and redelegating account.
2018-09-26 18:13:40 +08:00
Rigel b54801b4b3 [RETRY] Distr-PR-3 More staking hooks (#2404)
* update commission hook for new commission work
* comment update
2018-09-25 23:11:57 -07:00
rigelrozanski 3846894c3a Merge branch 'rigel/new-hooks' into rigel/fee-distribution 2018-09-25 20:09:33 -04:00
rigelrozanski 9e9756a6a9 Merge remote-tracking branch 'origin/develop' into rigel/new-hooks 2018-09-25 18:31:12 -04:00
rigelrozanski 910af2066f Merge commit '5be5ea3' into rigel/new-hooks 2018-09-25 18:26:24 -04:00
rigelrozanski d3146bf06d ... 2018-09-25 18:02:22 -04:00
rigelrozanski 380d3e1c5a pull a bunch from develop 2018-09-25 17:43:26 -04:00
Matthew Slipper 2fb3493ff5 Merge PR #2223: Gaia CLI Config Command
* Allow a gaia-cli config file to be created

Closes #1613.
Closes #1275.
Closes #1956.

* Add homedir to Gopkg.toml

* Updates from code review

* Post-rebase fixes

* Update test

* Code review refactor

* Fixes from code review

* Fix import

* Fix broken test

* Fixes from rebase

* Fix formatting
2018-09-25 17:36:42 -04:00
Matthew Slipper 24413a395d Merge PR #2073: Allow --from to be a name or an address
* Allow --from to be a name or an address

Closes #1735.

* Post-rebase fixes

* Updates from code review

* Updates from code review

* Updates from code review

* Fix merge artifacts

* Fix merge conflicts

* Fix integration tests

* Add back GetFromName() check broken during merge

* Code review updates

* Fix failing test

* Updates from code review
2018-09-25 16:48:38 -04:00
Alexander Bezobchuk 611e287375 Merge PR #2401: Remove remnants of gocyclo 2018-09-25 13:45:04 -04:00
Rigel de30281afa Distr-PR-2 Truncate Decimal Functionality (#2379) 2018-09-24 21:18:18 -07:00
Rigel 6b595842ed Distr-PR-1 Staking ConsPubKey -> ConsAddr index (#2369)
* pulling in stuff from fee-distr PR
* revert some gov changes
* fix using cons address, also remove old commented distr code
* doc update
* val comments
* remove GetValidatorByConsPubKey
2018-09-24 21:09:31 -07:00
rigelrozanski 5be5ea3b4c comment update 2018-09-24 23:07:55 -04:00
rigelrozanski f5116b9d57 Merge branch 'rigel/truncate-decimal' into rigel/new-hooks 2018-09-24 22:52:12 -04:00
rigelrozanski ff8d7486a2 Merge branch 'rigel/stake-cons-addr' into rigel/truncate-decimal 2018-09-24 22:51:14 -04:00
rigelrozanski 16594f7daf Merge remote-tracking branch 'origin/develop' into rigel/stake-cons-addr 2018-09-24 21:54:30 -04:00
rigelrozanski afe179ebb3 remove GetValidatorByConsPubKey 2018-09-24 21:51:24 -04:00
Alexander Bezobchuk 9dafa3252d Merge PR #2365: Validator Commission Model
* Update validator commission fields

* Remove CommissionChangeToday and update to use CommissionChangeTime

* Implement commission as a first class citizen type

* Implement stringer for Comission

* Move commission type and logic to new  file

* Add new commission errors

* Add commission to create validator message

* Implement and call UpdateValidatorCommission

* Update godoc for UpdateValidatorCommission

* Add Abs to the decimal type

* Implement new SetValidatorCommission

* Update decimal short godocs

* Move set initial commission logic

* Move initial commission validation to Commission type

* Update initial validator commission logic and unit tests

* Remove commission update time from struct and move to validator

* Update validator create handler tests

* Implement commission logic for CLI

* Fix make lint failure

* Fix make cover failure

* Update edit validator logic to handle new commission rate

* Fix lint and cover

* Update create/edit validator simulation to include commission params

* Update MsgEditValidator godoc

* Update pending log

* Update staking tx docs

* Fix CLI create validator test

* Update variables names for commission  strings

* Merge UpdateTime into Commission type

* Update create-validator usage in docs

* Update more docs with examples

* More doc updates
2018-09-24 18:23:58 -04:00
rigelrozanski 6f35822d7d import hook from fee-distr 2018-09-22 16:29:42 -04:00
rigelrozanski d428317f91 import decimal from fee-distr PR 2018-09-22 13:56:48 -04:00
rigelrozanski 9e2b8e413d revert some gov changes 2018-09-20 21:22:28 -04:00
rigelrozanski 0f903bdd52 finished pulling in, compiles 2018-09-20 21:17:50 -04:00
rigelrozanski 0d9105cf7c ... 2018-09-20 20:10:26 -04:00
rigelrozanski d36030424e breakout use of GetValidatorByConsAddr 2018-09-20 15:36:32 -04:00
rigelrozanski 5dabd1bf6d the errors never want to seem to end... 2018-09-19 22:54:46 -04:00
rigelrozanski 18fdccf95b ... 2018-09-19 22:13:12 -04:00
rigelrozanski d9396ed732 working compile errors 2018-09-19 19:33:12 -04:00
rigelrozanski 97f7dbc5e6 Merge remote-tracking branch 'origin/develop' into rigel/fee-distribution 2018-09-19 13:25:23 -04:00
Alessio Treglia b74a6a9066 Merge PR #2328: Support min fees-based anti spam strategy 2018-09-19 23:25:52 +08:00
rigelrozanski 24e43b9869 hookwork 2018-09-18 12:46:04 -04:00
rigelrozanski 431fdb8695 hook, genesis, and withdraw address 2018-09-17 23:02:15 -04:00
rigelrozanski 2eff69a575 Merge remote-tracking branch 'origin/develop' into rigel/fee-distribution 2018-09-17 17:53:42 -04:00
Dev Ojha 65137f6331 Merge PR #2343: Add a name field to the message type
This is to facillitate ease of implementing #1406. (Tags for messages
could then be added dynamically)

Ultimately once we make the router support hiearchical routing, (#770)
we can then remove the name field and just the parse info for tags from that.

Until then, we can parse the tag name as
`fmt.Sprintf("%s %s", msg.Type(), msg.Name())`
2018-09-17 22:34:06 +08:00
Dev Ojha 6b55093c75 Merge PR #2324: rename wire to codec
* rename wire to codec

* fix formatting and cli

* fix the docs
2018-09-13 14:17:32 -04:00
rigelrozanski 7d864fee11 Merge remote-tracking branch 'origin/develop' into rigel/fee-distribution 2018-09-10 18:42:26 -04:00
rigelrozanski e498d43d03 dec coins, refactoring distr 2018-09-10 18:37:58 -04:00
Alexander Bezobchuk 0edfa17b53 Merge PR #2251: Refactor Bech32 Prefixes and Nomenclature of Validator Pubkey and Operator 2018-09-08 16:44:58 +08:00
rigelrozanski 545c3c300e Merge remote-tracking branch 'origin/develop' into rigel/minor 2018-09-07 00:50:08 -04:00
rigelrozanski 51d3a39b39 move types/account -> address 2018-09-05 18:47:21 -04:00
Jeremiah Andrews 2378e3431c Fix linter errors 2018-09-03 07:58:57 -07:00
LLLeon efb3b95476 types: fixed the error returned from AccAddress unmarshal 2018-09-01 19:14:17 +08:00
Christopher Goes 1204857694 Merge PR #2122: Implement slashing period
* Update PENDING.md

* SlashingPeriod struct

* Seperate keys.go, constant prefixes

* Make linter happy

* Update Gopkg.lock

* Seek slashing period by infraction height

* Slashing period hooks

* Slashing period unit tests; bugfix

* Add simple hook tests

* Add sdk.ValidatorHooks interface

* No-op hooks

* Real hooks

* Fix iteration direction & duplicate key, update Gaia

* Correctly simulate past validator set signatures

* Tiny rename

* Update dep; 'make format'

* Add quick slashing period functionality test

* Additional unit tests

* Use current validators when selected

* Panic in the right place

* Address @rigelrozanski comments

* Fix linter errors

* Address @melekes suggestion

* Rename hook

* Update for new bech32 types

* 'make format'
2018-08-31 20:01:23 -04:00
Rigel b92ac313ac
Merg PR #2198: Ensure Legacy Validator Delegation Invariants
* Test and allow jailed validator to self-bond

* Implement TestJailedValidatorDelegations

* Restructure TestJailedValidatorDelegations

* Add Delegation to Validator type and update handleMsgUnjail accordingly

* Update ErrMissingSelfDelegation error message

* Update democoin mock validator set impl

* Update pending log

* Add comment to ValidatorSet

* Fix conflicts/errors due to develop merge
2018-08-31 15:21:12 -04:00
Rigel ee0434e5a7
Revert "Merge PR #2176: Ensure Legacy Validator Delegation Invariants" (#2197)
This reverts commit df33452490.
2018-08-31 00:55:33 -04:00
Alexander Bezobchuk df33452490 Merge PR #2176: Ensure Legacy Validator Delegation Invariants
* Test and allow jailed validator to self-bond

* Implement TestJailedValidatorDelegations

* Restructure TestJailedValidatorDelegations

* Add Delegation to Validator type and update handleMsgUnjail accordingly

* Update ErrMissingSelfDelegation error message

* Update democoin mock validator set impl

* Update pending log

* Add comment to ValidatorSet
2018-08-31 00:10:51 -04:00
Alexander Bezobchuk 2d92803b9f Merge PR #2040: Refactor Validator Account Types/Bech32 Prefixing
* Add new account bech32 prefixes with godocs

* Restructure spacing of existing account code

* Update account godocs

* More account godoc updates + new tm pub/addr helpers

* Update validator type to use new account types/bech32 prefixes

* Fix account documentation errors

* Update Bech32 prefix for consensus nodes

* Update Bech32 spec doc

* Fix account type tests

* Add missing account consensus functions, clear up godocs, and fix tests

* Add to TestRandBech32PubkeyConsistency check

* Update initialization of validator public keys

* Update query signing info command

* Implement new ConsAddress type with associated unit tests

* [WIP] Update stake and slashing parameters

* Update all calls to MustBech32ifyValPub

* [WIP] Validator operator API updates

* [WIP] Fix and update unit tests

* Fix gov logs (helping to debug failing tests)

* Fix gov tally

* Fix all broken x/ unit tests

* Update gaia app genesis address logic

* Fix linting errors

* Fix broken LCD tests

* Fix broken CLI tests

* Implement command to get validator address and pubkey from key name

* Add support for getting validator key information via REST endpoint

* Update PENDING log

* Update docs

* Revert GaiaGenTx.PubKey bech32 prefix

* Fix broken docs and cli tests

* Update genesis to use correct Bech32 (cons) prefix for pubkeys

* Update docs and unit tests to reflect new cosmos account bech32 prefix

* minor formatting
2018-08-31 00:06:44 -04:00
Alessio Treglia 76a16ab288
Modify AnteHandler to take a simulate boolean parameter 2018-08-25 20:12:14 +01:00
Federico Kunze f143c92ca6 Addressed Chris and Dev's comments 2018-08-23 12:02:12 +02:00
Federico Kunze 1ec9d16d94 Merge branch 'develop' of https://github.com/cosmos/cosmos-sdk into fedekunze/2044-JSON-err-msgs
Merge develop
2018-08-23 11:31:37 +02:00
Christopher Goes 879f78cfc0 Rename revoke(d) to jail(ed) 2018-08-22 17:56:13 +02:00
Federico Kunze 11ee255f11 Delete unnecesary line 2018-08-22 16:16:56 +02:00
Federico Kunze 092a178c12 Parsed Error msgs and added tests 2018-08-22 16:15:45 +02:00
Sunny Aggarwal 5ae20d2d51 address Chris's comments 2018-08-22 00:15:18 -07:00
Sunny Aggarwal 97f7b88a9f addressed Jae's comments 2018-08-22 00:15:18 -07:00
Sunny Aggarwal 1311117658 added to gov rest 2018-08-22 00:12:44 -07:00
Sunny Aggarwal 804baa70f4 added querier to gov module 2018-08-22 00:12:44 -07:00
Sunny Aggarwal 1d1a95656a custom queriables 2018-08-22 00:11:23 -07:00
Ethan Buchman af73b885e7 Merge branch 'develop' into bucky/merge-master 2018-08-19 16:24:45 -04:00
Alessio Treglia 187bc1972a Merge PR #1950: Validator.Owner -> .Operator
* Rename --address-validator flag to --validator

See #1901

* Update PENDING.md

* Rename Validator.Owner -> Validator.Operator

See #1901
2018-08-16 16:47:59 -04:00
Christopher Goes 3d50567034
Merge PR #1783: Slashing, validator set, and governance simulation 2018-08-16 17:36:15 +02:00
Dev Ojha d37de06762 decimal: Remove unnecessary allocation in bankers round chop (#2030)
This is done by making the function mutative. A non-mutative variant
is created for functions that depend on it being non-mutative.
2018-08-14 21:49:40 -04:00
Rigel d9dc061b4f
Merge pull request #1819: rational -> decimal
* changelog

* ...

* decimal func working

* decimal complete, untested

* fixing tests

* decimal compile errors resolved

* test compile errors

* precision multiplier test

* 1% laptop battery

* fixed TestNewDecFromStr

* equalities working

* fix bankers round chop

* ...

* working, some decimal issues resolved

* fix rounding error

* rounding works

* decimal works

* ...

* deleted rational

* rational conversion working

* revert changelog

* code compiles (not tests)

* went through all NewDec, made sure they were converted from NewRat properly

* test debugging

* all testing bugs besides the json marshalling fixed

* json unmarshal

* lint

* document update

* fix lcd test

* cli test fix

* mostly undo Dece -> Rate

* val comments

* Efficiency improvements

This now caches all of the precision multipliers (as they were all
used in non-mutative functions), and caches the precisionInt calculation.
(Now it just copies the already calculated value)

* Cache another precisionInt() call.

* Improve banker rounding efficiency

* remove defer, make negation in-place.

* chris val comments

* bez comments

* Aditya comments

* ...

* val comments

* rebasing start

* ...

* compiling

* tests pass

* cli fix

* anton, cwgoes, val comments

* val and jae comments

* type

* undo reuse quo
2018-08-14 20:15:02 -04:00
Dev Ojha 10199c9159 Merge PR #1936: types: Reduce size of TestImmutability<Arith\U>Int tests
Currently they take ~1 minute on circle CI. There isn't a significant reason
for this to delay all our tests. This commit reduces the time spent on these
tests by a factor of 20.
2018-08-08 12:05:20 +02:00
Christopher Goes 46382994a3
Merge PR #1925: Fix develop from FF merge
* Update types/coin_test.go from FF merge
* 'make format'
2018-08-06 21:49:17 +02:00
Joon 93457aac33 Merge PR #1626: Increase coverage of types/ 2018-08-06 21:00:49 +02:00
Joon 19b0781e60 Merge PR #1811: NewCoin takes sdk.Int 2018-07-31 02:09:50 +02:00
Joon d46140a392 Merge PR #1481: Transient Stores 2018-07-27 03:24:18 +02:00
Dev Ojha 5d02a743fb Update to tendermint v0.22.6-rc0 (#1798)
* Update to tendermint v0.22.6-rc0

This is comprised of updating the crypto imports / API

* (squash this) switch to v0.22.6

If this passes tests, I'll squash this commit and update the PR.
2018-07-25 16:43:37 -04:00
Christopher Goes 4b7f6efd87
Merge PR #1805: Downtime slashing off-by-one-block fix
* Avoid slashing & revoking no longer stored or already revoked validators for downtime
* Add testcase
* Update PENDING.md
2018-07-25 04:12:48 +02:00
rigelrozanski 423d0c4a18 Merge remote-tracking branch 'origin/develop' into cwgoes/a-random-walk-down-proof-of-stake 2018-07-19 01:56:42 -04:00
Christopher Goes cbf432d34c
Merge PR #1746: Remove ctx.IsCheckTx
* Remove ctx.IsCheckTx
* Changelog to Pending
* Typo
* Simulate instead of Check in SignCheckDeliver
* Add descriptive comment
* Change to 'CheckTx implements ABCI'
* Alphabetize changelog
2018-07-19 02:42:19 +02:00
Christopher Goes cea2be6107 Fix loose tokens invariant 2018-07-18 09:42:18 +02:00
Christopher Goes a6dd96db4d Merge branch 'develop' into cwgoes/a-random-walk-down-proof-of-stake 2018-07-17 02:23:10 +02:00
Dev Ojha 4b688992ba Merge pull request #1691: Table driven test indexes
* types: Switch table driven test error messages to new format

Make table driven tests in /types follow the format described in #1664

* typos / lower case errors

* lower case, not sentences

* lower case, not sentences
2018-07-16 14:42:28 -04:00
Christopher Goes 405bb538fc Merge branch 'master' into cwgoes/a-random-walk-down-proof-of-stake 2018-07-14 02:09:41 +02:00
Rigel 3231daa4d8 remove global shares (#1644)
* wip removing pool shares

* remove PoolShares/Tokens entirely

* worked through stake/type compile error

* work through a bunch of keeper errors

* worked through compile errors

* debugging tests

* resolve compilation error

* resolved types errors

* ...

* move inflation to pool type

* ...

* stumped problem

* Calculate newly issued shares, remove unnecessary pool arg from exchange rate calculation

* Rounding changed

* Update x/slashing tests for sdk.Rat BondedTokens

* testing fixes

* resolved test fixes

* cwgoes comments, changelog, lint

* cli bugfixes

* ..

* cli fixed

* spec update

* 'make format'

* cwgoes comments

* Increase test_cover parallelism
2018-07-13 21:46:14 +01:00
Jeremiah Andrews 43b9cc6df0 Merge PR #1533: Pruning Cleanup 2018-07-13 03:20:26 +02:00
Alexander Bezobchuk 5983a07fb6 Merge PR #1599: Implementation of TraceKVStore 2018-07-13 01:58:51 +02:00
Ethan Buchman c6827dfb43 fix post merge 2018-07-10 21:40:24 -04:00
Christopher Goes 940cfa98af Invariants & random Msgs in progress 2018-07-11 02:36:50 +02:00