Commit Graph

61 Commits

Author SHA1 Message Date
Dev Ojha b84f788f36 Switch ports 466xx to 266xx (#1735)
* Switch ports 466xx to be 266xx
This is done so the default ports aren't in the linux kernel's default ephemeral port range.

* Update ABCI import

* Bump cache on circleci

* Get more verbose output for debugging

* Bump abci dependency

* Fix accidental change of a block header's hash

* pin abci release
2018-06-12 13:25:52 +04:00
Anton Kaliaev 5115618550
add limit param to /unconfirmed_txs 2018-05-17 21:25:04 +04:00
Jae Kwon e4492afbad Merge 2018-04-05 08:17:10 -07:00
Ethan Buchman 7a5060dc52 replace data.Bytes with cmn.HexBytes 2018-02-03 03:47:01 -05:00
Ethan Buchman 9af8da7aad update for new abci int types 2017-12-02 01:47:55 -05:00
Anton Kaliaev 1e19860585
fixes from my own review 2017-11-29 14:24:18 -06:00
Anton Kaliaev 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
Anton Kaliaev 4a31532897
remove unreachable code 2017-11-29 14:23:44 -06:00
Anton Kaliaev 29cd1a1b8f
rewrite indexer to be a listener of eventBus 2017-11-29 14:23:44 -06:00
Ethan Buchman a969e24177 crank context timeouts 2017-11-15 01:42:15 +00:00
Anton Kaliaev fcdd30b2d3
fixes from Bucky's review 2 2017-11-02 13:20:05 -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
Anton Kaliaev 83ec9f773a wrote docs for rpc methods [ci skip]
for all of them except unsafe
2017-08-16 15:17:08 -04:00
spring1843 cf686d4f83 Fix commonly misspelled words 2017-05-20 21:43:00 -07:00
Anton Kaliaev f803544195
new logging 2017-05-13 10:24:58 +02:00
Ethan Buchman 07e59e63f9 TMEventDataInner 2017-04-28 17:57:06 -04:00
Ethan Buchman a518d08839 rpc: response types use Result instead of pb Response 2017-04-27 19:34:25 -04:00
Ethan Buchman cc6dde96c1 rpc -> rpc/lib and rpc/tendermint -> rpc 2017-04-26 19:57:33 -04:00
Ethan Buchman 992b11c450 premerge2: rpc -> rpc/tendermint 2017-04-21 17:39:56 -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 ffe6d58a58 add Height to ResultBroadcastTxCommit and EventDataTx 2017-04-12 18:33:48 -04:00
Ethan Buchman d7c5690f17 index by bytes. add TxID to broadcast_tx responses 2017-04-10 17:21:37 -04:00
Anton Kaliaev 63704454a3
expose `/tx?hash="XXXXXXXXXXXX"` RPC call 2017-04-10 22:44:07 +04: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 814ef37f75 fix tests 2017-01-12 10:58:44 -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 2113b6f4bb rpc: use interfaces for pipe 2016-10-14 21:38:49 -04: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 7bf34d1fae rpc: unsafe_flush_mempool. closes #190 2016-07-12 14:58:06 -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 7383ead106 updates for new tmsp protobuf 2016-05-23 14:35:36 -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
Jae Kwon 2c1504f93c Reap takes maxTxs 2016-03-06 15:08:32 -08: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 a4f57e164b BroadcastTx results 2016-02-08 00:48:58 -08:00
Jae Kwon 3e3c0083c7 Make order be decided first; Remove TMSP Commit/Rollback 2016-01-08 16:51:20 -08:00
Jae Kwon ef43af19ab Tendermint <-> Application refactor 2015-12-01 20:12:01 -08:00
Jae Kwon e12f9d10e7 Bare consensus refactor 2015-11-01 11:34:08 -08:00
Ethan Buchman 12566f51af better mempool queueing 2015-09-28 22:58:02 -04:00
Jae Kwon 1b9fd811a1 RPCResponse.Result && EventData are registered interfaces; -skip_upnp option 2015-08-11 11:01:18 -07:00
Ethan Buchman 72b681a1bc fix TxID to use ripemd160 in events and rpc return 2015-07-10 05:56:38 +00:00
Jae Kwon 9965dd5de6 uint* to int* whereever appropriate; https://www.reddit.com/r/golang/comments/2q5vdu/int_vs_uint/ 2015-06-25 20:28:34 -07:00
Ethan Buchman ec282d3e3d rpc: remove unecessary response wrappers 2015-06-01 13:51:03 -04:00