Commit Graph

6254 Commits

Author SHA1 Message Date
a6911825b0 PanicCrisis is deprecated 2017-12-15 13:35:49 -06:00
eddabab5e4 Merge pull request #965 from tendermint/573-handle-corrupt-wal-file
Handle corrupt WAL file
2017-12-15 14:33:16 -05:00
3eee69de2d Merge pull request #954 from tendermint/668-send-absent-validators
Send absent validators
2017-12-15 13:55:52 -05:00
068d83bce8 Merge pull request #677 from tendermint/blockchain-test-store
blockchain: add tests for BlockStore
2017-12-15 13:33:55 -05:00
7f649ccf23 fixes from Frey's review 2017-12-15 12:21:15 -06:00
808b830942 add a unit test
Refs #668
2017-12-15 12:13:02 -06:00
d669816a1b send absent validators in BeginBlock
Refs #668
2017-12-15 12:13:02 -06:00
e40689b9cc PanicCrisis is deprecated 2017-12-15 11:59:45 -06:00
709cf18aef add gofuzz test for consensus wal 2017-12-15 11:56:24 -06:00
e57cad6c3f correct maxMsgSizeBytes 2017-12-15 11:42:53 -06:00
4f94caa1b9 explain what to do in case of truncation [ci skip] 2017-12-15 11:11:21 -06:00
78a682e4b6 blockchain: test fixes 2017-12-15 12:07:48 -05:00
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
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
b5f465b4ec common: use names prng and mrand 2017-12-15 00:23:25 -05:00
21d030dbfb Merge pull request #975 from tendermint/974-fix-test-in-develop
add missing Timestamp to Vote
2017-12-14 09:22:11 -05:00
eb6d412a82 Add tests to protobuf objects for pr coverage 2017-12-14 09:35:33 +01:00
9c5e1a824d Updated naming of EndBlock parameters
* Changes -> Updates for validators
* ConsensusParams.XXXParams -> ConsensusParams.XXX
* As per feedback from Jae on PR
2017-12-14 09:27:20 +01:00
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
6680240fbe Coin changes, config changes 2017-12-14 01:06:45 -05:00
72da553ed9 add missing Timestamp to Vote
Fixes #974
2017-12-13 22:24:06 -06:00
a2f7898b6d db: fix c and go iterators 2017-12-13 22:28:37 -05:00
d4aeca8ce3 fixes from @melekes 2017-12-13 20:11:11 -05:00
b78606d94f Merge pull request #967 from tendermint/feature/total-tx
Add TotalTx to block header
2017-12-13 17:09:48 -06:00
a6f719a402 Add tests for block validation 2017-12-13 19:54:16 +01:00
e0fbd148ef Merge pull request #958 from tendermint/pex-on-by-default
activate PEX reactor by default
2017-12-13 12:52:17 -06:00
2f91289880 update changelog [ci skip] 2017-12-13 12:26:12 -06:00
462b755a60 activate PEX reactor by default 2017-12-13 12:25:48 -06:00
0a2ecaa393 Merge pull request #953 from tendermint/feature/time-fields
Add Timestamp to Proposal/Vote
2017-12-13 12:18:55 -06:00
895e14d6bd Update Diffs to Changes, fix README 2017-12-13 17:57:43 +01:00
25f6f6518c Update the ResponseEndBlock values
* Rename diffs -> changes
* Add consensus_param_changes

For context, see:
https://github.com/tendermint/tendermint/issues/924
https://github.com/tendermint/tendermint/issues/952
2017-12-13 17:50:24 +01:00
85710237fd Fabo coin 2017-12-13 10:25:23 -05:00
dedf03bb81 Add TotalTx to block header, issue #952
Update state to keep track of this info.
Change function args as needed.
Make NumTx also an int64 for consistency.
2017-12-13 12:20:53 +01:00
318982c0ba checkKeyCondition -> IsKeyInDomain 2017-12-13 01:34:00 -05:00
a80b66268f Merge pull request #97 from tendermint/rm-root-flag
remove deprecated --root flag
2017-12-12 23:29:36 -06:00
541780c6df uncomment tests 2017-12-12 23:23:49 -06:00
c532e8cabc add \n to Printf lines 2017-12-12 22:44:55 -06:00
5636a02d03 Remove GetError() from Iterator 2017-12-12 19:19:26 -08:00
edf07760d6 db: fsdb iterator 2017-12-12 21:08:38 -05:00
bcacaf164b db: cleveldb iterator 2017-12-12 20:58:35 -05:00
3e5dbef6a2 db: goleveldb iterator 2017-12-12 20:38:03 -05:00
39e40ff5ce db: memdb iterator 2017-12-12 20:06:50 -05:00
bb115d4d61 cleanupDBDir 2017-12-12 19:28:52 -05:00
bbc3b807c6 all: fix vet issues with build tags, formatting
* Build tags need to come before the package name
and have at least a blank line, between them and
the package, please see
  https://golang.org/pkg/go/build/#hdr-Build_Constraints
* fmt.Println doesn't take formatting verbs
* Fix a missing formatting argument to fmt.Printf
2017-12-12 17:23:16 -07:00
ba8c5045b5 db: fixes to fsdb and clevledb 2017-12-12 19:22:08 -05:00
c547caf04f db: some test cleanup 2017-12-12 19:08:22 -05:00
5ea42475ce cmd/abci-cli: implement batch
Can now run batch which can be tested by:
```shell
echo -e "echo foo\necho blue" | abci-cli batch
```

giving
```shell
I[12-12|07:55:55.513] Starting socketClient
module=abci-client impl=socketClient
-> code: OK
-> data: foo
-> data.hex: 0x666F6F

-> code: OK
-> data: blue
-> data.hex: 0x626C7565

```
2017-12-12 16:57:51 -07:00
cabc516726 batch: progress 2017-12-12 16:57:51 -07:00
ecc13d5a8e cmd/abci-cli: use a single connection per session
Use the single client connection at startup time
for sending over commands instead of shelling out
for every command.
This code fixes the regression from
https://github.com/tendermint/abci/pull/117
which instead used "os/exec".Command with:
    "abci-cli <the_command> [args...]"

The purpose of this code is to restore us
back to the state after cobra replace urlfave/cli.
There is still a bit of work to implement Batch
itself, but that should be simpler as a focused
command.

Fixes #133
2017-12-12 16:57:51 -07:00
5b7f90dfb2 db: test panic on nil key 2017-12-12 18:42:47 -05:00