Commit Graph

564 Commits

Author SHA1 Message Date
b3492356e6 uint64 height (Refs #911) 2017-12-01 17:17:22 -05:00
cb9743e567 dummy app now returns one DeliverTx tag 2017-11-29 20:30:37 -06:00
58789c52cd add example for tx_search endpoint 2017-11-29 15:30:12 -06:00
acbc0717d4 add client methods 2017-11-29 15:19:44 -06:00
1e19860585 fixes from my own review 2017-11-29 14:24:18 -06:00
2a5e8c4a47 add minimal documentation for tx_search RPC method [ci skip] 2017-11-29 14:24:18 -06:00
91f2184003 fixes after bucky's review 2017-11-29 14:24:18 -06:00
3e577ccf4f add tx_search RPC endpoint 2017-11-29 14:24:18 -06:00
f65e357d2b adapt Tendermint to new abci.Client interface
which was introduced in https://github.com/tendermint/abci/pull/130
2017-11-29 14:23:44 -06:00
4a31532897 remove unreachable code 2017-11-29 14:23:44 -06:00
29cd1a1b8f rewrite indexer to be a listener of eventBus 2017-11-29 14:23:44 -06:00
c6b2334fa3 check for error when stopping WSClient 2017-11-29 10:38:58 -06:00
69b5da766c service#Start, service#Stop signatures were changed
See https://github.com/tendermint/tmlibs/issues/45
2017-11-29 10:38:58 -06:00
2e76b23c9a rpc: fix tests 2017-11-27 22:39:12 +00:00
9529f12c28 more linting 2017-11-27 22:39:12 +00:00
55b81cc1a1 address linting FIXMEs 2017-11-27 22:39:12 +00:00
6f3c05545d fix new linting errors 2017-11-27 22:39:12 +00:00
c84c7250ba linting: few more fixes 2017-11-27 22:39:12 +00:00
478a10aa41 Write doesn't need error checked 2017-11-27 22:39:12 +00:00
d033470817 lil fixes 2017-11-27 22:39:12 +00:00
a15c7f221d linting: moar fixes 2017-11-27 22:39:11 +00:00
d7cb291fb2 errcheck; sort some stuff out 2017-11-27 22:39:11 +00:00
68e7983c70 linting errors: afew more 2017-11-27 22:39:11 +00:00
8f0237610e linting errors: clean it all up 2017-11-27 22:39:11 +00:00
b75d4f73e7 errcheck: PR comment fixes 2017-11-27 22:39:11 +00:00
57ea4987f7 linting: apply errcheck part1 2017-11-27 22:39:11 +00:00
1721543e5c linting: apply misspell 2017-11-27 22:39:11 +00:00
af0db599b0 minor fixes 2017-11-16 23:57:00 +00:00
a969e24177 crank context timeouts 2017-11-15 01:42:15 +00:00
844c43e044 use stdlib context 2017-11-14 22:30:00 +00:00
194712fd3b rpc: wait for rpc servers to be available in tests 2017-11-14 21:51:49 +00:00
c0e2649ed6 Merge pull request #788 from tendermint/feature/548-indexing-tags
new pubsub package
2017-11-08 01:02:48 +00:00
593c127257 rpc/lib/types: RPCResponse.Result is not a pointer 2017-11-08 01:00:15 +00:00
a01c226dc4 wsConnection: call onDisconnect 2017-11-07 19:22:01 -05:00
4ffe9304ba unsubscribe from all subscriptions on WS disconnect 2017-11-02 14:00:18 -05:00
fcdd30b2d3 fixes from Bucky's review 2 2017-11-02 13:20:05 -05:00
f7f4ba5e90 rpc/lib/server: minor changes to test 2017-10-31 15:41:25 -04:00
7c3cf316f1 rpc/wsevents: small cleanup 2017-10-31 15:16:08 -04:00
61d76a273f fixes from Bucky's and Emmanuel's reviews 2017-10-30 11:12:01 -05:00
1c1c68df8d fixes from my own review 2017-10-30 00:32:23 -05:00
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
a8b77359df rpc/lib/server: separate out Notifications test
Addressing feedback from @ebuchman
2017-10-28 15:24:40 -07:00
e7fab7d4bf rpc/lib/server: update with @melekes and @ebuchman feedback 2017-10-28 15:11:21 -07:00
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
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
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
5534eb4707 Merge pull request #776 from tendermint/feature/merge-light-client
Merge light client
2017-10-25 16:12:39 -04:00
f653ba63bf Separated out certifiers.Commit from rpc structs 2017-10-25 16:43:18 +02:00
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
f6adddb4a8 Replace ResultsCh with ResponsesCh 2017-10-24 17:45:13 +01:00