Commit Graph

532 Commits

Author SHA1 Message Date
rigelrozanski
52b249b0cd complete tests 2018-08-29 18:44:40 -04:00
rigelrozanski
d1a2fed2bc tests working 2018-08-29 02:28:27 -04:00
rigelrozanski
c4d0a00550 Merge remote-tracking branch 'origin/develop' into rigel/validator-unbonding 2018-08-28 20:16:07 -04:00
Matthew Slipper
c6d692e27f Merge PR #2172: Use cobra.NoArgs where appropriate
Closes #885.
2018-08-28 12:59:42 -04:00
Christopher Goes
5f347e0d9a
Merge PR #2166: simulation: Allow operations to specify future operations 2018-08-28 14:53:45 +02:00
Christopher Goes
73f90e8f92
Merge PR #2047: Simulate transactions by default to set gas automatically 2018-08-28 13:53:29 +02:00
rigelrozanski
78f98fec16 Merge remote-tracking branch 'origin/develop' into rigel/validator-unbonding 2018-08-27 19:34:03 -04:00
HaoyangLiu
5ed1775681 Merge PR #2148: Change delegation amount from int64 to sdk.Int
* Change delegation amount from int64 to sdk.Int

* Refactor code according to code review

* leave freeFermionVal to int64 in case of overflow
2018-08-27 18:18:18 -04:00
ValarDragon
855222e8c3 simulation: Allow operations to specify future operations
The intent of this is to allow for simulating things like slashing for not
voting on a governance proposal. To test this, you would queue all the validator votes
in future blocks, and keep track of which ones you didn't slash. Then you could add queue a
"check governance slashing operation" after the voting period is over.
2018-08-27 14:27:00 -07:00
rigelrozanski
f2d47f9e91 slash contract, cwgoes comment 2018-08-27 14:46:38 -04:00
rigelrozanski
527320c9fc dummy tests 2018-08-27 00:38:31 -04:00
rigelrozanski
ec42e66501 fix old tests 2018-08-27 00:20:40 -04:00
ValarDragon
4451755600 simulation: rename TestAndRunTx to Operation, make timestamp randomized 2018-08-26 19:40:53 -07:00
rigelrozanski
86f07d271d unbonding validators, delegtion effects 2018-08-24 21:47:31 -04:00
Alessio Treglia
7e8feec738
Incorporating @cwgoes comments 2018-08-24 15:20:53 +01:00
Alessio Treglia
f36f749818
Incorporating @ValarDragon's comments 2018-08-24 10:16:51 +01:00
Alessio Treglia
f432c0c383
Simulate transactions before actual execution
* Change --gas=0 semantic in order to enable gas auto estimate.
* REST clients have been modified to simulate the execution of
  the tx first to then populate the context with the estimated
  gas amount returned by the simulation.
* The simulation returns both an unadjusted gas estimate and an
  adjusted one. The adjustment is required to ensure that the
  ensuing execution doesn't fail due to state changes that might
  have occurred. Gas adjustment can be controlled via the CLI's
  --gas-adjustment flag.
* Tiny refactorig of REST endpoints error handling.

