7466 Commits

Author SHA1 Message Date
Ethan Buchman
51dc810d04
Merge pull request #4009 from tendermint/release/v0.32.4
Release/v0.32.4
2019-09-21 11:12:17 -04:00
Marko
0d13736ace address pr comments in #4002 (#4004) 2019-09-19 12:24:17 -04:00
Marko
bf989eb272 fix linting (#4000) 2019-09-19 09:31:28 -04:00
Marko Baricevic
b3b30a5e70
Merge branch 'master' into rc1-v0.32.4 2019-09-19 14:11:06 +02:00
dependabot-preview[bot]
8fbc62563e build(deps): bump github.com/tendermint/tm-db from 0.1.1 to 0.2.0 (#4001)
Bumps [github.com/tendermint/tm-db](https://github.com/tendermint/tm-db) from 0.1.1 to 0.2.0.
- [Release notes](https://github.com/tendermint/tm-db/releases)
- [Changelog](https://github.com/tendermint/tm-db/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tendermint/tm-db/compare/v0.1.1...v0.2.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-19 14:09:42 +02:00
Marko Baricevic
049f158465
revert abci change 2019-09-19 14:08:49 +02:00
Marko Baricevic
a5a19add77
bump versions 2019-09-19 11:51:51 +02:00
Marko Baricevic
fce61cc51c
pr suggestions 2019-09-19 11:03:39 +02:00
Marko Baricevic
0116c8113b
RC1 - 0.32.4
- Release candidate for v0.32.4

Signed-off-by: Marko Baricevic <marbar3778@yahoo.com>
2019-09-19 10:53:15 +02:00
Anton Kaliaev
4dfbaeb0c4
regenerate protobuf files with newer gogo version (#3998)
protoc 3.7.0
gogo v1.3.0
2019-09-19 11:41:57 +03:00
Sean Braithwaite
abab49089d
Merge pull request #3878 from tendermint/brapse/blockchain-v2-riri-routine
[blockchain] v2 Routines
2019-09-18 16:06:56 -04:00
Sean Braithwaite
fc77f8faf3 Merge branch 'brapse/blockchain-v2-riri-routine' of https://github.com/tendermint/tendermint into brapse/blockchain-v2-riri-routine 2019-09-18 16:00:07 -04:00
Sean Braithwaite
2ae7a300b7 merge artifact go build file 2019-09-18 15:59:51 -04:00
Sean Braithwaite
211bd64355
Merge branch 'master' into brapse/blockchain-v2-riri-routine 2019-09-18 15:46:29 -04:00
Sean Braithwaite
0cbf32de97 merge fix 2019-09-18 15:22:24 -04:00
Gustavo Chaín
2c7f42fafa fix Header misalignment in StringIndent (#3996) 2019-09-18 14:10:00 +02:00
Marko
1b54369f41 custom marshallers for proto types, which EmitDefaults (#3889)
* Remove omitempty from *pb.go

- remove omitempty from *pb.go files
- added command to makefile for everytime `make protoc_all` is run

- open question:
  - Do we want to further remove omitempty from other places
	- https://github.com/tendermint/tendermint/blob/master/rpc/lib/types/types.go#L151
	- and other places
ref #3882

Signed-off-by: Marko Baricevic <marbar3778@yahoo.com>

* bring back omitempty to *pb.go

* Update types/tx.go

* custom marshlers

* undo benchmark `omitepmty`

* golangci lint fix

* cleanup comments

* changelog_pending entry
2019-09-18 12:32:50 +03:00
Marko
98b91ce2a2 tm-bench: add deprecation warning (#3992)
- Added a deprecation warining in for deprecation of tm-bench in favor of tm-load-test

- With the merging of this pr we can close tm-bench related issues.

Signed-off-by: Marko Baricevic <marbar3778@yahoo.com>
2019-09-18 12:04:40 +03:00
Marko
9d4a480f54 makefile: minor cleanup (#3994)
- goimports is not used as a tool anymore
	- correct me if wrong
- rename devtools folder to merely tools.mk
- remove slate_header.txt

Signed-off-by: Marko Baricevic <marbar3778@yahoo.com>
2019-09-18 11:45:03 +03:00
Sean Braithwaite
ffb066777e
Merge branch 'master' into brapse/blockchain-v2-riri-routine 2019-09-17 17:47:20 -04:00
Sean Braithwaite
d3d034e572 tidying 2019-09-17 15:18:15 -04:00
Marko
45ddd67bd6
Add MempoolClient to Client Interface (#3987)
* Add MempoolClient to Client Interface

closes #3984

- add mempoolclient interface to client interface

Signed-off-by: Marko Baricevic <marbar3778@yahoo.com>

* Update CHANGELOG_PENDING.md

* add golang-ci version
2019-09-16 11:26:13 +02:00
Marko
522a849ba9
get_tools = tools (#3988)
- in the makefile update `get_tools` was changed to just `tools`

Signed-off-by: Marko Baricevic <marbar3778@yahoo.com>
2019-09-16 10:46:10 +02:00
Sean Braithwaite
99b7a33f90 align buffer sizes 2019-09-14 13:01:19 -04:00
Sean Braithwaite
822942a2e4 better debugging logging 2019-09-14 12:49:10 -04:00
Sean Braithwaite
9bd2c0389f rename trySend to end 2019-09-13 18:54:25 -04:00
Sean Braithwaite
fbede85e20 changes based on feedback 2019-09-13 18:36:02 -04:00
Marko
21d46dea93
Update Makefile (#3949)
* Update makefile

- these two files were taken from the sdk with adjustments for usage in TM

Signed-off-by: Marko Baricevic <marbar3778@yahoo.com>

* .phony

* remove slate

* more tools

* circleci update 1/2

* fixed typo

* fixed bash error

* '<<' must be escaped in 2.1

* fixed invalid config

* removed golangci-lint from tools. runs as github app now

* one more issue in Circle config

* some more work on the Circle config

* minor changes

* fiddling with restore cache config

* fiddling with restore cache config

* added commands in circle config. makefile changes

* bash shenannigans

* bash shenannigans

* fighting the config demons

* fighting the config demons, v2

* fighting the config demons, v3

* updating p2p dockerfile

* updating p2p dockerfile

* updating p2p test

* updating p2p test

* testing circle config

* testing circle config

* remove dontcover command

* its the weekend, custom docker image
2019-09-13 18:52:35 +02:00
Sean Braithwaite
e7ee314c99 Subsume the demuxer into the reactor
+ Simplify the design by demuxing events directly in the reactor
2019-09-13 11:33:38 -04:00
Tess Rinearson
7e0b64e8b0 types: add test for block commits with votes for the wrong blockID (#3936)
* types: add test for block commits with votes for the wrong blockID

* remove

* respond to feedback

* verify the commits as well

* testing table

* Update types/block_test.go

Co-Authored-By: Bot from GolangCI <42910462+golangcibot@users.noreply.github.com>

* Update types/block_test.go

Co-Authored-By: Bot from GolangCI <42910462+golangcibot@users.noreply.github.com>

* gofmt

* test panic case
2019-09-12 17:59:41 -04:00
Sean Braithwaite
c62b7fbd7e feedback tweaks 2019-09-12 12:50:25 -04:00
dependabot-preview[bot]
9f80c8e1c5 deps: bump google.golang.org/grpc from 1.23.0 to 1.23.1 (#3982)
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.23.0 to 1.23.1.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.23.0...v1.23.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-12 20:08:50 +04:00
Sean Braithwaite
5474528db1 Switch to a priority queue:
* Routines will now use a priority queue instead of channels to
    iterate over events
2019-09-12 12:06:26 -04:00
Ethan Buchman
fc1c37c4ac Update ADR-025 and mark it as Accepted (#3958)
* update adr-025, mark accepted

* minor update

* Update docs/architecture/adr-025-commit.md

Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com>
2019-09-11 16:10:07 +02:00
Thane Thomson
9c82780742 Add cleveldb build for Amazon Linux (#3976)
* Add cleveldb build for Amazon Linux

In attempting to build Tendermint binaries with cleveldb support that we
can use for load testing (see https://github.com/interchainio/got), it
became apparent that we need a bit of a simpler build process for this
kind of executable. Since we're basing our load testing infrastructure
on Amazon Linux, it makes sense to support such a build process for
Amazon Linux in a platform-independent way.

This PR allows one to simply build the Amazon Linux-compatible binary
using Docker on one's local machine. It first builds an Amazon
Linux-based build image with Go v1.12.9, and then it uses that image to
build the cleveldb version of Tendermint.

This should, in theory, be compatible with CentOS too, but that's yet to
be tested.

* Add comment describing the new Makefile target

* Add missing PHONY entry for new Makefile target

* Expand on Makefile comment
2019-09-11 11:29:27 +02:00
Phil Salant
d1d517a9b7 linters: enable scopelint (#3963)
* Pin range scope vars

* Don't disable scopelint

This PR repairs linter errors seen when running the following commands:
golangci-lint run --no-config --disable-all=true --enable=scopelint

Contributes to #3262
2019-09-11 09:15:18 +04:00
Shivani Joshi
961e1d360f docs/guides: specify a fix for badger err on Windows (#3974)
* Added badger error for Windows

* Update go-built-in.md

* Update docs/guides/go-built-in.md

Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com>

* Update docs/guides/go.md

Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com>

When restarting the app, it throws an error saying that it requires truncation of badger value log because it is corrupted. This seems to be an issue with badger DB and it is reported here. It solves the problem when you set the truncate value to true, but this obviously results in loss of data. I am not sure if this is a concern or not. However, it'd great if this could be documented for Windows users!

Fixes #3954
2019-09-10 23:19:33 +04:00
Anton Kaliaev
777ff271cb
enable unconvert, goconst and nakedret linters (#3973)
This should've been a part of
https://github.com/tendermint/tendermint/pull/3960, but I forgot about
it while reviewing.

A good programmer is someone who always looks both ways before crossing
a one-way street. - Doug Linder
2019-09-10 21:58:17 +04:00
Jon
2edd89b450 mempool: fix memory loading error on 32-bit machines (#3969)
* Correct memory alignment for 32-bit machine. 

Switching the `txsBytes` and `rechecking` fields of `CListMempool` to ensure the correct memory alignment for `atomic.LoadInt64` on 32-bit machine.

* Update CHANGELOG_PENDING.md for #3968

Fixed #3968 `mempool` Memory Loading Error on 32-bit Ubuntu 16.04 Machine.

* Update CHANGELOG_PENDING.md

Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com>
2019-09-10 16:51:19 +04:00
Anton Kaliaev
c4294bd4d7
cs: check for SkipTimeoutCommit or wait timeout in handleTxsAvailable (#3928)
* cs: check for SkipTimeoutCommit or wait timeout in handleTxsAvailable

Previously, if create_empty_blocks was set to false, TM sometimes could
create 2 consecutive blocks without actually waiting for timeoutCommit
(1 sec. by default).

```
I[2019-08-29|07:32:43.874] Executed block                               module=state height=47 validTxs=10 invalidTxs=0
I[2019-08-29|07:32:43.876] Committed state                              module=state height=47 txs=10 appHash=F88C010000000000
I[2019-08-29|07:32:44.885] Executed block                               module=state height=48 validTxs=2 invalidTxs=0
I[2019-08-29|07:32:44.887] Committed state                              module=state height=48 txs=2 appHash=FC8C010000000000
I[2019-08-29|07:32:44.908] Executed block                               module=state height=49 validTxs=8 invalidTxs=0
I[2019-08-29|07:32:44.909] Committed state                              module=state height=49 txs=8 appHash=8C8D010000000000
I[2019-08-29|07:32:45.886] Executed block                               module=state height=50 validTxs=2 invalidTxs=0
I[2019-08-29|07:32:45.895] Committed state                              module=state height=50 txs=2 appHash=908D010000000000
I[2019-08-29|07:32:45.908] Executed block                               module=state height=51 validTxs=8 invalidTxs=0
I[2019-08-29|07:32:45.909] Committed state                              module=state height=51 txs=8 appHash=A08D010000000000
```

This commit fixes that by adding a check to handleTxsAvailable.

Fixes #3908

* update changelog

* schedule timeoutCommit if StartTime is in the future

or SkipTimeoutCommit=true && we DON'T have all the votes

* fix TestReactorCreatesBlockWhenEmptyBlocksFalse

by checking if we have LastCommit or not

* address Ethan's comments
2019-09-10 16:38:37 +04:00
Phil Salant
04d13d9945 fix linter errors thrown by unconvert, goconst, and nakedret (#3960)
* Remove unnecessary type conversions

* Consolidate repeated strings into consts

* Clothe return statements

* Update blockchain/v1/reactor_fsm_test.go

Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com>

This PR repairs linter errors seen when running the following commands:
golangci-lint run --no-config --disable-all=true --enable=unconvert
golangci-lint run --no-config --disable-all=true --enable=goconst
golangci-lint run --no-config --disable-all=true --enable=nakedret

Contributes to #3262
2019-09-10 11:31:44 +04:00
Mircea Colonescu
7f0c55f249 ran go mod tidy (#3967) 2019-09-10 08:56:16 +02:00
Michael Booth
22000c6a09 Zm fork accountability (#3840)
* Add fork scenarios

* Add more details about varios attack cases

* added more structure to the attack scenarios

* Update docs/spec/consensus/fork-accountability.md

Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com>

* Update docs/spec/consensus/fork-accountability.md

Co-Authored-By: Anca Zamfir <ancazamfir@users.noreply.github.com>

* Update docs/spec/consensus/fork-accountability.md

Co-Authored-By: Anca Zamfir <ancazamfir@users.noreply.github.com>

* Update docs/spec/consensus/fork-accountability.md

Co-Authored-By: Anca Zamfir <ancazamfir@users.noreply.github.com>

* Update docs/spec/consensus/fork-accountability.md

Co-Authored-By: Anca Zamfir <ancazamfir@users.noreply.github.com>

* Update docs/spec/consensus/fork-accountability.md

Co-Authored-By: Anca Zamfir <ancazamfir@users.noreply.github.com>

* Update docs/spec/consensus/fork-accountability.md

Co-Authored-By: Anca Zamfir <ancazamfir@users.noreply.github.com>

* Update docs/spec/consensus/fork-accountability.md

Co-Authored-By: Anca Zamfir <ancazamfir@users.noreply.github.com>

* Update docs/spec/consensus/fork-accountability.md

Co-Authored-By: Anca Zamfir <ancazamfir@users.noreply.github.com>

* consensus properties explained

* added question on conflicting proposals

* misbehavior

* misbehave

* more misbehavior

* table discussion

* Add few clarifications
2019-09-06 19:45:49 +02:00
gracenoah
aa721b972f rpc: allow using a custom http client in rpc client (#3779)
fixes #2010

* allow using a custom http client in rpc client

* add tests and fix bug

* fix confusion between remote and address

* parse remote inside NewJSONRPCClientWithHTTPClient

* cleanups

* add warnings

* add changelog entry

* Update CHANGELOG_PENDING.md

Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com>
2019-09-05 17:13:22 +04:00
dependabot-preview[bot]
72285115ec deps: bump github.com/go-kit/kit from 0.6.0 to 0.9.0 (#3952)
Bumps [github.com/go-kit/kit](https://github.com/go-kit/kit) from 0.6.0 to 0.9.0.
- [Release notes](https://github.com/go-kit/kit/releases)
- [Commits](https://github.com/go-kit/kit/compare/v0.6.0...v0.9.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-05 12:34:28 +04:00
dependabot-preview[bot]
c8ae619f1b deps: bump github.com/stretchr/testify from 1.3.0 to 1.4.0 (#3951)
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.3.0 to 1.4.0.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.3.0...v1.4.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-05 12:25:17 +04:00
Marko
4ba49a4236 deps: bump viper to 1.4.0 and logfmt to 0.4.0 (#3950)
- depndabot couldnt update a few deps as they needed to beupdated together.
- PRs: #3946, 3938 can be closed with this PR

Signedoff-by: Marko Baricevic <marbar3778@yahoo.com>
2019-09-05 11:56:32 +04:00
dependabot-preview[bot]
af66d8c9d8 deps: bump github.com/gorilla/websocket from 1.2.0 to 1.4.1 (#3945)
Bumps [github.com/gorilla/websocket](https://github.com/gorilla/websocket) from 1.2.0 to 1.4.1.
- [Release notes](https://github.com/gorilla/websocket/releases)
- [Commits](https://github.com/gorilla/websocket/compare/v1.2.0...v1.4.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-05 10:42:19 +04:00
dependabot-preview[bot]
e1e4ef4abf deps: bump google.golang.org/grpc from 1.22.0 to 1.23.0 (#3942)
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.22.0 to 1.23.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.22.0...v1.23.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-05 10:32:00 +04:00
dependabot-preview[bot]
39ff9b8ee9 deps: bump github.com/libp2p/go-buffer-pool from 0.0.1 to 0.0.2 (#3948)
Bumps [github.com/libp2p/go-buffer-pool](https://github.com/libp2p/go-buffer-pool) from 0.0.1 to 0.0.2.
- [Release notes](https://github.com/libp2p/go-buffer-pool/releases)
- [Commits](https://github.com/libp2p/go-buffer-pool/compare/v0.0.1...v0.0.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-05 10:13:02 +04:00