Commit Graph

25 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
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
Christopher Goes eb27c70292
Merge branch 'develop' into alessio/validate-addr-when-adding-genesis-account 2018-11-16 11:44:41 +01:00
Christopher Goes 9a37066405
Merge PR #2841: Check whether key passed with --name exists before redirecting to tx create-validator
* Check whether key passed with --name exists before redirecting to tx create-validator
* Update PENDING.md
2018-11-16 11:40:37 +01:00
Alessio Treglia f2b38874ef Check whether key passed with --name exists before redirecting to tx create-validator
Closes: #2804
2018-11-16 05:01:34 +00:00
Alessio Treglia 815a6de82f R4R: Remove AppInit (#2801)
* Remove AppInit
* Update PENDING.md
2018-11-15 10:01:19 -08:00
Alessio Treglia 31ccfb5b5a add-genesis-account: validate app state accounts 2018-11-15 15:44:27 +00:00
Aleksandr Bezobchuk 964123356b Fix required flag 2018-11-12 15:44:59 -05:00
Jack Zampolin 4df780b1dc
Merge branch 'develop' into bez/require-moniker-init 2018-11-12 12:08:38 -08:00
Alessio Treglia 70826495b8 Merge PR #2752: Don't hardcode bondable denom 2018-11-12 19:54:18 +01:00
Aleksandr Bezobchuk 8c14b1d77f Fix test coverage 2018-11-12 08:45:05 -05:00
Aleksandr Bezobchuk 08a1667246 Require moniker instead of generating a random one 2018-11-12 08:27:26 -05:00
Aleksandr Bezobchuk 29bec833f3 Update moniker prefix 2018-11-12 08:16:47 -05:00
Aleksandr Bezobchuk 156370ea9c Generate random moniker when missing 2018-11-12 08:15:08 -05:00
Jack Zampolin 056e75c30b
Merge pull request #2704 from cosmos/alessio/utility-to-add-accts-to-genesis
R4R: Add small utility to add account to genesis.json after gaiad init
2018-11-09 09:40:46 -08:00
Alessio Treglia 201abfec8c Add --chain-id to testnet command 2018-11-09 15:25:14 +00:00
Alessio Treglia 8a7c4900f4 s/WriteGenesisFile/ExportGenesisFile/ 2018-11-09 10:59:11 +00:00
Alessio Treglia 4f6f8e09ae Add small utility to add account to genesis.json after gaiad init 2018-11-09 10:52:28 +00:00
Christopher Goes 94f45311a0 Fix state export/import, add to CI (#2690)
* Update slashing import/export
* More slashing.WriteGenesis
* Add test import/export to CI
* Store equality comparison.
* Fix validator bond intra-tx counter
* Set timeslices for unbonding validators
* WriteGenesis => ExportGenesis
* Delete validators from unbonding queue when re-bonded
* Hook for validator deletion, fix staking genesis tests
2018-11-08 16:28:28 -08:00
Alexander Bezobchuk 4f46a4c4d5 Update testnet to use canonical genesis time (#2692)
* Update testnet to use canonical genesis time
* Fix linting in genesis test
2018-11-07 00:19:06 -08: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
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
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