Files
tendermint/rpc/core
Anton Kaliaev 59ec3d91e4 rpc/jsonrpc/server: ws server optimizations (#5312)
* docs: goleveldb is much more stable now

Refs https://github.com/syndtr/goleveldb/issues/226#issuecomment-682495490

* rpc/core/events: make sure WS client receives every event

previously, if the write buffer was full, the response would've been
lost without any trace (log msg, etc.)

* rpc/jsonrpc/server: set defaultWSWriteChanCapacity to 1

Refs #3905
Closes #3829

setting write buffer capacity to 1 makes transactions count per block
more stable and also reduces the pauses length by 20s.

before: https://github.com/tendermint/tendermint/issues/3905#issuecomment-681854328 net.Read - 20s
after: net.Read - 0.66s

* rpc/jsonrpc/server: buffer writes and avoid io.ReadAll during read
2020-09-04 10:58:47 +04:00
..
2020-05-13 16:40:57 +04:00
2020-05-13 16:40:57 +04:00
2020-06-19 09:25:52 +04:00
2020-06-05 10:47:16 +02:00

Tendermint RPC

Pagination

Requests that return multiple items will be paginated to 30 items by default. You can specify further pages with the ?page parameter. You can also set a custom page size up to 100 with the ?per_page parameter.

Subscribing to events

The user can subscribe to events emitted by Tendermint, using /subscribe. If the maximum number of clients is reached or the client has too many subscriptions, an error will be returned. The subscription timeout is 5 sec. Each subscription has a buffer to accommodate short bursts of events or some slowness in clients. If the buffer gets full, the subscription will be canceled ("client is not pulling messages fast enough"). If Tendermint exits, all subscriptions are canceled ("Tendermint exited"). The user can unsubscribe using either /unsubscribe or /unsubscribe_all.