Alexander Simmerl
c27fda09dd
wip: Comment types
* add comments to all public types
* fix comments to adhere to comment standards
7 years ago
Ethan Buchman
23eb84db35
wip: priv val via sockets
7 years ago
Ethan Buchman
bef91ea7fe
adr-008-priv-validator
7 years ago
Ethan Buchman
459633fb4c
types/priv_validator
7 years ago
Ethan Buchman
f1c8489270
Merge pull request #1201 from tendermint/1022-do-not-enforce-1/3-val-changes
do not enforce 1/3 validator power change
7 years ago
Ethan Buchman
2d10c8f15b
Merge pull request #1095 from tendermint/804-p2p-issues
[p2p] Pong Timeout
7 years ago
Anton Kaliaev
106cdb74e5
do not enforce 1/3 validator power change
leave it to the app
Refs #1022
7 years ago
Anton Kaliaev
22b038810a
do not block in recvRoutine
7 years ago
Anton Kaliaev
45750e1b29
fix race by sending signal instead of stopping pongTimer
7 years ago
Anton Kaliaev
26419fba28
refactor code plus add one more test
* extract stopPongTimer method
* TestMConnectionMultiplePings
7 years ago
Anton Kaliaev
ac0123d249
drain pongTimeoutCh and pongTimer's channel to prevent leaks
7 years ago
Anton Kaliaev
f4ff66de30
rewrite pong timer to use time.AfterFunc
7 years ago
Anton Kaliaev
747b73cb95
fix merge conflicts
7 years ago
Anton Kaliaev
161e100a24
close return channel when we're done
Benchmark results:
```
BenchmarkSwitchBroadcast-2 30000 71275 ns/op
--- BENCH: BenchmarkSwitchBroadcast-2
switch_test.go:339: success: 1, failure: 0
switch_test.go:339: success: 100, failure: 0
switch_test.go:339: success: 10000, failure: 0
switch_test.go:339: success: 30000, failure: 0
```
7 years ago
Anton Kaliaev
3ae738f453
increase timeouts
7 years ago
Anton Kaliaev
d14d4a2527
remove TryBroadcast
7 years ago
Anton Kaliaev
860da464df
remove weird concurrency testing
7 years ago
Anton Kaliaev
4e2000abfe
control order by sending msgs from one goroutine
7 years ago
Anton Kaliaev
5834a59816
read ping
7 years ago
Anton Kaliaev
b28b76ddf7
rename pingTimeout to pingInterval, pongTimer is now time.Timer
7 years ago
zbo14
91e4f4b786
ping/pong timeout in config
7 years ago
zbo14
9b554fb2c4
switch test modification
7 years ago
zbo14
f97ead4f5f
prep for merge
7 years ago
zbo14
5af22d6ee6
remove SwitchEventNewPeer, SwitchEventDonePeer
7 years ago
zbo14
1d16df6a92
add test, TrySend in broadcast
7 years ago
Ethan Buchman
e7bc946760
Merge pull request #1200 from tendermint/update-deps
Update tmlibs & protobuf deps
7 years ago
Ethan Buchman
cf1e1f5899
Merge pull request #1194 from tendermint/1177-semantics-of-currate-low-msg
improve "curRate too low" message
7 years ago
Anton Kaliaev
2f8372d629
update protobuf
7 years ago
Anton Kaliaev
d84e4effce
update tmlibs
7 years ago
Anton Kaliaev
0c1b91b762
revert back curRate != 0
7 years ago
Anton Kaliaev
c8990d06d9
remove curRate != 0
7 years ago
Anton Kaliaev
b0a55882b2
lower the minRecvRate
See https://github.com/tendermint/tendermint/issues/1177#issuecomment-363720118
7 years ago
Anton Kaliaev
d1fa44e816
improve "curRate too low" message
Refs #1177
Note on labels:
KB - 1024
kB - 1000
https://ux.stackexchange.com/questions/13815/files-size-units-kib-vs-kb-vs-kb
7 years ago
Ethan Buchman
199ea40980
Merge pull request #1196 from tendermint/1149-TestReactorValidatorSetChanges-fails-non-deterministically
WIP: TestReactorValidatorSetChanges fails non deterministically
7 years ago
Ethan Buchman
66fc476e1e
Merge pull request #1173 from tendermint/memory-leak-in-reconnect-to-peer-2
fix memory leak in mempool reactor
7 years ago
Ethan Buchman
6b347200d9
Merge pull request #1197 from tendermint/1155-seed-mode-flag
add seed_mode flag (`--p2p.seed_mode`)
7 years ago
Ethan Buchman
8a908a7cf9
Merge pull request #1193 from tendermint/return-back-cmd-logging
With must be called on log.filter, otherwise "main" entries get filtered
7 years ago
Ethan Buchman
0bcc11c9bc
Merge pull request #1191 from tendermint/event-buffer-slice-clearing-on-flush
types: TxEventBuffer.Flush now uses capacity preserving slice clearing idiom
7 years ago
Ethan Buchman
0247a21a93
Merge pull request #1086 from tendermint/966-deterministic-tooling-for-releases
Distribution improvements (freeze glide version + get rid of gox)
7 years ago
Anton Kaliaev
cf1f483526
add seed_mode flag (`--p2p.seed_mode`)
7 years ago
Anton Kaliaev
3f9aa8d8fa
document that msgBytes in p2p/connection change
7 years ago
Anton Kaliaev
d6d1f8512d
do not reset pingTimer
don't bother with this "only ping when we havent heard from them". lets
just always ping every peer from the sendRoutine every 10s no matter
what. if they dont pong within pongTimeout, disconnect :)
7 years ago
Anton Kaliaev
2b2c233977
write docs for Reactor interface
7 years ago
Ethan Buchman
7640e6a29f
add some p2p TODOs
7 years ago
Anton Kaliaev
b0ca8a0872
With must be called on log.filter, otherwise "main" entries get filtered
Also, we should allow "main" module to log INFO messages like
```
I[02-07|07:57:25.074] Found private validator module=main path=/home/vagrant/.tendermint/config/priv_validator.json
I[02-07|07:57:25.076] Found genesis file module=main path=/home/vagrant/.tendermint/config/genesis.json
```
Refs https://github.com/cosmos/gaia/issues/118
**BEFORE**:
```
$ tendermint init
```
**AFTER**:
```
$ tendermint init
I[02-07|07:57:25.074] Found private validator module=main path=/home/vagrant/.tendermint/config/priv_validator.json
I[02-07|07:57:25.076] Found genesis file module=main path=/home/vagrant/.tendermint/config/genesis.json
```
7 years ago
Ethan Buchman
9e767771fc
Merge pull request #1188 from ltfschoen/patch-1
Update getting-started.rst with Python 3 example
7 years ago
Anton Kaliaev
6c8d7a8c19
deterministic tooling for releases
get rid of gox
build target builds inside docker, dev-build - locally
Revert "build target builds inside docker, dev-build - locally"
This reverts commit 8ba89d5e8c
.
add build tags to make build/build_race/install
use tendermint's fork of glide instead of tar.gz
remove TMHOME unused var + set length for git hash
get rid of GOTOOLS_CHECK
fixes after review
zip
needed for distribution
7 years ago
Emmanuel Odeke
15ef57c6d0
types: TxEventBuffer.Flush now uses capacity preserving slice clearing idiom
Fixes https://github.com/tendermint/tendermint/issues/1189
For every TxEventBuffer.Flush() invoking, we were invoking
a:
b.events = make([]EventDataTx, 0, b.capacity)
whose intention is to innocently clear the events slice but
maintain the underlying capacity.
However, unfortunately this is memory and garbage collection intensive
which is linear in the number of events added. If an attack had access
to our code somehow, invoking .Flush() in tight loops would be a sure
way to cause huge GC pressure, and say if they added about 1e9
events maliciously, every Flush() would take at least 3.2seconds
which is enough to now control our application.
The new using of the capacity preserving slice clearing idiom
takes a constant time regardless of the number of elements with zero
allocations so we are killing many birds with one stone i.e
b.events = b.events[:0]
For benchmarking results, please see
https://gist.github.com/odeke-em/532c14ab67d71c9c0b95518a7a526058
for a reference on how things can get out of hand easily.
7 years ago
Luke Schoen
f37c502fd8
Update getting-started.rst with Python 3 example
7 years ago
Anton Kaliaev
945b0e6eca
cleanup glide.yaml
7 years ago