Commit Graph

636 Commits

Author SHA1 Message Date
Ethan Buchman a969e24177 crank context timeouts 2017-11-15 01:42:15 +00:00
Ethan Buchman 844c43e044 use stdlib context 2017-11-14 22:30:00 +00:00
Ethan Buchman 194712fd3b rpc: wait for rpc servers to be available in tests 2017-11-14 21:51:49 +00:00
Ethan Buchman c0e2649ed6
Merge pull request #788 from tendermint/feature/548-indexing-tags
new pubsub package
2017-11-08 01:02:48 +00:00
Ethan Buchman 593c127257 rpc/lib/types: RPCResponse.Result is not a pointer 2017-11-08 01:00:15 +00:00
Anton Kaliaev a01c226dc4
wsConnection: call onDisconnect 2017-11-07 19:22:01 -05:00
Anton Kaliaev 4ffe9304ba
unsubscribe from all subscriptions on WS disconnect 2017-11-02 14:00:18 -05:00
Anton Kaliaev fcdd30b2d3
fixes from Bucky's review 2 2017-11-02 13:20:05 -05:00
Ethan Buchman f7f4ba5e90 rpc/lib/server: minor changes to test 2017-10-31 15:41:25 -04:00
Ethan Buchman 7c3cf316f1 rpc/wsevents: small cleanup 2017-10-31 15:16:08 -04:00
Anton Kaliaev 61d76a273f
fixes from Bucky's and Emmanuel's reviews 2017-10-30 11:12:01 -05:00
Anton Kaliaev 1c1c68df8d
fixes from my own review 2017-10-30 00:32:23 -05:00
Anton Kaliaev f6539737de
new pubsub package
comment out failing consensus tests for now

rewrite rpc httpclient to use new pubsub package

import pubsub as tmpubsub, query as tmquery

make event IDs constants
EventKey -> EventTypeKey

rename EventsPubsub to PubSub

mempool does not use pubsub

rename eventsSub to pubsub

new subscribe API

fix channel size issues and consensus tests bugs

refactor rpc client

add missing discardFromChan method

add mutex

rename pubsub to eventBus

remove IsRunning from WSRPCConnection interface (not needed)

add a comment in broadcastNewRoundStepsAndVotes

rename registerEventCallbacks to broadcastNewRoundStepsAndVotes

See https://dave.cheney.net/2014/03/19/channel-axioms

stop eventBuses after reactor tests

remove unnecessary Unsubscribe

return subscribe helper function

move discardFromChan to where it is used

subscribe now returns an err

this gives us ability to refuse to subscribe if pubsub is at its max
capacity.

use context for control overflow

cache queries

handle err when subscribing in replay_test

rename testClientID to testSubscriber

extract var

set channel buffer capacity to 1 in replay_file

fix byzantine_test

unsubscribe from single event, not all events

refactor httpclient to return events to appropriate channels

return failing testReplayCrashBeforeWriteVote test

fix TestValidatorSetChanges

refactor code a bit

fix testReplayCrashBeforeWriteVote

add comment

fix TestValidatorSetChanges

fixes from Bucky's review

update comment [ci skip]

test TxEventBuffer

update changelog

fix TestValidatorSetChanges (2nd attempt)

only do wg.Done when no errors

benchmark event bus

create pubsub server inside NewEventBus

only expose config params (later if needed)

set buffer capacity to 0 so we are not testing cache

new tx event format: key = "Tx" plus a tag {"tx.hash": XYZ}

This should allow to subscribe to all transactions! or a specific one
using a query: "tm.events.type = Tx and tx.hash = '013ABF99434...'"

use TimeoutCommit instead of afterPublishEventNewBlockTimeout

TimeoutCommit is the time a node waits after committing a block, before
it goes into the next height. So it will finish everything from the last
block, but then wait a bit. The idea is this gives it time to hear more
votes from other validators, to strengthen the commit it includes in the
next block. But it also gives it time to hear about new transactions.

waitForBlockWithUpdatedVals

