6380 Commits

Author SHA1 Message Date
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 8ba89d5e8c5668e3839ff49952a9166d1158f6e8.

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
2018-02-06 12:46:13 +04:00
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.
2018-02-05 23:34:15 -08:00
Luke Schoen
f37c502fd8
Update getting-started.rst with Python 3 example 2018-02-06 16:00:51 +11:00
Anton Kaliaev
945b0e6eca
cleanup glide.yaml 2018-02-05 22:53:44 +04:00
Anton Kaliaev
84a0a1987c
comment out tests for now
https://github.com/tendermint/tendermint/pull/1173#issuecomment-363173047
2018-02-05 22:26:14 +04:00
Anton Kaliaev
11b68f1934
rewrite broadcastTxRoutine to use channels
https://play.golang.org/p/gN21yO9IRs3

```
func waitWithCancel(f func() *clist.CElement, ctx context.Context) *clist.CElement {
	el := make(chan *clist.CElement, 1)
	select {
	case el <- f():
```
will just run f() blockingly, so this doesn't change much in terms of behavior.
2018-02-05 16:36:26 +04:00
Anton Kaliaev
202d9a2c0c
fix memory leak in mempool reactor
Leaking goroutine:
```
114 @ 0x42f2bc 0x42f3ae 0x440794 0x4403b9 0x468002 0x9fe32d 0x9ff78f 0xa025ed 0x45e571
```

Explanation:
it blocks on an empty clist forever. so unless theres txs coming in,
this go routine will just sit there, holding onto the peer too.
if we're constantly reconnecting to some peer, old instances are not
garbage collected, leading to memory leak.

Fixes https://github.com/cosmos/gaia/issues/108
Previous attempt https://github.com/tendermint/tendermint/pull/1156
2018-02-05 13:52:18 +04:00
Anton Kaliaev
19e818fdf7
Merge pull request #142 from tendermint/ishex-fragility
common: IsHex should be able to handle 0X prefixed strings
2018-02-05 13:14:53 +04:00
Anton Kaliaev
91b41ddd59
add waitCh as an alternative to waitGroup
new methods:
 - [CList] WaitChan()
 - [CElement] NextWaitChan()
 - [CElement] PrevWaitChan()

Refs https://github.com/tendermint/tendermint/pull/1173
2018-02-05 11:36:36 +04:00
Ethan Buchman
bf84e82577
Merge pull request #1184 from tendermint/sdk2-tmlibs-abci
Updates for tmlibs and abci (sdk2)
2018-02-03 10:45:54 -05:00
Ethan Buchman
abca9a2d61 woops - bring back glide.lock file 2018-02-03 03:59:16 -05:00
Ethan Buchman
d34286c421 minor fixes - tests pass 2018-02-03 03:54:49 -05:00
Anton Kaliaev
bb2bdbc0e1 add missing element (tag.Value) to keyForTag
encoded as %s. not sure this will work with raw bytes
2018-02-03 03:52:25 -05:00
Ethan Buchman
e7747f7d66 it compiles 2018-02-03 03:52:17 -05:00
Ethan Buchman
7a5060dc52 replace data.Bytes with cmn.HexBytes 2018-02-03 03:47:01 -05:00
Ethan Buchman
426379dc47 remove use of wire/nowriter 2018-02-03 03:39:14 -05:00
Ethan Buchman
cd0fd06b0d update for sdk2 libs. need to fix kv test
NOTE we only updating for tmlibs and abci
2018-02-03 03:35:02 -05:00
Ethan Buchman
4e3488c677 update types 2018-02-03 03:23:10 -05:00
Ethan Buchman
061ad355bb update glide 2018-02-03 03:22:56 -05:00
Ethan Buchman
2679b7554b lite: comment out iavl code - TODO #1183 2018-02-03 03:02:49 -05:00
Ethan Buchman
5a4f56056e
Merge pull request #189 from tendermint/no-wire-crypto
remove go-wire and go-crypto deps
2018-02-03 02:55:22 -05:00
Ethan Buchman
1148027baf remove go-wire and go-crypto deps 2018-02-03 02:39:34 -05:00
Ethan Buchman
21dd648732
Merge pull request #187 from tendermint/no-iavl
Remove IAVL dependency
2018-02-03 02:26:26 -05:00
Ethan Buchman
baea45177d example/dummy: remove iavl dep - just use raw db 2018-02-03 02:02:40 -05:00
Ethan Buchman
deaaf014d8
Merge pull request #141 from tendermint/no-wire
merkle: remove go-wire dep by copying EncodeByteSlice
2018-02-03 01:57:27 -05:00
Emmanuel Odeke
951333ecb0
common: IsHex should be able to handle 0X prefixed strings
IsHex should also successfully decode strings prefixed with
0X instead of only 0x strings.

