Commit Graph

289 Commits

Author SHA1 Message Date
Ethan Frey c083678cae cleaned up basecli tx so it really works 2018-03-01 02:36:57 +00:00
Ethan Frey 734b1073ba Added tx subcommands and automate manual testing 2018-03-01 02:36:57 +00:00
Ethan Frey bae7cec3fa Move all subcommands out of main into proper folders 2018-03-01 02:36:57 +00:00
Ethan Frey c7ca6ec038 Fixed import 2018-03-01 02:36:57 +00:00
Ethan Frey 356baf61c1 Move sendtx and query account commands into x/bank 2018-03-01 02:36:57 +00:00
Ethan Frey 00304dd094 Prompt for password on sendtx 2018-03-01 02:36:57 +00:00
Ethan Frey 8c93a6455b Implement query account without proofs 2018-03-01 02:36:57 +00:00
Ethan Frey b0c65f8045 All keys logic works with new basecli 2018-03-01 02:36:57 +00:00
Ethan Frey 7361269eb6 Updated keys add 2018-03-01 02:36:57 +00:00
Ethan Frey ee31db3263 Very rough import of old keys logic 2018-03-01 02:36:57 +00:00
Ethan Buchman e45ad068fb move things to _attic 2018-01-06 15:35:22 -05:00
Jae Kwon 1d207a2a5e Fixing store/* bugs... 2017-12-04 00:23:10 -08:00
Ethan Frey 850796bad5 eyes example compiles - but doesnt work 2017-10-25 19:56:48 +02:00
Ethan Frey 2cc53beca7 CLI supports creating ledger keys 2017-10-25 19:54:57 +02:00
Ethan Frey 6f87b0a42f Rename seeds command to commits 2017-10-25 19:35:36 +02:00
Ethan Frey 9442e7e04a Cleaned up naming of seed->commit 2017-10-25 19:35:36 +02:00
Ethan Frey 1c446f4b49 fix client tests 2017-10-25 19:35:36 +02:00
Ethan Frey 1b7bec230d make install works 2017-10-25 19:35:36 +02:00
Ethan Frey 624133ad92 Fix lot more lightclient imports 2017-10-25 19:35:36 +02:00
Ethan Frey 1f897cabde Fix light-client imports 2017-10-25 19:35:36 +02:00
Ethan Frey 7fad21d800 Use own ErrNoData, not from light-client 2017-10-25 19:35:36 +02:00
Ethan Frey c4ead8b8a3 Expose height flag in all queries 2017-10-25 19:14:28 +02:00
Ethan Frey 422e67b382 Update deps: tendermint/abci/iavl, fix code 2017-10-25 19:14:28 +02:00
Ethan Frey f65215ad92 Big cleanup of app dir
StoreApp just the queries, BaseApp with handler/ticker
Ticker now defined top level, as an interface, with context
Name for info taken as parameter, start cmd uses commandline name
Cleaner compisition of apps.
2017-10-20 13:42:03 +02:00
Ethan Frey c1d36eeb21 Fixed all tests 2017-10-20 13:42:03 +02:00
Ethan Frey 6c667b8398 Use tendermint version format for basecoin version 2017-10-20 13:05:59 +02:00
Ethan Frey 5238448a46 Make sure height in store increments every block, even if empty 2017-10-10 15:03:39 +02:00
Ethan Frey 9092b4d7f1 Fix TestTxProofs 2017-10-10 14:27:38 +02:00
Ethan Frey 8fbf923c25 Update binaries to use our key commands, not the ones from go-crypto 2017-09-08 20:47:46 +02:00
Ethan Frey ed690b8aa3 Move keys command from go-crypto here 2017-09-08 20:47:46 +02:00
Ethan Frey 2ac564fead Clean up seed input/output code 2017-09-08 20:47:46 +02:00
Ethan Frey 46d10db990 fix unit tests 2017-09-08 20:47:46 +02:00
Ethan Frey 2951763660 Moved merkleeyes->iavl and updated references 2017-09-08 20:47:46 +02:00
Ethan Frey f2ff547a8f Removed proxy from client/rest as now in client 2017-09-08 20:47:46 +02:00
Ethan Frey 38b6173066 Pull out proxy server away from viper 2017-09-08 20:47:46 +02:00
Ethan Frey e0ddecc229 Move proof logic away from viper 2017-09-08 20:47:46 +02:00
Ethan Frey 521503026e Separate common commands from viper 2017-09-08 20:47:46 +02:00
Ethan Frey 041943c441 Rename all packages and imports to cosmos-sdk 2017-08-21 22:15:15 +01:00
Emmanuel Odeke 71bacacc21 Fix query test - Alexis please check better 2017-08-18 23:03:58 +01:00
Ethan Frey a908c24235 Use linker flags to set git commit in version command 2017-08-18 22:04:50 +01:00
Alexis Sellier d3cdce3850 Use more specific assertion functions 2017-08-16 16:55:25 +02:00
Alexis Sellier b69df980d1 Check proofs with latest commit 2017-08-11 14:10:06 +02:00
Alexis Sellier 6a642e33b8 Check returned height 2017-08-11 13:57:38 +02:00
Alexis Sellier 3f0c0ad8f5 Refactor function for readability 2017-08-11 13:34:39 +02:00
Alexis Sellier eec4b10067 This doesn't need to be public 2017-08-10 15:10:21 +02:00
Alexis Sellier 77207a19db Fix some comments 2017-08-10 15:10:15 +02:00
Alexis Sellier f9c3fce5b4 Write tx proof tests 2017-08-10 14:51:56 +02:00
Alexis Sellier 388f0eece7 Wrap error for good measure 2017-08-10 14:51:56 +02:00
Alexis Sellier 668eea8628 Fix return value when nothing is found 2017-08-09 13:13:16 +02:00
Alexis Sellier d1b49da825 Use new Certifier type from light-client 2017-08-08 18:52:28 +02:00
Alexis Sellier 1882376a34 Cleanup tests a bit 2017-08-08 18:06:14 +02:00
Alexis Sellier 80ef09f1ee Fix bogus height check 2017-08-08 16:32:01 +02:00
Ethan Frey 7857f25649 No sleep, just wait for one block to exist 2017-08-08 16:32:01 +02:00
Ethan Frey f7d4b7f721 Add tests that the proofs verify 2017-08-08 12:27:40 +02:00
Alexis Sellier 225f0e7dbe Rename function 2017-08-08 12:20:21 +02:00
Alexis Sellier 2b735d8968 Support non-existence proof 2017-08-08 11:51:15 +02:00
Alexis Sellier 538824d736 Change module import etc -> eyes 2017-08-07 19:24:58 +02:00
Alexis Sellier 15d2e2525f Start working on proof tests 2017-08-07 19:23:44 +02:00
Ethan Frey 3db48b8d9a Add helper function to parse a command flag 2017-08-06 22:51:29 +02:00
Ethan Frey d6d6b75736 Renamed client/commands/proofs to client/commands/query 2017-08-04 20:50:36 +02:00
Ethan Frey 6dae258767 Lots of cleanup 2017-08-04 20:36:50 +02:00
Alexis Sellier 831c9ae3ec Use Get/GetParsed everywhere 2017-08-04 19:21:40 +02:00
Alexis Sellier 391380bef2 Refactor app state query code 2017-08-04 19:21:40 +02:00
Ethan Frey 4df20df62a Fix meaning of --trust-node, pass tests 2017-08-04 18:51:16 +02:00
Ethan Frey 8d3576f0f7 Try to rip out tx stuff 2017-08-04 17:27:54 +02:00
Emmanuel Odeke ee5d22010a
cmd/baseserver, */rest: allow baseserver to choose which handlers to use
Make handlers easily configurable to use in cmd/baseserver/main.go.
This way client users can trivially change what functionality they'd
like.
It involves moving ServeCmd out of client/rest to */main.go
and lets client/rest become a bazaar for available mux.Router
registrars.

