Commit Graph

543 Commits

Author SHA1 Message Date
Anton Kaliaev c08618f7e9
expose latency timer on WSClient 2017-08-03 19:10:14 -04:00
Anton Kaliaev d578f7f81e
biff up WS client
What's new:
- auto reconnect
- ping/pong
- colored tests
2017-08-03 19:10:14 -04:00
Anton Kaliaev 5fea1d2675
[.editorconfig] add rule for .proto files [ci skip] 2017-07-19 12:29:10 +03:00
Ethan Buchman d8ca0580a8 rpc: move grpc_test from test/ to grpc/ 2017-07-17 12:58:15 -04:00
ramil 6f8d385dfa fast sync status 2017-07-17 09:44:23 +03:00
Adrian Brink 05c0dfac12 First crack it providing fast-sync endpoint 2017-07-10 19:30:54 +02:00
Ethan Buchman 0d1fa8e884 fixes from review 2017-06-28 11:12:45 -04:00
Ethan Buchman e2ed15fa02 rpc: SetWriteDeadline for ws ping. fixes #553 2017-06-26 17:13:39 -04:00
Ethan Buchman b6031d5f4b rpc/lib: set logger on ws conn 2017-06-24 21:55:31 -04:00
Ethan Buchman 5c29d7aba9 rpc/lib: test tcp and unix 2017-06-24 21:27:19 -04:00
Ethan Buchman 4522456d55 Merge remote-tracking branch 'origin/feature/496-deduplicate-tests-in-rpc-tests-and-rpc-client' into unstable 2017-06-23 21:24:09 -04:00
Ethan Frey aac85a14f0 httpDialer accepts no prefix or http:// as tcp:// 2017-06-22 20:56:57 +02:00
Anton Kaliaev eaec0c8ea5
deduplicate tests in rpc/test and rpc/client (Refs #496) 2017-06-16 17:14:27 +04:00
Anton Kaliaev b4ece65726
standardize key for errors (should be "err") 2017-06-14 12:50:49 +04:00
Ethan Buchman c7cd62b449 Merge branch 'master' into develop 2017-05-29 10:53:33 -04:00
Ethan Buchman bd7ec18c19 fix tests 2017-05-26 12:17:32 -04:00
Ethan Buchman 4f27752468 [rpc] dont enable unsafe by default; limit /blockchain_info to 20 blocks 2017-05-24 11:31:31 -04:00
spring1843 cf686d4f83 Fix commonly misspelled words 2017-05-20 21:43:00 -07:00
Ethan Frey 2b324b7eb9 RPC returns pretty formated json 2017-05-14 19:06:34 +02:00
Anton Kaliaev f8fdbe3dbc
changes as per Bucky's review 2017-05-13 16:22:51 +02:00
Anton Kaliaev f803544195
new logging 2017-05-13 10:24:58 +02:00
Ethan Buchman 75989342b0 fixes from rebase 2017-05-04 23:03:42 -04:00
Ethan Buchman 46151720f8 fix tests 2017-05-04 22:46:41 -04:00
Ethan Buchman 6afee8f117 rpc: fix tests 2017-05-04 22:45:13 -04:00
Ethan Buchman f0e7f0acf8 remove viper from rpc except test 2017-05-04 22:43:55 -04:00
Ethan Buchman 9860c8fee1 rpc: cleanup some comments [ci skip] 2017-05-03 14:33:07 -04:00
Ethan Frey 4a1b714ca4 All tests pass without go-wire json ptr madness 2017-05-03 16:45:00 +02:00
Ethan Frey 4c1d41c12e Test json rpc parsing 2017-05-03 16:26:18 +02:00
Ethan Frey 6ba799132c json.RawMessage in RPCRequest to defer parsing 2017-05-03 16:13:58 +02:00
Ethan Buchman 6dbcfb32d2 comment on copied wire file 2017-04-28 23:22:54 -04:00
Ethan Buchman efeadcc0f4 some cleanup from review 2017-04-28 23:18:38 -04:00
Ethan Buchman 4e781961e9 remove TMResult. ::drinks champagne:: 2017-04-28 22:26:23 -04:00
Ethan Buchman 884060eb9b rpc/lib: no Result wrapper 2017-04-28 22:04:14 -04:00
Ethan Buchman 07e59e63f9 TMEventDataInner 2017-04-28 17:57:06 -04:00
Ethan Buchman ac28b12fa8 add readReflectJSON from wire 2017-04-28 17:56:44 -04:00
Ethan Frey 257f45b768 ebuchman: added some demos on how to parse unknown types 2017-04-28 22:01:46 +02:00
Ethan Buchman acfbea6d49 rpc: decode args without wire 2017-04-28 14:36:38 -04:00
Ethan Frey 6c60c07f16 BROKEN: attempt to replace go-wire.JSON with json.Unmarshall in rpc 2017-04-28 16:24:06 +02:00
Ethan Frey bff8402fe8 Fix json for TMResult to not include "TMResultInner" 2017-04-28 15:26:06 +02:00
Ethan Frey f6f1f1992c Prepare rpc responses for go-data compatibility, still use go-wire 2017-04-28 14:46:04 +02:00
Ethan Frey 194f345470 Use non-standard port so tests don't die when I am running basecoin 2017-04-28 14:45:34 +02:00
Ethan Buchman c930f43cbe rpc: fix tests 2017-04-27 19:56:14 -04:00
Ethan Buchman a518d08839 rpc: response types use Result instead of pb Response 2017-04-27 19:34:25 -04:00
Ethan Buchman cdf650fba9 rpc: repsonse types use data.Bytes 2017-04-27 19:06:07 -04:00
Ethan Buchman cc6dde96c1 rpc -> rpc/lib and rpc/tendermint -> rpc 2017-04-26 19:57:33 -04:00
Ethan Buchman 9851265d4f rpc: use HTTP error codes 2017-04-25 23:09:47 -04:00
Ethan Buchman 2fcb2b9232 remove unsafe_set_config 2017-04-25 17:58:26 -04:00
Ethan Buchman fcf78a5da7 cleanup go-config/viper and some unnamed imports 2017-04-25 14:54:56 -04:00
rigel rozanski 72c4be35e8 tiny fix 2017-04-25 13:44:13 -04:00
Rigel Rozanski 7448753257 fixing tests 2017-04-25 13:43:57 -04:00
Rigel Rozanski 270b68a893 glide lock updates 2017-04-25 13:43:22 -04:00
Rigel Rozanski cefb2bede0 adding viper
int

int
2017-04-25 13:42:22 -04:00
Ethan Frey bd93f76950 Improve rpc to properly format any alias for []byte in URIClient 2017-04-25 17:17:51 +02:00
Ethan Frey 803b1f2115 Improve client test cases 2017-04-25 16:49:01 +02:00
Ethan Buchman 3cdd2daf08 fix tests 2017-04-21 18:44:37 -04:00
Ethan Buchman 56c60fba23 go-p2p -> tendermint/p2p 2017-04-21 18:19:41 -04:00
Ethan Buchman 9e82d132ce go-rpc -> tendermint/rpc 2017-04-21 18:19:29 -04:00
Ethan Buchman d5b524e309 go-merkle -> merkleeyes/iavl and tmlibs/merkle 2017-04-21 18:16:05 -04:00
Ethan Buchman e6fe6b5b76 go-data -> go-wire/data 2017-04-21 18:13:25 -04:00
Ethan Buchman d1926bcad1 use tmlibs 2017-04-21 18:12:54 -04:00
Ethan Buchman fa451fc55c tendermint/rpc -> tendermint/rpc/tendermint 2017-04-21 18:10:41 -04:00
Ethan Buchman 93c58d0b24 remove glide and license from rpc and p2p 2017-04-21 18:08:25 -04:00
Ethan Buchman c55d83281a move into rpc package 2017-04-21 18:05:39 -04:00
Ethan Buchman 992b11c450 premerge2: rpc -> rpc/tendermint 2017-04-21 17:39:56 -04:00
Ethan Buchman 3240ce21b8 update glide 2017-04-21 17:28:13 -04:00
Ethan Frey 90abc61c56 Improve go-data json support in rpc 2017-04-21 16:55:37 -04:00
Anton Kaliaev 5e5fb37774
rename TxID to Hash 2017-04-21 18:39:02 +03:00
Ethan Buchman bf7521a6ab Merge branch 'develop' into feature/237-tx-indexing 2017-04-18 22:20:13 -04:00
Ethan Buchman 9d2de2b756 tx_indexer -> tx_index 2017-04-18 20:55:40 -04:00
Ethan Buchman b6a04a3456 more fixes from review 2017-04-18 20:11:53 -04:00
Ethan Buchman f4d0076344 TxResult includes Tx. /tx only works if indexer active 2017-04-18 19:56:41 -04:00
Ethan Buchman 16bffdf7ab rpc/test: restore txindexer after setting null 2017-04-13 16:38:44 -04:00
Ethan Frey c648bd5b31 Test /tx with indexer disabled 2017-04-13 22:26:07 +02:00
Ethan Buchman 6e065affe5 rpc: /tx allows height+hash 2017-04-13 16:04:36 -04:00
Ethan Frey 4ee9acb8a7 Improve tx tests for both prove true/false 2017-04-13 16:04:35 -04:00
Ethan Frey 20458564b2 Expose Tx method in the clients 2017-04-13 21:49:21 +02:00
Ethan Buchman c848056438 rpc: better arg validation for /tx 2017-04-13 15:18:58 -04:00
Ethan Frey b33a7c46ce Break new Tx rpc endpoint 2017-04-13 20:49:06 +02:00
Ethan Frey a4ee7d25d1 Add TxIndexEnabled method to ResultStatus 2017-04-13 20:21:40 +02:00
Ethan Buchman 58c860ba11 rpc/test: /tx 2017-04-13 14:18:35 -04:00
Ethan Buchman df35989742 /tx can take height+index or hash 2017-04-13 13:47:48 -04:00
Ethan Buchman 257d81ddd1 rpc/core/types: uintX -> int 2017-04-13 13:35:16 -04:00
Ethan Buchman 585ce45a5e rpc: dial_seeds msg. addresses #403 2017-04-12 19:12:22 -04:00
Ethan Buchman 6899c91ebe add optional 'prove' flag to /tx 2017-04-12 18:55:00 -04:00
Ethan Buchman 7fb0e8b30b Merge branch 'feature/tx-proof' into feature/237-tx-indexing
Conflicts:
	types/tx.go
2017-04-12 18:48:39 -04:00
Ethan Buchman ffe6d58a58 add Height to ResultBroadcastTxCommit and EventDataTx 2017-04-12 18:33:48 -04:00
Ethan Buchman 2a59cda77e /tx returns tx bytes 2017-04-12 18:18:17 -04:00
Ethan Buchman ac86e664c7 Revert "Undo last two commits"
This reverts commit d1fc37ff9e.
2017-04-11 15:44:36 -04:00
Ethan Frey d1fc37ff9e Undo last two commits 2017-04-11 12:57:06 +02:00
Ethan Buchman 7fbe8e47d4 fix tests 2017-04-10 17:32:48 -04:00
Ethan Buchman d7c5690f17 index by bytes. add TxID to broadcast_tx responses 2017-04-10 17:21:37 -04:00
Ethan Frey e4e17a2c95 Play well with go-{rpc,crypto,data}:develop 2017-04-10 21:16:41 +02:00
Anton Kaliaev 63704454a3
expose `/tx?hash="XXXXXXXXXXXX"` RPC call 2017-04-10 22:44:07 +04:00
Ethan Buchman 1208296dc0 DialSeeds takes an AddrBook 2017-03-05 23:14:15 -05:00
rigelrozanski f5c4fdc82a seeds fix 2017-03-04 21:43:03 -05:00
Ethan Buchman 692691938c remove comment 2017-03-02 23:57:28 -05:00
Ethan Buchman a200505ae5 Merge pull request #422 from tendermint/fix-race
Fix race
2017-03-02 23:56:18 -05:00
Ethan Buchman 8ba79252c8 types: use mtx on PartSet.String() 2017-03-02 23:50:59 -05:00
Ethan Frey 21501815dd Fix EventSwitch usage in WaitForOneEvent 2017-02-27 14:55:29 +01:00
Ethan Frey d56cb2ab4b fix typo 2017-02-24 23:40:05 +01:00
Ethan Frey 4fead237f0 Client embeds EventSwitch, client.HTTP properly un/subscribes events over websocket 2017-02-24 21:26:17 +01:00
Ethan Frey 6282fad518 Clean up event switch add helper function 2017-02-24 19:59:40 +01:00
Ethan Frey 175bb329e4 Expose EventSwitch on top of websocket client 2017-02-24 19:15:22 +01:00
Ethan Frey 9be3064904 Expose and test EventSwitch in client.Local 2017-02-24 17:51:19 +01:00
Ethan Frey 98450ee2db Client: DumpConsensusState, not DialSeeds. Cleanup 2017-02-24 17:05:15 +01:00
Ethan Frey 931af6a072 Combine local and http into client package, unify tests with table-driven tests 2017-02-24 17:05:15 +01:00
Ethan Frey 202146e4ce Fix up checktx/delivertx in broadcastTx(A)sync 2017-02-24 17:05:15 +01:00
Ethan Frey 9693795c4c Move common code to merkleeyes/testutil 2017-02-24 17:05:15 +01:00
Ethan Frey cd9ee9d84b cleanup 2017-02-24 17:05:15 +01:00
Ethan Frey 42a9b847ec Make all client tests safe to run in parallel 2017-02-24 17:05:15 +01:00
Ethan Frey d92a5b1074 Reworked WaitForHeight to avoid race conditions 2017-02-24 17:05:14 +01:00
Ethan Frey f7f7cf576a Fix race condition in websocket event listening 2017-02-24 17:05:14 +01:00
Ethan Frey 26f4b5c98e Clean up package names 2017-02-24 17:05:14 +01:00
Ethan Frey 70f19e809b Add MockStatus, WaitForHeight helper 2017-02-24 17:05:14 +01:00
Ethan Frey 0905332f1d MockClient for real abci app 2017-02-24 17:05:14 +01:00
Ethan Frey df172fa840 Provide mock interfaces for calling abci app over tendermint rpc 2017-02-24 17:05:14 +01:00
Ethan Frey ce044dbb76 Extracted Clients into a consistent interface, fixed type issue in http.Client 2017-02-24 17:05:14 +01:00
Ethan Frey 7c26be3242 Begin implementation of local client 2017-02-24 17:05:13 +01:00
Ethan Frey bf1ee89b27 Moved httpclient into subpackage 2017-02-24 17:05:13 +01:00
Ethan Frey 64feaa05f4 Full test coverage for rpc client 2017-02-24 17:05:13 +01:00
Ethan Frey 5ea3f24304 test info 2017-02-24 17:05:13 +01:00
Ethan Frey c9d36cd713 Add dependencies, pull out HTTPClient test code 2017-02-24 17:05:13 +01:00
Ethan Frey 2c75c9daf9 Clean up tests, remove panics 2017-02-24 17:05:12 +01:00
Ethan Frey d971416d12 collision merge of light-client code 2017-02-24 17:05:12 +01:00
Ethan Buchman f9df4294f3 move some interfaces to types/services.go 2017-02-20 20:09:15 -05:00
Ethan Buchman cbe6dbe7a1 handshake replay through consensus using mockApp 2017-02-16 17:56:45 -05:00
Ethan Buchman a3898fae0f rpc: fix SeenCommit condition 2017-02-16 15:35:34 -05:00
Ethan Buchman 99b068b313 BlockMeta uses BlockID 2017-02-14 17:06:58 -05:00
Ethan Buchman e229c8c3d7 rpc: /commit 2017-02-14 17:06:47 -05:00
Jae Kwon 1af930441c Support new Query message for proofs 2017-01-28 08:27:13 -08:00
Jae Kwon 9a2dd8bc92 Refactor Node; Node is a simple BaseService 2017-01-15 16:59:10 -08:00
Ethan Buchman f347143b3d Merge branch 'master' into develop
Conflicts:
	cmd/tendermint/flags.go
	glide.lock
	glide.yaml
	node/node.go
	rpc/core/routes.go
	version/version.go
2017-01-12 20:48:10 -05:00
Ethan Buchman d83ca54b36 file name fixes 2017-01-12 16:17:43 -05:00
Ethan Buchman 94b6dd65ee AppendTx -> DeliverTx 2017-01-12 15:55:03 -05:00
Ethan Buchman c147b41013 TMSP -> ABCI 2017-01-12 15:53:32 -05:00
Ethan Buchman 2dd7030579 tmsp: ResponseInfo and ResponseEndBlock 2017-01-12 15:21:20 -05:00
Ethan Buchman 814ef37f75 fix tests 2017-01-12 10:58:44 -05:00
Matt Bell 1532879c64 Fixed RPC client tests 2017-01-07 14:35:54 -08:00
Ethan Buchman b212aa0db3 fixes from review 2016-12-12 14:12:37 -05:00
Ethan Buchman 12c6594c9b rpc: remove restriction on DialSeeds 2016-12-09 00:31:53 -05:00
Ethan Buchman b74a97a4f6 update grpc broadcast tx 2016-12-02 00:29:25 -05:00
Ethan Buchman 2ef695da97 include check/append responses in broadcast_tx_commit 2016-12-02 00:29:25 -05:00
Ethan Buchman db437e7a45 broadcast_tx via grpc 2016-12-02 00:29:25 -05:00
Ethan Buchman 64c7a0ad0d update glide 2016-11-22 21:28:57 -05:00
Ethan Buchman fb9735ef46 rebase fixes and BeginBlock(hash,header) 2016-11-16 13:25:13 -05:00
Ethan Buchman 2113b6f4bb rpc: use interfaces for pipe 2016-10-14 21:38:49 -04:00
Ethan Buchman 7d493774c7 log: move some Info to Debug 2016-10-14 20:27:50 -04:00
Ethan Frey 0665bc6e4b Add test for proper tx event 2016-10-10 09:55:47 +02:00
Ethan Buchman 35d4cca8bb type safe events 2016-10-10 03:10:29 -04:00
Ethan Frey 22979d9365 Fire proper EventData object on append transaction 2016-10-01 22:12:48 +02:00
Ethan Buchman 41918d619c expose query and info through rpc 2016-09-10 17:14:42 -04:00
Ethan Buchman 035ca7ef61 proxy: NewAppConns takes a NewTMSPClient func 2016-09-09 23:55:24 -04:00
Ethan Buchman 3a7ee13ece proxy: typed app conns 2016-08-24 01:45:45 -04:00
Silas Davis 92736f22e8
Fix unsubscribe 2016-08-23 10:40:42 +01:00
Ethan Buchman bd429f3d4f config: all urls use tcp:// or unix:// prefix 2016-08-10 02:16:41 -04:00
Ethan Buchman c90bde3187 some comments 2016-08-09 20:31:53 -04:00
Ethan Buchman 7bf34d1fae rpc: unsafe_flush_mempool. closes #190 2016-07-12 14:58:06 -04:00
Ethan Buchman a43d53ac6e rpc/tests: panic dont t.Fatal. use random txs for broadcast 2016-07-11 20:40:24 -04:00
Ethan Buchman 8ca615c301 wait until txs removed from mempool to fire tx events 2016-07-05 17:03:09 -04:00
Ethan Buchman 7e3e9ee9d2 rpc: broadcast tests. closes #219 2016-07-05 14:54:33 -04:00
Ethan Buchman 65ebc344ac broadcast_commit 2016-07-05 14:26:20 -04:00
Ethan Buchman 6365c5efb5 bring back unsafe_set_config 2016-06-11 20:19:40 -07:00
Ethan Buchman 7383ead106 updates for new tmsp protobuf 2016-05-23 14:35:36 -04:00
Jae Kwon ad17090a0f No global config 2016-05-08 15:00:58 -07:00
Ethan Buchman ae295bd9b6 bump rpc version; add consensus version 2016-04-19 20:45:33 -04:00
Ethan Buchman cb80a7aa42 rpc: unsafe_write_heap_profile 2016-04-19 20:45:33 -04:00
Ethan Buchman f5be3cd8f9 rpc: start/stop cpu profiler 2016-04-19 20:43:54 -04:00
Ethan Buchman df25a22469 rpc: num_unconfirmed_txs (avoid sending txs back) 2016-04-19 20:43:54 -04:00
Ethan Buchman 0df4a723e9 support in process tmsp apps 2016-04-13 19:24:12 -04:00
Jae Kwon 2c1504f93c Reap takes maxTxs 2016-03-06 15:08:32 -08:00
Jae Kwon 03115cbf93 Fix tests; Tests run in their own directory 2016-03-06 15:05:50 -08:00
Ethan Buchman 05af306a8d rpc: unsafe_set_config 2016-03-03 06:32:08 +00:00
Ethan Buchman 3891e4d66d config: cswal_light, mempool_broadcast, mempool_reap 2016-03-03 06:31:59 +00:00
Ethan Buchman 254baa19f3 fixes for go-rpc unix socket updates 2016-02-19 02:06:11 +00:00
Jae Kwon d31d3c58ad Recheck txs 2016-02-14 17:00:33 -08:00
Jae Kwon 6a209ba3a8 Fix a block condition where cb is called immediately 2016-02-08 15:38:18 -08:00
Jae Kwon 3092d4bbe9 Fix typo, broadcast_tx_asyn(c) 2016-02-08 15:14:41 -08:00
Jae Kwon a4f57e164b BroadcastTx results 2016-02-08 00:48:58 -08:00
Ethan Buchman 77a66f079f version folder, rpc core version 2016-01-20 16:25:26 -05:00
Ethan Buchman 3cce757adc move DialSeeds to go-p2p and add to rpc 2016-01-20 13:12:42 -05:00
Jae Kwon 4b40a58c0e Fix rpc/test import; Remove ~/.tendermint_test on each test 2016-01-18 13:18:45 -08:00
Ethan Buchman 8e776a252b rpc: test cleanup 2016-01-13 21:20:25 -05:00
Ethan Buchman 3fdb4c03ab rpc: TMResult and TMEventData 2016-01-13 18:38:55 -05:00
Ethan Buchman 799efb0629 merge/rebase fixes 2016-01-12 19:39:53 -05:00
Ethan Buchman ee449a94c8 move ResultEvent to go-events 2016-01-12 19:15:10 -05:00
Ethan Buchman fb59255095 use TendermintResult for rpctypes.Result 2016-01-12 19:15:10 -05:00
Ethan Buchman 0be13d1d27 move alert, events, rpc into own repos 2016-01-12 19:15:10 -05:00
Ethan Buchman 96547d0ca8 ws fixes; rpc tests 2016-01-12 19:14:02 -05:00
Jae Kwon 3e3c0083c7 Make order be decided first; Remove TMSP Commit/Rollback 2016-01-08 16:51:20 -08:00
Jae Kwon f0c80837a6 Include p2p connection status in RPC net_info 2016-01-03 06:21:56 -08:00
Jae Kwon 1d34bb173e HTTP responses are pretty JSON 2016-01-03 06:21:04 -08:00
Jae Kwon 74cdadec9f Refactor RPC to be more general 2016-01-02 16:23:29 -08:00
Ethan Buchman 6f5baa8414 rpc: add app_hash to /status 2015-12-21 18:13:42 -05:00
Jae Kwon c95b89e98c Merge remote-tracking branch 'origin/consensus_refactor' into consensus_refactor_jae 2015-12-14 09:33:11 -08:00
Ethan Buchman 261647a012 Enter* -> enter*. Comments/fixes from Jae 2015-12-13 20:48:09 -05:00
Jae Kwon 53f74d052f Fix deadlock bug in websocket client impl 2015-12-07 21:11:12 -08:00
Jae Kwon ef43af19ab Tendermint <-> Application refactor 2015-12-01 20:12:01 -08:00
Jae Kwon d69b5c5ab6 Conform to go-wire 1.0 2015-11-10 13:10:43 -08:00
Jae Kwon e12f9d10e7 Bare consensus refactor 2015-11-01 11:34:08 -08:00
Jae Kwon c4ed55d801 Refactor to move common libraries out of project 2015-10-22 17:39:06 -07:00