Commit Graph

518 Commits

Author SHA1 Message Date
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