Commit Graph

34 Commits

Author SHA1 Message Date
Alessio Treglia
4c36b0fe05 Merge PR #2881: Don't call gaiacli tx sign. Use utils.SignStdTx() instead.
This is to avoid command redirection and reduce the use
of viper's global variables.

Closes: #2875
2018-11-26 12:50: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
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
Alessio Treglia
dbbf0647f0
Document what --validate-signatures does 2018-10-31 13:50:01 +00:00
Alessio Treglia
6c8791f505
Nest switches 2018-10-31 13:43:20 +00:00
Alessio Treglia
84aef0d106
Apply suggestions from bez 2018-10-31 13:43:20 +00:00
Alessio Treglia
44d2347109
Set success = false when it fails 2018-10-31 13:43:20 +00:00
Alessio Treglia
9e397907be
Rename append, it's go builtin 2018-10-31 13:43:20 +00:00
Alessio Treglia
f752525d54
s/--sig-only/--signature-only/ 2018-10-31 13:42:42 +00:00
Alessio Treglia
53f1233f0a
s/--print-sigs/--validate-signatures/ 2018-10-31 13:42:42 +00:00
Alessio Treglia
31c062689d
Validate --name 2018-10-31 13:42:42 +00:00
Alessio Treglia
69a7c06ef7
Find better name for --print-signature-only 2018-10-31 13:42:42 +00:00
Alessio Treglia
62974e627e
Improve online docs 2018-10-31 13:41:26 +00:00
Alessio Treglia
4bf17e82b4
Improve errors reporting 2018-10-31 13:41:26 +00:00
Alessio Treglia
933592d052
Check sanity of signatures and report errors when run with --print-sigs 2018-10-31 13:41:26 +00: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
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
HaoyangLiu
9f67e8af20 Merge PR #2215: Add swagger-ui for gaiacli lite-server 2018-10-04 13:00:24 +02:00
Alessio Treglia
a2caefc8ae Merge PR #2390: CLI subcommands reorganization 2018-09-26 22:00:49 +08: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
Jae Kwon
2abc90e92b Merge remote-tracking branch 'origin/develop' into alessio/auth-txcontext-to-txbuilder 2018-09-07 10:49:12 -07: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
Jeremiah Andrews
2378e3431c Fix linter errors 2018-09-03 07:58:57 -07:00
Alexander Bezobchuk
12c2c236c2 Merge PR #1741: CoreContext Refactor 2018-08-06 20:11:30 +02:00
Sunny Aggarwal
896cd333f0 address comments 2018-07-09 16:06:05 -07:00
ValarDragon
819eedd281 gaiacli: Improve error messages for send command
Now provides better error messages when the account you're sending
from has no money, or it has insufficient funds. (Avoids making
the user interpret ABCI errors)

closes #1489
2018-06-30 01:32:01 -07:00
Fabian
42e72956f4 Merge PR #1252: Query node version
introduce non store queries
add version query
update lcd spec
changelog
moved version query into baseapp
2018-06-14 07:49:21 +02:00
Sunny Aggarwal
161cb474d4 Account Numbers for Replay Protection with Account Pruning (#1077)
* in progress
* passes current tests
* added tests and got working
* changelog and docs
* removed prints
* oops
* works!
* issue in test_cli
* number 9 number 9 number 9
* at least it does only the 9 issue now
* hallelujah it works!
* removed print statement
* rebased
* gah
2018-06-12 04:30:54 +02:00
Dev Ojha
9c4bbf7dfd Merge PR #1195: gaiacli - Add error message for when account isn't found 2018-06-09 08:40:22 +02:00
Zaki Manian
ce850dca3b Switch from bech32cosmos to bech32 2018-06-01 16:23:58 +02:00
Zaki Manian
f33f49a840 Almost from scratch reimplementation of bech32cosmos integration. 2018-05-27 13:47:23 +02:00
sunnya97
cb52712660 in progress 2018-05-23 19:49:35 -07:00
rigelrozanski
556896679a ... 2018-04-26 14:26:39 -04:00
Christopher Goes
56ac948dc6
REST folder restructure & cleanup 2018-04-25 16:18:06 +02:00