Callum Waters and GitHub
d1bd596bce
mempool: move mock into mempool directory
2020-04-29 15:55:47 +02:00
Callum
61dbdf4f12
go formatting
2020-04-29 15:26:02 +02:00
Callum
15a9f1760d
move mempool mock directory
2020-04-29 15:25:01 +02:00
Marko and GitHub
1e925acd04
ci: check git diff on each job ( #4770 )
2020-04-29 14:55:15 +02:00
Callum Waters and GitHub
fd71c6844f
evidence: check evidence is pending before validating evidence
...
checks evidence store first to potentially save the work of having to verify again
fixes #4728
2020-04-29 14:16:04 +02:00
Callum Waters and GitHub
ba967c077b
Merge branch 'master' into callum/4728-check-evidence
2020-04-29 14:04:04 +02:00
Erik Grinaker and GitHub
8108ac9d17
blockchain/v2: respect fast_sync option ( #4772 )
...
Not thoroughly tested, but seems to work. Will do further testing as this is integrated with state sync.
Fixes #4688 .
2020-04-29 13:54:37 +02:00
Erik Grinaker and GitHub
42483a2b91
adr-053: update after state sync merge ( #4768 )
2020-04-29 12:04:28 +02:00
f55758929d
build(deps): manually bump github.com/prometheus/client_golang from 1.5.1 to 1.6.0 ( #4758 )
...
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang ) from 1.5.1 to 1.6.0.
- [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.1...v1.6.0 )
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-04-29 11:22:16 +02:00
Erik Grinaker and GitHub
dcc19272f9
blockchain/v2: fix excessive CPU usage due to spinning on closed channels ( #4761 )
...
The event loop uses a `select` on multiple channels. However, reading from a closed channel in Go always yields the channel's zero value. The processor and scheduler close their channels when done, and since these channels are always ready to receive, the event loop keeps spinning on them.
This changes `routine.terminate()` to not close the channel, and also removes `stopDemux` and instead uses `events` channel closure to signal event loop termination.
Fixes #4687 .
2020-04-29 11:03:04 +02:00
Erik Grinaker and GitHub
511ab6717c
add state sync reactor ( #4705 )
...
Fixes #828 . Adds state sync, as outlined in [ADR-053](https://github.com/tendermint/tendermint/blob/master/docs/architecture/adr-053-state-sync-prototype.md ). See related PRs in Cosmos SDK (https://github.com/cosmos/cosmos-sdk/pull/5803 ) and Gaia (https://github.com/cosmos/gaia/pull/327 ).
This is split out of the previous PR #4645 , and branched off of the ABCI interface in #4704 .
* Adds a new P2P reactor which exchanges snapshots with peers, and bootstraps an empty local node from remote snapshots when requested.
* Adds a new configuration section `[statesync]` that enables state sync and configures the light client. Also enables `statesync:info` logging by default.
* Integrates state sync into node startup. Does not support the v2 blockchain reactor, since it needs some reorganization to defer startup.
2020-04-29 10:47:00 +02:00
Erik Grinaker and GitHub
569981325a
add ABCI interface for state sync snapshots ( #4704 )
...
Adds the ABCI interface for [state sync](https://github.com/tendermint/tendermint/issues/828 ) as outlined in [ADR-053](https://github.com/tendermint/tendermint/blob/master/docs/architecture/adr-053-state-sync-prototype.md ), and bumps ABCIVersion to `0.17.0`.
The interface adds a new ABCI connection which Tendermint can use to query and load snapshots from the app (for serving snapshots to other nodes), and to offer and apply snapshots to the app (for state syncing a local node from peers).
Split out from the original PR in #4645 , state sync reactor will be submitted as a separate PR. The interface is implemented by the Cosmos SDK in https://github.com/cosmos/cosmos-sdk/pull/5803 .
2020-04-29 10:32:09 +02:00
Callum
82eb56b3e0
Merge remote-tracking branch 'origin/callum/4728-check-evidence' into callum/4728-check-evidence
2020-04-29 07:02:37 +02:00
Callum
c6acc54145
replaced other evidence mocks
2020-04-29 07:01:12 +02:00
Callum Waters and GitHub
3da6d94001
Merge branch 'master' into callum/4728-check-evidence
2020-04-29 06:33:42 +02:00
Marko and GitHub
7a87a784bf
ci: only run when applicable ( #4752 )
...
- only run tests when .go, .mod, .sum files have been touched
- only run proto checks when .proto files have been touched
Signed-off-by: Marko Baricevic marbar3778@yahoo.com
2020-04-28 16:07:11 +02:00
Tess Rinearson and GitHub
be42442e10
.github: fix whitespace for auto-comment ( #4750 )
2020-04-28 14:12:53 +02:00
Anton Kaliaev and GitHub
071bcfe169
docs: state we don't support non constant time crypto
...
on 32 bit architectures or ARM
Closes #2103
2020-04-28 11:33:42 +00:00
Anton Kaliaev and GitHub
f23f21f001
evidence: protect valToLastHeight w/ mtx
...
to prevent data races
note: when we check the ConflictingHeadersEvidence, the copy is used.
Closes #4749
Also, iterate over valToLastHeight instead of loading validators. While it might be slower than accessing a single key in goleveldb, the new code is better adapted to ConsensusParams changes.
2020-04-28 11:04:45 +00:00
Callum
6dc971052a
replace old mocks with new mock
2020-04-28 12:59:18 +02:00
Callum
08aa4765b0
create tests for validating evidence
2020-04-28 12:54:13 +02:00
Callum
22cb4a27b1
create evidence pool mock
2020-04-28 12:53:26 +02:00
Anton Kaliaev and GitHub
8f463cf35c
p2p: set RecvMessageCapacity to maxMsgSize in all reactors
...
to prevent malicious nodes from sending us large messages (~21MB, which
is the default `RecvMessageCapacity`)
This allows us to remove unnecessary `maxMsgSize` check in `decodeMsg`. Since each channel has a msg capacity set to `maxMsgSize`, there's no need to check it again in `decodeMsg`.
Closes #1503
2020-04-28 10:05:09 +00:00
Anton Kaliaev and GitHub
f31f4327b5
privval: remove deprecated OldFilePV
...
The old format was deprecated in v0.28. It's time we remove it.
2020-04-28 08:51:51 +00:00
Callum Waters and GitHub
ea3eac6795
evidence: add doc.go
...
add documentation on how the evidence module works
#4723
2020-04-28 10:00:52 +02:00
Callum Waters and GitHub
377369cf2a
Merge branch 'master' into callum/add-evidence-doc
2020-04-28 08:28:40 +02:00
Marko and GitHub
a5a84e11f1
evidence: remove pubkey from duplicate vote evidence
...
this pr brings over the removal of pubkey from duplicatevote evidence from proto-breakage
ref #4580
2020-04-28 05:47:20 +00:00
Callum
1972b1f9fe
lint fix
2020-04-28 06:38:40 +02:00
Callum
496ee91fcc
made suggested changes
2020-04-28 06:35:10 +02:00
Erik Grinaker and GitHub
fefdc6634e
crypto: remove SimpleHashFromMap() and SimpleProofsFromMap()
...
Fixes #2593
@alexanderbez This is used in a single place in the SDK, how upset are you about removing it?
______
For contributor use:
- [x] ~Wrote tests~
- [x] Updated CHANGELOG_PENDING.md
- [x] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
- [x] Updated relevant documentation (`docs/`) and code comments
- [x] Re-reviewed `Files changed` in the Github PR explorer
- [x] Applied Appropriate Labels
2020-04-27 15:33:20 +00:00
Tess Rinearson and GitHub
3c41c72026
.github: fix whitespace for autocomment ( #4747 )
2020-04-27 14:59:07 +02:00
Tess Rinearson and GitHub
b25faa761f
.github: move checklist from PR description into an auto-comment ( #4745 )
...
The checklist and message in the default PR description were sometimes getting
included in commit messages. This change moves that text from the PR description
to a comment from a [Probot tool](https://probot.github.io/apps/auto-comment/ ).
2020-04-27 12:30:04 +02:00
Callum
7a07abecc7
cleaned up tests
2020-04-27 07:29:12 +02:00
Callum
1e6de1ec94
check it has been committed before verifying
2020-04-27 07:06:26 +02:00
Callum Waters and GitHub
7b04e27e93
improve evidence db #4722
...
merged the existing store into pool, consolidated the three buckets into two, used block height as a marked for committed evidence, evidence list recovers on start up, improved error handling
2020-04-27 07:04:19 +02:00
Callum Waters and GitHub
f8a20a1a8c
Merge branch 'master' into callum/consolidate-store-into-pool
2020-04-27 06:40:16 +02:00
Alessio Treglia and GitHub
8c6d1e669f
Makefile: parse TENDERMINT_BUILD_OPTIONS ( #4738 )
...
Reduce the number of targets and make the buildsystem more
flexible by parsing the TENDERMINT_BUILD_OPTIONS command
line variable (a-la Debian, inspired by dpkg-buildpackage's
DEB_BUILD_OPTIONS), e.g:
$ make install TENDERMINT_BUILD_OPTIONS='cleveldb'
replaces the old:
$ make install_c
Options can be mix&match'd, e.g.:
$ make install TENDERMINT_BUILD_OPTIONS='cleveldb race nostrip'
Three options are available:
- nostrip: don't strip debugging symbols nor DWARF tables.
- cleveldb: use cleveldb as db backend instead of goleveldb;
it switches on the CGO_ENABLED Go environment variale.
- race: pass -race to go build and enable data race detection.
This changeset is a port of gaia pull request: cosmos/gaia#363 .
2020-04-25 20:16:58 +02:00
Erik Grinaker and GitHub
3e1c88fda8
lite: fix HTTP provider error handling
...
Fixes #4739 , kind of. See #4740 for the proper fix.
---
For contributor use:
- [x] Wrote tests
- [x] Updated CHANGELOG_PENDING.md
- [x] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
- [x] Updated relevant documentation (`docs/`) and code comments
- [x] Re-reviewed `Files changed` in the Github PR explorer
- [x] Applied Appropriate Labels
2020-04-25 12:34:01 +00:00
Callum
50e47357d8
improve evidence db #4722
...
merged the existing store into pool, consolidated the three buckets into two, used block height as a marked for committed evidence, evidence list recovers on start up, improved error handling
2020-04-24 18:36:14 +02:00
2f042f28eb
build(deps): Bump google.golang.org/grpc from 1.29.0 to 1.29.1 ( #4735 )
...
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go ) from 1.29.0 to 1.29.1.
- [Release notes](https://github.com/grpc/grpc-go/releases )
- [Commits](https://github.com/grpc/grpc-go/compare/v1.29.0...v1.29.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-24 15:54:27 +02:00
9f29672e23
types: implement Header#ValidateBasic ( #4638 )
...
- Move core stateless validation of the Header type to a ValidateBasic method.
- Call header.ValidateBasic during a SignedHeader validation.
- Call header.ValidateBasic during a PhantomValidatorEvidence validation.
- Call header.ValidateBasic during a LunaticValidatorEvidence validation.
lite tests are skipped since the package is deprecated, no need to waste time on it
closes : #4572
Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com >
2020-04-24 11:45:38 +04:00
Marko and GitHub
1f64430cb5
readme: add badge for git tests ( #4732 )
...
- add github actions badge for tests on master
- fix discord badge
2020-04-23 13:30:02 +02:00
dependabot-preview[bot] and GitHub
ad9003d448
build(deps): bump google.golang.org/grpc from 1.28.1 to 1.29.0
...
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go ) from 1.28.1 to 1.29.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/grpc/grpc-go/releases ">google.golang.org/grpc's releases</a>.</em></p>
<blockquote>
<h2>Release 1.29.0</h2>
<h1>New Features</h1>
<ul>
<li>client: add a WithNoProxy dialoption (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/3411 ">#3411</a>)
<ul>
<li>Special Thanks: <a href="https://github.com/pdbogen ">@pdbogen</a></li>
</ul>
</li>
</ul>
<h1>Bug Fixes</h1>
<ul>
<li>xds: update nonce even if the ACK/NACK is not sent on wire (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/3497 ">#3497</a>)</li>
<li>xds: add temporary logging to LRS (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/3490 ">#3490</a>)</li>
<li>wrr: make random wrr thread safe (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/3470 ">#3470</a>)</li>
<li>transport: fix handling of header metadata in serverHandler (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/3484 ">#3484</a>)
<ul>
<li>Special Thanks: <a href="https://github.com/misberner ">@misberner</a></li>
</ul>
</li>
<li>balancer: change roundrobin to accept empty address list (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/3491 ">#3491</a>)</li>
<li>stats: set response compression codec on stats.InHeader and stats.OutHeader (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/3390 ">#3390</a>)
<ul>
<li>Special Thanks: <a href="https://github.com/MatthewDolan ">@MatthewDolan</a></li>
</ul>
</li>
</ul>
<h1>Documentation</h1>
<ul>
<li>credentials: Update doc strings for NewClientTLSFromCert et. al. (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/3508 ">#3508</a>)</li>
<li>examples: add example to show how to use the health service (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/3381 ">#3381</a>)
<ul>
<li>Special Thanks: <a href="https://github.com/mjpitz ">@mjpitz</a></li>
</ul>
</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/grpc/grpc-go/commit/bd6242a1aa1b9fd3701cdbada47e9e951dab6c24 "><code>bd6242a</code></a> Change version to 1.29.0 (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/3509 ">#3509</a>)</li>
<li><a href="https://github.com/grpc/grpc-go/commit/85e3a6fdd7f598b7dbf7eabcf1043b370829cd74 "><code>85e3a6f</code></a> credentials: Update doc strings for NewClientTLSFromCert et. al. (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/3508 ">#3508</a>)</li>
<li><a href="https://github.com/grpc/grpc-go/commit/3038e58ed29bb7dd09ed357c0024a7bad2d0dafb "><code>3038e58</code></a> examples: add example to show how to use the health service (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/3381 ">#3381</a>)</li>
<li><a href="https://github.com/grpc/grpc-go/commit/98e4c7ad3eefd5c1a3cd647c004943ffab4f5722 "><code>98e4c7a</code></a> xds: move balancer group to a separate package (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/3493 ">#3493</a>)</li>
<li><a href="https://github.com/grpc/grpc-go/commit/c5faf568da50936d0b11fdf4effb22cdb87a061c "><code>c5faf56</code></a> status: move statusError to internal/status package (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/3432 ">#3432</a>)</li>
<li><a href="https://github.com/grpc/grpc-go/commit/7cb4db26f12fc431f99b4cc7ac315b1a014b13e6 "><code>7cb4db2</code></a> internal: update grpc_lb_v1 proto (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/3499 ">#3499</a>)</li>
<li><a href="https://github.com/grpc/grpc-go/commit/a9601d93f498eec9b35b3e148162d79d8aa60602 "><code>a9601d9</code></a> xds: update nonce even if the ACK/NACK is not sent on wire (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/3497 ">#3497</a>)</li>
<li><a href="https://github.com/grpc/grpc-go/commit/66e9dfe70338d04075ff8617548660f0934e50d8 "><code>66e9dfe</code></a> transport: fix handling of header metadata in serverHandler (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/3484 ">#3484</a>)</li>
<li><a href="https://github.com/grpc/grpc-go/commit/aedb1362d52a4832ced7751316e356d5577ed0b1 "><code>aedb136</code></a> balancer: change roundrobin to accept empty address list (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/3491 ">#3491</a>)</li>
<li><a href="https://github.com/grpc/grpc-go/commit/fe1d8e71817f6ab365b9ca133f1b668cbe09a7d3 "><code>fe1d8e7</code></a> xds: add temporary logging to LRS (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/3490 ">#3490</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/grpc/grpc-go/compare/v1.28.1...v1.29.0 ">compare view</a></li>
</ul>
</details>
<br />
[](https://dependabot.com/compatibility-score/?dependency-name=google.golang.org/grpc&package-manager=go_modules&previous-version=1.28.1&new-version=1.29.0 )
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language
- `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme
Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com ):
- Update frequency (including time of day and day of week)
- Pull request limits (per update run and/or open at any time)
- Out-of-range updates (receive only lockfile updates, if desired)
- Security updates (receive only security updates, if desired)
</details>
2020-04-23 08:43:40 +00:00
Marko and GitHub
3fedc43c0a
proto: regenerate proto ( #4730 )
...
- regenerate proto using docker image
- on proto breakage a different compiler is used to generate some more helper functions, on master the same one os not used, reverting back to the one used on master to undo further confusion till proto-breakage is merged
Signed-off-by: Marko Baricevic <marbar3778@yahoo.com >
2020-04-23 10:27:04 +02:00
Marko and GitHub
7a6ca0c1bf
evidence: remove unused param ( #4726 )
...
Signed-off-by: Marko Baricevic <marbar3778@yahoo.com >
2020-04-22 17:18:24 +02:00
Marko and GitHub
af887adad9
proto: bring over proto types & msgs ( #4718 )
...
Signed-off-by: Marko Baricevic <marbar3778@yahoo.com >
2020-04-22 14:59:08 +02:00
Callum
b524b61252
clean up doc
2020-04-22 14:53:23 +02:00
Callum Michael Waters
e9d5538107
created docs.go for evidence package
2020-04-22 14:53:23 +02:00
Anton Kaliaev and GitHub
33a19dabd7
abci/server: print panic & stack trace to STDERR if logger is not set
...
Closes #4382
2020-04-22 11:42:45 +00:00
Diep Pham and GitHub
843d63f935
indexer: allow indexing an event at runtime ( #4466 )
...
The PR added a new field `index` to event attribute, that will cause indexer service to index the event if set to true.
2020-04-22 12:07:03 +02:00