Commit Graph

8039 Commits

Author SHA1 Message Date
Anton Kaliaev
a8d8600308 [block#LastResultsHash] add Events + GasWanted/Used (#4845)
Closes #1007
2020-06-12 12:49:14 +04:00
Marko
a39d4bc9b4 bring back binary:fixed64 (#4997)
## Description

Binary: fixed64 is used for ledger support in signing for validators. This can be useful for other hsms as well

Closes: #XXX
2020-06-11 17:44:57 +00:00
Marko
bdac0818ac p2p: proto leftover (#4995)
## Description

removing codec.go from p2p pkg and some leftover amino encoding

Closes: #XXX
2020-06-11 14:37:29 +00:00
Marko
f6243d8b9e privval: migrate to protobuf (#4985) 2020-06-11 11:54:02 +02:00
Marko
31a361d119 proto: move keys to oneof (#4983) 2020-06-11 11:10:37 +02:00
Callum Waters
18d333c392 docs: update amnesia adr (#4994) 2020-06-10 20:17:32 +02:00
Marko
a057da6ab5 toml: make sections standout (#4993)
## Description

make sections in the toml standout.

Making this PR as I found it hard to find different sections on the `config.toml` when it was generated. This makes it somewhat simpler

Closes: #XXX
2020-06-10 17:49:27 +00:00
Callum Waters
b1dba352b0 light: added more tests for pruning, initialization and bisection (#4978) 2020-06-10 18:56:24 +02:00
Marko
46f6d17601 crypto/merkle: remove simple prefix (#4989)
## Description

This PR removes simple prefix from all types in the crypto/merkle directory.

The two proto types `Proof` & `ProofOp` have been moved to the `proto/crypto/merkle` directory.

proto messge `Proof` was renamed to `ProofOps` and `SimpleProof` message to `Proof`. 

Closes: #2755
2020-06-10 14:57:38 +00:00
Marko
d54de61bf6 consensus: proto migration (#4984)
## Description

migrate consensus to protobuf

Closes: #XXX
2020-06-10 12:08:47 +00:00
Callum Waters
5697e144a7 evidence: adr56 form amnesia evidence (#4821)
Creates Amnesia Evidence which is formed from Potential Amnesia Evidence with either a matching proof or after a period of time denoted as the Amnesia Trial Period. This also adds the code necessary so that Amnesia Evidence can be validated and committed on a block
2020-06-10 13:53:55 +02:00
Anton Kaliaev
65909a13d5 consensus: stricter on LastCommitRound check (#4970)
LastCommitRound should always be >= 0 for heights > 1.

In State.updateToState, last precommit is computed  only when round
greater than -1 and has votes. But "LastCommit" is always updated
regardless of the condition. If there's no last precommit, "LastCommit"
is set to (*types.VoteSet)(nil). That's why "LastCommit" can be -1 for
heights > 1.

To fix it, only update State.RoundState.LastCommit when there is last
precommit.

Fixes #2737

Co-authored-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
2020-06-10 11:13:38 +04:00
Erik Grinaker
660e72a12f p2p/conn: migrate to Protobuf (#4990)
Migrates the p2p connections to Protobuf. Supersedes #4800.

gogoproto's `NewDelimitedReader()` uses an internal buffer, which makes it unsuitable for reading individual messages from a shared reader (since any remaining data in the buffer will be discarded). We therefore add a new `protoio` package with an unbuffered `NewDelimitedReader()`. Additionally, the `NewDelimitedWriter()` returns the number of bytes written, and we've added `MarshalDelimited()` and `UnmarshalDelimited()`, to ease migration of existing code.
2020-06-09 16:09:51 +00:00
Stevan Ognjanovic
89665e7d67 types: Remove duplicated validation in VerifyCommit (#4991) 2020-06-09 17:15:32 +02:00
Marko
6961c7e5d1 crypto: removal of multisig (#4988)
## Description

deprecation & removal of multisig. This key was only used in the sdk and now it has been added there

Closes: #4715 
Closes: #2163
2020-06-09 08:13:49 +00:00
Marko
99985278d4 evidence: migrate reactor to proto (#4949)
## Description

migration of evidence reactor to proto

Closes: #XXX
2020-06-09 07:54:47 +00:00
Anton Kaliaev
6ec58f1560 rpc: support EXISTS operator in /tx_search query (#4979)
Closes #4763

* check for Error after for loop ends

so we don't silently ignore errors, which would lead to clients getting
incomplete results

Refs https://github.com/tendermint/tendermint/pull/4979/files#r436511572
2020-06-09 09:30:05 +04:00
Marko
a89f2581fc blockchain: proto migration (#4969)
## Description

migration of blockchain reactors to protobuf

Closes: #XXX
2020-06-08 12:45:03 +00:00
Erik Grinaker
db8f1b3df3 migrate all JSON to new JSON encoder (#4975)
Uses new JSON encoder in #4955 for all JSON. Branched off of #4968.
2020-06-08 12:22:59 +00:00
Erik Grinaker
ba3a2dde37 rpc: replace Amino with new JSON encoder (#4968)
Migrates the `rpc` package to use new JSON encoder in #4955. Branched off of that PR.

Tests pass, but I haven't done any manual testing beyond that. This should be handled as part of broader 0.34 testing.
2020-06-08 12:04:05 +00:00
Erik Grinaker
ccc990498d json: add Amino-compatible encoder/decoder (#4955)
Amino-compatible JSON encoder/decoder, including bug compatibility. Interface types must be registered via `json.RegisterType()`. Unlike Amino, this allows floats to be encoded/decoded.

Partial fix for #4828, needs code migration.
2020-06-08 11:42:35 +00:00
Marko
7a8224f8a3 state: proto migration (#4972)
## Description

the second part of state proto migration

Closes: #XXX
2020-06-08 10:16:35 +00:00
dependabot-preview[bot]
bd950c16ea build(deps): [Security] Bump websocket-extensions from 0.1.3 to 0.1.4 in /docs (#4976)
Bumps [websocket-extensions](https://github.com/faye/websocket-extensions-node) from 0.1.3 to 0.1.4. **This update includes a security fix.**
<details>
<summary>Vulnerabilities fixed</summary>
<p><em>Sourced from <a href="https://github.com/advisories/GHSA-g78m-2chm-r7qv">The GitHub Security Advisory Database</a>.</em></p>
<blockquote>
<p><strong>Regular Expression Denial of Service in websocket-extensions (NPM package)</strong></p>
<h3>Impact</h3>
<p>The ReDoS flaw allows an attacker to exhaust the server's capacity to process
incoming requests by sending a WebSocket handshake request containing a header
of the following form:</p>
<pre><code>Sec-WebSocket-Extensions: a; b=&quot;\c\c\c\c\c\c\c\c\c\c ...
</code></pre>
<p>That is, a header containing an unclosed string parameter value whose content is
a repeating two-byte sequence of a backslash and some other character. The
parser takes exponential time to reject this header as invalid, and this will
block the processing of any other work on the same thread. Thus if you are
running a single-threaded server, such a request can render your service
completely unavailable.</p>
<h3>Patches</h3>
<p>Users should upgrade to version 0.1.4.</p>
<h3>Workarounds</h3>
</tr></table> ... (truncated)
<p>Affected versions: &lt; 0.1.4</p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/faye/websocket-extensions-node/blob/master/CHANGELOG.md">websocket-extensions's changelog</a>.</em></p>
<blockquote>
<h3>0.1.4 / 2020-06-02</h3>
<ul>
<li>Remove a ReDoS vulnerability in the header parser (CVE-2020-7662, reported by
Robert McLaughlin)</li>
<li>Change license from MIT to Apache 2.0</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="8efd0cd6e3"><code>8efd0cd</code></a> Bump version to 0.1.4</li>
<li><a href="3dad4ad44a"><code>3dad4ad</code></a> Remove ReDoS vulnerability in the Sec-WebSocket-Extensions header parser</li>
<li><a href="4a76c75efb"><code>4a76c75</code></a> Add Node versions 13 and 14 on Travis</li>
<li><a href="44a677a9c0"><code>44a677a</code></a> Formatting change: {...} should have spaces inside the braces</li>
<li><a href="f6c50aba0c"><code>f6c50ab</code></a> Let npm reformat package.json</li>
<li><a href="2d211f3705"><code>2d211f3</code></a> Change markdown formatting of docs.</li>
<li><a href="0b620834cc"><code>0b62083</code></a> Update Travis target versions.</li>
<li><a href="729a465307"><code>729a465</code></a> Switch license to Apache 2.0.</li>
<li>See full diff in <a href="https://github.com/faye/websocket-extensions-node/compare/0.1.3...0.1.4">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://api.dependabot.com/badges/compatibility_score?dependency-name=websocket-extensions&package-manager=npm_and_yarn&previous-version=0.1.3&new-version=0.1.4)](https://dependabot.com/compatibility-score/?dependency-name=websocket-extensions&package-manager=npm_and_yarn&previous-version=0.1.3&new-version=0.1.4)

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 will merge this PR once CI passes on it, as requested by @marbar3778.

[//]: # (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-06-08 10:03:04 +00:00
Marko
dcc67642fa proto: remove amino proto tests (#4982)
## Description

These tests were made to test the compatibility of amino and protobuf. Since we are moving to protobuf they are not needed anymore.

The proto3 directory was created to be used only in these tests

Closes: #XXX
2020-06-08 09:49:47 +00:00
Anton Kaliaev
4d422e443b p2p: expose SaveAs on NodeKey (#4981)
Closes #4681
2020-06-08 09:36:46 +00:00
Marko
3b256ccb05 p2p/pex: migrate to Protobuf (#4973)
## Description

migrate p2p/pex to protobuf

Closes: #XXX
2020-06-08 09:23:58 +00:00
Marko
0bc0446208 readme: add source graph badge (#4980)
## Description

<img width="1140" alt="Screen Shot 2020-06-08 at 9 29 15 AM" src="https://user-images.githubusercontent.com/24299864/84003556-87e85800-a96a-11ea-828b-3656f116b518.png">


Closes: #XXX
2020-06-08 07:51:52 +00:00
Marko
4a87d60736 light: migrate to proto (#4964) 2020-06-08 09:14:58 +02:00
Marko
f9f4916bc3 store: proto migration (#4974)
## Description

migrate store to protobuf

Closes: #XXX
2020-06-08 06:43:29 +00:00
dependabot-preview[bot]
6cfbe1eb5c build(deps): Bump github.com/stretchr/testify from 1.6.0 to 1.6.1
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.6.0 to 1.6.1.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.6.0...v1.6.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-08 05:05:29 +00:00
Erik Grinaker
b76b270a23 blockchain/v2: correctly set block store base in status responses (#4971)
See: https://github.com/tendermint/tendermint/pull/4969#pullrequestreview-425298225
2020-06-05 15:18:12 +00:00
Marko
9ef266b88f types: migrate params to protobuf (#4962) 2020-06-05 15:29:53 +02:00
Callum Waters
d4f1876d12 consensus: change logging and handling of height mismatch (#4954) 2020-06-05 15:04:45 +02:00
Anton Kaliaev
245794a3fd types: remove VerifyFutureCommit (#4961)
It was previously used by the now removed `lite` package.
2020-06-05 12:31:30 +00:00
Marko
b4aca980e9 proto: change to use gogofaster (#4957) 2020-06-05 14:18:44 +02:00
Marko
b9af87c4ea state: proto migration (#4951) 2020-06-05 10:47:16 +02:00
Marko
ee91312d34 proto: add more to/from (#4956)
## Description

adding in some more to/from methods/functions

Closes: #XXX
2020-06-05 04:42:04 +00:00
Marko
dc49dcc1c1 evidence: json tags for DuplicateVoteEvidence (#4959)
## Description

Add json tags to duplicate evidence 

Closes: #4958
2020-06-04 22:41:16 +00:00
Marko
a88537bb88 ints: stricter numbers (#4939) 2020-06-04 16:34:56 +02:00
Marko
7c576f02ab keys: change to []bytes (#4950) 2020-06-04 15:32:42 +02:00
Callum Waters
d53a8d0377 light: implement validate basic (#4916)
run a validate basic on inbound validator sets and headers before further processing them
2020-06-04 13:45:39 +02:00
Marko
2302422283 swagger: define version (#4952)
## Description

try to further resolve rpc docs issue

Closes: #XXX
2020-06-04 09:58:25 +00:00
Marko
7f8415ded0 fix swagger page (#4948)
## Description

_Please add a description of the changes that this PR introduces and the files that
are the most critical to review._ 

Closes: #XXX
2020-06-03 13:25:02 +00:00
Anton Kaliaev
ce3c9c2341 rpc/core: return an error if page=0 (#4947)
* rpc/core: return an error if `page=0`

Closes #4942

affected endpoints:

- /validators
- /tx_search

* swagger: update doc for /unconfirmed_txs
2020-06-03 16:51:51 +04:00
Anton Kaliaev
994912211c p2p/conn: add a test for MakeSecretConnection (#4829)
Refs #4154
2020-06-03 16:28:23 +04:00
Alessio Treglia
c8483531d8 consensus: attempt to repair the WAL file on data corruption (#4682)
Closes: #4578

Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
2020-06-03 15:14:12 +04:00
Marko
c2578e2262 light: rename lite2 to light & remove lite (#4946)
This PR removes lite & renames lite2 to light throughout the repo

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

Closes: #4944
2020-06-03 10:13:42 +00:00
Erik Grinaker
395d58c27c docs: document open file limit in production guide (#4945)
See e.g. https://github.com/tendermint/tendermint/issues/4925#issuecomment-637929251 for people getting hit by this. Should we document it elsewhere as well?
2020-06-03 09:34:25 +00:00
Marko
4e6a844d6f statesync: use Protobuf instead of Amino for p2p traffic (#4943)
## Description



Closes: #XXX
2020-06-03 08:43:50 +00:00
Anton Kaliaev
123beeadc4 lite2: compare header with witnesses in parallel (#4935)
Closes #4801
2020-06-03 11:32:51 +04:00