Commit Graph

110 Commits

Author SHA1 Message Date
Alexander Bezobchuk
e13cdc0260 Merge PR #2146: x/bank: Keeper Interfaces
* Update banking module to implement and use keeper interfaces

* Cleanup/consolidate x/bank keeper interface
2018-09-10 14:25:34 -04:00
Dev Ojha
173ed6a63d Merge PR #2282: simulation: Switch the log method from a single string to string builders 2018-09-09 23:34:09 +08: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
ValarDragon
fb235724d5 Fix unrelated lint error. 2018-09-07 22:39:26 -07:00
ValarDragon
e812919649 Rename coinKeeper -> bankKeeper
Closes #2267
2018-09-07 22:34:32 -07:00
Jae Kwon
2abc90e92b Merge remote-tracking branch 'origin/develop' into alessio/auth-txcontext-to-txbuilder 2018-09-07 10:49:12 -07:00
Jae Kwon
6325441861 txBld -> txBldr 2018-09-07 10:15:49 -07:00
Jae Kwon
acd125029d x/auth/client/context -> x/auth/client/txbuilder 2018-09-07 10:04:58 -07:00
Christopher Goes
44b695c3c0
Merge PR #2226: simulation: Make governance simulation use future operations to schedule votes 2018-09-07 19:01:33 +02:00
Christopher Goes
72e9664ce1 Revert "Merge PR #2217: Governance BFT Time"
This reverts commit 94b86f85c1, reversing
changes made to 2a4edcca48.
2018-09-07 17:00:57 +02:00
Alessio Treglia
54b3b5c028
sed -i 's/txCtx/txBld/g' 2018-09-07 14:39:23 +01:00
Alessio Treglia
3b6da7af18
TxContext -> TxBuilder 2018-09-07 14:36:21 +01:00
Christopher Goes
72b3a45778
Merge branch 'develop' into sunny/gov-bft-time 2018-09-07 07:47:14 +02:00
Christopher Goes
e410a9e38a
Merge PR #1952: Update IAVL dependency for v0.10.0 2018-09-06 11:18:16 +02:00
Alessio Treglia
89b3ab9e51
Don't skip basic validation 2018-09-04 17:29:33 +02:00
ValarDragon
753e58bac0 simulation: Make governance simulation use future operations to schedule
votes.

In a future PR, functionality to test that slashing occured properly should be added.
2018-09-03 18:30:18 -07:00
Alessio Treglia
86395809cb
Implement generate-only option for commands that create txs
The new CLI flag builds an unsigned transaction and writes it to STDOUT.
Likewise, REST clients can now append generate_only=true to a request's
query arguments list and expect a JSON response carrying the unsigned
transaction.

Closes: #966
2018-09-04 02:32:05 +02:00
Jeremiah Andrews
2378e3431c Fix linter errors 2018-09-03 07:58:57 -07:00
Sunny Aggarwal
aafa0d92dd BFT Time 2018-09-03 00:09:26 -07:00
Sunny Aggarwal
3a62c83873 asdf 2018-09-03 00:09:26 -07:00
Dev Ojha
5643c0801b Merge branch 'develop' into dev/benchmark_simulation 2018-09-01 12:37:50 -07:00
Alessio Treglia
122ed3a900
Don't use pointers when you need them not! 2018-08-31 19:04:45 +02:00
Alessio Treglia
1370ca611b
Set GasAdjustment in CLIContext when handling HTTP requests
This is to address @alexanderbez's comments
2018-08-31 19:04:42 +02:00
Alessio Treglia
599923fb99
Introduce simulate mode
Add a simulate only flag '--dry-run' to both CLI tx commands
and RESTful endpoints to trigger the simulation of unsigned
transactions.

* Turning --dry-run on causes the --gas flag to be ignored.
  The simulation will return the estimate of the gas required
  to actually run the transaction.
* Adjustment is no longer required. It now defaults to 1.0.
* In some test cases accounts retrieved from the state do not
  come with a PubKey. In such cases, a fake secp256k1 key is
  generated and gas consumption calculated accordingly.

Closes: #2110
2018-08-31 19:04:11 +02: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
ValarDragon
46bbada4ee simulation: Add benchmarking 2018-08-29 23:02:15 -07:00
Mike Xu
fd8c1e5253 Merge PR #2159: fix the gov/slash error 2018-08-29 01:22:39 -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
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
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