Commit Graph

7971 Commits

Author SHA1 Message Date
Alessio Treglia
52f729bb51 run go mod tidy 2020-04-08 18:41:43 +02:00
dependabot-preview[bot]
f70785bc95 build(deps): bump google.golang.org/grpc from 1.28.0 to 1.28.1 (#4653)
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.28.0 to 1.28.1.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.28.0...v1.28.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-04-07 14:01:57 +00:00
Callum Waters
88d7007c3c check evidence hasn't already been stored (#4632)
Add Has function, create better handling of errors when adding evidence, usage of error types.

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-04-07 08:42:14 +00:00
Marko
499f9ed153 lint: add review dog (#4652)
* lint: add review dog

- golangci is being deprecated on the 15th

Signed-off-by: Marko Baricevic <marbar3778@yahoo.com>
2020-04-07 10:28:26 +02:00
Callum Waters
6aa469d008 p2p: PEX message abuse should ban as well as disconnect (#4621)
* mark unsolicited and too frequent messaged as bad

* add tests

* update changelog and fix error

* revised error types

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-04-07 04:26:13 +00:00
Alexander Bezobchuk
c11013f094 lite2: Default to http scheme in provider.New (#4649)
Closes: #4643
2020-04-06 21:06:33 +04:00
Callum Waters
379848eab7 lite2: Prevent falsely returned double voting error (#4620)
* prevent faulty double voting error

* create test

* clean tests

* clean tests

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-04-06 06:04:24 +00:00
Erik Grinaker
f51ca72b24 config: allow fastsync.version = v2 (#4639) 2020-04-04 14:33:50 +00:00
Erik Grinaker
61057a8b0a upgrading: add note on rpc/client subpackages (#4636)
* upgrading: add note on rpc/client subpackages

* clarify constructors
2020-04-03 14:57:19 +00:00
Erik Grinaker
4298bbcc4e add support for block pruning via ABCI Commit response (#4588)
* Added BlockStore.DeleteBlock()

* Added initial block pruner prototype

* wip

* Added BlockStore.PruneBlocks()

* Added consensus setting for block pruning

* Added BlockStore base

* Error on replay if base does not have blocks

* Handle missing blocks when sending VoteSetMaj23Message

* Error message tweak

* Properly update blockstore state

* Error message fix again

* blockchain: ignore peer missing blocks

* Added FIXME

* Added test for block replay with truncated history

* Handle peer base in blockchain reactor

* Improved replay error handling

* Added tests for Store.PruneBlocks()

* Fix non-RPC handling of truncated block history

* Panic on missing block meta in needProofBlock()

* Updated changelog

* Handle truncated block history in RPC layer

* Added info about earliest block in /status RPC

* Reorder height and base in blockchain reactor messages

* Updated changelog

* Fix tests

* Appease linter

* Minor review fixes

* Non-empty BlockStores should always have base > 0

* Update code to assume base > 0 invariant

* Added blockstore tests for pruning to 0

* Make sure we don't prune below the current base

* Added BlockStore.Size()

* config: added retain_blocks recommendations

* Update v1 blockchain reactor to handle blockstore base

* Added state database pruning

* Propagate errors on missing validator sets

* Comment tweaks

* Improved error message

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

* use ABCI field ResponseCommit.retain_height instead of retain-blocks config option

* remove State.RetainHeight, return value instead

* fix minor issues

* rename pruneHeights() to pruneBlocks()

* noop to fix GitHub borkage

Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
2020-04-03 08:38:32 +00:00
Erik Grinaker
ce50dda66c ADR-053: strengthen and simplify the state sync ABCI interface (#4610)
* adr-053: strengthened and simplified ABCI interface

* remove internal_error reason and open questions

* add follow-up task for block backfill

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-04-02 13:37:00 +00:00
Erik Grinaker
fdf9c7ae64 rpc/client: split out client packages (#4628)
* rpc/client: initial split into directories

* lite2: split out test package

* rpc/client: simplify client constructurs

* updated docs

* updated changelog
2020-04-02 13:25:30 +00:00
Anton Kaliaev
6c88d2ba1f lite2: make maxClockDrift an option (#4616)
Closes #4607
2020-03-31 16:33:33 +04:00
Callum Waters
5c380cdacb lite2: use bisection for some of backward verification (#4575)
Closes: #4537

Uses SignedHeaderBefore to find header before unverified header and then bisection to verify the header. Only when header is between first and last trusted header height else if before the first trusted header height then regular backwards verification is used.
2020-03-31 16:20:22 +04:00
Yongwoo Lee
bcf27c2364 rpc: add codespace to ResultBroadcastTx (#4611)
Closes: #4606
2020-03-31 11:49:28 +04:00
Marko
f5651d2b61 proto: use docker to generate stubs (#4615)
* proto: use docker to generate stubs

- provide an option to developers to use docker to generate proto stubs

closes #4579

Signed-off-by: Marko Baricevic <marbar3778@yahoo.com>
2020-03-30 16:48:48 +02:00
dependabot-preview[bot]
9edf17a85c build(deps): bump github.com/tendermint/tm-db from 0.5.0 to 0.5.1 (#4613)
Bumps [github.com/tendermint/tm-db](https://github.com/tendermint/tm-db) from 0.5.0 to 0.5.1.
- [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.5.0...v0.5.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-03-30 14:05:42 +00:00
dependabot-preview[bot]
94f5321fa3 build(deps): bump github.com/spf13/cobra from 0.0.6 to 0.0.7 (#4612)
Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 0.0.6 to 0.0.7.
- [Release notes](https://github.com/spf13/cobra/releases)
- [Commits](https://github.com/spf13/cobra/compare/v0.0.6...0.0.7)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-03-30 13:49:29 +00:00
Tess Rinearson
ccf53a2276 all: name reactors when they are initialized (#4608)
Previously, many reactors were initialized with the name "Reactor," which made it difficult to log which reactor was doing what. This changes those reactors' names to something more descriptive.
2020-03-27 18:30:42 +01:00
Marko
7164c67205 docs: validator setup & Key info (#4604)
- defined what variables needed to be changed in the `config.toml` in order to run a validator.
- Briefly explained how a sentry node archtecture should look
- add section explaing importance of key secruity

Signed-off-by: Marko Baricevic <marbar3778@yahoo.com>
2020-03-27 16:17:23 +00:00
Callum Waters
53aa1ceba5 create style guide and update contributors section (#4576) 2020-03-27 16:26:39 +01:00
Marko
b14c0e579e tools: remove need to install buf (#4605)
* tools: remove need to install buf

- using buf docker image instead of needing devs to install it

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

* fix ci for lint and break checking
2020-03-27 06:47:39 +01:00
Callum Waters
a25faed5f0 lite2: cache headers in bisection (#4562)
Closes: #4546

The algorithm uses an array to store the headers and validators and populates it at every bisection (which is an unsuccessful verification). When a successful verification finally occurs it updates the new trusted header, trims that header from the cache (the array) and sets the depth pointer back to 0. Instead of retrieving new headers it will use the cached headers, incrementing in depth until it reaches the end of the cache which by then it will start to retrieve new headers from the provider. 

Mathematically, this method doesn't properly bisect after the first round but it will always choose a pivot header that is within 1/8th of the upper header's height. I.e. if we are trying to jump 128 headers, the maximum offset from bisection height (64) is 64 + 16(128/8) = 80, therefore a better heuristic would be to obtain the new pivot header height as the middle of these two numbers which would therefore mean to multiply it by 9/16ths instead of 1/2  (sorry this might be a bit more complicated in writing but I can try better explain if someone is interested). Therefore I would also, upon consensus, propose that we change the pivot height to 9/16th's of the previous height
2020-03-26 12:38:02 +01:00
Marko
43f3276d6f change link checker to run daily (#4601) 2020-03-25 06:59:52 +00:00
Marko
18d44a0186 blockchain: enable v2 to be set (#4597)
* blockchain: enable v2 to be set

- enable v2 to be set via config params

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

* replace tab with space

* correctly spell usability
2020-03-23 19:12:31 +00:00
Marko
130b16529d minor link fixing (#4598) 2020-03-23 17:51:54 +01:00
Marko
044f1bf288 format: add format cmd & goimport repo (#4586)
* format: add format cmd & goimport repo

- replaced format command
- added goimports to format command
- ran goimports

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

* fix outliers & undo proto file changes
2020-03-23 09:19:26 +01:00
Greg Szabo
d9c34315d2 Docker image port fix (#4589)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-03-21 13:37:49 +00:00
Marko
a116dca990 deps: run go mod tidy (#4587)
Signed-off-by: Marko Baricevic <marbar3778@yahoo.com>
2020-03-21 09:57:18 +00:00
dependabot-preview[bot]
a0294fe5b9 build(deps): bump github.com/gorilla/websocket from 1.4.1 to 1.4.2 (#4584)
Bumps [github.com/gorilla/websocket](https://github.com/gorilla/websocket) from 1.4.1 to 1.4.2.
- [Release notes](https://github.com/gorilla/websocket/releases)
- [Commits](https://github.com/gorilla/websocket/compare/v1.4.1...v1.4.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-03-20 11:44:30 +00:00
Greg Szabo
c05b2f2384 Dockerfile updated with defaults (#4577) 2020-03-17 10:31:55 +00:00
Anton Kaliaev
c917c2ddfb rpc: fix panic when Subscribe is called (#4570)
but HTTP client is not running.

`Subscribe`, `Unsubscribe(All)` methods return an error now.

Closes #4568
2020-03-16 22:02:54 +04:00
dependabot-preview[bot]
629dff0f0d build(deps): bump github.com/prometheus/client_golang (#4574)
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.5.0 to 1.5.1.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.5.0...v1.5.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-03-16 12:29:20 +00:00
Marko
fdc2efc083 fix: fix spelling of comment (#4566)
- :P

Signed-off-by: Marko Baricevic <marbar3778@yahoo.com>
2020-03-13 16:21:09 +00:00
Denis Fadeev
033cac2b75 Update docs website (#4564)
* update theme

* Update version

* Updated Questions section in the footer

* Remove links to Riot chat

* Typo

* Add Discord link

* Update docs theme to the latest version

* Use docs-staging branch for staging website

* Resolve merge conflicts

* Update version

* Add google analytics

Co-authored-by: Marko <marbar3778@yahoo.com>
2020-03-13 14:34:31 +00:00
Marko
c06341e100 removal: remove build folder (#4565)
- remove tools/build folder

Signed-off-by: Marko Baricevic <marbar3778@yahoo.com>
2020-03-13 14:20:00 +00:00
dependabot-preview[bot]
ab9cb0e133 build(deps): bump github.com/golang/protobuf from 1.3.4 to 1.3.5 (#4563)
Bumps [github.com/golang/protobuf](https://github.com/golang/protobuf) from 1.3.4 to 1.3.5.
- [Release notes](https://github.com/golang/protobuf/releases)
- [Commits](https://github.com/golang/protobuf/compare/v1.3.4...v1.3.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-03-13 11:48:50 +00:00
Denis Fadeev
53b660ef10 Use docs-staging branch (#4561)
Co-authored-by: Marko <marbar3778@yahoo.com>
2020-03-12 20:28:37 +00:00
Callum Waters
fdc29ef112 Merge pull request #4560 from tendermint/callum/update-changelog
p2p: Update Changelog with ban list PR - #4548
2020-03-12 19:42:25 +01:00
Callum
586d299991 moved to changelog_pending 2020-03-12 18:39:13 +01:00
Callum
c42d530507 update Changelog with PR #4548 2020-03-12 18:03:44 +01:00
Callum Waters
61a9ec11aa Merge pull request #4548 from tendermint/callum/p2p-blacklist
p2p: ban bad peers
2020-03-12 15:52:06 +01:00
Callum Waters
6ae1f3c1f7 Merge branch 'master' into callum/p2p-blacklist 2020-03-12 15:32:02 +01:00
Callum Michael Waters
7e6b1a87da cannot decrease ban time 2020-03-12 15:29:31 +01:00
Callum Michael Waters
c8bb1cc8b7 made suggested changes 2020-03-12 12:35:28 +01:00
Marko
48f073d796 privval: return error on getpubkey (#4534)
closes #3602

Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
2020-03-12 11:10:36 +04:00
Callum Waters
038aff1fdb lite2: add benchmarking tests (#4514)
Closes #4392
Refs #4504
2020-03-12 10:57:06 +04:00
Tess Rinearson
864ce4be79 tools/build: delete stale tools (#4558) 2020-03-12 10:08:09 +04:00
Marko
4ef506f7ba deps: bump deps that bot cant (#4555)
* deps: bump deps that bot cant

- bumping deps that dependat bot does not do.

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

* run go mod tidy

* fix go.sum
2020-03-11 18:02:41 +01:00
Callum Waters
52357362e3 Merge branch 'master' into callum/p2p-blacklist 2020-03-11 17:19:51 +01:00