Also add tests generally for IsHex.
2018-02-02 23:41:24 -07:00
Ethan Buchman
d6d97889f2 merkle: remove go-wire dep by copying EncodeByteSlice 2018-02-03 01:29:39 -05:00
Ethan Buchman
c617737e03
Merge pull request #184 from tendermint/sdk2
update for go-wire sdk2
2018-02-03 00:22:50 -05:00
Ethan Buchman
4450a20bde types: check bufio.Reader 2018-02-03 00:24:48 -05:00
Ethan Buchman
d2845d923b add more versions to glide 2018-02-03 00:14:15 -05:00
Ethan Buchman
700792bc10 update glide 2018-02-03 00:08:39 -05:00
Ethan Buchman
11d383f1c7 update for go-wire sdk2 2018-02-02 23:56:19 -05:00
Ethan Buchman
4fc3055dbd update glide again 2018-02-02 23:50:24 -05:00
Ethan Buchman
1d7fc78ea1 update glide 2018-02-02 23:49:14 -05:00
Ethan Buchman
5a94049dbc update glide again 2018-02-02 23:42:22 -05:00
Ethan Buchman
9e897ab8b0 update glide 2018-02-02 23:34:07 -05:00
Ethan Buchman
690d6c6070 cli: WriteDemoConfig -> WriteConfigVals 2018-02-02 23:05:28 -05:00
Ethan Buchman
4542cc5a71
Merge pull request #64 from tendermint/sdk2
Merge sdk2 into develop
2018-02-02 22:48:01 -05:00
Ethan Buchman
027c37281d
Merge pull request #123 from tendermint/sdk2
Merge sdk2 into develop
2018-02-02 22:32:33 -05:00
Ethan Buchman
1b5176003a DbBackend -> DBBackend 2018-02-02 22:31:17 -05:00
Adrian Brink
45b71f7d11
Bump tmlibs commit. Needs to be changed to develop as soon as tmlibs PR is merged 2018-02-02 18:51:41 +01:00
Adrian Brink
cbc63518e5
Export DbBackendType in order to fix IAVL tests 2018-02-02 18:50:24 +01:00
Adrian Brink
0391e499fb
Clean up glide.yaml 2018-02-02 18:31:25 +01:00
Adrian Brink
2e76546223
Clean up glide.yaml 2018-02-02 18:09:48 +01:00
Adrian Brink
6b2409f714
Update go-wire to develop 2018-02-02 14:12:29 +01:00
Anton Kaliaev
95b53c80e1
Merge pull request #140 from tendermint/sdk2-hashers-and-simple-map
Sdk2 hashers and simple map
2018-02-02 14:15:56 +04:00
Anton Kaliaev
9ccfe161ad
lowercase memDB type key 2018-02-02 14:08:05 +04:00
Jae Kwon
f6dbe9ba05
Refactor string -> dbBackendType 2018-02-02 14:08:05 +04:00
Jae Kwon
b95cac5f4f
Remove unnecessary Byteser interface 2018-02-02 14:08:05 +04:00
Jae Kwon
c75298e359
Update SimpleMap to hash both keys and values for benefit; Hashable is Hasher; Don't assume go-wire 2018-02-02 14:08:05 +04:00