6910 Commits

Author SHA1 Message Date
Anton Kaliaev
d205ae1f98 Merge pull request #41 from tendermint/feature/ws-fix
Fix WS connection errors
2017-07-29 14:49:39 -04:00
Anton Kaliaev
9181822f65
[tm-monitor] update deps 2017-07-29 14:48:27 -04:00
Zach Ramsay
bab7877fa1 route links to godoc rather than deprecated internal implementation, closes https://github.com/zramsay/tendermint/issues/1 2017-07-29 14:33:49 -04:00
Anton Kaliaev
9f65485b62
[tm-monitor] update docker alpine version 2017-07-29 13:50:09 -04:00
Anton Kaliaev
7ab861358a
[tm-bench] update alpine version 2017-07-29 12:54:28 -04:00
Ethan Buchman
10f8101314 fix race 2017-07-29 11:45:07 -04:00
Ethan Buchman
530626dab7 broadcast proposer heartbeat msg 2017-07-29 11:45:02 -04:00
Greg Szabo
5f500ec891 Fixed config.toml deployment 2017-07-29 15:41:17 +00:00
Greg Szabo
b7dbf4a528 ansible fix 2017-07-29 14:46:31 +00:00
Greg Szabo
f7e1cb79ee Adding error checking 2017-07-29 09:24:37 +00:00
Greg Szabo
464b404f48 fixes 2017-07-29 09:08:29 +00:00
Greg Szabo
6598719e7f fixes 2017-07-29 08:04:29 +00:00
Greg Szabo
d6e81ff27c Debugging genesis gathering 2017-07-29 07:46:47 +00:00
Greg Szabo
ca9bad2b04 Debugging genesis gathering 2017-07-29 07:35:30 +00:00
Greg Szabo
86e9e7d7c5 Debugging genesis gathering 2017-07-29 07:33:51 +00:00
Greg Szabo
e2f9ffb7ff Another fix 2017-07-29 07:01:19 +00:00
Greg Szabo
feeffc7836 perfnet fixes 2017-07-29 06:15:53 +00:00
Greg Szabo
006ed44e48 perfnet fixes 2017-07-29 06:13:01 +00:00
Greg Szabo
150902a566 perfnet fixes 2017-07-29 06:10:04 +00:00
Greg Szabo
0ea3e33049 validators fix 2017-07-29 05:46:52 +00:00
Greg Szabo
d6e2d90d56 Updated ansible variables documentation 2017-07-29 05:25:32 +00:00
Ethan Buchman
b96d28a42b test progress in higher round 2017-07-28 23:43:30 -04:00
Ethan Buchman
3444bee47f fixes from review; use mempool.TxsAvailable() directly 2017-07-28 23:42:43 -04:00
Ethan Buchman
cf3abe5096 consensus: remove rs from handleMsg 2017-07-28 23:42:19 -04:00
Greg Szabo
e67b298cef Workaround for gaia build 2017-07-29 02:56:52 +00:00
Ethan Buchman
ecdda69fab commit empty blocks when needed to prove app hash 2017-07-28 22:12:11 -04:00
Ethan Buchman
fc3fe9292f fixes from review 2017-07-28 22:12:11 -04:00
Ethan Buchman
d396053872 changelog 2017-07-28 22:11:45 -04:00
Ethan Buchman
e9a2389300 cmd: --consensus.no_empty_blocks 2017-07-28 22:11:45 -04:00
Ethan Buchman
678a9a2e42 TxsAvailable tests 2017-07-28 22:11:45 -04:00
Ethan Buchman
124032e3e9 NoEmptyBlocks config option 2017-07-28 22:11:45 -04:00
Ethan Buchman
4beac54bd9 no empty blocks 2017-07-28 22:11:45 -04:00
Ethan Buchman
39493bcd9a consensus: isProposer func 2017-07-28 22:11:10 -04:00
Anton Kaliaev
73ced040a3
[tm-bench] updated deps 2017-07-28 18:13:39 -04:00
Zach Ramsay
f96771e753 cleanup CONTRIBUTING.md, part of https://github.com/zramsay/tendermint/issues/7 2017-07-28 16:45:03 -04:00
Zach Ramsay
62f94a7948 deduplicate install, closes https://github.com/zramsay/tendermint/issues/2 2017-07-28 16:34:38 -04:00
Greg Szabo
d7c936abfa Added timezone setting for CentOS 2017-07-28 19:30:59 +00:00
Ethan Frey
03d2b2446e Merge pull request #28 from odeke-em/godoc-for-references
README: add godoc instead of tedious MD regeneration
2017-07-28 15:09:54 -04:00
Emmanuel Odeke
ce80f234c7
README: add godoc instead of tedious MD regeneration
Add a godoc reference to delegate indexing and references
to that service, thus keeping our library and usages upto date,
instead of relying on generated markdown that goes stale
especially for changing API signatures, and becomes tedious
where someone has to remember to always regenerate the README
markdown and then commit it.

