Jae Kwon
ca56a274bd
Nil bytes are OK for Get/Set etc
...
And s/Release/Close/g
2017-12-19 20:36:37 -08: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
Jae Kwon
4ce8448d7f
Nil keys are OK, deprecate BeginningKey/EndingKey ( #101 )
...
* Nil keys are OK, deprecate BeginningKey/EndingKey
2017-12-17 13:11:28 -08:00
Jae Kwon
aab2d70dd3
Sdk2 kvpair ( #102 )
...
* Canonical KVPair in common
* Simplify common/Bytes to just hex encode
2017-12-17 13:04:15 -08: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
Ethan Buchman
e3bffd8fbd
readme
2017-12-16 00:04:06 -05:00
Ethan Buchman
9226659413
Merge pull request #98 from tendermint/sdk2-iterator
...
Sdk2 iterator
2017-12-15 15:58:48 -05:00
Ethan Buchman
66b0e8fa2d
fix c level db iterator
2017-12-15 15:58:23 -05:00
Ethan Buchman
225eace316
dont run metalinter on circle ...
2017-12-15 15:14:48 -05:00
Emmanuel Odeke
a7b20d4e46
db: Simplify exists check, fix IsKeyInDomain signature, Iterator Close
...
+ *FSDB.HasKey now uses common.FileExists to test for file existence
+ IsKeyInDomain takes key as a []byte slice instead of as a string
to avoid extraneous []byte<-->string conversions for start and end
+ Iterator.Close() instead of Iterator.Release()
+ withDB helper to encapsulate DB creation, deferred cleanups
so that for loops can use opened DBs and discard them ASAP
Addressing accepted changes from review with @jaekwon
2017-12-15 02:58:51 -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
Ethan Buchman
a2f7898b6d
db: fix c and go iterators
2017-12-13 22:28:37 -05:00
Ethan Buchman
d4aeca8ce3
fixes from @melekes
2017-12-13 20:11:11 -05:00
Ethan Buchman
318982c0ba
checkKeyCondition -> IsKeyInDomain
2017-12-13 01:34:00 -05: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
Jae Kwon
5636a02d03
Remove GetError() from Iterator
2017-12-12 19:19:26 -08:00
Ethan Buchman
edf07760d6
db: fsdb iterator
2017-12-12 21:08:38 -05:00
Ethan Buchman
bcacaf164b
db: cleveldb iterator
2017-12-12 20:58:35 -05:00
Ethan Buchman
3e5dbef6a2
db: goleveldb iterator
2017-12-12 20:38:03 -05:00
Ethan Buchman
39e40ff5ce
db: memdb iterator
2017-12-12 20:06:50 -05:00
Ethan Buchman
bb115d4d61
cleanupDBDir
2017-12-12 19:28:52 -05:00
Ethan Buchman
ba8c5045b5
db: fixes to fsdb and clevledb
2017-12-12 19:22:08 -05:00
Ethan Buchman
c547caf04f
db: some test cleanup
2017-12-12 19:08:22 -05:00
Ethan Buchman
5b7f90dfb2
db: test panic on nil key
2017-12-12 18:42:47 -05:00
Ethan Buchman
781f6c5d22
db: some comments in types.go
2017-12-12 18:04:05 -05:00
Jae Kwon
7f650cea86
Remove Prev from Iterator
2017-12-12 14:45:31 -08:00
Jae Kwon
0d03cd9e31
Make it compile
2017-12-12 14:00:03 -08:00
Jae Kwon
50a30aafc1
New canonical Iterator
2017-12-12 12:44:47 -08: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
Jae Kwon
a0b692c86d
Add PushBytes to Heap
2017-12-10 14:23:27 -08:00
Jae Kwon
03dfb724c7
Change heap.Push to mean int priority
2017-12-10 10:18:35 -08: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
Jae Kwon
988e190ef7
Deprecated Panic*
2017-12-09 09:26:03 -08: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