Commit Graph

506 Commits

Author SHA1 Message Date
Jack Zampolin
af60c75dd3 Merge PR #3352: Reenable simulation tests 2019-01-24 22:01:32 +01:00
Alexander Bezobchuk
36d1736a08 Refactor Gas/Fee Model (#3258) 2019-01-18 08:45:20 -08:00
frog power 4000
d9e32e93d5 Merge PR #3315: Increase decimal precision to 18
* Decimal precision increase WIP
* fix String()
* resolve many errors
* changelog
2019-01-17 18:15:10 +01:00
Christopher Goes
2942f83ff5
Merge PR #3099: F1 fee distribution 2019-01-16 22:38:05 +01:00
cong
916ea85630 Merge PR #2730: add tx search pagination related CLI/REST API parameter 2019-01-15 16:34:48 +01:00
Alexander Bezobchuk
a984a22373 Merge PR #2694: Vesting Account(s) Implementation 2019-01-14 17:11:24 +01:00
Alexander Bezobchuk
03bdd3f870 Fix IsAnyGTE (#3265) 2019-01-09 12:31:03 -08:00
Hleb Albau
867f8a7467 Merge PR #3195: Configurable pruning. Fix docs and create strategies const. 2019-01-09 16:06:22 +01: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
Alessio Treglia
1040e3a8f5 Increase CLI test coverage (#3254) 2019-01-08 08:43:36 -08:00
Zaki Manian
ed2b6bd9a7 Multiple fees in min fees to OR instead of AND (#3239) 2019-01-08 08:21:54 -08:00
Jack Zampolin
23819b1ce5 Merge PR #3159: Add address interface
* Add address interface
* Add test for addresses
* Address comments
2019-01-04 23:09:39 +01:00
Jack Zampolin
d1824ad704
R4R: validate sign tx request's body (#3179)
* validate sign tx request's body

Closes: #3176

* Introduce CodeNoSignatures

* Update swagger.yaml

* Fix tests

* Update x/auth/client/rest/sign.go

Co-Authored-By: alessio <quadrispro@ubuntu.com>
2019-01-03 08:30:04 -08:00
Alexander Bezobchuk
990f3ab4c1 Add IsValid check on sendCoins (#3212) 2019-01-02 13:19:48 -08: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
Dev Ojha
67a1e47c6e Fix is_valid bug (#3211) 2019-01-02 11:14:12 -08:00
Christopher Goes
5ca8c5bb83
Merge PR #3207: Fix token printing bug
* Add IsPositive, case check on coins[0]
* Link to correct PR
* Add testcase
2019-01-02 19:17:27 +01:00
Alessio Treglia
11585a4abd Introduce CodeNoSignatures 2019-01-02 10:05:56 +00:00
Alessio Treglia
500fa2b694 Make coins denoms case insensitive (#3092) 2018-12-18 11:14:11 -08:00
Alessio Treglia
eac7d6939d Merge PR #3127: Don't fallback to any default values for chain id
- Remove DefaultChainID(). User needs to suplly chain ID
  via either config or flag.
- Mark --chain-id as required by all tx commands.
- Fix gaiacli config values containing underscores.
  Underscore '_' character is not automagically translated
  into hyphen '-'. Viper values wouldn't be affected.
- Refresh gaiacli config tests

Closes: #810
2018-12-18 19:40:01 +01:00
Artur Albov
0c6d53dc07 Merge PR #2959: Add TxEncoder to client TxBuilder 2018-12-12 22:29:42 +01:00
Jack Zampolin
e1f0767ba8
R4R: Move generate_only and simulate to POST body in REST txs (#3060)
* Move generate_only and simulate to POST body in REST txs

Closes: #3056

* Run make format

* drop extra else block, outdent its block, and make linter happy

* Update PENDING.md

* Update LCD swagger docs
2018-12-10 14:51:53 -08:00
Christopher Goes
243576143e
Merge PR #3072: Catch overflows in gas wanted
* Check for overflow

* Only expect block gas meter on DeliverTx

* ErrGasOverflow in tx.ValidateBasic()

* Update unit test
2018-12-10 21:39:29 +01:00
Alessio Treglia
24a1670cf0 Run make format 2018-12-10 14:27:25 +00:00
Jae Kwon
40a30b738f
Update gas costs to more reasonable numbers for GoS (#3052) 2018-12-10 02:48:19 -08: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
Jae Kwon
1ba93ea1c1 Merge PR #3033: Fix negative stake & invariance bug
* Fix negative stake & invariance bug

* Merge PR #3037: Updates to negative stake fix

* Update invariant; fix lint

* Fix linter

* Add comment & TODO
2018-12-08 01:04:52 +01:00
Hendrik Hofstadt
db77117a5b Only allow supported pubKey types (#2949)
* Only allow supported pubKey types
* Add type and supported types to error message
* Add default value for ConsensusParams
2018-11-29 09:21:45 -08: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
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
Jae Kwon
819af35962 Final fixes from review 2018-11-24 18:15:02 -08:00
rigelrozanski
0861112b70 Merge remote-tracking branch 'origin/develop' into rigel/deliver-max-gas 2018-11-22 12:34:41 -05:00
rigelrozanski
b4b61b890c address some comments while reviewing Jaes work 2018-11-22 00:30:04 -05:00
Alexander Bezobchuk
1ea0e4c457 Merge PR #2863: Transaction ValidateBasic
* Add ValidateBasic to Tx interface
* Update BaseApp unit tests
* Add missing return in ValidateBasic
* Update ValidateBasic to use IsNotNegative
* Add pending log entry
* Add unit test TestTxValidateBasic
* Fix broken lint regression
* Add sig count check to validation
* Add test case to TestTxValidateBasic
2018-11-21 11:16:56 +01:00
rigelrozanski
6fd3132e71 lint fix, merge fix 2018-11-21 02:02:15 -05:00
rigelrozanski
70e60c2f30 Merge remote-tracking branch 'origin/develop' into rigel/deliver-max-gas 2018-11-21 01:51:56 -05:00
Jae Kwon
4afd53d81b Consume block gas to tx gas limit even upon overconsumption 2018-11-20 20:07:30 -08:00
Jae Kwon
10bdf8fa03 Store ConsensusParams to main store 2018-11-20 16:44:49 -08:00
Alexander Bezobchuk
41fc538ac7 Add Safety Measures to Coin/Coins (#2797) 2018-11-20 01:22:35 -08:00
Jae Kwon
47eed3958b
Clean up Context/MultiStore usage in BaseApp (#2847) 2018-11-20 01:06:14 -08:00
rigelrozanski
56dc2363fa Merge remote-tracking branch 'origin/develop' into rigel/deliver-max-gas 2018-11-20 02:58:33 -05:00
Alexander Bezobchuk
6e813ab3a8 Change gas & related fields to unsigned integer type (#2839)
* Change gas & related fields to unsigned integer type
* Implement AddUint64Overflow
2018-11-19 09:13:45 -08:00
Jack Zampolin
f525717054
Standardize CLI Exports from Modules (#2840)
* Move query and tx commands to modules
* Move GetAccountDecoder to prevent import cycle and replace calls to it with one call in WithAccountDecoder
* Add moduleClients interface and implement in all applicable modules
* Use module clients in cli initialization
2018-11-19 09:02:34 -08:00
Sunny Aggarwal
8d6b0929fb Codespaces as Strings (#2821) 2018-11-16 09:12:24 -08:00
rigelrozanski
4818e67145 Merge remote-tracking branch 'origin/develop' into rigel/deliver-max-gas 2018-11-16 03:32:55 -05:00
Alessio Treglia
7b7d45ddd2 Merge PR #2800: Limit total number of signatures per transaction
* Limit total number of signatures per transaction
* Fail if limit is exceeded
* Loop over all sigs and count subkeys
* No need for a type switch, adopt early return
* Test rejection logic
* Mention sigs limit
2018-11-15 15:30:24 +01:00
rigelrozanski
7be5179982 Merge remote-tracking branch 'origin/develop' into rigel/deliver-max-gas 2018-11-14 14:45:02 -05:00
rigelrozanski
956d351f68 basic structure in place 2018-11-13 11:30:06 -05:00
Christopher Goes
0e56ed9e4e Fix DiffKVStore 2018-11-13 14:36:09 +01:00
Christopher Goes
d2a53539dd Merge branch 'develop' into cwgoes/fix-gov-sim-more-import-export 2018-11-13 14:23:15 +01:00