Fixes #24
2017-07-28 13:01:31 -06:00
Greg Szabo
773f7aac5b Debugging perftestnets 2017-07-28 18:32:29 +00:00
Ethan Frey
f2c881573c Merge pull request #26 from odeke-em/improve-reverse-bytes+tests
hd: optimize ReverseBytes + add tests
2017-07-28 14:28:16 -04:00
Emmanuel Odeke
ae9c5b1ca0 hd: optimize ReverseBytes + add tests
* Optimized ReverseBytes to:
a) Minimally allocate --> 60.0% reduction in the number of allocations
b) Only walk halfway the length of the string thus performing
byte swaps from left to right. Improves the performance as well.
Complexity is O(n/2) instead of O(n) which is still O(n) but
benchmarks show the new time is in deed 1/2 of the original time.

* Added unit tests and some common cases to ensure correctness.

* Benchmark shoot out results:
```shell
name            old time/op    new time/op    delta
ReverseBytes-4     554ns ± 4%     242ns ± 3%  -56.20%  (p=0.000 n=10+10)

name            old alloc/op   new alloc/op   delta
ReverseBytes-4      208B ± 0%      114B ± 0%  -45.19%  (p=0.000 n=10+10)

name            old allocs/op  new allocs/op  delta
ReverseBytes-4      10.0 ± 0%       4.0 ± 0%  -60.00%  (p=0.000 n=10+10)
```
2017-07-28 12:21:41 -06:00
Greg Szabo
e212bf1aa0 config ansible role fix 2017-07-28 17:48:53 +00:00
Greg Szabo
dcb86f4d12 Fix: ansible playbook to deploy tendermint 2017-07-28 17:22:08 +00:00
Greg Szabo
55c0a79aa6 Fixed templates to run on AWS, added option to install tendermint with dummy app 2017-07-28 15:52:15 +00:00
Anton Kaliaev
d1ca2c6f83
[common] add a test for WriteFileAtomic 2017-07-28 11:40:21 -04:00
Anton Kaliaev
b25aa3b472
[common] do not create {filePath}.bak in WriteFileAtomic
We use WriteFileAtomic in two places:

```
p2p/addrbook.go
338:    err = cmn.WriteFileAtomic(filePath, jsonBytes, 0644)

types/priv_validator.go
162:    err = WriteFileAtomic(privVal.filePath, jsonBytes, 0600)
```

and we don't need .bak in any of the above. We save priv_validator every
10ms and addrbook every 2 min.
2017-07-28 11:40:21 -04:00
Anton Kaliaev
8a51210efc
[common] use temp intead of {filePath}.new
The problem with {filePath}.new is that it is not safe for concurrent
use! Calling this function with the same params results in the following
error:

