Commit Graph

363 Commits

Author SHA1 Message Date
Dev Ojha b4e8fe5e94 Merge PR #2435: Staking store keys bug fix + memory improvement
Improve memory efficiency of getting store keys

This is done by removing repeated appends, which will create a new
slice if theres insufficient capacity, and instead creating a key
of the correct size, and then copying the data into it.
2018-10-04 08:42:03 +02:00
Alexander Bezobchuk 89d13d1f4c Merge PR #2429: LCD Properly Init Proposing Validator in Tests
* Refactor InitializeTestLCD to initialize correctly

* Update InitializeTestLCD API usage in LCD unit tests

* Update pending log

* Update named return variables

* Increase power of validator proposer in LCD tests
2018-10-03 12:42:44 -04:00
Rigel 324bdaf55d Merge PR #2394: Split up UpdateValidator into distinct state transitions applied only in EndBlock 2018-10-03 18:37:06 +02:00
Christopher Goes 26d43ff94a Merge branch 'develop' into cwgoes/nextvalset 2018-10-03 17:58:14 +02:00
Christopher Goes 17983460b8
Merge PR #2219: Update to Tendermint 0.24 (except NextValSet offsets) 2018-10-03 17:48:23 +02:00
Christopher Goes 08fcd9967d Merge branch 'cwgoes/update-tendermint-upstream' into cwgoes/nextvalset 2018-10-02 14:05:35 +02:00
Dev Ojha 9410b6287c Merge PR #2425: simulation: Make bank testing auth configurable 2018-10-02 14:01:18 +02:00
Christopher Goes 3ed2c22a38 Merge branch 'develop' into cwgoes/update-tendermint-upstream 2018-10-01 18:53:42 +02:00
Christopher Goes f7cb351dd1
Merge PR #2162: Add loose/bonded token supply invariants back to simulation 2018-09-27 15:52:30 +02:00
Christopher Goes ecc06f4aff Merge branch 'develop' into cwgoes/update-tendermint-upstream 2018-09-27 00:26:36 +02:00
Dev Ojha cb86efa054 Merge PR #2376: auth: Don't recalculate mempool fees for every msg signer, misc. cleanup
This PR begins improving the godocs for the auth module, and begins cleaning
up the Ante handler.

