Anton Kaliaev
1a6eb2ef00
godoc comments
2019-02-13 13:53:42 +04:00
Anton Kaliaev
c543699d15
lite client works (tested manually)
2019-02-13 13:53:42 +04:00
Anton Kaliaev
b27483962f
fix data race
...
```
WARNING: DATA RACE
Read at 0x00c000a36060 by goroutine 129:
github.com/tendermint/tendermint/rpc/client.(*Local).Subscribe.func1()
/go/src/github.com/tendermint/tendermint/rpc/client/localclient.go:168 +0x1f0
Previous write at 0x00c000a36060 by goroutine 132:
github.com/tendermint/tendermint/rpc/client.(*Local).Subscribe()
/go/src/github.com/tendermint/tendermint/rpc/client/localclient.go:191 +0x4e0
github.com/tendermint/tendermint/rpc/client.WaitForOneEvent()
/go/src/github.com/tendermint/tendermint/rpc/client/helpers.go:64 +0x178
github.com/tendermint/tendermint/rpc/client_test.TestTxEventsSentWithBroadcastTxSync.func1()
/go/src/github.com/tendermint/tendermint/rpc/client/event_test.go:139 +0x298
testing.tRunner()
/usr/local/go/src/testing/testing.go:827 +0x162
Goroutine 129 (running) created at:
github.com/tendermint/tendermint/rpc/client.(*Local).Subscribe()
/go/src/github.com/tendermint/tendermint/rpc/client/localclient.go:164 +0x4b7
github.com/tendermint/tendermint/rpc/client.WaitForOneEvent()
/go/src/github.com/tendermint/tendermint/rpc/client/helpers.go:64 +0x178
github.com/tendermint/tendermint/rpc/client_test.TestTxEventsSentWithBroadcastTxSync.func1()
/go/src/github.com/tendermint/tendermint/rpc/client/event_test.go:139 +0x298
testing.tRunner()
/usr/local/go/src/testing/testing.go:827 +0x162
Goroutine 132 (running) created at:
testing.(*T).Run()
/usr/local/go/src/testing/testing.go:878 +0x659
github.com/tendermint/tendermint/rpc/client_test.TestTxEventsSentWithBroadcastTxSync()
/go/src/github.com/tendermint/tendermint/rpc/client/event_test.go:119 +0x186
testing.tRunner()
/usr/local/go/src/testing/testing.go:827 +0x162
==================
```
2019-02-13 13:53:42 +04:00
Anton Kaliaev
a801b14850
remove EventSubscriber
2019-02-13 13:53:41 +04:00
Anton Kaliaev
421b3c11d4
finalize HTTPClient events interface
2019-02-13 13:53:15 +04:00
Anton Kaliaev
3966988bcc
new HTTPClient interface for subscriptions
2019-02-13 13:53:15 +04:00
Anton Kaliaev
0cddfdc81d
limit number of /subscribe clients and queries per client
...
Add the following config variables (under [rpc] section):
* max_subscription_clients
* max_subscriptions_per_client
* timeout_broadcast_tx_commit
Fixes #2826
2019-02-13 13:53:15 +04:00
Anton Kaliaev
5b7034a329
another attempt to fix indexer
2019-02-13 12:56:23 +04:00
Anton Kaliaev
398626573b
Revert "rewrite indexer service in the attempt to fix failing test"
...
This reverts commit 0d9107a098230de7138abb1c201877c246e89ed1.
2019-02-13 12:50:51 +04:00
Anton Kaliaev
0d9107a098
rewrite indexer service in the attempt to fix failing test
...
https://github.com/tendermint/tendermint/pull/3227/#issuecomment-462316527
2019-02-13 12:40:01 +04:00
Anton Kaliaev
545b33ed29
reformat code
2019-02-13 12:11:46 +04:00
Anton Kaliaev
f1d63ede26
Merge branch 'develop' into anton/new-pubsub
2019-02-13 11:47:14 +04:00
Zach
d32f7d2416
update codeowners ( #3305 )
...
limit the scope of @zramsay because he's annoyed by notifications
2019-02-13 08:26:01 +04:00
Thane Thomson
b30cb5fde9
fix typos after Thane's review
...
Co-Authored-By: melekes <anton.kalyaev@gmail.com>
2019-02-12 21:57:07 +04:00
Ethan Buchman
dc6567c677
consensus: flush wal on stop ( #3297 )
...
Should fix #3295
Also partial fix of #3043
2019-02-12 09:32:40 +04:00
Ethan Buchman
08dabab024
types: validator set update tests ( #3284 )
...
* types: validator set update tests
* docs: abci val updates must not include duplicates
2019-02-12 09:04:23 +04:00
Anca Zamfir
8a9eecce7f
test blockExec does not panic if all vals removed ( #3241 )
...
Fix for #3224
Also address #2084
2019-02-12 09:02:44 +04:00
Ismail Khoffi
b089587b42
make gosec linter pass ( #3294 )
...
* not related to linter: remove obsolete constants:
- `Insecure` and `Secure` and type `Security` are not used anywhere
* not related to linter: update example
- NewInsecure was deleted; change example to NewRemoteDB
* address: Binds to all network interfaces (gosec):
- bind to localhost instead of 0.0.0.0
- regenerate test key and cert for this purpose (was valid for ::) and
otherwise we would see:
transport: authentication handshake failed: x509: certificate is
valid for ::, not 127.0.0.1\"
(used https://github.com/google/keytransparency/blob/master/scripts/gen_server_keys.sh
to regenerate certs)
* use sha256 in tests instead of md5; time difference is negligible
* nolint usage of math/rand in test and add comment on its import
- crypto/rand is slower and we do not need sth more secure in tests
* enable linter in circle-ci
* another nolint math/rand in test
* replace another occurrence of md5
* consistent comment about importing math/rand
2019-02-12 08:54:12 +04:00
Anton Kaliaev
7fd51e6ade
make govet linter pass ( #3292 )
...
* make govet linter pass
Refs #3262
* close PipeReader and check for err
2019-02-11 16:31:34 +04:00
Anca Zamfir
966b5bdf6e
fix failure in TestProposerFrequency ( #3293 )
...
```
--- FAIL: TestProposerFrequency (2.50s)
panic: empty validator set [recovered]
panic: empty validator set
goroutine 91 [running]:
testing.tRunner.func1(0xc000a98c00)
/usr/local/go/src/testing/testing.go:792 +0x6a7
panic(0xeae7e0, 0x11fbb30)
/usr/local/go/src/runtime/panic.go:513 +0x1b9
github.com/tendermint/tendermint/types.(*ValidatorSet).RescalePriorities(0xc0000e7380, 0x0)
/go/src/github.com/tendermint/tendermint/types/validator_set.go:106 +0x1ac
github.com/tendermint/tendermint/state.TestProposerFrequency(0xc000a98c00)
/go/src/github.com/tendermint/tendermint/state/state_test.go:335 +0xb44
testing.tRunner(0xc000a98c00, 0x111a4d8)
/usr/local/go/src/testing/testing.go:827 +0x163
created by testing.(*T).Run
/usr/local/go/src/testing/testing.go:878 +0x65a
FAIL github.com/tendermint/tendermint/state 3.139s
```
2019-02-11 16:21:51 +04:00
Ethan Buchman
021b5cc7f6
Merge pull request #3290 from tendermint/master
...
Merge pull request #3288 from tendermint/release/v0.30.0
2019-02-09 10:07:49 -05:00
Ethan Buchman
28d75ec801
Merge pull request #3288 from tendermint/release/v0.30.0
...
Release/v0.30.0
v0.30.0
2019-02-09 10:07:22 -05:00
Ethan Buchman
792b12573e
Prepare v0.30.0 ( #3287 )
...
* changelog, upgrading, version
* update for evidence fixes
* linkify
* fix an entry
v0.30.0-rc0
2019-02-08 18:50:02 -05:00
Ethan Buchman
4f2ef36701
types.NewCommit ( #3275 )
...
* types.NewCommit
* use types.NewCommit everywhere
* fix log in unsafe_reset
* memoize height and round in constructor
* notes about deprecating toVote
* bring back memoizeHeightRound
2019-02-08 18:40:41 -05:00
Ethan Buchman
6b1b595951
Merge pull request #3286 from tendermint/bucky/fix-duplicate-evidence
...
Fixes for duplicate evidence
2019-02-08 18:33:45 -05:00
Ismail Khoffi
87bdc42bf8
Reject blocks with committed evidence ( #37 )
...
* evidence: NewEvidencePool takes evidenceDB
* evidence: failing TestStoreCommitDuplicate
tendermint/security#35
* GetEvidence -> GetEvidenceInfo
* fix TestStoreCommitDuplicate
* comment in VerifyEvidence
* add check if evidence was already seen
- modify EventPool interface (EventStore is not known in ApplyBlock):
- add IsCommitted method to iface
- add test
* update changelog
* fix TestStoreMark:
- priority in evidence info gets reset to zero after evidence gets committed
* review comments: simplify EvidencePool.IsCommitted
- delete obsolete EvidenceStore.IsCommitted
* add simple test for IsCommitted
* update changelog: this is actually breaking (PR number still missing)
* fix TestStoreMark:
- priority in evidence info gets reset to zero after evidence gets
committed
* review suggestion: simplify return
2019-02-08 18:30:45 -05:00
Ethan Buchman
90ba63948a
Sec/bucky/35 commit duplicate evidence ( #36 )
...
Don't add committed evidence to evpool
2019-02-08 18:25:48 -05:00
Anca Zamfir
cce4d21ccb
treat validator updates as set ( #3222 )
...
* Initial commit for 3181..still early
* unit test updates
* unit test updates
* fix check of dups accross updates and deletes
* simplify the processChange() func
* added overflow check utest
* Added checks for empty valset, new utest
* deepcopy changes in processUpdate()
* moved to new API, fixed tests
* test cleanup
* address review comments
* make sure votePower > 0
* gofmt fixes
* handle duplicates and invalid values
* more work on tests, review comments
* Renamed and explained K
* make TestVal private
* split verifyUpdatesAndComputeNewPriorities.., added check for deletes
* return error if validator set is empty after processing changes
* address review comments
* lint err
* Fixed the total voting power and added comments
* fix lint
* fix lint
2019-02-08 13:05:09 -05:00
Ismail Khoffi
c1f7399a86
review comment: cleaner constant for N/2, delete secp256k1N and use ( #3279 )
...
`secp256k1.S256().N` directly instead
2019-02-08 09:48:09 -05:00
Ethan Buchman
44a89a3537
Merge pull request #3282 from tendermint/master
...
Merge master back to develop
2019-02-08 09:43:36 -05:00
Ethan Buchman
a8dbc64319
Merge pull request #3276 from tendermint/release/v0.29.2
...
Release/v0.29.2
v0.29.2
2019-02-08 09:42:52 -05:00
Ethan Buchman
af6e6cd350
remove MixEntropy ( #3278 )
...
* remove MixEntropy
* changelog
v0.29.2-rc2
2019-02-07 20:12:57 -05:00
Ethan Buchman
ad4bd92fec
secp256k1: change build tags ( #3277 )
v0.29.2-rc1
2019-02-07 19:57:30 -05:00
Ethan Buchman
f571ee8876
prepare v0.29.2 ( #3272 )
...
* update changelog
* linkify
* bump version
* update main changelog
* final fixes
* entry for wal fix
* changelog preamble
* remove a line
v0.29.2-rc0
2019-02-07 19:34:01 -05:00
Anton Kaliaev
95dc174b97
fix merge conflicts
2019-02-07 17:17:57 +04:00
Anton Kaliaev
2e029e8fd4
add changelog entries
2019-02-07 17:17:57 +04:00
Anton Kaliaev
cf67a8b1b7
no timeout
2019-02-07 17:17:57 +04:00
Anton Kaliaev
ebe8625478
fixes after my second review
2019-02-07 17:17:57 +04:00
Anton Kaliaev
165bb2abfe
wait 100ms before kicking a subscriber out
...
+ a test for indexer_service
2019-02-07 17:17:56 +04:00
Anton Kaliaev
c6e3059e32
fix formatting
2019-02-07 17:17:56 +04:00
Anton Kaliaev
6464bcba7d
fixes after my own review
2019-02-07 17:17:56 +04:00
Anton Kaliaev
d185bdb944
fix data race in TestStartNextHeightCorrectly
...
```
Write at 0x00c0001c7418 by goroutine 796:
github.com/tendermint/tendermint/consensus.TestStartNextHeightCorrectly()
/go/src/github.com/tendermint/tendermint/consensus/state_test.go:1296 +0xad
testing.tRunner()
/usr/local/go/src/testing/testing.go:827 +0x162
Previous read at 0x00c0001c7418 by goroutine 858:
github.com/tendermint/tendermint/consensus.(*ConsensusState).addVote()
/go/src/github.com/tendermint/tendermint/consensus/state.go:1631 +0x1366
github.com/tendermint/tendermint/consensus.(*ConsensusState).tryAddVote()
/go/src/github.com/tendermint/tendermint/consensus/state.go:1476 +0x8f
github.com/tendermint/tendermint/consensus.(*ConsensusState).handleMsg()
/go/src/github.com/tendermint/tendermint/consensus/state.go:667 +0xa1e
github.com/tendermint/tendermint/consensus.(*ConsensusState).receiveRoutine()
/go/src/github.com/tendermint/tendermint/consensus/state.go:628 +0x794
Goroutine 796 (running) created at:
testing.(*T).Run()
/usr/local/go/src/testing/testing.go:878 +0x659
testing.runTests.func1()
/usr/local/go/src/testing/testing.go:1119 +0xa8
testing.tRunner()
/usr/local/go/src/testing/testing.go:827 +0x162
testing.runTests()
/usr/local/go/src/testing/testing.go:1117 +0x4ee
testing.(*M).Run()
/usr/local/go/src/testing/testing.go:1034 +0x2ee
main.main()
_testmain.go:214 +0x332
Goroutine 858 (running) created at:
github.com/tendermint/tendermint/consensus.(*ConsensusState).startRoutines()
/go/src/github.com/tendermint/tendermint/consensus/state.go:334 +0x221
github.com/tendermint/tendermint/consensus.startTestRound()
/go/src/github.com/tendermint/tendermint/consensus/common_test.go:122 +0x63
github.com/tendermint/tendermint/consensus.TestStateFullRound1()
/go/src/github.com/tendermint/tendermint/consensus/state_test.go:255 +0x397
testing.tRunner()
/usr/local/go/src/testing/testing.go:827 +0x162
```
2019-02-07 17:17:56 +04:00
Anton Kaliaev
17f1cb0a8d
fix test
2019-02-07 17:17:56 +04:00
Anton Kaliaev
4257407aea
bring back EventSubscriber
2019-02-07 17:17:56 +04:00
Anton Kaliaev
1be7e341b1
remove TagMap
...
it does not bring any additional benefits
2019-02-07 17:17:55 +04:00
Anton Kaliaev
61155f66a7
rename MsgAndTags to Message
2019-02-07 17:17:55 +04:00
Anton Kaliaev
54cc5100f8
nope
2019-02-07 17:17:55 +04:00
Anton Kaliaev
641182e5d3
start adapting other pkgs to new pubsub
2019-02-07 17:17:55 +04:00
Anton Kaliaev
67be801052
Subscribe and SubscribeUnbuffered
2019-02-07 17:17:55 +04:00
Anton Kaliaev
c6e7015245
get rid of clientToQueryMap
2019-02-07 17:17:55 +04:00