Closes: #1246
2018-08-24 10:16:51 +01:00
Christopher Goes
879f78cfc0 Rename revoke(d) to jail(ed) 2018-08-22 17:56:13 +02:00
Federico Kunze
cfb5acca6e Merge PR #2099: Query staking Pool and Params 2018-08-21 17:32:54 +02:00
Jae Kwon
f076794c5a Fix bug introduced during merge 2018-08-20 21:55:23 -07:00
Christopher Goes
800ac2844e validator.Operator, sdk.Dec 2018-08-20 17:10:43 +02:00
Ethan Buchman
af73b885e7 Merge branch 'develop' into bucky/merge-master 2018-08-19 16:24:45 -04:00
Alexander Bezobchuk
5794f3c3ce Merge PR #2083: Fix broken invariant of bonded validator power decrease 2018-08-18 13:41:12 +02:00
Alexander Bezobchuk
cf03076a0a Merge PR #2047: Fix Invalid Cliff Validator Power Comparison 2018-08-17 17:33:13 +02:00
Christopher Goes
b8cfc1e19f
Merge PR #2068: Minor simulation changes 2018-08-17 16:19:33 +02:00
Dev Ojha
8bb79d12ca Fix non-deterministic map iteration in fuzzer (#2069)
* This demonstrates that the state machine is non-deterministic if there
are more than two txs in a block.

* fix non-deterministic map iteration

* (squash this) fix build errors

* (squash this) iterate using range
2018-08-16 23:45:07 +02: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
Rigel
422dfa3de9
Merge pr #2051: smol compile bug 2018-08-15 18:35:17 -04:00
Alessio Treglia
4fbaee205f Merge pull request #1997: Handle unmarshalling failures gracefully in x/stake commands
* Handle panic gracefully when unbond begin fails

See #1831

* Handle failure to query delegation gracefully.

Closes #1907

* Update PENDING.md

* Reuse stake's error functions

* New ErrBadValidatorAddr error

UnmarshalValidator() checks the address length first;
it does not make sense to attempt unmarshalling if the
address is wrong.

* New ErrBadDelegationAddr error

* Introduce ErrBad{Redelegation,UnbondingDelegation}Addr custom errors to replace errors.New() calls

* Replace ErrBadUnbondingDelegationAddr with ErrBadDelegationAddr to avoid duplication

Thanks: @melekes for pointing this out

* Use sdk.AddrLen instead of hardcoded address length

* s/triple/tuple/ ## mention PR id in PENDING.md
2018-08-15 15:49:06 -04:00
Alexander Bezobchuk
97ea51a335 Merge pull request #2023: Terminate Update Bonded Validators Iteration Properly 2018-08-15 14:51:19 -04:00
Federico Kunze
c9358ec198 R4R: Fix repeated cmds in CLI for staking (v.0.24.0 release) (#2043)
* Cherry picked commits

* Update CHANGELOG.md
2018-08-15 16:59:46 +02:00
Rigel
5fff217e9b Merge PR #2033: staking lcd uses owner address not pubkey address 2018-08-15 15:04:01 +02: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
Federico Kunze
63713c9378 Merge pull request #2000: tests for staking lcd
* Added tests for Delegator Validators routes

* Updated tests for undelegations

* Updated Gaia-lite docs

* Updated PENDING.md

* Updated comments

* Deleted more comments

* Add spacing
2018-08-13 18:06:48 -04:00
Dev Ojha
b2a4aecc44 Upgrade to tm version 23.0. (#1927)
* Start upgrade. Currently go test ./... hangs.

* (squash this) Fix staking tests

* wip

* note what changes need to be made to make this work on tm v0.23.0

* Fix addr -> pubkey map

* cleanup code

* Fix slashing test failures except for begin blocker

* fix all slashing tests

* fix lcd tests

* Address PR comments

* add link to changelog.

* (wip) start making addrToPubkey map persisted. Since amino can't handle maps,
we have to change from what this commit is doing.

* Use the correct method of storing a map

* (squash this) address PR comments

* Did you run 'make'?

* remove gaiadebug binary
2018-08-12 03:33:48 -04:00
Fabian
1479a35e5e Merge PR #1949: Fixed delegations endpoint 2018-08-10 15:41:01 +02:00
Christopher Goes
ac26d33547
Merge PR #1858: Fix Cliff Validator Update Bugs 2018-08-09 00:57:59 +02:00
Federico Kunze
1da1115a24 Merge PR #1880: Staking Gaia-lite (ex LCD) refactor 2018-08-08 12:38:39 +02:00
Alexander Bezobchuk
12c2c236c2 Merge PR #1741: CoreContext Refactor 2018-08-06 20:11:30 +02:00
Joon
19b0781e60 Merge PR #1811: NewCoin takes sdk.Int 2018-07-31 02:09:50 +02:00
Rigel
c40d5debcc
Merge pull request #1862 from cosmos/dev/speed_up_handleMsgEditValidator
x/stake: Speed up handleMsgEditValidator
2018-07-29 23:21:10 -04:00
ValarDragon
0bb3497356 x/stake: Speed up handleMsgEditValidator
This removes running the power update logic on handleMsgEditValidator,
as its unnecessary.

Closes #1815
2018-07-27 21:42:59 -07:00
Christopher Goes
79aeb2b4b9 Fix genesis bond intra-tx counter bug 2018-07-27 20:01:06 +02:00
Aditya
74e06d8b96 Merge PR #1841: Must specify amount flag
* Removed default value for staking. Must now specify amount flag or it will error
* add to pending and better error msg
2018-07-26 23:41:24 +02:00
rigelrozanski
422eb0374e ... 2018-07-26 13:49:58 -04:00
rigelrozanski
07705444fd do-not-modify in defaults for edit-validator cli 2018-07-26 13:41:34 -04:00
rigelrozanski
58afe9780b Merge remote-tracking branch 'origin/develop' into sunny/fix-do-not-modify 2018-07-26 13:25:51 -04:00
Sunny Aggarwal
29bdd663c2 fixed donotmodify bug 2018-07-25 16:05:43 -07: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