Commit Graph

820 Commits

Author SHA1 Message Date
Jack Zampolin b558e50eb2 Fix quoted json return 2018-12-07 17:33:52 -08:00
Alexander Bezobchuk 5b42e83bc2 Merge PR #2995: Fully verify the signature in `gaiacli tx sign`
* Implement auxiliary methods/functions for just building a tx sig bytes

* Undo auxiliary methods/functions

* Validate signature

* Remove redundant comment

* Add pending log entry

* Minor cleanup

* Update sign cli doc

* Update cli sign offline flag doc

* Update printAndValidateSigs

* Implement TestGaiaCLIValidateSignatures

* Minor cleanup

* Fix linting

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

Co-Authored-By: alexanderbez <alexanderbez@users.noreply.github.com>

* Minor reformatting
2018-12-06 02:02:04 -05:00
Jack Zampolin cfab1ad6ee
Add Account Decoder to the LCD (#3013) 2018-12-05 16:48:30 -08:00
Jack Zampolin 07b0ad3c9e Merge PR #2987: Add shorthand flag to address output on gaiacli keys show and update docs
* Add shorthand flag to address output on gaiacli keys show

* Update docs and add PENDING

* Update client/keys/show.go

Co-Authored-By: jackzampolin <jack.zampolin@gmail.com>

* pk -> p
2018-12-04 17:38:43 +01:00
Alessio Treglia d32e4a9fe0 Merge PR #2972: Fix gaiacli config and make it non-interactive only
* Fix gaiacli config and make it non-interactive only

Closes: #2734

* Update cli tests

* Remove --list, by default and with no args print config

* Small improvements

* Warn user when file doesn't exist

* Fix integration tests
2018-12-04 14:17:45 +01:00
Alessio Treglia 535822ca68 R4R: add command asks for encryption password once too many (#2970)
* add command asks for encryption password once too many

* keep additional explanatory text
2018-11-30 15:00:53 -08:00
Alessio Treglia 956c2229bf Merge PR #2965: add --force to keys delete for unattended execution
* add --force to keys delete for unattended execution

Skip password check when --force is on and delete
keys unconditionally.

Closes: #2961

* Forcibly cleanup keys on fixtures initialization
2018-11-30 21:36:55 +01:00
Alessio Treglia c3965f5509 Remove inconsistent gaiacli keys new/add dualism (#2904)
* Remove inconsistent gaiacli keys new/add dualism
2018-11-29 12:59:41 -08:00
Alessio Treglia a6bc60e4c6 Merge PR #2923: Prompt user for confirmation when deleting ledger and offline keys
* Force password to 'yes' when deleting ledger-offline keys
* Improve UX, better docs on removing offline/ledger keys
* Ask for confirmation on offline/ledger keys deletion
2018-11-29 21:55:23 +01:00
Hendrik Hofstadt ca43225851 Merge PR #2943: Fix tag usage in handlers and EndBlocker
* Fix tag usage in handlers and EndBlocker
* Prepend action tag in baseApp
* Fix LCD
* Remove unnecessary conversion
* Fix invalid consensus pubkey in CLI tests
* Fix tag usage in cli_test
* Shorten bechify in test
* Update docs and PENDING
2018-11-29 15:34:57 +01:00
Christopher Goes aa72e72ce4
Merge #2932: Update to Tendermint v0.27.0-dev0
* Update upstream Tendermint version
* Update PENDING.md
* Fix for accum -> proposer priority
2018-11-28 23:29:55 +01:00
Christopher Goes 1a18a428a4
Merge PR #2842: Fix tx search 2018-11-28 00:09:14 +01:00
Federico Kunze 8414c344fa Merge branch 'fedekunze/2819-fix-tx-search' of https://github.com/cosmos/cosmos-sdk into fedekunze/2819-fix-tx-search
Merge branch
2018-11-28 00:01:02 +01:00
Federico Kunze 7cf5da2f72 address Chris' comments 2018-11-28 00:00:38 +01:00
Federico Kunze 9751a61b46
Merge branch 'develop' into fedekunze/2819-fix-tx-search 2018-11-27 22:56:36 +01:00
Federico Kunze 14154f71be deleted unnecessary function 2018-11-27 22:54:25 +01:00
Federico Kunze ebaac49142 minor changes from review 2018-11-27 22:47:56 +01:00
Alexander Bezobchuk d8683fe90b
Update client/tx/search.go
Co-Authored-By: fedekunze <31522760+fedekunze@users.noreply.github.com>
2018-11-27 22:38:13 +01:00
Aleksandr Bezobchuk 155c553456 Refactor Gaia Lite bootstrapping 2018-11-27 16:03:53 -05:00
Alexander Bezobchuk 71aec4688b Fix starting Gaia Lite (#2918)
* Fix starting Gaia Lite
2018-11-27 12:19:01 -08:00
Federico Kunze 9c85e935fd Merge branch 'develop' of https://github.com/cosmos/cosmos-sdk into fedekunze/2819-fix-tx-search
Merge develop
2018-11-27 16:38:08 +01:00
Federico Kunze 1dab1f7c98 Merge branch 'fedekunze/2819-fix-tx-search' of https://github.com/cosmos/cosmos-sdk into fedekunze/2819-fix-tx-search
Merge branch
2018-11-27 16:02:20 +01:00
Federico Kunze cd812c788f fix comments and cmd description 2018-11-27 16:02:03 +01:00
Federico Kunze 9bf2041c26
delete comments on lcd tests 2018-11-27 15:20:41 +01:00
Federico Kunze 666fafb97a add other tests and update docs 2018-11-27 15:16:33 +01:00
Federico Kunze a2189bc672 fix tx search CLI 2018-11-27 14:37:03 +01: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
Federico Kunze 9fdd4300f2 update cli tx search 2018-11-26 15:55:42 +01:00
Federico Kunze 60fc7c7919 Merge develop 2018-11-26 13:41:00 +01:00
Sunny Aggarwal b7da2eaa33 Merge PR #2799: Account numbers and sequences to uint64 2018-11-26 12:29:21 +01:00
John McDowall f09fa33cfd Merge PR #2802: Correct the usage of misspelling of English word 'depositor'.
Throughout the codebase the misspelling 'depositer' of the English word
'depositor' has been used. This commit applies a global search and
replace to correct the misspelling.
2018-11-22 00:53:33 +01:00
Alessio Treglia 3e68e44063 Merge PR #2874: gaiad gentx subcommands refactoring
* gaiad gentx subcommands refactoring

- Replace STDIN/STDOUT redirection in `gaiad gentx` with subcommands
  command line options to redirect streams to file since viper does
  not handle redirection well.
- Use `BuildCreateValidatorMsg` to build a `MsgCreateValidator` rather
  than redirecting to `gaiacli tx stake create-validator`.
- `PrintUnsignedStdTx` now takes an `io.Writer` object.
- Mark `--pubkey`, `--amount` and `--moniker` as required flags
  instead of validating them manually.
- Use stake.NewDescription() to make a new Description - ref #2835

* Refresh PENDING.md
2018-11-22 00:44:13 +01:00
Federico Kunze d227e2a29e Merge PR #2869: Gov tally endpoint
* Added tally endpoint
* Update querier.go
* rename queryable
* Address @alexanderbez comments
2018-11-21 10:54:51 +01:00
Federico Kunze ee4c51bb36 update cli tests 2018-11-20 14:13:05 +01: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
Jack Zampolin 9676ce7d48
Expose LCD router, allowing devs to register custom routes from their modules (#2836)
* Fixes #1081
2018-11-16 14:21:36 -08:00
Federico Kunze 8a95de4086 updated swagger.yaml 2018-11-16 16:18:05 +01:00
Federico Kunze 15d98cc24f update lcd tests 2018-11-16 16:03:57 +01:00
Federico Kunze 1a7f9dac75 update unit tests 2018-11-16 15:10:02 +01:00
Federico Kunze e65d18643e test empty response 2018-11-16 13:07:17 +01:00
Federico Kunze 4de3aee7f1 fixed tx search 2018-11-16 12:50:58 +01:00
Sunny Aggarwal d1614ebb7e R4R: Query Gov Params (#2576)
* gov query params
2018-11-13 15:45:37 -08:00
Jack Zampolin 695395aca8
Merge branch 'develop' into sunny/get_all_delegations_validator_querier 2018-11-13 11:07:36 -08:00
Jack Zampolin b255a7d59f
Merge branch 'develop' into sunny/get_all_delegations_validator_querier 2018-11-12 14:09:18 -08:00
Federico Kunze 182f111ddc update swagger.yaml 2018-11-12 22:53:43 +01:00
Jack Zampolin ac8f2dabd4
Merge branch 'develop' into jack/query-tx-reorg 2018-11-12 11:10:52 -08:00
Alessio Treglia 70826495b8 Merge PR #2752: Don't hardcode bondable denom 2018-11-12 19:54:18 +01:00
Christopher Goes 4d1246dae9
Merge branch 'develop' into sunny/get_all_delegations_validator_querier 2018-11-09 15:28:03 +01:00
Christopher Goes 02da397899 Merge 0.26.0 back to develop (#2718)
* PENDING => CHANGELOG
* Linkify changelog
* Merge PR #2716: Temporarily disable gaia lite insecure mode
* TODO: need to update CHANGELOG w/ import-export PR #2690
2018-11-08 16:41:57 -08:00
Jack Zampolin 8f4c7df033 Address PR comments 2018-11-08 08:24:34 -08:00
Jack Zampolin 0ab5d7639b Fix gobash CLI testing 2018-11-07 16:42:34 -08:00
Jack Zampolin cade5f552c Address linting issues 2018-11-07 15:38:30 -08:00
Jack Zampolin d4fb6d4ebe Reorganize CLI command structure. Fixes #2575 2018-11-07 15:03:00 -08:00
Sunny Aggarwal 1d3a04a61c Switch gov proposal-queues to use iterators (#2638)
* switched gov proposals queue to use iterators
* update gov spec
* update proposal.Equal
* Amino api change
* switched proposalID to uint64
* renamed Gov Procedures to Params
* s/ActiveProposalQueueProposalKey/KeyActiveProposalQueueProposal/g
* numLatestProposals -> Limit
* fixed staking invariant breakage because of gov deposits
* Send deposits to DepositedCoinsAccAddr or BurnedDepositCoinsAccAddr
2018-11-06 23:33:18 -08:00
Christopher Goes dfddac394d Merge branch 'develop' into sunny/get_all_delegations_validator_querier 2018-11-05 11:56:32 +01:00
Alessio Treglia c20fcbfd8f New genesis workflow (#2602)
New genesis workflow:
* `gaiad init` is now used to generate an empty `genesis.json`.
* Genesis accounts need to be populated manually before running
  `gaiad collect-gentxs`.
* This should support starfish too, see #2615 for more info.
* Closes: #2596 #2615
* Validate validator address and address against respective account ex ante
* Fix local testnet failures
* New genesis tests
* Run make format
* Add --pubkey flag
* gaiad collect-gentxs takes no args
2018-11-04 20:26:46 -08:00
Jae Kwon 5b74e1d0b6
Bez/tm0.26 update pt 2 redux (#2684)
* Update to TM v0.26.0
* Update TODOs
* Proof and verification updates
* Fix linting
* Fix key path creation
* Temporarily fix tendermint revision to make tests pass
2018-11-04 19:36:35 -08:00
Alexander Bezobchuk 50926fffff Update to TM v0.26.0 - Part I (#2679)
* Update to TM v0.26.0
2018-11-04 18:28:38 -08:00
Sunny Aggarwal 2d429731b3 LCD and CLI 2018-11-03 22:55:38 -07:00
Rigel 0d5ebd2495
Merge PR #2667: Gaialite signal handling fix
Gaialite signal handling is broken, repair it
2018-11-02 12:43:07 -04:00
Alessio Treglia e598af9eb6
Fix lint 2018-11-02 13:47:14 +00:00
Alessio Treglia 36bb4409b6
Refactor TrapSignal 2018-11-02 13:44:40 +00:00
Alessio Treglia a0a6bad4c0
Fix test 2018-11-02 13:37:23 +00:00
Alessio Treglia 48192ea3d4
Gaialite signal handling is broken, repair it 2018-11-02 08:42:29 +00:00
Alessio Treglia 91dcd0f82a
Include DNS alt name in certificate
Closes: #2664
2018-11-02 08:17:57 +00:00
Alessio Treglia 3657ff4ada Merge PR #2656: Revert read-only leveldb database
* Revert read-only leveldb database

Waiting on a fix for syndtr/goleveldb#240.

* Update client/keys/utils.go
2018-11-02 00:29:21 +01:00
Christopher Goes fcf5b7764b
Merge PR #2622: Make simulation use a transition matrix for block size
Make simulation use a transition matrix for block size
This enables simulating periods of high load, and periods of low to no load.
(low load because future ops will still terminate in that time frame)
2018-10-31 20:10:35 +01:00
Alessio Treglia bc583ab1d0
Various sign command improvements
- Exit with error if the user is attempting to sign with a key
  whose address is not among those who are expected to sign
  the transaction.

- Add --print-signature-only to output only the generated
  signature.
2018-10-31 13:41:26 +00:00
ValarDragon e4b5e2c9f3 Make simulation use a transition matrix for block size
This enables simulating periods of high load, and periods of low to no load.
(low load because future ops will still terminate in that time frame)
2018-10-28 21:37:19 -07:00
Alessio Treglia ebca085fab
Merge pull request #2593 from cosmos/bez/fix-keys-new-perm
Fix DB Write Permissions for gaia keys new
2018-10-24 19:43:31 -07:00
Aleksandr Bezobchuk 507438bf7b Additional cleanup 2018-10-24 16:45:55 -04:00
Aleksandr Bezobchuk 23f62f7761 Fix db write perm 2018-10-24 16:34:30 -04:00
Christopher Goes 234262160e 'make format' 2018-10-24 15:37:06 +02:00
Christopher Goes c577831261
Merge PR #2554: Make `gaiacli keys show` multisig-ready 2018-10-24 15:24:12 +02:00
HaoyangLiu 9ee9e28439 Merge PR #2462: Add swagger-ui for gov, stake and slashing 2018-10-24 15:19:48 +02:00
Alessio Treglia 6664cd5afd
Fix stupid mistake 2018-10-23 12:43:36 -07:00
Sunny Aggarwal d666658ca9 Merge PR #2553: Renamed msg.Name() and msg.Type() to msg.Type() and msg.Route() 2018-10-23 21:23:55 +02:00
Christopher Goes a231bd8ccc
Merge PR #2555: Don't acquire lock on read-only keybase 2018-10-23 21:03:08 +02:00
Alessio Treglia cd49e978f9
Make "multi" const 2018-10-23 11:46:43 -07:00
Alessio Treglia 6ace08b505
Remove shorthand 2018-10-23 11:44:47 -07:00
Alexander Bezobchuk 450873d080
Update client/keys/utils.go
Co-Authored-By: alessio <quadrispro@ubuntu.com>
2018-10-23 10:47:20 -07:00
Alessio Treglia 230c69b438
Validate threshold rather than letting it panic 2018-10-22 17:13:36 -07:00
Alessio Treglia 44a6c21ad9
Add tests 2018-10-22 14:43:57 -07:00
Alessio Treglia add15b5b28
Merge review comments/changes 2018-10-22 14:29:27 -07:00
Alessio Treglia 8d24465845
Run make format 2018-10-22 13:37:28 -07:00
Alessio Treglia 322a029ab5
Make gaiacli keys show multisig-ready 2018-10-22 12:00:57 -07:00
Federico Kunze 301fdf4a40 test cleanup 2018-10-22 14:21:53 +02:00
Federico Kunze 77177b2861 Merge develop and conflicts 2018-10-22 11:18:51 +02:00
Federico Kunze 152b3bd67b Split delegator summary endpoint 2018-10-20 22:25:50 +02:00
Federico Kunze 8999a4d719 Add validator unbonds 2018-10-20 21:30:07 +02:00
Federico Kunze 5e1720b6cb Added LCD tests 2018-10-20 21:10:19 +02:00
Cong Zhao 6c623b203e #1255 make keybase opened with readonly option to support better parallelization between gaiacli 2018-10-20 20:26:15 +08:00
Rigel b48d0d5623 Merge PR #2527: Minting 2018-10-19 20:36:00 +02:00
Alessio Treglia 593921d04d Merge PR #2524: Replace GenTx with StdTx
Rework the process of loading a genesis.json file to load a starting app state and set of initial transactions to process.

* New function to create genesis account from MsgCreateValidator
* Add arg to PrintUnsignedStdTx() to actually operate in offline mode
* New func processStdTxs()
* Remove gen-tx command
* Cleanup, return validators as they need to be written into genesis.json
* Modify gaiad init to allow auto-create of stdTx
* Remove server/testnet.go
* Don't load node_key.json, which might not be available
* Get the txs through DeliverTx
* Add app.slashingKeeper.AddValidators at the end of genesis
* On InitChain(), Signature's account number must be 0
* Add (tentative?) command to generate {node_key,priv_validator}.json files
* Reintroduce gaiad testnet
* Prompt user for passwords
* Update gaia to work with auth.StdTx
* Remove test_utils, NewTestGaiaAppGenState is now deprecated
* Combine --genesis-format and --generate-only
* Improve sign command's --offline flag documentation
* Moniker must be set
* Call app.slashingKeeper.AddValidators() even if len(txs) == 0
* Refactoring, introduce gaiad init --skip-genesis, code cleanup
* Drop unnecessary workaround to make lcd_tests pass
* Reintroduce gentx
* Simple name changes, GenesisState.Txs -> .GenTxs; OWK -> OverwriteKey; OverwriteKeys -> OverwriteKey
2018-10-19 20:00:27 +02:00
Federico Kunze ad355d6c69 Merge PR #2444: Standardize REST error responses 2018-10-19 18:55:20 +02:00
Alessio Treglia ad05d7cc33 Merge PR #2523: Remove 'import "C"' from client/utils package 2018-10-18 00:49:57 +02:00
David Braun e845569d16 Merge PR #2496: Add example to Swagger specification for /keys/seed 2018-10-17 20:25:02 +02:00
Ethan Buchman 1ee8deed2b Merge PR #2090: Improve crypto/keys and add `keys mnemonic` and `keys new` commands
* crypto/keys/hd: use btcec to remove dep on tendermint

* crypto/keys/bcrypt: improve comment about fork

* crypto/keys/bip39 -> crypto/keys/bip39/fundraiser

* crypto/keys/bip39: bring in fork of tyler-smith

* crypto/keys/hd: update dep

* crypto/keys: update deps

* crypto/keys: move mintkey.go into new crypto/keys/mintkey

* crypto/keys/hd: NewParamsFromPath

* crypto/keys: keybase.Derive takes a bip39 passphrase too

* crypto/keys/hd: BIP44Params.DerivationPath

* gaiacli keys: add commands new and mnemonic

* fix lints

* minor fixes from review

* update Gopkg.toml

* add tendermint fork of golang.org/x/crypto
* pin some transitive deps

* crypto/keys/bcrypt: remove

* remove in favour of fork of golang.org/x/crypto/bcrypt at github.com/tendermint/crypto/bcrypt

* crypto/keys/bip39: remove completely

* use fork cosmos/go-bip39 instead

* Gopkg.toml: dont use master

* Pull in changes from my PR

* fixes from review

* enforce min len for --unsafe-entropy

* lint fix

* feedback from review

* fix dep
2018-10-17 13:37:58 -04:00
Sunny Aggarwal 070bda3a25 Merge PR #2515: Fix gov deposit query lcd non-determinism
* non deterministic addr ordering

* sorted addrs at gen

* fixed comment

* fixed names and passwords
2018-10-17 00:55:36 -04:00
Christopher Goes 2c4d9a0be4 Merge branch 'develop' into cwgoes/fix-signing-info-bugs 2018-10-15 21:04:49 +02:00
Federico Kunze 6dc6a78422 fix import 2018-10-15 10:44:15 +02:00
Federico Kunze 8e1d0fbac0 Add option to indent response 2018-10-15 10:41:37 +02:00
Federico Kunze 2b701655d9 test deposit values 2018-10-15 10:27:24 +02:00
Federico Kunze f8486aeca5 Add deposits endpoint and tests 2018-10-12 19:05:22 -07:00
Christopher Goes 6e4a8d9e16 Update spec 2018-10-12 01:04:57 +02:00
Christopher Goes 8c2c9dba8a Update block height on validator bonding 2018-10-12 00:15:58 +02:00
Christopher Goes dbd4f30b39 Merge branch 'develop' into dev/lock_tools 2018-10-11 08:48:15 +02:00
Alessio Treglia 0f4a03b44e Alessio/server refactor (#2472)
* Add arg to PrintUnsignedStdTx() to actually operate in offline mode
* WIP simplifying server module
* Expose ExternalIP()
* Move {GenTx,Init}Cmd into gaia's new init package
2018-10-10 15:45:41 -07:00
ValarDragon 9e334afad0 Lock binary dependencies to a specific commits / versions
This is basically copying over @anton's great script!

Also had to run `make format` to make this pass `test_lint`.
This PR also makes the make commands for tools further align
with the tendermint implementation.
2018-10-09 23:52:36 -07:00
Christopher Goes e251088672
Merge PR #2452: Fix LCD Validator Initialization 2018-10-09 20:10:37 +02:00
Christopher Goes 71a80bf176 'make format' 2018-10-09 06:38:58 +02:00
Christopher Goes 9c53f5aadf Merge branch 'develop' into cwgoes/nextvalset 2018-10-09 06:33:19 +02:00
HaoyangLiu 1aebe103ba Merge branch 'develop' of https://github.com/cosmos/cosmos-sdk into bianjie/lcd-lite-swagger-ui 2018-10-09 09:21:45 +08:00
Aleksandr Bezobchuk 975065724b Revert back to 100 power for proposing validator 2018-10-08 02:51:29 +08:00
Aleksandr Bezobchuk 79a0339844 Use NewTestGaiaAppGenState in LCD test gen 2018-10-08 00:59:44 +08:00
Aleksandr Bezobchuk 2527e1fa3b Implement NewTestGaiaAppGenState and update LCD test bonding 2018-10-08 00:57:52 +08:00
HaoyangLiu 3bcbcd08b9 create adequate error for key managerment 2018-10-06 11:59:12 +08:00
Christopher Goes 1f12f204ce Testcase fixes, 'make format', negative pre-genesis block 2018-10-05 14:11:36 +02:00
HaoyangLiu 6d645f20fa Refactor keys handler according to code reviewers 2018-10-05 07:19:52 +08:00
HaoyangLiu 1acab69326 Fix test_lint failure and test_cover failure 2018-10-04 21:15:29 +08:00
HaoyangLiu 8e1bfee6ca Add swagger-ui for key management 2018-10-04 20:36:24 +08:00
HaoyangLiu 9f67e8af20 Merge PR #2215: Add swagger-ui for gaiacli lite-server 2018-10-04 13:00:24 +02:00
HaoyangLiu 31b26e7154 Refactor code in set response header 2018-10-04 18:50:15 +08:00
Christopher Goes e72c19a351 Revert viper.Set change 2018-10-04 12:39:59 +02:00
Christopher Goes c676eab46b WithTrustNode, Makefile fixes, 'make format' 2018-10-04 08:34:39 +02:00
HaoyangLiu 1d4cfe89d2 Merge with develop 2018-10-04 08:10:29 +08: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
Christopher Goes 17983460b8
Merge PR #2219: Update to Tendermint 0.24 (except NextValSet offsets) 2018-10-03 17:48:23 +02:00
HaoyangLiu 9830acc5b9 Add indent option to context and fix a bug in node status command 2018-10-02 23:38:18 +08:00
HaoyangLiu 5d259b1b39 Add post respones process to add json to header and decide whether bring in indent to make response more readable 2018-10-02 23:15:04 +08:00
HaoyangLiu 5fb7e65079 Remove useless comment 2018-10-02 10:02:37 +08:00
HaoyangLiu f5df1982f9 Add description for return type 2018-10-01 09:26:08 +08:00
HaoyangLiu bd274db7a7 Add application/json to response header 2018-10-01 09:07:41 +08:00
HaoyangLiu 019b1d95cf unminify JS files according to cwgoes 2018-09-30 18:50:31 +08:00
HaoyangLiu da5da6e3a1 Fix lcd test failure for endpoint change 2018-09-30 13:42:45 +08:00
HaoyangLiu f896497db1 Improve swagger.yaml 2018-09-30 13:26:44 +08:00
HaoyangLiu b7f27a0e1f update gopkg.lock and fix compile error 2018-09-30 12:53:30 +08:00
HaoyangLiu d6f6a1f87f Merge with develop 2018-09-30 11:46:27 +08:00
HaoyangLiu 6e8b8e47ee Add swagger-ui for ICS0 and ICS20 2018-09-30 11:42:12 +08:00
Jae Kwon 1e26ba2e0e
CLIContext.Logger -> .Output as it isn't a logger (#2420)
This changes .Logger to .Output, as it isn't used anywhere except as os.Stdout.
2018-09-28 21:45:54 -07:00
HaoyangLiu 46e268efe2 Convert swagger.json to swagger.yaml 2018-09-27 22:07:39 +08:00
HaoyangLiu bf24a42a29 Remove stake API from this PR 2018-09-27 19:54:33 +08:00
HaoyangLiu 4e3066131e Merge with develop 2018-09-27 19:41:38 +08:00
HaoyangLiu c5affaa7bf Remove docs/clients/lcd-rest-api.yaml and add its content to client/lcd/swagger-ui/swagger.json 2018-09-27 19:36:22 +08:00
HaoyangLiu bff2f33ac5 Rename swaggerui to swagger-ui 2018-09-27 19:06:22 +08:00
Alessio Treglia a2caefc8ae Merge PR #2390: CLI subcommands reorganization 2018-09-26 22:00:49 +08:00
Alexander Bezobchuk 91cac96fea Merge PR #2391: LCD Cleanup and DRY Refactor 2018-09-26 21:29:39 +08: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
Alexander Bezobchuk 04487ca5db Merge PR #2402: Skip LCD test TestVersion when no env var 2018-09-26 02:47:28 +08:00
Alexander Bezobchuk 611e287375 Merge PR #2401: Remove remnants of gocyclo 2018-09-25 13:45:04 -04:00
Alessio Treglia a65c6eba00 Merge PR #2389: Remove dependency on tendermint/tmlibs 2018-09-24 23:06:38 +08:00
HaoyangLiu dc2d98d09a Now only add API doc for version 2018-09-23 16:11:34 +08:00
HaoyangLiu f472839870 Remove changes in keys 2018-09-23 15:43:44 +08:00
HaoyangLiu 0b021cfa45 Merge with develop 2018-09-23 15:35:29 +08: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
HaoyangLiu d06c589436 Merge PR #2370: Improve error handler in certifier creation 2018-09-21 23:44:39 +08:00
Jessy Irwin 9b6b00689c Merge PR #2361: Remove IBC entrypoints 2018-09-20 22:51:14 +08:00
Alessio Treglia 10b916eb28 Merge PR #2318: Simplify version handling, rely on git describe 2018-09-20 00:03:04 +08:00
HaoyangLiu a3df7af428 Merge PR #2346: bugfix in validatorset query and refactor transaction search 2018-09-17 22:13:11 +08:00
HaoyangLiu 7dc09d0fc2 Merge PR 2210: Judge if trust-node predefined before create certifier add verification for getBlock, queryTx and getValidators (#2210)
Replace trust-node option with distrust-node option, and add varification in getting blocks, transactions and validator sets.
2018-09-15 02:41:21 +08:00
HaoyangLiu 173dccca47 go fmt root.go and statik/init.go 2018-09-14 14:14:16 +08:00
HaoyangLiu 538fd6ec5f Remove generated file statik.go and add empty init.go to avoid import error 2018-09-14 14:11:53 +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
HaoyangLiu 5a8d823324 change swaggerui to swagger-ui 2018-09-14 01:01:57 +08:00
HaoyangLiu c2668335a7 merge with develop 2018-09-13 23:09:17 +08:00
HaoyangLiu 0c171ec761
Merge branch 'develop' into bianjie/lcd-lite-swagger-ui 2018-09-13 22:47:01 +08:00
HaoyangLiu 0f29a26efa Add a empty statik.go to avoid test_lint failure and add gocyclo for BroadcastTxRequestHandlerFn 2018-09-13 22:35:23 +08:00
HaoyangLiu 69b9a53b53 Remove generate golang file client/lcd/statik/statik.go 2018-09-13 21:33:04 +08:00
HaoyangLiu 5d5bdbb743 Use http.Handler instead of mux.Router 2018-09-13 20:35:54 +08:00
HaoyangLiu e704f095bd Keep both subcommand: rest-server and lite-server 2018-09-13 20:30:24 +08:00
HaoyangLiu 5f38b50a85 modify makefile to automatically install tools and generate api docs 2018-09-13 19:56:23 +08:00
Jia Chenhui 55b7c6adf1 Merge PR #2304: client/keys: remove excess code and uniform code style 2018-09-12 15:14:29 +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
Ismail Khoffi 06f094563a Merge PR #2301: remove BechValidator
- replace with and unexported struct and amino's ability to override /
implement MarshalJSON & UnmarshalJSON to have the pub key bechified

- replaced default time to UTC as I (from London) always got an error
while decoding (epoch but in BST ;-)

- remove all occurrences of `BechValidator
2018-09-10 18:37:03 -04: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
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
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
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
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
HaoyangLiu 76469c082e Remove responses category in swagger.json and update update_API_docs.md 2018-09-07 10:17:17 +08:00
Christopher Goes e410a9e38a
Merge PR #1952: Update IAVL dependency for v0.10.0 2018-09-06 11:18:16 +02:00
Alessio Treglia 8c32a8f229
Check generate_only's output is actually unsigned 2018-09-04 15:06:55 +02: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
HaoyangLiu b43a1a3808 Split swagger.json, currently only transaction, bank and version are supported 2018-09-03 18:41:52 +08:00
HaoyangLiu ed935181e6 Refactor swagger.json for API docs 2018-09-03 18:32:13 +08:00
HaoyangLiu 1e97074165 Refactor key sign command and add it to gaiacli 2018-09-03 14:13:14 +08:00
HaoyangLiu ea96d8bc2a Add governance and slashing, implement post /txs api 2018-09-03 13:40:23 +08:00
HaoyangLiu 093c4ada5c remove useless fmt.Sprintf and add paramCheck to recover key 2018-09-03 09:56:53 +08:00
HaoyangLiu e496bbd6f5 Update pending and skip statik in test_lint 2018-09-02 22:30:24 +08:00
HaoyangLiu e742b02d3b Refactor code for key management: use cdc instead of json and remove hardcode http status 2018-09-02 22:00:40 +08:00
HaoyangLiu 9a1dac2f87 Refactor code according to code review 2018-09-02 21:42:17 +08:00
HaoyangLiu 8e032f850a Rename rest-server to lite-server and add README to clarify how to update API docs 2018-09-02 20:30:59 +08:00
HaoyangLiu 79c0bc40c8 Add swagger-ui to gaiacli rest-server 2018-09-02 20:09:43 +08:00
Alessio Treglia d84885ca49
No need to create a fake slice of signatures nor skip account no./sequence check 2018-08-31 19:09:39 +02: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
Christopher Goes 03f79ef744
Merge PR #2192: Split LCD implementation PR, part one 2018-08-31 18:41:24 +02:00
HaoyangLiu 67857d704b IRISHUB-238: change wait 3 second to wait tendermint new block. use MustUnmarshalBinary instead of UnmarshalBinary 2018-08-31 23:20:06 +08:00
HaoyangLiu cb3e729582 IRISHUB-238: fix test_lint failure in context.go 2018-08-31 15:54:15 +08:00
HaoyangLiu de8ac6e2a9 IRISHUB-238: missing change a comment 2018-08-31 14:06:53 +08:00
HaoyangLiu b977baec73 IRISHUB-238: move certifier creation to a function 2018-08-31 13:31:24 +08: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
HaoyangLiu 6d2fb8edef IRISHUB-238: fix test_cli failure, move certifier creation from lcd/root.go to NewCLIContext 2018-08-31 11:29:55 +08:00
HaoyangLiu 9de7650b99 IRISHUB-238: fix a bug in judge whether proof is required and refactor comment 2018-08-31 10:15:37 +08:00
HaoyangLiu ab76fd964a IRISHUB-238: remove todo, refactor comment and refactor multistoreproof 2018-08-31 10:03:48 +08:00
HaoyangLiu 5e85a5cdcd IRISHUB-238: delete client manager 2018-08-30 17:14:10 +08:00
HaoyangLiu 3f83aca599 IRISHUB-238: fix test_lint failures in client/lcd/root.go and server/ 2018-08-30 16:24:56 +08:00
HaoyangLiu b878edc388 IRISHUB-238: fix failures in test_lint and test_cover 2018-08-30 15:52:17 +08:00
HaoyangLiu 5473771105 IRISHUB-238 :add trust option for rest-server command 2018-08-30 15:08:10 +08:00
HaoyangLiu 703c643fc0 IRISHUB-238: Add multiply store proof build and verification 2018-08-30 15:05:16 +08:00
Alessio Treglia 76a16ab288
Modify AnteHandler to take a simulate boolean parameter 2018-08-25 20:12:14 +01: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 fb5fe9914d
simplify json handling in LCD tests 2018-08-24 10:16:51 +01:00
Alessio Treglia 2dea46779c
TestCoinSend: test success case when setting gas by hand 2018-08-24 10:16:51 +01:00
Alessio Treglia 7e9ceb452d
clarifyy that adjustment is a multiplicative factor 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 29634bfd1d
Merge PR #1983: CLI UX Updates #1 2018-08-22 12:51:31 +02:00
Sunny Aggarwal 1311117658 added to gov rest 2018-08-22 00:12:44 -07:00
Rigel 58f50c24a4
Merge branch 'develop' into cli-updates 2018-08-21 23:23:44 -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
Federico Kunze cfb5acca6e Merge PR #2099: Query staking Pool and Params 2018-08-21 17:32:54 +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
Rigel 5fff217e9b Merge PR #2033: staking lcd uses owner address not pubkey address 2018-08-15 15:04:01 +02:00
Dev Ojha 4b13529f2d Merge pull request #2029: fix build error 2018-08-14 21:10:57 -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
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
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
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
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
Aleksandr Bezobchuk 6e9226144b Merge pull request #1850: Fix Non-Deterministic Test Coverage 2018-07-27 18:41:50 -04: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
Sunny Aggarwal f3a12909ef Merge PR #1773: Query the votes on a proposal
* added lcd endpoint to query all votes on a proposal
* added cli support
* Gopkg.lock from new dep
* Update PENDING.md
2018-07-20 02:02:46 +02:00
Joon aa525418e1 Merge PR #1373: Initialization of POS chain 2018-07-19 08:39:40 +02:00
Dev Ojha 95191f5a51 Merge PR #1730: client: On any tx that broadcasts a tx, check that acct exists
This subverts the really hard to decipher ABCI error message, with
a nice user friendly error message.
2018-07-18 20:25:55 +02:00
Sunny Aggarwal d6969c1d22 Merge PR #1697: Proposal Query filter by status 2018-07-17 22:59:06 +02:00
Ethan Buchman e35d06eb24 client/lcd: add more gas for unbonding tx 2018-07-14 19:47:45 +01:00
Ethan Buchman f4ee940989 update to tm0.22.4-rc0 and bring back lcd test 2018-07-14 19:47:42 +01:00
Ethan Buchman 53bbe13ece disable lcd tests until fixed 2018-07-13 23:04:55 +01:00
Rigel 3231daa4d8 remove global shares (#1644)
* wip removing pool shares

* remove PoolShares/Tokens entirely

* worked through stake/type compile error

* work through a bunch of keeper errors

* worked through compile errors

* debugging tests

* resolve compilation error

* resolved types errors

* ...

* move inflation to pool type

* ...

* stumped problem

* Calculate newly issued shares, remove unnecessary pool arg from exchange rate calculation

* Rounding changed

* Update x/slashing tests for sdk.Rat BondedTokens

* testing fixes

* resolved test fixes

* cwgoes comments, changelog, lint

* cli bugfixes

* ..

* cli fixed

* spec update

* 'make format'

* cwgoes comments

* Increase test_cover parallelism
2018-07-13 21:46:14 +01:00
Alexander Bezobchuk 5983a07fb6 Merge PR #1599: Implementation of TraceKVStore 2018-07-13 01:58:51 +02:00
Fabian Weber f8f46b2b8c added test for account importing 2018-07-12 19:44:31 +02:00
Fabian Weber e400e83c43 fix key import creating random account 2018-07-12 19:44:31 +02:00
Christopher Goes 432c109f06
Merge PR #1627: ready-for-review: Gov modules enums marshalJSON to String 2018-07-12 19:39:15 +02:00
ValarDragon fc4c563e29 keys: Keybase.Update no longer asks for newpass if oldpass is incorrect
Achieved by refactoring the parameter newpass as follows:

* (newpass string) -> (getNewpass func() (string, error))

Closes #1629
2018-07-10 20:00:22 -07:00
Sunny Aggarwal cba7fd7ee8 gov enums marshal to String 2018-07-10 17:59:07 -07:00
Aditya b195c556e2 Merge pull request #1600: Friend can create validator and delegate on behalf of genesis validator
* Added msg and handling for surrogate create validator

* changelog and error fix

* fix changelog

* Remove unnecessary msg by combining into CreateValidator

* Refactor

* Appease linter

* Added onbehalfof functionality in client

* fmt

* Added gaia onbehalfof test

* Update test for onbehalfof validator creation

* fix test

* Fix flag error

* Add app test

* fmt

* Fixed signer for onbehalfof createvalidator

* Fix error msg

* Simplify test

* fmt
2018-07-10 20:16:37 -04:00
Christopher Goes 5a56c3f03d
Merge PR #1575: ready-for-review: sdk.AccAddress natively bech32 2018-07-10 04:18:23 +02:00
ValarDragon 99e91dd276 Add nolints on remaining functions 2018-07-09 16:16:43 -07:00
Sunny Aggarwal eaf49a2dfb
Merge branch 'develop' into sunny/sdkAddress_bech32 2018-07-09 16:07:43 -07:00
Sunny Aggarwal 896cd333f0 address comments 2018-07-09 16:06:05 -07:00
Aleksandr Bezobchuk 7fc2363191 Merge pull request #1601: Fix LCD rest-server Command 2018-07-09 15:56:08 -04:00
Sunny Aggarwal 25d976feb4 works? 2018-07-09 01:47:38 -07:00
sunnya97 96bc71404e asdf 2018-07-09 01:01:29 -07:00
sunnya97 7ac220beb6 asdf 2018-07-09 00:59:51 -07:00
Sunny Aggarwal 50ed0fa1ae asdf 2018-07-09 00:35:28 -07:00
ValarDragon 611e4faa3a gaiad: Genesis txs now use bech32 encoding of address and pubkey
* `gaiad init gen-tx` makes the outputted file use bech32, with acct prefix
* `gaiad init --gen-txs` only reads bech32 with acct prefixes

The reason for using the account prefix is that in principle you could
have genesis transactions for non-validators.

Closes #1475
2018-07-07 14:23:19 -07:00
ValarDragon c708c799fd Add print-response flag 2018-07-05 22:19:50 -07:00
ValarDragon 8e20200abe Add --json flag 2018-07-05 20:42:41 -07:00
ValarDragon 2197a9598b Merge branch 'dev/add_async_flag' of github.com:cosmos/cosmos-sdk into dev/add_async_flag 2018-07-05 20:19:39 -07:00
ValarDragon 8857b69d02 Use async flag directly from context 2018-07-05 20:15:40 -07:00
Dev Ojha be9ae47b0a
Merge branch 'develop' into dev/add_async_flag 2018-07-05 20:06:52 -07:00
ValarDragon 27a31cae44 add Async to context 2018-07-05 20:05:17 -07:00
Christopher Goes 0c47e6ffdf
Merge PR #1568: cli: deprecate --name in favor of --from 2018-07-06 04:37:45 +02:00
ValarDragon 6f94dd64c0 cli: Add async flag to all broadcasting txs
closes #1436
2018-07-05 19:15:37 -07:00
ValarDragon 0b10430d65 gaiacli, keys: Improve error message when deleting non-existant key 2018-07-05 18:03:41 -07:00
ValarDragon bf8cde1d3a cli: deprecate --name in favor of --from 2018-07-05 17:24:02 -07:00
Fabian Weber 5998378773 added error check 2018-07-04 16:39:16 +02:00
Fabian Weber 2c697c982b added sunnys changes 2018-07-04 10:48:47 +02:00
Fabian a118229fcb Fabo/Switch key creation REST output to bech32 address (#1522)
* switch new key output to bech32
* changelog
* fixed tests
* Update LCD TestKeys failure message
2018-07-03 21:31:15 +02:00
Ethan Buchman d388036454 Merge PR #1520: various fixes for test_cli
* various fixes for test_cli
* linting
2018-07-03 06:33:53 +02:00
Ethan Buchman 673086f621
Merge branch 'develop' into davekaj/set-fee-collection-keeper 2018-07-02 20:43:33 -04:00
Ethan Buchman f78f30c67a update for tm v0.22.0. tmlibs->tendermint/libs 2018-07-02 16:34:06 -04:00
Ethan Buchman feb3acdbe9 Merge PR #1491: client/lcd: fix tests
* client/lcd: fix tests
* circle: drop test_unit. store artifacts in test_cover
* hack fix in TestUnrevoke
2018-07-01 01:32:52 +02:00
Christopher Goes 3654579ea7
Merge PR #1278: Slashing v2
Implement semifinal Gaia slashing spec (#1263), less #1348, #1378, and #1440 which are TBD.
2018-06-30 05:34:55 +02:00
Dev Ojha 955a0c9af7 Switch asserts to require (#1483)
* meta: Switch the majority of asserts to require

Switch most assert statements to require, to ease debugging.
Closes #1418

* Fix imports
2018-06-30 03:10:15 +02:00
Dev Ojha fc3dd56281 Merge PR #1477: gaiacli: Make recovery allow new keys
* gaiacli: Make recovery allow new keys
* Move create key to a temporary method, restore create fundraiser key
2018-06-30 00:47:09 +02:00
Dev Ojha 097dd8a164 tools: Add unparam linter (#1443)
* tools: Add unparam linter

unparam detects unused parameters in functions, and a parameter to
a function which only ever takes on one value. The latter is an
indication that more tests are required.

There are many nolints in this PR, as I believe that writing tests
to fix alot of these situations is out of scope for this PR / it
will be changed in future commits. There are some nolints for
when we have to comply to normal api's.

* crypto/keys no longer used by x/gov/client/rest/rest.go
2018-06-29 18:22:24 -04:00
David Kajpust 64ea408b38 fixed error for blank fee string 2018-06-29 11:50:32 -04:00
David Kajpust 0a76035398 fee collection now works in gaia 2018-06-29 09:37:14 -04:00
Dev Ojha 337e87b228 Merge PR #1449: crypto/keys: make bcrypt security param a var
This is done so that the time spent on bcrypt during test cases
can be reduced. This change reduces the amount of time lcd tests
spend on bcrypt from 76% to 40%. (We need to reduce the number of
calls to bcrypt in a seperate PR, along with fixing other sources
of slowness)

Making the bcrypt security parameter a var shouldn't be a security issue:
One can't verify an invalid key by maliciously changing the bcrypt
parameter during a runtime vulnerability. The main security
threat this then exposes would be something that changes this during
runtime before the user creates their key. This vulnerability must
succeed to update this to that same value before every subsequent call
to gaiacli keys in future startups / or the attacker must get access
to the filesystem. However, with this same threat model (changing
variables in runtime), one can cause the user to sign a different tx
than what they see, which is a significantly cheaper attack then breaking
a bcrypt hash. (Recall that the nonce still exists to break rainbow
tables)
2018-06-29 09:22:06 +02:00
Christopher Goes 59aadf42aa
Ledger integration (#931)
Merges the keybase and Ledger code from go-crypto (which is no more) into the SDK
Adds support for Ledger into gaiacli
Cherry-picks updated error handling from #1158
2018-06-29 02:54:47 +02:00
David Kajpust 090aaf8137 Merge #1412: Add async flag and functionality to gaiacli send
* added async functionality to gaiacli
* addressed requested changes, updated changelog
2018-06-28 21:23:47 +02:00
Dev Ojha 3e14868bd6 Merge PR #1429: tools: Add ineffassign linter
* tools: Add ineffassign linter

This errors on assignments that don't actually do anything. i.e.

x, err := myFunc(1)
y, err = myFunc(2)

This will call out that the first function's call error was never
used.

* Fix makefile, add misspell to makefile
2018-06-28 19:12:02 +02:00
Dev Ojha 2755c66545 Merge PR #1424: tools: add unconvert linter
unconvert checks for unnecessary type conversions
2018-06-28 18:08:29 +02:00
Dev Ojha 6d9f07dfee tools: Add go vet as a linter (#1421)
* tools: add go vet

* tools: Add go vet as a linter
2018-06-27 20:32:06 -04:00