```
panic: Panicked on a Crisis: rename /root/.tendermint_test/consensus_replay_test/priv_validator.json.new /root/.tendermint_test/consensus_replay_test/priv_validator.json: no such file or directory

goroutine 47860 [running]:
github.com/tendermint/tendermint/vendor/github.com/tendermint/tmlibs/common.PanicCrisis(0xcba800, 0xc42152d640)
	/go/src/github.com/tendermint/tendermint/vendor/github.com/tendermint/tmlibs/common/errors.go:33 +0x10f
github.com/tendermint/tendermint/types.(*PrivValidator).save(0xc42235f2c0)
	/go/src/github.com/tendermint/tendermint/types/priv_validator.go:165 +0x159
github.com/tendermint/tendermint/types.(*PrivValidator).signBytesHRS(0xc42235f2c0, 0x6, 0x0, 0xc424e88f03, 0xc429908580, 0xca, 0x155, 0x80, 0xc424e88f00, 0x7f4ecafc88d0, ...)
	/go/src/github.com/tendermint/tendermint/types/priv_validator.go:249 +0x2bb
github.com/tendermint/tendermint/types.(*PrivValidator).SignVote(0xc42235f2c0, 0xc4228c7460, 0xf, 0xc424e88f00, 0x0, 0x0)
	/go/src/github.com/tendermint/tendermint/types/priv_validator.go:186 +0x1a2
github.com/tendermint/tendermint/consensus.(*ConsensusState).signVote(0xc424efd520, 0xc400000002, 0xc422d5e3c0, 0x14, 0x20, 0x1, 0xc4247b6560, 0x14, 0x20, 0x0, ...)
	github.com/tendermint/tendermint/consensus/_test/_obj_test/state.go:1556 +0x35e
github.com/tendermint/tendermint/consensus.(*ConsensusState).signAddVote(0xc424efd520, 0x2, 0xc422d5e3c0, 0x14, 0x20, 0x1, 0xc4247b6560, 0x14, 0x20, 0xc42001b300)
	github.com/tendermint/tendermint/consensus/_test/_obj_test/state.go:1568 +0x200
github.com/tendermint/tendermint/consensus.(*ConsensusState).enterPrecommit(0xc424efd520, 0x6, 0x0)
	github.com/tendermint/tendermint/consensus/_test/_obj_test/state.go:1082 +0x13a4
github.com/tendermint/tendermint/consensus.(*ConsensusState).addVote(0xc424efd520, 0xc424e88780, 0x0, 0x0, 0x39, 0x1dc, 0x28c)
	github.com/tendermint/tendermint/consensus/_test/_obj_test/state.go:1477 +0x1be5
github.com/tendermint/tendermint/consensus.(*ConsensusState).tryAddVote(0xc424efd520, 0xc424e88780, 0x0, 0x0, 0xd7fb00, 0xc42152ce00)
	github.com/tendermint/tendermint/consensus/_test/_obj_test/state.go:1382 +0x93
github.com/tendermint/tendermint/consensus.(*ConsensusState).handleMsg(0xc424efd520, 0xcb58e0, 0xc42547feb8, 0x0, 0x0, 0x6, 0x0, 0x4, 0xed10ca07e, 0x3077bfea, ...)
	github.com/tendermint/tendermint/consensus/_test/_obj_test/state.go:660 +0x9fc
github.com/tendermint/tendermint/consensus.(*ConsensusState).receiveRoutine(0xc424efd520, 0x0)
	github.com/tendermint/tendermint/consensus/_test/_obj_test/state.go:615 +0x5f5
created by github.com/tendermint/tendermint/consensus.(*ConsensusState).OnStart
	github.com/tendermint/tendermint/consensus/_test/_obj_test/state.go:332 +0x4a7
exit status 2
FAIL	github.com/tendermint/tendermint/consensus	76.644s
make: *** [test_integrations] Error 1
```

See https://github.com/tendermint/tendermint/pull/568
2017-07-28 11:39:59 -04:00
Greg Szabo
bc398a5859 Removed useradd dependency so package works for Amazon Linux 2017-07-27 20:48:57 +00:00
Greg Szabo
4cb362d625 Preparations and fixes for AWS deployments 2017-07-27 20:40:10 +00:00