Commit Graph

392 Commits

Author SHA1 Message Date
Ethan Buchman 76433d9040 little things 2017-12-29 10:28:00 -05:00
Jae Kwon 6b5d08f7da RepeatTimer fix 2017-12-29 10:27:54 -05:00
Ethan Buchman 218acc2224
Merge pull request #107 from tendermint/fix/cmn
Fix/cmn
2017-12-21 16:30:45 -05:00
Ethan Buchman e2d7f1aa41 cmn: fix race 2017-12-21 14:21:15 -05:00
Ethan Buchman b0b740210c cmn: fix repeate timer test with manual ticker 2017-12-21 11:15:17 -05:00
Ethan Buchman a25ed5ba1b cmn: fix race condition in prng 2017-12-21 10:02:25 -05:00
Anton Kaliaev c8ddf156a7
Merge pull request #104 from tendermint/revert-94-feature/timer-refactor
Revert "Refactor throttle timer"
2017-12-19 16:32:21 -06:00
Anton Kaliaev e17e8e425f
Revert "Refactor throttle timer" 2017-12-19 16:23:20 -06:00
Anton Kaliaev be2b0fa31e
Merge pull request #103 from tendermint/revert-95-feature/repeat-timer
Revert "Refactor repeat timer"
2017-12-19 16:22:48 -06:00
Anton Kaliaev 70e30f74e6
Revert "Refactor repeat timer" 2017-12-19 16:16:16 -06:00
Anton Kaliaev 4ddf212286
Merge pull request #100 from tendermint/internal-randSource
common: no more relying on math/rand.DefaultSource
2017-12-19 12:54:54 -06:00
Emmanuel Odeke 8638961f02
common: Rand* warnings about cryptographic unsafety
Lesson articulated by @jaekwon on why we need 80 bits
of entropy at least before we can think of cryptographic
safety. math/rand's seed is a max of 64 bits so can never
be cryptographically secure.

Also added some benchmarks for RandBytes
2017-12-15 22:41:36 -07:00
Emmanuel Odeke cdc7988823
common: use genius simplification of tests from @ebuchman
Massive test simplication for more reliable tests from @ebuchman
2017-12-15 02:14:08 -07:00
Ethan Buchman b5f465b4ec common: use names prng and mrand 2017-12-15 00:23:25 -05:00
Emmanuel Odeke 29471d75cb
common: no more relying on math/rand.DefaultSource
Fixes https://github.com/tendermint/tmlibs/issues/99
Updates https://github.com/tendermint/tendermint/issues/973

Removed usages of math/rand.DefaultSource in favour of our
own source that's seeded with a completely random source
and is safe for use in concurrent in multiple goroutines.
Also extend some functionality that the stdlib exposes such as
* RandPerm
* RandIntn
* RandInt31
* RandInt63

Also added an integration test whose purpose is to be run as
a consistency check to ensure that our results never repeat
hence that our internal PRNG is uniquely seeded each time.
This integration test can be triggered by setting environment variable:
`TENDERMINT_INTEGRATION_TESTS=true`
for example
```shell
TENDERMINT_INTEGRATION_TESTS=true go test
```
2017-12-14 00:18:30 -07:00
Anton Kaliaev a80b66268f
Merge pull request #97 from tendermint/rm-root-flag
remove deprecated --root flag
2017-12-12 23:29:36 -06:00
Anton Kaliaev 541780c6df
uncomment tests 2017-12-12 23:23:49 -06:00
Zach Ramsay f39b575503 remove deprecated --root flag 2017-12-12 16:55:41 +00:00
Ethan Buchman d836ee056d
Merge pull request #96 from tendermint/tm-945
add String method to Query interface
2017-12-10 19:05:00 -05:00
Anton Kaliaev e4ef2835f0
return error if client already subscribed 2017-12-09 23:35:14 -06:00
Anton Kaliaev cb4ba522ef
add String method to Query interface
Required for https://github.com/tendermint/tendermint/issues/945
2017-12-09 23:05:13 -06:00
Anton Kaliaev b49bce2bc3
Merge pull request #95 from tendermint/feature/repeat-timer
Refactor repeat timer
2017-12-08 11:31:27 -06:00
Anton Kaliaev ff2fd63bf7
rename trySend to send 2017-12-08 11:17:07 -06:00
Ethan Frey ec4adf21e0 Cleanup from PR comments 2017-12-08 10:15:26 +01:00
Ethan Frey cc7a87e27c Use Ticker in Repeat again to avoid drift 2017-12-07 11:22:54 +01:00
Ethan Frey 8797197cdf No more blocking on multiple Stop() 2017-12-07 10:38:50 +01:00
Ethan Frey 887d766c86 Refactored RepeatTimer, tests hang 2017-12-07 10:15:38 +01:00
Anton Kaliaev daa6c39dcb
Merge pull request #94 from tendermint/feature/timer-refactor
Refactor throttle timer
2017-12-06 18:58:23 -06:00
Anton Kaliaev 3779310c72
return back output internal channel (way go does with Timer) 2017-12-06 18:48:39 -06:00
Ethan Frey 8b518fadb2 Don't close throttle channel, explain why 2017-12-06 22:28:18 +01:00
Ethan Frey e430d3f844 One more attempt with a read-only channel 2017-12-06 21:51:23 +01:00
Ethan Frey 1ac4c5dd6d Made throttle output non-blocking 2017-12-06 21:20:30 +01:00
Ethan Frey 0a8721113a First pass of PR updates 2017-12-06 21:08:55 +01:00
Ethan Frey 4ec7883891 Cleanup 2017-12-06 11:21:01 +01:00
Ethan Frey dcb4395604 Refactor throttle timer 2017-12-06 11:17:50 +01:00
Ethan Frey 3d9113c16e Add a bit more padding to tests so they pass on osx with -race 2017-12-06 09:18:04 +01:00
Ethan Buchman bfcc0217f1
Merge pull request #93 from tendermint/release/0.5.0
Release/0.5.0
2017-12-06 02:08:29 -05:00
Ethan Buchman e6be03db31 update license and changelog 2017-12-06 02:05:57 -05:00
Anton Kaliaev b166d627f3
bump up version to 0.5.0 2017-12-05 18:04:28 -06:00
Anton Kaliaev 303b6df812
update changelog 2017-12-05 18:04:07 -06:00
Anton Kaliaev 283462dfe4
Merge pull request #86 from tendermint/fix-lint
fix warnings
2017-12-05 17:53:38 -06:00
Anton Kaliaev c325ce2182
use NoErrorf and Errorf functions 2017-12-05 17:49:42 -06:00
Anton Kaliaev 27ab1f6bd9
Merge pull request #90 from tendermint/feature/throttle-timer
test timers
2017-12-05 14:17:41 -06:00
Ethan Frey 26abd65e34 Add tests for repeat timer 2017-12-05 15:01:07 +01:00
Ethan Frey 53cdb6cf82 Demo throttle timer is broken 2017-12-05 14:49:16 +01:00
Petabyte Storage 4769719a4b fix Errorf 2017-12-04 08:54:19 -08:00
Anton Kaliaev d625020c90
Merge pull request #89 from tendermint/license
add license file (Fixes #87) [ci skip]
2017-12-04 10:39:56 -06:00
Anton Kaliaev 3af6044fdf
add license file (Fixes #87) [ci skip] 2017-12-04 10:38:55 -06:00
Petabyte Storage ebc543ebe3 fix warnings 2017-12-01 09:51:37 -08:00
Anton Kaliaev 21fb781989
Merge pull request #84 from tendermint/85-indexing
query#Conditions for indexing
2017-11-29 12:49:38 -06:00