Updates #200
2017-08-03 11:41:51 -06:00
Emmanuel Odeke 1a45755027 client/rest, modules/coin/rest: moved code around
After offline emails and a video call with @ethanfrey,
a goal was decided to move things around i.e:
- [X] Move /build/send and /query/account to modules/coin/rest

Due to that move, there is a lot of overlap between needed
code and utils so extracted common code to make
https://github.com/tendermint/tmlibs/pull/33
so make sure to pull in that commit into your tmlibs tree.

After code review feedback:
client/rest, modules/coin/rest: FoutputProof, PrepareSendTx helper

* Extract OutputProof to FoutputProof helper that can
be used in modules/coin/rest/handlers.go as proofs.FoutputProof
* Revert r.HandleFunc("/tx", doPostTx).Methods("POST") which
was erraneously deleted
* Use function signatures from "tendermint/tmblibs/common"
2017-08-02 12:57:29 -06:00
Ethan Frey 75181a78c3 Hide trust flag 2017-07-29 17:41:13 -04:00
Ethan Frey 4652779a3d Fix up flag handling 2017-07-29 17:23:21 -04:00
Ethan Frey 8dd2371cc5 Don't require init when --trust-node is given 2017-07-29 17:23:21 -04:00
Ethan Frey b98bfc01ae Add --trust-node flag to cli to skip proofs on queries 2017-07-29 17:23:21 -04:00
Ethan Frey f0e2227ada Use password as key, allow 3 letter names 2017-07-29 17:16:24 -04:00
Emmanuel Odeke 7c28374c38 Merge branch 'rest-server-query' into rest-server 2017-07-29 13:25:29 -06:00
Emmanuel Odeke c0743af51c
client/rest: implement /query/account/{signature}
Allows us to query account balance from the blockchain
for example:
/query/account/sigs:BDADF167E6CF2CDF2D621E590FF1FED2787A40E0
2017-07-29 13:20:51 -06:00
Ethan Frey de82c03804 Fixed up business logic in build/send 2017-07-29 09:28:45 -04:00
Emmanuel Odeke d4ab79ece0
client/rest, cmd/baseserver: started a basecoin REST client
```shell
$ go get -u -v github.com/tendermint/basecoin/cmd/baseserver
$ baseserver init
$ baseserver serve
```
A server that can be ran by default on port 8998
otherwise one can specify the port using flag `--port` like this:
```shell
$ baseserver serve --port 9999
```
to serve it on port 9999, accessible at http://localhost:9999