rewrite WAL crash tests

Task:
test that we can recover from any WAL crash.

Solution:
the old tests were relying on event hub being run in the same thread (we
were injecting the private validator's last signature).

when considering a rewrite, we considered two possible solutions: write
a "fuzzy" testing system where WAL is crashing upon receiving a new
message, or inject failures and trigger them in tests using something
like https://github.com/coreos/gofail.

remove sleep

no cs.Lock around wal.Save

test different cases (empty block, non-empty block, ...)

comments

add comments

test 4 cases: empty block, non-empty block, non-empty block with smaller part size, many blocks

fixes as per Bucky's last review

reset subscriptions on UnsubscribeAll

use a simple counter to track message for which we panicked

also, set a smaller part size for all test cases
2017-10-30 00:32:22 -05:00
Emmanuel Odeke a8b77359df
rpc/lib/server: separate out Notifications test
Addressing feedback from @ebuchman
2017-10-28 15:24:40 -07:00
Emmanuel Odeke e7fab7d4bf rpc/lib/server: update with @melekes and @ebuchman feedback 2017-10-28 15:11:21 -07:00
Emmanuel Odeke 59556ab030 rpc/lib/server: add handlers tests
Follow up of PR https://github.com/tendermint/tendermint/pull/724
For https://github.com/tendermint/tendermint/issues/708

Reported initially in #708, this bug was reconfirmed
by the fuzzer.

This fix ensures that:
* if the user doesn't pass in `"id"` that we send them back
a message in an error telling them to send `"id"`. Previously
we let the handler return a 200 with nothing.
* passing in nil `params` doesn't crash
* not passing in `params` doesn't crash
* passing in non-JSON parseable data to `params` doesn't crash
2017-10-28 15:11:21 -07:00
Ethan Buchman 376f47e030 Merge pull request #775 from tendermint/rpc-client-jitter
rpc/lib/client: add jitter for exponential backoff of WSClient
2017-10-25 22:53:50 -04:00
Emmanuel Odeke 6e5cd10399
rpc/lib/client: jitter test updates and only to-be run on releases
* Updated code with feedback from @melekes, @ebuchman and @silasdavis.
* Added Makefile clause `release` to only run the test on seeing tag
`release` during releases i.e
```shell
make release
```
which will run the comprehensive and long integration-ish tests.
2017-10-25 19:20:55 -07:00
Ethan Buchman 5534eb4707 Merge pull request #776 from tendermint/feature/merge-light-client
Merge light client
2017-10-25 16:12:39 -04:00
Ethan Frey f653ba63bf Separated out certifiers.Commit from rpc structs 2017-10-25 16:43:18 +02:00
Silas Davis 4cb02d0bf2
Exploit the fact the BaseService's closed Quit channel will keep emitting quit signals to close both readRoutine and writeRoutine 2017-10-25 10:19:18 +01:00
Silas Davis f6adddb4a8
Replace ResultsCh with ResponsesCh 2017-10-24 17:45:13 +01:00
Silas Davis 01be6fa309
Fix WSClient blocking in the readRoutine after Stop() as it tries to write to ResultsCh 2017-10-24 13:31:24 +01:00
Emmanuel Odeke 5504920ba3
rpc/lib/client: add jitter for exponential backoff of WSClient
Fixes https://github.com/tendermint/tendermint/issues/751.

Adds jitter to our exponential backoff to mitigate a self DDOS
vector. The jitter is a randomly picked percentage of a second
whose purpose is to ensure that each exponential backoff retry
occurs within (1<<attempts) == 2**attempts, but with the delay
each client will have a random buffer time before it tries to
reconnect instead of all at once reconnections that might even
bring back the previous conditions that might have caused the
dial to the WSServer to have failed e.g
* Network outage
* File descriptor exhaustion
* False positives from firewalls
etc
2017-10-24 02:00:20 -07:00
Ethan Buchman ac2ef9e0ea Merge pull request #750 from tendermint/feature/cleanup
Cleanup of code and code docs
2017-10-23 11:14:15 -04:00
Ethan Buchman 7a6876bc62 Merge pull request #768 from tendermint/feature/merkleeyes-to-iavl
Feature/merkleeyes to iavl
2017-10-23 11:07:21 -04:00
Adrian Brink 036d3b59a3 Address reviews 2017-10-23 11:04:45 -04:00
Adrian Brink 782a836db0 Cleanup of code and code docs
This cleans up some of the code in the state package
2017-10-23 11:04:45 -04:00
Ethan Buchman 60b7f2c61b Merge pull request #767 from silasdavis/do-not-swallow
Make RPCError an actual error and don't swallow its companion data
2017-10-23 01:51:40 -04:00
Silas Davis 3e3d53daef
Make RPCError an actual error and don't swallow its companion data 2017-10-22 15:14:21 +01:00
Ethan Buchman b234f7aba2 Merge pull request #741 from tendermint/client-compile-time-assertions
rpc/client: use compile time assertions instead of methods
2017-10-17 03:41:24 -04:00
Emmanuel Odeke 5f218a43fd
rpc/client: use compile time assertions instead of methods 2017-10-13 14:30:54 -06:00
Anton Kaliaev 7518c4a9be
[rpc] update comment [ci skip] 2017-10-13 15:03:21 +04:00
Anton Kaliaev db413aadfd
fixes from @cloudhead review 2017-10-13 15:03:21 +04:00
Anton Kaliaev 5433e5771e
support historical abci queries (Refs #482) 2017-10-13 15:03:20 +04:00
Zach Ramsay e2e50bc0fc rpc: use /iavl repo in test (#713) 2017-10-11 10:35:22 -04:00
Ethan Buchman 9fb45c5b5a remove a stale comment 2017-10-10 10:52:26 -04:00
Anton Kaliaev aae4e94998
make RPCRequest params not a pointer
https://github.com/tendermint/tendermint/pull/724#issuecomment-335362927
2017-10-10 13:50:06 +04:00
Anton Kaliaev d935a4f0a8
recover from panic in WS JSON RPC readRoutine
https://github.com/tendermint/tendermint/pull/724#issuecomment-335316484
2017-10-10 13:48:56 +04:00
Anton Kaliaev 5c331d8276
log a notification to help debug user issues 2017-10-10 13:01:25 +04:00
Anton Kaliaev 13b9de6778
return missing package declaration 2017-10-10 12:48:36 +04:00
Anton Kaliaev dc0e8de9b0
extract some of the consensus types into ./types
so they can be used in rpc/core/types/responses.go.

```
So, it seems like we could use the actual structs here, but we don't want to have to import consensus to get them, as then clients are importing too much crap. So probably we should move some types from consensus into consensus/types so we can import.

Will these raw messages be identical to:

type ResultDumpConsensusState struct {
  RoundState cstypes.RoundState
  PeerRoundStates map[string]cstypes.PeerRoundState
}
```
https://github.com/tendermint/tendermint/pull/724#discussion_r143598193
2017-10-10 12:39:21 +04:00
Anton Kaliaev d6a87d3c43
[rpc] DumpConsensusState: output state as json rather than string
Before:

```
{
  "jsonrpc": "2.0",
  "id": "",
  "result": {
    "round_state": "RoundState{\n  H:10 R:0 S:RoundStepNewHeight\n  StartTime:     2017-10-09 13:07:24.841134374 +0400 +04\n  CommitTime:    2017-10-09 13:07:23.841134374 +0400 +04\n  Validators:    ValidatorSet{\n      Proposer: Validator{EF243CC0E9B88D0161D24D733BDE9003518CEA27 {PubKeyEd25519{2E0B9301334FCDAB193D514022F81BA09BBEC028685C96602BE9DD0BD4F9E202}} VP:10 A:0}\n      Validators:\n        Validator{EF243CC0E9B88D0161D24D733BDE9003518CEA27 {PubKeyEd25519{2E0B9301334FCDAB193D514022F81BA09BBEC028685C96602BE9DD0BD4F9E202}} VP:10 A:0}\n    }\n  Proposal:      \u003cnil\u003e\n  ProposalBlock: nil-PartSet nil-Block\n  LockedRound:   0\n  LockedBlock:   nil-PartSet nil-Block\n  Votes:         HeightVoteSet{H:10 R:0~0\n      VoteSet{H:10 R:0 T:1 +2/3:\u003cnil\u003e BA{1:_} map[]}\n      VoteSet{H:10 R:0 T:2 +2/3:\u003cnil\u003e BA{1:_} map[]}\n    }\n  LastCommit: VoteSet{H:9 R:0 T:2 +2/3:947F67A7B85439AF2CD5DFED376C51AC7BD67AEE:1:365E9983E466 BA{1:X} map[]}\n  LastValidators:    ValidatorSet{\n      Proposer: Validator{EF243CC0E9B88D0161D24D733BDE9003518CEA27 {PubKeyEd25519{2E0B9301334FCDAB193D514022F81BA09BBEC028685C96602BE9DD0BD4F9E202}} VP:10 A:0}\n      Validators:\n        Validator{EF243CC0E9B88D0161D24D733BDE9003518CEA27 {PubKeyEd25519{2E0B9301334FCDAB193D514022F81BA09BBEC028685C96602BE9DD0BD4F9E202}} VP:10 A:0}\n    }\n}",
    "peer_round_states": []
  }
}
```

After:

```
{
  "jsonrpc": "2.0",
  "id": "",
  "result": {
    "round_state": {
      "Height": 1691,
      "Round": 0,
      "Step": 1,
      "StartTime": "2017-10-09T14:08:09.129491764+04:00",
      "CommitTime": "2017-10-09T14:08:08.129491764+04:00",
      "Validators": {
        "validators": [
          {
            "address": "EF243CC0E9B88D0161D24D733BDE9003518CEA27",
            "pub_key": {
              "type": "ed25519",
              "data": "2E0B9301334FCDAB193D514022F81BA09BBEC028685C96602BE9DD0BD4F9E202"
            },
            "voting_power": 10,
            "accum": 0
          }
        ],
        "proposer": {
          "address": "EF243CC0E9B88D0161D24D733BDE9003518CEA27",
          "pub_key": {
            "type": "ed25519",
            "data": "2E0B9301334FCDAB193D514022F81BA09BBEC028685C96602BE9DD0BD4F9E202"
          },
          "voting_power": 10,
          "accum": 0
        }
      },
      "Proposal": null,
      "ProposalBlock": null,
      "ProposalBlockParts": null,
      "LockedRound": 0,
      "LockedBlock": null,
      "LockedBlockParts": null,
      "Votes": {},
      "CommitRound": -1,
      "LastCommit": {},
      "LastValidators": {
        "validators": [
          {
            "address": "EF243CC0E9B88D0161D24D733BDE9003518CEA27",
            "pub_key": {
              "type": "ed25519",
              "data": "2E0B9301334FCDAB193D514022F81BA09BBEC028685C96602BE9DD0BD4F9E202"
            },
            "voting_power": 10,
            "accum": 0
          }
        ],
        "proposer": {
          "address": "EF243CC0E9B88D0161D24D733BDE9003518CEA27",
          "pub_key": {
            "type": "ed25519",
            "data": "2E0B9301334FCDAB193D514022F81BA09BBEC028685C96602BE9DD0BD4F9E202"
          },
          "voting_power": 10,
          "accum": 0
        }
      }
    },
    "peer_round_states": {
      "75EC8F15D244A421202F9725CD4DE509EE50303670310CF7530EF25E2B7C524B": {
        "Height": 1691,
        "Round": 0,
        "Step": 1,
        "StartTime": "2017-10-09T14:08:08.563251997+04:00",
        "Proposal": false,
        "ProposalBlockPartsHeader": {
          "total": 0,
          "hash": ""
        },
        "ProposalBlockParts": null,
        "ProposalPOLRound": -1,
        "ProposalPOL": null,
        "Prevotes": null,
        "Precommits": null,
        "LastCommitRound": 0,
        "LastCommit": null,
        "CatchupCommitRound": -1,
        "CatchupCommit": null
      }
    }
  }
}
```
2017-10-09 14:09:26 +04:00
Anton Kaliaev a3adac3787
[rpc] do not try to parse params if they were not provided (Refs #708) 2017-10-09 13:30:52 +04:00
Anton Kaliaev 3702cb7e7c
restore rpc/lib readme as doc.go (Refs #710) [ci skip]
I don't want to lose any documentation. Correct me if I am wrong, but we
don't have this docs anywhere else.
2017-10-05 11:44:02 +04:00
Zach Ramsay 136b6a7673 rpc/lib: remove dead files, closes #710 2017-10-04 17:45:15 -04:00
Zach Ramsay d56b44f3a5 all: no more anonymous imports 2017-10-04 16:40:45 -04:00
Anton Kaliaev 45ff7cdd0c rewrite ws client to expose a callback instead of a channel
callback gives more power to the publisher. plus it is optional
comparing to a channel, which will block the whole client if you won't
read from it.
2017-10-02 13:00:20 -04:00
Alexandre Thibault ce36a0111a rpc: subscribe on reconnection (#689)
* rpc: subscribe on reconnection

* rpc: fix unit tests
2017-10-02 13:00:20 -04:00
Martin Dyring-Andersen b61f5482d4 Fix broken reference to ABCI 2017-10-02 13:00:20 -04:00
Alexandre Thibault 382bead548 rpc: fix client websocket timeout (#687) 2017-09-29 13:32:30 +04:00
Anton Kaliaev f9479b34cb
sleep time should be greater than readTimeout (5 sec)
otherwise, we're not testing ping/pongs.
see https://github.com/tendermint/tendermint/pull/687#issuecomment-332494735
2017-09-27 15:44:19 +04:00
Ethan Buchman 8311f5c611 abci.Info takes a struct; less merkleeyes 2017-09-22 11:42:40 -04:00
Ethan Buchman ddb3d8945d p2p: allow listener with no external connection 2017-09-22 10:13:23 -04:00
Ethan Buchman 779c2a22d0 node: NewNode takes DBProvider and GenDocProvider 2017-09-21 15:54:33 -04:00
Ethan Buchman 4382c8d28b fix tests 2017-09-21 15:52:25 -04:00
Adrian Brink 7dd3c007c7 Refactor priv_validator
Users can now just pass an object that implements the Signer interface.
2017-09-21 15:50:43 -04:00
Ethan Buchman 3089bbf2b8 Amount -> Power. Closes #166 2017-09-21 14:59:27 -04:00
Anton Kaliaev f8b152972f return method not found error
if somebody tries to access WS method in non-ws context
2017-09-18 16:36:03 -04:00
Anton Kaliaev 95875c55fc ID must be present in both request and response
from the spec:
This member is REQUIRED.
It MUST be the same as the value of the id member in the Request Object.
If there was an error in detecting the id in the Request object (e.g. Parse error/Invalid Request), it MUST be Null.
2017-09-18 16:36:03 -04:00
Anton Kaliaev 7fadde0b37 check for request ID after receiving it 2017-09-18 16:36:03 -04:00
Anton Kaliaev e36c79f713 capitalize RpcError 2017-09-18 16:36:03 -04:00
Anton Kaliaev b700ed8e31 remove check for non-empty message as it should always be present 2017-09-18 16:36:03 -04:00
Anton Kaliaev f74de4cb86 include optional data field in error object
```
data
A Primitive or Structured value that contains additional information about the error.
This may be omitted.
The value of this member is defined by the Server (e.g. detailed error information, nested errors etc.).
```
2017-09-18 16:36:02 -04:00
Anton Kaliaev 6c1572c9b8 fix invalid memory address or nil pointer dereference 2017-09-18 16:36:02 -04:00
Dave Bryson 60a1f49a5c updated json response to match spec by @davebryson 2017-09-18 16:35:50 -04:00
Ethan Buchman aea8629272 peer interface 2017-09-15 18:40:59 -04:00
Ethan Buchman ec3c91ac14 Merge pull request #618 from tendermint/historical_validators
Historical validators
2017-09-06 01:46:31 -04:00
Ethan Buchman cc2b418f7f p2p: test fix 2017-09-05 17:10:11 -04:00
Ethan Buchman 9deb647303 fixes from review 2017-09-04 18:29:51 -04:00
Ethan Buchman f0f1ebe013 rpc: Block and Commit take pointers; return latest on nil 2017-09-03 16:07:37 -04:00
Ethan Buchman e2e8746044 rpc: historical validators 2017-09-03 16:07:37 -04:00
Ethan Buchman f2349b1092 Merge pull request #526 from tendermint/feature/rpc-docs
RPC docs
2017-08-25 18:10:21 -04:00
Ethan Buchman 83048fb2fe Merge pull request #604 from tendermint/bugfix/ws-io-timeout
Biff up RPC WSClient
2017-08-25 17:59:34 -04:00
Ethan Buchman 9dde1a0bd4 rpc: comments 2017-08-25 17:57:09 -04:00
Zach Ramsay b3796e0aaa rpc: typo fixes 2017-08-16 15:18:55 -04:00
Anton Kaliaev d24083b257 generate md for Slate 2017-08-16 15:17:08 -04:00
Anton Kaliaev 83ec9f773a wrote docs for rpc methods [ci skip]
for all of them except unsafe
2017-08-16 15:17:08 -04:00
Anton Kaliaev 2fd8496bc1
correct handling of pings and pongs
server:
- always has read & write timeouts
- ping handler never blocks the reader (see A)
- sends regular pings to check up on a client

A:
at some point server write buffer can become full, so in order not to
block reads from a client (see
https://github.com/gorilla/websocket/issues/97), server may skip some
pongs. As a result, client may disconnect. But you either have to do
that or block the reader. There is no third way.

client:
- optional read & write timeouts
- optional ping/pong to measure latency
2017-08-10 17:53:49 -04:00
Ethan Buchman 49278a7f9c Merge pull request #579 from tendermint/feature/sync_status
Add fast-sync status to Status() call
2017-08-09 23:51:25 -04:00
Ethan Buchman b0728260e9 comments 2017-08-09 23:51:09 -04:00
Anton Kaliaev 236489aecf
backlog must always have higher priority 2017-08-08 19:03:48 -04:00
Ethan Buchman 797acbe911 ws: small comment 2017-08-08 17:33:17 -04:00
Anton Kaliaev 9b5f21a650
[ws-server] reset readTimeout when we receive something 2017-08-08 16:03:04 -04:00
Anton Kaliaev 8267920749
[ws-client] write normal close message 2017-08-08 16:02:37 -04:00
Anton Kaliaev 6c85e4be4f
change server ping period to be less frequent
no need to ping ws every 10 sec
2017-08-08 13:21:59 -04:00
Anton Kaliaev 23a87304cc
add a comment for PingPongLatencyTimer [ci skip] 2017-08-08 13:20:58 -04:00
Anton Kaliaev c14b39da5f
make RPC server's ping period and pong wait configurable via options 2017-08-07 18:29:55 -04:00
Anton Kaliaev 57eee2466b
make WSClient thread-safe 2017-08-07 17:56:38 -04:00
Anton Kaliaev 5d66d1c28c
fixes from review 2017-08-05 13:11:00 -04:00
Anton Kaliaev 0013053fae
allow to change pong wait and ping period 2017-08-04 10:42:55 -04:00
Anton Kaliaev 1abbb11b44
do not exit from reconnectRoutine! 2017-08-03 22:44:18 -04:00
Anton Kaliaev 54903adeff
add IsReconnecting and IsActive methods 2017-08-03 19:10:15 -04:00
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