Commit Graph

63 Commits

Author SHA1 Message Date
Anton Kaliaev 80e49abada
send ValidatorSetUpdates event when validator set changes (#2161)
Refs #1916
2018-08-14 19:16:35 +04:00
Alexander Simmerl ed8714e40c
Merge pull request #1965 from tendermint/693-part-2
make Block Header and Data non-pointers
2018-07-20 17:42:42 +02:00
Anton Kaliaev 270659f03f
make Block Header and Data non-pointers
make BlockMeta Header a non-pointer

Refs #693
2018-07-13 12:05:54 +04:00
Anton Kaliaev 6fe8ea966a
remove events we do not emit 2018-07-12 22:40:05 +04:00
Anton Kaliaev bb9aa85d22
copy events and pubsub packages from tmlibs
Refs #847
2018-05-21 10:51:47 +04:00
Jae Kwon 32e1d195a0 Fix cmd and lite 2018-04-05 22:05:30 -07:00
Jae Kwon 3ca5292dc9 Fix rpc tests 2018-04-05 21:19:14 -07:00
Jae Kwon e4492afbad Merge 2018-04-05 08:17:10 -07:00
Ethan Buchman ae68fcb78a move fireEvents to ApplyBlock 2017-12-28 23:15:54 -05:00
Anton Kaliaev 950a64f756
bring back transparent websocket (Refs #945) 2017-12-10 01:18:10 -06:00
Anton Kaliaev 922af7c405
int64 height
uint64 is considered dangerous. the details will follow in a blog post.
2017-12-01 19:04:53 -06:00
Anton Kaliaev b3492356e6 uint64 height (Refs #911) 2017-12-01 17:17:22 -05:00
Anton Kaliaev 91f2184003
fixes after bucky's review 2017-11-29 14:24:18 -06:00
Anton Kaliaev ea0b205455
searching transaction results 2017-11-29 14:24:18 -06:00
Anton Kaliaev 56abea7427
rename tm.events.type to just tm.event 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
Anton Kaliaev acae38ab9e
validate tags 2017-11-29 14:23:43 -06:00
Anton Kaliaev a52cdbfe43
extract tags from DeliverTx/Result
and send them along with predefined
2017-11-29 14:23:43 -06:00
Ethan Buchman d71aed309f some minor changes 2017-10-30 22:52:03 -04:00
Anton Kaliaev 61d76a273f
fixes from Bucky's and Emmanuel's reviews 2017-10-30 11:12:01 -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
Ethan Buchman ab753abfa0 Proposer->Proposal; sign heartbeats 2017-07-29 17:04:28 -04:00
Ethan Buchman 530626dab7 broadcast proposer heartbeat msg 2017-07-29 11:45:02 -04:00
Ethan Buchman 07e59e63f9 TMEventDataInner 2017-04-28 17:57:06 -04:00
Ethan Buchman bdb34f9f4e types: []byte -> data.Bytes 2017-04-27 19:01:18 -04:00
Ethan Buchman d1926bcad1 use tmlibs 2017-04-21 18:12:54 -04:00
Ethan Buchman 5da9b3a803 postmerge 2017-04-21 18:09:47 -04:00
Ethan Buchman 0017fb7ffe premerge 2017-04-21 17:38:40 -04:00
Ethan Buchman ffe6d58a58 add Height to ResultBroadcastTxCommit and EventDataTx 2017-04-12 18:33:48 -04:00
Ethan Buchman c147b41013 TMSP -> ABCI 2017-01-12 15:53:32 -05:00
Ethan Buchman b74a97a4f6 update grpc broadcast tx 2016-12-02 00:29:25 -05:00
Ethan Buchman 138de19e1e test: app persistence 2016-11-16 13:25:13 -05:00
Jae Kwon 3c5a2f55c2 Add validator index and address to Vote. 2016-11-15 18:33:16 -05: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 65ebc344ac broadcast_commit 2016-07-05 14:26:20 -04:00
Ethan Buchman 523a170c3e EventDataTypeNewBlockHeader 2016-04-19 20:59:52 -04:00
Ethan Buchman ae07c0171d light weight block event 2016-04-19 20:45:33 -04:00
Jae Kwon 24af8e3da2 Merge branch 'tmsp_v02' 2016-01-28 20:03:34 -08:00
Jae Kwon 0f1cf243fd Merge remote-tracking branch 'origin/replay' 2016-01-28 19:53:22 -08:00
Jae Kwon 236c7afe9e Conform to TMSP v0.2 2016-01-25 14:34:08 -08:00
Ethan Buchman 6aaa5fb0bf consensus: msg saving and replay 2016-01-14 18:58:11 -05:00
Jae Kwon f100404362 Make EventDataRoundState use json:"-" instead of Getter/Setter 2016-01-14 11:07:31 -08:00
Ethan Buchman 3fdb4c03ab rpc: TMResult and TMEventData 2016-01-13 18:38:55 -05:00
Ethan Buchman 0be13d1d27 move alert, events, rpc into own repos 2016-01-12 19:15:10 -05:00
Ethan Buchman b9e143d956 Fireable -> EventSwitch; rs in EventDataRoundState; fixes from review 2015-12-14 00:38:19 -05:00
Ethan Buchman 4483971776 conR uses events to trigger newstep & hasvote broadcasts 2015-12-13 19:30:15 -05:00
Jae Kwon ef43af19ab Tendermint <-> Application refactor 2015-12-01 20:12:01 -08:00
Jae Kwon c4ed55d801 Refactor to move common libraries out of project 2015-10-22 17:39:06 -07:00
Ethan Buchman aab024f18d consensus events 2015-09-15 14:41:23 -04:00