Implemented:
- [X] /keys POST -- generate a new key
- [X] /keys GET  -- list all keys
- [X] /keys/{name}  DELETE-- delete a named key
- [X] /keys/{name}  GET -- get a named key
- [X] /keys/{name}  POST, PUT -- update a named key
- [X] /sign POST -- sign a transaction
- [X] /build/send POST -- send money from one actor to another. However,
  still needs testing and verification of output
- [X] /tx POST -- post a transaction to the blockchain. However, still
  needs testing and verification of output

This base code to get the handlers starters was adapted from:
* https://github.com/tendermint/go-crypto/blob/master/keys/server
* https://github.com/tendermint/basecoin/blob/unstable/client/commands/proxy/root.go

Updates #186
2017-07-29 04:12:24 -06:00
Ethan Frey eae1883f3d Add sign and post helper functions 2017-07-28 10:35:39 -04:00
Ethan Frey f32e6c9b7d Updated light-client 2017-07-27 16:41:36 -04:00
Ethan Frey e90d6db516 Update seed to a given height 2017-07-27 16:41:13 -04:00
Ethan Frey 95b16b3830 Code cleanup from emmanuels comment 2017-07-27 16:41:12 -04:00
Ethan Frey fd10387eb5 Tested register and update ibc via cli 2017-07-27 16:30:20 -04:00
Ethan Frey e242f30aeb Add --no-sign flag 2017-07-27 15:42:09 -04:00
Ethan Frey 63fc25e74e Add roles cli test, coin query supports multiple apps in actor 2017-07-19 16:14:26 +02:00
Ethan Frey 911dd1423e Add roles wrapper/tx/query command to basecoin 2017-07-19 14:26:40 +02:00
Ethan Frey e7da4c2d3a Add support for --prepare to store tx for multisig 2017-07-19 13:22:53 +02:00
rigel rozanski ac1ecc10c4 new library orders 2017-07-19 04:51:36 -04:00
Ethan Frey 942506c21a basecli tx handles json input 2017-07-18 22:40:04 +02:00
Ethan Frey 100522069d Moved cmd/basecli/commands into client/commands 2017-07-18 22:21:57 +02:00
Ethan Frey eb495e081b Move commands to client/commands 2017-07-18 21:57:37 +02:00