Additionally we previously calculated if the fee was sufficient for the tx
on every single signer. This is now refactored to be more efficient, and have
a better logical flow. No changelog entry as this is new to this release.
2018-09-27 02:34:01 +08:00
Christopher Goes e7c2a9614f Merge branch 'develop' into cwgoes/update-tendermint-upstream 2018-09-26 17:42:22 +02:00
Christopher Goes 91ee6b0d99
Merge PR #2313: Multi-seed parallel simulation 2018-09-26 23:04:42 +08:00
Alexander Bezobchuk 8ca8acf638 Merge PR #2357: Refactor Iterator Gas Consumption 2018-09-26 22:02:56 +08:00
Alessio Treglia a2caefc8ae Merge PR #2390: CLI subcommands reorganization 2018-09-26 22:00:49 +08:00
Dev Ojha e6a8b2278e Merge PR #2377: auth: Move stdsignmsg to txbuilder, add tests 2018-09-26 21:39:05 +08:00
Dev Ojha e11c52e873 Merge PR #2408: decimal: Add a method to multiply a decimal by an Int
This is for usage within the slash function, to minimize operations
required to slash each unbonded and redelegating account.
2018-09-26 18:13:40 +08:00
Rigel b54801b4b3 [RETRY] Distr-PR-3 More staking hooks (#2404)
* update commission hook for new commission work
* comment update
2018-09-25 23:11:57 -07:00
Matthew Slipper 2fb3493ff5 Merge PR #2223: Gaia CLI Config Command
* Allow a gaia-cli config file to be created

Closes #1613.
Closes #1275.
Closes #1956.

* Add homedir to Gopkg.toml

* Updates from code review

* Post-rebase fixes

* Update test

* Code review refactor

* Fixes from code review

* Fix import

* Fix broken test

* Fixes from rebase

* Fix formatting
2018-09-25 17:36:42 -04:00
Matthew Slipper 24413a395d Merge PR #2073: Allow --from to be a name or an address
* Allow --from to be a name or an address

Closes #1735.

* Post-rebase fixes

* Updates from code review

* Updates from code review

* Updates from code review

* Fix merge artifacts

* Fix merge conflicts

* Fix integration tests

* Add back GetFromName() check broken during merge

* Code review updates

* Fix failing test

* Updates from code review
2018-09-25 16:48:38 -04:00
Sunny Aggarwal 15e848e43c Merge PR #2395: Remove governance slashing 2018-09-26 02:45:20 +08:00
Jae Kwon c31c0d2822 Merge remote-tracking branch 'origin/dev/simulation_remove_pubkey_ops' into develop 2018-09-24 21:29:41 -07:00
Rigel de30281afa Distr-PR-2 Truncate Decimal Functionality (#2379) 2018-09-24 21:18:18 -07:00
Rigel 6b595842ed Distr-PR-1 Staking ConsPubKey -> ConsAddr index (#2369)
* pulling in stuff from fee-distr PR
* revert some gov changes
* fix using cons address, also remove old commented distr code
* doc update
* val comments
* remove GetValidatorByConsPubKey
2018-09-24 21:09:31 -07:00
Alexander Bezobchuk 9dafa3252d Merge PR #2365: Validator Commission Model
* Update validator commission fields

* Remove CommissionChangeToday and update to use CommissionChangeTime

* Implement commission as a first class citizen type

* Implement stringer for Comission

* Move commission type and logic to new  file

* Add new commission errors

* Add commission to create validator message

* Implement and call UpdateValidatorCommission

* Update godoc for UpdateValidatorCommission

* Add Abs to the decimal type

* Implement new SetValidatorCommission

* Update decimal short godocs

* Move set initial commission logic

* Move initial commission validation to Commission type

* Update initial validator commission logic and unit tests

* Remove commission update time from struct and move to validator

* Update validator create handler tests

* Implement commission logic for CLI

* Fix make lint failure

* Fix make cover failure

* Update edit validator logic to handle new commission rate

* Fix lint and cover

* Update create/edit validator simulation to include commission params

* Update MsgEditValidator godoc

* Update pending log

* Update staking tx docs

* Fix CLI create validator test

* Update variables names for commission  strings

* Merge UpdateTime into Commission type

* Update create-validator usage in docs

* Update more docs with examples

* More doc updates
2018-09-24 18:23:58 -04:00
Alessio Treglia a65c6eba00 Merge PR #2389: Remove dependency on tendermint/tmlibs 2018-09-24 23:06:38 +08:00
ValarDragon bb624b36aa simulation: Use a simulation.Account struct
This removes privkeys and addresses from function signatures.
This comes with a 11% performance improvement to the simulator,
as we no longer keep recomputing the pubkeys.
Once we move the transient store clearing to endblock, we can
further raise the size of make test_sim_gaia_fast

concretely, `make test_sim_gaia_fast` went from 16.8 seconds to 13.5 seconds on my system.
2018-09-22 20:33:32 -07:00
Alessio Treglia e2da4caae4 Merge PR #2364: Implement HTTPS for the LCD REST server
In order to guarantee a secure connection between apps and the LCD the
communication must be encrypted - even if clients and server run on the
same local machine, credentials must never be transmitted in clear text.

Upon start up, the server generates a self-signed certificate and a key.
Both are stored as temporary files; removal is guaranteed on exit.

This new behaviour is now enabled by default, though users are provided
with a --insecure flag to switch it off.
2018-09-22 00:33:58 +08:00
Dev Ojha 7823b9bb10 Merge PR #2366: baseapp: Automatically add action tags to messages 2018-09-21 23:54:32 +08:00
Sunny Aggarwal 8721dd6ff8 Merge PR #2355: Governance BFT Time 2: Electric Boogaloo 2018-09-20 22:53:52 +08:00
Alessio Treglia 10b916eb28 Merge PR #2318: Simplify version handling, rely on git describe 2018-09-20 00:03:04 +08:00
Alessio Treglia b74a6a9066 Merge PR #2328: Support min fees-based anti spam strategy 2018-09-19 23:25:52 +08:00
Sunny Aggarwal 5b8a499fd0 R4R: Simulation Queued Time Operations (#2348)
* closes #2349
* queue time operations simulation
* removed FutureTimeOperation
2018-09-18 19:47:54 -07: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
Federico Kunze d195cc15ed Merge PR #2249: Staking Querier pt1
* Cherry picked commits from prev branch

* Added new keepers for querier functionalities

* Renaming

* Fixed gov errors and messages

* Added Querier to stake and app

* Update delegation keepers

* REST Queriers not working

* Fix marshalling error

* Querier tests working

* Pool and params working

* sdk.NewCoin for test handler

* Refactor and renaming

* Update LCD queries and added more tests for queriers

* use sdk.NewCoin

* Delegator summary query and tests

* Added more tests for keeper

* Update PENDING.md

* Update stake rest query

* Format and replaced panics for sdk.Error

* Refactor and addressed comments from Sunny and Aleks

* Fixed some of the errors produced by addr type change

* Fixed remaining errors

* Updated and fixed lite tests

* JSON Header and consistency on errors

* Increased cov for genesis

* Added comment for maxRetrieve param in keepers

* Comment on DelegationWithoutDec

* Bech32Validator Keepers

* Changed Bech validator

* Updated remaining tests and bech32 validator

* Addressed most of Rigel's comments

* Updated tests and types

* Make codec to be unexported from keeper

* Moved logic to query_utils and updated tests

* Fix linter err and PENDING

* Fix err

* Fix err

* Fixed tests

* Update PENDING description

* Update UpdateBondedValidatorsFull

* Update iterator

* defer iterator.Close()

* delete comment

* Address some of Aleks comments, need to fix tests

* export querier

* Fixed tests

* Address Rigel's comments

* More tests

* return error for GetDelegatorValidator

* Fixed conflicts

* Fix linter warnings

* Address @rigelrozanski comments

* Delete comments

* wire ––> codec
2018-09-13 17:23:44 -04: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
Rigel 5bf9401e87
Merge PR #2310: staking transient store for Tendermint Updates
* working

* non-tests compile

* fix mounting error, working on testing

* stumped using transient store

* joon comments

* remove old comments

* resolve ibc error

* lint/sim_test

* fix determinism sim test

* sim enable commit

* docs and pending
2018-09-13 00:53:55 -04:00
philipstanislaus 8682556fad Merge PR #1993: Add optional flag to `gaiad testnet` to make config directory of daemon and cli configurable 2018-09-12 16:02:03 +08:00
Dev Ojha e5e7c4fa0f Merge PR #2303: simulation: Add weighted operation 2018-09-12 15:16:52 +08:00
Alexander Bezobchuk 854aca2f7d Merge PR #2238: Ensure Tendermint Validator Update Invariants 2018-09-12 15:16:28 +08:00
Dev Ojha 358b48771c Merge PR #2308: Remove ripemd160 entirely
* Remove ripemd160 entirely

We already made this decision awhile ago, and have had tendermint switched
for awhile. I was surprised to find ripemd still used within the storeinfo.
This actually leads me to think the new "byter" API change in the tendermint
PR RFC compliance is better, as it avoids things like this from ever happening.

* Get ripemd160 removed from the gopkg imports
2018-09-12 15:13:14 +08:00
Alessio Treglia fb0cc0b078 Merge PR #2306: Change --gas=0 semantic and introduce --gas=simulate
* Change --gas=0 semantic and introduce --gas=simulate

Make --gas flag accept a conventional "simulate" string value in addition
to integers. Passing --gas=simulate would trigger the tx simulation and
set the gas according to the gas estimate returned by the simulation.
Any other integer value passed to --gas would be interpreted as-is and
and set as gas wanted value.

Closes: #2300

* Add test cases with gas=0

* ACK suggestion from @alexanderbez

* s/GasFlagSimulateString/GasFlagSimulate/

* Drop TODO comment on Gas type

* Enrich TODO with ref
2018-09-11 20:31:30 -04:00
Dev Ojha 962b04d985 Merge PR #2285: simulation: Write logs on panic 2018-09-11 17:18:58 +08:00
Dev Ojha 2a49406e9b Merge PR #2284: Prevent create_empty_blocks=false 2018-09-11 17:15:38 +08: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
Dev Ojha 8b8028e0dd Merge PR #2280: genesis: Ensure no dup validators, or bonded and revoked validators 2018-09-09 23:23:51 +08:00
Dev Ojha 43ccbd4185 Merge PR #2281: Update to iavl 0.11.0 2018-09-09 23:13:17 +08:00
Christopher Goes 1d55673f1f
Merge branch 'develop' into cwgoes/update-tendermint-upstream 2018-09-08 17:41:38 +08:00
Dev Ojha 1a700206b8 Merge PR #2275: genesis: Ensure there are no duplicate accounts in genesis file
This also contains a light refactor of genesis state parsing, so that
the tests file didn't duplicate a lot of this code.
2018-09-08 17:29:34 +08:00
Alessio Treglia 4448d175ad Merge PR #2240: New broadcast command
Implement broadcast command/REST endpoint to submit transactions
generated offline with --generated-only and the sign command.
2018-09-08 17:26:20 +08:00
Christopher Goes 08d4f4525c Merge branch 'develop' into cwgoes/update-tendermint-upstream 2018-09-08 16:48:15 +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
Alessio Treglia f68e5a7542 Merge PR #2266: Fix CLI commands JSON output
When running with --json, commands should produce
correctly JSON-encoded output.
2018-09-08 16:33:55 +08:00
Dev Ojha c800bc7a1a Merge PR #2274: simulation: Stop on SIGTERM 2018-09-08 16:29:24 +08:00
Christopher Goes b144dc7aa2 Merge branch 'develop' into cwgoes/update-tendermint-upstream 2018-09-08 01:09:24 +08:00
Alessio Treglia e6a8a4df55
Implement command/REST endpoint for offline tx sign off #1953
* Add sign CLI command to sign transactions generated with the
  --generate-only flag.
* Add /sign REST endpoint for Voyager support.

Redirect password prompt to STDERR to avoid messing up cli
commands output. As a rule of thumb, program's output should
always go to STDOUT, whilst errors&diagnostics go to STDERR
as per POSIX's philosophy and specs.
2018-09-07 12:57:50 +01:00
Christopher Goes 72b3a45778
Merge branch 'develop' into sunny/gov-bft-time 2018-09-07 07:47:14 +02:00
Christopher Goes 2245b07c81
Merge branch 'develop' into cwgoes/update-tendermint-upstream 2018-09-07 07:23:06 +02:00
Dev Ojha a94219e062 Merge PR #2246: add script to make changelog links actual links 2018-09-07 00:54:59 -04:00
Christopher Goes 5316be75b5 Update PENDING.md 2018-09-07 06:44:11 +02:00
Christopher Goes 06adc691d2 Update testcases for TM 0.24.0-rc0 2018-09-07 00:45:07 +02:00
Christopher Goes e410a9e38a
Merge PR #1952: Update IAVL dependency for v0.10.0 2018-09-06 11:18:16 +02:00
Christopher Goes a6120686f9
Merge PR #2165: Implement generate-only option for commands that create txs 2018-09-05 01:12:03 +02:00
Alessio Treglia 8378f3ea86
Drop note in PENDING.md about generate_only=true query arg 2018-09-04 17:35:35 +02:00
Christopher Goes d736204760
Merge PR #2228: tools: Remove gocyclo 2018-09-04 14:30:41 +02:00
Christopher Goes 1039388207
Merge PR #1944: Piggy-bank distribution spec 2018-09-04 14:19:09 +02:00
Christopher Goes bb7b2ca0bb
Merge branch 'develop' into dev/remove_golint 2018-09-04 14:14:11 +02:00
ValarDragon ea01b91958 baseapp: Remove baseapp.SetTxDecoder()
Closes #1441
2018-09-03 22:53:07 -07:00
ValarDragon 9b26ccfa76 tools: Remove gocyclo
We can investigate re-introducing our own fork #postlaunch.
Closes #2211
2018-09-03 21:31:20 -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 01da56a020 Fix pending changelog 2018-09-03 08:01:31 -07:00
Jeremiah Andrews b83e6e8b1a Add to pending changelog 2018-09-03 07:57:15 -07:00
Christopher Goes e1ce5d42d8
Merge pull request #2214 from cosmos/dev/display_db_info
simulation: display db size at end of simulation, add makefile entries
2018-09-03 13:14:14 +02:00
Christopher Goes a4f36aa874
Merge pull request #2200 from cosmos/dev/GetValidator_speed_improvement
Improve GetValidator speed
2018-09-03 13:07:09 +02:00
Sunny Aggarwal a3bbf3a55b PENDING 2018-09-03 00:09:26 -07:00
ValarDragon 8a452b940a simulation: display db size at end of simulation, add makefile entries 2018-09-01 19:09:27 -07:00
Dev Ojha 311c5f8ac6
Merge branch 'develop' into dev/benchmark_simulation 2018-09-01 15:14:46 -07:00
ValarDragon a991a2e1c4 Improve GetValidator speed
In simulation, this was shown to cause a 4x speedup. There are no safety
concerns here, as amino encoding is deterministic.
2018-09-01 12:59:36 -07:00
Dev Ojha 5643c0801b Merge branch 'develop' into dev/benchmark_simulation 2018-09-01 12:37:50 -07:00
rigelrozanski a880242895 Merge remote-tracking branch 'origin/develop' into rigel/validator-unbonding 2018-08-31 20:28:48 -04: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
Christopher Goes e1981d47e3
Merge PR #2181: Implement a simulate-only CLI flag/field for REST endpoints 2018-08-31 22:35:52 +02: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
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
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
Matthew Slipper dc0f13214d Merge PR #2170: Add show-address command
* Add show-address command

Closes #1274.

* Add PENDING entry

* Add godoc

* Updates from code review
2018-08-30 21:38:28 -04:00
Matthew Slipper 03c56fc024 Merge PR #2190: Rename --gen-txs to --with-txs
* Rename --gen-txs to --with-txs

Closes #1088.

* Update CHANGELOG.md
2018-08-30 21:33:48 -04:00
ValarDragon 31ca2e058b Update PENDING 2018-08-29 23:11:14 -07:00
ValarDragon 46bbada4ee simulation: Add benchmarking 2018-08-29 23:02:15 -07:00
rigelrozanski 2a1515f00a changelog 2018-08-29 18:48:42 -04:00
Mike Xu fd8c1e5253 Merge PR #2159: fix the gov/slash error 2018-08-29 01:22:39 -04:00
Dev Ojha 946e24d7bf Merge PR #2152: Make CI not update the lock file
* CI: Make CI not update the lock file

We want CI to be running the lock in the repo, not generating a new one.
Linting now ensures that the lock file is up to date.

* Switch to Chris' comment

* Update pending to indicate this new command
2018-08-28 12:53:56 -04:00
Christopher Goes 6a7d700543
Merge PR #2167: Load Ledger Device at Runtime 2018-08-28 14:55:25 +02: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
Christopher Goes d3021d4c2f
Merge PR #2143: Speedup IAVL iterator by removing defers when unneeded. 2018-08-28 13:51:47 +02:00
Aleksandr Bezobchuk 0245a4b5ee Update pending log 2018-08-27 18:45:34 -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
Christopher Goes 666c218330
Merge PR #2138: Datadog fixes and new ansible scripts 2018-08-27 18:50:27 +02:00
Dev Ojha 2c3a4fc025
Merge branch 'develop' into dev/speedup_iavl_iterator 2018-08-27 08:05:09 -07:00
ValarDragon 4451755600 simulation: rename TestAndRunTx to Operation, make timestamp randomized 2018-08-26 19:40:53 -07:00
ValarDragon f6cb4d4fb6 Speedup IAVL iterator by removing defers when unneeded.
Note each defer occurs a 30ish ns overhead here, which is significant
for IAVL iteration. We were previously using around 3-4 defers. (2 in
next, one in Valid, one in Key, one in Value) This slows down the entire
application quite significantly, as we require fast iteration.
2018-08-24 10:26:02 -07:00
Christopher Goes 15b4b338df Merge branch 'develop' into rigel/piggy-bank-fee-spec 2018-08-24 14:25:29 +02:00
Matthew Slipper 2146450aaa Fix export segfault
Closes #1834
2018-08-24 02:24:00 -07:00
Alessio Treglia 323fac3bf7
Update PENDING.md 2018-08-24 10:16:51 +01:00
Christopher Goes c5d44bcaf0
Merge PR #2001: Update slashing spec for slashing-by-period 2018-08-24 02:09:29 +02:00
Greg Szabo 02efc1e209
Merge branch 'develop' into greg/datadog-fixes 2018-08-23 15:03:08 -04:00
Greg Szabo 0e3883f8bf Ansible and Terraform script updates 2018-08-23 14:55:22 -04:00
Christopher Goes 81e5ce15aa
Merge branch 'develop' into rigel/piggy-bank-fee-spec 2018-08-23 14:01:16 +02:00
Christopher Goes f8f97f7bd0
Merge PR #2124: Simple integration tests for {base,demo}coind 2018-08-23 13:56:32 +02:00
Alessio Treglia c02456b8a1
Update PENDING.md 2018-08-23 12:37:01 +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
Rigel d0edcc5066
Merge branch 'develop' into rigel/piggy-bank-fee-spec 2018-08-23 04:05:16 -04:00
Christopher Goes bb9c265590
Merge branch 'develop' into cwgoes/slashing-period-spec 2018-08-22 18:31:04 +02:00
Christopher Goes 73e1965195 Update PENDING.md 2018-08-22 18:30:34 +02:00
Christopher Goes 879f78cfc0 Rename revoke(d) to jail(ed) 2018-08-22 17:56:13 +02:00
Federico Kunze b02ecf915f Update PENDING.md 2018-08-22 16:24:09 +02:00
Christopher Goes 7b8c1c0e80
Merge branch 'develop' into fix-iterator-leak 2018-08-22 16:06:35 +02:00
Christopher Goes 29634bfd1d
Merge PR #1983: CLI UX Updates #1 2018-08-22 12:51:31 +02:00
Christopher Goes b23fe15e4a
Merge PR #1918: Keeper custom queries & QueryRouter 2018-08-22 12:50:59 +02:00
Christopher Goes 42c03aeeec Merge branch 'develop' into cli-updates 2018-08-22 12:40:23 +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 0eed9d1b60 PENDING 2018-08-22 00:15:18 -07:00
Rigel a54e3a3fc4
Merge branch 'develop' into cli-updates 2018-08-21 23:44:57 -04: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
Rigel 58f50c24a4
Merge branch 'develop' into cli-updates 2018-08-21 23:23:44 -04:00
Matthew Slipper 62d6fd2f98 Merge PR #2014: Remove advanced gaiacli command
Closes #1965
2018-08-21 23:22:18 -04:00
Matthew Slipper 3413a2bff1 Remove --select in block command (#2060)
Closes #1968.
2018-08-21 20:53:16 -04:00
Matthew Slipper 0c0d282a0c Add plaintext flags to show keys; default print response to true; helptext updates
Closes #1970
Closes #1971
Closes #1967
Closes #1969
2018-08-21 15:36:53 -07:00
Matthew Slipper f7d8675234 Support a proposal JSON file in submit-proposal
Closes #1852.
Closes #1776.
2018-08-21 14:34:15 -07: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
youjing e04e52451b Modify PENDING.md for #2105 2018-08-21 20:23:53 +08: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
Jack Zampolin 45bd414fc2 Run localnet on every commit ensure network reaches at least 10 blocks (#2067) 2018-08-16 20:23:57 +02:00
Rigel 54cc27fde9
Merge branch 'develop' into rigel/piggy-bank-fee-spec 2018-08-15 23:54:44 -04:00
rigelrozanski 8fc9b95929 pending 2018-08-15 23:49:07 -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
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
Avi Saranga 0adbd60dfa Merge PR #1989: Openbsd support 2018-08-14 10:39:27 +02:00
Dev Ojha 9997ea2243 Merge PR #2016: dep: Fix error with scratch directory
If dep already sees its scratch directory (.vendor-new), dep ensure fails. This rm -rf's that directory so make get_vendor_deps doesn't fail.
2018-08-14 10:35:08 +02:00
Matthew Slipper 8fa2c3b4ea Merge PR #1984: Replace _ with - in command names
Closes #1955
2018-08-14 10:23:42 +02:00
ValarDragon 165fdf4a07 (squash this) Add PR ref in changelog 2018-08-13 18:26:16 -07:00
ValarDragon 0d41026a0a Rename transient store key to be a unique key.
This caused an error with non-determinism between nodes with same
gaiad version and genesis.
2018-08-13 15:13:37 -07: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
Ethan Buchman 1cb89b958b update pending 2018-08-13 11:14:01 -04:00
Ethan Buchman e64a5538e4 update changelog, reset pending 2018-08-13 10:48:03 -04:00
Ethan Buchman d3322052db update pending.md 2018-08-13 10:48:03 -04:00
Ethan Buchman 59acfe857f WIP: reorg PENDING.md 2018-08-12 20:11:08 -04:00
Greg Szabo 68c9214721 DataDog log gathering (#1931)
* Added datadog service log gathering

* Updated PENDING.md

* monitoring script fixes so logs don't fill the disk space
2018-08-12 03:38:53 -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
Alessio Treglia 831435ccc0 Merge PR #1948: enable indexing of all tags by default 2018-08-10 15:40:21 +02:00
Christopher Goes ac26d33547
Merge PR #1858: Fix Cliff Validator Update Bugs 2018-08-09 00:57:59 +02:00
Dev Ojha 7ba479e57a Merge PR #1942: Gblue1223/basecoin fix 2018-08-08 17:32:33 +02:00
Federico Kunze 1da1115a24 Merge PR #1880: Staking Gaia-lite (ex LCD) refactor 2018-08-08 12:38:39 +02:00
Sunny Aggarwal 4582de4902 Merge PR #1914: tallyResults added to state
* tallyResults added to state
* fixed bug with tallyresult equals
2018-08-08 12:28:52 +02:00
Rigel 7fb626f548 Merge PR #1702: lamborghini distribution & inflation spec upgrade 2018-08-08 12:10:21 +02:00
Alexander Bezobchuk 12c2c236c2 Merge PR #1741: CoreContext Refactor 2018-08-06 20:11:30 +02:00
Alexander Bezobchuk a9805794d7 Merge pull request #1856: gen-tx: Support User Given Key Passwords
* Merge pull request #1856: gen-tx: Support User Given Key Passwords

* Fix broken CLI test(s)
2018-08-01 15:15:37 -04:00
Joon 7b54e4b786 Merge pull request #1812: Add BaseApp.Seal
* Merge pull request #1812: Add BaseApp.Seal

fix pow

move setter functions

apply requests

* fix errors

* fix test

* fix test

* changelog
2018-08-01 00:23:25 -04:00
Greg Szabo 179b8f9c49 Merge PR #1821: Added seed node update scripts
* Added seed node update scripts
* Updated PENDING
* Fixed issue with GENESISFILE and added GENESISURL to seed node scripts
* Fixed unsafe reset bug
* As requested, multiline ansible-playbook command
* Added monitoring gaiacli.service to logz.io template
* Added journald configuration ansible script
2018-08-01 03:13:22 +02:00
Joe Bowman 874a6055b0 Merge PR #1889: update signing info endpoint
* update /slashing/signing_info/ endpoint of lcd to take cosmosvalpub instead of cosmosvaladdr for consistency reasons
* update pending.md
* update test that calls /slashing/signing-info endpoint
2018-07-31 20:27:03 +02:00
Joon 19b0781e60 Merge PR #1811: NewCoin takes sdk.Int 2018-07-31 02:09:50 +02:00
Sunny Aggarwal d3fcfdba57 Merge PR #1845: Query-proposals CLI command 2018-07-31 01:48:00 +02:00
Sunny Aggarwal 7fc2ed61d7 Merge pull request #1859: slashing to governance for non-voting validators
* added slashing to governance non voting

* minor formatting
2018-07-30 01:11:21 -04:00
Rigel 53d30aff88
Merge pull request #1850 from cosmos/bez/1675-non-deterministic-cover
R4R: Fix Non-Deterministic Test Coverage
2018-07-29 23:28:56 -04: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
Aleksandr Bezobchuk 6e9226144b Merge pull request #1850: Fix Non-Deterministic Test Coverage 2018-07-27 18:41:50 -04:00
Christopher Goes 79aeb2b4b9 Fix genesis bond intra-tx counter bug 2018-07-27 20:01:06 +02:00
Sunny Aggarwal 55ef898db8 Merge PR #1688: Un-hardcode in governance parameters 2018-07-27 03:24:41 +02:00
Joon d46140a392 Merge PR #1481: Transient Stores 2018-07-27 03:24:18 +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
Christopher Goes 3c18467136
Merge branch 'develop' into rigel/server-fix 2018-07-26 21:05:10 +02:00
Christopher Goes 5964fcb053 Update PENDING.md 2018-07-26 21:03:51 +02:00
Rigel 67d0c804b0
Merge pull request #1823 from cosmos/dev/cli_test_build_flag
tests: Move cli tests behind a build flag
2018-07-26 13:47:46 -04:00
Jeremiah Andrews 5ab27f70d5 Add line to pending changelog 2018-07-25 22:15:05 -07:00
ValarDragon 496c75c35a tests: Move cli tests behind a build flag
This is done to make go test ./... work for people using the sdk as a sdk.
Closes #1806
2018-07-25 13:47:00 -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
Rigel d6cd0d4acc Merge PR #1818: CLI keybase-sig -> identity 2018-07-25 20:43:13 +02: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
Sunny Aggarwal 89eba4952c Merge PR #1801: Fixed governance bug with iterate delegations 2018-07-24 21:00:56 +02:00
Greg Szabo 75eeaadaae Merge PR #1234: Cloud network setup scripts
* Remotenet command for AWS and ansible fixes for all remotenet commands
* Ansible for AWS, terraform for AWS
* Moved remotenet commands to networks/ folder, created ansible playbooks and example scripts to set up remote testnets in the cloud
* Added application deployment infrastructure scripts
* Obsoleted DigitalOcean scripts, some cleanup in AWS scripts
* Changelog -> pending, disclaimer
2018-07-24 06:27:39 +02:00
Aditya 671d8494b4 Merge PR #1682: Docs example app tests 2018-07-24 06:13:55 +02:00
Rigel 52916f3c25
Merge branch 'develop' into rigel/no-endblock-rat-calcs 2018-07-23 14:59:06 -04:00
Rigel 1a44e387fe
Merge pull request #1794: fixes in cosmos-sdk-cli
Some fixes in cosmos-sdk-cli
2018-07-23 14:35:41 -04:00
Rigel fae728f35a
Merge pull request #1663 from cosmos/aditya/cleanup
BaseApp cleanup
2018-07-23 14:14:19 -04:00
Sridhar Ganesan 196a45bb30 Fixing the issues suggested in code review 2018-07-23 18:12:22 +02:00
Sridhar Ganesan adceed9e12 Adding the changes to PENDING.md 2018-07-23 16:05:03 +02:00
Rigel 17eb3eda02 Merge PR #1781: Gov tags cleanup 2018-07-21 03:58:45 +02:00
Christopher Goes 6198c20357 Remove duplicate changelog entry 2018-07-21 03:51:35 +02:00
Aditya 28cbca7d63
Merge branch 'develop' into aditya/cleanup 2018-07-20 17:05:12 -07:00
Alexander Bezobchuk f437f36c4a Merge PR #1764: Table-Driven Bank Module Unit Tests 2018-07-21 00:46:51 +02:00
rigelrozanski 110dcda5cc pending/changelog 2018-07-20 11:52:21 -04:00
rigelrozanski 15138b80c8 Merge remote-tracking branch 'origin/develop' into sunny/gov-cli-proposal-id 2018-07-20 11:47:37 -04:00