28 Commits

Author SHA1 Message Date
dependabot-preview[bot]
a81aa14b06 deps: bump google.golang.org/grpc from 1.23.1 to 1.24.0 (#4021)
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.23.1 to 1.24.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.23.1...v1.24.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-26 17:58:30 -07: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
Sean Braithwaite
ffb066777e
Merge branch 'master' into brapse/blockchain-v2-riri-routine 2019-09-17 17:47:20 -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
Mircea Colonescu
7f0c55f249 ran go mod tidy (#3967) 2019-09-10 08:56:16 +02: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
dependabot-preview[bot]
a12eeeff62 deps: bump github.com/fortytw2/leaktest from 1.2.0 to 1.3.0 (#3943)
Bumps [github.com/fortytw2/leaktest](https://github.com/fortytw2/leaktest) from 1.2.0 to 1.3.0.
- [Release notes](https://github.com/fortytw2/leaktest/releases)
- [Commits](https://github.com/fortytw2/leaktest/compare/v1.2.0...v1.3.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-04 21:06:48 +04:00
dependabot-preview[bot]
5a1e326577 deps: bump github.com/rs/cors from 1.6.0 to 1.7.0 (#3939)
Bumps [github.com/rs/cors](https://github.com/rs/cors) from 1.6.0 to 1.7.0.
- [Release notes](https://github.com/rs/cors/releases)
- [Commits](https://github.com/rs/cors/compare/v1.6.0...v1.7.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-04 20:33:29 +04:00
dependabot-preview[bot]
482cb62cf5 deps: bump github.com/magiconair/properties from 1.8.0 to 1.8.1 (#3937)
Bumps [github.com/magiconair/properties](https://github.com/magiconair/properties) from 1.8.0 to 1.8.1.
- [Release notes](https://github.com/magiconair/properties/releases)
- [Changelog](https://github.com/magiconair/properties/blob/master/CHANGELOG.md)
- [Commits](https://github.com/magiconair/properties/compare/v1.8.0...v1.8.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-04 20:12:26 +04:00
Anton Kaliaev
fe2dddd3fe
deps: update gogo/protobuf version from v1.2.1 to v1.3.0 (#3947)
* update gogo/protobuf version from v1.2.1 to v1.3.0

Also errcheck from v1.1.0 to v1.2.0

See full diff in
- https://github.com/gogo/protobuf/compare/v1.2.1...v1.3.0
- https://github.com/kisielk/errcheck/compare/v1.1.0...v1.2.0

Changelog:

Tested versions:

go 1.12.9
protoc 3.7.1
Improvements:

    plugin/stringer - Handle repeated and/or nullable types a bit better now.
    plugin/size - Remove the loop in sovXXX by using bit twiddling.
        Thanks: https://github.com/apelisse
    plugin/marshalto - Implemented a reverse marshal strategy which allows for faster marshalling. This now avoids a recursive (and repeated) call to Size().
        Thanks: https://github.com/apelisse
    plugin/compare - Added support for for oneof types.

Bug fixes:

    protoc-gen-gogo/generator - Fix assignment to entry in nil map.
        Thanks: https://github.com/tgulacsi
    protoc-gen-gogo/generator - Allows plugins to call RecordTypeUse without panicking.
        Thanks: https://github.com/fedenusy
    proto/extensions - Fixed set extension regression. We did not clear the extensions before setting.
    io/uint32 - fix uint32reader bug that causes ReadMsg to recreate buffer when lengths are the same.
        Thanks: https://github.com/SebiSujar
    proto/table_merge: Fix merge of non-nullable slices.
        Thanks: https://github.com/euroelessar

Upstream commits:

    merged in golang/protobuf commit 318d17de72747ed1c16502681db4b2bb709a92d0 - Add UnimplementedServer for server interface
    merged in golang/protobuf commit b85cd75de734650db18a99a943fe351d41387800 - protoc-gen-go/grpc: inline errUnimplemented function
    merged in golang/protobuf commit d3c38a4eb4970272b87a425ae00ccc4548e2f9bb - protoc-gen-go/grpc: use status and code packages only if needed
    merged in golang/protobuf commit e91709a02e0e8ff8b86b7aa913fdc9ae9498e825 - fix indentation in jsonpb with Any messages
    merged in golang/protobuf commit 8d0c54c1246661d9a51ca0ba455d22116d485eaa - protoc-gen-go: generate XXX_OneofWrappers instead of XXX_OneofFuncs

Misc:

    extensions.md - Markdown update.
        Thanks: https://github.com/TennyZhuang
    Readme.md - Added user.
    go/protoc update - Updated to go1.12.x and protoc 3.7.1
    Makefile update - fix go vet shadow tool reference
    test/mixbench - Update mixbench tool. Expose runnable benchmarks via flags.

* update certstrap

* update golangci-lint from v1.13.2 to v1.17.1

* update gox as well

* test

* comment out golangci temporary

* comment out go-deadlock deps
2019-09-04 19:58:43 +04:00
Karoly Albert Szabo
ead3eefe5b [RPC] Static swagger (#3880)
* manually swagging

Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com>

* three definitions with polymorphism

Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com>

* added blockchain and block

Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com>

* low quality generation, commit, block_response and validators

Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com>

* genesis and consensus states endpoints

Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com>

* fix indentation

Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com>

* consensus parameters

Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com>

* fix indentation

Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com>

* add height to consensus parameters endpoint

Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com>

* unconfirmed_txs and num_unconfirmed_txs

Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com>

* add missing query parameter

Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com>

* add ABCI queries

Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com>

* added index document for swagger documentation

Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com>

* add missing routes

Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com>

* contract tests added on CCI

Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com>

* contract tests job should be in the test suite

Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com>

* simplify requirements to test

Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com>

* typo

Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com>

* build is a prerequisite to start localnet

Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com>

* reduce nodejs size, move goodman to get_tools, add docs, fix comments

Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com>

* Update scripts/get_tools.sh

That's cleaner, thanks!

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

* xz not supported by cci image, let's keep it simple

Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com>

* REMOVE-indirect debug of CCI paths

Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com>

* dirty experiment, volume is empty but binary has been produced

Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com>

* dirty experiment, volume is empty but binary has been produced

Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com>

* dirty experiment going on

Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com>

* locally works, CCI have difficulties with second layaer containers volumes

Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com>

* restore experiment, use machine instead of docker for contract tests

Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com>

* simplify a bit

Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com>

* rollback on machine golang

Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com>

* Document the changes

Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com>

* Changelog

Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com>

* comments

Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com>
2019-08-16 11:29:01 +02:00
Marko
f9cce282da gocritic (2/2) (#3864)
Refs #3262
2019-08-02 10:53:52 +04:00
Marko
f3ab967a46
version tmdb (#3854) 2019-07-31 16:17:09 +02:00
Marko
a1eb2f6c6b
tm-cmn to tm-db (#3850)
* tm-cmn to tm-db

* go.mod changes

* go.mod changes

* more go.mod

* fix tm-db

* ci fix, pending change
2019-07-31 11:34:17 +02:00
Marko
98cb8c9783 add staticcheck linting (#3828)
cleanup to add linter

    grpc change:
        https://godoc.org/google.golang.org/grpc#WithContextDialer
        https://godoc.org/google.golang.org/grpc#WithDialer
        grpc/grpc-go#2627
    prometheous change:
        due to UninstrumentedHandler, being deprecated in the future
    empty branch = empty if or else statement
        didn't delete them entirely but commented
        couldn't find a reason to have them
    could not replicate the issue #3406
        but if want to keep it commented then we should comment out the if statement as well
2019-07-25 09:35:30 +04:00
Anca Zamfir
4d7cd8055b blockchain: Reorg reactor (#3561)
* go routines in blockchain reactor

* Added reference to the go routine diagram

* Initial commit

* cleanup

* Undo testing_logger change, committed by mistake

* Fix the test loggers

* pulled some fsm code into pool.go

* added pool tests

* changes to the design

added block requests under peer

moved the request trigger in the reactor poolRoutine, triggered now by a ticker

in general moved everything required for making block requests smarter in the poolRoutine

added a simple map of heights to keep track of what will need to be requested next

added a few more tests

* send errors to FSM in a different channel than blocks

send errors (RemovePeer) from switch on a different channel than the
one receiving blocks
renamed channels
added more pool tests

* more pool tests

* lint errors

* more tests

* more tests

* switch fast sync to new implementation

* fixed data race in tests

* cleanup

* finished fsm tests

* address golangci comments :)

* address golangci comments :)

* Added timeout on next block needed to advance

* updating docs and cleanup

* fix issue in test from previous cleanup

* cleanup

* Added termination scenarios, tests and more cleanup

* small fixes to adr, comments and cleanup

* Fix bug in sendRequest()

If we tried to send a request to a peer not present in the switch, a
missing continue statement caused the request to be blackholed in a peer
that was removed and never retried.

While this bug was manifesting, the reactor kept asking for other
blocks that would be stored and never consumed. Added the number of
unconsumed blocks in the math for requesting blocks ahead of current
processing height so eventually there will be no more blocks requested
until the already received ones are consumed.

* remove bpPeer's didTimeout field

* Use distinct err codes for peer timeout and FSM timeouts

* Don't allow peers to update with lower height

* review comments from Ethan and Zarko

* some cleanup, renaming, comments

* Move block execution in separate goroutine

* Remove pool's numPending

* review comments

* fix lint, remove old blockchain reactor and duplicates in fsm tests

* small reorg around peer after review comments

* add the reactor spec

* verify block only once

* review comments

* change to int for max number of pending requests

* cleanup and godoc

* Add configuration flag fast sync version

* golangci fixes

* fix config template

* move both reactor versions under blockchain

* cleanup, golint, renaming stuff

* updated documentation, fixed more golint warnings

* integrate with behavior package

* sync with master

* gofmt

* add changelog_pending entry

* move to improvments

* suggestion to changelog entry
2019-07-23 10:58:52 +02:00
zjubfd
657832a95a p2p/conn: Add Bufferpool (#3664)
* use byte buffer pool to decreass allocs

* wrap to put buffer in defer

* wapper defer

* add dependency

* remove Gopkg,*

* add change log
2019-07-22 09:37:41 +02:00
Marko
816dfce8fe libs: Remove db from tendermint in favor of tendermint/tm-cmn (#3811)
* Remove db from tendemrint in favor of tendermint/tm-cmn

- remove db from `libs`
- update dependancy, there have been no breaking changes in the updated deps
	- https://github.com/grpc/grpc-go/releases
	- https://github.com/golang/protobuf/releases

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

* changelog add

* gofmt

* more gofmt
2019-07-19 09:54:45 +04:00
Aditya
e7ac73177e upgrade go.mod (#3793)
upgrade levelDB to latest master
2019-07-12 19:29:36 +02:00
Marko
4c4bf0f131 Added flags '-s -w' to buildflags (#3742)
* Added flags '-s -w' to buildflags

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

* added a condition for no strip

* minor changes

* on call discussions

* on call discussion v2
2019-06-24 10:32:24 -04:00
Marko
866b343c0c Changes to files that had linting issue (#3731)
- Govet issues fixed
- 1 gosec issue solved using nolint

Signed-off-by: Marko Baricevic <marbar3778@yahoo.com>
2019-06-21 09:58:32 +04:00
Jack Zampolin
8b7ca8fd99 switch to go mod (#3613)
* Update to using go mod from dep

* Remove references to make get_vendor_deps

* Specify go version

* Set GO111MODULE=on and add -mod=readonly

* Fix exported env

* switch to using go1.12 everywhere

* Fix test scripts

* Typo:

* Prepend GO111MODULE=on

* remove dep cache

* Revert "remove dep cache"

This reverts commit 45117bda

Signed-off-by: Ismail Khoffi <Ismail.Khoffi@gmail.com>

* bring back the dependency cache and change it to cache modules instead
of vendored deps; also:

 - bump version for dependency cache
 - bump version on pkg-cache (includes modules directory)

Signed-off-by: Ismail Khoffi <Ismail.Khoffi@gmail.com>

* remove some more traces of dep:
 - remove Gopkg.(toml | lock)
 - update contributing guidlines
 - set global default in circleci (GO111MODULE=on)

Signed-off-by: Ismail Khoffi <Ismail.Khoffi@gmail.com>

* global var failed for `test_cover` with
`go: unknown environment setting GO111MODULE=true`
although the var was `GO111MODULE: on`

Signed-off-by: Ismail Khoffi <Ismail.Khoffi@gmail.com>

* Changelog pending entry

Signed-off-by: Ismail Khoffi <Ismail.Khoffi@gmail.com>

* Add bbolt dependency to go.mod

Signed-off-by: Ismail Khoffi <Ismail.Khoffi@gmail.com>

* move -mod=readonly to build flags
2019-06-09 16:27:48 +04:00