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
8 years ago |
|
- hash: 223d8e42a118e7861cb673ea58a035e99d3a98c94e4b71fb52998d320f9c3b49
- updated: 2017-11-25T22:00:24.612202481-08:00
- imports:
- - name: github.com/btcsuite/btcd
- version: 8cea3866d0f7fb12d567a20744942c0d078c7d15
- subpackages:
- - btcec
- - name: github.com/ebuchman/fail-test
- version: 95f809107225be108efcf10a3509e4ea6ceef3c4
- - name: github.com/fsnotify/fsnotify
- version: 4da3e2cfbabc9f751898f250b49f2439785783a1
- - name: github.com/go-kit/kit
- version: e3b2152e0063c5f05efea89ecbe297852af2a92d
- subpackages:
- - log
- - log/level
- - log/term
- - name: github.com/go-logfmt/logfmt
- version: 390ab7935ee28ec6b286364bba9b4dd6410cb3d5
- - name: github.com/go-playground/locales
- version: e4cbcb5d0652150d40ad0646651076b6bd2be4f6
- subpackages:
- - currency
- - name: github.com/go-playground/universal-translator
- version: 71201497bace774495daed26a3874fd339e0b538
- - name: github.com/go-stack/stack
- version: 259ab82a6cad3992b4e21ff5cac294ccb06474bc
- - name: github.com/gogo/protobuf
- version: 342cbe0a04158f6dcb03ca0079991a51a4248c02
- subpackages:
- - proto
- - name: github.com/golang/protobuf
- version: 1e59b77b52bf8e4b449a57e6f79f21226d571845
- subpackages:
- - proto
- - ptypes
- - ptypes/any
- - ptypes/duration
- - ptypes/timestamp
- - name: github.com/golang/snappy
- version: 553a641470496b2327abcac10b36396bd98e45c9
- - name: github.com/gorilla/websocket
- version: ea4d1f681babbce9545c9c5f3d5194a789c89f5b
- - name: github.com/hashicorp/hcl
- version: 23c074d0eceb2b8a5bfdbb271ab780cde70f05a8
- subpackages:
- - hcl/ast
- - hcl/parser
- - hcl/scanner
- - hcl/strconv
- - hcl/token
- - json/parser
- - json/scanner
- - json/token
- - name: github.com/inconshreveable/mousetrap
- version: 76626ae9c91c4f2a10f34cad8ce83ea42c93bb75
- - name: github.com/jmhodges/levigo
- version: c42d9e0ca023e2198120196f842701bb4c55d7b9
- - name: github.com/kr/logfmt
- version: b84e30acd515aadc4b783ad4ff83aff3299bdfe0
- - name: github.com/magiconair/properties
- version: 49d762b9817ba1c2e9d0c69183c2b4a8b8f1d934
- - name: github.com/mitchellh/mapstructure
- version: 06020f85339e21b2478f756a78e295255ffa4d6a
- - name: github.com/pelletier/go-toml
- version: 4e9e0ee19b60b13eb79915933f44d8ed5f268bdd
- - name: github.com/pkg/errors
- version: 645ef00459ed84a119197bfb8d8205042c6df63d
- - name: github.com/rcrowley/go-metrics
- version: 1f30fe9094a513ce4c700b9a54458bbb0c96996c
- - name: github.com/spf13/afero
- version: 8d919cbe7e2627e417f3e45c3c0e489a5b7e2536
- subpackages:
- - mem
- - name: github.com/spf13/cast
- version: acbeb36b902d72a7a4c18e8f3241075e7ab763e4
- - name: github.com/spf13/cobra
- version: 7b2c5ac9fc04fc5efafb60700713d4fa609b777b
- - name: github.com/spf13/jwalterweatherman
- version: 12bd96e66386c1960ab0f74ced1362f66f552f7b
- - name: github.com/spf13/pflag
- version: 4c012f6dcd9546820e378d0bdda4d8fc772cdfea
- - name: github.com/spf13/viper
- version: 25b30aa063fc18e48662b86996252eabdcf2f0c7
- - name: github.com/syndtr/goleveldb
- version: adf24ef3f94bd13ec4163060b21a5678f22b429b
- subpackages:
- - leveldb
- - leveldb/cache
- - leveldb/comparer
- - leveldb/errors
- - leveldb/filter
- - leveldb/iterator
- - leveldb/journal
- - leveldb/memdb
- - leveldb/opt
- - leveldb/storage
- - leveldb/table
- - leveldb/util
- - name: github.com/tendermint/abci
- version: 76ef8a0697c6179220a74c479b36c27a5b53008a
- subpackages:
- - client
- - example/counter
- - example/dummy
- - server
- - types
- - name: github.com/tendermint/ed25519
- version: d8387025d2b9d158cf4efb07e7ebf814bcce2057
- subpackages:
- - edwards25519
- - extra25519
- - name: github.com/tendermint/go-crypto
- version: dd20358a264c772b4a83e477b0cfce4c88a7001d
- - name: github.com/tendermint/go-wire
- version: 7d50b38b3815efe313728de77e2995c8813ce13f
- subpackages:
- - data
- - data/base58
- - nowriter/tmencoding
- - name: github.com/tendermint/iavl
- version: 594cc0c062a7174475f0ab654384038d77067917
- subpackages:
- - iavl
- - name: github.com/tendermint/tmlibs
- version: 1e12754b3a3b5f1c23bf44c2d882faae688fb2e8
- subpackages:
- - autofile
- - cli
- - cli/flags
- - clist
- - common
- - db
- - flowrate
- - log
- - merkle
- - pubsub
- - pubsub/query
- - test
- - name: golang.org/x/crypto
- version: 9f005a07e0d31d45e6656d241bb5c0f2efd4bc94
- subpackages:
- - curve25519
- - nacl/box
- - nacl/secretbox
- - openpgp/armor
- - openpgp/errors
- - poly1305
- - ripemd160
- - salsa20/salsa
- - name: golang.org/x/net
- version: 9dfe39835686865bff950a07b394c12a98ddc811
- subpackages:
- - context
- - http2
- - http2/hpack
- - idna
- - internal/timeseries
- - lex/httplex
- - trace
- - name: golang.org/x/sys
- version: b98136db334ff9cb24f28a68e3be3cb6608f7630
- - name: golang.org/x/text
- version: 88f656faf3f37f690df1a32515b479415e1a6769
- subpackages:
- - secure/bidirule
- - transform
- - unicode/bidi
- - unicode/norm
- - name: google.golang.org/genproto
- version: 891aceb7c239e72692819142dfca057bdcbfcb96
- subpackages:
- - googleapis/rpc/status
- - name: google.golang.org/grpc
- version: f7bf885db0b7479a537ec317c6e48ce53145f3db
- subpackages:
- - balancer
- - codes
- - connectivity
- - credentials
- - grpclb/grpc_lb_v1/messages
- - grpclog
- - internal
- - keepalive
- - metadata
- - naming
- - peer
- - resolver
- - stats
- - status
- - tap
- - transport
- - name: gopkg.in/go-playground/validator.v9
- version: 61caf9d3038e1af346dbf5c2e16f6678e1548364
- - name: gopkg.in/yaml.v2
- version: 287cf08546ab5e7e37d55a84f7ed3fd1db036de5
- testImports:
- - name: github.com/davecgh/go-spew
- version: 04cdfd42973bb9c8589fd6a731800cf222fde1a9
- subpackages:
- - spew
- - name: github.com/pmezard/go-difflib
- version: d8ed2627bdf02c080bf22230dbb337003b7aba2d
- subpackages:
- - difflib
- - name: github.com/stretchr/testify
- version: 2aa2c176b9dab406a6970f6a55f513e8a8c8b18f
- subpackages:
- - assert
- - require
|