Commit Graph

373 Commits

Author SHA1 Message Date
Alessio Treglia b74a6a9066 Merge PR #2328: Support min fees-based anti spam strategy 2018-09-19 23:25:52 +08: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
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
Ethan Buchman 3f44589861 Merge branch 'develop' 2018-07-10 20:31:05 -04:00
Christopher Goes 5a56c3f03d
Merge PR #1575: ready-for-review: sdk.AccAddress natively bech32 2018-07-10 04:18:23 +02:00
ValarDragon 17b5370c22 Continue fixing gocyclo errors 2018-07-09 16:08:35 -07:00