Commit Graph

882 Commits

Author SHA1 Message Date
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
d1ecc8f6b4
Merge PR #2141: Governance CLI uses Querier 2018-08-28 14:49:33 +02:00
Christopher Goes
73f90e8f92
Merge PR #2047: Simulate transactions by default to set gas automatically 2018-08-28 13:53:29 +02: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
Sunny Aggarwal
bfdeb3f8ce works 2018-08-27 15:18:01 -07: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
ValarDragon
4451755600 simulation: rename TestAndRunTx to Operation, make timestamp randomized 2018-08-26 19:40:53 -07:00
Alessio Treglia
76a16ab288
Modify AnteHandler to take a simulate boolean parameter 2018-08-25 20:12:14 +01:00
Sunny Aggarwal
6391611005 asdf 2018-08-24 11:07:53 -07: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
Christopher Goes
7b8c1c0e80
Merge branch 'develop' into fix-iterator-leak 2018-08-22 16:06:35 +02:00
Christopher Goes
b23fe15e4a
Merge PR #1918: Keeper custom queries & QueryRouter 2018-08-22 12:50:59 +02:00
Christopher Goes
4b5bb45a09
Merge PR #2062: Support a proposal JSON file in submit-proposal 2018-08-22 12:31:58 +02:00
Sunny Aggarwal
7f43d3b290 fixed GetLastProposalID function 2018-08-22 00:17:37 -07:00
Sunny Aggarwal
5ae20d2d51 address Chris's comments 2018-08-22 00:15:18 -07:00
Sunny Aggarwal
50dd53fec3 added tally query route to gov 2018-08-22 00:15:18 -07:00
Sunny Aggarwal
0134c3b7f1 Address Anton'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
Matthew Slipper
d8f01be211 Merge PR #2061: Change proposalID to proposal-id in gov REST
Close #1963.
2018-08-21 23:44:13 -04:00
Matthew Slipper
f7d8675234 Support a proposal JSON file in submit-proposal
Closes #1852.
Closes #1776.
2018-08-21 14:34:15 -07:00
Christopher Goes
18b067cd41
Merge PR: Merge master back into develop 2018-08-21 18:33:02 +02:00
Ethan Buchman
292701d774 Merge branch 'master' into bucky/merge-master 2018-08-21 11:55:40 -04:00
Federico Kunze
cfb5acca6e Merge PR #2099: Query staking Pool and Params 2018-08-21 17:32:54 +02:00
Dev Ojha
419cf85433 Merge PR #2046: auth: Make gas cost take into account cryptosystem
* auth: Make gas cost take into account cryptosystem

This will make including the multisig easier.
The ratio for ed25519 vs secp256k1 are based on the ratio of their
verification times, using the benchmarks in tendermint/crypto.
2018-08-21 16:13:34 +02:00
Christopher Goes
e2691d98fc 0.24.1 - Fix validator pubkey bug 2018-08-21 15:40:43 +02:00
youjing
517682f17c fix Iterator leak, ref to https://github.com/cosmos/cosmos-sdk/issues/2105 2018-08-21 14:54:12 +08: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
Christopher Goes
0b2bf8f3a0 Set SignedBlocksWindow to 10000 per @zmanian instructions 2018-08-13 15:56:40 +02:00
Christopher Goes
a56117ee74 Stage onto release/v0.24.0 (#1999)
* Set SignedBlocksWindow back to 1000

* Merge PR #1995: upgrading ledger goclient lib

* Update version/version.go
2018-08-13 09:41:53 -04:00