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.
7 years ago
Alexandre Thibault
ce36a0111a
rpc: subscribe on reconnection ( #689 )
* rpc: subscribe on reconnection
* rpc: fix unit tests
7 years ago
Martin Dyring-Andersen
b61f5482d4
Fix broken reference to ABCI
7 years ago
Alexandre Thibault
382bead548
rpc: fix client websocket timeout ( #687 )
7 years ago
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
7 years ago
Ethan Buchman
8311f5c611
abci.Info takes a struct; less merkleeyes
7 years ago
Ethan Buchman
ddb3d8945d
p2p: allow listener with no external connection
7 years ago
Ethan Buchman
779c2a22d0
node: NewNode takes DBProvider and GenDocProvider
7 years ago
Ethan Buchman
4382c8d28b
fix tests
7 years ago
Adrian Brink
7dd3c007c7
Refactor priv_validator
Users can now just pass an object that implements the Signer interface.
7 years ago
Ethan Buchman
3089bbf2b8
Amount -> Power. Closes #166
7 years ago
Anton Kaliaev
f8b152972f
return method not found error
if somebody tries to access WS method in non-ws context
7 years ago
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.
7 years ago
Anton Kaliaev
7fadde0b37
check for request ID after receiving it
7 years ago
Anton Kaliaev
e36c79f713
capitalize RpcError
7 years ago
Anton Kaliaev
b700ed8e31
remove check for non-empty message as it should always be present
7 years ago
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.).
```
8 years ago
Anton Kaliaev
6c1572c9b8
fix invalid memory address or nil pointer dereference
8 years ago
Dave Bryson
60a1f49a5c
updated json response to match spec by @davebryson
8 years ago
Ethan Buchman
aea8629272
peer interface
7 years ago
Ethan Buchman
cc2b418f7f
p2p: test fix
7 years ago
Ethan Buchman
9deb647303
fixes from review
7 years ago
Ethan Buchman
f0f1ebe013
rpc: Block and Commit take pointers; return latest on nil
7 years ago
Ethan Buchman
e2e8746044
rpc: historical validators
7 years ago
Ethan Buchman
9dde1a0bd4
rpc: comments
7 years ago
Zach Ramsay
b3796e0aaa
rpc: typo fixes
7 years ago
Anton Kaliaev
d24083b257
generate md for Slate
8 years ago
Anton Kaliaev
83ec9f773a
wrote docs for rpc methods [ci skip]
for all of them except unsafe
8 years ago
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
7 years ago
Ethan Buchman
b0728260e9
comments
7 years ago
Anton Kaliaev
236489aecf
backlog must always have higher priority
7 years ago
Ethan Buchman
797acbe911
ws: small comment
7 years ago
Anton Kaliaev
9b5f21a650
[ws-server] reset readTimeout when we receive something
7 years ago
Anton Kaliaev
8267920749
[ws-client] write normal close message
7 years ago
Anton Kaliaev
6c85e4be4f
change server ping period to be less frequent
no need to ping ws every 10 sec
7 years ago
Anton Kaliaev
23a87304cc
add a comment for PingPongLatencyTimer [ci skip]
7 years ago
Anton Kaliaev
c14b39da5f
make RPC server's ping period and pong wait configurable via options
7 years ago
Anton Kaliaev
57eee2466b
make WSClient thread-safe
7 years ago
Anton Kaliaev
5d66d1c28c
fixes from review
7 years ago
Anton Kaliaev
0013053fae
allow to change pong wait and ping period
7 years ago
Anton Kaliaev
1abbb11b44
do not exit from reconnectRoutine!
7 years ago
Anton Kaliaev
54903adeff
add IsReconnecting and IsActive methods
7 years ago
Anton Kaliaev
c08618f7e9
expose latency timer on WSClient
7 years ago
Anton Kaliaev
d578f7f81e
biff up WS client
What's new:
- auto reconnect
- ping/pong
- colored tests
7 years ago
Anton Kaliaev
5fea1d2675
[.editorconfig] add rule for .proto files [ci skip]
7 years ago
Ethan Buchman
d8ca0580a8
rpc: move grpc_test from test/ to grpc/
7 years ago
ramil
6f8d385dfa
fast sync status
7 years ago
Adrian Brink
05c0dfac12
First crack it providing fast-sync endpoint
7 years ago
Ethan Buchman
0d1fa8e884
fixes from review
7 years ago
Ethan Buchman
e2ed15fa02
rpc: SetWriteDeadline for ws ping. fixes #553
7 years ago