Commit Graph

47 Commits

Author SHA1 Message Date
Alexander Bezobchuk
ea46da7126
Merge PR #3970: Fix Tx Sign Offline Mode
- Add shorthand flags `-a` and `-s` for the account and sequence numbers respectively
- Mark the account and sequence numbers required during "offline" mode
- Always do an RPC query for account and sequence number during "online" mode
  - If clients wish to provide such values, they must use `--offline`. This makes the whole flow/UX easier to reason about.

closes: #3893
2019-03-26 10:36:10 -04:00
Alessio Treglia
cdf2b7a7c5
gometalinter -> golangci-lint migration (#3933)
{,scripts/}Makefile:
- Remove gometalinter, install golangci-lint.
- Remove distinction between tools and devtools.
  Just tools is enough.
- test_lint -> lint
  Migrating away from underscore separated names.
- Remove unnecessary targets.
- Drop tendermint/lint. Incompatbile with golangci-lint
  and no longer necessary anyway.
- Fix misleading message in go-mod-cache.
- New ci-target to avoid download tools twice.
- Run tests with -mod=readonly.

Port tools/gometalinter.json to .golangci.yml
Update CircleCI config accordingly.

Closes: #3896
2019-03-19 17:52:43 +01:00
Alexander Bezobchuk
47a44fb580 Merge PR #3748: Multisig Display UX Improvements 2019-03-01 13:29:33 -08:00
Alexander Bezobchuk
6ace1fada2 Merge PR #3696: Cleanup Tx Broadcasting and Encoding 2019-02-26 12:34:27 +01:00
Alexander Bezobchuk
c96d8f3e81 Merge PR #3713: Use from instead of name CLI flag for the tx sign cmd
* Use from instead of name CLI flag for the tx sign cmd
* Use cliCtx.GetFromName() instead of direct from value
2019-02-22 17:15:36 +01:00
Ducem Barr
9348750eb4 Merge PR #3523: Add tx/encode endpoint and CLI command 2019-02-08 13:17:25 -08:00
Jack Zampolin
408484e6d4
Merge PR #3503: CLI flags to args 2019-02-06 16:15:37 -08:00
Alessio Treglia
9a57ce0214 Merge PR #3514: don't lock keybase on lcd startup 2019-02-06 11:23:49 -08:00
Jack Zampolin
9f50c9f5b6
R4R: Ensure all CLI queries respect output flags (#3320) 2019-01-22 09:28:39 -08:00
Alessio Treglia
26cb0a125a Multi-signature workflow support (#3264)
- New keys add --multisig flag to store multisig keys
  locally.
- New multisign command to generate multisig
  signatures.
- New sign --multisig flag to enable multisig mode.
- Add multisig transactions support in ante handler.
- gaiad add-genesis-account can now take both account
  addresses and key names.

Closes: #3198
2019-01-16 09:30:57 -08:00
Federico Kunze
f02f7aa5a0 Add fees and memo to REST, updated CLI to receive coins as fees (#3069) 2018-12-19 16:26:33 -08:00
Alessio Treglia
24a1670cf0 Run make format 2018-12-10 14:27:25 +00: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
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