Compare commits

...

1320 Commits

Author SHA1 Message Date
Mark Rushakoff
4a9f286908 Merge remote-tracking branch 'origin/master' into mr/short-tests 2022-07-29 09:26:16 -04:00
Sam Kleinman
48147e1fb9 logging: implement lazy sprinting (#8898)
shout out to @joeabbey for the inspiration. This makes the lazy
functions internal by default to prevent potential misuse by external
callers.

Should backport cleanly into 0.36 and I'll handle a messy merge into 0.35
2022-07-27 19:16:51 +00:00
William Banfield
b9d6bb4cd1 RELEASES: add a set of pre-release steps for Tendermint versions (#8786)
{[rendered](https://github.com/tendermint/tendermint/blob/wb/release-document/RELEASES.md)}

This pull request adds a proposed set of steps to perform before each Tendermint minor version release. This represents an initial set of ideas that derives from conversations among members of the Tendermint team. If you have additional suggestions for pre-release steps, please leave a comment explaining the specific suggestion and detailing how it would help build confidence in the quality of the release of Tendermint.
2022-07-27 15:03:36 +00:00
Callum Waters
7a84425aec update dependabot frequencies (#9087) 2022-07-26 12:05:48 +02:00
dependabot[bot]
488e1d4bd2 build(deps): Bump github.com/creachadair/tomledit from 0.0.22 to 0.0.23 (#9084)
Bumps [github.com/creachadair/tomledit](https://github.com/creachadair/tomledit) from 0.0.22 to 0.0.23.
<details>
<summary>Commits</summary>
<ul>
<li><a href="e7b6512f75"><code>e7b6512</code></a> Release v0.0.23.</li>
<li><a href="fdb62db21d"><code>fdb62db</code></a> Add tomldiff command-line tool.</li>
<li><a href="ce86b667b5"><code>ce86b66</code></a> Fix a comment typo.</li>
<li><a href="3834adf9ee"><code>3834adf</code></a> Fix documentation.</li>
<li><a href="525c9c12f6"><code>525c9c1</code></a> cli: escape as basic strings by default</li>
<li>See full diff in <a href="https://github.com/creachadair/tomledit/compare/v0.0.22...v0.0.23">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/creachadair/tomledit&package-manager=go_modules&previous-version=0.0.22&new-version=0.0.23)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2022-07-25 12:53:08 +00:00
dependabot[bot]
89246e993a build(deps): Bump docker/build-push-action from 3.0.0 to 3.1.0 (#9082) 2022-07-25 12:07:29 +02:00
Steven Ferrer
6c302218e3 Documentation: update go tutorials (#9048) 2022-07-25 10:15:18 +02:00
Mark Rushakoff
4688d1a662 Skip long internal/mempool tests in -short mode
I added checks against testing.Short for tests that took longer than
about one second on my machine. Running with -short reduces the test
time of internal/mempool from about 19.4s to about 1.4s.
2022-07-22 14:03:02 -04:00
Mark Rushakoff
a730905d6e Skip long cmd/tendermint/commands tests in -short mode
I added checks against testing.Short for tests that took longer than
about one second on my machine. Running with -short reduces the test
time of cmd/tendermint/commands from about 5.8s to about 0.5s.
2022-07-22 13:57:33 -04:00
Mark Rushakoff
7b853328c1 Skip long rpc/jsonrpc tests in -short mode
I added checks against testing.Short for tests that took longer than
about one second on my machine. Running with -short reduces the test
time of rpc/jsonrpc from about 8.3s to about 2.3s.
2022-07-22 13:54:03 -04:00
Mark Rushakoff
d0a88e5d2d Skip long rpc/jsonrpc/client tests in -short mode
I added checks against testing.Short for tests that took longer than
about one second on my machine. Running with -short reduces the test
time of rpc/jsonrpc/client from about 9.2s to about 0.5s.
2022-07-22 13:52:27 -04:00
Mark Rushakoff
9918b6e89f Skip long light/provider/http tests in -short mode
I added checks against testing.Short for tests that took longer than
about one second on my machine. Running with -short reduces the test
time of light/provider/http from about 20s to about 0.3s.
2022-07-22 11:59:12 -04:00
Mark Rushakoff
6daef21b52 Skip long internal/p2p/conn tests in -short mode
I added checks against testing.Short for tests that took longer than
about one second on my machine. Running with -short reduces the test
time of internal/p2p/conn from about 21.7s to about 1.9s.
2022-07-22 11:51:21 -04:00
Mark Rushakoff
4ee92a6a15 Skip long types tests in -short mode
I added checks against testing.Short for tests that took longer than
about one second on my machine. Running with -short reduces the test
time of types from about 21s to about 1.9s with the race detector
enabled. With the race detector disabled, the timing difference is about
1.0s to about 0.3s.
2022-07-22 11:47:28 -04:00
Mark Rushakoff
76effdb618 Skip long internal/p2p tests in -short mode
I added checks against testing.Short for tests that took longer than
about one second on my machine. Running with -short reduces the test
time of internal/p2p from about 29s to about 5.4s.
2022-07-22 11:34:44 -04:00
Mark Rushakoff
4f0a85272e Skip long node tests in -short mode
I added checks against testing.Short for tests that took longer than
about one second on my machine. Running with -short reduces the test
time of node from about 7.7s to about 0.9s.

The difference is much more pronounced with the race detector enabled,
about 33s without -short and about 1.4s with -short.
2022-07-22 11:27:02 -04:00
Mark Rushakoff
e08cb3cb8e Skip long light tests in -short mode
I added checks against testing.Short for tests that took longer than
about one second on my machine. Running with -short reduces the test
time of light from about 21s to about 0.9s.
2022-07-22 11:22:10 -04:00
Mark Rushakoff
2cdf1f0806 Skip long rpc/client tests in -short mode
I added checks against testing.Short for tests that took longer than
about one second on my machine. Running with -short reduces the test
time of rpc/client from about 28s to about 3.6s.
2022-07-22 11:17:04 -04:00
Mark Rushakoff
af1f81072d Skip long internal/statesync tests in -short mode
I added checks against testing.Short for tests that took longer than
about one second on my machine. Running with -short reduces the test
time of internal/statesync from about 54s to about 1.5s.
2022-07-22 11:06:54 -04:00
Mark Rushakoff
d074a59bb5 Skip long internal/consensus tests in -short mode
I added checks against testing.Short for tests that took longer than
about one second on my machine. Running with -short reduces the test
time of internal/consensus from about 64s to about 10s.
2022-07-22 10:53:34 -04:00
dependabot[bot]
023c21f307 build(deps): Bump github.com/golangci/golangci-lint from 1.47.1 to 1.47.2 (#9070)
Bumps [github.com/golangci/golangci-lint](https://github.com/golangci/golangci-lint) from 1.47.1 to 1.47.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/golangci/golangci-lint/releases">github.com/golangci/golangci-lint's releases</a>.</em></p>
<blockquote>
<h2>v1.47.2</h2>
<h2>Changelog</h2>
<ul>
<li>61673b34 revive: ignore slow rules (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2999">#2999</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/golangci/golangci-lint/blob/master/CHANGELOG.md">github.com/golangci/golangci-lint's changelog</a>.</em></p>
<blockquote>
<h3>v1.47.2</h3>
<ol>
<li>updated linters:
<ul>
<li><code>revive</code>: ignore slow rules</li>
</ul>
</li>
</ol>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="61673b3436"><code>61673b3</code></a> revive: ignore slow rules (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2999">#2999</a>)</li>
<li><a href="3fb60a3e8a"><code>3fb60a3</code></a> build(deps): bump terser from 5.12.0 to 5.14.2 in /docs (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2998">#2998</a>)</li>
<li><a href="dc0237854f"><code>dc02378</code></a> docs: Update documentation and assets (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2996">#2996</a>)</li>
<li>See full diff in <a href="https://github.com/golangci/golangci-lint/compare/v1.47.1...v1.47.2">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/golangci/golangci-lint&package-manager=go_modules&previous-version=1.47.1&new-version=1.47.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2022-07-22 14:16:44 +00:00
dependabot[bot]
65c0fba564 build(deps): Bump github.com/BurntSushi/toml from 1.1.0 to 1.2.0 (#9061)
Bumps [github.com/BurntSushi/toml](https://github.com/BurntSushi/toml) from 1.1.0 to 1.2.0.
- [Release notes](https://github.com/BurntSushi/toml/releases)
- [Commits](https://github.com/BurntSushi/toml/compare/v1.1.0...v1.2.0)

---
updated-dependencies:
- dependency-name: github.com/BurntSushi/toml
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-21 09:20:01 -04:00
M. J. Fromberger
87708b8ae7 Forward-port changelog for v0.35.9 to master. (#9059) 2022-07-21 08:22:23 +00:00
dependabot[bot]
d320b3088e build(deps): Bump github.com/golangci/golangci-lint from 1.47.0 to 1.47.1 (#9044)
Bumps [github.com/golangci/golangci-lint](https://github.com/golangci/golangci-lint) from 1.47.0 to 1.47.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/golangci/golangci-lint/releases">github.com/golangci/golangci-lint's releases</a>.</em></p>
<blockquote>
<h2>v1.47.1</h2>
<h2>Changelog</h2>
<ul>
<li>a91463cd build(deps): bump github.com/daixiang0/gci from 0.4.2 to 0.4.3 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2992">#2992</a>)</li>
<li>4c8bdc70 build(deps): bump github.com/sivchari/tenv from 1.6.0 to 1.7.0 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2988">#2988</a>)</li>
<li>4e60e8a8 gci: fix options display (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2989">#2989</a>)</li>
<li>fd87bd1e gci: remove the use of stdin (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2984">#2984</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/golangci/golangci-lint/blob/master/CHANGELOG.md">github.com/golangci/golangci-lint's changelog</a>.</em></p>
<blockquote>
<h3>v1.47.1</h3>
<ol>
<li>updated linters:
<ul>
<li><code>gci</code>: from 0.4.2 to 0.4.3</li>
<li><code>gci</code>: remove the use of stdin</li>
<li><code>gci</code>: fix options display</li>
<li><code>tenv</code>: from 1.6.0 to 1.7.0</li>
<li><code>unparam</code>: bump to HEAD</li>
</ul>
</li>
</ol>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="ebd6dcbf92"><code>ebd6dcb</code></a> Revert 'fix: generics (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2991">#2991</a>)' (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2995">#2995</a>)</li>
<li><a href="c39bf96129"><code>c39bf96</code></a> fix: disable structcheck for go &gt;= 1.18 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2994">#2994</a>)</li>
<li><a href="a91463cde4"><code>a91463c</code></a> build(deps): bump github.com/daixiang0/gci from 0.4.2 to 0.4.3 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2992">#2992</a>)</li>
<li><a href="eb16e701db"><code>eb16e70</code></a> fix: generics (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2991">#2991</a>)</li>
<li><a href="4e60e8a894"><code>4e60e8a</code></a> gci: fix options display (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2989">#2989</a>)</li>
<li><a href="4c8bdc70cc"><code>4c8bdc7</code></a> build(deps): bump github.com/sivchari/tenv from 1.6.0 to 1.7.0 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2988">#2988</a>)</li>
<li><a href="fd87bd1efb"><code>fd87bd1</code></a> gci: remove the use of stdin (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2984">#2984</a>)</li>
<li><a href="a913b3e955"><code>a913b3e</code></a> docs: Update documentation and assets (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2981">#2981</a>)</li>
<li>See full diff in <a href="https://github.com/golangci/golangci-lint/compare/v1.47.0...v1.47.1">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/golangci/golangci-lint&package-manager=go_modules&previous-version=1.47.0&new-version=1.47.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2022-07-21 01:50:14 +00:00
dependabot[bot]
e33635a601 build(deps): Bump terser from 4.8.0 to 4.8.1 in /docs (#9051) 2022-07-20 17:20:31 -07:00
M. J. Fromberger
fa32078ceb Fix unbounded heap growth in the priority mempool. (#9052)
This is a manual forward-port of #8944 and related fixes from v0.35.x.

One difference of note is that the CheckTx response messages no longer have a
field to record an error from the ABCI application. The code is set up so that
these could be reported directly to the CheckTx caller, but it would be an API
change, and right now a bunch of test plumbing depends on the existing semantics.

Also fix up tests relying on implementation-specific mempool behavior.

- Commit was setting the expected mempool size incorrectly.
- Fix sequence test not to depend on the incorrect size.
2022-07-20 14:37:13 -07:00
M. J. Fromberger
fc3a24a669 Disable upload-coverage-report workflow in CI. (#9056)
As far as I know nobody looks at these reports anyway, and lately
the codecov API has been failing for an expired certificate.
2022-07-20 12:21:14 -07:00
M. J. Fromberger
525624f1ce Fix a typo in the RFC ToC (#9047) 2022-07-20 10:01:23 +00:00
M. J. Fromberger
8a815417b4 RFC 021: The Future of the Socket Protocol (#8584) 2022-07-19 16:47:11 -07:00
dependabot[bot]
066b7a9999 build(deps): Bump github.com/golangci/golangci-lint from 1.46.0 to 1.47.0 (#9038)
Bumps [github.com/golangci/golangci-lint](https://github.com/golangci/golangci-lint) from 1.46.0 to 1.47.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/golangci/golangci-lint/releases">github.com/golangci/golangci-lint's releases</a>.</em></p>
<blockquote>
<h2>v1.47.0</h2>
<h2>Changelog</h2>
<ul>
<li>b4154027 Add linter <code>asasalint</code> to lint pass []any as any (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2968">#2968</a>)</li>
<li>1d8a15a0 add nosnakecase lint (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2828">#2828</a>)</li>
<li>2a1edcef build(deps): bump github.com/Antonboom/errname from 0.1.6 to 0.1.7 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2888">#2888</a>)</li>
<li>c766184c build(deps): bump github.com/GaijinEntertainment/go-exhaustruct/v2 from 2.1.0 to 2.2.0 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2916">#2916</a>)</li>
<li>b8f1e2a5 build(deps): bump github.com/daixiang0/gci from 0.3.4 to 0.4.0 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2965">#2965</a>)</li>
<li>5e183652 build(deps): bump github.com/daixiang0/gci from 0.4.0 to 0.4.1 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2973">#2973</a>)</li>
<li>e60937a1 build(deps): bump github.com/daixiang0/gci from 0.4.1 to 0.4.2 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2979">#2979</a>)</li>
<li>98c811d0 build(deps): bump github.com/firefart/nonamedreturns from 1.0.1 to 1.0.2 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2929">#2929</a>)</li>
<li>023e1c4f build(deps): bump github.com/firefart/nonamedreturns from 1.0.2 to 1.0.4 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2944">#2944</a>)</li>
<li>7fbb11ca build(deps): bump github.com/fzipp/gocyclo from 0.5.1 to 0.6.0 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2926">#2926</a>)</li>
<li>db5d58cd build(deps): bump github.com/hashicorp/go-version from 1.4.0 to 1.5.0 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2873">#2873</a>)</li>
<li>f75b1a8b build(deps): bump github.com/hashicorp/go-version from 1.5.0 to 1.6.0 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2958">#2958</a>)</li>
<li>75be924e build(deps): bump github.com/kisielk/errcheck from 1.6.0 to 1.6.1 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2871">#2871</a>)</li>
<li>33f4aeeb build(deps): bump github.com/kulti/thelper from 0.6.2 to 0.6.3 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2872">#2872</a>)</li>
<li>6a412d3d build(deps): bump github.com/kunwardeep/paralleltest from 1.0.3 to 1.0.4 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2907">#2907</a>)</li>
<li>97eea6ea build(deps): bump github.com/kunwardeep/paralleltest from 1.0.4 to 1.0.6 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2918">#2918</a>)</li>
<li>3a0f646e build(deps): bump github.com/maratori/testpackage from 1.0.1 to 1.1.0 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2945">#2945</a>)</li>
<li>92d7022d build(deps): bump github.com/nishanths/exhaustive from 0.7.11 to 0.8.1 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2906">#2906</a>)</li>
<li>97d7415b build(deps): bump github.com/quasilyte/go-ruleguard/dsl from 0.3.19 to 0.3.21 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2874">#2874</a>)</li>
<li>0e3730d3 build(deps): bump github.com/securego/gosec/v2 from 2.11.0 to 2.12.0 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2925">#2925</a>)</li>
<li>ac99dbcc build(deps): bump github.com/shirou/gopsutil/v3 from 3.22.4 to 3.22.5 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2908">#2908</a>)</li>
<li>8e0a6725 build(deps): bump github.com/shirou/gopsutil/v3 from 3.22.5 to 3.22.6 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2959">#2959</a>)</li>
<li>c8e38c4b build(deps): bump github.com/sivchari/tenv from 1.5.0 to 1.6.0 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2927">#2927</a>)</li>
<li>f70bf666 build(deps): bump github.com/spf13/cobra from 1.4.0 to 1.5.0 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2933">#2933</a>)</li>
<li>153b4072 build(deps): bump github.com/spf13/viper from 1.11.0 to 1.12.0 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2889">#2889</a>)</li>
<li>f03a5207 build(deps): bump github.com/stretchr/testify from 1.7.1 to 1.7.2 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2917">#2917</a>)</li>
<li>e33e63ed build(deps): bump github.com/stretchr/testify from 1.7.2 to 1.7.4 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2934">#2934</a>)</li>
<li>44e9b34d build(deps): bump github.com/stretchr/testify from 1.7.4 to 1.7.5 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2942">#2942</a>)</li>
<li>bb5b6625 build(deps): bump github.com/stretchr/testify from 1.7.5 to 1.8.0 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2957">#2957</a>)</li>
<li>2c30625c build(deps): bump github.com/tomarrell/wrapcheck/v2 from 2.6.1 to 2.6.2 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2928">#2928</a>)</li>
<li>9317da6c build(deps): bump github.com/uudashr/gocognit from 1.0.5 to 1.0.6 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2962">#2962</a>)</li>
<li>3071fecb build(deps): bump gitlab.com/bosi/decorder from 0.2.1 to 0.2.2 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2943">#2943</a>)</li>
<li>d92f144d build(deps): bump goreleaser/goreleaser-action from 2 to 3 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2876">#2876</a>)</li>
<li>ddee31ae build(deps): bump honnef.co/go/tools from 0.3.1 to 0.3.2 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2870">#2870</a>)</li>
<li>9ebc2d52 build(deps): bump moment from 2.29.2 to 2.29.4 in /.github/contributors (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2966">#2966</a>)</li>
<li>f9d81511 bump golang.org/x/tools to HEAD (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2875">#2875</a>)</li>
<li>de7cc56e chore: remove reviewers from dependabot configuration (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2932">#2932</a>)</li>
<li>86bd8423 chore: spelling and grammar fixes (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2865">#2865</a>)</li>
<li>4b218e66 config: spread go version on linter's configurations (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2913">#2913</a>)</li>
<li>ae2a9688 depguard: adjust phrasing (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2921">#2921</a>)</li>
<li>f2634d40 fix: codeQL scanning (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2882">#2882</a>)</li>
<li>2f41c1f0 gci: fix issues and re-enable autofix (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2892">#2892</a>)</li>
<li>c531fc2a gosec: allow <code>global</code> config (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2880">#2880</a>)</li>
<li>0abb2981 staticcheck: fix generics (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2976">#2976</a>)</li>
</ul>
<h2>v1.46.2</h2>
<h2>Changelog</h2>
<ul>
<li>a3336890 build(deps): bump golangci/golangci-lint-action from 3.1.0 to 3.2.0 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2858">#2858</a>)</li>
</ul>

</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/golangci/golangci-lint/blob/master/CHANGELOG.md">github.com/golangci/golangci-lint's changelog</a>.</em></p>
<blockquote>
<h3>v1.47.0</h3>
<ol>
<li>new linters:
<ul>
<li><code>asasalint</code>: <a href="https://github.com/alingse/asasalint">https://github.com/alingse/asasalint</a></li>
<li><code>nosnakecase</code>: <a href="https://github.com/sivchari/nosnakecase">https://github.com/sivchari/nosnakecase</a></li>
</ul>
</li>
<li>updated linters:
<ul>
<li><code>errname</code>: from 0.1.6 to 0.1.7</li>
<li><code>gci</code>: from 0.3.4 to 0.4.2</li>
<li><code>nonamedreturns</code>: from 1.0.1 to 1.0.4</li>
<li><code>gocyclo</code>: from 0.5.1 to 0.6.0</li>
<li><code>go-exhaustruct</code>: from 2.1.0 to 2.2.0</li>
<li><code>errcheck</code>: from 1.6.0 to 1.6.1</li>
<li><code>thelper</code>: from 0.6.2 to 0.6.3</li>
<li><code>paralleltest</code>: from 1.0.3 to 1.0.6</li>
<li><code>testpackage</code>: from 1.0.1 to 1.1.0</li>
<li><code>exhaustive</code>: from 0.7.11 to 0.8.1</li>
<li><code>go-ruleguard</code>: from 0.3.19 to 0.3.21</li>
<li><code>gosec</code>: from 2.11.0 to 2.12.0</li>
<li><code>tenv</code>: from 1.5.0 to 1.6.0</li>
<li><code>wrapcheck</code>: from 2.6.1 to 2.6.2</li>
<li><code>gocognit</code>: from 1.0.5 to 1.0.6</li>
<li><code>decorder</code>: from 0.2.1 to 0.2.2</li>
<li><code>honnef.co/go/tools</code>: from 0.3.1 to 0.3.2</li>
<li><code>golang.org/x/tools</code>: bump to HEAD</li>
<li><code>gci</code>: fix issues and re-enable autofix</li>
<li><code>gosec</code>: allow <code>global</code> config</li>
<li><code>staticcheck</code>: fix generics</li>
</ul>
</li>
<li>documentation:
<ul>
<li>add thanks page</li>
<li>add a clear explanation about the <code>staticcheck</code> integration.</li>
<li><code>depguard</code>: add <code>ignore-file-rules</code></li>
<li><code>depguard</code>: adjust phrasing</li>
<li><code>gocritic</code>: add <code>enable</code> and <code>disable</code> ruleguard settings</li>
<li><code>gomnd</code>: fix typo</li>
<li><code>gosec</code>: add configs for all existing rules</li>
<li><code>govet</code>: add settings for <code>shadow</code> and <code>unusedresult</code></li>
<li><code>thelper</code>: add <code>fuzz</code> config and description</li>
<li>linters: add defaults</li>
</ul>
</li>
</ol>
<h3>v1.46.2</h3>
<ol>
<li>updated linters:
<ul>
<li><code>execinquery</code>: bump from v1.2.0 to v1.2.1</li>
<li><code>errorlint</code>: bump to v1.0.0</li>
<li><code>thelper</code>: allow to disable one option</li>
</ul>
</li>
<li>documentation:
<ul>
<li>rename <code>.golangci.example.yml</code> to <code>.golangci.reference.yml</code></li>
<li>add <code>containedctx</code> linter to the list of available linters</li>
</ul>
</li>
</ol>
<h3>v1.46.1</h3>

</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="b415402720"><code>b415402</code></a> Add linter <code>asasalint</code> to lint pass []any as any (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2968">#2968</a>)</li>
<li><a href="e60937a179"><code>e60937a</code></a> build(deps): bump github.com/daixiang0/gci from 0.4.1 to 0.4.2 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2979">#2979</a>)</li>
<li><a href="27f921fa14"><code>27f921f</code></a> dev: use directives instead of comments for tests (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2978">#2978</a>)</li>
<li><a href="0abb298136"><code>0abb298</code></a> staticcheck: fix generics (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2976">#2976</a>)</li>
<li><a href="d6a39ef374"><code>d6a39ef</code></a> dev: remove kortschak from generated team (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2974">#2974</a>)</li>
<li><a href="5e183652ba"><code>5e18365</code></a> build(deps): bump github.com/daixiang0/gci from 0.4.0 to 0.4.1 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2973">#2973</a>)</li>
<li><a href="ed4befe5ef"><code>ed4befe</code></a> dev: change err to nil (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2971">#2971</a>)</li>
<li><a href="9ebc2d5237"><code>9ebc2d5</code></a> build(deps): bump moment from 2.29.2 to 2.29.4 in /.github/contributors (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2966">#2966</a>)</li>
<li><a href="b050b42309"><code>b050b42</code></a> build(deps): bump moment from 2.29.2 to 2.29.4 in /docs (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2967">#2967</a>)</li>
<li><a href="b8f1e2a549"><code>b8f1e2a</code></a> build(deps): bump github.com/daixiang0/gci from 0.3.4 to 0.4.0 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2965">#2965</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/golangci/golangci-lint/compare/v1.46.0...v1.47.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/golangci/golangci-lint&package-manager=go_modules&previous-version=1.46.0&new-version=1.47.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2022-07-19 13:13:02 +00:00
Rishabh Goel
48f3062d9d Updated potential errors in abci.md (#9003)
Co-authored-by: Callum Waters <cmwaters19@gmail.com>
Co-authored-by: Josef Widder <44643235+josef-widder@users.noreply.github.com>
2022-07-18 10:50:55 +02:00
Sam Kleinman
cc07318866 migration: scope key migration to stores (#9005) 2022-07-15 21:14:18 -04:00
dependabot[bot]
503ddf1c4d build(deps): Bump github.com/prometheus/common from 0.36.0 to 0.37.0 (#9013)
Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.36.0 to 0.37.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/prometheus/common/releases">github.com/prometheus/common's releases</a>.</em></p>
<blockquote>
<h2>sigv4/v0.1.0</h2>
<p>Initial release</p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="49b36038ae"><code>49b3603</code></a> Improve OAuth2 user agent handling (<a href="https://github-redirect.dependabot.com/prometheus/common/issues/391">#391</a>)</li>
<li>See full diff in <a href="https://github.com/prometheus/common/compare/v0.36.0...v0.37.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/prometheus/common&package-manager=go_modules&previous-version=0.36.0&new-version=0.37.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2022-07-15 16:10:24 +00:00
M. J. Fromberger
18b5a500da Extract a library from the confix command-line tool. (#9012)
Pull out the library functionality from scripts/confix and move it to
internal/libs/confix. Replace scripts/confix with a simple stub that has the
same command-line API, but uses the library instead.

Related:

- Move and update unit tests.
- Move scripts/confix/condiff to scripts/condiff.
- Update test data for v34, v35, and v36.
- Update reference diffs.
- Update testdata README.
2022-07-15 07:29:34 -07:00
dependabot[bot]
d2db54ae9a build(deps): Bump pgregory.net/rapid from 0.4.7 to 0.4.8 (#9014)
Bumps [pgregory.net/rapid](https://github.com/flyingmutant/rapid) from 0.4.7 to 0.4.8.
<details>
<summary>Commits</summary>
<ul>
<li><a href="110d7a5dd1"><code>110d7a5</code></a> persist: bump rapid version</li>
<li><a href="94a73e7be2"><code>94a73e7</code></a> Remove shrinking-challenge tests</li>
<li><a href="1a852a237b"><code>1a852a2</code></a> persist: bump rapid version</li>
<li><a href="bc396c3ffa"><code>bc396c3</code></a> persist: put failfiles under testdata/rapid/ subdirectories</li>
<li><a href="5408033e60"><code>5408033</code></a> ci: test on Go 1.18</li>
<li><a href="dd3e976d4d"><code>dd3e976</code></a> Document concurrent usage of *T</li>
<li><a href="a0267553f2"><code>a026755</code></a> Expose TB interface</li>
<li><a href="32f9d9b0a8"><code>32f9d9b</code></a> ci: test on Go 1.17</li>
<li><a href="ef97f657bb"><code>ef97f65</code></a> Avoid division in genFloat01()</li>
<li>See full diff in <a href="https://github.com/flyingmutant/rapid/compare/v0.4.7...v0.4.8">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=pgregory.net/rapid&package-manager=go_modules&previous-version=0.4.7&new-version=0.4.8)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2022-07-15 13:24:17 +00:00
Sergio Mena
31457ad361 typo (#9001) 2022-07-15 12:01:29 +02:00
M. J. Fromberger
4214d998f2 Forward-port point release changelogs from v0.35.x. (#9011) 2022-07-14 18:43:38 -07:00
William Banfield
c1c501ecd4 config: update config to reflect simple-priority queue (#9007)
Update the queue documentation to reflect the types of queues and current default queue.
2022-07-14 20:19:53 +00:00
kuniseichi
b71ec8c83f doc: fix typos in quick-start.md. (#8990) 2022-07-13 07:04:17 -07:00
dependabot[bot]
b421138e53 build(deps): Bump google.golang.org/grpc from 1.47.0 to 1.48.0 (#8993)
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.47.0 to 1.48.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.48.0</h2>
<h1>Bug Fixes</h1>
<ul>
<li>xds/priority: fix bug that could prevent higher priorities from receiving config updates (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5417">#5417</a>)</li>
<li>RLS load balancer: don't propagate the status code returned on control plane RPCs to data plane RPCs (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5400">#5400</a>)</li>
</ul>
<h1>New Features</h1>
<ul>
<li>stats: add support for multiple stats handlers in a single client or server (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5347">#5347</a>)</li>
<li>gcp/observability: add experimental OpenCensus tracing/metrics support (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5372">#5372</a>)</li>
<li>xds: enable aggregate and logical DNS clusters by default (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5380">#5380</a>)</li>
<li>credentials/google (for xds): support xdstp C2P cluster names (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5399">#5399</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="6417495520"><code>6417495</code></a> Change version to 1.48.0 (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5482">#5482</a>)</li>
<li><a href="5770b1dea5"><code>5770b1d</code></a> xds: drop localities with zero weight at the xdsClient layer (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5476">#5476</a>)</li>
<li><a href="423cd8e3ad"><code>423cd8e</code></a> interop: update proto to make vet happy (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5475">#5475</a>)</li>
<li><a href="c9b16c884c"><code>c9b16c8</code></a> transport: remove unused <code>bufWriter.onFlush()</code> (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5464">#5464</a>)</li>
<li><a href="755bf5a191"><code>755bf5a</code></a> fix typo in the binary log (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5467">#5467</a>)</li>
<li><a href="15739b5c88"><code>15739b5</code></a> health: split imports into healthpb and healthgrpc (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5466">#5466</a>)</li>
<li><a href="c075d2011c"><code>c075d20</code></a> interop client: provide new flag, --soak_min_time_ms_between_rpcs (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5421">#5421</a>)</li>
<li><a href="4b750055a5"><code>4b75005</code></a> clusterresolver: merge P(p)arseConfig functions (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5462">#5462</a>)</li>
<li><a href="d883f3d5fa"><code>d883f3d</code></a> test/xds: fail only when state changes to something other than READY and IDLE...</li>
<li><a href="c6ee1c7144"><code>c6ee1c7</code></a> xdsclient: only include nodeID in error strings, not the whole nodeProto (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5461">#5461</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/grpc/grpc-go/compare/v1.47.0...v1.48.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=google.golang.org/grpc&package-manager=go_modules&previous-version=1.47.0&new-version=1.48.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2022-07-13 13:49:52 +00:00
Sam Kleinman
e9239e9ca8 p2p: switch default queue implementation (#8976) 2022-07-12 12:20:17 +00:00
dependabot[bot]
136b62762f build(deps): Bump github.com/prometheus/common from 0.35.0 to 0.36.0 (#8980)
Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.35.0 to 0.36.0.
- [Release notes](https://github.com/prometheus/common/releases)
- [Commits](https://github.com/prometheus/common/compare/v0.35.0...v0.36.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/common
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-12 08:00:55 -04:00
Sam Kleinman
d5fb82e414 p2p: make p2p.Channel an interface (#8967)
This is (#8446) pulled from the `main/libp2p` branch but without any
of the libp2p content, and is perhaps the easiest first step to enable
pluggability at the peer layer, and makes it possible hoist shims
(including for, say 0.34) into tendermint without touching the reactors.
2022-07-11 20:22:40 +00:00
Rootul Patel
6902fa9282 Fix punctuation (#8972) 2022-07-11 07:14:54 -07:00
Sam Kleinman
61ce384d75 p2p: make peer gossiping coinflip safer (#8949)
Closes #8948
2022-07-08 14:06:57 +00:00
Sam Kleinman
636320f901 p2p: delete cruft (#8958)
I think the decision in #8806 is that we shouldn't do this yet, so I think it's best to just drop this.
2022-07-07 16:29:50 +00:00
Sam Kleinman
d1a16e8ff0 p2p: simpler priority queue (#8929) 2022-07-07 12:13:52 -04:00
Callum Waters
27c523dccb mempool: return error when mempool is full and inbound tx is rejected (#8942)
Addresses: https://github.com/tendermint/tendermint/issues/8928
2022-07-06 18:17:56 +00:00
yihuang
be6d74e657 Work around indexing problem for duplicate transactions (forward port: #8625) (#8945)
Port the bug fix terra-money#76 to upstream. This is critical for ethermint json-rpc to work.

fix: prevent duplicate tx index if it succeeded before
fix: use CodeTypeOk instead of 0
fix: handle duplicate txs within the same block
Co-authored-by: jess jesse@soob.co

ref: #5281

Co-authored-by: M. J. Fromberger <fromberger@interchain.io>
2022-07-06 14:05:48 -04:00
samricotta
70e7372c4a added name to CO (#8947)
Co-authored-by: Samantha Ricotta <samantharicotta@Samanthas-MacBook-Pro.local>
2022-07-06 14:30:45 +02:00
Sergio Mena
2b5329ae47 Typos in spec (#8939) 2022-07-06 00:02:29 +02:00
Hernán Vanzetto
3cde9a0bbc abci-cli: Add process_proposal command to abci-cli (#8901)
* Add `process_proposal` command to abci-cli

* Added process proposal to the 'tutorial' examples

* Added entry in CHANGELOG_PENDING.md

* Allow empty blocks in PrepareProposal, ProcessProposal, and FinalizeBlock

* Fix minimum arguments

* Add tests for empty block

* Updated abci-cli doc

Co-authored-by: Sergio Mena <sergio@informal.systems>
Co-authored-by: Jasmina Malicevic <jasmina.dustinac@gmail.com>
2022-07-05 15:08:58 +02:00
dependabot[bot]
d8de2d85c0 build(deps): Bump github.com/libp2p/go-buffer-pool from 0.0.2 to 0.1.0 (#8932) 2022-07-05 12:12:15 +02:00
Sergio Mena
331860c2a8 Restore Commit to the ABCI++ spec, and other late modifications (#8796)
* Added VoteExtensionsEnableHeight

* Fix reference to `modified`

* Removed old pseudo-code, now included in spec

* Removed markdown warnings in abci++_basic_concepts_002_draft.md

* Restored `Commit` in the Methods section

* Addressed remaining markdown warnings

* Revisited intro and basic concepts section

* Extra pass at all spec sections to recover Commit, and other ABCI++ spec modifications

* Fixed links

* make proto-gen

* Remove _primes_ from spec notation

* Update proto/tendermint/abci/types.proto

Co-authored-by: Callum Waters <cmwaters19@gmail.com>

* Update spec/abci++/abci++_tmint_expected_behavior_002_draft.md

Co-authored-by: Callum Waters <cmwaters19@gmail.com>

* Addressed @cmwaters' comments

* Addressed @angbrav's and @mpoke's comments on spec

* make proto-gen

* Fix MD anchor reference

* Clarify throughout the spec when `ProcessProposal` and `VerifyVoteExtension` are called

* Update spec/abci++/abci++_app_requirements_002_draft.md

Co-authored-by: M. J. Fromberger <fromberger@interchain.io>

* Update spec/abci++/abci++_app_requirements_002_draft.md

Co-authored-by: M. J. Fromberger <fromberger@interchain.io>

* Update spec/abci++/abci++_app_requirements_002_draft.md

Co-authored-by: William Banfield <4561443+williambanfield@users.noreply.github.com>

* Update spec/abci++/abci++_basic_concepts_002_draft.md

Co-authored-by: William Banfield <4561443+williambanfield@users.noreply.github.com>

* Update spec/abci++/abci++_basic_concepts_002_draft.md

Co-authored-by: M. J. Fromberger <fromberger@interchain.io>

* Update spec/abci++/abci++_basic_concepts_002_draft.md

Co-authored-by: William Banfield <4561443+williambanfield@users.noreply.github.com>

* Update spec/abci++/abci++_methods_002_draft.md

Co-authored-by: M. J. Fromberger <fromberger@interchain.io>

* Update spec/abci++/abci++_tmint_expected_behavior_002_draft.md

Co-authored-by: William Banfield <4561443+williambanfield@users.noreply.github.com>

* Addresed comments

* Renamed 'draft' files

* Adatped links to new filenames

* Fixed links and minor cosmetic changes

* Renamed 'byzantine_validators' to 'misbehavior' in ABCI++ spec and protobufs

* make proto-gen

* Renamed 'byzantine_validators' to 'misbehavior' in the code

* Fixed link

* Update spec/abci++/abci++_basic_concepts.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_basic_concepts.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_basic_concepts.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_basic_concepts.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_basic_concepts.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_basic_concepts.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_basic_concepts.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_basic_concepts.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_basic_concepts.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_basic_concepts.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_basic_concepts.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_basic_concepts.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_basic_concepts.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_basic_concepts.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_basic_concepts.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_basic_concepts.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_basic_concepts.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_basic_concepts.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_basic_concepts.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_basic_concepts.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_basic_concepts.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_basic_concepts.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_methods.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_methods.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_methods.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_methods.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_methods.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_methods.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_methods.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_methods.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_methods.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_methods.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_methods.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_methods.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_methods.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_methods.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_methods.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_methods.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_methods.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_methods.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_methods.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_methods.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_methods.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_methods.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_methods.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_methods.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_methods.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_methods.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_methods.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_methods.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Addressed @cason's comments

* Clarified conditions for `ProcessProposal` call at proposer

Co-authored-by: Callum Waters <cmwaters19@gmail.com>
Co-authored-by: M. J. Fromberger <fromberger@interchain.io>
Co-authored-by: William Banfield <4561443+williambanfield@users.noreply.github.com>
Co-authored-by: Daniel <daniel.cason@usi.ch>
2022-07-04 16:25:48 +02:00
dependabot[bot]
6d8079559b build(deps): Bump github.com/vektra/mockery/v2 from 2.13.1 to 2.14.0 (#8924)
Bumps [github.com/vektra/mockery/v2](https://github.com/vektra/mockery) from 2.13.1 to 2.14.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/vektra/mockery/releases">github.com/vektra/mockery/v2's releases</a>.</em></p>
<blockquote>
<h2>v2.14.0</h2>
<h2>Changelog</h2>
<ul>
<li>8582bd6 Add test for getLocalizedPath</li>
<li>686b90c Apply PR comments</li>
<li>de0cade Merge pull request <a href="https://github-redirect.dependabot.com/vektra/mockery/issues/474">#474</a> from RSid/add-flag-documentation</li>
<li>1fa7d2f Merge pull request <a href="https://github-redirect.dependabot.com/vektra/mockery/issues/480">#480</a> from vektra/LandonTClipp-patch-1</li>
<li>4d1f925 Merge pull request <a href="https://github-redirect.dependabot.com/vektra/mockery/issues/484">#484</a> from LouisBrunner/fix_generics_with_expecter</li>
<li>519a84f Merge pull request <a href="https://github-redirect.dependabot.com/vektra/mockery/issues/486">#486</a> from abhinavnair/replace-ioutil</li>
<li>2ca0b83 Merge pull request <a href="https://github-redirect.dependabot.com/vektra/mockery/issues/488">#488</a> from vektra/getLocalizedPath_test</li>
<li>cc82d49 Replace deprecated ioutil pkg with os &amp; io</li>
<li>a420307 Update README.md</li>
<li>4e4a96b Update issue template</li>
<li>fa182fe add documentation to readme</li>
<li>e4954a2 fix: add support for with-expecter when using generics</li>
<li>ca9ddd4 update issue template</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="4d1f925ad5"><code>4d1f925</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/vektra/mockery/issues/484">#484</a> from LouisBrunner/fix_generics_with_expecter</li>
<li><a href="de0cade475"><code>de0cade</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/vektra/mockery/issues/474">#474</a> from RSid/add-flag-documentation</li>
<li><a href="2ca0b83ade"><code>2ca0b83</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/vektra/mockery/issues/488">#488</a> from vektra/getLocalizedPath_test</li>
<li><a href="8582bd63c8"><code>8582bd6</code></a> Add test for getLocalizedPath</li>
<li><a href="519a84f8de"><code>519a84f</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/vektra/mockery/issues/486">#486</a> from abhinavnair/replace-ioutil</li>
<li><a href="cc82d49a73"><code>cc82d49</code></a> Replace deprecated ioutil pkg with os &amp; io</li>
<li><a href="e4954a2411"><code>e4954a2</code></a> fix: add support for with-expecter when using generics</li>
<li><a href="ca9ddd4e97"><code>ca9ddd4</code></a> update issue template</li>
<li><a href="686b90cccf"><code>686b90c</code></a> Apply PR comments</li>
<li><a href="1fa7d2f723"><code>1fa7d2f</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/vektra/mockery/issues/480">#480</a> from vektra/LandonTClipp-patch-1</li>
<li>Additional commits viewable in <a href="https://github.com/vektra/mockery/compare/v2.13.1...v2.14.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/vektra/mockery/v2&package-manager=go_modules&previous-version=2.13.1&new-version=2.14.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2022-07-01 14:17:45 +00:00
Ian Jungyong Um
1d96faa35a p2p: fix typo (#8922)
Fix minor typos in peermanager
2022-07-01 12:44:39 +00:00
William Banfield
921530c352 p2p: use correct context error (#8916)
handshakeCtx is the internal context carrying the timeout. Its error should be used for the error return.
2022-06-30 22:02:59 +00:00
William Banfield
5274f80de4 p2p: fix flakey test due to disconnect cooldown (#8917)
This test was made flakey by #8839. The cooldown period means that the node in the test will not try to reconnect as quickly as the test expects. This change makes the cooldown shorter in the test so that the node quickly reconnects.
2022-06-30 21:48:10 +00:00
William Banfield
47cb30fc1d p2p: set outgoing connections to around 20% of total connections (#8913) 2022-06-30 16:51:16 -04:00
dependabot[bot]
5c26db733b build(deps): Bump github.com/stretchr/testify from 1.7.5 to 1.8.0 (#8907)
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.7.5 to 1.8.0.
<details>
<summary>Commits</summary>
<ul>
<li><a href="181cea6eab"><code>181cea6</code></a> impr: <code>CallerInfo</code> should print full paths to the terminal (<a href="https://github-redirect.dependabot.com/stretchr/testify/issues/1201">#1201</a>)</li>
<li><a href="cf1284f8dd"><code>cf1284f</code></a> Allow mock expectations to be ordered (<a href="https://github-redirect.dependabot.com/stretchr/testify/issues/1106">#1106</a>)</li>
<li><a href="66eef0ef3a"><code>66eef0e</code></a> fix: assert.MapSubset (or just support maps in assert.Subset) (<a href="https://github-redirect.dependabot.com/stretchr/testify/issues/1178">#1178</a>)</li>
<li><a href="2fab6dffcf"><code>2fab6df</code></a> Add WithinTimeRange method (<a href="https://github-redirect.dependabot.com/stretchr/testify/issues/1188">#1188</a>)</li>
<li>See full diff in <a href="https://github.com/stretchr/testify/compare/v1.7.5...v1.8.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/stretchr/testify&package-manager=go_modules&previous-version=1.7.5&new-version=1.8.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2022-06-30 16:34:43 +00:00
Sam Kleinman
60881f1d06 p2p: stop mconn channel sends without timeout (#8906) 2022-06-30 09:01:02 -04:00
Thane Thomson
3bec1668c6 e2e: Extract Docker-specific functionality (#8754)
* e2e: Extract Docker-specific functionality

Extract Docker-specific functionality and put it behind an interface
that should hopefully, without too much modification, allow us to
implement a Digital Ocean-based infrastructure provider.

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Thread contexts through all potentially long-running functions

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Drop the "API" from interface/struct/var naming

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Simplify function returns

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Rename GenerateConfig to Setup to make it more generic

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Consolidate all infra functions into a single interface

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Localize linter directives

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Look up and use complete node in ShowNodeLogs and TailNodeLogs calls

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Restructure infra provider API into a separate package

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Rename interface again

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Rename exec functions for readability

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Relocate staticcheck lint directive

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Remove staticcheck lint directive

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Make testnet infra struct private

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Only pass testnetDir to Cleanup function

Signed-off-by: Thane Thomson <connect@thanethomson.com>
2022-06-29 08:02:05 -04:00
Sam Kleinman
37f9d59969 log: do not pre-process log results (#8895)
I was digging around in the zero log functions, and the following
functions using the `Fields()` method directly in zerolog, 

- https://github.com/rs/zerolog/blob/v1.27.0/event.go#L161
- e9344a8c50/fields.go (L15)

Have meaningfully equivalent semantics and our pre-processing of
values is getting us much (except forcing zerolog to always sort our
keys, and nooping in the case when you miss the last field.)

With this change also, we can pass maps (or, pratically a single map)
to the logger, which might be a less wacky seeming interface.
2022-06-28 14:40:16 +00:00
Sam Kleinman
013b46a6c3 libs/strings: move to internal (#8890)
I think we were leaving this library public because the SDK dependend
upon it, but the function the SDK was using was one that we'd removed
because *we* weren't using it any more, and I made a PR agasint the
SDK to clean that up.

ref: https://github.com/cosmos/cosmos-sdk/pull/12368
2022-06-27 21:44:50 +00:00
dependabot[bot]
373b262f35 build(deps): Bump styfle/cancel-workflow-action from 0.9.1 to 0.10.0 (#8881)
Bumps [styfle/cancel-workflow-action](https://github.com/styfle/cancel-workflow-action) from 0.9.1 to 0.10.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/styfle/cancel-workflow-action/releases">styfle/cancel-workflow-action's releases</a>.</em></p>
<blockquote>
<h2>0.10.0</h2>
<h3>Changes</h3>
<ul>
<li>Feat(all):support for considering all workflows with one term: <a href="https://github-redirect.dependabot.com/styfle/cancel-workflow-action/issues/165">#165</a></li>
<li>Chore: rebuild: 74a81dc1a9321342ebc12fa8670cc91600c8c494</li>
<li>Chore: update <code>main.yml</code>: <a href="https://github-redirect.dependabot.com/styfle/cancel-workflow-action/issues/78">#78</a></li>
<li>Bump <code>@​vercel/ncc</code> from 0.28.6 to 0.29.1: <a href="https://github-redirect.dependabot.com/styfle/cancel-workflow-action/issues/106">#106</a></li>
<li>Bump <code>@​vercel/ncc</code> from 0.29.1 to 0.29.2: <a href="https://github-redirect.dependabot.com/styfle/cancel-workflow-action/issues/109">#109</a></li>
<li>Bump <code>@​vercel/ncc</code> from 0.29.2 to 0.30.0: <a href="https://github-redirect.dependabot.com/styfle/cancel-workflow-action/issues/112">#112</a></li>
<li>Bump husky from 7.0.1 to 7.0.2: <a href="https://github-redirect.dependabot.com/styfle/cancel-workflow-action/issues/110">#110</a></li>
<li>Bump prettier from 2.3.2 to 2.4.0: <a href="https://github-redirect.dependabot.com/styfle/cancel-workflow-action/issues/116">#116</a></li>
<li>Bump <code>@​vercel/ncc</code> from 0.30.0 to 0.31.1: <a href="https://github-redirect.dependabot.com/styfle/cancel-workflow-action/issues/115">#115</a></li>
<li>Bump typescript from 4.3.5 to 4.4.3: <a href="https://github-redirect.dependabot.com/styfle/cancel-workflow-action/issues/114">#114</a></li>
<li>Bump prettier from 2.4.0 to 2.4.1: <a href="https://github-redirect.dependabot.com/styfle/cancel-workflow-action/issues/117">#117</a></li>
<li>Bump <code>@​actions/github</code> from 4.0.0 to 5.0.0: <a href="https://github-redirect.dependabot.com/styfle/cancel-workflow-action/issues/89">#89</a></li>
<li>Bump <code>@​actions/core</code> from 1.3.0 to 1.6.0: <a href="https://github-redirect.dependabot.com/styfle/cancel-workflow-action/issues/118">#118</a></li>
<li>Bump typescript from 4.4.3 to 4.4.4: <a href="https://github-redirect.dependabot.com/styfle/cancel-workflow-action/issues/119">#119</a></li>
<li>Bump husky from 7.0.2 to 7.0.4: <a href="https://github-redirect.dependabot.com/styfle/cancel-workflow-action/issues/120">#120</a></li>
<li>Bump typescript from 4.4.4 to 4.5.2: <a href="https://github-redirect.dependabot.com/styfle/cancel-workflow-action/issues/124">#124</a></li>
<li>Bump <code>@​vercel/ncc</code> from 0.31.1 to 0.32.0: <a href="https://github-redirect.dependabot.com/styfle/cancel-workflow-action/issues/123">#123</a></li>
<li>Bump prettier from 2.4.1 to 2.5.0: <a href="https://github-redirect.dependabot.com/styfle/cancel-workflow-action/issues/125">#125</a></li>
<li>Bump prettier from 2.5.0 to 2.5.1: <a href="https://github-redirect.dependabot.com/styfle/cancel-workflow-action/issues/126">#126</a></li>
<li>Bump <code>@​vercel/ncc</code> from 0.32.0 to 0.33.0: <a href="https://github-redirect.dependabot.com/styfle/cancel-workflow-action/issues/127">#127</a></li>
<li>Bump typescript from 4.5.2 to 4.5.3: <a href="https://github-redirect.dependabot.com/styfle/cancel-workflow-action/issues/128">#128</a></li>
<li>Bump <code>@​vercel/ncc</code> from 0.33.0 to 0.33.1: <a href="https://github-redirect.dependabot.com/styfle/cancel-workflow-action/issues/130">#130</a></li>
<li>Bump typescript from 4.5.3 to 4.5.4: <a href="https://github-redirect.dependabot.com/styfle/cancel-workflow-action/issues/129">#129</a></li>
<li>Bump typescript from 4.5.4 to 4.5.5: <a href="https://github-redirect.dependabot.com/styfle/cancel-workflow-action/issues/131">#131</a></li>
<li>Bump node-fetch from 2.6.5 to 2.6.7: <a href="https://github-redirect.dependabot.com/styfle/cancel-workflow-action/issues/132">#132</a></li>
<li>Bump <code>@​vercel/ncc</code> from 0.33.1 to 0.33.3: <a href="https://github-redirect.dependabot.com/styfle/cancel-workflow-action/issues/138">#138</a></li>
<li>Bump actions/setup-node from 2 to 3.0.0: <a href="https://github-redirect.dependabot.com/styfle/cancel-workflow-action/issues/140">#140</a></li>
<li>Bump actions/checkout from 2 to 3: <a href="https://github-redirect.dependabot.com/styfle/cancel-workflow-action/issues/141">#141</a></li>
<li>Bump typescript from 4.5.5 to 4.6.2: <a href="https://github-redirect.dependabot.com/styfle/cancel-workflow-action/issues/142">#142</a></li>
<li>Bump prettier from 2.5.1 to 2.6.0: <a href="https://github-redirect.dependabot.com/styfle/cancel-workflow-action/issues/143">#143</a></li>
<li>Bump prettier from 2.6.0 to 2.6.1: <a href="https://github-redirect.dependabot.com/styfle/cancel-workflow-action/issues/145">#145</a></li>
<li>Bump actions/setup-node from 3.0.0 to 3.1.0: <a href="https://github-redirect.dependabot.com/styfle/cancel-workflow-action/issues/146">#146</a></li>
<li>Bump typescript from 4.6.2 to 4.6.3: <a href="https://github-redirect.dependabot.com/styfle/cancel-workflow-action/issues/144">#144</a></li>
<li>Bump prettier from 2.6.1 to 2.6.2: <a href="https://github-redirect.dependabot.com/styfle/cancel-workflow-action/issues/147">#147</a></li>
<li>Bump <code>@​actions/github</code> from 5.0.0 to 5.0.1: <a href="https://github-redirect.dependabot.com/styfle/cancel-workflow-action/issues/148">#148</a></li>
<li>Bump actions/setup-node from 3.1.0 to 3.1.1: <a href="https://github-redirect.dependabot.com/styfle/cancel-workflow-action/issues/149">#149</a></li>
<li>Bump <code>@​vercel/ncc</code> from 0.33.3 to 0.33.4: <a href="https://github-redirect.dependabot.com/styfle/cancel-workflow-action/issues/151">#151</a></li>
<li>Bump <code>@​actions/core</code> from 1.6.0 to 1.7.0: <a href="https://github-redirect.dependabot.com/styfle/cancel-workflow-action/issues/153">#153</a></li>
<li>Bump typescript from 4.6.3 to 4.6.4: <a href="https://github-redirect.dependabot.com/styfle/cancel-workflow-action/issues/154">#154</a></li>
<li>Bump husky from 7.0.4 to 8.0.1: <a href="https://github-redirect.dependabot.com/styfle/cancel-workflow-action/issues/155">#155</a></li>
<li>Bump <code>@​actions/core</code> from 1.7.0 to 1.8.0: <a href="https://github-redirect.dependabot.com/styfle/cancel-workflow-action/issues/156">#156</a></li>
<li>Bump actions/setup-node from 3.1.1 to 3.2.0: <a href="https://github-redirect.dependabot.com/styfle/cancel-workflow-action/issues/159">#159</a></li>
<li>Bump <code>@​actions/github</code> from 5.0.1 to 5.0.3: <a href="https://github-redirect.dependabot.com/styfle/cancel-workflow-action/issues/157">#157</a></li>
<li>Bump <code>@​actions/core</code> from 1.8.0 to 1.8.2: <a href="https://github-redirect.dependabot.com/styfle/cancel-workflow-action/issues/158">#158</a></li>
<li>Bump typescript from 4.6.4 to 4.7.2: <a href="https://github-redirect.dependabot.com/styfle/cancel-workflow-action/issues/160">#160</a></li>
<li>Bump <code>@​vercel/ncc</code> from 0.33.4 to 0.34.0: <a href="https://github-redirect.dependabot.com/styfle/cancel-workflow-action/issues/161">#161</a></li>
<li>Bump typescript from 4.7.2 to 4.7.3: <a href="https://github-redirect.dependabot.com/styfle/cancel-workflow-action/issues/163">#163</a></li>
</ul>

</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="bb6001c4ea"><code>bb6001c</code></a> 0.10.0</li>
<li><a href="74a81dc1a9"><code>74a81dc</code></a> chore: rebuild</li>
<li><a href="d2d941c239"><code>d2d941c</code></a> feat(all):support for considering all workflows with one term (<a href="https://github-redirect.dependabot.com/styfle/cancel-workflow-action/issues/165">#165</a>)</li>
<li><a href="9cd53caff9"><code>9cd53ca</code></a> Bump <code>@​actions/core</code> from 1.8.2 to 1.9.0 (<a href="https://github-redirect.dependabot.com/styfle/cancel-workflow-action/issues/166">#166</a>)</li>
<li><a href="4d9b633214"><code>4d9b633</code></a> Bump prettier from 2.6.2 to 2.7.1 (<a href="https://github-redirect.dependabot.com/styfle/cancel-workflow-action/issues/168">#168</a>)</li>
<li><a href="89c9307adc"><code>89c9307</code></a> Bump typescript from 4.7.3 to 4.7.4 (<a href="https://github-redirect.dependabot.com/styfle/cancel-workflow-action/issues/167">#167</a>)</li>
<li><a href="f680a0158a"><code>f680a01</code></a> Bump actions/setup-node from 3.2.0 to 3.3.0 (<a href="https://github-redirect.dependabot.com/styfle/cancel-workflow-action/issues/164">#164</a>)</li>
<li><a href="4ba58d5728"><code>4ba58d5</code></a> Bump typescript from 4.7.2 to 4.7.3 (<a href="https://github-redirect.dependabot.com/styfle/cancel-workflow-action/issues/163">#163</a>)</li>
<li><a href="0d0a9a5ae6"><code>0d0a9a5</code></a> Bump <code>@​vercel/ncc</code> from 0.33.4 to 0.34.0 (<a href="https://github-redirect.dependabot.com/styfle/cancel-workflow-action/issues/161">#161</a>)</li>
<li><a href="8ca5a00083"><code>8ca5a00</code></a> Bump typescript from 4.6.4 to 4.7.2 (<a href="https://github-redirect.dependabot.com/styfle/cancel-workflow-action/issues/160">#160</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/styfle/cancel-workflow-action/compare/0.9.1...0.10.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=styfle/cancel-workflow-action&package-manager=github_actions&previous-version=0.9.1&new-version=0.10.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2022-06-27 13:15:29 +00:00
dependabot[bot]
463cff456b build(deps): Bump bufbuild/buf-setup-action from 1.5.0 to 1.6.0 (#8883)
Bumps [bufbuild/buf-setup-action](https://github.com/bufbuild/buf-setup-action) from 1.5.0 to 1.6.0.
- [Release notes](https://github.com/bufbuild/buf-setup-action/releases)
- [Commits](https://github.com/bufbuild/buf-setup-action/compare/v1.5.0...v1.6.0)

---
updated-dependencies:
- dependency-name: bufbuild/buf-setup-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-27 09:13:25 -04:00
Sergio Mena
27ff2f46b8 Add @sergio-mena and @jmalicevic to list of spec reviewers (#8870)
Co-authored-by: Callum Waters <cmwaters19@gmail.com>
2022-06-24 20:53:31 +02:00
Sam Kleinman
52b6dc19ba p2p: remove dial sleep and provide disconnect cooldown (#8839)
Alternative proposal for #8826
2022-06-24 17:57:49 +00:00
Callum Waters
c4d24eed7d e2e: disable another network test (#8862)
Follow up on: https://github.com/tendermint/tendermint/pull/8849
2022-06-24 16:31:30 +00:00
William Banfield
409e057d73 fix light client select statement (#8871) 2022-06-24 12:10:27 -04:00
dependabot[bot]
6b5053046a build(deps): Bump github.com/stretchr/testify from 1.7.2 to 1.7.5 (#8864)
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.7.2 to 1.7.5.
<details>
<summary>Commits</summary>
<ul>
<li><a href="b5ce165710"><code>b5ce165</code></a> fixing panic in calls to assertion with nil m.mutex (<a href="https://github-redirect.dependabot.com/stretchr/testify/issues/1212">#1212</a>)</li>
<li><a href="c206b2e823"><code>c206b2e</code></a> Mock can be deadlocked by a panic (<a href="https://github-redirect.dependabot.com/stretchr/testify/issues/1157">#1157</a>)</li>
<li><a href="1b73601ae8"><code>1b73601</code></a> suite: correctly set stats on test panic (<a href="https://github-redirect.dependabot.com/stretchr/testify/issues/1195">#1195</a>)</li>
<li><a href="ba1076d8b3"><code>ba1076d</code></a> Add .Unset method to mock (<a href="https://github-redirect.dependabot.com/stretchr/testify/issues/982">#982</a>)</li>
<li><a href="c31ea0312f"><code>c31ea03</code></a> Support comparing byte slice (<a href="https://github-redirect.dependabot.com/stretchr/testify/issues/1202">#1202</a>)</li>
<li><a href="48391ba5eb"><code>48391ba</code></a> Fix panic in AssertExpectations for mocks without expectations (<a href="https://github-redirect.dependabot.com/stretchr/testify/issues/1207">#1207</a>)</li>
<li><a href="840cb80149"><code>840cb80</code></a> arrays value types in a zero-initialized state are considered empty (<a href="https://github-redirect.dependabot.com/stretchr/testify/issues/1126">#1126</a>)</li>
<li><a href="07dc7ee5ab"><code>07dc7ee</code></a> Bump actions/setup-go from 3.1.0 to 3.2.0 (<a href="https://github-redirect.dependabot.com/stretchr/testify/issues/1191">#1191</a>)</li>
<li><a href="c33fc8d30d"><code>c33fc8d</code></a> Bump actions/checkout from 2 to 3 (<a href="https://github-redirect.dependabot.com/stretchr/testify/issues/1163">#1163</a>)</li>
<li><a href="3c33e07c4c"><code>3c33e07</code></a> Added Go 1.18.1 as a build/supported version (<a href="https://github-redirect.dependabot.com/stretchr/testify/issues/1182">#1182</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/stretchr/testify/compare/v1.7.2...v1.7.5">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/stretchr/testify&package-manager=go_modules&previous-version=1.7.2&new-version=1.7.5)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2022-06-24 13:12:17 +00:00
William Banfield
5f5e74798b p2p: set empty timeouts to small values. (#8847)
These timeouts default to 'do not time out' if they are not set. This times up resources, potentially indefinitely. If node on the other side of the the handshake is up but unresponsive, the[ handshake call](edec79448a/internal/p2p/router.go (L720)) will _never_ return.

These are proposed values that have not been validated. I intend to validate them in a production setting.
2022-06-23 22:33:21 +00:00
Callum Waters
fb209136f8 e2e: add tolerance to peer discovery test (#8849) 2022-06-23 19:11:21 +02:00
Sam Kleinman
436a38f876 p2p: track peers by address (#8841) 2022-06-23 10:03:10 -04:00
Sam Kleinman
52b2efb827 e2e: report peer heights in error message (#8843) 2022-06-23 08:40:36 -04:00
Ian Jungyong Um
2e11760fbe p2p: fix typo (#8836) 2022-06-22 09:30:11 +02:00
William Banfield
8860e027a8 p2p: more dial routines (#8827)
The dial routines perform network i/o, which is a blocking call into the kernel. These routines are completely unable to do anything else while the dial occurs, so for most of their lifecycle they are sitting idle waiting for the tcp stack to hand them data. We should increase this value by _a lot_ to enable more concurrent dials. This is unlikely to cause CPU starvation because these routines sit idle most of the time. The current value causes dials to occur _way_ too slowly. 

Below is a graph demonstrating the before and after of this change in a testnetwork with many dead peers. You can observe that the rate that we connect to new, valid peers, is _much_ higher than previously. Change was deployed around the 31 minute mark on the graph.

![image](https://user-images.githubusercontent.com/4561443/174919007-50e4453a-edd8-41d0-97ee-dea8853d57f7.png)
2022-06-22 00:51:09 +00:00
Sam Kleinman
cfd13825e2 p2p: add eviction metrics and cleanup dialing error handling (#8819) 2022-06-21 20:44:14 +00:00
dependabot[bot]
6f168df7e4 build(deps): Bump github.com/spf13/cobra from 1.4.0 to 1.5.0 (#8812)
Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.4.0 to 1.5.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/spf13/cobra/releases">github.com/spf13/cobra's releases</a>.</em></p>
<blockquote>
<h2>v1.5.0</h2>
<h2>Spring 2022 Release 🌥️</h2>
<p>Hello everyone! Welcome to another release of cobra. Completions continue to get better and better. This release adds a few really cool new features. We also continue to patch versions of our dependencies as they become available via dependabot. Happy coding!</p>
<h2>Active help 👐🏼</h2>
<p>Shout out to <a href="https://github.com/marckhouzam"><code>@​marckhouzam</code></a> for a big value add: Active Help <a href="https://github-redirect.dependabot.com/spf13/cobra/pull/1482">spf13/cobra#1482</a>. With active help, a program can provide some inline warnings or hints for users as they hit tab. Now, your CLIs can be even more intuitive to use!</p>
<p>Currently active help is only supported for bash V2 and zsh. Marc wrote a whole guide on how to do this, so make sure to give it a good read to learn how you can add this to your cobra code! <a href="https://github.com/spf13/cobra/blob/master/active_help.md">https://github.com/spf13/cobra/blob/master/active_help.md</a></p>
<h2>Group flags 🧑🏼‍🤝‍🧑🏼</h2>
<p>Cobra now has the ability to mark flags as required or exclusive as a <strong><em>group</em></strong>. Shout out to our newest maintainer <a href="https://github.com/johnSchnake"><code>@​johnSchnake</code></a> for this! <a href="https://github-redirect.dependabot.com/spf13/cobra/pull/1654">spf13/cobra#1654</a> Let's say you have a <code>username</code> flag that <em><strong>MUST</strong></em> be partnered with a <code>password</code> flag. Well, now, you can enforce those as being required together:</p>
<pre lang="go"><code>rootCmd.Flags().StringVarP(&amp;u, &quot;username&quot;, &quot;u&quot;, &quot;&quot;, &quot;Username (required if password is set)&quot;)
rootCmd.Flags().StringVarP(&amp;pw, &quot;password&quot;, &quot;p&quot;, &quot;&quot;, &quot;Password (required if username is set)&quot;)
rootCmd.MarkFlagsRequiredTogether(&quot;username&quot;, &quot;password&quot;)
</code></pre>
<p>Flags may also be marked as &quot;mutally exclusive&quot; with the <code>MarkFlagsMutuallyExclusive(string, string ... )</code> command API. Refer to our <a href="https://github.com/spf13/cobra/blob/master/user_guide.md">user guide documentation</a> for further info!</p>
<h2>Completions 👀</h2>
<ul>
<li>Add backwards-compatibility tests for legacyArgs() by <a href="https://github.com/marckhouzam"><code>@​marckhouzam</code></a> in <a href="https://github-redirect.dependabot.com/spf13/cobra/pull/1547">spf13/cobra#1547</a></li>
<li>feat: Add how to load completions in your current zsh session by <a href="https://github.com/ondrejsika"><code>@​ondrejsika</code></a> in <a href="https://github-redirect.dependabot.com/spf13/cobra/pull/1608">spf13/cobra#1608</a></li>
<li>Introduce FixedCompletions by <a href="https://github.com/emersion"><code>@​emersion</code></a> in <a href="https://github-redirect.dependabot.com/spf13/cobra/pull/1574">spf13/cobra#1574</a></li>
<li>Add shell completion to flag groups by <a href="https://github.com/marckhouzam"><code>@​marckhouzam</code></a> in <a href="https://github-redirect.dependabot.com/spf13/cobra/pull/1659">spf13/cobra#1659</a></li>
<li>Modify brew prefix path in macOS system by <a href="https://github.com/imxw"><code>@​imxw</code></a> in <a href="https://github-redirect.dependabot.com/spf13/cobra/pull/1719">spf13/cobra#1719</a></li>
<li>perf(bash-v2): use backslash escape string expansion for tab by <a href="https://github.com/scop"><code>@​scop</code></a> in <a href="https://github-redirect.dependabot.com/spf13/cobra/pull/1682">spf13/cobra#1682</a></li>
<li>style(bash-v2): out is not an array variable, do not refer to it as such by <a href="https://github.com/scop"><code>@​scop</code></a> in <a href="https://github-redirect.dependabot.com/spf13/cobra/pull/1681">spf13/cobra#1681</a></li>
<li>perf(bash-v2): standard completion optimizations by <a href="https://github.com/scop"><code>@​scop</code></a> in <a href="https://github-redirect.dependabot.com/spf13/cobra/pull/1683">spf13/cobra#1683</a></li>
<li>style(bash): out is not an array variable, do not refer to it as such by <a href="https://github.com/scop"><code>@​scop</code></a> in <a href="https://github-redirect.dependabot.com/spf13/cobra/pull/1684">spf13/cobra#1684</a></li>
<li>perf(bash-v2): short-circuit descriptionless candidate lists by <a href="https://github.com/scop"><code>@​scop</code></a> in <a href="https://github-redirect.dependabot.com/spf13/cobra/pull/1686">spf13/cobra#1686</a></li>
<li>perf(bash-v2): speed up filtering entries with descriptions by <a href="https://github.com/scop"><code>@​scop</code></a> in <a href="https://github-redirect.dependabot.com/spf13/cobra/pull/1689">spf13/cobra#1689</a></li>
<li>perf(bash-v2): speed up filtering menu-complete descriptions by <a href="https://github.com/scop"><code>@​scop</code></a> in <a href="https://github-redirect.dependabot.com/spf13/cobra/pull/1692">spf13/cobra#1692</a></li>
<li>fix(bash-v2): skip empty completions when filtering descriptions by <a href="https://github.com/scop"><code>@​scop</code></a> in <a href="https://github-redirect.dependabot.com/spf13/cobra/pull/1691">spf13/cobra#1691</a></li>
<li>perf(bash-v2): read directly to COMPREPLY on descriptionless short circuit by <a href="https://github.com/scop"><code>@​scop</code></a> in <a href="https://github-redirect.dependabot.com/spf13/cobra/pull/1700">spf13/cobra#1700</a></li>
<li>fix: Don't complete _command on zsh by <a href="https://github.com/twpayne"><code>@​twpayne</code></a> in <a href="https://github-redirect.dependabot.com/spf13/cobra/pull/1690">spf13/cobra#1690</a></li>
<li>Improve fish_completions code quality by <a href="https://github.com/t29kida"><code>@​t29kida</code></a> in <a href="https://github-redirect.dependabot.com/spf13/cobra/pull/1515">spf13/cobra#1515</a></li>
<li>Fix handling of descriptions for bash v3 by <a href="https://github.com/marckhouzam"><code>@​marckhouzam</code></a> in <a href="https://github-redirect.dependabot.com/spf13/cobra/pull/1735">spf13/cobra#1735</a></li>
<li>undefined or nil Args default to ArbitraryArgs by <a href="https://github.com/umarcor"><code>@​umarcor</code></a> in <a href="https://github-redirect.dependabot.com/spf13/cobra/pull/1612">spf13/cobra#1612</a></li>
<li>Add Command.SetContext by <a href="https://github.com/joshcarp"><code>@​joshcarp</code></a> in <a href="https://github-redirect.dependabot.com/spf13/cobra/pull/1551">spf13/cobra#1551</a></li>
<li>Wrap printf tab with quotes by <a href="https://github.com/PapaCharlie"><code>@​PapaCharlie</code></a> in <a href="https://github-redirect.dependabot.com/spf13/cobra/pull/1665">spf13/cobra#1665</a></li>
</ul>
<h2>Documentation 📝</h2>
<ul>
<li>Fixed typos in completions docs - <a href="https://github.com/cuishuang"><code>@​cuishuang</code></a> <a href="https://github-redirect.dependabot.com/spf13/cobra/pull/1625">spf13/cobra#1625</a></li>
<li>Removed <code>CHANGELOG.md</code> as it isn't updated - <a href="https://github.com/johnSchnake"><code>@​johnSchnake</code></a> <a href="https://github-redirect.dependabot.com/spf13/cobra/pull/1634">spf13/cobra#1634</a></li>
<li>Minor typo fix in <code>shell_completion.md</code> - <a href="https://github.com/danieldn"><code>@​danieldn</code></a> <a href="https://github-redirect.dependabot.com/spf13/cobra/pull/1678">spf13/cobra#1678</a></li>
<li>Changed branch name in the cobra generator link to 'main' - <a href="https://github.com/skywalker2909"><code>@​skywalker2909</code></a> <a href="https://github-redirect.dependabot.com/spf13/cobra/pull/1645">spf13/cobra#1645</a></li>
<li>Fix Command.Context comment by <a href="https://github.com/katexochen"><code>@​katexochen</code></a> in <a href="https://github-redirect.dependabot.com/spf13/cobra/pull/1639">spf13/cobra#1639</a></li>
</ul>

</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="06b06a9dc9"><code>06b06a9</code></a> Bump golangci/golangci-lint-action from 3.1.0 to 3.2.0 (<a href="https://github-redirect.dependabot.com/spf13/cobra/issues/1697">#1697</a>)</li>
<li><a href="5f2ec3c897"><code>5f2ec3c</code></a> Update shell completion to respect flag groups (<a href="https://github-redirect.dependabot.com/spf13/cobra/issues/1659">#1659</a>)</li>
<li><a href="b9ca5949e2"><code>b9ca594</code></a> use errors.Is() to check for errors (<a href="https://github-redirect.dependabot.com/spf13/cobra/issues/1730">#1730</a>)</li>
<li><a href="ea94a3db55"><code>ea94a3d</code></a> undefined or nil Args default to ArbitraryArgs (<a href="https://github-redirect.dependabot.com/spf13/cobra/issues/1612">#1612</a>)</li>
<li><a href="7c9831d376"><code>7c9831d</code></a> Fix handling of descriptions for bash v3 (<a href="https://github-redirect.dependabot.com/spf13/cobra/issues/1735">#1735</a>)</li>
<li><a href="ed7bb9dda4"><code>ed7bb9d</code></a> Add unit test for fish completion (<a href="https://github-redirect.dependabot.com/spf13/cobra/issues/1515">#1515</a>)</li>
<li><a href="f464d6c82e"><code>f464d6c</code></a> Add Active Help support (<a href="https://github-redirect.dependabot.com/spf13/cobra/issues/1482">#1482</a>)</li>
<li><a href="7dc8b004e6"><code>7dc8b00</code></a> Bump actions/setup-go from 2 to 3 (<a href="https://github-redirect.dependabot.com/spf13/cobra/issues/1660">#1660</a>)</li>
<li><a href="87ea1807f7"><code>87ea180</code></a> Modify brew prefix path in macOS system (<a href="https://github-redirect.dependabot.com/spf13/cobra/issues/1719">#1719</a>)</li>
<li><a href="ca8e3c2779"><code>ca8e3c2</code></a> Add Pulumi as a project using cobra (<a href="https://github-redirect.dependabot.com/spf13/cobra/issues/1720">#1720</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/spf13/cobra/compare/v1.4.0...v1.5.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/spf13/cobra&package-manager=go_modules&previous-version=1.4.0&new-version=1.5.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2022-06-21 17:46:01 +00:00
Sam Kleinman
28d3239958 p2p: wake dialing thread after sleep (#8803) 2022-06-20 15:47:56 +00:00
dependabot[bot]
acf97128f3 build(deps): Bump github.com/prometheus/common from 0.34.0 to 0.35.0 (#8800)
Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.34.0 to 0.35.0.
<details>
<summary>Commits</summary>
<ul>
<li><a href="26d49741eb"><code>26d4974</code></a> Add more mimetypes (<a href="https://github-redirect.dependabot.com/prometheus/common/issues/385">#385</a>)</li>
<li><a href="627089d3a7"><code>627089d</code></a> Set minimum version for go to 1.16 (<a href="https://github-redirect.dependabot.com/prometheus/common/issues/372">#372</a>)</li>
<li>See full diff in <a href="https://github.com/prometheus/common/compare/v0.34.0...v0.35.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/prometheus/common&package-manager=go_modules&previous-version=0.34.0&new-version=0.35.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2022-06-20 12:04:19 +00:00
dependabot[bot]
2382b5c364 build(deps): Bump github.com/adlio/schema from 1.3.0 to 1.3.3 (#8798)
Bumps [github.com/adlio/schema](https://github.com/adlio/schema) from 1.3.0 to 1.3.3.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/adlio/schema/releases">github.com/adlio/schema's releases</a>.</em></p>
<blockquote>
<h2>v1.3.3</h2>
<p><strong>Full Changelog</strong>: <a href="https://github.com/adlio/schema/compare/v1.3.1...v1.3.3">https://github.com/adlio/schema/compare/v1.3.1...v1.3.3</a></p>
<h2>v1.3.1</h2>
<h2>What's Changed</h2>
<ul>
<li>Update ory/dockertest Dependency to 3.9.1 by <a href="https://github.com/adlio"><code>@​adlio</code></a> in <a href="https://github-redirect.dependabot.com/adlio/schema/pull/17">adlio/schema#17</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/adlio/schema/compare/v1.3.0...v1.3.1">https://github.com/adlio/schema/compare/v1.3.0...v1.3.1</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="4775fe4615"><code>4775fe4</code></a> Fix badge link</li>
<li><a href="95a1695cf7"><code>95a1695</code></a> Update build badge.</li>
<li><a href="41e0d31321"><code>41e0d31</code></a> CircleCI Ubuntu version.</li>
<li><a href="f5210da8ae"><code>f5210da</code></a> CircleCI image update</li>
<li><a href="0a9113e3a2"><code>0a9113e</code></a> Module updates</li>
<li><a href="33628d531f"><code>33628d5</code></a> Add circleci</li>
<li><a href="a81a7a3b72"><code>a81a7a3</code></a> Merge branch 'runc-112'</li>
<li><a href="128f3b3b5a"><code>128f3b3</code></a> Fix go.mod and go.sum</li>
<li><a href="471923f5f9"><code>471923f</code></a> Merge branch 'runc-112'</li>
<li><a href="40c69567e1"><code>40c6956</code></a> Fix ory/dockertest</li>
<li>Additional commits viewable in <a href="https://github.com/adlio/schema/compare/v1.3.0...v1.3.3">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/adlio/schema&package-manager=go_modules&previous-version=1.3.0&new-version=1.3.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2022-06-20 08:54:09 +00:00
Ian Jungyong Um
e3e162ff10 p2p: fix typo (#8793)
Fix the typo in router
2022-06-19 15:26:25 +00:00
Sam Kleinman
4d820ff4f5 p2p: peer score should not wrap around (#8790) 2022-06-17 22:27:38 +00:00
Sam Kleinman
82c1372f9e abci+test/e2e/app: add mutex for new methods (#8577)
These methods should be protected by a mutex.
2022-06-17 21:22:40 +00:00
Sam Kleinman
0ac03468d8 p2p: track peers stored on startup (#8787) 2022-06-17 18:10:10 +00:00
Sam Kleinman
9e5b13725d p2p: peer store and dialing changes (#8737) 2022-06-17 08:02:10 -04:00
Sergio Mena
a4f29bfd44 Don't check PBTS-timeliness when in replay mode (#8774)
Closes #8781

Temporary fix to this issue, so that e2e tests don't fail and potentially leave other problems uncovered.
2022-06-16 19:31:17 +00:00
Adolfo Olivera
7cf09399bb Fix typo in Using Tendermint section (#8780)
Modify using-tendermint.md to replace unsafe_reset_all to unsafe-reset-all . Closes #8779 .
2022-06-16 18:36:58 +00:00
Callum Waters
8854ce4e68 e2e: reactivate network test (#8635) 2022-06-16 18:04:10 +02:00
Emmanuel T Odeke
56e329aa9e cmd/tendermint/commands/debug: guard against PID int overflows (#8764) 2022-06-15 20:46:50 -07:00
Sam Kleinman
1062ae73d6 e2e/ci: add extra split to 0.36 (#8770) 2022-06-15 09:04:13 -04:00
dependabot[bot]
134bfefbe5 build(deps): Bump github.com/vektra/mockery/v2 from 2.13.0 to 2.13.1 (#8766)
Bumps [github.com/vektra/mockery/v2](https://github.com/vektra/mockery) from 2.13.0 to 2.13.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/vektra/mockery/releases">github.com/vektra/mockery/v2's releases</a>.</em></p>
<blockquote>
<h2>v2.13.1</h2>
<h2>Changelog</h2>
<ul>
<li>f04b040 Fix infinity mocking caused interface in mock</li>
<li>9d7c819 Merge pull request <a href="https://github-redirect.dependabot.com/vektra/mockery/issues/472">#472</a> from grongor/fix-infinite-mocking</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="9d7c8190e1"><code>9d7c819</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/vektra/mockery/issues/472">#472</a> from grongor/fix-infinite-mocking</li>
<li><a href="f04b040510"><code>f04b040</code></a> Fix infinity mocking caused interface in mock</li>
<li>See full diff in <a href="https://github.com/vektra/mockery/compare/v2.13.0...v2.13.1">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/vektra/mockery/v2&package-manager=go_modules&previous-version=2.13.0&new-version=2.13.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2022-06-15 10:46:37 +00:00
Roman
f0b0f34f3f refactor: improve string representation for a vote against the proposal (#8745) 2022-06-15 12:32:22 +02:00
Sam Kleinman
51b3f111dc p2p: fix mconn transport accept test (#8762)
Fix minor test incongruency missed earlier.
2022-06-14 23:48:48 +00:00
Sam Kleinman
979a6a1b13 p2p: accept should not abort on first error (#8759) 2022-06-14 19:12:53 -04:00
Sam Kleinman
bf1cb89bb7 Revert "p2p: self-add node should not error (tendermint#8753)" (#8757) 2022-06-14 20:55:10 +00:00
Sam Kleinman
7971f4a2fc p2p: self-add node should not error (#8753) 2022-06-14 16:45:05 +00:00
dependabot[bot]
a2908c29d5 build(deps): Bump github.com/vektra/mockery/v2 from 2.12.3 to 2.13.0 (#8748)
Bumps [github.com/vektra/mockery/v2](https://github.com/vektra/mockery) from 2.12.3 to 2.13.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/vektra/mockery/releases">github.com/vektra/mockery/v2's releases</a>.</em></p>
<blockquote>
<h2>v2.13.0</h2>
<h2>Changelog</h2>
<ul>
<li>f9f6d38 Merge pull request <a href="https://github-redirect.dependabot.com/vektra/mockery/issues/477">#477</a> from LandonTClipp/generics_release</li>
<li>6498bd6 Updating dependencies</li>
</ul>
<h2>v2.13.0-beta.1</h2>
<h2>Changelog</h2>
<ul>
<li>9dba1fd Merge pull request <a href="https://github-redirect.dependabot.com/vektra/mockery/issues/454">#454</a> from Gevrai/gejo-move-expecter-test</li>
<li>cde38d9 Move generated ExpecterTest to mocks directory</li>
</ul>
<h2>v2.13.0-beta.0</h2>
<h2>Changelog</h2>
<ul>
<li>dc5539e Add support for generating mocks for generic interfaces</li>
<li>33c4bf3 Generics mocking fixes</li>
<li>a727d70 Genrics support: rename and comment methods</li>
<li>4c0f6c8 Merge conflict resolution</li>
<li>46c61f0 Merge pull request <a href="https://github-redirect.dependabot.com/vektra/mockery/issues/456">#456</a> from cruickshankpg/mock-generic-interfaces</li>
<li>ed55a47 Update x/tools to pick up fix for <a href="https://github-redirect.dependabot.com/golang/go/issues/51629">golang/go#51629</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="f9f6d38ea8"><code>f9f6d38</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/vektra/mockery/issues/477">#477</a> from LandonTClipp/generics_release</li>
<li><a href="6498bd6d40"><code>6498bd6</code></a> Updating dependencies</li>
<li><a href="9dba1fd9c3"><code>9dba1fd</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/vektra/mockery/issues/454">#454</a> from Gevrai/gejo-move-expecter-test</li>
<li><a href="cde38d9a5c"><code>cde38d9</code></a> Move generated ExpecterTest to mocks directory</li>
<li><a href="46c61f037d"><code>46c61f0</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/vektra/mockery/issues/456">#456</a> from cruickshankpg/mock-generic-interfaces</li>
<li><a href="4c0f6c85e0"><code>4c0f6c8</code></a> Merge conflict resolution</li>
<li><a href="ed55a470b6"><code>ed55a47</code></a> Update x/tools to pick up fix for <a href="https://github-redirect.dependabot.com/golang/go/issues/51629">golang/go#51629</a></li>
<li><a href="a727d70486"><code>a727d70</code></a> Genrics support: rename and comment methods</li>
<li><a href="33c4bf34b9"><code>33c4bf3</code></a> Generics mocking fixes</li>
<li><a href="dc5539e60b"><code>dc5539e</code></a> Add support for generating mocks for generic interfaces</li>
<li>See full diff in <a href="https://github.com/vektra/mockery/compare/v2.12.3...v2.13.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/vektra/mockery/v2&package-manager=go_modules&previous-version=2.12.3&new-version=2.13.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2022-06-14 11:06:36 +00:00
Jeeyong Um
a4cf8939b8 mempool: fix error message check in test (#8750) 2022-06-14 06:54:35 -04:00
Jeeyong Um
21bbbe3e2a mempool: fix typos in test (#8746) 2022-06-14 10:50:55 +02:00
Marko
82907c84fa sink/psql: json marshal instead of proto (#8637)
Storing transaction records as JSON makes it simpler for clients of the index.
2022-06-13 10:20:54 -07:00
Jasmina Malicevic
06175129ed abci-cli: added PrepareProposal command to cli (#8656)
* Prepare prosal cli
2022-06-13 14:09:57 +02:00
Sam Kleinman
7172862786 e2e: split test cases to avoid hitting timeouts (#8741) 2022-06-11 08:21:55 -04:00
Callum Waters
b0e48ca5f3 remove unused config variables (#8738) 2022-06-10 17:17:33 +02:00
Sam Kleinman
8d9d19a113 e2e/generator: enlarge nightly test suite (#8731) 2022-06-09 18:22:47 -04:00
M. J. Fromberger
6983885835 Update config migration test data for v0.36.x (#8727)
This is a trivial update, but also a convenient way to make sure the mergify settings are working.
2022-06-08 20:34:14 +00:00
dependabot[bot]
bb0737ee3c build(deps): Bump github.com/rs/zerolog from 1.26.1 to 1.27.0 (#8724)
Bumps [github.com/rs/zerolog](https://github.com/rs/zerolog) from 1.26.1 to 1.27.0.
<details>
<summary>Commits</summary>
<ul>
<li><a href="e9344a8c50"><code>e9344a8</code></a> docs: add an example for Lshortfile-like implementation of CallerMarshalFunc ...</li>
<li><a href="263b0bde36"><code>263b0bd</code></a> <a href="https://github-redirect.dependabot.com/rs/zerolog/issues/411">#411</a> Add FieldsExclude parameter to console writer (<a href="https://github-redirect.dependabot.com/rs/zerolog/issues/418">#418</a>)</li>
<li><a href="588a61c2df"><code>588a61c</code></a> ctx: Modify WithContext to use a non-pointer receiver (<a href="https://github-redirect.dependabot.com/rs/zerolog/issues/409">#409</a>)</li>
<li><a href="361cdf616a"><code>361cdf6</code></a> Remove extra space in console when there is no message (<a href="https://github-redirect.dependabot.com/rs/zerolog/issues/413">#413</a>)</li>
<li><a href="fc26014bd4"><code>fc26014</code></a> MsgFunc function added to Event (<a href="https://github-redirect.dependabot.com/rs/zerolog/issues/406">#406</a>)</li>
<li><a href="025f9f1819"><code>025f9f1</code></a> journald: don't call Enabled before each write (<a href="https://github-redirect.dependabot.com/rs/zerolog/issues/407">#407</a>)</li>
<li><a href="3efdd82416"><code>3efdd82</code></a> call done function when logger is disabled (<a href="https://github-redirect.dependabot.com/rs/zerolog/issues/393">#393</a>)</li>
<li><a href="c0c2e11fc3"><code>c0c2e11</code></a> Consistent casing, redundancy, and spelling/grammar (<a href="https://github-redirect.dependabot.com/rs/zerolog/issues/391">#391</a>)</li>
<li><a href="665519c4da"><code>665519c</code></a> Fix ConsoleWriter color on Windows (<a href="https://github-redirect.dependabot.com/rs/zerolog/issues/390">#390</a>)</li>
<li><a href="0c8d3c0b10"><code>0c8d3c0</code></a> move the lint command to its own package (<a href="https://github-redirect.dependabot.com/rs/zerolog/issues/389">#389</a>)</li>
<li>See full diff in <a href="https://github.com/rs/zerolog/compare/v1.26.1...v1.27.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/rs/zerolog&package-manager=go_modules&previous-version=1.26.1&new-version=1.27.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2022-06-08 13:09:16 +00:00
M. J. Fromberger
e84ca617cf Set up automation settings for the v0.36.x backport branch. (#8714)
- Add Mergify settings for backport labels.
- Add e2e nightly workflow for v0.36.x.
- Update documentation on e2e workflows.
- Add v0.36.x to the Dependabot configs.
2022-06-07 12:25:16 -07:00
Sam Kleinman
931c98f7ad rpc: always close http bodies (#8712)
Closes #8686
2022-06-07 16:40:22 +00:00
Elias Naur
3bb68b49f5 ci(fuzz): remove Go 1.18 workaround for OSS-Fuzz (#8711) 2022-06-07 06:11:06 -07:00
dependabot[bot]
618b841a4b build(deps): Bump github.com/stretchr/testify from 1.7.1 to 1.7.2 (#8708)
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.7.1 to 1.7.2.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.7.1...v1.7.2)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-07 04:59:00 -04:00
M. J. Fromberger
3e97479ab8 Fix a "broken" markdown link. (#8706)
The link actually works in context because of the auto-redirect from GitHub,
but the link checker doesn't follow them. Splice out the redirect.
2022-06-07 08:13:05 +00:00
dependabot[bot]
85d1946602 build(deps): Bump bufbuild/buf-setup-action from 1.4.0 to 1.5.0 (#8701)
Bumps [bufbuild/buf-setup-action](https://github.com/bufbuild/buf-setup-action) from 1.4.0 to 1.5.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/bufbuild/buf-setup-action/releases">bufbuild/buf-setup-action's releases</a>.</em></p>
<blockquote>
<h2>v1.5.0</h2>
<ul>
<li>Set the default buf version to v1.4.0</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="8cc6b77780"><code>8cc6b77</code></a> Update to v1.5.0</li>
<li>See full diff in <a href="https://github.com/bufbuild/buf-setup-action/compare/v1.4.0...v1.5.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=bufbuild/buf-setup-action&package-manager=github_actions&previous-version=1.4.0&new-version=1.5.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2022-06-06 17:17:28 +00:00
dependabot[bot]
6b2a6ed402 build(deps-dev): Bump watchpack from 2.3.1 to 2.4.0 in /docs (#8700)
Bumps [watchpack](https://github.com/webpack/watchpack) from 2.3.1 to 2.4.0.
- [Release notes](https://github.com/webpack/watchpack/releases)
- [Commits](https://github.com/webpack/watchpack/compare/v2.3.1...v2.4.0)

---
updated-dependencies:
- dependency-name: watchpack
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-06 07:35:37 -07:00
M. J. Fromberger
48ec78e672 Update how Mockery mocks are checked for currency. (#8697)
The use of "go install" is deprecated as a way of installing and running the
Mockery binary. Update the runner script to depend on an ambient version of the
tool and ensure that in CI it's installed.
2022-06-03 15:02:04 -07:00
William Banfield
75a12ea0c6 consensus: switch timeout message to be debug and clarify meaning (#8694) 2022-06-03 13:46:10 -04:00
Evan Forbes
30929cf190 p2p: pass maxConns for MaxPeers during node setup (#8684)
* pass maxConns for MaxPeers
* add upgrade connections to max connections for max peers
* change the formula to calculate max peers
2022-06-03 07:22:38 -07:00
elias-orijtech
db168ca558 test/fuzz: fix OSS-Fuzz build (#8669)
Broken by 7bed8f92ea.

- note the purpose of test/fuzz/oss-fuzz-build.sh
2022-06-03 06:02:59 -07:00
Callum Waters
a0f3107d28 e2e: fix initialization of light client (#8682) 2022-06-03 10:50:06 +02:00
Sergio Mena
ce6485fa70 Remove the abci responses type - prune legacy responses (#8673)
Closes #8069 

* Type `ABCIResponses` was just wrapping type `ResponseFinalizeBlock`. This patch removes the former.
* Did some renaming to avoid confusion on the data structure we are working with.
* We also remove any stale ABCIResponses we may have in the state store at the time of pruning

**IMPORTANT**: There is an undesirable side-effect of the unwrapping. An empty `ResponseFinalizeBlock` yields a 0-length proto-buf serialized buffer. This was not the case with `ABCIResponses`. I have added an interim solution, but open for suggestions on more elegant ones.
2022-06-02 19:13:08 +00:00
M. J. Fromberger
08099ff669 privval: restrict listeners to TCP and Unix domain sockets (#8670)
Front load the protocol type check so we do not wind up creating listeners of
types that are not usable for this interface (for example, UDP).

Fixes #8647.
2022-06-02 10:20:00 -07:00
Sam Kleinman
666d93338a p2p: shed peers from store from other networks (#8678) 2022-06-02 11:14:25 -04:00
Callum Waters
30bfe51ebe cmd: add tool for compaction of goleveldb (#8564) 2022-06-02 10:01:16 +02:00
Sam Kleinman
d5299882b0 migrate: provide function for database production (#8614)
This builds on: #8614
2022-06-02 07:14:58 +00:00
Sergio Mena
56fc80d66d abci: Move app_hash parameter from Commit to FinalizeBlock (#8664)
* Removed from proto

* make proto-gen

* make build works

* make some tests pass

* Fix TestMempoolTxConcurrentWithCommit

* Minor change

* Update abci/types/types.go

* Update internal/state/execution.go

* Update test/e2e/app/state.go

Co-authored-by: Callum Waters <cmwaters19@gmail.com>

* Updated changelog and `UPGRADING.md`

* Fixed abci-cli tests, and doc

* Addressed @cmwaters' comments

* Addressed @cmwaters' comments, part 2

Co-authored-by: Callum Waters <cmwaters19@gmail.com>
2022-06-01 18:53:10 +02:00
dependabot[bot]
9a8c334362 build(deps): Bump google.golang.org/grpc from 1.46.2 to 1.47.0 (#8667)
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.46.2 to 1.47.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.47.0</h2>
<h1>New Features</h1>
<ul>
<li>xds: add support for RBAC metadata invert matchers (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5345">#5345</a>)</li>
</ul>
<h1>Bug Fixes</h1>
<ul>
<li>client: fix a context leaked if a connection to an address is lost before it is fully established (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5337">#5337</a>)
<ul>
<li>Special Thanks: <a href="https://github.com/carzil"><code>@​carzil</code></a></li>
</ul>
</li>
<li>client: fix potential panic during RPC retries (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5323">#5323</a>)</li>
<li>xds/client: fix a potential concurrent map read/write in load reporting (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5331">#5331</a>)</li>
<li>client/SubConn: do not recreate addrConn if UpdateAddresses is called with the same addresses (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5373">#5373</a>)</li>
<li>xds/eds: resources containing duplicate localities with the same priority will be rejected (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5303">#5303</a>)</li>
<li>server: return Canceled or DeadlineExceeded status code when writing headers to a stream that is already closed (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5292">#5292</a>)
<ul>
<li>Special Thanks: <a href="https://github.com/idiamond-stripe"><code>@​idiamond-stripe</code></a></li>
</ul>
</li>
</ul>
<h1>Behavior Changes</h1>
<ul>
<li>xds/priority: start the init timer when a child switches to Connecting from non-failure states (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5334">#5334</a>)</li>
<li>server: respond with HTTP Status 405 and gRPC status INTERNAL if the method sent to server is not POST (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5364">#5364</a>)</li>
</ul>
<h1>Documentation</h1>
<ul>
<li>server: clarify documentation around setting and sending headers and ServerStream errors (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5302">#5302</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="5b509df1e3"><code>5b509df</code></a> Change version to 1.47.0 (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5377">#5377</a>)</li>
<li><a href="ed7522591b"><code>ed75225</code></a> Don't call cmp in non testing file (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5370">#5370</a>)</li>
<li><a href="081c688437"><code>081c688</code></a> client: fix hctx leakage in addrConn.createTransport (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5337">#5337</a>)</li>
<li><a href="30b9d59a76"><code>30b9d59</code></a> client/SubConn: do not recreate addrConn if UpdateAddresses is called with th...</li>
<li><a href="459729d667"><code>459729d</code></a> xds/priority: avoid sending duplicate updates to children (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5374">#5374</a>)</li>
<li><a href="9f4b31a11c"><code>9f4b31a</code></a> Added HTTP status and grpc status to POST check (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5364">#5364</a>)</li>
<li><a href="333a441e27"><code>333a441</code></a> xds/ringhash: update connectivity state aggregation, and make sure at least o...</li>
<li><a href="e23132c657"><code>e23132c</code></a> Added support for metadata matcher invert (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5345">#5345</a>)</li>
<li><a href="d9b952b170"><code>d9b952b</code></a> xds/resolver: use correct resource name in log message (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5357">#5357</a>)</li>
<li><a href="db79903af9"><code>db79903</code></a> xds/priority: start the init timer when a child switch to Connecting from non...</li>
<li>Additional commits viewable in <a href="https://github.com/grpc/grpc-go/compare/v1.46.2...v1.47.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=google.golang.org/grpc&package-manager=go_modules&previous-version=1.46.2&new-version=1.47.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2022-06-01 13:14:50 +00:00
M. J. Fromberger
bf676827eb Revert buf tools upgrade requiring Go 1.18 (#8658) 2022-06-01 15:01:43 +02:00
Callum Waters
7ffc872dd7 config: complete removal of seed addresses in config (#8654) 2022-06-01 12:35:31 +02:00
Sam Kleinman
d2ca0b868d consensus: gossip catchup sleeping protocol (#8652) 2022-06-01 10:17:17 +00:00
dependabot[bot]
b7805e94ea build(deps): Bump eventsource from 1.1.0 to 1.1.1 in /docs (#8663)
Bumps [eventsource](https://github.com/EventSource/eventsource) from 1.1.0 to 1.1.1.
- [Release notes](https://github.com/EventSource/eventsource/releases)
- [Changelog](https://github.com/EventSource/eventsource/blob/master/HISTORY.md)
- [Commits](https://github.com/EventSource/eventsource/compare/v1.1.0...v1.1.1)

---
updated-dependencies:
- dependency-name: eventsource
  dependency-type: indirect
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-01 04:34:12 -04:00
dependabot[bot]
7422f7b7a0 build(deps): Bump github.com/bufbuild/buf from 1.4.0 to 1.5.0 (#8650)
Bumps [github.com/bufbuild/buf](https://github.com/bufbuild/buf) from 1.4.0 to 1.5.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/bufbuild/buf/releases">github.com/bufbuild/buf's releases</a>.</em></p>
<blockquote>
<h2>v1.5.0</h2>
<ul>
<li>Upgrade to <code>protoc</code> 3.20.1 support.</li>
<li>Fix an issue where <code>buf</code> would fail if two or more roots contained
a file with the same name, but with different file types (i.e. a
regular file vs. a directory).</li>
<li>Fix check for <code>PACKAGE_SERVICE_NO_DELETE</code> to detect deleted services.</li>
<li>Remove <code>buf beta registry track</code>.</li>
<li>Remove <code>buf beta registry branch</code>.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/bufbuild/buf/blob/main/CHANGELOG.md">github.com/bufbuild/buf's changelog</a>.</em></p>
<blockquote>
<h2>[v1.5.0] - 2022-05-30</h2>
<ul>
<li>Upgrade to <code>protoc</code> 3.20.1 support.</li>
<li>Fix an issue where <code>buf</code> would fail if two or more roots contained
a file with the same name, but with different file types (i.e. a
regular file vs. a directory).</li>
<li>Fix check for <code>PACKAGE_SERVICE_NO_DELETE</code> to detect deleted services.</li>
<li>Remove <code>buf beta registry track</code>.</li>
<li>Remove <code>buf beta registry branch</code>.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="4c5463f963"><code>4c5463f</code></a> Update to v1.5.0</li>
<li><a href="61010f9dd3"><code>61010f9</code></a> Add optional tls config to client (<a href="https://github-redirect.dependabot.com/bufbuild/buf/issues/1158">#1158</a>)</li>
<li><a href="f2dbf466e0"><code>f2dbf46</code></a> Add BEHAVIOUR linter to bufstyle (<a href="https://github-redirect.dependabot.com/bufbuild/buf/issues/1157">#1157</a>)</li>
<li><a href="8e2e04f4f0"><code>8e2e04f</code></a> Updates for protoc v21 (<a href="https://github-redirect.dependabot.com/bufbuild/buf/issues/1156">#1156</a>)</li>
<li><a href="6aefa7d0ff"><code>6aefa7d</code></a> Expose a new provider option for setting gRPC protocol (<a href="https://github-redirect.dependabot.com/bufbuild/buf/issues/1153">#1153</a>)</li>
<li><a href="9abbbeae07"><code>9abbbea</code></a> Delete grpc-go related packages (<a href="https://github-redirect.dependabot.com/bufbuild/buf/issues/1154">#1154</a>)</li>
<li><a href="56fea870b0"><code>56fea87</code></a> Add studio agent implementation (<a href="https://github-redirect.dependabot.com/bufbuild/buf/issues/1131">#1131</a>)</li>
<li><a href="97f8a3e15a"><code>97f8a3e</code></a> Replace transport of CLI from gRPC to Connect (<a href="https://github-redirect.dependabot.com/bufbuild/buf/issues/1129">#1129</a>)</li>
<li><a href="d30b7dc77d"><code>d30b7dc</code></a> add studio service endpoints for preset agents (<a href="https://github-redirect.dependabot.com/bufbuild/buf/issues/1142">#1142</a>)</li>
<li><a href="814be7c8c7"><code>814be7c</code></a> Update protoc version handling (<a href="https://github-redirect.dependabot.com/bufbuild/buf/issues/1148">#1148</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/bufbuild/buf/compare/v1.4.0...v1.5.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/bufbuild/buf&package-manager=go_modules&previous-version=1.4.0&new-version=1.5.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2022-05-31 14:26:27 +00:00
Callum Waters
fefce8dc35 e2e: programmable ABCI method times (#8638)
* e2e: programmable ABCI method times

* fix linting error
2022-05-31 12:22:52 +02:00
William Banfield
3dec4a4744 docs: add documentation for undocumented p2p metrics (#8640)
Once merged will backport to v0.35
2022-05-30 08:45:56 +00:00
Sergio Mena
571f26bca5 Remove obsolete abci methods, no longer called by ABCI++ Tendermint (#8633)
* Remove ABCI methods marked as obsolete, but no longer called

* Add links in ABCI++ section of 'UPGRADING.md'

* make proto-gen

* Ressurrect

* make proto-gen2

* Fixed lint

* Make proto-gen3

* Minor fix to comment

* make proto-gen4
2022-05-30 08:41:18 +02:00
dependabot[bot]
844a5fd03c build(deps): Bump github.com/spf13/viper from 1.11.0 to 1.12.0 (#8630) 2022-05-27 22:18:13 -07:00
M. J. Fromberger
9027401de4 Forward-port changelogs from v0.35.5 to master (#8627) 2022-05-27 09:17:19 +00:00
M. J. Fromberger
eb3b488761 build: simplify the proto generated check in CI (#8617)
Since we now use buf from a tools dependency, we can use the Go tool to install
the version we expected without having to curl a tarball.
2022-05-26 09:04:52 -07:00
dependabot[bot]
a3a06cd1a6 build(deps): Bump github.com/bufbuild/buf from 1.3.1 to 1.4.0 (#8622)
Bumps [github.com/bufbuild/buf](https://github.com/bufbuild/buf) from 1.3.1 to 1.4.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/bufbuild/buf/releases">github.com/bufbuild/buf's releases</a>.</em></p>
<blockquote>
<h2>v1.4.0</h2>
<ul>
<li>Fix issue where duplicate synthetic oneofs (such as with proto3 maps or
optional fields) did not result in a properly formed error.</li>
<li>Add <code>buf beta registry repository update</code> command which supports updating
repository visibility (public vs private). As with all beta commands, this
is likely to change in the future.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/bufbuild/buf/blob/main/CHANGELOG.md">github.com/bufbuild/buf's changelog</a>.</em></p>
<blockquote>
<h2>[v1.4.0] - 2022-04-21</h2>
<ul>
<li>Fix issue where duplicate synthetic oneofs (such as with proto3 maps or
optional fields) did not result in a properly formed error.</li>
<li>Add <code>buf beta registry repository update</code> command which supports updating
repository visibility (public vs private). As with all beta commands, this
is likely to change in the future.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="bd759fc726"><code>bd759fc</code></a> Update to v1.4.0</li>
<li><a href="6966e63258"><code>6966e63</code></a> Support error formats that require all annotations to print (<a href="https://github-redirect.dependabot.com/bufbuild/buf/issues/907">#907</a>)</li>
<li><a href="588350e21e"><code>588350e</code></a> Adds a Github Service definition (<a href="https://github-redirect.dependabot.com/bufbuild/buf/issues/1078">#1078</a>)</li>
<li><a href="17513207e1"><code>1751320</code></a> Update CHANGELOG.md (<a href="https://github-redirect.dependabot.com/bufbuild/buf/issues/1082">#1082</a>)</li>
<li><a href="792e8e0b3b"><code>792e8e0</code></a> Upgrade protoreflect and add test for duplicate synthetic oneofs (<a href="https://github-redirect.dependabot.com/bufbuild/buf/issues/1072">#1072</a>)</li>
<li><a href="4e717bd3bf"><code>4e717bd</code></a> Update ErrNoConfigFile error message (<a href="https://github-redirect.dependabot.com/bufbuild/buf/issues/1057">#1057</a>)</li>
<li><a href="0d9aa320e9"><code>0d9aa32</code></a> Bump alpine from 3.15.3 to 3.15.4 (<a href="https://github-redirect.dependabot.com/bufbuild/buf/issues/1064">#1064</a>)</li>
<li><a href="ff6007321f"><code>ff60073</code></a> Bump actions/setup-go from 2 to 3 (<a href="https://github-redirect.dependabot.com/bufbuild/buf/issues/1063">#1063</a>)</li>
<li><a href="7bedab05fc"><code>7bedab0</code></a> Add write to DisplayRepositoryElementsResponse (<a href="https://github-redirect.dependabot.com/bufbuild/buf/issues/1061">#1061</a>)</li>
<li><a href="d90d416c68"><code>d90d416</code></a> Add Buf cli for updating repo settings (<a href="https://github-redirect.dependabot.com/bufbuild/buf/issues/1044">#1044</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/bufbuild/buf/compare/v1.3.1...v1.4.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/bufbuild/buf&package-manager=go_modules&previous-version=1.3.1&new-version=1.4.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2022-05-26 15:24:21 +00:00
Sam Kleinman
bc24ae4642 rpc: deprecate/updates to broadcast tx (#8624) 2022-05-26 08:28:28 -04:00
Jasmina Malicevic
cb9722c2b0 abci: strip mempoolerror from responsechectx (#8620)
* abci:mempoolError from ResponseCheckTx
* responseCheckTx returns an error if Tendermint decides not to accept an app after CheckTx
*updated spec, upgrading.md and changelog.md
2022-05-26 11:18:27 +02:00
Callum Waters
b0ec8a0ea7 mempool: migrate rechecktx to be a consensus parameter (#8514) 2022-05-25 23:57:23 +02:00
Jasmina Malicevic
4c857a7ed2 abci: remove unused fields from CheckTXResponse (part 1) (#8605)
abci: Removed Info, Log, Events and GasUsed from ResponseCheckTx. 
spec: Updated info on ResponseCheckTx to reflect field removal.
2022-05-25 23:06:16 +02:00
Sam Kleinman
f33722b423 migrate: reorder collection ordering (#8613) 2022-05-25 16:42:07 +00:00
M. J. Fromberger
a988cefe5d Update generated mocks after #8607. (#8612) 2022-05-25 15:48:56 +00:00
William Banfield
4cb0ec55e4 makefile: update buf commands to use tools.go (#8609)
This will keep the version of `buf` consistent between all developer machines.
2022-05-25 09:33:38 +00:00
dependabot[bot]
5d1bffe857 build(deps): Bump github.com/vektra/mockery/v2 from 2.12.2 to 2.12.3 (#8607)
Bumps [github.com/vektra/mockery/v2](https://github.com/vektra/mockery) from 2.12.2 to 2.12.3.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/vektra/mockery/releases">github.com/vektra/mockery/v2's releases</a>.</em></p>
<blockquote>
<h2>v2.12.3</h2>
<h2>Changelog</h2>
<ul>
<li>41e99e1 Add explicit generation for ExpecterTest</li>
<li>68d25fe Merge pull request <a href="https://github-redirect.dependabot.com/vektra/mockery/issues/466">#466</a> from LandonTClipp/testing_tb</li>
<li>356a8cd Reduce size of interface passed to mock constructor</li>
<li>b338b68 Updating mocks and fixing tests/behavior</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="68d25fe032"><code>68d25fe</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/vektra/mockery/issues/466">#466</a> from LandonTClipp/testing_tb</li>
<li><a href="41e99e1859"><code>41e99e1</code></a> Add explicit generation for ExpecterTest</li>
<li><a href="b338b6884f"><code>b338b68</code></a> Updating mocks and fixing tests/behavior</li>
<li><a href="356a8cd130"><code>356a8cd</code></a> Reduce size of interface passed to mock constructor</li>
<li>See full diff in <a href="https://github.com/vektra/mockery/compare/v2.12.2...v2.12.3">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/vektra/mockery/v2&package-manager=go_modules&previous-version=2.12.2&new-version=2.12.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2022-05-25 09:03:02 +00:00
M. J. Fromberger
10ce3d4729 rpc: fix OpenAPI docs for /events filter argument (#8599)
I incorrectly documented the "query" field as "filter".
2022-05-25 07:15:36 +00:00
Sam Kleinman
d59a53be01 p2p: reduce ability of SendError to disconnect peers (#8597) 2022-05-24 11:19:32 -04:00
Sergio Mena
1a52b7cb7b Removed redundant params in FinalizeBlock (#8598)
The parameters added in this PR where coming from `Commit` in the first versions of the spec. Later on, we decided to keep `Commit` as it is. As a result, these parameters do not make sense, either in same-block or in next-block execution mode.
2022-05-24 13:07:00 +00:00
M. J. Fromberger
8e0d0046e3 rpc: fix encoding of block_results responses (#8593)
Fixes #8583.

The block results include validator updates in ABCI protobuf format, which does
not encode "correctly" according to the expected Amino style RPC clients expect.

- Write a regression test for this issue.
- Add JSON marshaling overrides for ABCI ValidatorUpdate messages.
2022-05-23 14:43:56 -07:00
William Banfield
43313e9b85 abci++: add proto fields for enabling vote extensions (#8587)
This pull requests adds the protocol buffer field for the `ABCI.VoteExtensionsEnableHeight` parameter. This proto field is threaded throughout all of the relevant places where consensus params are used and referenced.

This PR also adds validation of the consensus param updates. Previous consensus param changes didn't depend on _previous_ versions of the params, so this change adds a method for validating against the old params as well.

closes: #8453
2022-05-23 18:23:23 +00:00
Jasmina Malicevic
6ff77eece3 light/http: added check for err == nil (#8579) 2022-05-23 12:28:24 +02:00
dependabot[bot]
3bf2875f80 build(deps): Bump goreleaser/goreleaser-action from 2 to 3 (#8590)
Bumps [goreleaser/goreleaser-action](https://github.com/goreleaser/goreleaser-action) from 2 to 3.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/goreleaser/goreleaser-action/releases">goreleaser/goreleaser-action's releases</a>.</em></p>
<blockquote>
<h2>v3.0.0</h2>
<h2>What's Changed</h2>
<ul>
<li>chore: node 16 as default runtime by <a href="https://github.com/crazy-max"><code>@​crazy-max</code></a> in <a href="https://github-redirect.dependabot.com/goreleaser/goreleaser-action/pull/343">goreleaser/goreleaser-action#343</a>
<ul>
<li>This requires a minimum <a href="https://github.com/actions/runner/releases/tag/v2.285.0">Actions Runner</a> version of v2.285.0, which is by default available in GHES 3.4 or later.</li>
</ul>
</li>
<li>chore: update dev dependencies and workflow by <a href="https://github.com/crazy-max"><code>@​crazy-max</code></a> in <a href="https://github-redirect.dependabot.com/goreleaser/goreleaser-action/pull/342">goreleaser/goreleaser-action#342</a></li>
<li>upgrade go version to 1.18 by <a href="https://github.com/morwn"><code>@​morwn</code></a> in <a href="https://github-redirect.dependabot.com/goreleaser/goreleaser-action/pull/335">goreleaser/goreleaser-action#335</a></li>
<li>chore(deps): bump <code>@​actions/exec</code> from 1.1.0 to 1.1.1 in <a href="https://github-redirect.dependabot.com/goreleaser/goreleaser-action/pull/331">goreleaser/goreleaser-action#331</a></li>
<li>chore(deps): bump <code>@​actions/tool-cache</code> from 1.7.1 to 1.7.2 in <a href="https://github-redirect.dependabot.com/goreleaser/goreleaser-action/pull/332">goreleaser/goreleaser-action#332</a></li>
<li>chore(deps): bump <code>@​actions/tool-cache</code> from 1.7.2 to 2.0.1 in <a href="https://github-redirect.dependabot.com/goreleaser/goreleaser-action/pull/355">goreleaser/goreleaser-action#355</a></li>
<li>chore(deps): bump minimist from 1.2.5 to 1.2.6 in <a href="https://github-redirect.dependabot.com/goreleaser/goreleaser-action/pull/334">goreleaser/goreleaser-action#334</a></li>
<li>chore(deps): bump yargs from 17.3.1 to 17.4.0 in <a href="https://github-redirect.dependabot.com/goreleaser/goreleaser-action/pull/333">goreleaser/goreleaser-action#333</a></li>
<li>chore(deps): bump yargs from 17.4.0 to 17.4.1 in <a href="https://github-redirect.dependabot.com/goreleaser/goreleaser-action/pull/339">goreleaser/goreleaser-action#339</a></li>
<li>chore(deps): bump yargs from 17.4.1 to 17.5.1 in <a href="https://github-redirect.dependabot.com/goreleaser/goreleaser-action/pull/352">goreleaser/goreleaser-action#352</a></li>
<li>chore(deps): bump <code>@​actions/http-client</code> from 1.0.11 to 2.0.1 in <a href="https://github-redirect.dependabot.com/goreleaser/goreleaser-action/pull/353">goreleaser/goreleaser-action#353</a></li>
<li>chore(deps): bump <code>@​actions/core</code> from 1.6.0 to 1.8.2 in <a href="https://github-redirect.dependabot.com/goreleaser/goreleaser-action/pull/354">goreleaser/goreleaser-action#354</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/morwn"><code>@​morwn</code></a> made their first contribution in <a href="https://github-redirect.dependabot.com/goreleaser/goreleaser-action/pull/335">goreleaser/goreleaser-action#335</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/goreleaser/goreleaser-action/compare/v2.9.1...v3.0.0">https://github.com/goreleaser/goreleaser-action/compare/v2.9.1...v3.0.0</a></p>
<h2>v2.9.1</h2>
<h2>What's Changed</h2>
<ul>
<li>fix: current tag not taken into account by <a href="https://github.com/crazy-max"><code>@​crazy-max</code></a> in <a href="https://github-redirect.dependabot.com/goreleaser/goreleaser-action/pull/329">goreleaser/goreleaser-action#329</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/goreleaser/goreleaser-action/compare/v2...v2.9.1">https://github.com/goreleaser/goreleaser-action/compare/v2...v2.9.1</a></p>
<h2>v2.9.0</h2>
<h2>What's Changed</h2>
<ul>
<li>refactor: setup context by <a href="https://github.com/crazy-max"><code>@​crazy-max</code></a> in <a href="https://github-redirect.dependabot.com/goreleaser/goreleaser-action/pull/325">goreleaser/goreleaser-action#325</a></li>
<li>chore: update community files by <a href="https://github.com/crazy-max"><code>@​crazy-max</code></a> in <a href="https://github-redirect.dependabot.com/goreleaser/goreleaser-action/pull/328">goreleaser/goreleaser-action#328</a></li>
<li>feat: add artifacts and metadata outputs by <a href="https://github.com/crazy-max"><code>@​crazy-max</code></a> in <a href="https://github-redirect.dependabot.com/goreleaser/goreleaser-action/pull/327">goreleaser/goreleaser-action#327</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/goreleaser/goreleaser-action/compare/v2.8.1...v2.9.0">https://github.com/goreleaser/goreleaser-action/compare/v2.8.1...v2.9.0</a></p>
<h2>v2.8.1</h2>
<h2>What's Changed</h2>
<ul>
<li>fix: should not force snapshot when nightly is set by <a href="https://github.com/caarlos0"><code>@​caarlos0</code></a> in <a href="https://github-redirect.dependabot.com/goreleaser/goreleaser-action/pull/321">goreleaser/goreleaser-action#321</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/goreleaser/goreleaser-action/compare/v2.8.0...v2.8.1">https://github.com/goreleaser/goreleaser-action/compare/v2.8.0...v2.8.1</a></p>
<h2>v2.8.0</h2>
<h2>What's Changed</h2>
<ul>
<li>chore(deps): bump <code>@​actions/tool-cache</code> from 1.7.0 to 1.7.1 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://github-redirect.dependabot.com/goreleaser/goreleaser-action/pull/290">goreleaser/goreleaser-action#290</a></li>
<li>chore(deps): bump <code>@​actions/core</code> from 1.3.0 to 1.4.0 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://github-redirect.dependabot.com/goreleaser/goreleaser-action/pull/289">goreleaser/goreleaser-action#289</a></li>
<li>chore(deps): bump <code>@​actions/exec</code> from 1.0.4 to 1.1.0 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://github-redirect.dependabot.com/goreleaser/goreleaser-action/pull/291">goreleaser/goreleaser-action#291</a></li>
<li>refactor: use built-in <code>getExecOutput</code> by <a href="https://github.com/crazy-max"><code>@​crazy-max</code></a> in <a href="https://github-redirect.dependabot.com/goreleaser/goreleaser-action/pull/292">goreleaser/goreleaser-action#292</a></li>
</ul>

</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="68acf3b1ad"><code>68acf3b</code></a> chore(deps): bump <code>@​actions/tool-cache</code> from 1.7.2 to 2.0.1 (<a href="https://github-redirect.dependabot.com/goreleaser/goreleaser-action/issues/355">#355</a>)</li>
<li><a href="46da1137fb"><code>46da113</code></a> chore: node 16 as default runtime (<a href="https://github-redirect.dependabot.com/goreleaser/goreleaser-action/issues/343">#343</a>)</li>
<li><a href="223909a9be"><code>223909a</code></a> chore: update</li>
<li><a href="c56d8dfa43"><code>c56d8df</code></a> Revert &quot;chore(deps): bump <code>@​actions/core</code> from 1.6.0 to 1.8.2 (<a href="https://github-redirect.dependabot.com/goreleaser/goreleaser-action/issues/354">#354</a>)&quot;</li>
<li><a href="d1c2f8317e"><code>d1c2f83</code></a> chore(deps): bump <code>@​actions/core</code> from 1.6.0 to 1.8.2 (<a href="https://github-redirect.dependabot.com/goreleaser/goreleaser-action/issues/354">#354</a>)</li>
<li><a href="5c65fd87a6"><code>5c65fd8</code></a> chore(deps): bump <code>@​actions/http-client</code> from 1.0.11 to 2.0.1 (<a href="https://github-redirect.dependabot.com/goreleaser/goreleaser-action/issues/353">#353</a>)</li>
<li><a href="46cd12b0b3"><code>46cd12b</code></a> chore(deps): bump yargs from 17.4.1 to 17.5.1 (<a href="https://github-redirect.dependabot.com/goreleaser/goreleaser-action/issues/352">#352</a>)</li>
<li><a href="822d1bf019"><code>822d1bf</code></a> chore(deps): bump docker/bake-action from 1 to 2 (<a href="https://github-redirect.dependabot.com/goreleaser/goreleaser-action/issues/346">#346</a>)</li>
<li><a href="c25888f15f"><code>c25888f</code></a> chore: update dev dependencies and workflow (<a href="https://github-redirect.dependabot.com/goreleaser/goreleaser-action/issues/342">#342</a>)</li>
<li><a href="ec57748af4"><code>ec57748</code></a> chore(deps): bump yargs from 17.4.0 to 17.4.1 (<a href="https://github-redirect.dependabot.com/goreleaser/goreleaser-action/issues/339">#339</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/goreleaser/goreleaser-action/compare/v2...v3">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=goreleaser/goreleaser-action&package-manager=github_actions&previous-version=2&new-version=3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2022-05-23 09:54:39 +00:00
William Banfield
0cceadf4d4 abci++: add consensus parameter logic to control vote extension require height (#8547)
This PR makes vote extensions optional within Tendermint. A new ConsensusParams field, called ABCIParams.VoteExtensionsEnableHeight, has been added to toggle whether or not extensions should be enabled or disabled depending on the current height of the consensus engine. Related to: #8453
2022-05-20 17:46:52 -04:00
M. J. Fromberger
4786a5ffde Remove the periodically-scheduled Markdown link check. (#8580)
The state of links in our documentation is now sufficiently good that we are
running link checks during PRs. There is no longer any practical benefit to
running the scheduled "global" check. Most of the errors it reports are rate
limitations anyway (429).
2022-05-19 15:23:14 -07:00
William Banfield
ad73e6da2f consensus: update state from store before use in reactor (#8576)
Closes: #8575

This PR aims to fix the `LastCommitRound can only be negative for initial height 0` issue we see in the e2e tests by initializing the `state` object before starting the receive routines in the consensus reactor. This is somewhat inelegant, but it should fix the issue.
2022-05-19 19:35:30 +00:00
M. J. Fromberger
4a9bbe047f Fix lock sequencing in socket client request tracking. (#8581)
* Fix lock sequencing in socket client request tracking.

It is not safe to check base service state (IsRunning) while holding the lock
for the client state. If we do, then during shutdown we may deadlock with the
invocation of the OnStop handler, which the base service executes while holding
the service lock.

* Enqueue pending requests before sending them to the server.

If we don't do this, the server can reply before the request lands in the
queue.  That will cause the receiver to terminate early for an unsolicited
response. So enqueue first: This is safe because we're doing it in the same
routine as services the channel, so we won't take another message till we are
safely past that point.

* Document what we did.
* Fix socket paths in tests.
2022-05-19 12:11:57 -07:00
Sam Kleinman
b4bf74ba9c abci: serialize semantics of abci client (#8578)
Prior to this change, it was possible that two client calls could enqueue their
requests in the response queue in a different order than they were processed
by the sender goroutine. This violates the requirement that responses must be
delivered in the same order they were enqueued.

To avert this, make the sender goroutine responsible for enqueuing.

Also, remove an unnecessary channel buffer.
2022-05-19 09:16:34 -07:00
Sergio Mena
850ae93a90 Adapted client-server.md from ABCI directory (#8510)
* Copied over 'client server' section from ABCI spec

* Adapted the ABCI text in 'Client and Server' section

* Minor changes to README

* Removed TODO from Readme

* Update spec/abci++/abci++_client_server_002_draft.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_client_server_002_draft.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_client_server_002_draft.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_client_server_002_draft.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_client_server_002_draft.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_client_server_002_draft.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Addressed comments

* Moved GRPC link out of the Tendermint-specific occurrence

* Fixed merge

Co-authored-by: Daniel <daniel.cason@usi.ch>
2022-05-19 10:35:36 +02:00
Sergio Mena
2e20b820ab Adapted apps.md from ABCI directory (#8506)
* Copied over the 'Apps' section from ABCI. Need to adapt it

* Adapted the ABCI text in requirements section

* Update spec/abci++/abci++_app_requirements_002_draft.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_app_requirements_002_draft.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_app_requirements_002_draft.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_app_requirements_002_draft.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_app_requirements_002_draft.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_app_requirements_002_draft.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_app_requirements_002_draft.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_app_requirements_002_draft.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_app_requirements_002_draft.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_app_requirements_002_draft.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_app_requirements_002_draft.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_app_requirements_002_draft.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_app_requirements_002_draft.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_app_requirements_002_draft.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_app_requirements_002_draft.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_app_requirements_002_draft.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_app_requirements_002_draft.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_app_requirements_002_draft.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_app_requirements_002_draft.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_app_requirements_002_draft.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_app_requirements_002_draft.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_app_requirements_002_draft.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_app_requirements_002_draft.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_app_requirements_002_draft.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_app_requirements_002_draft.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_app_requirements_002_draft.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_app_requirements_002_draft.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_app_requirements_002_draft.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_app_requirements_002_draft.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_app_requirements_002_draft.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_app_requirements_002_draft.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_app_requirements_002_draft.md

Co-authored-by: M. J. Fromberger <fromberger@interchain.io>

* Adressed @cason's comments

* Update spec/abci++/abci++_app_requirements_002_draft.md

Co-authored-by: M. J. Fromberger <fromberger@interchain.io>

* Update spec/abci++/abci++_app_requirements_002_draft.md

Co-authored-by: M. J. Fromberger <fromberger@interchain.io>

* Update spec/abci++/abci++_app_requirements_002_draft.md

Co-authored-by: M. J. Fromberger <fromberger@interchain.io>

* Update spec/abci++/abci++_app_requirements_002_draft.md

Co-authored-by: M. J. Fromberger <fromberger@interchain.io>

* Addressed remaining comments

* Addressed some of @cmwaters comments

* Addressed more comments

* Addressed @JayT106's comments

Co-authored-by: Daniel <daniel.cason@usi.ch>
Co-authored-by: M. J. Fromberger <fromberger@interchain.io>
2022-05-19 08:53:28 +02:00
M. J. Fromberger
c620900fdd rpc: fix plumbing of broadcast_tx_commit timeout (#8573)
In #3435 we allowed this timeout to override the global write timeout.
But after #8570 this meant we were applying a shorter timeout by default.
Don't do the patch if the timeout is already unlimited.

This is a temporary workaround; in light of #8561 I plan to get rid of this
option entirely during the v0.37 cycle, but meanwhile we should keep existing
use more or less coherent.
2022-05-17 10:34:43 -07:00
M. J. Fromberger
21f140410b rpc: enable the ADR 075 event log by default in new configs (#8572)
Since we are deprecating the stream-based event subscription in v0.36, we
should ensure that new nodes enable the replacement by default.  For now, just
set a baseline 30-second window.
2022-05-17 09:49:23 -07:00
M. J. Fromberger
66c4c82f7a rpc: rework timeouts to be per-method instead of global (#8570)
* rpc: rework timeouts to be per-method instead of global

Prior to this change, we set a 10-second global timeout for all RPC methods
using the net/http Server type's WriteTimeout. This meant that any request
whose handler did not return within that period would simply drop the
connection to the client.

This timeout is too short for a default, as evidenced by issues like [1] and
[2].  In addition, the mode of failure on the client side is confusing; it
shows up as a dropped connection (EOF) rather than a meaningful error from the
service. More importantly, various methods have diffent constraints: Some
should be able to return quickly, others may need to adjust based on the
application workload.

This is a first step toward supporting configurable timeouts. This change:

- Removes the server-wide default global timeout, and instead:
- Wires up a default context timeout for all RPC handlers.
- Increases the default timeout from 10s to 60s.
- Adds a hook to override this per-method as needed.

This does NOT expose the timeouts in the configuration file (yet).

[1] https://github.com/osmosis-labs/osmosis/issues/1391
[2] https://github.com/tendermint/tendermint/issues/8465
2022-05-17 08:52:39 -07:00
Sam Kleinman
2897b75853 p2p: remove unused get height methods (#8569) 2022-05-17 10:56:26 -04:00
dependabot[bot]
5a42479d52 build(deps): Bump github.com/lib/pq from 1.10.5 to 1.10.6 (#8567)
Bumps [github.com/lib/pq](https://github.com/lib/pq) from 1.10.5 to 1.10.6.
<details>
<summary>Commits</summary>
<ul>
<li><a href="8c6de565f7"><code>8c6de56</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/lib/pq/issues/1081">#1081</a> from catj-cockroach/add-kubernetes-secret-support</li>
<li><a href="d8917faf2e"><code>d8917fa</code></a> adds support for kubernetes mounted private keys</li>
<li><a href="54a3a4b3f3"><code>54a3a4b</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/lib/pq/issues/1082">#1082</a> from johanneswuerbach/connector-dialer</li>
<li><a href="30d9faf71f"><code>30d9faf</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/lib/pq/issues/1080">#1080</a> from drakkan/sqlstate</li>
<li><a href="cf6aeee4f2"><code>cf6aeee</code></a> feat: change the connector dialer</li>
<li><a href="ef3111ea5a"><code>ef3111e</code></a> error: add SQLState</li>
<li><a href="006a3f4923"><code>006a3f4</code></a> Added code that accounts for the 'Z' timezone separator in the ParseTimestamp...</li>
<li><a href="da9184484e"><code>da91844</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/lib/pq/issues/1078">#1078</a> from otan-cockroach/copydata</li>
<li><a href="326e7d02f7"><code>326e7d0</code></a> fix CopyData comment</li>
<li><a href="b3b8332586"><code>b3b8332</code></a> expose raw CopyData command (<a href="https://github-redirect.dependabot.com/lib/pq/issues/1077">#1077</a>)</li>
<li>See full diff in <a href="https://github.com/lib/pq/compare/v1.10.5...v1.10.6">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/lib/pq&package-manager=go_modules&previous-version=1.10.5&new-version=1.10.6)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2022-05-17 11:55:04 +00:00
Sam Kleinman
7f79661c2e rfc: onboarding projects (#8413)
This is meant as a supporting recruiting document. The idea is to
describe a bunch of projects scoped and selected as teaching projects
for new engineers joining the team. 

This isn't meant to replace "neweng" or "good-first-ticket" tags on
issues, but provide a higher level set of examples of the kinds of
things that someone joining the team could tackle.
2022-05-16 14:15:06 +00:00
dependabot[bot]
fb7229135a build(deps): Bump google.golang.org/grpc from 1.46.0 to 1.46.2 (#8559)
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.46.0 to 1.46.2.
<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 v1.46.2</h2>
<h1>Bug Fixes</h1>
<ul>
<li>client: fix potential panic during RPC retries (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5323">#5323</a>)</li>
<li>xds: fix leak of deleted CDS resources from CSDS view (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5339">#5339</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="46da11bc8b"><code>46da11b</code></a> update version to 1.46.2</li>
<li><a href="10b610c0be"><code>10b610c</code></a> xdsclient/csds: fix leaked metadata (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5339">#5339</a>)</li>
<li><a href="1303098b85"><code>1303098</code></a> client: fix potential panic during RPC retries (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5323">#5323</a>)</li>
<li><a href="beb2eafa90"><code>beb2eaf</code></a> Change version to 1.46.1-dev (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5297">#5297</a>)</li>
<li>See full diff in <a href="https://github.com/grpc/grpc-go/compare/v1.46.0...v1.46.2">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=google.golang.org/grpc&package-manager=go_modules&previous-version=1.46.0&new-version=1.46.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2022-05-16 14:04:08 +00:00
dependabot[bot]
d004638b0b build(deps): Bump github.com/prometheus/common from 0.32.1 to 0.34.0 (#8557)
Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.32.1 to 0.34.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/prometheus/common/releases">github.com/prometheus/common's releases</a>.</em></p>
<blockquote>
<h2>v0.34.0</h2>
<ul>
<li>[ENHANCEMENT] Enable selecting minimum TLS version. <a href="https://github-redirect.dependabot.com/prometheus/common/issues/375">#375</a></li>
</ul>
<h2>v0.33.0</h2>
<ul>
<li>[ENHANCEMENT] Make HTTP2 User Visible <a href="https://github-redirect.dependabot.com/prometheus/common/issues/360">#360</a></li>
<li>[FEATURE] Add proxy_url support for oauth2 <a href="https://github-redirect.dependabot.com/prometheus/common/issues/358">#358</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="3763a1ded1"><code>3763a1d</code></a> TLS config: Enable selection of min TLS version (<a href="https://github-redirect.dependabot.com/prometheus/common/issues/375">#375</a>)</li>
<li><a href="0c7319ad92"><code>0c7319a</code></a> Remove comment about PROMETHEUS_COMMON_DISABLE_HTTP2 env var because it is no...</li>
<li><a href="840c039c5f"><code>840c039</code></a> Use path.Clean to clean sigv4 path.</li>
<li><a href="ffd0efb12a"><code>ffd0efb</code></a> Deduplicate slashes for sigv4 signature</li>
<li><a href="902cb39e6c"><code>902cb39</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/prometheus/common/issues/365">#365</a> from prometheus/superq/bump_sigv4</li>
<li><a href="910a9dfdc7"><code>910a9df</code></a> Update sigv4 modules</li>
<li><a href="2c242773f1"><code>2c24277</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/prometheus/common/issues/362">#362</a> from prometheus/repo_sync</li>
<li><a href="f6b09127ff"><code>f6b0912</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/prometheus/common/issues/353">#353</a> from prometheus/superq/bump_go</li>
<li><a href="e457c0a6f3"><code>e457c0a</code></a> Update common Prometheus files</li>
<li><a href="0e1254b764"><code>0e1254b</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/prometheus/common/issues/359">#359</a> from prometheus/repo_sync</li>
<li>Additional commits viewable in <a href="https://github.com/prometheus/common/compare/v0.32.1...v0.34.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/prometheus/common&package-manager=go_modules&previous-version=0.32.1&new-version=0.34.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2022-05-16 13:20:31 +00:00
Ivo Elenchev
c780619db5 Fix typo (#8550) 2022-05-14 15:50:36 -07:00
Sam Kleinman
42e5924662 mempool: do not continue checking transactions if context was cacneled (#8549) 2022-05-14 08:27:53 -04:00
dependabot[bot]
bdca727014 build(deps): Bump github.com/prometheus/client_golang (#8540)
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.12.1 to 1.12.2.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/v1.12.2/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.12.1...v1.12.2)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: M. J. Fromberger <fromberger@interchain.io>
2022-05-13 13:08:55 -07:00
M. J. Fromberger
2d9a379b63 build: add CI check that generated files are up-to-date (#8521)
Add an actions workflow that verifies that generated files are up-to-date
during a pull request. If not, give the reader instructions about what to do to
update the PR.

Checks are included for protobuf and mockery.
2022-05-13 12:41:24 -07:00
M. J. Fromberger
9c9a4140d9 chore: update generated mocks (#8546) 2022-05-13 12:27:10 -07:00
M. J. Fromberger
7da9746a57 Fix protobuf generated code. (#8545)
* Revert "update protos (#8515)"

This reverts commit f094fd204a.

It appears that #8515 may have been generated with an out-of-date version of
either buf or the gogo plugin. using the latest versions (buf 1.4.0 and gogo
1.3.2) reverts those changes.

* Add a script to re-generate protos with the latest tools.

This script is just a wrapper for the Make rule, but it runs the build inside a
container with the latest versions of buf and gogo installed. This reduces the
chance that an out-of-date ambient installation on a developer machine will get
us outdated output.
2022-05-13 12:08:21 -07:00
dependabot[bot]
c29d1b34fd build(deps): Bump golangci/golangci-lint-action from 3.1.0 to 3.2.0 (#8525)
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 3.1.0 to 3.2.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/golangci/golangci-lint-action/releases">golangci/golangci-lint-action's releases</a>.</em></p>
<blockquote>
<h2>v3.2.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Expire cache periodically to avoid unbounded size by <a href="https://github.com/ezimanyi"><code>@​ezimanyi</code></a> in <a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/pull/466">golangci/golangci-lint-action#466</a></li>
</ul>
<h3>misc</h3>
<ul>
<li>docs: update version to v3 by <a href="https://github.com/zaunist"><code>@​zaunist</code></a> in <a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/pull/450">golangci/golangci-lint-action#450</a></li>
<li>modify examples using setup-go by <a href="https://github.com/3100"><code>@​3100</code></a> in <a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/pull/451">golangci/golangci-lint-action#451</a></li>
</ul>
<h3>dependencies</h3>
<ul>
<li>build(deps): bump actions/checkout from 2 to 3 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/pull/409">golangci/golangci-lint-action#409</a></li>
<li>build(deps-dev): bump <code>@​typescript-eslint/parser</code> from 5.12.1 to 5.13.0 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/pull/410">golangci/golangci-lint-action#410</a></li>
<li>build(deps-dev): bump eslint-config-prettier from 8.4.0 to 8.5.0 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/pull/412">golangci/golangci-lint-action#412</a></li>
<li>build(deps-dev): bump typescript from 4.5.5 to 4.6.2 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/pull/413">golangci/golangci-lint-action#413</a></li>
<li>build(deps-dev): bump eslint from 8.10.0 to 8.11.0 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/pull/418">golangci/golangci-lint-action#418</a></li>
<li>build(deps-dev): bump <code>@​typescript-eslint/parser</code> from 5.14.0 to 5.15.0 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/pull/421">golangci/golangci-lint-action#421</a></li>
<li>build(deps-dev): bump prettier from 2.5.1 to 2.6.0 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/pull/422">golangci/golangci-lint-action#422</a></li>
<li>build(deps): bump <code>@​actions/cache</code> from 1.0.9 to 1.0.10 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/pull/423">golangci/golangci-lint-action#423</a></li>
<li>build(deps): bump <code>@​actions/tool-cache</code> from 1.7.1 to 1.7.2 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/pull/426">golangci/golangci-lint-action#426</a></li>
<li>build(deps-dev): bump <code>@​typescript-eslint/eslint-plugin</code> from 5.14.0 to 5.15.0 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/pull/425">golangci/golangci-lint-action#425</a></li>
<li>build(deps): bump <code>@​actions/exec</code> from 1.1.0 to 1.1.1 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/pull/424">golangci/golangci-lint-action#424</a></li>
<li>build(deps): bump minimist from 1.2.5 to 1.2.6 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/pull/427">golangci/golangci-lint-action#427</a></li>
<li>build(deps-dev): bump prettier from 2.6.0 to 2.6.1 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/pull/428">golangci/golangci-lint-action#428</a></li>
<li>build(deps-dev): bump typescript from 4.6.2 to 4.6.3 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/pull/429">golangci/golangci-lint-action#429</a></li>
<li>build(deps): bump <code>@​actions/cache</code> from 1.0.10 to 2.0.0 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/pull/432">golangci/golangci-lint-action#432</a></li>
<li>build(deps-dev): bump prettier from 2.6.1 to 2.6.2 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/pull/436">golangci/golangci-lint-action#436</a></li>
<li>build(deps): bump <code>@​actions/github</code> from 5.0.0 to 5.0.1 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/pull/437">golangci/golangci-lint-action#437</a></li>
<li>build(deps-dev): bump <code>@​typescript-eslint/parser</code> from 5.16.0 to 5.17.0 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/pull/438">golangci/golangci-lint-action#438</a></li>
<li>build(deps-dev): bump <code>@​typescript-eslint/eslint-plugin</code> from 5.16.0 to 5.18.0 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/pull/441">golangci/golangci-lint-action#441</a></li>
<li>build(deps-dev): bump eslint-plugin-import from 2.25.4 to 2.26.0 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/pull/444">golangci/golangci-lint-action#444</a></li>
<li>build(deps-dev): bump <code>@​typescript-eslint/parser</code> from 5.17.0 to 5.18.0 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/pull/445">golangci/golangci-lint-action#445</a></li>
<li>build(deps-dev): bump eslint from 8.12.0 to 8.13.0 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/pull/446">golangci/golangci-lint-action#446</a></li>
<li>build(deps): bump actions/setup-go from 2 to 3 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/pull/443">golangci/golangci-lint-action#443</a></li>
<li>build(deps-dev): bump <code>@​vercel/ncc</code> from 0.33.3 to 0.33.4 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/pull/452">golangci/golangci-lint-action#452</a></li>
<li>build(deps-dev): bump <code>@​typescript-eslint/eslint-plugin</code> from 5.18.0 to 5.19.0 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/pull/453">golangci/golangci-lint-action#453</a></li>
<li>build(deps-dev): bump <code>@​typescript-eslint/parser</code> from 5.18.0 to 5.19.0 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/pull/454">golangci/golangci-lint-action#454</a></li>
<li>build(deps): bump <code>@​actions/cache</code> from 2.0.0 to 2.0.2 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/pull/447">golangci/golangci-lint-action#447</a></li>
<li>build(deps-dev): bump eslint from 8.13.0 to 8.14.0 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/pull/456">golangci/golangci-lint-action#456</a></li>
<li>build(deps-dev): bump <code>@​typescript-eslint/parser</code> from 5.19.0 to 5.20.0 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/pull/455">golangci/golangci-lint-action#455</a></li>
<li>build(deps-dev): bump <code>@​typescript-eslint/eslint-plugin</code> from 5.19.0 to 5.20.0 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/pull/457">golangci/golangci-lint-action#457</a></li>
<li>build(deps-dev): bump <code>@​typescript-eslint/eslint-plugin</code> from 5.20.0 to 5.21.0 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/pull/460">golangci/golangci-lint-action#460</a></li>
<li>build(deps-dev): bump typescript from 4.6.3 to 4.6.4 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/pull/461">golangci/golangci-lint-action#461</a></li>
<li>build(deps-dev): bump <code>@​typescript-eslint/parser</code> from 5.20.0 to 5.22.0 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/pull/464">golangci/golangci-lint-action#464</a></li>
<li>build(deps): bump github/codeql-action from 1 to 2 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/pull/459">golangci/golangci-lint-action#459</a></li>
<li>build(deps-dev): bump eslint from 8.14.0 to 8.15.0 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/pull/467">golangci/golangci-lint-action#467</a></li>
<li>build(deps-dev): bump <code>@​typescript-eslint/eslint-plugin</code> from 5.21.0 to 5.22.0 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/pull/469">golangci/golangci-lint-action#469</a></li>
<li>build(deps): bump <code>@​actions/core</code> from 1.6.0 to 1.8.0 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/pull/468">golangci/golangci-lint-action#468</a></li>
</ul>
<h2>New Contributors</h2>

</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="537aa1903e"><code>537aa19</code></a> Expire cache periodically to avoid unbounded size (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/issues/466">#466</a>)</li>
<li><a href="f70e52dcc9"><code>f70e52d</code></a> build(deps): bump <code>@​actions/core</code> from 1.6.0 to 1.8.0 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/issues/468">#468</a>)</li>
<li><a href="a304692ecb"><code>a304692</code></a> build(deps-dev): bump <code>@​typescript-eslint/eslint-plugin</code> (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/issues/469">#469</a>)</li>
<li><a href="eeca7c5026"><code>eeca7c5</code></a> build(deps-dev): bump eslint from 8.14.0 to 8.15.0 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/issues/467">#467</a>)</li>
<li><a href="dfbcd2aee1"><code>dfbcd2a</code></a> build(deps): bump github/codeql-action from 1 to 2 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/issues/459">#459</a>)</li>
<li><a href="4421331437"><code>4421331</code></a> build(deps-dev): bump <code>@​typescript-eslint/parser</code> from 5.20.0 to 5.22.0 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/issues/464">#464</a>)</li>
<li><a href="5e6c1bb9e2"><code>5e6c1bb</code></a> build(deps-dev): bump typescript from 4.6.3 to 4.6.4 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/issues/461">#461</a>)</li>
<li><a href="44eba43bae"><code>44eba43</code></a> build(deps-dev): bump <code>@​typescript-eslint/eslint-plugin</code> (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/issues/460">#460</a>)</li>
<li><a href="358a5e374f"><code>358a5e3</code></a> build(deps-dev): bump <code>@​typescript-eslint/eslint-plugin</code> (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/issues/457">#457</a>)</li>
<li><a href="b9c65a53a1"><code>b9c65a5</code></a> build(deps-dev): bump <code>@​typescript-eslint/parser</code> from 5.19.0 to 5.20.0 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/issues/455">#455</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/golangci/golangci-lint-action/compare/v3.1.0...v3.2.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=golangci/golangci-lint-action&package-manager=github_actions&previous-version=3.1.0&new-version=3.2.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2022-05-13 15:32:25 +00:00
M. J. Fromberger
81e5bf8417 Consolidate Dependabot checks for GitHub Actions deps. (#8518)
We currently have Dependabot check for updates to GitHub actions once a week on
master, but daily on the backport branches. This is unnecessarily noisy.

As a first step to reducing this noise, consolidate all the settings onto the
default branch (master).
2022-05-13 08:09:09 -07:00
Callum Waters
f094fd204a update protos (#8515) 2022-05-13 16:18:24 +02:00
M. J. Fromberger
f9fa0a3228 docs: update event subscription documentation for new API (#8509)
Update the static documentation about event subscription to include the new
/events API, and to add more details about how queries work. Mention that the
streaming API is deprecated.
2022-05-12 11:54:49 -07:00
William Banfield
92811b9153 metrics: transition all metrics to using metricsgen generated constructors. (#8488)
## What does this change do?

This pull request completes the change to the `metricsgen` metrics. It adds `go generate` directives to all of the files containing the `Metrics` structs.

Using the outputs of `metricsdiff` between these generated metrics and `master`, we can see that there is not a diff between the two sets of metrics when run locally.
```
[william@sidewinder] tendermint[wb/metrics-gen-transition]:. ◆ ./scripts/metricsgen/metricsdiff/metricsdiff metrics_master metrics_generated
[william@sidewinder] tendermint[wb/metrics-gen-transition]:. ◆
```

This change also adds parsing for a `metrics:` key in a field comment. If a comment line begins with `//metrics:` the rest of the line is interpreted to be the metric help text. Additionally, a bug where lists of labels were not properly quoted in the `metricsgen` rendered output was fixed.
2022-05-12 18:39:12 +00:00
M. J. Fromberger
b5550b0d1b rpc: make block.height visible to event subscription (#8508)
Although we index block.height for blocks in the KV indexer, this reserved
attribute was not previously exposed to the event subscription API. Despite
being advertised in the OpenAPI spec, neither the old (websocket) nor new
(events) query interface could see it.  This change exposes block.height to the
/events API.

In addition: Remove a non-public constant from types (finalize_block). This
value is used only as an internal tag by the indexer, and should not be exposed
to users of the public interface. (We could probably drop it entirely, as it
was previously a disambiguator for BeginBlock vs. EndBlock events, but keeping
a tag here simplifies the cleanup).
2022-05-12 06:43:05 -07:00
William Banfield
0130a8cf97 scripts/metricsgen: add metricsdiff tool (#8501)
Adds the `metricsdiff` tool. The metricsdiff tool parses two files containing prometheus metrics and calculates the sets of metrics that were added or removed between the two files or have changed labels. This tool is added to ensure that the metrics been generated for `metricsgen` match the bespoke metrics.

The following metrics were found to be different between master and the the tool was built with. The output makes sense given that the metrics branch does _not_ contain https://github.com/tendermint/tendermint/pull/8480. 

```
./metricsdiff metrics_master metrics_generated
Removes:
--- tendermint_consensus_proposal_create_count
--- tendermint_consensus_vote_extension_receive_count
--- tendermint_consensus_round_voting_power_percent
--- tendermint_consensus_proposal_receive_count
```
2022-05-11 22:06:15 +00:00
dependabot[bot]
b0fe38c245 build(deps): Bump github.com/creachadair/tomledit from 0.0.19 to 0.0.22 (#8504)
Bumps [github.com/creachadair/tomledit](https://github.com/creachadair/tomledit) from 0.0.19 to 0.0.22.
<details>
<summary>Commits</summary>
<ul>
<li><a href="f7ad71d86c"><code>f7ad71d</code></a> cli: accept @ prefixed value arguments for strings</li>
<li><a href="2cb36fdb81"><code>2cb36fd</code></a> Release v0.0.21</li>
<li><a href="f56c9925a3"><code>f56c992</code></a> cli: move subcommands to a separate file</li>
<li><a href="0271385b7a"><code>0271385</code></a> cli: allow list arguments as prefix filters</li>
<li><a href="6e4454ec9d"><code>6e4454e</code></a> cli: add subcommand &quot;add&quot;</li>
<li><a href="d59f49c18b"><code>d59f49c</code></a> Add a basic command-line tool to read and set keys.</li>
<li><a href="9f9039fa9b"><code>9f9039f</code></a> Add a test for top-level comment blocking.</li>
<li>See full diff in <a href="https://github.com/creachadair/tomledit/compare/v0.0.19...v0.0.22">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/creachadair/tomledit&package-manager=go_modules&previous-version=0.0.19&new-version=0.0.22)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2022-05-11 13:23:47 +00:00
Thane Thomson
06b1812094 abci++: Propagate vote extensions (RFC 017) (#8433)
* Add protos for ExtendedCommit

Cherry-pick from e73f0178b72a16ee81f8e856aadf651f2c62ec6e just the
changes to the .proto files, since we have deleted the .intermediate
files.

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* make proto-gen

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* BlockStore holds extended commit

Cherry-pick 8d504d4b50ec6afbdffe2df7ababbef30e15053d and fix conflicts.

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Reshuffle ExtendedCommit and ExtendedCommitSig

Separate the data structures and functions from their Commit-oriented
counterparts to adhere to the current coding style.

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Fix exit condition in blocksync

* Add note to remove TxResult proto

As Sergio pointed out in 3e31aa6f583cdc71e208ed03a82f1d804ec0de49, this
proto message can probably be removed. We should do this in a separate
PR.

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Lift termination condition into for loop

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Enforce vote extension signature requirement

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Expand on comment for PeekTwoBlocks for posterity

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Isolate TODO more clearly

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* make mockery

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Fix comment

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Make panic output from BlockStore.SaveBlock more readable

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Add helper methods to ExtendedCommitSig and ExtendedCommit

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Fix most tests except TestHandshake*

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Fix store prefix collision

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Fix TestBlockFetchAtHeight

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Remove global state from store tests

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Apply suggestions from code review

Co-authored-by: M. J. Fromberger <fromberger@interchain.io>
Co-authored-by: Sergio Mena <sergio@informal.systems>

* blocksync: Just return error

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* make format

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* types: Remove unused/commented-out code

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* blocksync: Change pool AddBlock function signature to return errors

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* types: Improve legibility of switch statements

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* blocksync: Expand on extended commit requirement in AddBlock description

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* blocksync: Return error without also logging it

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* consensus: Rename short-lived local variable

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* consensus: Allocate TODO to Sergio

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* evidence/pool_test: Inline slice construction

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* state: Rename LoadBlockExtCommit to LoadBlockExtendedCommit

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* proto: Remove TODO on TxResult

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* types: Minor format

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* types: Reformat ExtendedCommitSig.BlockID

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* types: Remove NewExtendedCommit constructor

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* types: Remove NewCommit constructor

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* types: Shorten receiver names for ExtendedCommit

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* types: Convert ExtendedCommit.Copy to a deep clone

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* types: Assign TODO to Sergio

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* types: Fix legibility nits

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* types: Improve legibility

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* store/state: Add TODO to move prefixes to common package

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Propagate validator info to PrepareProposal

In order to propagate validator voting power through to PrepareProposal,
we need to load the validator set info from the height corresponding to
the extended commit that we're passing through to PrepareProposal as the
"LocalLastCommit".

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Rename local var for clarity

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Fix TestMaxProposalBlockSize

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Rename local var for clarity

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Remove debug log

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Remove CommigSig.ForBlock helper

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Remove CommigSig.Absent helper

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Remove ExtendedCommitSig.ForBlock helper

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Remove ExtendedCommitSig.Absent helper

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* There are no extended commits below the initial height

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Fix comment grammar

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Remove JSON encoding from ExtendedCommit

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Embed CommitSig into ExtendedCommitSig instead of duplicating fields

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Rename ExtendedCommit vote_extension field to extension for consistency with domain types

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* blocksync: Panic if we peek a block without an extended commit

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Apply suggestions from code review

Co-authored-by: M. J. Fromberger <fromberger@interchain.io>

* Remove Sergio from TODO

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Increase hard-coded vote extension max size to 1MB

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* state: Remove unnecessary comment

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* state: Ensure no of commit sigs equals validator set length

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* make format

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* types: Minor legibility improvements

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Improve legibility

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* types: Remove unused GetVotes function on VoteSet

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Refactor TestMaxProposalBlockSize to construct more realistic extended commit

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Refactor buildExtendedCommitInfo to resemble buildLastCommitInfo

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Apply suggestions from code review

Co-authored-by: M. J. Fromberger <fromberger@interchain.io>

* abci++: Disable VerifyVoteExtension call on nil precommits (#8491)

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* types: Require vote extensions on non-nil precommits and not otherwise

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Disable lint

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Increase timeout for TestReactorVotingPowerChange to counter flakiness

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Only sign and verify vote extensions in non-nil precommits

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Revert "Disable lint"

This reverts commit 6fffbf9402.

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Add missing non-nil check uncovered non-deterministically in TestHandshakeReplayAll

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Expand error message for accuracy

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Only call ExtendVote when we make non-nil precommits

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Revert "Increase timeout for TestReactorVotingPowerChange to counter flakiness"

This reverts commit af514939db.

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Refactor ValidateBasic for ExtendedCommitSig for legibility

Signed-off-by: Thane Thomson <connect@thanethomson.com>

Co-authored-by: Sergio Mena <sergio@informal.systems>
Co-authored-by: M. J. Fromberger <fromberger@interchain.io>
2022-05-11 07:10:32 -04:00
Sergio Mena
735a1a537b Fixed math notation in ABCI++ app requirements (#8499)
* Fixed math notation in ABCI++ app requirements

* Update spec/abci++/abci++_app_requirements_002_draft.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_app_requirements_002_draft.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_app_requirements_002_draft.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_app_requirements_002_draft.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

Co-authored-by: Daniel <daniel.cason@usi.ch>
2022-05-10 21:50:28 +02:00
William Banfield
c052181e32 consensus: add additional metrics for abci++ data (#8480)
This pull request adds an additional set of metrics targeted at providing more visibility into `abci++`. 

The following set of metrics are added and exposed through the `metrics` endpoint:

```
tendermint_consensus_proposal_receive_count{chain_id="test-chain-IrF74Y",status="accepted"} 34
tendermint_consensus_proposal_create_count{chain_id="test-chain-IrF74Y"} 34
tendermint_consensus_vote_extension_receive_count{chain_id="test-chain-IrF74Y",status="accepted"} 34
tendermint_consensus_round_voting_power_percent{chain_id="test-chain-IrF74Y",vote_type="precommit"} 1
tendermint_consensus_round_voting_power_percent{chain_id="test-chain-IrF74Y",vote_type="prevote"} 1
tendermint_state_consensus_param_updates{chain_id="test-chain-IrF74Y"} 0
tendermint_state_validator_set_updates{chain_id="test-chain-IrF74Y"} 0
tendermint_consensus_late_votes{chain_id="test-chain-IrF74Y",vote_type="precommit"} 16
```

This pull request also updates the `metrics.md` file to include some metrics that were previously missed. My hope is to generate the `metrics.md` file with a future version of the tool being architected in #8479
2022-05-10 16:48:13 +00:00
Callum Waters
a4c3b5cab4 validate block before we persist it (#8493) 2022-05-10 17:34:53 +02:00
Callum Waters
9dae97d845 RFC 016: Node Architecture (#8285) 2022-05-10 15:42:22 +02:00
dependabot[bot]
412a77915d build(deps): Bump github.com/golangci/golangci-lint (#8490) 2022-05-10 08:25:15 -04:00
William Banfield
4b36feaa2b scripts/metricsgen: add the initial version of metricsgen (#8479)
This pull requests adds a new tool, metricsgen, for generating Tendermint metrics constructors from `Metrics` struct definitions. This tool aims to reduce the amount of boilerplate required to add additional metrics to Tendermint.

Its working is fairly simple, it parses the go ast, extracts field information, and uses this field information to execute a go template. 

This pull request also adds a proof-of-concept of the tool's output and working by using it to generate the [indexer metrics](https://github.com/tendermint/tendermint/pull/8479/files#diff-4b0c597b6fa05332a2f9a8e0ce079e360602942fae99dc5485f1edfe71c0a29e) using `//go:generate` directives and a simple `make` target.

The next steps for this tool are documented in https://github.com/tendermint/tendermint/issues/8485 and https://github.com/tendermint/tendermint/issues/8486, which detail using the tool to generate the `metrics.md` documentation file and using the tool to migrate away from `go-kit`.
2022-05-09 22:52:10 +00:00
dependabot[bot]
b52b8f2740 build(deps): Bump docker/login-action from 1.14.1 to 2.0.0 (#8481)
Bumps [docker/login-action](https://github.com/docker/login-action) from 1.14.1 to 2.0.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/docker/login-action/releases">docker/login-action's releases</a>.</em></p>
<blockquote>
<h2>v2.0.0</h2>
<ul>
<li>Node 16 as default runtime by <a href="https://github.com/crazy-max"><code>@​crazy-max</code></a> (<a href="https://github-redirect.dependabot.com/docker/login-action/issues/161">#161</a>)
<ul>
<li>This requires a minimum <a href="https://github.com/actions/runner/releases/tag/v2.285.0">Actions Runner</a> version of v2.285.0, which is by default available in GHES 3.4 or later.</li>
</ul>
</li>
<li>chore: update dev dependencies and workflow by <a href="https://github.com/crazy-max"><code>@​crazy-max</code></a> (<a href="https://github-redirect.dependabot.com/docker/login-action/issues/170">#170</a>)</li>
<li>Bump <code>@​actions/exec</code> from 1.1.0 to 1.1.1 (<a href="https://github-redirect.dependabot.com/docker/login-action/issues/167">#167</a>)</li>
<li>Bump <code>@​actions/io</code> from 1.1.1 to 1.1.2 (<a href="https://github-redirect.dependabot.com/docker/login-action/issues/168">#168</a>)</li>
<li>Bump minimist from 1.2.5 to 1.2.6 (<a href="https://github-redirect.dependabot.com/docker/login-action/issues/176">#176</a>)</li>
<li>Bump https-proxy-agent from 5.0.0 to 5.0.1 (<a href="https://github-redirect.dependabot.com/docker/login-action/issues/182">#182</a>)</li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/docker/login-action/compare/v1.14.1...v2.0.0">https://github.com/docker/login-action/compare/v1.14.1...v2.0.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="49ed152c8e"><code>49ed152</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/docker/login-action/issues/161">#161</a> from crazy-max/node16-runtime</li>
<li><a href="b61a9ce7bd"><code>b61a9ce</code></a> Node 16 as default runtime</li>
<li><a href="3a136a8631"><code>3a136a8</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/docker/login-action/issues/182">#182</a> from docker/dependabot/npm_and_yarn/https-proxy-agent...</li>
<li><a href="b312880b69"><code>b312880</code></a> Update generated content</li>
<li><a href="795794e081"><code>795794e</code></a> Bump https-proxy-agent from 5.0.0 to 5.0.1</li>
<li><a href="1edf6180e0"><code>1edf618</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/docker/login-action/issues/179">#179</a> from docker/dependabot/github_actions/codecov/codecov...</li>
<li><a href="8e66ad4089"><code>8e66ad4</code></a> Bump codecov/codecov-action from 2 to 3</li>
<li><a href="7c79b598ea"><code>7c79b59</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/docker/login-action/issues/176">#176</a> from docker/dependabot/npm_and_yarn/minimist-1.2.6</li>
<li><a href="24a38e0d6d"><code>24a38e0</code></a> Bump minimist from 1.2.5 to 1.2.6</li>
<li><a href="70e1ff84cb"><code>70e1ff8</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/docker/login-action/issues/170">#170</a> from crazy-max/eslint</li>
<li>Additional commits viewable in <a href="https://github.com/docker/login-action/compare/v1.14.1...v2.0.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=docker/login-action&package-manager=github_actions&previous-version=1.14.1&new-version=2.0.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2022-05-09 14:35:43 +00:00
dependabot[bot]
083716b22a build(deps): Bump docker/build-push-action from 2.10.0 to 3.0.0 (#8482)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 2.10.0 to 3.0.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/docker/build-push-action/releases">docker/build-push-action's releases</a>.</em></p>
<blockquote>
<h2>v3.0.0</h2>
<ul>
<li>Node 16 as default runtime by <a href="https://github.com/crazy-max"><code>@​crazy-max</code></a> (<a href="https://github-redirect.dependabot.com/docker/build-push-action/issues/564">#564</a>)
<ul>
<li>This requires a minimum <a href="https://github.com/actions/runner/releases/tag/v2.285.0">Actions Runner</a> version of v2.285.0, which is by default available in GHES 3.4 or later.</li>
</ul>
</li>
<li>Standalone mode support by <a href="https://github.com/crazy-max"><code>@​crazy-max</code></a> (<a href="https://github-redirect.dependabot.com/docker/build-push-action/issues/601">#601</a> <a href="https://github-redirect.dependabot.com/docker/build-push-action/issues/609">#609</a>)</li>
<li>chore: update dev dependencies and workflow by <a href="https://github.com/crazy-max"><code>@​crazy-max</code></a> (<a href="https://github-redirect.dependabot.com/docker/build-push-action/issues/571">#571</a>)</li>
<li>Bump <code>@​actions/exec</code> from 1.1.0 to 1.1.1 (<a href="https://github-redirect.dependabot.com/docker/build-push-action/issues/573">#573</a>)</li>
<li>Bump <code>@​actions/github</code> from 5.0.0 to 5.0.1 (<a href="https://github-redirect.dependabot.com/docker/build-push-action/issues/582">#582</a>)</li>
<li>Bump minimist from 1.2.5 to 1.2.6 (<a href="https://github-redirect.dependabot.com/docker/build-push-action/issues/584">#584</a>)</li>
<li>Bump semver from 7.3.5 to 7.3.7 (<a href="https://github-redirect.dependabot.com/docker/build-push-action/issues/595">#595</a>)</li>
<li>Bump csv-parse from 4.16.3 to 5.0.4 (<a href="https://github-redirect.dependabot.com/docker/build-push-action/issues/533">#533</a>)</li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/docker/build-push-action/compare/v2.10.0...v3.0.0">https://github.com/docker/build-push-action/compare/v2.10.0...v3.0.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="e551b19e49"><code>e551b19</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/docker/build-push-action/issues/564">#564</a> from crazy-max/node-16</li>
<li><a href="3554377aa3"><code>3554377</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/docker/build-push-action/issues/609">#609</a> from crazy-max/ci-fix-test</li>
<li><a href="a62bc1b22b"><code>a62bc1b</code></a> ci: fix standalone test</li>
<li><a href="c2085839e1"><code>c208583</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/docker/build-push-action/issues/601">#601</a> from crazy-max/standalone-mode</li>
<li><a href="fcd91249e5"><code>fcd9124</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/docker/build-push-action/issues/607">#607</a> from docker/dependabot/github_actions/docker/metadata...</li>
<li><a href="0ebe720aed"><code>0ebe720</code></a> Bump docker/metadata-action from 3 to 4</li>
<li><a href="38b45804b5"><code>38b4580</code></a> Standalone mode support</li>
<li><a href="ba317382dc"><code>ba31738</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/docker/build-push-action/issues/533">#533</a> from docker/dependabot/npm_and_yarn/csv-parse-5.0.4</li>
<li><a href="43721d2346"><code>43721d2</code></a> Update generated content</li>
<li><a href="5ea21bf2ba"><code>5ea21bf</code></a> Fix csv-parse implementation since major update</li>
<li>Additional commits viewable in <a href="https://github.com/docker/build-push-action/compare/v2.10.0...v3.0.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=docker/build-push-action&package-manager=github_actions&previous-version=2.10.0&new-version=3.0.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2022-05-09 14:33:45 +00:00
dependabot[bot]
494c5cddbe build(deps): Bump docker/setup-buildx-action from 1.7.0 to 2.0.0 (#8483)
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 1.7.0 to 2.0.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/docker/setup-buildx-action/releases">docker/setup-buildx-action's releases</a>.</em></p>
<blockquote>
<h2>v2.0.0</h2>
<ul>
<li>Node 16 as default runtime by <a href="https://github.com/crazy-max"><code>@​crazy-max</code></a> (<a href="https://github-redirect.dependabot.com/docker/setup-buildx-action/issues/131">#131</a>)
<ul>
<li>This requires a minimum <a href="https://github.com/actions/runner/releases/tag/v2.285.0">Actions Runner</a> version of v2.285.0, which is by default available in GHES 3.4 or later.</li>
</ul>
</li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/docker/setup-buildx-action/compare/v1.7.0...v2.0.0">https://github.com/docker/setup-buildx-action/compare/v1.7.0...v2.0.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="dc7b9719a9"><code>dc7b971</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/docker/setup-buildx-action/issues/131">#131</a> from crazy-max/node16</li>
<li><a href="f55bc08278"><code>f55bc08</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/docker/setup-buildx-action/issues/141">#141</a> from crazy-max/fix-test</li>
<li><a href="aa877a9d36"><code>aa877a9</code></a> ci: fix standalone test</li>
<li><a href="130c56f342"><code>130c56f</code></a> Node 16 as default runtime</li>
<li>See full diff in <a href="https://github.com/docker/setup-buildx-action/compare/v1.7.0...v2.0.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=docker/setup-buildx-action&package-manager=github_actions&previous-version=1.7.0&new-version=2.0.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2022-05-09 14:31:59 +00:00
Sergio Mena
cec0a97987 RFC017: ABCI++ Vote Extension Propagation (#8317)
* 1st version

* Addressed (some of) @williambanfield's comments

* Update docs/rfc/rfc-017-abci++-vote-extension-propag.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update docs/rfc/rfc-017-abci++-vote-extension-propag.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update docs/rfc/rfc-017-abci++-vote-extension-propag.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update docs/rfc/rfc-017-abci++-vote-extension-propag.md

Co-authored-by: Sam Kleinman <garen@tychoish.com>

* Update docs/rfc/README.md

Co-authored-by: Sam Kleinman <garen@tychoish.com>

* Addressed some comments

* Addressed more comments. Improved description of Solution 3

* Work on 'definitions' section

* Update docs/rfc/rfc-017-abci++-vote-extension-propag.md

Co-authored-by: Callum Waters <cmwaters19@gmail.com>

* bottom

* Addressed Josef's valset-change comment. Other minor edits

* Improved wording of 'disjoint valsets' case

* Addressed TODOs: major revamp of various sections. First complete version.

* Fixed minor wording problem

* removed blank line

* Update docs/rfc/rfc-017-abci++-vote-extension-propag.md

Co-authored-by: Thane Thomson <connect@thanethomson.com>

* Update docs/rfc/rfc-017-abci++-vote-extension-propag.md

Co-authored-by: Thane Thomson <connect@thanethomson.com>

* Addressed some of Thane's comments

* Update docs/rfc/rfc-017-abci++-vote-extension-propag.md

Co-authored-by: Thane Thomson <connect@thanethomson.com>

* Update docs/rfc/rfc-017-abci++-vote-extension-propag.md

Co-authored-by: Thane Thomson <connect@thanethomson.com>

* Addressed outstanding comments

* Addressed @williambanfield's 'catch-up message' comment

* Removed TODO after confirming statesync is only run on nodes starting from scratch

* Removed TODO (after checking with Jasmina)

* Removed addressed TODO

* Addressed Josef's feedback on case (h)

* Typo

* Update docs/rfc/rfc-017-abci++-vote-extension-propag.md

Co-authored-by: Josef Widder <44643235+josef-widder@users.noreply.github.com>

* Added log line

Co-authored-by: Daniel <daniel.cason@usi.ch>
Co-authored-by: Sam Kleinman <garen@tychoish.com>
Co-authored-by: Callum Waters <cmwaters19@gmail.com>
Co-authored-by: Thane Thomson <connect@thanethomson.com>
Co-authored-by: Josef Widder <44643235+josef-widder@users.noreply.github.com>
2022-05-09 02:15:08 +02:00
elias-orijtech
694ab2c6d1 test/fuzz: replace outdated reference to go-fuzz in README (#8477) 2022-05-06 11:02:19 -07:00
M. J. Fromberger
97f2944db0 Reintegrate docs deployment into the main TM repo (#8468)
Per https://github.com/tendermint/docs/issues/20, it is no longer necessary to
build the static documentation out of a separate repository.

This change:

- Adds an actions workflow to build and deploy the docs to GitHub Pages.
- Updates some build settings in a compatible manner.

This change does not affect the existing site deployment. To complete this
change, we will need to update the custom domain pointer and disable the
corresponding workflow in the tendermint/docs repository. Those changes can and
must be done after this is merged.

In the future should probably also move the build rule out of the Makefile and
into the workflow directly. That will also make it easier to manage caching of
build artifacts. For now, however, I've left it as-is, so that we do not break
the active workflow on tendermint/docs, which depends on it.
2022-05-06 07:35:35 -07:00
M. J. Fromberger
ef44460c41 Convert explicit zero comparison to a method. (#8475)
Fixes #8472.

I didn't see any other obvious cases of us doing this (although we do return zeroes in other places alongside errors, which is fine).
2022-05-06 13:44:09 +00:00
dependabot[bot]
ce40697ea6 build(deps): Bump github.com/vektra/mockery/v2 from 2.12.1 to 2.12.2 (#8474)
Bumps [github.com/vektra/mockery/v2](https://github.com/vektra/mockery) from 2.12.1 to 2.12.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/vektra/mockery/releases">github.com/vektra/mockery/v2's releases</a>.</em></p>
<blockquote>
<h2>v2.12.2</h2>
<h2>Changelog</h2>
<ul>
<li>ea4c438 Add deprecation notice to logs</li>
<li>735bc0c Add go-get deprecation note</li>
<li>bea853e Add missing mock</li>
<li>989253d Fix *unsafe.Pointer</li>
<li>9228ad4 Merge pull request <a href="https://github-redirect.dependabot.com/vektra/mockery/issues/457">#457</a> from LandonTClipp/readme_deprecation</li>
<li>1d92e73 Merge pull request <a href="https://github-redirect.dependabot.com/vektra/mockery/issues/460">#460</a> from grongor/fix-unsafe-pointer</li>
<li>2fcd83d Merge pull request <a href="https://github-redirect.dependabot.com/vektra/mockery/issues/462">#462</a> from LandonTClipp/deprecation</li>
<li>9f67b8a More explicit deprecation for go-get</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="1d92e7320b"><code>1d92e73</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/vektra/mockery/issues/460">#460</a> from grongor/fix-unsafe-pointer</li>
<li><a href="2fcd83d746"><code>2fcd83d</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/vektra/mockery/issues/462">#462</a> from LandonTClipp/deprecation</li>
<li><a href="ea4c438a53"><code>ea4c438</code></a> Add deprecation notice to logs</li>
<li><a href="989253d1a4"><code>989253d</code></a> Fix *unsafe.Pointer</li>
<li><a href="bea853e93d"><code>bea853e</code></a> Add missing mock</li>
<li><a href="9f67b8afdc"><code>9f67b8a</code></a> More explicit deprecation for go-get</li>
<li><a href="9228ad4b4a"><code>9228ad4</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/vektra/mockery/issues/457">#457</a> from LandonTClipp/readme_deprecation</li>
<li><a href="735bc0c9f8"><code>735bc0c</code></a> Add go-get deprecation note</li>
<li>See full diff in <a href="https://github.com/vektra/mockery/compare/v2.12.1...v2.12.2">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/vektra/mockery/v2&package-manager=go_modules&previous-version=2.12.1&new-version=2.12.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2022-05-06 10:25:34 +00:00
William Banfield
e980e1468d RFC-018: initial research of BLS signature aggregation (#8358)
This provides an initial document for understanding the landscape of implementing a BLS signature aggregation scheme into Tendermint.
2022-05-05 12:08:22 -04:00
M. J. Fromberger
dd4fee88ef keymigrate: improve filtering for legacy transaction hashes (#8466)
This is a follow-up to #8352. The check for legacy evidence keys is only based
on the prefix of the key. Hashes, which are unprefixed, could easily have this
form and be misdiagnosed.

Because the conversion for evidence checks the key structure, this should not
cause corruption. The probability that a hash is a syntactically valid evidence
key is negligible.  The tool will report an error rather than storing bad data.
But this does mean that such transaction hashes could cause the migration to
stop and report an error before it is complete.

To ensure we convert all the data, refine the legacy key check to filter these
keys more precisely. Update the test cases to exercise this condition.

* Update upgrading instructions.
2022-05-04 11:08:26 -07:00
William Banfield
c8e336f2e9 docs: minor fixups to pbts overview (#8454) 2022-05-04 13:21:32 +00:00
dependabot[bot]
9a028b7d8a build(deps): Bump github.com/creachadair/atomicfile from 0.2.5 to 0.2.6 (#8460)
Bumps [github.com/creachadair/atomicfile](https://github.com/creachadair/atomicfile) from 0.2.5 to 0.2.6.
- [Release notes](https://github.com/creachadair/atomicfile/releases)
- [Commits](https://github.com/creachadair/atomicfile/compare/v0.2.5...v0.2.6)

---
updated-dependencies:
- dependency-name: github.com/creachadair/atomicfile
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-04 07:51:33 -04:00
Sam Kleinman
37287ead94 p2p: remove message type from channel implementation (#8452) 2022-05-02 10:52:57 -04:00
dependabot[bot]
6c40ad39b2 build(deps): Bump docker/setup-buildx-action from 1.6.0 to 1.7.0 (#8451)
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 1.6.0 to 1.7.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/docker/setup-buildx-action/releases">docker/setup-buildx-action's releases</a>.</em></p>
<blockquote>
<h2>v1.7.0</h2>
<ul>
<li>Standalone mode by <a href="https://github.com/crazy-max"><code>@​crazy-max</code></a> in (<a href="https://github-redirect.dependabot.com/docker/setup-buildx-action/issues/119">#119</a>)</li>
<li>Update dev dependencies and workflow by <a href="https://github.com/crazy-max"><code>@​crazy-max</code></a> (<a href="https://github-redirect.dependabot.com/docker/setup-buildx-action/issues/114">#114</a> <a href="https://github-redirect.dependabot.com/docker/setup-buildx-action/issues/130">#130</a>)</li>
<li>Bump tmpl from 1.0.4 to 1.0.5 (<a href="https://github-redirect.dependabot.com/docker/setup-buildx-action/issues/108">#108</a>)</li>
<li>Bump ansi-regex from 5.0.0 to 5.0.1 (<a href="https://github-redirect.dependabot.com/docker/setup-buildx-action/issues/109">#109</a>)</li>
<li>Bump <code>@​actions/core</code> from 1.5.0 to 1.6.0 (<a href="https://github-redirect.dependabot.com/docker/setup-buildx-action/issues/110">#110</a>)</li>
<li>Bump actions/checkout from 2 to 3 (<a href="https://github-redirect.dependabot.com/docker/setup-buildx-action/issues/126">#126</a>)</li>
<li>Bump <code>@​actions/tool-cache</code> from 1.7.1 to 1.7.2 (<a href="https://github-redirect.dependabot.com/docker/setup-buildx-action/issues/128">#128</a>)</li>
<li>Bump <code>@​actions/exec</code> from 1.1.0 to 1.1.1 (<a href="https://github-redirect.dependabot.com/docker/setup-buildx-action/issues/129">#129</a>)</li>
<li>Bump minimist from 1.2.5 to 1.2.6 (<a href="https://github-redirect.dependabot.com/docker/setup-buildx-action/issues/132">#132</a>)</li>
<li>Bump codecov/codecov-action from 2 to 3 (<a href="https://github-redirect.dependabot.com/docker/setup-buildx-action/issues/133">#133</a>)</li>
<li>Bump semver from 7.3.5 to 7.3.7 (<a href="https://github-redirect.dependabot.com/docker/setup-buildx-action/issues/136">#136</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="f211e3e9de"><code>f211e3e</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/docker/setup-buildx-action/issues/136">#136</a> from docker/dependabot/npm_and_yarn/semver-7.3.7</li>
<li><a href="b23216e504"><code>b23216e</code></a> Update generated content</li>
<li><a href="be7e600e20"><code>be7e600</code></a> Bump semver from 7.3.5 to 7.3.7</li>
<li><a href="7117987c01"><code>7117987</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/docker/setup-buildx-action/issues/119">#119</a> from crazy-max/standalone</li>
<li><a href="17ebdd4d65"><code>17ebdd4</code></a> ci: add jobs to check standalone behavior</li>
<li><a href="3472856dd9"><code>3472856</code></a> support standalone mode and display version</li>
<li><a href="74283caced"><code>74283ca</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/docker/setup-buildx-action/issues/133">#133</a> from docker/dependabot/github_actions/codecov/codecov...</li>
<li><a href="5b77ad49e8"><code>5b77ad4</code></a> Bump codecov/codecov-action from 2 to 3</li>
<li><a href="2a6fbda6d8"><code>2a6fbda</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/docker/setup-buildx-action/issues/132">#132</a> from docker/dependabot/npm_and_yarn/minimist-1.2.6</li>
<li><a href="03815bdb06"><code>03815bd</code></a> Bump minimist from 1.2.5 to 1.2.6</li>
<li>Additional commits viewable in <a href="https://github.com/docker/setup-buildx-action/compare/v1.6.0...v1.7.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=docker/setup-buildx-action&package-manager=github_actions&previous-version=1.6.0&new-version=1.7.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2022-05-02 11:52:11 +00:00
Daniel
a49325e4e0 PBTS: system model made more precise (#8096)
* PBTS model: precision, accuracy, and delay defs

* PBTS model: consensus properties reviewed

* PBTS model: reinforcing alignment with UTC

* PBTS model: precision parameter embodies accuracy

* PBTS model: discussion about accuracy shortened

* PBTS model: proposal time monotonocity rephrased

* PBTS model: precision, accuracy, and delay defs

* PBTS model: consensus properties reviewed

* PBTS model: reinforcing alignment with UTC

* PBTS model: precision parameter embodies accuracy

* PBTS model: discussion about accuracy shortened

* PBTS model: proposal time monotonocity rephrased

* PBTS model: Safety Invariants subsection

* PBTS model: MSGDELAY description shortened

* PBTS model: timely proposals definition refined

* PBTS model: some formatting changes

* PBTS model: timely predicate definition

* PBTS model: timely proof-of-lock re-defined

* PBTS model: derived proof-of-lock requirements

   * The property needs to be properly demonstrated.

* Apply suggestions from William

Co-authored-by: William Banfield <4561443+williambanfield@users.noreply.github.com>

* PBTS model: reference to arXiv algorithm on timely

* PBTS model: typos fixed

* PBTS model: derived POL "demonstration"

* PBTS model: fix formatting, r' renamed to vr

* PBTS model: minor fixes

* PBTS model: derived POL proof ammended

* PBTS safety: consensus validity with time inequalty

* PBTS: renamed receiveTime to proposalReceptionTime

* PBTS safety: short intro, some links

* PBTS model: safety refactored again

* PBTS model: liveness condition stated

* PBTS liveness: minor change

* Update spec/consensus/proposer-based-timestamp/pbts-sysmodel_002_draft.md

Co-authored-by: William Banfield <4561443+williambanfield@users.noreply.github.com>

* Update spec/consensus/proposer-based-timestamp/pbts-sysmodel_002_draft.md

Co-authored-by: William Banfield <4561443+williambanfield@users.noreply.github.com>

* Update spec/consensus/proposer-based-timestamp/pbts-sysmodel_002_draft.md

* Update spec/consensus/proposer-based-timestamp/pbts-sysmodel_002_draft.md

Co-authored-by: Josef Widder <44643235+josef-widder@users.noreply.github.com>

* Update spec/consensus/proposer-based-timestamp/pbts-sysmodel_002_draft.md

Co-authored-by: Josef Widder <44643235+josef-widder@users.noreply.github.com>

* Update spec/consensus/proposer-based-timestamp/pbts-sysmodel_002_draft.md

Co-authored-by: Josef Widder <44643235+josef-widder@users.noreply.github.com>

* PBTS sysmodel: formmatting typo fixed

Co-authored-by: William Banfield <4561443+williambanfield@users.noreply.github.com>
Co-authored-by: Josef Widder <44643235+josef-widder@users.noreply.github.com>
2022-05-02 10:22:03 +02:00
Thane Thomson
e7451a43e7 blocksync: Honor contexts supplied to BlockPool (#8447)
* Lift condition into for loop

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Honor contexts in BlockPool

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Only stop timers when necessary

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Optimize timers

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Simplify request interval definition

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Remove extraneous timer stop

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Convert switch into if

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Eliminate timers

Signed-off-by: Thane Thomson <connect@thanethomson.com>
2022-04-30 14:34:59 -04:00
Sam Kleinman
cf2a00b398 p2p: avoid using p2p.Channel internals (#8444) 2022-04-29 17:21:36 -04:00
Sam Kleinman
89196596f7 privval/grpc: normalize signature (#8441) 2022-04-29 10:56:10 -04:00
Sam Kleinman
eee19e42db consensus: reduce size of validator set changes test (#8442) 2022-04-29 10:29:26 -04:00
dependabot[bot]
97b39770e0 build(deps): Bump github.com/btcsuite/btcd from 0.22.0-beta to 0.22.1 (#8439)
Bumps [github.com/btcsuite/btcd](https://github.com/btcsuite/btcd) from 0.22.0-beta to 0.22.1.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/btcsuite/btcd/blob/v0.22.1/CHANGES">github.com/btcsuite/btcd's changelog</a>.</em></p>
<blockquote>
<h1>============================================================================
User visible changes for btcd
A full-node bitcoin implementation written in Go</h1>
<p>Changes in 0.22.1 (Wed Apr 27 2022)</p>
<ul>
<li>Notable developer-related package changes:
<ul>
<li>Update to use chaincfg/chainhash module and remove conflicting
package</li>
</ul>
</li>
<li>Contributors (alphabetical order):
<ul>
<li>Dave Collins</li>
</ul>
</li>
</ul>
<p>Changes in 0.22.0 (Tue Jun 01 2021)</p>
<ul>
<li>Protocol and network-related changes:
<ul>
<li>Add support for witness tx and block in notfound msg (<a href="https://github-redirect.dependabot.com/btcsuite/btcd/issues/1625">#1625</a>)</li>
<li>Add support for receiving sendaddrv2 messages from a peer (<a href="https://github-redirect.dependabot.com/btcsuite/btcd/issues/1670">#1670</a>)</li>
<li>Fix bug in peer package causing last block height to go backwards
(<a href="https://github-redirect.dependabot.com/btcsuite/btcd/issues/1606">#1606</a>)</li>
<li>Add chain parameters for connecting to the public Signet network
(<a href="https://github-redirect.dependabot.com/btcsuite/btcd/issues/1692">#1692</a>, <a href="https://github-redirect.dependabot.com/btcsuite/btcd/issues/1718">#1718</a>)</li>
</ul>
</li>
<li>Crypto changes:
<ul>
<li>Fix bug causing panic due to bad R and S signature components in
btcec.RecoverCompact (<a href="https://github-redirect.dependabot.com/btcsuite/btcd/issues/1691">#1691</a>)</li>
<li>Set the name (secp256k1) in the CurveParams of the S256 curve
(<a href="https://github-redirect.dependabot.com/btcsuite/btcd/issues/1565">#1565</a>)</li>
</ul>
</li>
<li>Notable developer-related package changes:
<ul>
<li>Remove unknown block version warning in the blockchain package,
due to false positives triggered by AsicBoost (<a href="https://github-redirect.dependabot.com/btcsuite/btcd/issues/1463">#1463</a>)</li>
<li>Add chaincfg.RegisterHDKeyID function to populate HD key ID pairs
(<a href="https://github-redirect.dependabot.com/btcsuite/btcd/issues/1617">#1617</a>)</li>
<li>Add new method mining.AddWitnessCommitment to add the witness
commitment as an OP_RETURN output within the coinbase transaction.
(<a href="https://github-redirect.dependabot.com/btcsuite/btcd/issues/1716">#1716</a>)</li>
</ul>
</li>
<li>RPC changes:
<ul>
<li>Support Batch JSON-RPC in rpcclient and server (<a href="https://github-redirect.dependabot.com/btcsuite/btcd/issues/1583">#1583</a>)</li>
<li>Add rpcclient method to invoke getdescriptorinfo JSON-RPC command
(<a href="https://github-redirect.dependabot.com/btcsuite/btcd/issues/1578">#1578</a>)</li>
<li>Update the rpcserver handler for validateaddress JSON-RPC command to
have parity with the bitcoind 0.20.0 interface (<a href="https://github-redirect.dependabot.com/btcsuite/btcd/issues/1613">#1613</a>)</li>
<li>Add rpcclient method to invoke getblockfilter JSON-RPC command
(<a href="https://github-redirect.dependabot.com/btcsuite/btcd/issues/1579">#1579</a>)</li>
<li>Add signmessagewithprivkey JSON-RPC command in rpcserver (<a href="https://github-redirect.dependabot.com/btcsuite/btcd/issues/1585">#1585</a>)</li>
<li>Add rpcclient method to invoke importmulti JSON-RPC command (<a href="https://github-redirect.dependabot.com/btcsuite/btcd/issues/1579">#1579</a>)</li>
<li>Add watchOnly argument in rpcclient method to invoke
listtransactions JSON-RPC command (<a href="https://github-redirect.dependabot.com/btcsuite/btcd/issues/1628">#1628</a>)</li>
<li>Update btcjson.ListTransactionsResult for compatibility with Bitcoin
Core 0.20.0 (<a href="https://github-redirect.dependabot.com/btcsuite/btcd/issues/1626">#1626</a>)</li>
<li>Support nullable optional JSON-RPC parameters (<a href="https://github-redirect.dependabot.com/btcsuite/btcd/issues/1594">#1594</a>)</li>
<li>Add rpcclient and server method to invoke getnodeaddresses JSON-RPC</li>
</ul>
</li>
</ul>

</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="2f508b3f86"><code>2f508b3</code></a> Update CHANGES file for 0.22.1 release.</li>
<li><a href="ff92d88504"><code>ff92d88</code></a> btcd: bump version to v0.22.1.</li>
<li><a href="cf5c461d91"><code>cf5c461</code></a> main: Switch to chaincfg/chainhash module.</li>
<li>See full diff in <a href="https://github.com/btcsuite/btcd/compare/v0.22.0-beta...v0.22.1">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/btcsuite/btcd&package-manager=go_modules&previous-version=0.22.0-beta&new-version=0.22.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2022-04-29 11:21:56 +00:00
dependabot[bot]
297fcc0a7c build(deps): Bump github.com/creachadair/tomledit from 0.0.18 to 0.0.19 (#8440)
Bumps [github.com/creachadair/tomledit](https://github.com/creachadair/tomledit) from 0.0.18 to 0.0.19.
<details>
<summary>Commits</summary>
<ul>
<li><a href="0692e4157a"><code>0692e41</code></a> Release v0.0.19</li>
<li><a href="d1160a474b"><code>d1160a4</code></a> Update default permissions.</li>
<li><a href="56f28f4ea0"><code>56f28f4</code></a> Move transform tests to that package.</li>
<li><a href="3b8b380274"><code>3b8b380</code></a> Add permissions to CI workflow.</li>
<li><a href="409951b699"><code>409951b</code></a> Add a quotation test case.</li>
<li><a href="f35c8bec5c"><code>f35c8be</code></a> parser: include line numbers in headings, mappings, and values</li>
<li><a href="26acca1df8"><code>26acca1</code></a> Regularize location formatting in diagnostics.</li>
<li><a href="3394f599e4"><code>3394f59</code></a> Add more parser test cases.</li>
<li><a href="5ce10cc05a"><code>5ce10cc</code></a> Rename test file.</li>
<li><a href="29f3eb34c8"><code>29f3eb3</code></a> Allow compliance tests to be skipped with -short.</li>
<li>See full diff in <a href="https://github.com/creachadair/tomledit/compare/v0.0.18...v0.0.19">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/creachadair/tomledit&package-manager=go_modules&previous-version=0.0.18&new-version=0.0.19)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2022-04-29 10:59:15 +00:00
Sam Kleinman
3d448e1ef8 crypto: cleanup tmhash package (#8434) 2022-04-28 22:21:43 -04:00
M. J. Fromberger
6faf506540 rpc: fix byte string decoding for URL parameters (#8431)
In #8397 I tried to remove all the cases where we needed to keep track of the
target type of parameters for JSON encoding, but there is one case still left:
When decoding parameters from URL query terms, there is no way to tell whether
or not we need base64 encoding without knowing whether the underlying type of
the target is string or []byte.

To fix this, keep track of parameters that are []byte valued when RPCFunc is
compiling its argument map, and use that when parsing URL query terms.  Update
the tests accordingly.
2022-04-28 15:18:11 -07:00
Thane Thomson
d69bd64702 abci++: Vote extension cleanup (#8402)
* Split vote verification/validation based on vote extensions

Some parts of the code need vote extensions to be verified and
validated (mostly in consensus), and other parts of the code don't
because its possible that, in some cases (as per RFC 017), we won't have
vote extensions.

This explicitly facilitates that split.

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Only sign extensions in precommits, not prevotes

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Update privval/file.go

Co-authored-by: M. J. Fromberger <fromberger@interchain.io>

* Apply suggestions from code review

Co-authored-by: M. J. Fromberger <fromberger@interchain.io>

* Temporarily disable extension requirement again for E2E testing

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Reorganize comment for clarity

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Leave vote validation and pre-call nil check up to caller of VoteToProto

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Split complex vote validation test into multiple tests

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Universally enforce no vote extensions on any vote type but precommits

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Make error messages more generic

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Verify with vote extensions when constructing a VoteSet

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Expand comment for clarity

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Add extension check for prevotes prior to signing votes

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Fix supporting test code to only inject extensions into precommits

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Separate vote malleation from signing in vote tests for clarity

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Add extension signature length check and corresponding test

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Perform basic vote validation in CommitToVoteSet

Signed-off-by: Thane Thomson <connect@thanethomson.com>

Co-authored-by: M. J. Fromberger <fromberger@interchain.io>
2022-04-28 13:53:44 -04:00
M. J. Fromberger
47d52fc78d Use patched link-checker for periodic checks. (#8430)
In #8339 we pointed the markdown link checker action to a patched version that
has the up-to-date version of the underlying check tool. In doing so, I missed
the periodic cron job that runs the same workflow. Update it to use the patched
version also.
2022-04-28 06:44:56 -07:00
Sam Kleinman
2a58ea3ab2 p2p: use nodeinfo less often (#8427) 2022-04-27 21:13:38 +00:00
Sam Kleinman
1121698757 node: start rpc service after reactors (#8426) 2022-04-27 15:55:27 -04:00
Sam Kleinman
8670678291 p2p: remove support for multiple transports and endpoints (#8420) 2022-04-27 14:29:19 -04:00
M. J. Fromberger
da1b871808 Unify RPC method signatures and parameter decoding (#8397)
Pass all parameters from JSON-RPC requests to their corresponding handlers
using struct types instead of positional parameters. This allows us to control
encoding of arguments using only the standard library, and to eliminate the
remaining special-purpose JSON encoding hooks in the server.

To support existing use, the server still allows arguments to be encoded in
JSON as either an array or an object.

Related changes:

- Rework the RPCFunc constructor to reduce reflection during RPC call service.
- Add request parameter wrappers for each RPC service method.
- Update the RPC Environment methods to use these types.
- Update the interfaces and shims derived from Environment to the new
  signatures.
- Update and extend test cases.
2022-04-27 07:53:51 -07:00
elias-orijtech
e741d01231 fuzz: don't panic on expected errors (#8423)
In the conversion to Go 1.18 fuzzing in e4991fd862,
a `return 0` was converted to a panic. A `return 0` is a hint to the fuzzer, not
a failing testcase.

While here, clean up the test by folding setup code into it.
2022-04-27 07:26:21 -07:00
dependabot[bot]
b626b0a719 build(deps): Bump github.com/google/go-cmp from 0.5.7 to 0.5.8 (#8422)
Bumps [github.com/google/go-cmp](https://github.com/google/go-cmp) from 0.5.7 to 0.5.8.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/google/go-cmp/releases">github.com/google/go-cmp's releases</a>.</em></p>
<blockquote>
<h2>v0.5.8</h2>
<p>Reporter changes:</p>
<ul>
<li>(<a href="https://github-redirect.dependabot.com/google/go-cmp/issues/293">#293</a>) Fix printing of types in reporter output for interface and pointer types</li>
<li>(<a href="https://github-redirect.dependabot.com/google/go-cmp/issues/294">#294</a>) Use string formatting for slice of bytes in more circumstances</li>
</ul>
<p>Dependency changes:</p>
<ul>
<li>(<a href="https://github-redirect.dependabot.com/google/go-cmp/issues/292">#292</a>) Update minimum supported version to go1.13 and remove <code>xerrors</code> dependency</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="f144a35ed4"><code>f144a35</code></a> Additional cleanup with Go 1.13 as minimal version (<a href="https://github-redirect.dependabot.com/google/go-cmp/issues/295">#295</a>)</li>
<li><a href="63c2960be6"><code>63c2960</code></a> remove xerrors (<a href="https://github-redirect.dependabot.com/google/go-cmp/issues/292">#292</a>)</li>
<li><a href="71220fc3ca"><code>71220fc</code></a> Use string formatting for slice of bytes (<a href="https://github-redirect.dependabot.com/google/go-cmp/issues/294">#294</a>)</li>
<li><a href="4664e24d52"><code>4664e24</code></a> Fix printing of types in reporter output (<a href="https://github-redirect.dependabot.com/google/go-cmp/issues/293">#293</a>)</li>
<li><a href="79433ace28"><code>79433ac</code></a> Run tests on Go 1.18 (<a href="https://github-redirect.dependabot.com/google/go-cmp/issues/290">#290</a>)</li>
<li>See full diff in <a href="https://github.com/google/go-cmp/compare/v0.5.7...v0.5.8">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/google/go-cmp&package-manager=go_modules&previous-version=0.5.7&new-version=0.5.8)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2022-04-27 13:21:03 +00:00
dependabot[bot]
c44e6d1799 build(deps): Bump github.com/vektra/mockery/v2 from 2.12.0 to 2.12.1 (#8417)
Bumps [github.com/vektra/mockery/v2](https://github.com/vektra/mockery) from 2.12.0 to 2.12.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/vektra/mockery/releases">github.com/vektra/mockery/v2's releases</a>.</em></p>
<blockquote>
<h2>v2.12.1</h2>
<h2>Changelog</h2>
<ul>
<li>facf60b Add extra test cases for increasing code coverage.</li>
<li>2e1360a Collapse if statements and rename interface in the fixtures.</li>
<li>8bdc90d Fix test on go1.18.</li>
<li>fe03b57 Fix tests.</li>
<li>b8c62f7 Fix: avoid package name collision with inPackage (<a href="https://github-redirect.dependabot.com/vektra/mockery/issues/291">#291</a>)</li>
<li>c9dc740 Merge pull request <a href="https://github-redirect.dependabot.com/vektra/mockery/issues/422">#422</a> from i-sevostyanov/fix-package-collision</li>
<li>58a7f18 Merge pull request <a href="https://github-redirect.dependabot.com/vektra/mockery/issues/452">#452</a> from grongor/refactor-first-letter-helper</li>
<li>749b2d6 Refactor mock name generation</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="c9dc740b50"><code>c9dc740</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/vektra/mockery/issues/422">#422</a> from i-sevostyanov/fix-package-collision</li>
<li><a href="facf60b02e"><code>facf60b</code></a> Add extra test cases for increasing code coverage.</li>
<li><a href="8bdc90da7a"><code>8bdc90d</code></a> Fix test on go1.18.</li>
<li><a href="fe03b57da5"><code>fe03b57</code></a> Fix tests.</li>
<li><a href="2e1360ae46"><code>2e1360a</code></a> Collapse if statements and rename interface in the fixtures.</li>
<li><a href="b8c62f7858"><code>b8c62f7</code></a> Fix: avoid package name collision with inPackage (<a href="https://github-redirect.dependabot.com/vektra/mockery/issues/291">#291</a>)</li>
<li><a href="58a7f185bd"><code>58a7f18</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/vektra/mockery/issues/452">#452</a> from grongor/refactor-first-letter-helper</li>
<li><a href="749b2d6fa5"><code>749b2d6</code></a> Refactor mock name generation</li>
<li>See full diff in <a href="https://github.com/vektra/mockery/compare/v2.12.0...v2.12.1">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/vektra/mockery/v2&package-manager=go_modules&previous-version=2.12.0&new-version=2.12.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2022-04-26 15:01:57 +00:00
Thane Thomson
dcfbd9bc3d abci++: Remove intermediate protos (#8414)
* Sync protos with their intermediates

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Remove intermediate protos and their supporting scripts

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* make proto-gen

Signed-off-by: Thane Thomson <connect@thanethomson.com>
2022-04-26 08:02:17 -04:00
Sam Kleinman
e36052c80e crypto: remove unused code (#8412) 2022-04-25 12:35:59 -04:00
Sam Kleinman
02c1c8ecb4 config: minor template infrastructure (#8411) 2022-04-25 12:08:22 -04:00
dependabot[bot]
701eff8968 build(deps): Bump google.golang.org/grpc from 1.45.0 to 1.46.0 (#8408)
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.45.0 to 1.46.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.46.0</h2>
<h1>New Features</h1>
<ul>
<li>server: Support setting <code>TCP_USER_TIMEOUT</code> on <code>grpc.Server</code> connections using <code>keepalive.ServerParameters.Time</code> (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5219">#5219</a>)
<ul>
<li>Special Thanks: <a href="https://github.com/bonnefoa"><code>@​bonnefoa</code></a></li>
</ul>
</li>
<li>client: perform graceful switching of LB policies in the <code>ClientConn</code> by default (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5285">#5285</a>)</li>
<li>all: improve logging by including channelz identifier in log messages (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5192">#5192</a>)</li>
</ul>
<h1>API Changes</h1>
<ul>
<li>grpc: delete <code>WithBalancerName()</code> API, deprecated over 4 years ago in <a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/1697">#1697</a> (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5232">#5232</a>)</li>
<li>balancer: change BuildOptions.ChannelzParentID to an opaque identifier instead of int (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5192">#5192</a>)
<ul>
<li>Note: the balancer package is labeled as EXPERIMENTAL, and we don't believe users were using this field.</li>
</ul>
</li>
</ul>
<h1>Behavior Changes</h1>
<ul>
<li>client: change connectivity state to <code>TransientFailure</code> in <code>pick_first</code> LB policy when all addresses are removed (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5274">#5274</a>)
<ul>
<li>This is a minor change that brings grpc-go's behavior in line with the intended behavior and how C and Java behave.</li>
</ul>
</li>
<li>metadata: add client-side validation of HTTP-invalid metadata before attempting to send (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4886">#4886</a>)
<ul>
<li>Special Thanks: <a href="https://github.com/Patrick0308"><code>@​Patrick0308</code></a></li>
</ul>
</li>
</ul>
<h1>Bug Fixes</h1>
<ul>
<li>metadata: make a copy of the value slices in FromContext() functions so that modifications won't be made to the original copy (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5267">#5267</a>)</li>
<li>client: handle invalid service configs by applying the default, if applicable (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5238">#5238</a>)</li>
<li>xds: the xds client will now apply a 1 second backoff before recreating ADS or LRS streams (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5280">#5280</a>)</li>
</ul>
<h1>Dependencies</h1>
<ul>
<li>Upgrade security/authorization module dependencies to <a href="https://github.com/google/cel-go">https://github.com/google/cel-go</a> v0.10.1 and others (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5243">#5243</a>)
<ul>
<li>Special Thanks: <a href="https://github.com/TristonianJones"><code>@​TristonianJones</code></a></li>
</ul>
</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="e8d06c51a5"><code>e8d06c5</code></a> Change version to 1.46.0 (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5296">#5296</a>)</li>
<li><a href="efbd542a4f"><code>efbd542</code></a> gcp/observability: correctly test this module in presubmit tests (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5300">#5300</a>) (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5307">#5307</a>)</li>
<li><a href="4467a29dbb"><code>4467a29</code></a> gcp/observability: implement logging via binarylog (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5196">#5196</a>)</li>
<li><a href="18fdf542fa"><code>18fdf54</code></a> cmd/protoc-gen-go-grpc: allow hooks to modify client structs and service hand...</li>
<li><a href="337b815c41"><code>337b815</code></a> interop: build client without timeout; add logs to help debug failures (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5294">#5294</a>)</li>
<li><a href="e583b196ce"><code>e583b19</code></a> xds: Add RLS in xDS e2e test (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5281">#5281</a>)</li>
<li><a href="0066bf69de"><code>0066bf6</code></a> grpc: perform graceful switching of LB policies in the <code>ClientConn</code> by defaul...</li>
<li><a href="3cccf6a43b"><code>3cccf6a</code></a> xdsclient: always backoff between new streams even after successful stream (#...</li>
<li><a href="4e780933f8"><code>4e78093</code></a> xds: ignore routes with unsupported cluster specifiers (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5269">#5269</a>)</li>
<li><a href="99aae3442d"><code>99aae34</code></a> cluster manager: Add Graceful Switch functionality to Cluster Manager (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5265">#5265</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/grpc/grpc-go/compare/v1.45.0...v1.46.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=google.golang.org/grpc&package-manager=go_modules&previous-version=1.45.0&new-version=1.46.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2022-04-25 12:04:57 +00:00
dependabot[bot]
a4190208a3 build(deps): Bump codecov/codecov-action from 3.0.0 to 3.1.0 (#8406)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3.0.0 to 3.1.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/codecov/codecov-action/releases">codecov/codecov-action's releases</a>.</em></p>
<blockquote>
<h2>v3.1.0</h2>
<h2>3.1.0</h2>
<h3>Features</h3>
<ul>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-action/issues/699">#699</a> Incorporate <code>xcode</code> arguments for the Codecov uploader</li>
</ul>
<h3>Dependencies</h3>
<ul>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-action/issues/694">#694</a> build(deps-dev): bump <code>@​vercel/ncc</code> from 0.33.3 to 0.33.4</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-action/issues/696">#696</a> build(deps-dev): bump <code>@​types/node</code> from 17.0.23 to 17.0.25</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-action/issues/698">#698</a> build(deps-dev): bump jest-junit from 13.0.0 to 13.2.0</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/codecov/codecov-action/blob/master/CHANGELOG.md">codecov/codecov-action's changelog</a>.</em></p>
<blockquote>
<h2>3.1.0</h2>
<h3>Features</h3>
<ul>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-action/issues/699">#699</a> Incorporate <code>xcode</code> arguments for the Codecov uploader</li>
</ul>
<h3>Dependencies</h3>
<ul>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-action/issues/694">#694</a> build(deps-dev): bump <code>@​vercel/ncc</code> from 0.33.3 to 0.33.4</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-action/issues/696">#696</a> build(deps-dev): bump <code>@​types/node</code> from 17.0.23 to 17.0.25</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-action/issues/698">#698</a> build(deps-dev): bump jest-junit from 13.0.0 to 13.2.0</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="81cd2dc814"><code>81cd2dc</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/codecov/codecov-action/issues/699">#699</a> from codecov/feat-xcode</li>
<li><a href="a03184e530"><code>a03184e</code></a> feat: add xcode support</li>
<li><a href="6a6a9ae7b1"><code>6a6a9ae</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/codecov/codecov-action/issues/694">#694</a> from codecov/dependabot/npm_and_yarn/vercel/ncc-0.33.4</li>
<li><a href="92a872a5e7"><code>92a872a</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/codecov/codecov-action/issues/696">#696</a> from codecov/dependabot/npm_and_yarn/types/node-17.0.25</li>
<li><a href="43a9c182dd"><code>43a9c18</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/codecov/codecov-action/issues/698">#698</a> from codecov/dependabot/npm_and_yarn/jest-junit-13.2.0</li>
<li><a href="13ce822ccd"><code>13ce822</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/codecov/codecov-action/issues/690">#690</a> from codecov/ci-v3</li>
<li><a href="4d6dbaaea6"><code>4d6dbaa</code></a> build(deps-dev): bump jest-junit from 13.0.0 to 13.2.0</li>
<li><a href="98f0f19300"><code>98f0f19</code></a> build(deps-dev): bump <code>@​types/node</code> from 17.0.23 to 17.0.25</li>
<li><a href="d3021d9910"><code>d3021d9</code></a> build(deps-dev): bump <code>@​vercel/ncc</code> from 0.33.3 to 0.33.4</li>
<li><a href="2c83f35c20"><code>2c83f35</code></a> Update makefile to v3</li>
<li>See full diff in <a href="https://github.com/codecov/codecov-action/compare/v3.0.0...v3.1.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=codecov/codecov-action&package-manager=github_actions&previous-version=3.0.0&new-version=3.1.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2022-04-25 11:52:01 +00:00
dependabot[bot]
5b38bc17b1 build(deps): Bump bufbuild/buf-setup-action from 1.3.1 to 1.4.0 (#8405)
Bumps [bufbuild/buf-setup-action](https://github.com/bufbuild/buf-setup-action) from 1.3.1 to 1.4.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/bufbuild/buf-setup-action/releases">bufbuild/buf-setup-action's releases</a>.</em></p>
<blockquote>
<h2>v1.4.0</h2>
<ul>
<li>Set the default buf version to v1.4.0</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="b0ab760002"><code>b0ab760</code></a> Update to v1.4.0</li>
<li><a href="60debd1093"><code>60debd1</code></a> Revert &quot;Add dependabot config (<a href="https://github-redirect.dependabot.com/bufbuild/buf-setup-action/issues/21">#21</a>)&quot; (<a href="https://github-redirect.dependabot.com/bufbuild/buf-setup-action/issues/33">#33</a>)</li>
<li><a href="e789cb128b"><code>e789cb1</code></a> Add dependabot config (<a href="https://github-redirect.dependabot.com/bufbuild/buf-setup-action/issues/21">#21</a>)</li>
<li>See full diff in <a href="https://github.com/bufbuild/buf-setup-action/compare/v1.3.1...v1.4.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=bufbuild/buf-setup-action&package-manager=github_actions&previous-version=1.3.1&new-version=1.4.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2022-04-25 11:50:11 +00:00
Sam Kleinman
2e5d53ea9a abci: interface should take pointers to arguments (#8404) 2022-04-24 18:37:07 +00:00
Sam Kleinman
674908b130 abci: remove unneccessary implementations (#8403) 2022-04-24 12:01:39 -04:00
M. J. Fromberger
001449d536 Remove obsolete build tagged patch for net.Pipe. (#8399)
The p2p/conn library was using a build patch to work around an old issue with
the net.Conn type that has not existed since Go 1.10. Remove the workaround and
update usage to use the standard net.Pipe directly.
2022-04-23 09:57:42 -07:00
Sam Kleinman
a5ecd418a6 abci: remove redundant methods in client (#8401) 2022-04-23 08:59:18 -04:00
M. J. Fromberger
20f8485080 Make encoding of HexBytes values more robust. (#8398)
The HexBytes wrapper type handles decoding byte strings from JSON.  In the RPC
API, hashes are encoded as hex digits rather than the standard base64.

Simplify the implementation of this wrapper using the TextMarshaler interface,
which the encoding/json package uses for values (like these) that are meant to
be wrapped in JSON strings.

In addition, allow HexBytes values to be decoded from either hex OR base64
input. This preserves all existing use, but will allow us to remove some
reflection special cases in the RPC decoder plumbing.

Update tests to correctly tolerate empty/nil.
2022-04-22 18:02:41 -07:00
Sam Kleinman
b5e6cf50d1 abci: Application should return errors errors and nilable response objects (#8396) 2022-04-22 20:40:42 -04:00
Sam Kleinman
8345dc4f7c abci: application type should take contexts (#8388) 2022-04-22 10:58:01 -04:00
dependabot[bot]
6970c9177b build(deps): Bump github.com/vektra/mockery/v2 from 2.11.0 to 2.12.0 (#8393) 2022-04-22 05:55:33 -07:00
dependabot[bot]
383f9ea180 build(deps): Bump github.com/creachadair/tomledit from 0.0.16 to 0.0.18 (#8392)
Bumps [github.com/creachadair/tomledit](https://github.com/creachadair/tomledit) from 0.0.16 to 0.0.18.
<details>
<summary>Commits</summary>
<ul>
<li><a href="5802e262c6"><code>5802e26</code></a> Release v0.0.18</li>
<li><a href="3c9daf1a4a"><code>3c9daf1</code></a> document that we don't validate</li>
<li><a href="da8c938af4"><code>da8c938</code></a> Remove non-applicable test cases.</li>
<li><a href="ac4210b0d1"><code>ac4210b</code></a> parser: ensure unclosed arrays are not treated as empty</li>
<li><a href="f98f82fec1"><code>f98f82f</code></a> parser: ensure array separators are present</li>
<li><a href="ea1671ecca"><code>ea1671e</code></a> scanner: clean up some issues in escape and space handling</li>
<li><a href="8168589a25"><code>8168589</code></a> scanner: filter bad commas in numeric literals</li>
<li><a href="83189e20b7"><code>83189e2</code></a> scanner: fix some issues in multiline string recognition</li>
<li><a href="bdc8e22990"><code>bdc8e22</code></a> scanner: allow space separators in date-time strings</li>
<li><a href="1ab2c8d654"><code>1ab2c8d</code></a> Add compliance tests.</li>
<li>Additional commits viewable in <a href="https://github.com/creachadair/tomledit/compare/v0.0.16...v0.0.18">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/creachadair/tomledit&package-manager=go_modules&previous-version=0.0.16&new-version=0.0.18)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2022-04-22 12:22:20 +00:00
M. J. Fromberger
ef314708e7 RFC 019: Configuration File Versioning (#8379)
This RFC discusses issues in how we migrate configuration data across
Tendermint versions, and some options for how to improve the experience for
node operators in the future.
2022-04-21 10:08:47 -07:00
Sam Kleinman
f0db0ff260 abci: streamline grpc application construction (#8383)
In my mind this is "don't make grpc any weirder than it has to be." 

We definitely don't need to export this type: if you're using gRPC for
ABCI you *probably* don't want to also depend on the huge swath of the
code that

The ideal case is you generate the proto yourself, standup a gRPC
service on your own (presumably because your application has other
gRPC services that you want to expose,) and then your application
doesn't need to interact with the types package at all. This is
definitely the case for anyone who uses gRPC and doesn't use Go (which
is likely the predominant use case.)

If you're using Go, and want to use tendermint's service runner for
running your gRPC service, you can, but at this point (as before,)
you're already importing the `types` package (and you were before,)
I've just eliminated an intermediate type that you shouldn't need to
think about.

Reviewers: I think the change is pretty rote, but the logic/user-story
above would definitely be better for being validated by someone other
than me. :)
2022-04-21 16:21:11 +00:00
M. J. Fromberger
9d49c4b9af Add config samples from TM v26, v27, v28, v29. (#8384) 2022-04-21 08:54:07 -07:00
elias-orijtech
b4da12815f test/fuzz/tests: remove debug logging statement (#8385) 2022-04-21 10:26:07 -04:00
Sam Kleinman
cbae5f9f53 abci: avoid having untracked requests in the channel (#8382)
It seems to me that by adding requests to the clients tracker (the
`reqSent` linked list), then there's no need to actually drain the
channel, becuase we will mark all of these requests as done/errored
(which propogates to users, as users never get future objects any
more), and then the GC can reap all of the request objects and the
channel accordingly.
2022-04-20 18:06:07 +00:00
M. J. Fromberger
d56392cee9 Add confix testdata for Tendermint v0.30. (#8380)
Some additional testdata I grabbed while writing up the draft of RFC 019.
2022-04-20 14:38:48 +00:00
Sam Kleinman
29e5fbcc64 rpc: reformat method signatures and use a context (#8377)
I was digging around over here, and thought it'd be good to
cleanup/standardize the line formating on a few of these methods. Also
found a few cases where we could use contexts better so did a little
bit of cleanup there too!
2022-04-19 19:17:07 +00:00
elias-orijtech
e4991fd862 test/fuzz: convert to Go 1.18 native fuzzing (#8359) 2022-04-19 11:49:51 -07:00
Sam Kleinman
ad249ca178 node: cleanup setup for indexer and evidence components (#8378) 2022-04-19 15:35:14 +00:00
Sam Kleinman
d919a42f53 node: use signals rather than ephemeral contexts (#8376) 2022-04-19 15:13:01 +00:00
dependabot[bot]
82585e1ce6 build(deps): Bump github.com/vektra/mockery/v2 from 2.10.6 to 2.11.0 (#8374)
Bumps [github.com/vektra/mockery/v2](https://github.com/vektra/mockery) from 2.10.6 to 2.11.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/vektra/mockery/releases">github.com/vektra/mockery/v2's releases</a>.</em></p>
<blockquote>
<h2>v2.11.0</h2>
<h2>Changelog</h2>
<ul>
<li>a0d98e4 Add constructor to the generated mocks</li>
<li>09de88a Fix Makefile (don't call &quot;clean&quot; during &quot;all&quot;)</li>
<li>eddf049 Fix import</li>
<li>b4d8eef Fix panic in tests</li>
<li>a328a65 Merge branch 'master' into add-constructor-for-mocks</li>
<li>32dd223 Merge pull request <a href="https://github-redirect.dependabot.com/vektra/mockery/issues/406">#406</a> from grongor/add-constructor-for-mocks</li>
<li>9489caf TMP-PLS-CHECK-AND-FIXUP fix rebase errors</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="32dd223292"><code>32dd223</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/vektra/mockery/issues/406">#406</a> from grongor/add-constructor-for-mocks</li>
<li><a href="eddf0493df"><code>eddf049</code></a> Fix import</li>
<li><a href="a328a65522"><code>a328a65</code></a> Merge branch 'master' into add-constructor-for-mocks</li>
<li><a href="b4d8eef500"><code>b4d8eef</code></a> Fix panic in tests</li>
<li><a href="9489caf271"><code>9489caf</code></a> TMP-PLS-CHECK-AND-FIXUP fix rebase errors</li>
<li><a href="09de88af60"><code>09de88a</code></a> Fix Makefile (don't call &quot;clean&quot; during &quot;all&quot;)</li>
<li><a href="a0d98e44bd"><code>a0d98e4</code></a> Add constructor to the generated mocks</li>
<li>See full diff in <a href="https://github.com/vektra/mockery/compare/v2.10.6...v2.11.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/vektra/mockery/v2&package-manager=go_modules&previous-version=2.10.6&new-version=2.11.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2022-04-19 14:02:49 +00:00
Thane Thomson
a1104b98d2 abci++: Sync implementation and spec for vote extensions (#8141)
* Refactor so building and linting works

This is the first step towards implementing vote extensions: generating
the relevant proto stubs and getting the build and linter to pass.

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Fix typo

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Better describe method given vote extensions

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Fix types tests

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Move CanonicalVoteExtension to canonical types proto defs

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Regenerate protos including latest PBTS synchrony params update

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Inject vote extensions into proposal

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Thread vote extensions through code and fix tests

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Remove extraneous empty value initialization

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Fix lint

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Fix missing VerifyVoteExtension request data

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Explicitly ensure length > 0 to sign vote extension

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Explicitly ensure length > 0 to sign vote extension

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Remove extraneous comment

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Update privval/file.go

Co-authored-by: M. J. Fromberger <fromberger@interchain.io>

* Update types/vote_test.go

Co-authored-by: M. J. Fromberger <fromberger@interchain.io>

* Format

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Fix ABCI proto generation scripts for Linux

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Sync intermediate and goal protos

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Update internal/consensus/common_test.go

Co-authored-by: Sergio Mena <sergio@informal.systems>

* Use dummy value with clearer meaning

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Rewrite loop for clarity

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Panic on ABCI++ method call failure

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Add strong correctness guarantees when constructing extended commit info for ABCI++

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Add strong guarantee in extendedCommitInfo that the number of votes corresponds

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Make extendedCommitInfo function more robust

At first extendedCommitInfo expected votes to be in the same order as
their corresponding validators in the supplied CommitInfo struct, but
this proved to be rather difficult since when a validator set's loaded
from state it's first sorted by voting power and then by address.

Instead of sorting the votes in the same way, this approach simply maps
votes to their corresponding validator's address prior to constructing
the extended commit info. This way it's easy to look up the
corresponding vote and we don't need to care about vote order.

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Remove extraneous validator address assignment

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Sign over canonical vote extension

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Validate vote extension signature against canonical vote extension

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Update privval tests for more meaningful dummy value

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Add vote extension capability to E2E test app

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Disable lint for weak RNG usage for test app

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Use parseVoteExtension instead of custom parsing in PrepareProposal

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Only include extension if we have received txs

It's unclear at this point why this is necessary to ensure that the
application's local app_hash matches that committed in the previous
block.

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Require app_hash from app to match that from last block

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Add contrived (possibly flaky) test to check that vote extensions code works

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Remove workaround for problem now solved by #8229

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* add tests for vote extension cases

* Fix spelling mistake to appease linter

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Collapse redundant if statement

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Formatting

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Always expect an extension signature, regardless of whether an extension is present

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Votes constructed from commits cannot include extensions or signatures

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Pass through vote extension in test helpers

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Temporarily disable vote extension signature requirement

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Expand on vote equality test errors for clarity

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Expand on vote matching error messages in testing

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Allow for selective subscription by vote type

This is an attempt to fix the intermittently failing
`TestPrepareProposalReceivesVoteExtensions` test in the internal
consensus package.

Occasionally we get prevote messages via the subscription channel, and
we're not interested in those. This change allows us to specify what
types of votes we're interested in (i.e. precommits) and discard the
rest.

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Read lock consensus state mutex in test helper to avoid data race

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Revert BlockIDFlag parameter in node test

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Perform additional check in ProcessProposal for special txs generated by vote extensions

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* e2e: check that our added tx does not cause all txs to exceed req.MaxTxBytes

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Only set vote extension signatures when signing is successful

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Remove channel capacity constraint in test helper to avoid missing messages

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Add TODO to always require extension signatures in vote validation

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* e2e: reject vote extensions if the request height does not match what we expect

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* types: remove extraneous call to voteWithoutExtension in test

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Remove unnecessary address parameter from CanonicalVoteExtension

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* privval: change test vote type to precommit since we use an extension

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* privval: update signing logic to cater for vote extensions

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* proto: update field descriptions for vote message

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* proto: update field description for vote extension sig in vote message

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* proto/types: use fixed-length 64-bit integers for rounds in CanonicalVoteExtension

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* consensus: fix flaky TestPrepareProposalReceivesVoteExtensions

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* consensus: remove previously added test helper functionality

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* e2e: add error logs when we get an unexpected height in ExtendVote or VerifyVoteExtension requests

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* node_test: get validator addresses from privvals

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* privval/file_test: optimize filepv creation in tests

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* privval: add test to check that vote extensions are always signed

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Add a script to check documentation for ToC entries. (#8356)

This script verifies that each document in the docs and architecture directory
has a corresponding table-of-contents entry in its README file.  It can be run
manually from the command line.

- Hook up this script to run in CI (optional workflow).
- Update ADR ToC to include missing entries this script found.

* build(deps): Bump async from 2.6.3 to 2.6.4 in /docs (#8357)

Bumps [async](https://github.com/caolan/async) from 2.6.3 to 2.6.4.
- [Release notes](https://github.com/caolan/async/releases)
- [Changelog](https://github.com/caolan/async/blob/v2.6.4/CHANGELOG.md)
- [Commits](https://github.com/caolan/async/compare/v2.6.3...v2.6.4)

---
updated-dependencies:
- dependency-name: async
  dependency-type: indirect
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* privval/file_test: reset vote ext sig before signing

Signed-off-by: Thane Thomson <connect@thanethomson.com>

Co-authored-by: M. J. Fromberger <fromberger@interchain.io>
Co-authored-by: Sergio Mena <sergio@informal.systems>
Co-authored-by: William Banfield <wbanfield@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-19 08:05:17 -04:00
M. J. Fromberger
9ea0e5efa7 cleanup: pin get-diff-action uses to major version only, not minor/patch (#8368) 2022-04-18 22:49:26 +00:00
Sam Kleinman
efd4f4a40b cleanup: unused parameters (#8372) 2022-04-18 16:45:21 -04:00
Sam Kleinman
c372390fea eventbus: publish without contexts (#8369) 2022-04-18 16:28:31 -04:00
Sam Kleinman
889341152a p2p: fix setting in con-tracker (#8370) 2022-04-18 15:49:11 -04:00
M. J. Fromberger
7243ef71e2 Forward port changelog from v0.35.4 to master. (#8364) 2022-04-18 14:21:05 +00:00
dependabot[bot]
bebfd8663b build(deps): Bump github.com/creachadair/atomicfile from 0.2.4 to 0.2.5 (#8365)
Bumps [github.com/creachadair/atomicfile](https://github.com/creachadair/atomicfile) from 0.2.4 to 0.2.5.
<details>
<summary>Commits</summary>
<ul>
<li><a href="b8ff50ef68"><code>b8ff50e</code></a> Release v0.2.5.</li>
<li><a href="95084abf9a"><code>95084ab</code></a> Update actions/setup-go to v3.</li>
<li><a href="10d28f61c3"><code>10d28f6</code></a> Update actions/checkout to v3.</li>
<li><a href="5f1989ddcc"><code>5f1989d</code></a> Use a more explanatory temp file prefix.</li>
<li><a href="7819ee53ec"><code>7819ee5</code></a> Add Go 1.18 to the CI workflow.</li>
<li><a href="c30fad6a27"><code>c30fad6</code></a> Drop old Go versions from CI.</li>
<li><a href="ebcfa6b22a"><code>ebcfa6b</code></a> acat: use WriteData to simplify the code</li>
<li>See full diff in <a href="https://github.com/creachadair/atomicfile/compare/v0.2.4...v0.2.5">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/creachadair/atomicfile&package-manager=go_modules&previous-version=0.2.4&new-version=0.2.5)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2022-04-18 12:48:09 +00:00
dependabot[bot]
851c0dc4f3 build(deps): Bump async from 2.6.3 to 2.6.4 in /docs (#8357)
Bumps [async](https://github.com/caolan/async) from 2.6.3 to 2.6.4.
- [Release notes](https://github.com/caolan/async/releases)
- [Changelog](https://github.com/caolan/async/blob/v2.6.4/CHANGELOG.md)
- [Commits](https://github.com/caolan/async/compare/v2.6.3...v2.6.4)

---
updated-dependencies:
- dependency-name: async
  dependency-type: indirect
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-15 20:48:10 -04:00
M. J. Fromberger
767e2ec8a2 Add a script to check documentation for ToC entries. (#8356)
This script verifies that each document in the docs and architecture directory
has a corresponding table-of-contents entry in its README file.  It can be run
manually from the command line.

- Hook up this script to run in CI (optional workflow).
- Update ADR ToC to include missing entries this script found.
2022-04-15 12:15:35 -07:00
M. J. Fromberger
43f92806fd Update pending changelog for #8352. (#8354)
I forgot to add this before merging. 🙁
2022-04-14 23:07:59 +00:00
M. J. Fromberger
34e727676c keymigrate: fix conversion of transaction hash keys (#8352)
* keymigrate: fix conversion of transaction hash keys

In the legacy database format, keys were generally stored with a string prefix
to partition the key space. Transaction hashes, however, were not prefixed: The
hash of a transaction was the entire key for its record.

When the key migration script scans its input, it checks the format of each
key to determine whether it has already been converted, so that it is safe to run
the script over an already-converted database.

After checking for known prefixes, the migration script used two heuristics to
distinguish ABCI events and transaction hashes: For ABCI events, whose keys
used the form "name/value/height/index", it checked for the right number of
separators. For hashes, it checked that the length is exactly 32 bytes (the
length of a SHA-256 digest) AND that the value does not contain a "/".

This last check is problematic: Any hash containing the byte 0x2f (the code
point for "/") would be incorrectly filtered out from conversion. This leads to
some transaction hashes not being converted.

To fix this problem, this changes how the script recognizes keys:

1. Use a more rigorous syntactic check to filter out ABCI metadata.
2. Use only the length to identify hashes among what remains.

This change is still not a complete fix: It is possible, though unlikely, that
a valid hash could happen to look exactly like an ABCI metadata key. However,
the chance of that happening is vastly smaller than the chance of generating a
hash that contains at least one "/" byte.

Similarly, it is possible that an already-converted key of some other type
could be mistaken for a hash (not a converted hash, ironically, but another
type of the right length). Again, we can't do anything about that.
2022-04-14 15:41:40 -07:00
dependabot[bot]
a0f51d0370 build(deps): Bump github.com/spf13/viper from 1.10.1 to 1.11.0 (#8344)
Bumps [github.com/spf13/viper](https://github.com/spf13/viper) from 1.10.1 to 1.11.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/spf13/viper/releases">github.com/spf13/viper's releases</a>.</em></p>
<blockquote>
<h2>v1.11.0</h2>

<h2>What's Changed</h2>
<h3>Exciting New Features 🎉</h3>
<ul>
<li>Experimental yaml v3 library support by <a href="https://github.com/sagikazarmark"><code>@​sagikazarmark</code></a> in <a href="https://github-redirect.dependabot.com/spf13/viper/pull/1273">spf13/viper#1273</a></li>
<li>Experimental toml v2 support by <a href="https://github.com/sagikazarmark"><code>@​sagikazarmark</code></a> in <a href="https://github-redirect.dependabot.com/spf13/viper/pull/1274">spf13/viper#1274</a></li>
<li>Experimental logger by <a href="https://github.com/sagikazarmark"><code>@​sagikazarmark</code></a> in <a href="https://github-redirect.dependabot.com/spf13/viper/pull/1275">spf13/viper#1275</a></li>
</ul>
<h3>Enhancements 🚀</h3>
<ul>
<li>Remove unnecessary operand by <a href="https://github.com/steviebps"><code>@​steviebps</code></a> in <a href="https://github-redirect.dependabot.com/spf13/viper/pull/1213">spf13/viper#1213</a></li>
<li>Improve encoding layer by <a href="https://github.com/sagikazarmark"><code>@​sagikazarmark</code></a> in <a href="https://github-redirect.dependabot.com/spf13/viper/pull/1167">spf13/viper#1167</a></li>
<li>Allow merging configs with different types of leaf values by <a href="https://github.com/illarion"><code>@​illarion</code></a> in <a href="https://github-redirect.dependabot.com/spf13/viper/pull/1181">spf13/viper#1181</a></li>
</ul>
<h3>Bug Fixes 🐛</h3>
<ul>
<li>Disable race detector on windows by <a href="https://github.com/sagikazarmark"><code>@​sagikazarmark</code></a> in <a href="https://github-redirect.dependabot.com/spf13/viper/pull/1269">spf13/viper#1269</a></li>
</ul>
<h3>Breaking Changes 🛠</h3>
<ul>
<li>Drop Go 1.14 support by <a href="https://github.com/sagikazarmark"><code>@​sagikazarmark</code></a> in <a href="https://github-redirect.dependabot.com/spf13/viper/pull/1327">spf13/viper#1327</a></li>
</ul>
<h3>Dependency Updates ⬆️</h3>
<ul>
<li>build(deps): bump github.com/spf13/afero from 1.6.0 to 1.7.0 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://github-redirect.dependabot.com/spf13/viper/pull/1265">spf13/viper#1265</a></li>
<li>build(deps): bump github.com/spf13/afero from 1.7.0 to 1.7.1 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://github-redirect.dependabot.com/spf13/viper/pull/1271">spf13/viper#1271</a></li>
<li>build(deps): bump github.com/spf13/afero from 1.7.1 to 1.8.0 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://github-redirect.dependabot.com/spf13/viper/pull/1281">spf13/viper#1281</a></li>
<li>build(deps): bump gopkg.in/ini.v1 from 1.66.2 to 1.66.3 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://github-redirect.dependabot.com/spf13/viper/pull/1287">spf13/viper#1287</a></li>
<li>build(deps): bump github.com/spf13/afero from 1.8.0 to 1.8.1 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://github-redirect.dependabot.com/spf13/viper/pull/1291">spf13/viper#1291</a></li>
<li>build(deps): bump actions/github-script from 5 to 6 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://github-redirect.dependabot.com/spf13/viper/pull/1295">spf13/viper#1295</a></li>
<li>build(deps): bump actions/checkout from 2 to 3 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://github-redirect.dependabot.com/spf13/viper/pull/1304">spf13/viper#1304</a></li>
<li>build(deps): bump github.com/magiconair/properties from 1.8.5 to 1.8.6 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://github-redirect.dependabot.com/spf13/viper/pull/1299">spf13/viper#1299</a></li>
<li>build(deps): bump gopkg.in/ini.v1 from 1.66.3 to 1.66.4 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://github-redirect.dependabot.com/spf13/viper/pull/1293">spf13/viper#1293</a></li>
<li>build(deps): bump github.com/spf13/afero from 1.8.1 to 1.8.2 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://github-redirect.dependabot.com/spf13/viper/pull/1311">spf13/viper#1311</a></li>
<li>build(deps): bump actions/setup-go from 2 to 3 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://github-redirect.dependabot.com/spf13/viper/pull/1319">spf13/viper#1319</a></li>
<li>build(deps): bump github.com/pelletier/go-toml/v2 from 2.0.0-beta.6 to 2.0.0-beta.7 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://github-redirect.dependabot.com/spf13/viper/pull/1320">spf13/viper#1320</a></li>
<li>build(deps): bump github.com/pelletier/go-toml/v2 from 2.0.0-beta.7 to 2.0.0-beta.8 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://github-redirect.dependabot.com/spf13/viper/pull/1322">spf13/viper#1322</a></li>
<li>Update crypt by <a href="https://github.com/sagikazarmark"><code>@​sagikazarmark</code></a> in <a href="https://github-redirect.dependabot.com/spf13/viper/pull/1325">spf13/viper#1325</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/steviebps"><code>@​steviebps</code></a> made their first contribution in <a href="https://github-redirect.dependabot.com/spf13/viper/pull/1213">spf13/viper#1213</a></li>
<li><a href="https://github.com/illarion"><code>@​illarion</code></a> made their first contribution in <a href="https://github-redirect.dependabot.com/spf13/viper/pull/1181">spf13/viper#1181</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/spf13/viper/compare/v1.10.1...v1.11.0">https://github.com/spf13/viper/compare/v1.10.1...v1.11.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="6986c0ab48"><code>6986c0a</code></a> chore: update crypt</li>
<li><a href="65293ecec2"><code>65293ec</code></a> add release note configuration</li>
<li><a href="6804da723f"><code>6804da7</code></a> chore!: drop Go 1.14 support</li>
<li><a href="5b21ca137d"><code>5b21ca1</code></a> fix: deprecated config</li>
<li><a href="55fac1047e"><code>55fac10</code></a> chore: fix lint</li>
<li><a href="e0bf4ac05d"><code>e0bf4ac</code></a> chore: add go 1.18 builds</li>
<li><a href="973c265115"><code>973c265</code></a> build(deps): bump github.com/pelletier/go-toml/v2</li>
<li><a href="129e4f973c"><code>129e4f9</code></a> build(deps): bump github.com/pelletier/go-toml/v2</li>
<li><a href="9a8603d8f8"><code>9a8603d</code></a> build(deps): bump actions/setup-go from 2 to 3</li>
<li><a href="dc76f3c0a9"><code>dc76f3c</code></a> build(deps): bump github.com/spf13/afero from 1.8.1 to 1.8.2</li>
<li>Additional commits viewable in <a href="https://github.com/spf13/viper/compare/v1.10.1...v1.11.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/spf13/viper&package-manager=go_modules&previous-version=1.10.1&new-version=1.11.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2022-04-14 15:40:00 +00:00
dependabot[bot]
be7cb50bb3 build(deps): Bump github.com/vektra/mockery/v2 from 2.10.4 to 2.10.6 (#8346)
Bumps [github.com/vektra/mockery/v2](https://github.com/vektra/mockery) from 2.10.4 to 2.10.6.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/vektra/mockery/releases">github.com/vektra/mockery/v2's releases</a>.</em></p>
<blockquote>
<h2>v2.10.6</h2>
<h2>Changelog</h2>
<ul>
<li>df6e689 Add PR/issue templates</li>
<li>e8bf201 Add golang-1.18 note</li>
<li>54589be Merge pull request <a href="https://github-redirect.dependabot.com/vektra/mockery/issues/445">#445</a> from bigbluedisco/fix/bump-golang-org-x-tools</li>
<li>aa25af0 fix: bump golang.org/x/tools to v0.1.10 to fix some go 1.18 issues</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="54589be6dd"><code>54589be</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/vektra/mockery/issues/445">#445</a> from bigbluedisco/fix/bump-golang-org-x-tools</li>
<li><a href="aa25af0c7d"><code>aa25af0</code></a> fix: bump golang.org/x/tools to v0.1.10 to fix some go 1.18 issues</li>
<li><a href="e8bf201675"><code>e8bf201</code></a> Add golang-1.18 note</li>
<li><a href="df6e689d94"><code>df6e689</code></a> Add PR/issue templates</li>
<li>See full diff in <a href="https://github.com/vektra/mockery/compare/v2.10.4...v2.10.6">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/vektra/mockery/v2&package-manager=go_modules&previous-version=2.10.4&new-version=2.10.6)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2022-04-14 14:51:38 +00:00
M. J. Fromberger
69874c2050 confix: convert tx-index.indexer from string to array (#8342)
The format of this config value was changed in v0.35.

- Move plan to its own file (for ease of reading).
- Convert indexer string to an array if not already done.
2022-04-14 06:20:49 -07:00
Callum Waters
68c9efdb82 cli: simplify resetting commands (#8312) 2022-04-14 12:27:08 +12:00
M. J. Fromberger
6bbf5b6d0f Work around markdown-link-check issues. (#8339)
Work around two issues causing the markdown link check to fail in CI.

1. https://github.com/actions/checkout/pull/760. A git permissions issue,
   apparently triggered by a combination of a git change and the behaviour of
   actions/checkout.

2. https://github.com/gaurav-nelson/github-action-markdown-link-check/pull/129.
   Merging an updated version of the underlying package that fixes a bug in the
   handling of local #anchors.

The workaround is a temporary patched fork of the link-checker action.  This
should be removed once the upstream issues are addressed.
2022-04-13 16:01:39 -07:00
M. J. Fromberger
024f6117ee confix: remove mempool.version in v0.36 (#8334) 2022-04-13 13:41:35 -07:00
M. J. Fromberger
9296717433 Update RFC ToC for RFC-015. (#8338) 2022-04-13 20:25:59 +00:00
M. J. Fromberger
6dc15b2f50 Only run the markdown linter if markdown was touched. (#8337) 2022-04-13 13:13:59 -07:00
Sam Kleinman
0e4b18806e pubsub: [minor] remove unused stub method (#8316)
OnReset was removed from the service interface and we missed deleting
this.
2022-04-13 19:20:56 +00:00
Sam Kleinman
c45367e22c rpc: avoid leaking threads (#8328) 2022-04-13 14:09:49 -04:00
M. J. Fromberger
29ad4dcb3b Remove resolved TODO comments. (#8325)
Resolved by merge of #8300.
2022-04-13 04:44:16 +00:00
Sam Kleinman
80b8c0057b state: remove unused weighted time (#8315) 2022-04-12 21:14:00 +00:00
Sam Kleinman
5d4d01b4e4 service: minor cleanup of comments (#8314) 2022-04-12 17:11:21 -04:00
Sam Kleinman
571d26fbb0 events: remove unused event code (#8313) 2022-04-12 14:58:14 -04:00
M. J. Fromberger
cf337cc3f2 Add configuration updates for Tendermint v0.36. (#8310)
* v36: remove [fastsync] and [blocksync] config sections
* v36: remove [blocksync], consolidate rename
* v36: remove gRPC options from [rpc]
* v36: add top-level mode setting
* v36: remove deprecated per-node consensus timeouts
* v36: remove vestigial mempool.wal-dir setting
* v36: add queue-type setting
* v36: add p2p connection limits
* v36: add or update statsync.fetchers
* v36: add statesync.use-p2p setting
2022-04-11 14:49:17 -07:00
William Banfield
969690d81c abci++: only include meaningful header fields in data passed-through to application (#8216)
closes: #7950
2022-04-11 20:27:50 +00:00
M. J. Fromberger
9ec30ecc0c Add configuration diff tool. (#8298)
* Add diff outputs as testdata.
* Normalize all samples to kebabs.
2022-04-11 12:41:27 -07:00
Ismail Khoffi
0e32ad9e5c Update outdated doc comment (#8309)
SetEventBus was deleted, same with the NopEventBus
2022-04-11 07:06:57 -07:00
Callum Waters
b7e87eef05 cli: add graceful catches to SIGINT (#8308) 2022-04-12 01:20:43 +12:00
dependabot[bot]
0ab2f31239 build(deps): Bump github.com/creachadair/tomledit from 0.0.11 to 0.0.13 (#8307)
Bumps [github.com/creachadair/tomledit](https://github.com/creachadair/tomledit) from 0.0.11 to 0.0.13.
<details>
<summary>Commits</summary>
<ul>
<li><a href="baee445826"><code>baee445</code></a> Release v0.0.13.</li>
<li><a href="8dfcc1b378"><code>8dfcc1b</code></a> Exercise insertion before comments.</li>
<li><a href="97f4e85ccf"><code>97f4e85</code></a> When inserting a key, push it before block comments.</li>
<li><a href="029089e311"><code>029089e</code></a> Release v0.0.12.</li>
<li><a href="d226405c2a"><code>d226405</code></a> Test finding the global table.</li>
<li><a href="34b7aad990"><code>34b7aad</code></a> Let FindTable return the global table with an empty name.</li>
<li>See full diff in <a href="https://github.com/creachadair/tomledit/compare/v0.0.11...v0.0.13">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/creachadair/tomledit&package-manager=go_modules&previous-version=0.0.11&new-version=0.0.13)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2022-04-11 12:47:05 +00:00
dependabot[bot]
9a46f575f5 build(deps): Bump actions/upload-artifact from 2 to 3 (#8303)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 2 to 3.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/actions/upload-artifact/releases">actions/upload-artifact's releases</a>.</em></p>
<blockquote>
<h2>v3.0.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Update default runtime to node16 (<a href="https://github-redirect.dependabot.com/actions/upload-artifact/issues/293">#293</a>)</li>
<li>Update package-lock.json file version to 2 (<a href="https://github-redirect.dependabot.com/actions/upload-artifact/issues/302">#302</a>)</li>
</ul>
<h3>Breaking Changes</h3>
<p>With the update to Node 16, all scripts will now be run with Node 16 rather than Node 12.</p>
<h2>v2.3.1</h2>
<p>Fix for empty fails on Windows failing on upload <a href="https://github-redirect.dependabot.com/actions/upload-artifact/issues/281">#281</a></p>
<h2>v2.3.0 Upload Artifact</h2>
<ul>
<li>Optimizations for faster uploads of larger files that are already compressed</li>
<li>Significantly improved logging when there are chunked uploads</li>
<li>Clarifications in logs around the upload size and prohibited characters that aren't allowed in the artifact name or any uploaded files</li>
<li>Various other small bugfixes &amp; optimizations</li>
</ul>
<h2>v2.2.4</h2>
<ul>
<li>Retry on HTTP 500 responses from the service</li>
</ul>
<h2>v2.2.3</h2>
<ul>
<li>Fixes for proxy related issues</li>
</ul>
<h2>v2.2.2</h2>
<ul>
<li>Improved retryability and error handling</li>
</ul>
<h2>v2.2.1</h2>
<ul>
<li>Update used actions/core package to the latest version</li>
</ul>
<h2>v2.2.0</h2>
<ul>
<li>Support for artifact retention</li>
</ul>
<h2>v2.1.4</h2>
<ul>
<li>Add Third Party License Information</li>
</ul>
<h2>v2.1.3</h2>
<ul>
<li>Use updated version of the <code>@action/artifact</code> NPM package</li>
</ul>
<h2>v2.1.2</h2>
<ul>
<li>Increase upload chunk size from 4MB to 8MB</li>
<li>Detect case insensitive file uploads</li>
</ul>
<h2>v2.1.1</h2>
<ul>
<li>Fix for certain symlinks not correctly being identified as directories before starting uploads</li>
</ul>
<h2>v2.1.0</h2>
<ul>
<li>Support for uploading artifacts with multiple paths</li>
<li>Support for using exclude paths</li>
<li>Updates to dependencies</li>
</ul>

</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="6673cd052c"><code>6673cd0</code></a> Update <code>lockfileVersion</code> in <code>package-lock.json</code> (<a href="https://github-redirect.dependabot.com/actions/upload-artifact/issues/302">#302</a>)</li>
<li><a href="2244c82003"><code>2244c82</code></a> Update to node16 (<a href="https://github-redirect.dependabot.com/actions/upload-artifact/issues/293">#293</a>)</li>
<li><a href="87348cee5f"><code>87348ce</code></a> Add 503 warning when uploading to the same artifact</li>
<li>See full diff in <a href="https://github.com/actions/upload-artifact/compare/v2...v3">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/upload-artifact&package-manager=github_actions&previous-version=2&new-version=3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2022-04-11 12:33:01 +00:00
dependabot[bot]
8c4e982616 build(deps): Bump actions/download-artifact from 2 to 3 (#8302)
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 2 to 3.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/actions/download-artifact/releases">actions/download-artifact's releases</a>.</em></p>
<blockquote>
<h2>v3.0.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Update default runtime to node16 (<a href="https://github-redirect.dependabot.com/actions/download-artifact/pull/134">actions/download-artifact#134</a>)</li>
<li>Update package-lock.json file version to 2 (<a href="https://github-redirect.dependabot.com/actions/download-artifact/pull/136">actions/download-artifact#136</a>)</li>
</ul>
<h3>Breaking Changes</h3>
<p>With the update to Node 16, all scripts will now be run with Node 16 rather than Node 12.</p>
<h2>v2.1.0 Download Artifact</h2>
<ul>
<li>Improved output &amp; logging</li>
<li>Fixed issue where downloading all artifacts could cause display percentages to be over 100%</li>
<li>Various small bug fixes &amp; improvements</li>
</ul>
<h2>v2.0.10</h2>
<ul>
<li>Retry on HTTP 500 responses from the service</li>
</ul>
<h2>v2.0.9</h2>
<ul>
<li>Fixes to proxy related issues</li>
</ul>
<h2>v2.0.8</h2>
<ul>
<li>Improvements to retryability if an error is encountered during artifact download</li>
</ul>
<h2>v2.0.7 download-artifact</h2>
<ul>
<li>Improved download retry-ability if a partial download is encountered</li>
</ul>
<h2>v2.0.6</h2>
<p>Update actions/core NPM package that is used internally</p>
<h2>v2.0.5</h2>
<ul>
<li>Add Third Party License Information</li>
</ul>
<h2>v2.0.4</h2>
<ul>
<li>Use the latest version of the <code>@actions/artifact</code> NPM package</li>
</ul>
<h2>v2.0.3</h2>
<ul>
<li>Misc improvements</li>
</ul>
<h2>v2.0.2</h2>
<ul>
<li>Support for tilde expansion</li>
</ul>
<h2>v2.0.1</h2>
<ul>
<li>Download path output</li>
<li>Improved logging</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="fb598a63ae"><code>fb598a6</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/actions/download-artifact/issues/136">#136</a> from actions/jtamsut/update-lockfile-version</li>
<li><a href="a4a09c5d7e"><code>a4a09c5</code></a> regenerate index.js</li>
<li><a href="9acf51df79"><code>9acf51d</code></a> regenerate package lock</li>
<li><a href="8821072325"><code>8821072</code></a> upgrade artifact version</li>
<li><a href="b8bbd3b64f"><code>b8bbd3b</code></a> regenerate lockfile</li>
<li><a href="6ee3d963e5"><code>6ee3d96</code></a> revert artifact version</li>
<li><a href="d4793f4e27"><code>d4793f4</code></a> update docs for v3</li>
<li><a href="2d338d2145"><code>2d338d2</code></a> upgrade package to v3</li>
<li><a href="360d0830b5"><code>360d083</code></a> update dependency on artifact lib</li>
<li><a href="d9b73cccac"><code>d9b73cc</code></a> update lock file</li>
<li>Additional commits viewable in <a href="https://github.com/actions/download-artifact/compare/v2...v3">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/download-artifact&package-manager=github_actions&previous-version=2&new-version=3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2022-04-11 12:29:42 +00:00
dependabot[bot]
fa531d3da9 build(deps): Bump actions/stale from 4 to 5 (#8304)
Bumps [actions/stale](https://github.com/actions/stale) from 4 to 5.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/actions/stale/releases">actions/stale's releases</a>.</em></p>
<blockquote>
<h2>v5.0.0</h2>
<h2>Features</h2>
<ul>
<li><a href="https://github-redirect.dependabot.com/actions/stale/pull/670">Update Runtime to node16</a></li>
</ul>
<h2>v4.1.0</h2>
<h1>Features</h1>
<ul>
<li><a href="9912fa74d1">Ability to exempt draft PRs</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/actions/stale/blob/main/CHANGELOG.md">actions/stale's changelog</a>.</em></p>
<blockquote>
<h1>Changelog</h1>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="3cc1237663"><code>3cc1237</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/actions/stale/issues/670">#670</a> from actions/thboop/node16upgrade</li>
<li><a href="76e9fbc6ae"><code>76e9fbc</code></a> update node version</li>
<li><a href="6467b96231"><code>6467b96</code></a> Update default runtime to node16</li>
<li><a href="8af60513da"><code>8af6051</code></a> build(deps-dev): bump jest-circus from 27.2.0 to 27.4.6 (<a href="https://github-redirect.dependabot.com/actions/stale/issues/665">#665</a>)</li>
<li><a href="7a7efcae1f"><code>7a7efca</code></a> Fix per issue operation count (<a href="https://github-redirect.dependabot.com/actions/stale/issues/662">#662</a>)</li>
<li><a href="04a1828bc1"><code>04a1828</code></a> build(deps-dev): bump ts-jest from 27.0.5 to 27.1.2 (<a href="https://github-redirect.dependabot.com/actions/stale/issues/641">#641</a>)</li>
<li><a href="65ca3956bd"><code>65ca395</code></a> build(deps-dev): bump eslint-plugin-jest from 24.4.2 to 25.3.2 (<a href="https://github-redirect.dependabot.com/actions/stale/issues/639">#639</a>)</li>
<li><a href="eee276c280"><code>eee276c</code></a> build(deps-dev): bump prettier from 2.4.1 to 2.5.1 (<a href="https://github-redirect.dependabot.com/actions/stale/issues/628">#628</a>)</li>
<li><a href="6c2f9f3f54"><code>6c2f9f3</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/actions/stale/issues/640">#640</a> from dmitry-shibanov/v-dmshib/fix-check-dist</li>
<li><a href="37323f14dd"><code>37323f1</code></a> fix check-dist.yml</li>
<li>Additional commits viewable in <a href="https://github.com/actions/stale/compare/v4...v5">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/stale&package-manager=github_actions&previous-version=4&new-version=5)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2022-04-11 12:27:21 +00:00
dependabot[bot]
ce3b48febd build(deps): Bump actions/setup-go from 2 to 3 (#8305)
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 2 to 3.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/actions/setup-go/releases">actions/setup-go's releases</a>.</em></p>
<blockquote>
<h2>v3.0.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Update default runtime to node16 (<a href="https://github-redirect.dependabot.com/actions/setup-go/pull/192">actions/setup-go#192</a>)</li>
<li>Update <code>package-lock.json</code> file version to 2 (<a href="https://github-redirect.dependabot.com/actions/setup-go/pull/193">actions/setup-go#193</a>) and <code>@types/node</code> to 16.11.25 (<a href="https://github-redirect.dependabot.com/actions/setup-go/pull/194">actions/setup-go#194</a>)</li>
<li>Remove the <code>stable</code> input and fix SemVer notation (<a href="https://github-redirect.dependabot.com/actions/setup-go/pull/195">actions/setup-go#195</a>)</li>
</ul>
<h3>Breaking Changes</h3>
<p>With the update to Node 16, all scripts will now be run with Node 16 rather than Node 12.</p>
<p>This new major release removes the <code>stable</code> input, so there is no need to specify additional input to use pre-release versions. This release also corrects the pre-release versions syntax to satisfy the SemVer notation (1.18.0-beta1 -&gt; 1.18.0-beta.1, 1.18.0-rc1 -&gt; 1.18.0-rc.1).</p>
<pre lang="yaml"><code>steps:
  - uses: actions/checkout@v2
  - uses: actions/setup-go@v3
    with:
      go-version: '1.18.0-rc.1' 
  - run: go version
</code></pre>
<h2>Add check-latest input</h2>
<p>In scope of this release we add the <a href="https://github-redirect.dependabot.com/actions/setup-go/pull/186">check-latest</a> input. If <code>check-latest</code> is set to <code>true</code>, the action first checks if the cached version is the latest one. If the locally cached version is not the most up-to-date, a Go version will then be downloaded from <a href="https://github.com/actions/go-versions">go-versions</a> repository. By default <code>check-latest</code> is set to <code>false</code>.
Example of usage:</p>
<pre lang="yaml"><code>steps:
  - uses: actions/checkout@v2
  - uses: actions/setup-go@v2
    with:
      go-version: '1.16'
      check-latest: true
  - run: go version
</code></pre>
<p>Moreover, we updated <code>@actions/core</code> from <code>1.2.6</code> to <code>1.6.0</code></p>
<h2>v2.1.5</h2>
<p>In scope of this release we updated <code>matchers.json</code>  to improve the problem matcher pattern. For more information please refer to this <a href="https://github-redirect.dependabot.com/actions/setup-go/pull/98">pull request</a></p>
<h2>v2.1.4</h2>
<h2>What's Changed</h2>
<ul>
<li>Fix extractor selection on windows by <a href="https://github.com/paulcacheux"><code>@​paulcacheux</code></a> in <a href="https://github-redirect.dependabot.com/actions/setup-go/pull/141">actions/setup-go#141</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/paulcacheux"><code>@​paulcacheux</code></a> made their first contribution in <a href="https://github-redirect.dependabot.com/actions/setup-go/pull/141">actions/setup-go#141</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/actions/setup-go/compare/v2.1.3...v2.1.4">https://github.com/actions/setup-go/compare/v2.1.3...v2.1.4</a></p>
<h2>v2.1.3</h2>
<ul>
<li>Updated communication with runner to use environment files rather then workflow commands</li>
</ul>
<h2>v2.1.2</h2>
<p>This release includes vendored licenses for this action's npm dependencies.</p>

</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="f6164bd8c8"><code>f6164bd</code></a> Remove stable input and fix SemVer notation (<a href="https://github-redirect.dependabot.com/actions/setup-go/issues/195">#195</a>)</li>
<li><a href="2bb2aab2fd"><code>2bb2aab</code></a> update types node (<a href="https://github-redirect.dependabot.com/actions/setup-go/issues/194">#194</a>)</li>
<li><a href="edcbc0c2cd"><code>edcbc0c</code></a> update lockfileVersion (<a href="https://github-redirect.dependabot.com/actions/setup-go/issues/193">#193</a>)</li>
<li><a href="fb9a043dd8"><code>fb9a043</code></a> Update default runtime to node16 (<a href="https://github-redirect.dependabot.com/actions/setup-go/issues/192">#192</a>)</li>
<li><a href="5b0ae0e97d"><code>5b0ae0e</code></a> Bump pathval from 1.1.0 to 1.1.1 (<a href="https://github-redirect.dependabot.com/actions/setup-go/issues/188">#188</a>)</li>
<li>See full diff in <a href="https://github.com/actions/setup-go/compare/v2...v3">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/setup-go&package-manager=github_actions&previous-version=2&new-version=3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2022-04-11 12:04:17 +00:00
dependabot[bot]
5235913e12 build(deps): Bump codecov/codecov-action from 2.1.0 to 3.0.0 (#8306)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 2.1.0 to 3.0.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/codecov/codecov-action/releases">codecov/codecov-action's releases</a>.</em></p>
<blockquote>
<h2>v3.0.0</h2>
<h3>Breaking Changes</h3>
<ul>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-action/issues/689">#689</a> Bump to node16 and small fixes</li>
</ul>
<h3>Features</h3>
<ul>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-action/issues/688">#688</a> Incorporate <code>gcov</code> arguments for the Codecov uploader</li>
</ul>
<h3>Dependencies</h3>
<ul>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-action/issues/548">#548</a> build(deps-dev): bump jest-junit from 12.2.0 to 13.0.0</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-action/issues/603">#603</a> [Snyk] Upgrade <code>@​actions/core</code> from 1.5.0 to 1.6.0</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-action/issues/628">#628</a> build(deps): bump node-fetch from 2.6.1 to 3.1.1</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-action/issues/634">#634</a> build(deps): bump node-fetch from 3.1.1 to 3.2.0</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-action/issues/636">#636</a> build(deps): bump openpgp from 5.0.1 to 5.1.0</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-action/issues/652">#652</a> build(deps-dev): bump <code>@​vercel/ncc</code> from 0.30.0 to 0.33.3</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-action/issues/653">#653</a> build(deps-dev): bump <code>@​types/node</code> from 16.11.21 to 17.0.18</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-action/issues/659">#659</a> build(deps-dev): bump <code>@​types/jest</code> from 27.4.0 to 27.4.1</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-action/issues/667">#667</a> build(deps): bump actions/checkout from 2 to 3</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-action/issues/673">#673</a> build(deps): bump node-fetch from 3.2.0 to 3.2.3</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-action/issues/683">#683</a> build(deps): bump minimist from 1.2.5 to 1.2.6</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-action/issues/685">#685</a> build(deps): bump <code>@​actions/github</code> from 5.0.0 to 5.0.1</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-action/issues/681">#681</a> build(deps-dev): bump <code>@​types/node</code> from 17.0.18 to 17.0.23</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-action/issues/682">#682</a> build(deps-dev): bump typescript from 4.5.5 to 4.6.3</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-action/issues/676">#676</a> build(deps): bump <code>@​actions/exec</code> from 1.1.0 to 1.1.1</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-action/issues/675">#675</a> build(deps): bump openpgp from 5.1.0 to 5.2.1</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/codecov/codecov-action/blob/master/CHANGELOG.md">codecov/codecov-action's changelog</a>.</em></p>
<blockquote>
<h2>3.0.0</h2>
<h3>Breaking Changes</h3>
<ul>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-action/issues/689">#689</a> Bump to node16 and small fixes</li>
</ul>
<h3>Features</h3>
<ul>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-action/issues/688">#688</a> Incorporate <code>gcov</code> arguments for the Codecov uploader</li>
</ul>
<h3>Dependencies</h3>
<ul>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-action/issues/548">#548</a> build(deps-dev): bump jest-junit from 12.2.0 to 13.0.0</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-action/issues/603">#603</a> [Snyk] Upgrade <code>@​actions/core</code> from 1.5.0 to 1.6.0</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-action/issues/628">#628</a> build(deps): bump node-fetch from 2.6.1 to 3.1.1</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-action/issues/634">#634</a> build(deps): bump node-fetch from 3.1.1 to 3.2.0</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-action/issues/636">#636</a> build(deps): bump openpgp from 5.0.1 to 5.1.0</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-action/issues/652">#652</a> build(deps-dev): bump <code>@​vercel/ncc</code> from 0.30.0 to 0.33.3</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-action/issues/653">#653</a> build(deps-dev): bump <code>@​types/node</code> from 16.11.21 to 17.0.18</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-action/issues/659">#659</a> build(deps-dev): bump <code>@​types/jest</code> from 27.4.0 to 27.4.1</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-action/issues/667">#667</a> build(deps): bump actions/checkout from 2 to 3</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-action/issues/673">#673</a> build(deps): bump node-fetch from 3.2.0 to 3.2.3</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-action/issues/683">#683</a> build(deps): bump minimist from 1.2.5 to 1.2.6</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-action/issues/685">#685</a> build(deps): bump <code>@​actions/github</code> from 5.0.0 to 5.0.1</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-action/issues/681">#681</a> build(deps-dev): bump <code>@​types/node</code> from 17.0.18 to 17.0.23</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-action/issues/682">#682</a> build(deps-dev): bump typescript from 4.5.5 to 4.6.3</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-action/issues/676">#676</a> build(deps): bump <code>@​actions/exec</code> from 1.1.0 to 1.1.1</li>
<li><a href="https://github-redirect.dependabot.com/codecov/codecov-action/issues/675">#675</a> build(deps): bump openpgp from 5.1.0 to 5.2.1</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="e3c560433a"><code>e3c5604</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/codecov/codecov-action/issues/689">#689</a> from codecov/feat/gcov</li>
<li><a href="174efc5984"><code>174efc5</code></a> Update package-lock.json</li>
<li><a href="6243a75ef3"><code>6243a75</code></a> bump to 3.0.0</li>
<li><a href="0d6466ff9c"><code>0d6466f</code></a> Bump to node16</li>
<li><a href="d4729eeb39"><code>d4729ee</code></a> fetch.default</li>
<li><a href="351baf62fa"><code>351baf6</code></a> fix: bash</li>
<li><a href="d8cf6802a8"><code>d8cf680</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/codecov/codecov-action/issues/675">#675</a> from codecov/dependabot/npm_and_yarn/openpgp-5.2.1</li>
<li><a href="b775e9013c"><code>b775e90</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/codecov/codecov-action/issues/676">#676</a> from codecov/dependabot/npm_and_yarn/actions/exec-1.1.1</li>
<li><a href="2ebc2f0f6f"><code>2ebc2f0</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/codecov/codecov-action/issues/682">#682</a> from codecov/dependabot/npm_and_yarn/typescript-4.6.3</li>
<li><a href="8e2ef2bfcc"><code>8e2ef2b</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/codecov/codecov-action/issues/681">#681</a> from codecov/dependabot/npm_and_yarn/types/node-17.0.23</li>
<li>Additional commits viewable in <a href="https://github.com/codecov/codecov-action/compare/v2.1.0...v3.0.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=codecov/codecov-action&package-manager=github_actions&previous-version=2.1.0&new-version=3.0.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2022-04-11 12:02:43 +00:00
M. J. Fromberger
4743a7ad0d confix: clean up and document transformations (#8301)
Right now the confix tool works up to v0.35. This change is preparation for
extending the tool to handle additional changes in v0.36.

Mostly this is adding documentation. The one functional change is to fix the
name of the moved "fast-sync" parameter, which was renamed "enable".

- Document the origin of each transformation step.
- Update fast-sync target name.
2022-04-10 19:37:54 -07:00
John Adler
f504089273 build: use go install instead of go get. (#8299) 2022-04-09 20:15:07 -07:00
Chill Validation
c53b71821c Fix a spelling error (#8297) 2022-04-09 11:42:47 -07:00
elias-orijtech
b91501cecf test/fuzz: update oss-fuzz build script to match reality (#8296)
p2p/pex and p2p/addrbook were deleted in 03ad7d6f20,
secret_connection was renamed to secretconnection in dd97ac6e1c.
2022-04-09 08:07:40 -07:00
M. J. Fromberger
322bb460dd keymigrate: fix decoding of block-hash row keys (#8294) 2022-04-09 07:20:08 -07:00
M. J. Fromberger
26b5672a54 Add a tool to update old config files to the latest version (#8281) 2022-04-08 19:40:03 -07:00
M. J. Fromberger
e6550f8686 Fix release notes to match the prevailing style. (#8292) 2022-04-08 18:02:49 -07:00
M. J. Fromberger
e565a4a1f5 Forward-port v0.35.3 changelog to master. (#8291) 2022-04-09 00:21:24 +00:00
William Banfield
6ff07a1633 switch to consensus change startup ordering (#8290) 2022-04-08 18:11:20 -04:00
Sam Kleinman
631ef7aae0 consensus: add nil check to gossip routine (#8288) 2022-04-08 17:13:10 -04:00
Sam Kleinman
3e3a934818 rpc: add more nil checks in the status end point (#8287) 2022-04-08 14:04:43 -04:00
Sam Kleinman
90b951af72 node+statesync: normalize initialization (#8275) 2022-04-08 11:00:58 -04:00
dependabot[bot]
5df277caca build(deps): Bump github.com/lib/pq from 1.10.4 to 1.10.5 (#8283)
Bumps [github.com/lib/pq](https://github.com/lib/pq) from 1.10.4 to 1.10.5.
<details>
<summary>Commits</summary>
<ul>
<li><a href="1ef134dc0e"><code>1ef134d</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/lib/pq/issues/1074">#1074</a> from lib/fix-assertions</li>
<li><a href="4b55993141"><code>4b55993</code></a> Avoid asserting on error message for cancel tests</li>
<li>See full diff in <a href="https://github.com/lib/pq/compare/v1.10.4...v1.10.5">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/lib/pq&package-manager=go_modules&previous-version=1.10.4&new-version=1.10.5)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2022-04-08 13:19:28 +00:00
M. J. Fromberger
53b7dbe285 Forward-port changelog for v0.34.19 to master. (#8279) 2022-04-07 22:30:48 +00:00
M. J. Fromberger
f3858e52de scmigrate: ensure target key is correctly renamed (#8276)
Prior to v0.35, the keys for seen-commit records included the applicable
height.  In v0.35 and beyond, we only keep the record for the latest height,
and its key does not include the height.

Update the seen-commit migration to ensure that the record we retain after
migration is correctly renamed to omit the height from its key.

Update the test cases to check for this condition after migrating.
2022-04-07 15:09:09 -07:00
Sam Kleinman
9d20e06900 statesync+blocksync: move event publications into the sync operations (#8274) 2022-04-07 16:23:36 -04:00
Sam Kleinman
6ed3f2d98d node: move handshake out of constructor (#8264) 2022-04-07 11:21:10 -04:00
Sam Kleinman
681cdf8347 consensus: avoid panics during handshake (#8266)
There's no case where we recieve an error during handshake and don't
just return/continue, and it's at a point during startup where not
much is going on in the process, so having some classes of errors
return errors and some return panics is confusing and doesn't protect
anything.
2022-04-07 12:58:44 +00:00
M. J. Fromberger
14f41ac5e3 Fix more broken Markdown links. (#8271) 2022-04-07 00:15:20 -07:00
Sam Kleinman
7678ab8850 statesync: tweak test performance (#8267) 2022-04-06 21:50:14 +00:00
M. J. Fromberger
025894c11d Forward-port changelogs from v0.34.17 and v0.34.18 to master. (#8265)
* Forward-port changelogs from v0.34.17 and v0.34.18 to master.
* Fix broken markdown links.
2022-04-06 13:58:57 -07:00
Sam Kleinman
85364a9ba8 node: reorder service construction (#8262) 2022-04-06 14:59:30 -04:00
Sam Kleinman
d153388446 p2p: inject nodeinfo into router (#8261) 2022-04-06 14:02:07 -04:00
Sam Kleinman
2304ea70f7 consensus: remove string indented function (#8257) 2022-04-06 08:07:21 -07:00
dependabot[bot]
60f88194ec build(deps): Bump github.com/BurntSushi/toml from 1.0.0 to 1.1.0 (#8251)
Bumps [github.com/BurntSushi/toml](https://github.com/BurntSushi/toml) from 1.0.0 to 1.1.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/BurntSushi/toml/releases">github.com/BurntSushi/toml's releases</a>.</em></p>
<blockquote>
<h2>v1.1.0</h2>
<p>Just a few bugfixes:</p>
<ul>
<li>
<p>Skip fields with <code>toml:&quot;-&quot;</code> even when they're unsupported types. Previously something like this would fail to encode due to <code>func</code> being an unsupported type:</p>
<pre><code>struct {
    Str  string `toml:&quot;str&quot;
    Func func() `toml:&quot;-&quot;`
}
</code></pre>
</li>
<li>
<p>Multiline strings can't end with <code>\</code>. This is valid:</p>
<pre><code># Valid
key = &quot;&quot;&quot; foo \
&quot;&quot;&quot;
<h1>Invalid</h1>
<p>key = &quot;&quot;&quot; foo \ &quot;&quot;&quot;
</code></pre></p>
</li>
<li>
<p>Don't quote values in <code>TOMLMarshaler</code>. Previously they would always include quoting (e.g. <code>&quot;value&quot;</code>), while the entire point of this interface is to bypass that.</p>
</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="891d2617dd"><code>891d261</code></a> Don't error out if a multiline string ends with an incomplete UTF-8 sequence</li>
<li><a href="ef65e34f3f"><code>ef65e34</code></a> Don't run Unmarshal() through Decode()</li>
<li><a href="573cad4c89"><code>573cad4</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/BurntSushi/toml/issues/347">#347</a> from zhsj/fix-32</li>
<li><a href="f3633f4f90"><code>f3633f4</code></a> Fix test on 32 bit arch</li>
<li><a href="551f4a51e9"><code>551f4a5</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/BurntSushi/toml/issues/344">#344</a> from lucasbutn/hotfix-341-marshaler-shouldnot-writequ...</li>
<li><a href="dec58255de"><code>dec5825</code></a> Removed write quote in marshal to allow write other types than strings</li>
<li><a href="2249a9c68e"><code>2249a9c</code></a> Multiline strings can't end with &quot;&quot;</li>
<li><a href="51b22f2fef"><code>51b22f2</code></a> Fix README</li>
<li><a href="01e551605f"><code>01e5516</code></a> Skip fields with toml:&quot;-&quot;, even when they're unsupported types</li>
<li><a href="87b9f055f4"><code>87b9f05</code></a> Fix tests for older Go versions</li>
<li>See full diff in <a href="https://github.com/BurntSushi/toml/compare/v1.0.0...v1.1.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/BurntSushi/toml&package-manager=go_modules&previous-version=1.0.0&new-version=1.1.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2022-04-05 16:56:48 +00:00
dependabot[bot]
0a23b1e51d build(deps): Bump github.com/vektra/mockery/v2 from 2.10.2 to 2.10.4 (#8250)
Bumps [github.com/vektra/mockery/v2](https://github.com/vektra/mockery) from 2.10.2 to 2.10.4.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/vektra/mockery/releases">github.com/vektra/mockery/v2's releases</a>.</em></p>
<blockquote>
<h2>v2.10.4</h2>
<h2>Changelog</h2>
<ul>
<li>c943e69 Merge pull request <a href="https://github-redirect.dependabot.com/vektra/mockery/issues/441">#441</a> from cfstras/fix/support-more-env-keys</li>
<li>ed87cf6 fix: allow configuring flags with &quot;-&quot; as Env var</li>
<li>17abd96 fix: unused config field <code>Tags</code></li>
<li>53114cf test: add test for env var configurations</li>
</ul>
<h2>v2.10.3</h2>
<h2>Changelog</h2>
<ul>
<li>ee25bcf Add/update mocks</li>
<li>4703d1a Merge pull request <a href="https://github-redirect.dependabot.com/vektra/mockery/issues/444">#444</a> from vektra/remove_need_deps</li>
<li>ba1f213 Remove packages.NeedDeps</li>
<li>ed38b20 Update go.sum</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="c943e696a0"><code>c943e69</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/vektra/mockery/issues/441">#441</a> from cfstras/fix/support-more-env-keys</li>
<li><a href="4703d1a42f"><code>4703d1a</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/vektra/mockery/issues/444">#444</a> from vektra/remove_need_deps</li>
<li><a href="ed38b20a49"><code>ed38b20</code></a> Update go.sum</li>
<li><a href="ee25bcfcb5"><code>ee25bcf</code></a> Add/update mocks</li>
<li><a href="ba1f213e17"><code>ba1f213</code></a> Remove packages.NeedDeps</li>
<li><a href="17abd96c57"><code>17abd96</code></a> fix: unused config field <code>Tags</code></li>
<li><a href="53114cfce4"><code>53114cf</code></a> test: add test for env var configurations</li>
<li><a href="ed87cf671a"><code>ed87cf6</code></a> fix: allow configuring flags with &quot;-&quot; as Env var</li>
<li>See full diff in <a href="https://github.com/vektra/mockery/compare/v2.10.2...v2.10.4">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/vektra/mockery/v2&package-manager=go_modules&previous-version=2.10.2&new-version=2.10.4)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2022-04-05 15:47:24 +00:00
Sam Kleinman
9d1e8eaad4 node: remove channel and peer update initialization from construction (#8238) 2022-04-05 13:26:53 +00:00
Sam Kleinman
97f7021712 statesync: merge channel processing (#8240) 2022-04-04 12:31:15 -04:00
dependabot[bot]
cb8e6b1c1a build(deps): Bump github.com/vektra/mockery/v2 from 2.10.1 to 2.10.2 (#8246)
Bumps [github.com/vektra/mockery/v2](https://github.com/vektra/mockery) from 2.10.1 to 2.10.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/vektra/mockery/releases">github.com/vektra/mockery/v2's releases</a>.</em></p>
<blockquote>
<h2>v2.10.2</h2>
<h2>Changelog</h2>
<ul>
<li>8384e25 Merge pull request <a href="https://github-redirect.dependabot.com/vektra/mockery/issues/443">#443</a> from OrlovEvgeny/fix-build-go-version</li>
<li>408740d fix: golang build version</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="8384e25927"><code>8384e25</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/vektra/mockery/issues/443">#443</a> from OrlovEvgeny/fix-build-go-version</li>
<li><a href="408740d185"><code>408740d</code></a> fix: golang build version</li>
<li>See full diff in <a href="https://github.com/vektra/mockery/compare/v2.10.1...v2.10.2">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/vektra/mockery/v2&package-manager=go_modules&previous-version=2.10.1&new-version=2.10.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2022-04-04 14:25:00 +00:00
Sergio Mena
8df38db82e Remove ModifiedTxStatus from the spec and the code (#8210)
* Outstanding abci-gen changes to 'pb.go' files

* Removed modified_tx_status from spec and protobufs

* Fix sed for OSX

* Regenerated abci protobufs with 'abci-proto-gen'

* Code changes. UTs e2e tests passing

* Recovered UT: TestPrepareProposalModifiedTxStatusFalse

* Adapted UT

* Fixed UT

* Revert "Fix sed for OSX"

This reverts commit e576708c61.

* Update internal/state/execution_test.go

Co-authored-by: William Banfield <4561443+williambanfield@users.noreply.github.com>

* Update abci/example/kvstore/kvstore.go

Co-authored-by: M. J. Fromberger <fromberger@interchain.io>

* Update internal/state/execution_test.go

Co-authored-by: William Banfield <4561443+williambanfield@users.noreply.github.com>

* Update spec/abci++/abci++_tmint_expected_behavior_002_draft.md

Co-authored-by: William Banfield <4561443+williambanfield@users.noreply.github.com>

* Addressed some comments

* Added one test that tests error at the ABCI client + Fixed some mock calls

* Addressed remaining comments

* Update abci/example/kvstore/kvstore.go

Co-authored-by: William Banfield <4561443+williambanfield@users.noreply.github.com>

* Update abci/example/kvstore/kvstore.go

Co-authored-by: William Banfield <4561443+williambanfield@users.noreply.github.com>

* Update abci/example/kvstore/kvstore.go

Co-authored-by: William Banfield <4561443+williambanfield@users.noreply.github.com>

* Update spec/abci++/abci++_tmint_expected_behavior_002_draft.md

Co-authored-by: William Banfield <4561443+williambanfield@users.noreply.github.com>

* Addressed William's latest comments

* Adressed Michael's comment

* Fixed UT

* Some md fixes

* More md fixes

* gofmt

Co-authored-by: William Banfield <4561443+williambanfield@users.noreply.github.com>
Co-authored-by: M. J. Fromberger <fromberger@interchain.io>
2022-04-04 12:43:01 +02:00
dependabot[bot]
9fe25a1ed1 build(deps): Bump bufbuild/buf-setup-action from 1.3.0 to 1.3.1 (#8245) 2022-04-04 11:49:00 +02:00
William Banfield
99f9ee0f63 abci++: correct max-size check to only operate on added and unmodified (#8242) 2022-04-01 17:44:38 -04:00
Sergio Mena
4a504c0687 e2e: Fix hashing for app + Fix logic of TestApp_Hash (#8229)
* Fix hashing of e2e App

* Fix TestApp_Hash

* CaMeL

* Update test/e2e/app/state.go

Co-authored-by: M. J. Fromberger <fromberger@interchain.io>

* for-->Eventually + if-->require

* Update test/e2e/tests/app_test.go

Co-authored-by: Sam Kleinman <garen@tychoish.com>

* fix lint

Co-authored-by: M. J. Fromberger <fromberger@interchain.io>
Co-authored-by: Sam Kleinman <garen@tychoish.com>
2022-03-31 22:21:25 +02:00
Sam Kleinman
b68424be47 light: remove untracked close channel (#8228) 2022-03-31 18:48:26 +00:00
Sam Kleinman
a79dd42d24 lint: bump linter version in ci (#8234) 2022-03-31 14:37:13 -04:00
Sam Kleinman
6af23ff757 state: avoid premature genericism (#8224) 2022-03-31 13:10:09 +00:00
dependabot[bot]
d1722c9c10 build(deps): Bump github.com/vektra/mockery/v2 from 2.10.0 to 2.10.1 (#8226)
Bumps [github.com/vektra/mockery/v2](https://github.com/vektra/mockery) from 2.10.0 to 2.10.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/vektra/mockery/releases">github.com/vektra/mockery/v2's releases</a>.</em></p>
<blockquote>
<h2>v2.10.1</h2>
<h2>Changelog</h2>
<ul>
<li>fa0080c Fix config.GetSemverInfo() for Go 1.18</li>
<li>4e181be Load packages with dependencies for Go 1.18</li>
<li>232f954 Merge pull request <a href="https://github-redirect.dependabot.com/vektra/mockery/issues/435">#435</a> from emmanuel099/master</li>
<li>b11695e Merge pull request <a href="https://github-redirect.dependabot.com/vektra/mockery/issues/436">#436</a> from emmanuel099/test_with_3.18</li>
<li>e0e183b Test with Go 1.18</li>
<li>adda07f Update README.md</li>
<li>5f5570d Update README.md</li>
<li>4fc5912 Update README.md</li>
<li>fa2d82d Update README.md</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="b11695e6d4"><code>b11695e</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/vektra/mockery/issues/436">#436</a> from emmanuel099/test_with_3.18</li>
<li><a href="232f954622"><code>232f954</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/vektra/mockery/issues/435">#435</a> from emmanuel099/master</li>
<li><a href="fa0080cf03"><code>fa0080c</code></a> Fix config.GetSemverInfo() for Go 1.18</li>
<li><a href="e0e183bcb9"><code>e0e183b</code></a> Test with Go 1.18</li>
<li><a href="4e181be712"><code>4e181be</code></a> Load packages with dependencies for Go 1.18</li>
<li><a href="adda07f546"><code>adda07f</code></a> Update README.md</li>
<li><a href="5f5570d72d"><code>5f5570d</code></a> Update README.md</li>
<li><a href="4fc5912f49"><code>4fc5912</code></a> Update README.md</li>
<li><a href="fa2d82d34d"><code>fa2d82d</code></a> Update README.md</li>
<li>See full diff in <a href="https://github.com/vektra/mockery/compare/v2.10.0...v2.10.1">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/vektra/mockery/v2&package-manager=go_modules&previous-version=2.10.0&new-version=2.10.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2022-03-31 12:58:41 +00:00
William Banfield
6ed2c42d7b Document steps for updating the timeout parameters. (#8217)
closes: #8182 

This pull request adds documentation to the `UPGRADING.md` file as well as a set of deprecation checks for the old timeout parameters in the `config.toml` file. It additionally documents the parameters in the `genesis.md`.
2022-03-30 22:11:48 +00:00
M. J. Fromberger
185f15d645 config: default indexer configuration to null (#8222)
After this change, new nodes will not have indexing enabled by default.
Test configurations will still use "kv".

* Update pending changelog and upgrading notes.
* Fix indexer config for the test app.
* Update config template and enable indexing for e2e tests.
2022-03-30 13:47:52 -07:00
M. J. Fromberger
dfb322e68b Fix broken Markdown links (#8214)
- Remove pointless Makefile and package documentation.
- Fix broken links.
2022-03-29 12:07:12 -07:00
M. J. Fromberger
3d0d89e505 Re-enable markdown link checker. (#8212)
The upstream fix for link syntax has landed.

- Uncomment the workflow and bump the version.
- Add a config file to encourage retries.
2022-03-29 11:32:22 -07:00
Sam Kleinman
9e643f3628 migration: remove stale seen commits (#8205) 2022-03-29 12:31:37 -04:00
Simon Kirillov
1949095c51 Fix empty tendermint version in Docker (#8161)
* Fix Dockerfile and scripts

* Fix docker scripts

* Remove unused scripts

* Retrigger checks

Co-authored-by: Simon Kirillov <skirillov@wallarm.com>
Co-authored-by: William Banfield <4561443+williambanfield@users.noreply.github.com>
2022-03-29 12:06:32 -04:00
William Banfield
41a1bf539b timeout parameters take the default if not set (#8189) 2022-03-28 18:25:19 -04:00
William Banfield
462c475abc consensus: timeout params in toml used as overrides (#8186)
Replaces the set of timeout parameters in the config.toml file with unsafe-*override versions of the corresponding ConsensusParams.Timeout field. These fields can be used for the duration of v0.36 to override the consensus param in case of emergency.

Adds a set to the ./internal/consensus/State type for correctly calculating the value of each timeout based on the set of overrides specified.
2022-03-28 17:33:23 -04:00
Sergio Mena
9d56520f76 Update ABCI++ spec with decisions taken in the bi-weekly meeting (#8191)
* Clarify 0-length vote extensions in the spec, according to #8174

* Update spec so that Tendermnit can propose more txs than the size limit in

* Addressed Manu's comment

* Reworded size limit following Manu's suggestion
2022-03-28 21:15:35 +02:00
dependabot[bot]
14f5588ce2 build(deps): Bump github.com/adlio/schema from 1.2.3 to 1.3.0 (#8201)
Bumps [github.com/adlio/schema](https://github.com/adlio/schema) from 1.2.3 to 1.3.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/adlio/schema/releases">github.com/adlio/schema's releases</a>.</em></p>
<blockquote>
<h2>1.3.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Initial SQL Server support from <a href="https://github.com/pubkraal"><code>@​pubkraal</code></a> in <a href="https://github-redirect.dependabot.com/adlio/schema/pull/15">adlio/schema#15</a></li>
<li>Fix tests on M1 Macs by <a href="https://github.com/adlio"><code>@​adlio</code></a> in <a href="https://github-redirect.dependabot.com/adlio/schema/pull/16">adlio/schema#16</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/pubkraal"><code>@​pubkraal</code></a> made their first contribution in <a href="https://github-redirect.dependabot.com/adlio/schema/pull/15">adlio/schema#15</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/adlio/schema/compare/v1.2.3...v1.3.0">https://github.com/adlio/schema/compare/v1.2.3...v1.3.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="0c0c352416"><code>0c0c352</code></a> Merge branch 'pubkraal-mssql'</li>
<li><a href="cdf157e39b"><code>cdf157e</code></a> NOT NULL consistency for applied_at column</li>
<li><a href="f32be8707e"><code>f32be87</code></a> README updates to caveat the SQL Server support</li>
<li><a href="a48b8286a4"><code>a48b828</code></a> Skip SQL Server tests on ARM</li>
<li><a href="3b7371832c"><code>3b73718</code></a> Merge branch 'mssql' of <a href="https://github.com/pubkraal/schema">https://github.com/pubkraal/schema</a> into pubkraal-mssql</li>
<li><a href="1aa7823276"><code>1aa7823</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/adlio/schema/issues/16">#16</a> from adlio/m1-testing</li>
<li><a href="bc8352411b"><code>bc83524</code></a> Fix time zone assertion failing during DST</li>
<li><a href="cfb349ddeb"><code>cfb349d</code></a> M1 Mac Support for Testing</li>
<li><a href="c2400eac57"><code>c2400ea</code></a> feat: add mssql support</li>
<li><a href="531e542ba4"><code>531e542</code></a> README updates.</li>
<li>See full diff in <a href="https://github.com/adlio/schema/compare/v1.2.3...v1.3.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/adlio/schema&package-manager=go_modules&previous-version=1.2.3&new-version=1.3.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2022-03-28 13:59:24 +00:00
dependabot[bot]
3945915920 build(deps): Bump bufbuild/buf-setup-action from 1.1.0 to 1.3.0 (#8199) 2022-03-28 09:20:46 -04:00
dependabot[bot]
0af58409bf build(deps): Bump minimist from 1.2.5 to 1.2.6 in /docs (#8196)
Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/substack/minimist/releases)
- [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-25 12:39:20 -07:00
dependabot[bot]
7d39f639f6 build(deps): Bump github.com/golangci/golangci-lint from 1.45.0 to 1.45.2 (#8192)
Bumps [github.com/golangci/golangci-lint](https://github.com/golangci/golangci-lint) from 1.45.0 to 1.45.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/golangci/golangci-lint/releases">github.com/golangci/golangci-lint's releases</a>.</em></p>
<blockquote>
<h2>v1.45.2</h2>
<h2>Changelog</h2>
<ul>
<li>8bdc4d3f fix: help command (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2681">#2681</a>)</li>
</ul>
<h2>v1.45.1</h2>
<h2>Changelog</h2>
<ul>
<li>da0a6b3b build(deps): bump actions/cache from 2.1.7 to 3 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2674">#2674</a>)</li>
<li>e187dd8a build(deps): bump github.com/hashicorp/go-version from 1.2.1 to 1.4.0 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2659">#2659</a>)</li>
<li>ec8d6894 build(deps): bump github.com/stretchr/testify from 1.7.0 to 1.7.1 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2660">#2660</a>)</li>
<li>243ec6f0 bump varnamelen to v0.6.1 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2656">#2656</a>)</li>
<li>8f7f44d1 depguard: reduce requirements (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2672">#2672</a>)</li>
<li>7bbbe77e feat: automatic Go version detection (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2669">#2669</a>)</li>
<li>f0554415 fix: disable structcheck with go1.18 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2666">#2666</a>)</li>
<li>93feed1d fix: update base images (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2661">#2661</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/golangci/golangci-lint/blob/master/CHANGELOG.md">github.com/golangci/golangci-lint's changelog</a>.</em></p>
<blockquote>
<h3>v1.45.2</h3>
<ol>
<li>misc:
<ul>
<li>fix: help command</li>
</ul>
</li>
</ol>
<h3>v1.45.1</h3>
<ol>
<li>updated linters:
<ul>
<li><code>interfacer</code>: inactivate with go1.18</li>
<li><code>govet</code>: inactivate unsupported analyzers (go1.18)</li>
<li><code>depguard</code>: reduce requirements</li>
<li><code>structcheck</code>: inactivate with go1.18</li>
<li><code>varnamelen</code>: bump from v0.6.0 to v0.6.1</li>
</ul>
</li>
<li>misc:
<ul>
<li>Automatic Go version detection 🎉 (go1.18)</li>
<li>docker: update base images (go1.18)</li>
</ul>
</li>
</ol>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="8bdc4d3f80"><code>8bdc4d3</code></a> fix: help command (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2681">#2681</a>)</li>
<li><a href="7bbbe77e5e"><code>7bbbe77</code></a> feat: automatic Go version detection (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2669">#2669</a>)</li>
<li><a href="da0a6b3b8a"><code>da0a6b3</code></a> build(deps): bump actions/cache from 2.1.7 to 3 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2674">#2674</a>)</li>
<li><a href="8f7f44d175"><code>8f7f44d</code></a> depguard: reduce requirements (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2672">#2672</a>)</li>
<li><a href="f055441536"><code>f055441</code></a> fix: disable structcheck with go1.18 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2666">#2666</a>)</li>
<li><a href="cd37b5c31d"><code>cd37b5c</code></a> docs: fix GitHub Releases Stats badge link. (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2665">#2665</a>)</li>
<li><a href="93feed1d63"><code>93feed1</code></a> fix: update base images (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2661">#2661</a>)</li>
<li><a href="ec8d6894ed"><code>ec8d689</code></a> build(deps): bump github.com/stretchr/testify from 1.7.0 to 1.7.1 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2660">#2660</a>)</li>
<li><a href="e187dd8ac8"><code>e187dd8</code></a> build(deps): bump github.com/hashicorp/go-version from 1.2.1 to 1.4.0 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2659">#2659</a>)</li>
<li><a href="243ec6f000"><code>243ec6f</code></a> bump varnamelen to v0.6.1 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2656">#2656</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/golangci/golangci-lint/compare/v1.45.0...v1.45.2">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/golangci/golangci-lint&package-manager=go_modules&previous-version=1.45.0&new-version=1.45.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2022-03-25 19:30:52 +00:00
William Banfield
e4ae922c33 consensus: update state machine to use the new consensus params (#8181) 2022-03-23 11:26:42 -04:00
Sam Kleinman
cbce877480 consensus: add leaktest check to replay tests (#8185) 2022-03-23 00:00:08 +00:00
Sam Kleinman
b29cc95920 consensus: cleanup tempfile explictly (#8184) 2022-03-22 17:41:00 -04:00
Sam Kleinman
0c9558a742 consensus: avoid panic during shutdown (#8170) 2022-03-22 15:28:33 -04:00
William Banfield
e2fc50ec9f types: add TimeoutParams into ConsensusParams structs (#8177) 2022-03-22 11:19:54 -04:00
William Banfield
2361e0c65c abci++: remove CheckTx call from PrepareProposal flow (#8176) 2022-03-22 10:03:35 -04:00
dependabot[bot]
e2365c1368 build(deps): Bump github.com/golangci/golangci-lint from 1.44.2 to 1.45.0 (#8169)
Bumps [github.com/golangci/golangci-lint](https://github.com/golangci/golangci-lint) from 1.44.2 to 1.45.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/golangci/golangci-lint/releases">github.com/golangci/golangci-lint's releases</a>.</em></p>
<blockquote>
<h2>v1.45.0</h2>
<h2>Changelog</h2>
<ul>
<li>ea1df6f1 Default to YAML when config file has no extension (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2618">#2618</a>)</li>
<li>93a0015c build(deps): bump actions/checkout from 2 to 3 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2643">#2643</a>)</li>
<li>176ef3f7 build(deps): bump actions/setup-node from 2 to 3 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2628">#2628</a>)</li>
<li>adc0d8ec build(deps): bump github.com/ashanbrown/makezero from 1.1.0 to 1.1.1 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2621">#2621</a>)</li>
<li>8f9bc4a7 build(deps): bump github.com/daixiang0/gci from 0.3.1 to 0.3.2 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2640">#2640</a>)</li>
<li>6fc688ae build(deps): bump github.com/securego/gosec/v2 from 2.9.6 to 2.10.0 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2624">#2624</a>)</li>
<li>da08d2bd build(deps): bump github.com/shirou/gopsutil/v3 from 3.22.1 to 3.22.2 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2641">#2641</a>)</li>
<li>873a27e7 build(deps): bump github.com/sivchari/containedctx from 1.0.1 to 1.0.2 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2623">#2623</a>)</li>
<li>ec952367 build(deps): bump github.com/spf13/cobra from 1.3.0 to 1.4.0 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2646">#2646</a>)</li>
<li>0e7233eb build(deps): bump github.com/tomarrell/wrapcheck/v2 from 2.4.0 to 2.5.0 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2603">#2603</a>)</li>
<li>0bcc0a3b build(deps): bump golangci/golangci-lint-action from 2.5.2 to 3.1.0 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2627">#2627</a>)</li>
<li>5ffadacb build(deps): bump mvdan.cc/gofumpt from 0.2.1 to 0.3.0 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2622">#2622</a>)</li>
<li>d5ebd7eb build(deps): bump node-fetch in /.github/contributors (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2616">#2616</a>)</li>
<li>5ddb5e7a bump github.com/daixiang0/gci to v0.3.1 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2596">#2596</a>)</li>
<li>56d77e2b bump github.com/denis-tingaikin/go-header from 0.4.2 to 0.4.3 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2614">#2614</a>)</li>
<li>2f689958 errcheck: add an option to remove default exclusions (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2607">#2607</a>)</li>
<li>1f4c1ed9 fix: completion for fish-shell</li>
<li>0c0804c6 go1.18 support (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2438">#2438</a>)</li>
<li>42ca6449 gofumpt: add module-path setting (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2644">#2644</a>)</li>
<li>30c6166b revive: fix default values (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2611">#2611</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/golangci/golangci-lint/blob/master/CHANGELOG.md">github.com/golangci/golangci-lint's changelog</a>.</em></p>
<blockquote>
<h3>v1.45.0</h3>
<ol>
<li>updated linters:
<ul>
<li><code>cobra</code>: from 1.3.0 to 1.4.0</li>
<li><code>containedctx</code>: from 1.0.1 to 1.0.2</li>
<li><code>errcheck</code>: add an option to remove default exclusions</li>
<li><code>gci</code>: from 0.3.1 to 0.3.2</li>
<li><code>go-header</code>: from 0.4.2 to 0.4.3</li>
<li><code>gofumpt</code>: add module-path setting</li>
<li><code>gofumpt</code>: from 0.2.1 to 0.3.0</li>
<li><code>gopsutil</code>: from 3.22.1 to 3.22.2</li>
<li><code>gosec</code>: from 2.9.6 to 2.10.0</li>
<li><code>makezero</code>: from 1.1.0 to 1.1.1</li>
<li><code>revive</code>: fix default values</li>
<li><code>wrapcheck</code>: from 2.4.0 to 2.5.0</li>
</ul>
</li>
<li>documentation:
<ul>
<li>docs: add &quot;back to the top&quot; button</li>
<li>docs: add <code>forbidigo</code> example that uses comments</li>
<li>docs: improve linters page</li>
</ul>
</li>
<li>misc:
<ul>
<li>go1.18 support 🎉</li>
<li>Add an option to manage the targeted version of Go</li>
<li>Default to YAML when config file has no extension</li>
</ul>
</li>
</ol>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="1f4c1ed9f9"><code>1f4c1ed</code></a> fix: completion for fish-shell</li>
<li><a href="0c0804c6a4"><code>0c0804c</code></a> go1.18 support (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2438">#2438</a>)</li>
<li><a href="ec952367e9"><code>ec95236</code></a> build(deps): bump github.com/spf13/cobra from 1.3.0 to 1.4.0 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2646">#2646</a>)</li>
<li><a href="42ca644953"><code>42ca644</code></a> gofumpt: add module-path setting (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2644">#2644</a>)</li>
<li><a href="93a0015cfc"><code>93a0015</code></a> build(deps): bump actions/checkout from 2 to 3 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2643">#2643</a>)</li>
<li><a href="d7b28ca346"><code>d7b28ca</code></a> build(deps): bump normalize-url from 4.5.0 to 4.5.1 in /docs (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2642">#2642</a>)</li>
<li><a href="da08d2bd2a"><code>da08d2b</code></a> build(deps): bump github.com/shirou/gopsutil/v3 from 3.22.1 to 3.22.2 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2641">#2641</a>)</li>
<li><a href="8f9bc4a794"><code>8f9bc4a</code></a> build(deps): bump github.com/daixiang0/gci from 0.3.1 to 0.3.2 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2640">#2640</a>)</li>
<li><a href="41646f256f"><code>41646f2</code></a> build(deps): bump gatsby-plugin-manifest from 4.7.0 to 4.9.0 in /docs (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2635">#2635</a>)</li>
<li><a href="fdd7218ead"><code>fdd7218</code></a> build(deps): bump <code>@​emotion/react</code> from 11.7.1 to 11.8.1 in /docs (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2634">#2634</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/golangci/golangci-lint/compare/v1.44.2...v1.45.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/golangci/golangci-lint&package-manager=go_modules&previous-version=1.44.2&new-version=1.45.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2022-03-21 22:31:49 +00:00
Sam Kleinman
43943d2dce rollback: cleanup second node during test (#8175) 2022-03-21 16:13:43 -04:00
William Banfield
cc838a5a19 ABCI++: Update new protos to use enum instead of bool (#8158)
closes: #8039 

This pull request updates the new ABCI++ protos to use `enum`s in place of `bool`s. `enums` may be preferred over `bool` because an `enum` can be udpated to include new statuses in the future, whereas a `bool` cannot and is fixed as just `true` or `false` over the whole lifecycle of the API.
2022-03-21 16:57:34 +00:00
Sam Kleinman
c33be0a410 state: propogate error from state store (#8171)
* state: propogate error from state store

* fix lint
2022-03-21 15:28:42 +00:00
Sam Kleinman
c680cca96e consensus: reduce size of test fixtures and logging rate (#8172)
We can reduce the size of test fixtures (which will improve test
reliability) without impacting these tests' primary role (which is
correctness.)

Also reducing these test logging will make the tests easier to read,
which whill be a good quality of life improvement for devs.
2022-03-21 15:07:52 +00:00
dependabot[bot]
039fef14e0 build(deps): Bump docker/build-push-action from 2.9.0 to 2.10.0 (#8167)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 2.9.0 to 2.10.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/docker/build-push-action/releases">docker/build-push-action's releases</a>.</em></p>
<blockquote>
<h2>v2.10.0</h2>
<ul>
<li>Add <code>imageid</code> output and use metadata to set <code>digest</code> output (<a href="https://github-redirect.dependabot.com/docker/build-push-action/issues/569">#569</a>)</li>
<li>Add <code>build-contexts</code> input (<a href="https://github-redirect.dependabot.com/docker/build-push-action/issues/563">#563</a>)</li>
<li>Enhance outputs display (<a href="https://github-redirect.dependabot.com/docker/build-push-action/issues/559">#559</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="ac9327eae2"><code>ac9327e</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/docker/build-push-action/issues/563">#563</a> from crazy-max/new-inputs</li>
<li><a href="7c41daf2a5"><code>7c41daf</code></a> <code>build-contexts</code> input</li>
<li><a href="e115266953"><code>e115266</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/docker/build-push-action/issues/569">#569</a> from crazy-max/imageid-digest</li>
<li><a href="50fa0058d9"><code>50fa005</code></a> add imageid output and use metadata to set digest output</li>
<li><a href="309fb9180f"><code>309fb91</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/docker/build-push-action/issues/568">#568</a> from docker/dependabot/github_actions/actions/checkout-3</li>
<li><a href="db68526220"><code>db68526</code></a> Bump actions/checkout from 2 to 3</li>
<li><a href="fe02965b48"><code>fe02965</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/docker/build-push-action/issues/559">#559</a> from crazy-max/outputs</li>
<li><a href="5af8693d82"><code>5af8693</code></a> Enhance outputs display</li>
<li>See full diff in <a href="https://github.com/docker/build-push-action/compare/v2.9.0...v2.10.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=docker/build-push-action&package-manager=github_actions&previous-version=2.9.0&new-version=2.10.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2022-03-21 13:56:13 +00:00
dependabot[bot]
3a75fbceec build(deps): Bump gaurav-nelson/github-action-markdown-link-check from 1.0.13 to 1.0.14 (#8166)
Bumps [gaurav-nelson/github-action-markdown-link-check](https://github.com/gaurav-nelson/github-action-markdown-link-check) from 1.0.13 to 1.0.14.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/gaurav-nelson/github-action-markdown-link-check/releases">gaurav-nelson/github-action-markdown-link-check's releases</a>.</em></p>
<blockquote>
<h2>1.0.14</h2>
<h2>Changes</h2>
<ul>
<li><a href="https://github-redirect.dependabot.com/gaurav-nelson/github-action-markdown-link-check/pull/116">gaurav-nelson/github-action-markdown-link-check#116</a> - Changed the base image to more stage Node image <code>node:lts-alpine</code></li>
<li><a href="https://github-redirect.dependabot.com/gaurav-nelson/github-action-markdown-link-check/pull/126">gaurav-nelson/github-action-markdown-link-check#126</a> - Use markdown-link-check version 3.9.3</li>
</ul>
<p>Thank you <a href="https://github.com/thanethomson"><code>@​thanethomson</code></a> <a href="https://github.com/edumco"><code>@​edumco</code></a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="58f84fd654"><code>58f84fd</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/gaurav-nelson/github-action-markdown-link-check/issues/116">#116</a> from edumco/docker-update</li>
<li><a href="56618d65ea"><code>56618d6</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/gaurav-nelson/github-action-markdown-link-check/issues/126">#126</a> from thanethomson/bump-mlc-version</li>
<li><a href="611438d456"><code>611438d</code></a> Bump markdown-link-check version to 3.9.3</li>
<li><a href="8f0156cc69"><code>8f0156c</code></a> Update Ko-fi link</li>
<li><a href="af2ced5c1b"><code>af2ced5</code></a> Changes base image to LTS</li>
<li><a href="9de9db77de"><code>9de9db7</code></a> Fixed broken link</li>
<li>See full diff in <a href="https://github.com/gaurav-nelson/github-action-markdown-link-check/compare/1.0.13...1.0.14">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=gaurav-nelson/github-action-markdown-link-check&package-manager=github_actions&previous-version=1.0.13&new-version=1.0.14)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2022-03-21 12:42:01 +00:00
M. J. Fromberger
ea964e2133 node: always sync with the application at startup (#8159) 2022-03-19 21:18:17 -07:00
William Banfield
485c96b0d3 consensus: change lock handling in reactor and handleMsg for RoundState (forward-port #7994 #7992) (#8139)
Related to #8157
2022-03-18 18:59:44 +00:00
Sam Kleinman
9a833a8495 consensus: skip channel close during shutdown (#8155)
I see this panic in tests occasionally, and I don't think there's any
need to close this channel:

- it's only sent to in one place which has a select case with a
  default clause, so there's no chance of deadlocks.

- the only place we recieve from it thas a timeout.
2022-03-18 18:35:42 +00:00
Sam Kleinman
0bded371c5 testing: logger cleanup (#8153)
This contains two major changes:

- Remove the legacy test logging method, and just explicitly call the
  noop logger. This is just to make the test logging behavior more
  coherent and clear. 
  
- Move the logging in the light package from the testing.T logger to
  the noop logger. It's really the case that we very rarely need/want
  to consider test logs unless we're doing reproductions and running a
  narrow set of tests.
  
In most cases, I (for one) prefer to run in verbose mode so I can
watch progress of tests, but I basically never need to consider
logs. If I do want to see logs, then I can edit in the testing.T
logger locally (which is what you have to do today, anyway.)
2022-03-18 17:39:38 +00:00
Sam Kleinman
12d13cd31d mempool: reduce size of test (#8152)
This is failing intermittently, but it's a really simple test, and I
suspect that we're just running into thread scheduling issues on CI
nodes. I don't think making the test smaller reduces the utility of
this test.
2022-03-18 16:55:10 +00:00
William Banfield
bba8367aac state: panic on ResponsePrepareProposal validation error (#8145)
* state: panic on ResponsePrepareProposal validation error

* lint++

Co-authored-by: Sam Kleinman <garen@tychoish.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-03-18 16:42:29 +00:00
Sam Kleinman
f1a8f47d4d types: minor cleanup of un or minimally used types (#8154) 2022-03-18 16:27:10 +00:00
Sam Kleinman
f61e6e4201 autofile: remove vestigal close mechanism (#8150) 2022-03-18 12:05:53 -04:00
Sam Kleinman
1db41663c7 consensus: avoid race in accessing channel (#8149) 2022-03-18 09:54:40 -04:00
Sam Kleinman
5e0e05f938 consensus: avoid persistent kvstore in tests (#8148) 2022-03-18 09:39:06 -04:00
Sam Kleinman
5bb51aab03 events: remove service aspects of event switch (#8146) 2022-03-18 12:31:08 +00:00
Sam Kleinman
13f7501950 blocksync: remove intermediate channel (#8140)
Based on local testing, I'm now convinced that this is ok, and also I think the fact that the new p2p layer has more caching and queue.
2022-03-17 22:20:59 +00:00
JayT106
4400b0f6d3 p2p: adjust max non-persistent peer score (#8137)
Guarantee persistent peers have the highest connecting priority. 
The peerStore.Ranked returns an arbitrary order of peers with the same scores.
2022-03-17 14:30:45 -07:00
frog power 4000
5b6849ccf7 Docs: abci++ typo (#8147) 2022-03-17 16:44:29 -04:00
Sam Kleinman
a68e356596 consensus: avoid extra close channel (#8144)
Saw this in a test panic, doesn't seem neccessary.
2022-03-17 20:27:20 +00:00
William Banfield
7c91b53999 docs: PBTS synchrony issues runbook (#8129)
closes: #7756 

# What does this pull request change?
This pull request adds a new runbook for operators enountering errors related to the new Proposer-Based Timestamps algorithm. The goal of this runbook is to give operators a set of clear steps that they can follow if they are having issues producing blocks because of clock synchronization problems. 
This pull request also renames the `*PrevoteDelay` metrics to drop the term `MessageDelay`. These metrics provide a combined view of `message_delay` + `synchrony` so the name may be confusing.
# Questions to reviewers
* Are there ways to make the set of steps clearer or are there any pieces that seem confusing?
2022-03-17 19:20:46 +00:00
William Banfield
02c7199eec types: update synchrony params to match checked in proto (#8142)
The `.proto` file do not have the `nullable = false` annotation present on the `SynchronyParams` durations. This pull request updates the `SynchronyParams` to match the checked in proto files.  Note, this does not make the code buildable against the latest protos. This pull request was achieved by checking out all files _not relevant_ to the `SynchronyParams` and removing the new `TimeoutParams` from the the `params.proto` file. Future updates will add these back. 

This pull request also adds a `nil` check to the `pbParams.Synchrony` field in `ConsensusParamsFromProto`. Old versions of Tendermint will not have the `Synchrony` parameters filled in so this code would panic on startup.

We will fill in the empty fields with defaults, but per https://github.com/tendermint/tendermint/blob/master/docs/rfc/rfc-009-consensus-parameter-upgrades.md#only-update-hashedparams-on-hash-breaking-releases we will keep out of the hash during this release.
2022-03-17 18:49:37 +00:00
Sam Kleinman
1dd8807cc3 mempool: test harness should expose application (#8143)
This is minor, but I was trying to write a test and realized that the
application reference in the harness isn't actually used, which is
quite confusing.
2022-03-17 17:45:27 +00:00
Sam Kleinman
07b46d5a05 blocksync: drop redundant shutdown mechanisms (#8136) 2022-03-17 13:30:13 -04:00
Sam Kleinman
7a0b05f22d libs/events: remove unneccessary unsubscription code (#8135)
The events switch code is largely vestigal and is responsible for
wiring between the consensus state machine and the consensus
reactor. While there might have been a need, historicallly to managed
these subscriptions at runtime, it's nolonger used: subscriptions are
registered during startup, and then the switch shuts down at at the
end. 

Eventually the EventSwitch should be replaced by a much smaller
implementation of an eventloop in the consensus state machine, but
cutting down on the scope of the event switch will help clarify the
requirements from the consensus side.
2022-03-17 13:02:02 +00:00
Sam Kleinman
bedb68078c libs/clist: remove unused surface area (#8134) 2022-03-16 11:57:41 -04:00
dependabot[bot]
348c494c99 build(deps): Bump github.com/stretchr/testify from 1.7.0 to 1.7.1 (#8131)
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.7.0 to 1.7.1.
<details>
<summary>Commits</summary>
<ul>
<li><a href="083ff1c044"><code>083ff1c</code></a> Fixed didPanic to now detect panic(nil).</li>
<li><a href="1e36bfe104"><code>1e36bfe</code></a> Use cross Go version compatible build tag syntax</li>
<li><a href="e798dc2763"><code>e798dc2</code></a> Add docs on 1.17 build tags</li>
<li><a href="83198c2c50"><code>83198c2</code></a> assert: guard CanConvert call in backward compatible wrapper</li>
<li><a href="087b655c75"><code>087b655</code></a> assert: allow comparing time.Time</li>
<li><a href="7bcf74e94f"><code>7bcf74e</code></a> fix msgAndArgs forwarding</li>
<li><a href="c29de71342"><code>c29de71</code></a> add tests for correct msgAndArgs forwarding</li>
<li><a href="f87e2b2119"><code>f87e2b2</code></a> Update builds</li>
<li><a href="ab6dc32628"><code>ab6dc32</code></a> fix linting errors in /assert package</li>
<li><a href="edff5a049b"><code>edff5a0</code></a> fix funtion name</li>
<li>Additional commits viewable in <a href="https://github.com/stretchr/testify/compare/v1.7.0...v1.7.1">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/stretchr/testify&package-manager=go_modules&previous-version=1.7.0&new-version=1.7.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2022-03-16 14:08:43 +00:00
Sam Kleinman
48b1952f18 state: avoid panics for marshaling errors (#8125) 2022-03-15 22:27:23 +00:00
William Banfield
93c4e00e8e abci++: remove app_signed_updates (#8128) 2022-03-15 17:07:02 -04:00
William Banfield
68c624f5de abci++: synchronize PrepareProposal with the newest version of the spec (#8094)
This change implements the logic for the PrepareProposal ABCI++ method call. The main logic for creating and issuing the PrepareProposal request lives in execution.go and is tested in a set of new tests in execution_test.go. This change also updates the mempool mock to use a mockery generated version and removes much of the plumbing for the no longer used ABCIResponses.
2022-03-15 15:37:30 -04:00
Thane Thomson
4dce885994 ADR: Protocol Buffers Management (#8029)
* First draft of protobuf management ADR

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Pre-emptively add ADR to "Accepted" section in README

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Add missing prototool link

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Elaborate on positive consequences of decision

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Add clang-format GA to detailed design

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Fix broken link

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Add notes on automated docs generation

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Rewording and restructuring for clarity

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Grammatical fixes and elaborations

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Revise wording for clarity

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Address comments

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Update ADR to reflect current consensus on Buf

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Minor grammar fix

Signed-off-by: Thane Thomson <connect@thanethomson.com>

Co-authored-by: M. J. Fromberger <fromberger@interchain.io>
2022-03-15 11:25:03 -04:00
Sam Kleinman
faf123bda2 autofile: reduce minor panic and docs changes (#8122)
* autofile: reduce minor panic and docs changes

* fix lint
2022-03-15 14:25:25 +00:00
Sam Kleinman
da5c09cf6f cleanup: remove commented code (#8123) 2022-03-15 10:07:06 -04:00
Sam Kleinman
b08dd93d88 libs/log: remove Must constructor (#8120)
* libs/log: remove Must constructor

* Update test/e2e/node/main.go

Co-authored-by: M. J. Fromberger <michael.j.fromberger@gmail.com>

* use stdlog

Co-authored-by: M. J. Fromberger <michael.j.fromberger@gmail.com>
2022-03-15 13:02:31 +00:00
Sam Kleinman
a5320da5c8 node: cleanup evidence db (#8119) 2022-03-14 21:00:51 +00:00
William Banfield
8e5dfa55ef rfc: RFC 015 ABCI++ Tx Mutation (#8033)
This pull requests adds an RFC to discuss the proposed mechanism for transaction replacement detailed in the ABCI++ specification.
2022-03-14 09:49:04 -04:00
Jordi Pinyana
70df7d9e6e readme: add vocdoni (#8117)
Add Vocdoni under applications section on the README.
2022-03-14 12:52:19 +00:00
frog power 4000
98dd0d6c5a minor typo in docs (#8116) 2022-03-13 21:09:49 -07:00
frog power 4000
aff1481682 Update abci++_basic_concepts_002_draft.md (#8114)
Minor Typo (nice doc!)
2022-03-12 18:57:43 -08:00
M. J. Fromberger
e9bc33d807 consensus: ensure the node terminates on consensus failure (#8111)
Updates #8077. The panic handler for consensus currently attempts to effect a
clean shutdown, but this can leave a failed node running in an unknown state
for an arbitrary amount of time after the failure.

Since a panic at this point means consensus is already irrecoverably broken, we
should not allow the node to continue executing. After making a best effort to
shut down the writeahead log, re-panic to ensure the node will terminate before
any further state transitions are processed.

Even with this change, it is possible some transitions may occur while the
cleanup is happening. It might be preferable to abort unconditionally without
any attempt at cleanup.

Related changes:

- Clean up the creation of WAL directories.
- Filter WAL close errors at rethrow.
2022-03-11 13:30:15 -08:00
Thane Thomson
72bbe64da7 proto: update proto generation to use buf (#7975)
* Hard-code go_package option for .proto files

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Automatically relocate generated ABCI types after proto-gen

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Skip building gogoproto (i.e. only build our types)

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Remove unnecessary proto generation scripts

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Upgrade buf config from v1beta1 to v1

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Add simple proto generation script

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Replace buf-based protobuf generation with simple protoc-based approach

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Remove custom buf-based Docker image generation config and Dockerfile

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Adopt Cosmos SDK's approach to Protobuf linting and breakage checking in CI

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Suppress command echo when running proto checks

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Fix proto-check workflow YAML indentation

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Restore proto-format target

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Replace custom BASH script with make equivalent

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Remove proto linting/breaking changes CI checks after discussion today

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Remove dangling reference to CI workflow that no longer exists

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Update contributing guidelines relating to protos

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Use buf instead for generating protos

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Remove unused buf config for gogoprotobuf

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Add reminder for if we migrate fully to buf

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Restore protopackage script for #8065

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Fix permissions on protopackage script

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Update contributing guidelines to show building of protos using buf

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Fix breaking changes check and add disclaimer

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Expand on contributing guidelines for clarity

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Re-remove old proto workflows

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Add buf-based proto linting workflow in CI

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Superficially reorder proto targets

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Fix proto lints

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Fix GA workflow YAML indentation

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Temporarily use forked version of mlc

Use forked version of markdown-link-check until
https://github.com/gaurav-nelson/github-action-markdown-link-check/pull/126
lands.

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Temporarily disable markdown link checker

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Remove gogo protos - superseded by version from buf registry

Signed-off-by: Thane Thomson <connect@thanethomson.com>
2022-03-11 14:10:46 -05:00
M. J. Fromberger
658a7661c5 p2p: remove unnecessary panic handling in PEX reactor (#8110)
The message handling in this reactor is all under control of the reactor
itself, and does not call out to callbacks or other externally-supplied code.
It doesn't need to check for panics.

- Remove an irrelevant channel ID check.
- Remove an unnecessary panic recovery wrapper.
2022-03-11 08:23:03 -08:00
M. J. Fromberger
89b4321af2 p2p: update polling interval calculation for PEX requests (#8106)
The PEX reactor has a simple feedback control mechanism to decide how often to
poll peers for peer address updates. The idea is to poll more frequently when
knowledge of the network is less, and decrease frequency as knowledge grows.

This change solves two problems:

1. It is possible in some cases we may poll a peer "too often" and get dropped
   by that peer for spamming.

2. The first successful peer update with any content resets the polling timer
   to a very long time (10m), meaning if we are unlucky in getting an
   incomplete reply while the network is small, we may not try again for a very
   long time. This may contribute to difficulties bootstrapping sync.

The main change here is to only update the interval when new information is
added to the system, and not (as before) whenever a request is sent out to a
peer. The rate computation is essentially the same as before, although the code
has been a bit simplified, and I consolidated some of the error handling so
that we don't have to check in multiple places for the same conditions.

Related changes:

- Improve error diagnostics for too-soon and overflow conditions.
- Clean up state handling in the poll interval computation.
- Pin the minimum interval avert a chance of PEX spamming a peer.
2022-03-11 07:49:33 -08:00
dependabot[bot]
c79bb13807 build(deps): Bump github.com/spf13/cobra from 1.3.0 to 1.4.0 (#8109)
Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.3.0 to 1.4.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/spf13/cobra/releases">github.com/spf13/cobra's releases</a>.</em></p>
<blockquote>
<h2>v1.4.0</h2>
<h1>Winter 2022 Release ❄️</h1>
<p>Another season, another release!</p>
<h2>Goodbye viper! 🐍 🚀</h2>
<p>The core Cobra library no longer requires Viper and all of its indirect dependencies. This means that Cobra's dependency tree has been drastically thinned! The Viper dependency was included because of the <code>cobra</code> CLI generation tool. <a href="https://github.com/spf13/cobra-cli/releases/tag/v1.3.0">This tool has migrated to <code>spf13/cobra-cli</code></a>.</p>
<p>It's <em>pretty unlikely</em> you were importing and using <strong>the bootstrapping CLI tool</strong> as part of your application (after all, it's just a tool to get going with core <code>cobra</code>).</p>
<p>But if you were, replace occurrences of</p>
<pre><code>&quot;github.com/spf13/cobra/cobra&quot;
</code></pre>
<p>with</p>
<pre><code>&quot;github.com/spf13/cobra-cli&quot;
</code></pre>
<p>And in your <code>go.mod</code>, you'll want to also include this dependency:</p>
<pre><code>github.com/spf13/cobra-cli v1.3.0
</code></pre>
<p>Again, the maintainers <em>do not anticipate</em> this being a breaking change to users of the core <code>cobra</code> library, so minimal work should be required for users to integrate with this new release. Moreover, this means the dependency tree for your application using Cobra should no longer require dependencies that were inherited from Viper. Huzzah! 🥳</p>
<p>If you'd like to read more</p>
<ul>
<li>issue: <a href="https://github-redirect.dependabot.com/spf13/cobra/issues/1597">spf13/cobra#1597</a></li>
<li>PR: <a href="https://github-redirect.dependabot.com/spf13/cobra/pull/1604">spf13/cobra#1604</a></li>
</ul>
<h2>Documentation 📝</h2>
<ul>
<li>Update Go Doc link and badge in README: <a href="https://github-redirect.dependabot.com/spf13/cobra/pull/1593">spf13/cobra#1593</a></li>
<li>Fix to install command, now targets <code>@latest</code>: <a href="https://github-redirect.dependabot.com/spf13/cobra/pull/1576">spf13/cobra#1576</a></li>
<li>Added MAINTAINERS file: <a href="https://github-redirect.dependabot.com/spf13/cobra/pull/1545">spf13/cobra#1545</a></li>
</ul>
<h2>Other 💭</h2>
<ul>
<li>Bumped license year to 2022 in golden files: <a href="https://github-redirect.dependabot.com/spf13/cobra/pull/1575">spf13/cobra#1575</a></li>
<li>Added Pixie to projects: <a href="https://github-redirect.dependabot.com/spf13/cobra/pull/1581">spf13/cobra#1581</a></li>
<li>Updated labeler for new labeling scheme: <a href="https://github-redirect.dependabot.com/spf13/cobra/pull/1613">spf13/cobra#1613</a> &amp; syntax fix: <a href="https://github-redirect.dependabot.com/spf13/cobra/pull/1624">spf13/cobra#1624</a></li>
</ul>
<p>Shoutout to our awesome contributors helping to make this cobra release possible!!
<a href="https://github.com/spf13"><code>@​spf13</code></a> <a href="https://github.com/marckhouzam"><code>@​marckhouzam</code></a> <a href="https://github.com/johnSchnake"><code>@​johnSchnake</code></a> <a href="https://github.com/jpmcb"><code>@​jpmcb</code></a> <a href="https://github.com/liggitt"><code>@​liggitt</code></a> <a href="https://github.com/umarcor"><code>@​umarcor</code></a> <a href="https://github.com/hiljusti"><code>@​hiljusti</code></a> <a href="https://github.com/marians"><code>@​marians</code></a> <a href="https://github.com/shyim"><code>@​shyim</code></a> <a href="https://github.com/htroisi"><code>@​htroisi</code></a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/spf13/cobra/blob/master/CHANGELOG.md">github.com/spf13/cobra's changelog</a>.</em></p>
<blockquote>
<h1>Cobra Changelog</h1>
<h2>v1.1.3</h2>
<ul>
<li><strong>Fix:</strong> release-branch.cobra1.1 only: Revert &quot;Deprecate Go &lt; 1.14&quot; to maintain backward compatibility</li>
</ul>
<h2>v1.1.2</h2>
<h3>Notable Changes</h3>
<ul>
<li>Bump license year to 2021 in golden files (<a href="https://github-redirect.dependabot.com/spf13/cobra/issues/1309">#1309</a>) <a href="https://github.com/Bowbaq"><code>@​Bowbaq</code></a></li>
<li>Enhance PowerShell completion with custom comp (<a href="https://github-redirect.dependabot.com/spf13/cobra/issues/1208">#1208</a>) <a href="https://github.com/Luap99"><code>@​Luap99</code></a></li>
<li>Update gopkg.in/yaml.v2 to v2.4.0: The previous breaking change in yaml.v2 v2.3.0 has been reverted, see <a href="https://github-redirect.dependabot.com/go-yaml/yaml/issues/670">go-yaml/yaml#670</a></li>
<li>Documentation readability improvements (<a href="https://github-redirect.dependabot.com/spf13/cobra/issues/1228">#1228</a> etc.) <a href="https://github.com/zaataylor"><code>@​zaataylor</code></a> etc.</li>
<li>Use golangci-lint: Repair warnings and errors resulting from linting (<a href="https://github-redirect.dependabot.com/spf13/cobra/issues/1044">#1044</a>) <a href="https://github.com/umarcor"><code>@​umarcor</code></a></li>
</ul>
<h2>v1.1.1</h2>
<ul>
<li><strong>Fix:</strong> yaml.v2 2.3.0 contained a unintended breaking change. This release reverts to yaml.v2 v2.2.8 which has recent critical CVE fixes, but does not have the breaking changes. See <a href="https://github-redirect.dependabot.com/spf13/cobra/pull/1259">spf13/cobra#1259</a> for context.</li>
<li><strong>Fix:</strong> correct internal formatting for go-md2man v2 (which caused man page generation to be broken). See <a href="https://github-redirect.dependabot.com/spf13/cobra/issues/1049">spf13/cobra#1049</a> for context.</li>
</ul>
<h2>v1.1.0</h2>
<h3>Notable Changes</h3>
<ul>
<li>Extend Go completions and revamp zsh comp (<a href="https://github-redirect.dependabot.com/spf13/cobra/issues/1070">#1070</a>)</li>
<li>Fix man page doc generation - no auto generated tag when <code>cmd.DisableAutoGenTag = true</code> (<a href="https://github-redirect.dependabot.com/spf13/cobra/issues/1104">#1104</a>) <a href="https://github.com/jpmcb"><code>@​jpmcb</code></a></li>
<li>Add completion for help command (<a href="https://github-redirect.dependabot.com/spf13/cobra/issues/1136">#1136</a>)</li>
<li>Complete subcommands when TraverseChildren is set (<a href="https://github-redirect.dependabot.com/spf13/cobra/issues/1171">#1171</a>)</li>
<li>Fix stderr printing functions (<a href="https://github-redirect.dependabot.com/spf13/cobra/issues/894">#894</a>)</li>
<li>fix: fish output redirection (<a href="https://github-redirect.dependabot.com/spf13/cobra/issues/1247">#1247</a>)</li>
</ul>
<h2>v1.0.0</h2>
<p>Announcing v1.0.0 of Cobra. 🎉</p>
<h3>Notable Changes</h3>
<ul>
<li>Fish completion (including support for Go custom completion) <a href="https://github.com/marckhouzam"><code>@​marckhouzam</code></a></li>
<li>API (urgent): Rename BashCompDirectives to ShellCompDirectives <a href="https://github.com/marckhouzam"><code>@​marckhouzam</code></a></li>
<li>Remove/replace SetOutput on Command - deprecated <a href="https://github.com/jpmcb"><code>@​jpmcb</code></a></li>
<li>add support for autolabel stale PR <a href="https://github.com/xchapter7x"><code>@​xchapter7x</code></a></li>
<li>Add Labeler Actions <a href="https://github.com/xchapter7x"><code>@​xchapter7x</code></a></li>
<li>Custom completions coded in Go (instead of Bash) <a href="https://github.com/marckhouzam"><code>@​marckhouzam</code></a></li>
<li>Partial Revert of <a href="https://github-redirect.dependabot.com/spf13/cobra/issues/922">#922</a> <a href="https://github.com/jharshman"><code>@​jharshman</code></a></li>
<li>Add Makefile to project <a href="https://github.com/jharshman"><code>@​jharshman</code></a></li>
<li>Correct documentation for InOrStdin <a href="https://github.com/desponda"><code>@​desponda</code></a></li>
<li>Apply formatting to templates <a href="https://github.com/jharshman"><code>@​jharshman</code></a></li>
<li>Revert change so help is printed on stdout again <a href="https://github.com/marckhouzam"><code>@​marckhouzam</code></a></li>
<li>Update md2man to v2.0.0 <a href="https://github.com/pdf"><code>@​pdf</code></a></li>
<li>update viper to v1.4.0 <a href="https://github.com/umarcor"><code>@​umarcor</code></a></li>
</ul>

</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="5b2b9e9f61"><code>5b2b9e9</code></a> Removes viper dependency by removing cobra/ CLI tool (<a href="https://github-redirect.dependabot.com/spf13/cobra/issues/1604">#1604</a>)</li>
<li><a href="9369465955"><code>9369465</code></a> labeler: fix syntax</li>
<li><a href="e1b831e5c2"><code>e1b831e</code></a> Updates labeler for new labels (<a href="https://github-redirect.dependabot.com/spf13/cobra/issues/1613">#1613</a>)</li>
<li><a href="8267283cfe"><code>8267283</code></a> Add MAINTAINERS file (alphabetical order) (<a href="https://github-redirect.dependabot.com/spf13/cobra/issues/1545">#1545</a>)</li>
<li><a href="6d2dc43606"><code>6d2dc43</code></a> Add Pixie to projects. (<a href="https://github-redirect.dependabot.com/spf13/cobra/issues/1581">#1581</a>)</li>
<li><a href="a599632379"><code>a599632</code></a> Fix install command (<a href="https://github-redirect.dependabot.com/spf13/cobra/issues/1576">#1576</a>)</li>
<li><a href="7cabfeb8f8"><code>7cabfeb</code></a> Update Go Doc link and badge (<a href="https://github-redirect.dependabot.com/spf13/cobra/issues/1593">#1593</a>)</li>
<li><a href="e04ec72550"><code>e04ec72</code></a> Bump license year to 2022 in golden files (<a href="https://github-redirect.dependabot.com/spf13/cobra/issues/1575">#1575</a>)</li>
<li><a href="cb9d7b1cec"><code>cb9d7b1</code></a> Bump github.com/spf13/viper from 1.10.0 to 1.10.1 (<a href="https://github-redirect.dependabot.com/spf13/cobra/issues/1567">#1567</a>)</li>
<li>See full diff in <a href="https://github.com/spf13/cobra/compare/v1.3.0...v1.4.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/spf13/cobra&package-manager=go_modules&previous-version=1.3.0&new-version=1.4.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2022-03-11 14:41:50 +00:00
JayT106
d9c9675e2a p2p+flowrate: rate control refactor (#7828)
Adding `CurrentTransferRate ` in the flowrate package because only the status of the transfer rate has been used.
2022-03-10 13:48:23 +00:00
dependabot[bot]
a54bae25b7 build(deps): Bump google.golang.org/grpc from 1.44.0 to 1.45.0 (#8104)
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.44.0 to 1.45.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.45.0</h2>
<h1>Bug Fixes</h1>
<ul>
<li>xds/clusterresolver: pass cluster name to DNS child policy to be used in creds handshake (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5119">#5119</a>)</li>
<li>reflection: support dynamic messages (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5180">#5180</a>)
<ul>
<li>Special Thanks: <a href="https://github.com/codebutler"><code>@​codebutler</code></a></li>
</ul>
</li>
</ul>
<h1>Performance Improvements</h1>
<ul>
<li>wrr: improve randomWRR performance (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5067">#5067</a>)
<ul>
<li>Special Thanks: <a href="https://github.com/huangchong94"><code>@​huangchong94</code></a></li>
</ul>
</li>
</ul>
<h1>Behavior Changes</h1>
<ul>
<li>server: convert context errors returned by service handlers to status with the correct status code (<code>Canceled</code> or <code>DeadlineExceeded</code>), instead of <code>Unknown</code> (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5156">#5156</a>)</li>
</ul>
<h1>New Features</h1>
<ul>
<li>reflection: add <code>NewServer(ServerOptions)</code> for creating a reflection server with advanced customizations (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5197">#5197</a>)</li>
<li>xds: support federation (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5128">#5128</a>)</li>
<li>xds/resource: accept Self as LDS's RDS config source and CDS's EDS config source (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5152">#5152</a>)</li>
<li>xds/bootstrap: add plugin system for credentials specified in bootstrap file (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5136">#5136</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="a82cc96f07"><code>a82cc96</code></a> Change version to 1.45.0 (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5202">#5202</a>)</li>
<li><a href="011544f729"><code>011544f</code></a> authz: add additional logs to sdk authz (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5094">#5094</a>)</li>
<li><a href="18564ff61d"><code>18564ff</code></a> reflection: improve server implementation (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5197">#5197</a>)</li>
<li><a href="ec717cad73"><code>ec717ca</code></a> xds: minor cleanup in xdsclient bootstrap code (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5195">#5195</a>)</li>
<li><a href="ebc30b8fc3"><code>ebc30b8</code></a> reflection: use protobuf/reflect instead of go reflection, fix dynamic messag...</li>
<li><a href="46009ac902"><code>46009ac</code></a> transport: Add an Unwrap method to ConnectionError (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5148">#5148</a>)</li>
<li><a href="75fd0240ac"><code>75fd024</code></a> remove sdk term from grpc authz (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5191">#5191</a>)</li>
<li><a href="a354b1eec3"><code>a354b1e</code></a> channelz: rename NewChannelzStorage to NewChannelzStorageForTesting (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5190">#5190</a>)</li>
<li><a href="0e055491d5"><code>0e05549</code></a> Format directory/file references (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5184">#5184</a>)</li>
<li><a href="c44f627fd1"><code>c44f627</code></a> cleanup: replace grpc.WithInsecure with insecure.NewCredentials (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5177">#5177</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/grpc/grpc-go/compare/v1.44.0...v1.45.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=google.golang.org/grpc&package-manager=go_modules&previous-version=1.44.0&new-version=1.45.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2022-03-10 13:27:37 +00:00
William Banfield
ddbc93d993 service: add NopService and use for PexReactor (#8100) 2022-03-09 14:33:57 -05:00
M. J. Fromberger
6f7427ec7e Update pending changelog for #8081. (#8093) 2022-03-08 21:18:13 +00:00
Marko
7c03e7dbfb cmd: make reset more safe (#8081)
* add safe reset

* undo change

* remove unsafe

* Update cmd/tendermint/commands/reset_priv_validator.go

Co-authored-by: Thane Thomson <connect@thanethomson.com>

* Update cmd/tendermint/commands/reset_priv_validator.go

Co-authored-by: M. J. Fromberger <fromberger@interchain.io>

* remove export comment

Co-authored-by: Thane Thomson <connect@thanethomson.com>
Co-authored-by: M. J. Fromberger <fromberger@interchain.io>
2022-03-08 09:32:29 -05:00
Sam Kleinman
c35d6d6e2c node: pass eventbus at construction time (#8084)
* node: pass eventbus at construction time

* remove cruft
2022-03-08 13:04:59 +00:00
Manuel Bravo
4edc8c5523 abci++ spec: reorganizing basic concepts, adding outline for easy navigation (#8048)
* reorganizing basic concepts, adding outline to navigate easy

* Update spec/abci++/README.md

Co-authored-by: Sergio Mena <sergio@informal.systems>

* Update spec/abci++/abci++_basic_concepts_002_draft.md

Co-authored-by: Sergio Mena <sergio@informal.systems>

* Update spec/abci++/abci++_basic_concepts_002_draft.md

Co-authored-by: Sergio Mena <sergio@informal.systems>

* Update spec/abci++/abci++_basic_concepts_002_draft.md

Co-authored-by: Sergio Mena <sergio@informal.systems>

* Update spec/abci++/abci++_basic_concepts_002_draft.md

Co-authored-by: Sergio Mena <sergio@informal.systems>

* Update spec/abci++/abci++_basic_concepts_002_draft.md

Co-authored-by: Sergio Mena <sergio@informal.systems>

* Update spec/abci++/abci++_basic_concepts_002_draft.md

Co-authored-by: Sergio Mena <sergio@informal.systems>

* Update spec/abci++/abci++_basic_concepts_002_draft.md

Co-authored-by: Sergio Mena <sergio@informal.systems>

* Update spec/abci++/abci++_basic_concepts_002_draft.md

Co-authored-by: Sergio Mena <sergio@informal.systems>

* Update spec/abci++/abci++_basic_concepts_002_draft.md

Co-authored-by: M. J. Fromberger <fromberger@interchain.io>

* Update spec/abci++/abci++_basic_concepts_002_draft.md

Co-authored-by: M. J. Fromberger <fromberger@interchain.io>

* Update spec/abci++/abci++_basic_concepts_002_draft.md

Co-authored-by: M. J. Fromberger <fromberger@interchain.io>

* address problem with snapshot list data type

* Update spec/abci++/abci++_basic_concepts_002_draft.md

Co-authored-by: M. J. Fromberger <fromberger@interchain.io>

* Update spec/abci++/abci++_basic_concepts_002_draft.md

Co-authored-by: M. J. Fromberger <fromberger@interchain.io>

* Update spec/abci++/abci++_basic_concepts_002_draft.md

Co-authored-by: M. J. Fromberger <fromberger@interchain.io>

* Update spec/abci++/abci++_basic_concepts_002_draft.md

Co-authored-by: William Banfield <4561443+williambanfield@users.noreply.github.com>

* Update spec/abci++/abci++_basic_concepts_002_draft.md

Co-authored-by: M. J. Fromberger <fromberger@interchain.io>

* clarify handling events in same-execution model

* remove outdated text about vote extension singing

* clarification apphash state-sync

Co-authored-by: Sergio Mena <sergio@informal.systems>
Co-authored-by: M. J. Fromberger <fromberger@interchain.io>
Co-authored-by: William Banfield <4561443+williambanfield@users.noreply.github.com>
2022-03-08 11:12:57 +01:00
M. J. Fromberger
f992a7e740 Fix YAML front matter. (#8086)
Fixes #8052 again. Ideally we would have some way of detecting that this
happens before merging, but the way we build docs right now is kind of
complicated.
2022-03-07 14:50:13 -08:00
Sam Kleinman
691cb52528 statesync: avoid leaking a thread during tests (#8085)
* statesync: avoid leaking a thread during tests

* fix
2022-03-07 22:12:39 +00:00
Sam Kleinman
01266881b8 evidence: manage and initialize state objects more clearly in the pool (#8080) 2022-03-07 14:26:58 -05:00
M. J. Fromberger
2df5c85a8d Fix govet errors for %w use in test errors. (#8083)
The %w syntax is a fmt.Errorf thing, not supported by the testing package.
2022-03-07 18:17:37 +00:00
dependabot[bot]
1f03287f52 build(deps): Bump golangci/golangci-lint-action from 2.5.2 to 3.1.0 (#8074)
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 2.5.2 to 3.1.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/golangci/golangci-lint-action/releases">golangci/golangci-lint-action's releases</a>.</em></p>
<blockquote>
<h2>v3.1.0</h2>
<h2>What's Changed</h2>
<h3>New features</h3>
<ul>
<li>Allow to disable caching completely by <a href="https://github.com/tdabasinskas"><code>@​tdabasinskas</code></a> in <a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/pull/351">golangci/golangci-lint-action#351</a></li>
</ul>
<h3>CI</h3>
<ul>
<li>ci(dep): Add step to commit changes if PR has dependencies label by <a href="https://github.com/sayboras"><code>@​sayboras</code></a> in <a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/pull/108">golangci/golangci-lint-action#108</a></li>
</ul>
<h3>Dependabot</h3>
<ul>
<li>build(deps-dev): bump eslint from 8.9.0 to 8.10.0 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/pull/405">golangci/golangci-lint-action#405</a></li>
</ul>
<h3>Misc</h3>
<ul>
<li>Update version to 3.1.0 in package.json by <a href="https://github.com/SVilgelm"><code>@​SVilgelm</code></a> in <a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/pull/406">golangci/golangci-lint-action#406</a></li>
<li>fix version in package-lock.json by <a href="https://github.com/SVilgelm"><code>@​SVilgelm</code></a> in <a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/pull/407">golangci/golangci-lint-action#407</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/tdabasinskas"><code>@​tdabasinskas</code></a> made their first contribution in <a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/pull/351">golangci/golangci-lint-action#351</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/golangci/golangci-lint-action/compare/v3...v3.1.0">https://github.com/golangci/golangci-lint-action/compare/v3...v3.1.0</a></p>
<h2>v3.0.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Fix grammar in action.yml by <a href="https://github.com/abennett"><code>@​abennett</code></a> in <a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/pull/356">golangci/golangci-lint-action#356</a></li>
<li>Add description for permissions settings by <a href="https://github.com/sg0hsmt"><code>@​sg0hsmt</code></a> in <a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/pull/298">golangci/golangci-lint-action#298</a></li>
<li>Remove Setup-Go by <a href="https://github.com/StevenACoffman"><code>@​StevenACoffman</code></a> in <a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/pull/403">golangci/golangci-lint-action#403</a></li>
<li>Update all direct dependencies by <a href="https://github.com/SVilgelm"><code>@​SVilgelm</code></a> in <a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/pull/404">golangci/golangci-lint-action#404</a></li>
<li>139 Dependabot updates</li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/abennett"><code>@​abennett</code></a> made their first contribution in <a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/pull/356">golangci/golangci-lint-action#356</a></li>
<li><a href="https://github.com/sg0hsmt"><code>@​sg0hsmt</code></a> made their first contribution in <a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/pull/298">golangci/golangci-lint-action#298</a></li>
<li><a href="https://github.com/StevenACoffman"><code>@​StevenACoffman</code></a> made their first contribution in <a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/pull/403">golangci/golangci-lint-action#403</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/golangci/golangci-lint-action/compare/v2...v3.0.0">https://github.com/golangci/golangci-lint-action/compare/v2...v3.0.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="b517f99ae2"><code>b517f99</code></a> fix version in package-lock.json (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/issues/407">#407</a>)</li>
<li><a href="9636c5bc97"><code>9636c5b</code></a> Update version to 3.1.0 in package.json (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/issues/406">#406</a>)</li>
<li><a href="03e4befc7a"><code>03e4bef</code></a> ci(dep): Add step to commit changes if PR has dependencies label (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/issues/108">#108</a>)</li>
<li><a href="cdfc708aeb"><code>cdfc708</code></a> Allow to disable caching completely (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/issues/351">#351</a>)</li>
<li><a href="7d5614c3eb"><code>7d5614c</code></a> build(deps-dev): bump eslint from 8.9.0 to 8.10.0 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/issues/405">#405</a>)</li>
<li><a href="c675eb70db"><code>c675eb7</code></a> Update all direct dependencies (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/issues/404">#404</a>)</li>
<li><a href="423fbafafc"><code>423fbaf</code></a> Remove Setup-Go (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/issues/403">#403</a>)</li>
<li><a href="bcfc6f96bb"><code>bcfc6f9</code></a> build(deps-dev): bump eslint-plugin-import from 2.25.3 to 2.25.4 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/issues/402">#402</a>)</li>
<li><a href="d34ac2aef3"><code>d34ac2a</code></a> build(deps): bump setup-go from v2.1.4 to v2.2.0 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/issues/401">#401</a>)</li>
<li><a href="e4b538ed37"><code>e4b538e</code></a> build(deps-dev): bump <code>@​types/node</code> from 16.11.10 to 17.0.19 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/issues/400">#400</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/golangci/golangci-lint-action/compare/v2.5.2...v3.1.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=golangci/golangci-lint-action&package-manager=github_actions&previous-version=2.5.2&new-version=3.1.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2022-03-07 16:24:18 +00:00
dependabot[bot]
e7955185b4 build(deps): Bump docker/login-action from 1.13.0 to 1.14.1 (#8075)
Bumps [docker/login-action](https://github.com/docker/login-action) from 1.13.0 to 1.14.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/docker/login-action/releases">docker/login-action's releases</a>.</em></p>
<blockquote>
<h2>v1.14.1</h2>
<ul>
<li>Revert to Node 12 as default runtime to fix issue for GHE users (<a href="https://github-redirect.dependabot.com/docker/login-action/issues/160">#160</a>)</li>
</ul>
<h2>v1.14.0</h2>
<ul>
<li>Update to node 16 (<a href="https://github-redirect.dependabot.com/docker/login-action/issues/158">#158</a>)</li>
<li>Bump <code>@​aws-sdk/client-ecr</code> from 3.45.0 to 3.53.0 (<a href="https://github-redirect.dependabot.com/docker/login-action/issues/157">#157</a>)</li>
<li>Bump <code>@​aws-sdk/client-ecr-public</code> from 3.45.0 to 3.53.0 (<a href="https://github-redirect.dependabot.com/docker/login-action/issues/156">#156</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="dd4fa0671b"><code>dd4fa06</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/docker/login-action/issues/160">#160</a> from crazy-max/node12</li>
<li><a href="4e3538592e"><code>4e35385</code></a> Revert to Node 12 as default runtime</li>
<li><a href="bb984efc56"><code>bb984ef</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/docker/login-action/issues/156">#156</a> from docker/dependabot/npm_and_yarn/aws-sdk/client-ec...</li>
<li><a href="722888132b"><code>7228881</code></a> Update generated content</li>
<li><a href="17780b56b7"><code>17780b5</code></a> Bump <code>@​aws-sdk/client-ecr-public</code> from 3.45.0 to 3.53.0</li>
<li><a href="39857b3b45"><code>39857b3</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/docker/login-action/issues/157">#157</a> from docker/dependabot/npm_and_yarn/aws-sdk/client-ec...</li>
<li><a href="5fcc728422"><code>5fcc728</code></a> Update generated content</li>
<li><a href="9fb8721eb9"><code>9fb8721</code></a> Bump <code>@​aws-sdk/client-ecr</code> from 3.45.0 to 3.53.0</li>
<li><a href="4e3c9375bb"><code>4e3c937</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/docker/login-action/issues/158">#158</a> from crazy-max/node-16</li>
<li><a href="4b59a429db"><code>4b59a42</code></a> update to node 16</li>
<li>See full diff in <a href="https://github.com/docker/login-action/compare/v1.13.0...v1.14.1">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=docker/login-action&package-manager=github_actions&previous-version=1.13.0&new-version=1.14.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2022-03-07 14:27:08 +00:00
dependabot[bot]
854add04b0 build(deps): Bump actions/checkout from 2.4.0 to 3 (#8076)
Bumps [actions/checkout](https://github.com/actions/checkout) from 2.4.0 to 3.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/actions/checkout/releases">actions/checkout's releases</a>.</em></p>
<blockquote>
<h2>v3.0.0</h2>
<ul>
<li>Update default runtime to node16</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/actions/checkout/blob/main/CHANGELOG.md">actions/checkout's changelog</a>.</em></p>
<blockquote>
<h1>Changelog</h1>
<h2>v2.3.1</h2>
<ul>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/284">Fix default branch resolution for .wiki and when using SSH</a></li>
</ul>
<h2>v2.3.0</h2>
<ul>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/278">Fallback to the default branch</a></li>
</ul>
<h2>v2.2.0</h2>
<ul>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/258">Fetch all history for all tags and branches when fetch-depth=0</a></li>
</ul>
<h2>v2.1.1</h2>
<ul>
<li>Changes to support GHES (<a href="https://github-redirect.dependabot.com/actions/checkout/pull/236">here</a> and <a href="https://github-redirect.dependabot.com/actions/checkout/pull/248">here</a>)</li>
</ul>
<h2>v2.1.0</h2>
<ul>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/191">Group output</a></li>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/199">Changes to support GHES alpha release</a></li>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/184">Persist core.sshCommand for submodules</a></li>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/163">Add support ssh</a></li>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/179">Convert submodule SSH URL to HTTPS, when not using SSH</a></li>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/157">Add submodule support</a></li>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/144">Follow proxy settings</a></li>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/141">Fix ref for pr closed event when a pr is merged</a></li>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/128">Fix issue checking detached when git less than 2.22</a></li>
</ul>
<h2>v2.0.0</h2>
<ul>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/108">Do not pass cred on command line</a></li>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/107">Add input persist-credentials</a></li>
<li><a href="https://github-redirect.dependabot.com/actions/checkout/pull/104">Fallback to REST API to download repo</a></li>
</ul>
<h2>v2 (beta)</h2>
<ul>
<li>Improved fetch performance
<ul>
<li>The default behavior now fetches only the SHA being checked-out</li>
</ul>
</li>
<li>Script authenticated git commands
<ul>
<li>Persists <code>with.token</code> in the local git config</li>
<li>Enables your scripts to run authenticated git commands</li>
<li>Post-job cleanup removes the token</li>
<li>Coming soon: Opt out by setting <code>with.persist-credentials</code> to <code>false</code></li>
</ul>
</li>
<li>Creates a local branch
<ul>
<li>No longer detached HEAD when checking out a branch</li>
<li>A local branch is created with the corresponding upstream branch set</li>
</ul>
</li>
<li>Improved layout</li>
</ul>

</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="a12a3943b4"><code>a12a394</code></a> update readme for v3 (<a href="https://github-redirect.dependabot.com/actions/checkout/issues/708">#708</a>)</li>
<li><a href="8f9e05e482"><code>8f9e05e</code></a> Update to node 16 (<a href="https://github-redirect.dependabot.com/actions/checkout/issues/689">#689</a>)</li>
<li><a href="230611dbd0"><code>230611d</code></a> Change secret name for PAT to not start with GITHUB_ (<a href="https://github-redirect.dependabot.com/actions/checkout/issues/623">#623</a>)</li>
<li>See full diff in <a href="https://github.com/actions/checkout/compare/v2.4.0...v3">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=2.4.0&new-version=3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2022-03-07 14:25:08 +00:00
Sam Kleinman
8df7b6103f proxy: collapse triforcated abci.Client (#8067) 2022-03-06 18:25:50 -05:00
Sam Kleinman
f1659ce329 consensus: fix TestInvalidState race and reporting (#8071) 2022-03-06 12:29:05 -05:00
William Banfield
8d0bd1c0ff update abci cli test output (#8070) 2022-03-04 17:54:21 -05:00
William Banfield
0b8a62c87b abci: Synchronize FinalizeBlock with the updated specification (#7983)
This change set implements the most recent version of `FinalizeBlock`. 

# What does this change actually contain?

* This change set is rather large but fear not! The majority of the files touched and changes are renaming `ResponseDeliverTx` to `ExecTxResult`. This should be a pretty inoffensive change since they're effectively the same type but with a different name.
* The `execBlockOnProxyApp` was totally removed since it served as just a wrapper around the logic that is now mostly encapsulated within `FinalizeBlock`
* The `updateState` helper function has been made a public method on `State`. It was being exposed as a shim through the testing infrastructure, so this seemed innocuous.
* Tests already existed to ensure that the application received the `ByzantineValidators` and the `ValidatorUpdates`, but one was fixed up to ensure that `LastCommitInfo` was being sent across.
* Tests were removed from the `psql` indexer that seemed to search for an event in the indexer that was not being created.

# Questions for reviewers
* We store this [ABCIResponses](5721a13ab1/proto/tendermint/state/types.pb.go (L37)) type in the data base as the block results. This type has changed since v0.35 to contain the `FinalizeBlock` response. I'm wondering if we need to do any shimming to keep the old data retrieveable?
* Similarly, this change is exposed via the RPC through [ResultBlockResults](5721a13ab1/rpc/coretypes/responses.go (L69)) changing. Should we somehow shim or notify for this change? 


closes: #7658
2022-03-04 22:32:37 +00:00
William Banfield
9accc1a531 abci++ tooling: proto synchronization (#8065)
This PR implements a hack. It does effectively 2 things:
1. It checks in a set of protos, suffixed with `.intermediate` that allow the abci proto generation to proceed.
2. Adds a script / makefile to enable the generation. 

The script is pretty simple. It copies over the 'intermediate' files over to be the `.proto` files for the `abci/types.proto` file and the `types/types.proto` files, generates all the protos, and then reverts all of the changes made to the `*.proto` files and the `*.pb.go` files, except for the single abci file. 

If this is too ugly, I'm happy to tweak it, but my goal here is to have some working version of the protos that currently build the abci code so that we can coordinate changes to the code and not have them all sit in different branches that make breaking changes across each other.

The end goal is to have the `.intermediate` files disappear completely, since they should be moving towards containing everything that the `.proto` files contain.
2022-03-04 20:09:49 +00:00
Sam Kleinman
0167f0d527 node: nodes should fetch state on startup (#8062) 2022-03-04 12:23:57 -05:00
William Banfield
c8c248d733 docs: add an overview of the proposer-based timestamps algorithm (#8058)
This change adds an overview of the proposer-based timestamps algorithm. The goal of this documentation is to give a plain enough explanation of the algorithm so that application developers and validators can understand both the utility of the algorithm and understand how the new constrains may affect their network and topology. 

I'm blanking on the scheme we decided on for docs linking, so if anyone could remind me what link format we decided on, I'll go clean that up ASAP.

Once this is merged, I intend to create a runbook for chains that see slower block-times or higher nil prevotes and link that runbook to this document to provide a higher-level overview.

closes: #8046
2022-03-03 22:25:06 +00:00
Sam Kleinman
9d98484845 node: excise node handle within rpc env (#8063) 2022-03-03 15:17:45 -05:00
M. J. Fromberger
63ff2f052d Remove now-unused and deprecated Subscribe methods. (#8064)
Both pubsub and eventbus are internal packages now, and all the existing use
has been updated to use the SubscribeWithArgs methods instead.
2022-03-03 10:03:38 -08:00
Sergio Mena
7c4fe5b108 Vote extensions: new design (#8031)
* Changed the spec text to agreed VoteExtension solution

* Revert "Removed protobufs related to vote extensions"

This reverts commit 4566f1e302.

* Changes to ABCI protocol buffers

* Update spec/core/data_structures.md

Co-authored-by: M. J. Fromberger <fromberger@interchain.io>

* Update spec/core/data_structures.md

Co-authored-by: M. J. Fromberger <fromberger@interchain.io>

* Fix dangling link in ABCI++ readme

* Addressed comments

Co-authored-by: M. J. Fromberger <fromberger@interchain.io>
2022-03-02 22:12:01 +01:00
Sam Kleinman
a3881f0fb1 consensus: improve wal test cleanup (#8059)
I believe that this gets rid of our temp-file related test errors.
2022-03-02 18:35:39 +00:00
M. J. Fromberger
59eaa4dba0 Revert "Remove master from versions and copy it from the latest. (#7980)" (#8053)
This reverts commit f939f962b1.

A lot of inbound links are still broken, so we will need to find a different
approach to suppressing unreleased docs.
2022-03-02 08:50:35 -08:00
M. J. Fromberger
33e6f7af11 Forward-port changelog updates for v0.35.2 to master. (#8054) 2022-03-02 16:43:11 +00:00
M. J. Fromberger
af96ef2fe4 rpc: set a minimum long-polling interval for Events (#8050)
Since the goal of reading events at the head of the event log is to satisfy a
subscription style interface, there is no point in allowing head polling with
no wait interval. The pagination case already bypasses long polling, so the
extra option is unneessary.

Set a minimum default long-polling interval for the head case.
Add a test for minimum delay.
2022-03-02 08:12:18 -08:00
Thane Thomson
65065e6054 docs: update ADR template (#7789)
* Update ADR template

The reason for this proposed update to the ADR template is twofold:

1. There's currently no easy way to cross-reference between ADRs and
   issues/PRs on GitHub. This may be easy to manage for those with
   context while they're working on implementing an ADR, but after time
   passes and for complex ADRs it gets more difficult for newcomers to
   the codebase to track both the implementation status of the ADR or
   its historical context and discussions.
2. We should not allow for "proposed" ADRs. An ADR is a **decision
   record**, which implies acceptance, and not a proposal. RFCs provide
   a mechanism to make proposals.

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Add example of one ADR superseding another

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Move "Proposed" ToC entries to "Accepted".

It's possible some of these should actually be "Implemented", but I did not try
to go through each one to distinguish.

* Revert "Move "Proposed" ToC entries to "Accepted"."

This reverts commit d8d2907e98.

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Fix Markdown formatting

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Add "Deprecated" section to ADR TOC

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Expand ADR template to explicitly cater for rejected ADRs

Signed-off-by: Thane Thomson <connect@thanethomson.com>

Co-authored-by: M. J. Fromberger <fromberger@interchain.io>
2022-03-02 10:25:30 -05:00
M. J. Fromberger
c42c6d06d2 Migration of TLA+ files from the spec repo (#8004) (#8018)
Co-authored-by: Kukovec <jure.kukovec@gmail.com>
2022-03-02 09:08:39 -05:00
M. J. Fromberger
a22942504c p2p: re-enable tests previously disabled (#8049) 2022-03-01 12:25:11 -08:00
Callum Waters
ea46a4e9d1 github: add Informal code owners (#8042) 2022-03-01 15:58:23 +01:00
Sam Kleinman
21087563eb consensus: validator set changes test cleanup (#8035)
This is mostly an extremely small change where I double a somewhat
arbitrarly set timeout from 1m to 2m for an entire test. When I put
these timeouts in the test, they were arbitrary based on my local
performance (which is quite fact,) and I expected that they'd need to
be tweaked in the future.

A big chunk of this PR is reworking a collection of helper functions
that produce somewhat intractable messages when a test fails, so that
the error messages take up less vertical space, hopefully without
losing any debugability.
2022-03-01 13:42:00 +00:00
Sam Kleinman
a965f03c15 statesync: avoid compounding retry logic for fetching consensus parameters (#8032)
We're waiting between trying witnesses (which shouldn't be neccessary
because the witnesses shouldn't depend on each other,) and also
between *attempts*, and really the outer sleep should be enough.
2022-03-01 13:01:57 +00:00
Manuel Bravo
82a2ca4ba5 abci++ spec: remove new_hashes and discuss transaction traceability (#8002)
* remove new_hashes, discuss traceability

* Update spec/abci++/abci++_methods_002_draft.md

Co-authored-by: Sergio Mena <sergio@informal.systems>

* Update spec/abci++/abci++_methods_002_draft.md

Co-authored-by: Sergio Mena <sergio@informal.systems>

* Update spec/abci++/abci++_methods_002_draft.md

Co-authored-by: Sergio Mena <sergio@informal.systems>

* quote example traceability

* remove new_hashes from protobuf

Co-authored-by: Sergio Mena <sergio@informal.systems>
2022-03-01 12:41:09 +01:00
Sam Kleinman
58dc172611 p2p: plumb rudamentary service discovery to rectors and update statesync (#8030)
This is a little coarse, but the idea is that we'll send information
about the channels a peer has upon the peer-up event that we send to
reactors that we can then use to reject peers (if neeeded) from reactors.

This solves the problem where statesync would hang in test networks
(and presumably real) where we would attempt to statesync from seed
nodes, thereby hanging silently forever.
2022-02-28 20:02:54 +00:00
Sam Kleinman
9cb01168a6 Revert "build(deps): Bump golangci/golangci-lint-action from 2.5.2 to 3.1.0 (#8026)" (#8034)
This reverts commit e4dced2437.
2022-02-28 14:45:53 -05:00
dependabot[bot]
e4dced2437 build(deps): Bump golangci/golangci-lint-action from 2.5.2 to 3.1.0 (#8026)
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 2.5.2 to 3.1.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/golangci/golangci-lint-action/releases">golangci/golangci-lint-action's releases</a>.</em></p>
<blockquote>
<h2>v3.1.0</h2>
<h2>What's Changed</h2>
<h3>New features</h3>
<ul>
<li>Allow to disable caching completely by <a href="https://github.com/tdabasinskas"><code>@​tdabasinskas</code></a> in <a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/pull/351">golangci/golangci-lint-action#351</a></li>
</ul>
<h3>CI</h3>
<ul>
<li>ci(dep): Add step to commit changes if PR has dependencies label by <a href="https://github.com/sayboras"><code>@​sayboras</code></a> in <a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/pull/108">golangci/golangci-lint-action#108</a></li>
</ul>
<h3>Dependabot</h3>
<ul>
<li>build(deps-dev): bump eslint from 8.9.0 to 8.10.0 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/pull/405">golangci/golangci-lint-action#405</a></li>
</ul>
<h3>Misc</h3>
<ul>
<li>Update version to 3.1.0 in package.json by <a href="https://github.com/SVilgelm"><code>@​SVilgelm</code></a> in <a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/pull/406">golangci/golangci-lint-action#406</a></li>
<li>fix version in package-lock.json by <a href="https://github.com/SVilgelm"><code>@​SVilgelm</code></a> in <a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/pull/407">golangci/golangci-lint-action#407</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/tdabasinskas"><code>@​tdabasinskas</code></a> made their first contribution in <a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/pull/351">golangci/golangci-lint-action#351</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/golangci/golangci-lint-action/compare/v3...v3.1.0">https://github.com/golangci/golangci-lint-action/compare/v3...v3.1.0</a></p>
<h2>v3.0.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Fix grammar in action.yml by <a href="https://github.com/abennett"><code>@​abennett</code></a> in <a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/pull/356">golangci/golangci-lint-action#356</a></li>
<li>Add description for permissions settings by <a href="https://github.com/sg0hsmt"><code>@​sg0hsmt</code></a> in <a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/pull/298">golangci/golangci-lint-action#298</a></li>
<li>Remove Setup-Go by <a href="https://github.com/StevenACoffman"><code>@​StevenACoffman</code></a> in <a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/pull/403">golangci/golangci-lint-action#403</a></li>
<li>Update all direct dependencies by <a href="https://github.com/SVilgelm"><code>@​SVilgelm</code></a> in <a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/pull/404">golangci/golangci-lint-action#404</a></li>
<li>139 Dependabot updates</li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/abennett"><code>@​abennett</code></a> made their first contribution in <a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/pull/356">golangci/golangci-lint-action#356</a></li>
<li><a href="https://github.com/sg0hsmt"><code>@​sg0hsmt</code></a> made their first contribution in <a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/pull/298">golangci/golangci-lint-action#298</a></li>
<li><a href="https://github.com/StevenACoffman"><code>@​StevenACoffman</code></a> made their first contribution in <a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/pull/403">golangci/golangci-lint-action#403</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/golangci/golangci-lint-action/compare/v2...v3.0.0">https://github.com/golangci/golangci-lint-action/compare/v2...v3.0.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="b517f99ae2"><code>b517f99</code></a> fix version in package-lock.json (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/issues/407">#407</a>)</li>
<li><a href="9636c5bc97"><code>9636c5b</code></a> Update version to 3.1.0 in package.json (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/issues/406">#406</a>)</li>
<li><a href="03e4befc7a"><code>03e4bef</code></a> ci(dep): Add step to commit changes if PR has dependencies label (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/issues/108">#108</a>)</li>
<li><a href="cdfc708aeb"><code>cdfc708</code></a> Allow to disable caching completely (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/issues/351">#351</a>)</li>
<li><a href="7d5614c3eb"><code>7d5614c</code></a> build(deps-dev): bump eslint from 8.9.0 to 8.10.0 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/issues/405">#405</a>)</li>
<li><a href="c675eb70db"><code>c675eb7</code></a> Update all direct dependencies (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/issues/404">#404</a>)</li>
<li><a href="423fbafafc"><code>423fbaf</code></a> Remove Setup-Go (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/issues/403">#403</a>)</li>
<li><a href="bcfc6f96bb"><code>bcfc6f9</code></a> build(deps-dev): bump eslint-plugin-import from 2.25.3 to 2.25.4 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/issues/402">#402</a>)</li>
<li><a href="d34ac2aef3"><code>d34ac2a</code></a> build(deps): bump setup-go from v2.1.4 to v2.2.0 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/issues/401">#401</a>)</li>
<li><a href="e4b538ed37"><code>e4b538e</code></a> build(deps-dev): bump <code>@​types/node</code> from 16.11.10 to 17.0.19 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint-action/issues/400">#400</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/golangci/golangci-lint-action/compare/v2.5.2...v3.1.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=golangci/golangci-lint-action&package-manager=github_actions&previous-version=2.5.2&new-version=3.1.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2022-02-28 12:57:21 +00:00
M. J. Fromberger
8175b2b26d docs: fix some broken markdown links (#8021)
Found by the link checker.

There are still some links that aren't fixed, because it's not clear where they _should_ point. I just hit the obvious ones.
2022-02-27 13:27:29 +00:00
dependabot[bot]
0fcfaa4568 build(deps): Bump url-parse from 1.5.7 to 1.5.10 in /docs (#8023)
Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.5.7 to 1.5.10.
- [Release notes](https://github.com/unshiftio/url-parse/releases)
- [Commits](https://github.com/unshiftio/url-parse/compare/1.5.7...1.5.10)

---
updated-dependencies:
- dependency-name: url-parse
  dependency-type: indirect
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-25 19:48:51 -08:00
dependabot[bot]
b488198d47 build(deps): Bump prismjs from 1.26.0 to 1.27.0 in /docs (#8022)
Bumps [prismjs](https://github.com/PrismJS/prism) from 1.26.0 to 1.27.0.
- [Release notes](https://github.com/PrismJS/prism/releases)
- [Changelog](https://github.com/PrismJS/prism/blob/master/CHANGELOG.md)
- [Commits](https://github.com/PrismJS/prism/compare/v1.26.0...v1.27.0)

---
updated-dependencies:
- dependency-name: prismjs
  dependency-type: indirect
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-25 19:38:41 -08:00
M. J. Fromberger
b848c79971 Revert "Migration of TLA+ files from the spec repo (#8004)" (#8016)
This reverts commit e762dbb603.

These files need a more thorough review before integration.
2022-02-25 16:37:31 -08:00
Sam Kleinman
f25b7ceeb2 consensus: make orchestration more reliable for invalid precommit test (#8013)
Co-authored-by: M. J. Fromberger <fromberger@interchain.io>
2022-02-26 00:21:59 +00:00
Kukovec
e762dbb603 Migration of TLA+ files from the spec repo (#8004) 2022-02-25 16:09:27 -08:00
M. J. Fromberger
cd0472014a Add command-line tool to manually subscribe to an event stream. (#8015)
This tool is an aid to debugging, and demonstrates the API of the eventstream
helper package. It subscribes to the event stream of a running node with the
ADR 075 event log enabled, and writes matching events to stdout as JSON.
2022-02-25 13:23:39 -08:00
M. J. Fromberger
ab32f5a9b6 rpc/client: add eventstream helper (#7987)
This allows the caller to stream events. It handles the bookkeeping for cursors
and pagination, and delivers items to a callback.

Handle missed items by reporting a structured error. The caller can use the
Reset method to "catch up" to head after this happens.

Add a manual test CLI to probe a running node. Requires the node to be
configured with the event log settings.

Add a unit test that scripts input to the stream to exercise it.
2022-02-25 12:37:01 -08:00
Sam Kleinman
a153f82433 p2p: ignore transport close error during cleanup (#8011)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-02-25 14:48:41 -05:00
William Banfield
c80734e5af state: synchronize the ProcessProposal implementation with the latest version of the spec (#7961)
This change implements the spec for `ProcessProposal`. It first calls the Tendermint block validation logic to check that all of the proposed block fields are well formed and do not violate any of the rules for Tendermint to consider the block valid and then passes the validated block the `ProcessProposal`.

This change also adds additional fixtures to test the change. It adds the `baseMock` types that holds a mock as well as a reference to `BaseApplication`. If the function was not setup by the test on the contained mock Application, the type delegates to the `BaseApplication` and returns what `BaseApplication` returns. 

The change also switches the `makeState` helper to take an arg struct so that an ABCI application can be plumbed through when needed.

closes: #7656
2022-02-25 18:56:34 +00:00
Sam Kleinman
89dbebd1c5 p2p: retry failed connections slightly more aggressively (#8010)
* p2p: retry failed connections slightly more aggressively

* fix dial interval test
2022-02-25 18:05:29 +00:00
M. J. Fromberger
af60a9c385 Forward port v0.34.16 changelog to master. (#8008) 2022-02-25 17:04:37 +00:00
Sam Kleinman
c8ae5db50e p2p: relax pong timeout (#8007) 2022-02-25 10:58:29 -05:00
JayT106
49e3688b79 fix syncAny test (#8001)
Co-authored-by: Sam Kleinman <garen@tychoish.com>
2022-02-25 10:33:28 -05:00
Sam Kleinman
c85e3e4ba8 p2p: mconn track last message for pongs (#7995)
* p2p: mconn track last message for pongs

* fix spell

* cr feedback

* test fix part one

* cleanup tests

* fix comment

Co-authored-by: M. J. Fromberger <fromberger@interchain.io>
2022-02-25 15:15:13 +00:00
M. J. Fromberger
8c5e36159e abci: use no-op loggers in the examples (#7996)
This averts a rare but annoying log-after-test race condition.
2022-02-25 14:41:49 +00:00
Sam Kleinman
858d57a984 abci/kvstore: test cleanup improvements (#7991)
Co-authored-by: M. J. Fromberger <fromberger@interchain.io>
2022-02-25 03:12:27 +00:00
M. J. Fromberger
0875074ea2 Add upgrading notes for the new Events RPC interface. (#7993)
Add deprecation logs when websocket is enabled
As promised in ADR 075, this causes the node to log (without error) when
websocket transport is enabled, and also when subscribers connect.
2022-02-24 15:04:55 -08:00
Sam Kleinman
3e2d5db289 abci: remove lock protecting calls to the application interface (#7984)
Closes #7073

As part of the 0.36 cycle we've discussed and decided to remove the mutex in tendermint that protects the ABCI application. First, applications should be able to be responsible for their own concurrency control, and can make more fine-grained decisions about concurrent use than tendermint ever could. Second, I've observed in recent weeks as we've been making this change that the mutex wasn't applied particularly consistently in many cases (e.g. multiple "local" connections to the application had multiple locks, etc.) so this will give more consistent experiences across ABCI execution environments, and simplifies the tendermint ABCI handling code.
2022-02-24 19:53:04 +00:00
M. J. Fromberger
f795d3f360 rpc/client: rewrite the WaitForOneEvent helper (#7986)
Update usage in tests.
2022-02-24 11:21:40 -08:00
Sam Kleinman
06e6d3f2e9 e2e: change ci network configuration (#7988) 2022-02-24 13:57:00 -05:00
Sam Kleinman
680ebc6f8e consensus: TestReactorValidatorSetChanges test fix (#7985) 2022-02-24 12:47:27 -05:00
M. J. Fromberger
211b80a484 rpc/client: add Events method to the client interface (#7982)
- Update documentation to deprecate the old methods.
- Add Events methods to HTTP, WS, and Local clients.
- Add Events method to the light client wrapper.
- Rename legacy events client to SubscriptionClient.
2022-02-24 06:51:14 -08:00
Sam Kleinman
62a1cb8d17 testing: reduce usage of the MustDefaultLogger constructor (#7960)
* testing: reduce usage of the MustDefualtLogger constructor

* Apply suggestions from code review

Co-authored-by: M. J. Fromberger <michael.j.fromberger@gmail.com>

* cleanup tests

Co-authored-by: M. J. Fromberger <michael.j.fromberger@gmail.com>
2022-02-24 02:43:11 +00:00
M. J. Fromberger
a57567ba33 node: hook up eventlog and eventlog metrics (#7981) 2022-02-23 16:37:12 -08:00
M. J. Fromberger
5662bd12a8 rpc: implement the ADR 075 /events method (#7965)
This method implements the eventlog extension interface to expose ABCI metadata
to the log for query processing. Only the types that have ABCI events need to
implement this.

- Add an event log to the environment
- Add a sketch of the handler method
- Add an /events RPCFunc to the route map
- Implement query logic
- Subscribe to pubsub if confingured, handle termination
2022-02-23 15:22:40 -08:00
Sam Kleinman
61a81279bd abci: make tendermint example+test clients manage a mutex (#7978)
This is the first step in removing the mutex from ABCI applications:
making our test applications hold mutexes, which this does, hopefully
with zero impact. If this lands well, then we can explore deleting the
other mutexes (in the ABCI server and the clients.) While this change
is not user impacting at all, removing the other mutexes *will* be. 

In persuit of this, I've changed the KV app somewhat, to put almost
all of the logic in the base application and make the persistent
application mostly be a wrapper on top of that with a different
storage layer.
2022-02-23 22:39:47 +00:00
M. J. Fromberger
f939f962b1 Remove master from versions and copy it from the latest. (#7980) 2022-02-23 13:58:33 -08:00
Sam Kleinman
9968f53c15 p2p: make mconn transport test less flaky (#7973)
The previous implementation of the *test* was flaky, and this irons
out some of those problems. The primary assertion that was failing
(less than 1% of the time) was an error on close that I think we
shouldn't care about.
2022-02-23 19:06:03 +00:00
M. J. Fromberger
80186a9d9c Update OpenAPI docs. (#7974)
* Update OpenAPI docs.

- Add an Events tag for event methods.
- Add schema entries for event request/response types.
- Clarify the documentation for broadcast methods.
- Note that websocket will be deprecated in v0.36.
2022-02-23 06:42:29 -08:00
Sam Kleinman
21461e55a7 e2e(harness): plumb logging instance (#7958)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-02-23 08:11:01 -05:00
Sam Kleinman
2ffb262600 context: cleaning up context dead ends (#7963) 2022-02-22 20:04:16 +00:00
Sam Kleinman
912751cf93 math: remove panics in safe math ops (#7962)
* math: remove panics in safe math ops

* fix docs

* fix lint
2022-02-22 18:34:17 +00:00
M. J. Fromberger
926c469fcc Restore building docs for master on docs.tendermint.com. (#7969)
There are a lot of existing links to the master section of the site, and my
attempts to get a redirector working have so far not succeeded. While it still
makes sense to not publish docs for unreleased code, a 404 is almost certainly
more disruptive than seeing docs for unreleased stuff.

This includes the docs in the build again, but does not add them back to the
selector menu. That allows URLs to resolve but encourages folks to use the
released versions when they have a choice.

I left the redirect for the RPC link in place, since that's still useful.

Updates #7935.
2022-02-22 17:14:40 +00:00
Sam Kleinman
3dc04430c3 cmd/debug: remove global variables and logging (#7957) 2022-02-22 10:13:03 -05:00
M. J. Fromberger
70ee282d9e docs: redirect master links to the latest release version (#7936) 2022-02-22 04:51:02 -08:00
M. J. Fromberger
c88cf0b66c config: add event subscription options and defaults (#7930) 2022-02-22 04:46:27 -08:00
Callum Waters
50de246a2b docs: update repo and spec readme's (#7907) 2022-02-21 20:00:05 +01:00
M. J. Fromberger
705f365bcd rpc: implement the eventlog defined by ADR 075 (#7825)
Implement the basic cursor and eventlog types described in ADR 075.  Handle
encoding and decoding as strings for compatibility with JSON.

- Add unit tests for the required order and synchronization properties.
- Add hooks for metrics, with one value to be expanded later.
- Update ADR 075 to match the specifics of the implementation so far.
2022-02-21 08:54:50 -08:00
M. J. Fromberger
3b20931da3 docs: Pin the RPC docs to v0.35 instead of master (#7909) 2022-02-21 07:46:39 -08:00
M. J. Fromberger
bd6fce13ae Update release instructions for documentation. (#7846)
* Add linkpatch tool to rewrite documentation URLs.
* Update instructions for creating backport branches.

Updates #7675.
2022-02-21 07:26:48 -08:00
M. J. Fromberger
351adf8ddb Remove master from the docs site version config. (#7874) 2022-02-21 06:07:06 -08:00
Jasmina Malicevic
e80541a251 types/events+evidence: emit events + metrics on evidence validation (#7802)
* event: Added Events after evidence validation; evidence: refactored AddEvidence

Added context and Metrics as parameter for the pool constructor

* evidence: pushed event firing into evidence pool and added metrics to represent the size of the evpool

* state: fixed parameters of evpool mock functions

* evidence: added test to confirm events are generated

* Removed obsolete EvidenceEventPublisher interface

* evidence: pool removed error on missing eventbus
2022-02-21 14:45:56 +01:00
JayT106
ce898a738c consensus: HasVoteMessage index boundary check (#7720)
Went through #2871, there are several issues, this PR tries to tackle the `HasVoteMessage` with an invalid validator index sent by a bad peer and it prevents the bad vote goes to the peerMsgQueue.

Future work, check other bad message cases and plumbing the reactor errors with the peer manager and then can disconnect the peer sending the bad messages.
2022-02-21 13:21:24 +00:00
M. J. Fromberger
a185163c57 light: avert a data race (#7888) 2022-02-21 04:54:43 -08:00
M. J. Fromberger
51b93c8606 Re-enable the Markdown link checker. (#7889) 2022-02-21 04:26:23 -08:00
dependabot[bot]
325740a57c build(deps): Bump docker/login-action from 1.12.0 to 1.13.0 (#7890) 2022-02-21 10:41:06 +01:00
Thane Thomson
abdf717761 spec: Minor updates to spec merge PR (#7835)
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Co-authored-by: Callum Waters <cmwaters19@gmail.com>
2022-02-20 11:36:20 -08:00
Sam Kleinman
d65237ff87 logging: allow logging level override (#7873)
I think in the future we should migrate from having our own logging
interface and use our logger directly, which I think would help
obviate this particular problem, but in the mean time, this seems safe.
2022-02-20 16:18:05 +00:00
William Banfield
3401eb2410 types: add default values for the synchrony parameters (#7788)
## Summary

This pull request adds a default set of values to the new Synchrony parameters. These values were chosen by after observation of three live networks: Emoney, Osmosis, and the Cosmos Hub. 

For the default Precision value, `505ms` was selected. The reasoning for this is summarized in https://github.com/tendermint/tendermint/issues/7724

For each observed chain, an experimental Message Delay was collected over a 24 hour period and an average over this period was calculated using this data. Values over 10s were considered outliers and treated separately for the average since the majority of observations were far below 10s. The message delay was calculated both for the quorum and the 'full' prevote. Description of the technique for collecting the experimental values can found in #7202. This value is calculated only using timestamps given by processes on the network, so large variation in values is almost certainly due to clock skew among the validator set.

`12s` is proposed for the default MessageDelay value. This value would easily accomodates all non-outlier values, allowing even E-money's 4.25s value to be valid. This would also allow some validators with skewed clocks to still participate without allowing for huge variation in the timestamps produced by the network. Additionally, for the currently listed use-cases of PBTS, such as unbonding period, and light client trust period, the current bounds for these are in weeks. Adding a few seconds of tolerance by default is therefore unlikely to have serious side-effects.

## Data

### Cosmos Hub
Observation Period: 2022-02-03 20:22-2022-02-04 20:22

Avg Full Prevote Message Delay: 1.27s
Outliers: 11s,13s,50s,106s,144s
Total Outlier Heights: 86

Avg Quorum Prevote Message Delay: .77s
Outliers: 10s,14s,107s,144s
Total Outlier Heights: 617

Total heights: 11528

### Osmosis
Observation Period: 2022-01-29 20:26-2022-01-28 20:26
Avg Quorum Prevote Message Delay: .46s
Outliers: 21s,50s
Total Outlier Heights: 26
NOTE: During the observation period, a 'full' prevote was not observed.

Total heights: 13983

### E-Money
Observation Period: 2022-02-07 04:29-2022-02-08 04:29
Avg Full Prevote Message Delay: 4.25s
Outliers: 12s,15s,39s
Total Outlier Heights: 128

Avg Quorum Prevote Message Delay: .20s
Outliers: 28s
Total Outlier Heights: 15

Total heights: 3791
2022-02-19 19:53:18 +00:00
Sam Kleinman
81bd9ad812 consensus: improve cleanup of wal tests (#7878) 2022-02-19 10:26:31 -08:00
Callum Waters
4425e62e9e statesync: assert app version matches (#7856)
Reinstates: #7463 which was overridden by the following commit
2022-02-19 16:13:16 +00:00
Joe Abbey
c490d3f00a Update configuration.md (#7880)
small typo
2022-02-19 07:53:53 -08:00
yihuang
8a238fdcb4 fix app hash in state rollback (#7837)
When testing rollback feature in the Cosmos SDK, we found that the app hash
in Tendermint after rollback was the value after the latest block, rather than 
before it.

Co-authored-by: Callum Waters <cmwaters19@gmail.com>
2022-02-19 07:40:55 -08:00
Sam Kleinman
abfcd08903 abci/client: remove lingering async client code (#7876)
While I'd hoped to be able to make the socket client less weird, I
think that this is a nice middle ground in terms of improving
readability and removing the vestigal components without breaking
anything or radically changing the underlying assumptions. 

In the future we'd want to have requests be identified by a request
ID, and then we could drop the request tracking logic in the client
entirely, and this is protocol breaking. The alternatives aren't
substantively different than the current implementation.
2022-02-18 23:29:57 +00:00
William Banfield
7f8f1cde8c abci: undo socket buffer limit (#7877)
This change changes the ABCI socket client to allow goroutines to block writing to the internal queue. This has the effect ensuring that callers of the ABCI methods do not error on a full internal queue at the expense of allowing the number of goroutines waiting on this internal queue to grow in an unbounded fashion. This tradeoff seems preferable since it allows callers of the ABCI methods to be certain that a request that was made will reach the application if it is available.

Closes: #7827 

This change was initially implemented here: e13b4386ff and never landed on v0.34, only v0.35+
2022-02-18 22:09:53 +00:00
Sam Kleinman
cc18f87000 mempool: use checktx sync calls (#7868) 2022-02-18 14:17:45 -05:00
William Banfield
165cc29474 consensus: additional timing metrics (#7849)
This change introduces an additional set of metrics aimed at helping operators understand the timing for consensus. 

This change adds the following metrics:

```
# HELP tendermint_consensus_round_duration Time spent in a round
# TYPE tendermint_consensus_round_duration histogram
tendermint_consensus_round_duration_bucket{chain_id="test-chain-IrF74Y",le="0.1"} 29
tendermint_consensus_round_duration_bucket{chain_id="test-chain-IrF74Y",le="0.2682695795279726"} 29
tendermint_consensus_round_duration_bucket{chain_id="test-chain-IrF74Y",le="0.7196856730011522"} 29
tendermint_consensus_round_duration_bucket{chain_id="test-chain-IrF74Y",le="1.9306977288832508"} 29
tendermint_consensus_round_duration_bucket{chain_id="test-chain-IrF74Y",le="5.1794746792312125"} 29
tendermint_consensus_round_duration_bucket{chain_id="test-chain-IrF74Y",le="13.894954943731381"} 29
tendermint_consensus_round_duration_bucket{chain_id="test-chain-IrF74Y",le="37.27593720314942"} 29
tendermint_consensus_round_duration_bucket{chain_id="test-chain-IrF74Y",le="100.00000000000006"} 29
tendermint_consensus_round_duration_bucket{chain_id="test-chain-IrF74Y",le="+Inf"} 29
tendermint_consensus_round_duration_sum{chain_id="test-chain-IrF74Y"} 0.028651869999999996
tendermint_consensus_round_duration_count{chain_id="test-chain-IrF74Y"} 29
```


```
# HELP tendermint_consensus_step_duration Time spent per step.
# TYPE tendermint_consensus_step_duration histogram
tendermint_consensus_step_duration_bucket{chain_id="test-chain-IrF74Y",step="Commit",le="0.1"} 29
tendermint_consensus_step_duration_bucket{chain_id="test-chain-IrF74Y",step="Commit",le="0.2682695795279726"} 29
tendermint_consensus_step_duration_bucket{chain_id="test-chain-IrF74Y",step="Commit",le="0.7196856730011522"} 29
tendermint_consensus_step_duration_bucket{chain_id="test-chain-IrF74Y",step="Commit",le="1.9306977288832508"} 29
tendermint_consensus_step_duration_bucket{chain_id="test-chain-IrF74Y",step="Commit",le="5.1794746792312125"} 29
tendermint_consensus_step_duration_bucket{chain_id="test-chain-IrF74Y",step="Commit",le="13.894954943731381"} 29
tendermint_consensus_step_duration_bucket{chain_id="test-chain-IrF74Y",step="Commit",le="37.27593720314942"} 29
tendermint_consensus_step_duration_bucket{chain_id="test-chain-IrF74Y",step="Commit",le="100.00000000000006"} 29
tendermint_consensus_step_duration_bucket{chain_id="test-chain-IrF74Y",step="Commit",le="+Inf"} 29
tendermint_consensus_step_duration_sum{chain_id="test-chain-IrF74Y",step="Commit"} 0.26650875
tendermint_consensus_step_duration_count{chain_id="test-chain-IrF74Y",step="Commit"} 29
tendermint_consensus_step_duration_bucket{chain_id="test-chain-IrF74Y",step="NewHeight",le="0.1"} 0
tendermint_consensus_step_duration_bucket{chain_id="test-chain-IrF74Y",step="NewHeight",le="0.2682695795279726"} 0
tendermint_consensus_step_duration_bucket{chain_id="test-chain-IrF74Y",step="NewHeight",le="0.7196856730011522"} 0
tendermint_consensus_step_duration_bucket{chain_id="test-chain-IrF74Y",step="NewHeight",le="1.9306977288832508"} 28
tendermint_consensus_step_duration_bucket{chain_id="test-chain-IrF74Y",step="NewHeight",le="5.1794746792312125"} 28
tendermint_consensus_step_duration_bucket{chain_id="test-chain-IrF74Y",step="NewHeight",le="13.894954943731381"} 28
tendermint_consensus_step_duration_bucket{chain_id="test-chain-IrF74Y",step="NewHeight",le="37.27593720314942"} 28
tendermint_consensus_step_duration_bucket{chain_id="test-chain-IrF74Y",step="NewHeight",le="100.00000000000006"} 28
tendermint_consensus_step_duration_bucket{chain_id="test-chain-IrF74Y",step="NewHeight",le="+Inf"} 28
tendermint_consensus_step_duration_sum{chain_id="test-chain-IrF74Y",step="NewHeight"} 27.773921702
tendermint_consensus_step_duration_count{chain_id="test-chain-IrF74Y",step="NewHeight"} 28
tendermint_consensus_step_duration_bucket{chain_id="test-chain-IrF74Y",step="NewRound",le="0.1"} 29
tendermint_consensus_step_duration_bucket{chain_id="test-chain-IrF74Y",step="NewRound",le="0.2682695795279726"} 29
tendermint_consensus_step_duration_bucket{chain_id="test-chain-IrF74Y",step="NewRound",le="0.7196856730011522"} 29
tendermint_consensus_step_duration_bucket{chain_id="test-chain-IrF74Y",step="NewRound",le="1.9306977288832508"} 29
tendermint_consensus_step_duration_bucket{chain_id="test-chain-IrF74Y",step="NewRound",le="5.1794746792312125"} 29
tendermint_consensus_step_duration_bucket{chain_id="test-chain-IrF74Y",step="NewRound",le="13.894954943731381"} 29
tendermint_consensus_step_duration_bucket{chain_id="test-chain-IrF74Y",step="NewRound",le="37.27593720314942"} 29
tendermint_consensus_step_duration_bucket{chain_id="test-chain-IrF74Y",step="NewRound",le="100.00000000000006"} 29
tendermint_consensus_step_duration_bucket{chain_id="test-chain-IrF74Y",step="NewRound",le="+Inf"} 29
tendermint_consensus_step_duration_sum{chain_id="test-chain-IrF74Y",step="NewRound"} 0.168961052
tendermint_consensus_step_duration_count{chain_id="test-chain-IrF74Y",step="NewRound"} 29
tendermint_consensus_step_duration_bucket{chain_id="test-chain-IrF74Y",step="Precommit",le="0.1"} 29
tendermint_consensus_step_duration_bucket{chain_id="test-chain-IrF74Y",step="Precommit",le="0.2682695795279726"} 29
tendermint_consensus_step_duration_bucket{chain_id="test-chain-IrF74Y",step="Precommit",le="0.7196856730011522"} 29
tendermint_consensus_step_duration_bucket{chain_id="test-chain-IrF74Y",step="Precommit",le="1.9306977288832508"} 29
tendermint_consensus_step_duration_bucket{chain_id="test-chain-IrF74Y",step="Precommit",le="5.1794746792312125"} 29
tendermint_consensus_step_duration_bucket{chain_id="test-chain-IrF74Y",step="Precommit",le="13.894954943731381"} 29
tendermint_consensus_step_duration_bucket{chain_id="test-chain-IrF74Y",step="Precommit",le="37.27593720314942"} 29
tendermint_consensus_step_duration_bucket{chain_id="test-chain-IrF74Y",step="Precommit",le="100.00000000000006"} 29
tendermint_consensus_step_duration_bucket{chain_id="test-chain-IrF74Y",step="Precommit",le="+Inf"} 29
tendermint_consensus_step_duration_sum{chain_id="test-chain-IrF74Y",step="Precommit"} 0.06414115999999999
tendermint_consensus_step_duration_count{chain_id="test-chain-IrF74Y",step="Precommit"} 29
tendermint_consensus_step_duration_bucket{chain_id="test-chain-IrF74Y",step="Prevote",le="0.1"} 29
tendermint_consensus_step_duration_bucket{chain_id="test-chain-IrF74Y",step="Prevote",le="0.2682695795279726"} 29
tendermint_consensus_step_duration_bucket{chain_id="test-chain-IrF74Y",step="Prevote",le="0.7196856730011522"} 29
tendermint_consensus_step_duration_bucket{chain_id="test-chain-IrF74Y",step="Prevote",le="1.9306977288832508"} 29
tendermint_consensus_step_duration_bucket{chain_id="test-chain-IrF74Y",step="Prevote",le="5.1794746792312125"} 29
tendermint_consensus_step_duration_bucket{chain_id="test-chain-IrF74Y",step="Prevote",le="13.894954943731381"} 29
tendermint_consensus_step_duration_bucket{chain_id="test-chain-IrF74Y",step="Prevote",le="37.27593720314942"} 29
tendermint_consensus_step_duration_bucket{chain_id="test-chain-IrF74Y",step="Prevote",le="100.00000000000006"} 29
tendermint_consensus_step_duration_bucket{chain_id="test-chain-IrF74Y",step="Prevote",le="+Inf"} 29
tendermint_consensus_step_duration_sum{chain_id="test-chain-IrF74Y",step="Prevote"} 0.177714525
tendermint_consensus_step_duration_count{chain_id="test-chain-IrF74Y",step="Prevote"} 29
tendermint_consensus_step_duration_bucket{chain_id="test-chain-IrF74Y",step="Propose",le="0.1"} 29
tendermint_consensus_step_duration_bucket{chain_id="test-chain-IrF74Y",step="Propose",le="0.2682695795279726"} 29
tendermint_consensus_step_duration_bucket{chain_id="test-chain-IrF74Y",step="Propose",le="0.7196856730011522"} 29
tendermint_consensus_step_duration_bucket{chain_id="test-chain-IrF74Y",step="Propose",le="1.9306977288832508"} 29
tendermint_consensus_step_duration_bucket{chain_id="test-chain-IrF74Y",step="Propose",le="5.1794746792312125"} 29
tendermint_consensus_step_duration_bucket{chain_id="test-chain-IrF74Y",step="Propose",le="13.894954943731381"} 29
tendermint_consensus_step_duration_bucket{chain_id="test-chain-IrF74Y",step="Propose",le="37.27593720314942"} 29
tendermint_consensus_step_duration_bucket{chain_id="test-chain-IrF74Y",step="Propose",le="100.00000000000006"} 29
tendermint_consensus_step_duration_bucket{chain_id="test-chain-IrF74Y",step="Propose",le="+Inf"} 29
tendermint_consensus_step_duration_sum{chain_id="test-chain-IrF74Y",step="Propose"} 0.221851927
tendermint_consensus_step_duration_count{chain_id="test-chain-IrF74Y",step="Propose"} 29
```

```
# HELP tendermint_consensus_block_gossip_receive_time Difference in seconds between when the validator learns of a new blockand when the validator receives the last piece of the block.
# TYPE tendermint_consensus_block_gossip_receive_time histogram
tendermint_consensus_block_gossip_receive_time_bucket{chain_id="test-chain-IrF74Y",le="0.1"} 29
tendermint_consensus_block_gossip_receive_time_bucket{chain_id="test-chain-IrF74Y",le="0.2682695795279726"} 29
tendermint_consensus_block_gossip_receive_time_bucket{chain_id="test-chain-IrF74Y",le="0.7196856730011522"} 29
tendermint_consensus_block_gossip_receive_time_bucket{chain_id="test-chain-IrF74Y",le="1.9306977288832508"} 29
tendermint_consensus_block_gossip_receive_time_bucket{chain_id="test-chain-IrF74Y",le="5.1794746792312125"} 29
tendermint_consensus_block_gossip_receive_time_bucket{chain_id="test-chain-IrF74Y",le="13.894954943731381"} 29
tendermint_consensus_block_gossip_receive_time_bucket{chain_id="test-chain-IrF74Y",le="37.27593720314942"} 29
tendermint_consensus_block_gossip_receive_time_bucket{chain_id="test-chain-IrF74Y",le="100.00000000000006"} 29
tendermint_consensus_block_gossip_receive_time_bucket{chain_id="test-chain-IrF74Y",le="+Inf"} 29
tendermint_consensus_block_gossip_receive_time_sum{chain_id="test-chain-IrF74Y"} 0.06380
```

```
# HELP tendermint_consensus_block_gossip_parts_received Number of block parts received by the node, labeled by whether thepart was relevant to the block the node was currently gathering or not
# TYPE tendermint_consensus_block_gossip_parts_received counter
tendermint_consensus_block_gossip_parts_received{chain_id="test-chain-IrF74Y",matches_current="true"} 29
```
2022-02-18 18:24:25 +00:00
Sam Kleinman
bb9fa171d6 abci/client: make flush operation sync (#7857)
This follows along in the spirit of #7845 but is orthogonal to
removing `CheckTxAsync` (which will come after the previous commit
lands,) so I thought I'd get it out there earlier.
2022-02-18 17:42:23 +00:00
Wael
a7224fd640 Update unsafe-reset-all command to match release v35 (#7869) 2022-02-18 07:48:21 -08:00
M. J. Fromberger
ac9197ed45 docs: fix misspelled file name (#7863)
The link checker complained the ToC entry didn't match the file name.
Unusually, turns out this was a typo in the file name, not the ToC.
2022-02-18 15:10:14 +00:00
Sam Kleinman
c2cce2a696 abci/client: remove client-level callback (#7845)
* abci/client: remove client-level callback

* ditch multi conn con

* fix lint

* fix teset
2022-02-18 14:56:35 +00:00
M. J. Fromberger
75dafaeacc docs: remove unnecessary os.Exit calls at the end of main (#7861)
The main function defers some things that do not run in the "normal" exit case
because we call os.Exit(0) explicitly. Since falling off the end of main does
the same thing, and also permits defers to run, let's do that.
2022-02-18 06:11:30 -08:00
Sam Kleinman
6280f45460 clist: remove unused waitgroup from clist implementation (#7843) 2022-02-18 13:53:33 +00:00
Sam Kleinman
be83ec6664 p2p: pass start time to flowrate and cleanup constructors (#7838)
After poking around #7828, I saw the oppertunity for this cleanup,
which I think is both reasonable on its own, and quite low impact, and
removes the math around process start time.
2022-02-18 13:30:19 +00:00
dependabot[bot]
cb26c5238a build(deps): Bump github.com/golangci/golangci-lint from 1.44.0 to 1.44.2 (#7854)
Bumps [github.com/golangci/golangci-lint](https://github.com/golangci/golangci-lint) from 1.44.0 to 1.44.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/golangci/golangci-lint/releases">github.com/golangci/golangci-lint's releases</a>.</em></p>
<blockquote>
<h2>v1.44.2</h2>
<h2>Changelog</h2>
<ul>
<li>cad735b2 build(deps): bump github.com/ultraware/whitespace from 0.0.4 to 0.0.5 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2580">#2580</a>)</li>
<li>eeda375f bump github.com/daixiang0/gci to HEAD (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2593">#2593</a>)</li>
<li>4f20929c gci: restore defaults for sections (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2589">#2589</a>)</li>
</ul>
<h2>v1.44.1</h2>
<h2>Changelog</h2>
<ul>
<li>bf442005 Revert &quot;build(deps): bump github.com/sylvia7788/contextcheck from 1.0.4 to 1.0.5 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2534">#2534</a>)&quot; (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2538">#2538</a>)</li>
<li>39a76b86 build(deps): bump ajv from 6.12.2 to 6.12.6 in /.github/peril (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2564">#2564</a>)</li>
<li>9d047929 build(deps): bump github.com/breml/bidichk from 0.2.1 to 0.2.2 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2572">#2572</a>)</li>
<li>18c25f79 build(deps): bump github.com/breml/errchkjson from 0.2.1 to 0.2.2 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2559">#2559</a>)</li>
<li>af6159c8 build(deps): bump github.com/breml/errchkjson from 0.2.2 to 0.2.3 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2570">#2570</a>)</li>
<li>b221c97b build(deps): bump github.com/kulti/thelper from 0.5.0 to 0.5.1 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2535">#2535</a>)</li>
<li>015c8e5b build(deps): bump github.com/ldez/tagliatelle from 0.3.0 to 0.3.1 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2557">#2557</a>)</li>
<li>331073af build(deps): bump github.com/quasilyte/go-ruleguard/dsl (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2556">#2556</a>)</li>
<li>19e87134 build(deps): bump github.com/quasilyte/go-ruleguard/dsl (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2571">#2571</a>)</li>
<li>717b99c0 build(deps): bump github.com/shirou/gopsutil/v3 from 3.21.12 to 3.22.1 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2558">#2558</a>)</li>
<li>181c61f8 build(deps): bump github.com/sylvia7788/contextcheck from 1.0.4 to 1.0.5 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2534">#2534</a>)</li>
<li>f7d2406d bump github.com/daixiang0/gci from 0.2.9 to 0.3.0 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2532">#2532</a>)</li>
<li>05e7d32e bump github.com/mgechev/revive from v1.1.3 to v1.1.4 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2576">#2576</a>)</li>
<li>8d3c6e12 bump varnamelen from v0.5.0 to v0.6.0 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2551">#2551</a>)</li>
<li>07f9b12e docs(decorder): fix <code>disable-init-func-first-check: false</code> elaboration (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2560">#2560</a>)</li>
<li>3d733a2a fix debug output (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2531">#2531</a>)</li>
<li>9a70e9a4 gci: fix configuration naming (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2578">#2578</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/golangci/golangci-lint/blob/master/CHANGELOG.md">github.com/golangci/golangci-lint's changelog</a>.</em></p>
<blockquote>
<h3>v1.44.2</h3>
<ol>
<li>updated linters:
<ul>
<li><code>gci</code>: bump to HEAD</li>
<li><code>gci</code>: restore defaults for sections</li>
<li><code>whitespace</code>: from 0.0.4 to 0.0.5</li>
</ul>
</li>
<li>documentation:
<ul>
<li>add link to configuration in the linters list</li>
</ul>
</li>
</ol>
<h3>v1.44.1</h3>
<ol>
<li>updated linters:
<ul>
<li><code>bidichk</code>: from 0.2.1 to 0.2.2</li>
<li><code>errchkjson</code>: from 0.2.1 to 0.2.3</li>
<li><code>thelper</code>: from 0.5.0 to 0.5.1</li>
<li><code>tagliatelle</code>: from 0.3.0 to 0.3.1</li>
<li><code>gopsutil</code>: from 3.21.12 to 3.22.1</li>
<li><code>gci</code>: from 0.2.9 to 0.3.0</li>
<li><code>revive</code>: from v1.1.3 to v1.1.4</li>
<li><code>varnamelen</code>: from v0.5.0 to v0.6.0</li>
</ul>
</li>
<li>documentation:
<ul>
<li>linters: improve configuration pages</li>
<li><code>decorder</code>: fix <code>disable-init-func-first-check: false</code> elaboration</li>
</ul>
</li>
<li>misc:
<ul>
<li>fix debug output</li>
</ul>
</li>
</ol>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="d58dbde584"><code>d58dbde</code></a> build(deps): bump url-parse from 1.5.1 to 1.5.7 in /docs (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2590">#2590</a>)</li>
<li><a href="6cecd4fd39"><code>6cecd4f</code></a> build(deps): bump gatsby-plugin-manifest from 4.6.0 to 4.7.0 in /docs (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2586">#2586</a>)</li>
<li><a href="4274864670"><code>4274864</code></a> build(deps): bump gatsby-remark-images from 6.6.0 to 6.7.0 in /docs (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2582">#2582</a>)</li>
<li><a href="58b188980b"><code>58b1889</code></a> build(deps): bump gatsby-transformer-yaml from 4.6.0 to 4.7.0 in /docs (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2583">#2583</a>)</li>
<li><a href="eeda375f8e"><code>eeda375</code></a> bump github.com/daixiang0/gci to HEAD (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2593">#2593</a>)</li>
<li><a href="4f20929c4b"><code>4f20929</code></a> gci: restore defaults for sections (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2589">#2589</a>)</li>
<li><a href="cad735b2ab"><code>cad735b</code></a> build(deps): bump github.com/ultraware/whitespace from 0.0.4 to 0.0.5 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2580">#2580</a>)</li>
<li><a href="d7e110ebbd"><code>d7e110e</code></a> docs: add link to configuration in the linters list (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2587">#2587</a>)</li>
<li><a href="949b059028"><code>949b059</code></a> build(deps): bump gatsby-source-filesystem from 4.6.0 to 4.7.0 in /docs (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2581">#2581</a>)</li>
<li><a href="ed93066d16"><code>ed93066</code></a> docs: Update documentation and assets (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2579">#2579</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/golangci/golangci-lint/compare/v1.44.0...v1.44.2">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/golangci/golangci-lint&package-manager=go_modules&previous-version=1.44.0&new-version=1.44.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2022-02-18 13:09:16 +00:00
dependabot[bot]
e439cf3ba2 build(deps): Bump url-parse from 1.5.4 to 1.5.7 in /docs (#7855) 2022-02-18 13:54:05 +01:00
M. J. Fromberger
f9e0f77af3 docs: Update spec links to point to tendermint/tendermint (#7851) 2022-02-18 04:40:32 -08:00
M. J. Fromberger
2183d90d05 docs: fix broken markdown links (#7847)
For most cases I was able to find a new target. In one case the branch was
deleted, so I removed the link.
2022-02-17 14:59:12 -08:00
Sam Kleinman
d187962ec0 blocksync: shutdown cleanup (#7840)
Now that shutdown is handled by contexts in most cases, I think it's
fair to cleanup the way this reactor shuts down. Additionaly there
were a few cases where the `blockSyncOutBridgeCh` was misshandled and
could have lead to a deadlock which I observed in some tests
2022-02-17 20:42:11 +00:00
M. J. Fromberger
9e69615451 consensus: start the timeout ticker before replay (#7844) 2022-02-17 12:18:19 -08:00
Sam Kleinman
f6569b5dcd abci/client: remove waitgroup for requests (#7842)
* abci/client: remove awkward waitgroup

* elide done
2022-02-17 18:56:11 +00:00
M. J. Fromberger
f92289d5e8 RFC 012: Event Indexing Revisited (#7784)
The original Tendermint implementation provided a fixed, built-in event
indexer, but users would like to plug in different indexing backends.  Although
ADR-065 was a good first step toward customization of indexing, its
implementation model does not satisfy all the user requirements.  Moreover,
this approach leaves some existing technical issues with indexing unsolved.

This RFC documents these concerns, and discusses some potential approaches to
solving them.  It does _not_ propose a specific technical decision. It is meant
to unify and focus some of the disparate discussions of the topic.
2022-02-17 09:30:02 -08:00
Sam Kleinman
28d34d635c service: change stop interface (#7816) 2022-02-17 11:23:32 -05:00
M. J. Fromberger
38e29590ff docs: rename RFC 008 (#7841)
While the name including an apostrophe is perfectly legal, it turns out to
confuse some tools that don't escape things properly. Rename to remove the
apostrophe rather than fight the world.

Fixes #7836.
2022-02-17 16:07:14 +00:00
Sam Kleinman
c928818db9 abci/client: remove vestigially captured context (#7839) 2022-02-17 10:40:35 -05:00
Sam Kleinman
e0d44a650e node: clarify unneccessary logic in seed constructor (#7818) 2022-02-17 08:56:55 -05:00
Sam Kleinman
d72939fe36 statesync: relax timing (#7819) 2022-02-17 08:23:27 -05:00
Sam Kleinman
cbb2c1d3bd node: allow orderly shutdown if context is canceled and gensis is in the future (#7817) 2022-02-17 08:07:44 -05:00
Callum Waters
94b409e407 spec: merge spec repo into tendermint repo (#7804) 2022-02-17 13:51:18 +01:00
Callum Waters
c763f8ef59 Merge branch 'master' into callum/merge-spec 2022-02-17 13:05:13 +01:00
Callum Waters
e81b0e290e spec: merge spec repo into tendermint repo (#7804) 2022-02-17 13:02:48 +01:00
M. J. Fromberger
cdc4c31e88 Fix broken links in ADR 071. (#7834) 2022-02-17 09:43:06 +01:00
dependabot[bot]
6638db2473 build(deps): Bump github.com/gorilla/websocket from 1.4.2 to 1.5.0 (#7829)
Bumps [github.com/gorilla/websocket](https://github.com/gorilla/websocket) from 1.4.2 to 1.5.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/gorilla/websocket/releases">github.com/gorilla/websocket's releases</a>.</em></p>
<blockquote>
<p>Minor new features and maintenance update</p>
<h2>CHANGELOG</h2>
<ul>
<li>Dialer: add optional method NetDialTLSContext (<a href="https://github-redirect.dependabot.com/gorilla/websocket/issues/746">#746</a>) <a href="https://github.com/lluiscampos"><code>@​lluiscampos</code></a></li>
<li>Update README (<a href="https://github-redirect.dependabot.com/gorilla/websocket/issues/757">#757</a>) <a href="https://github.com/garyburd"><code>@​garyburd</code></a></li>
<li>Remove support for Go 1.8 (<a href="https://github-redirect.dependabot.com/gorilla/websocket/issues/755">#755</a>) <a href="https://github.com/garyburd"><code>@​garyburd</code></a></li>
<li>Improve protocol error messages (<a href="https://github-redirect.dependabot.com/gorilla/websocket/issues/754">#754</a>) <a href="https://github.com/garyburd"><code>@​garyburd</code></a></li>
<li>Update autobahn example (<a href="https://github-redirect.dependabot.com/gorilla/websocket/issues/753">#753</a>) <a href="https://github.com/garyburd"><code>@​garyburd</code></a></li>
<li>Fix broadcast benchmarks (<a href="https://github-redirect.dependabot.com/gorilla/websocket/issues/542">#542</a>) <a href="https://github.com/FZambia"><code>@​FZambia</code></a></li>
<li>Use context.Context in TLS handshake (<a href="https://github-redirect.dependabot.com/gorilla/websocket/issues/751">#751</a>) <a href="https://github.com/garyburd"><code>@​garyburd</code></a></li>
<li>Modify http Method String Literal to Variable (<a href="https://github-redirect.dependabot.com/gorilla/websocket/issues/728">#728</a>) <a href="https://github.com/thak1411"><code>@​thak1411</code></a></li>
<li>Update to match gofmt 1.17 (<a href="https://github-redirect.dependabot.com/gorilla/websocket/issues/750">#750</a>) <a href="https://github.com/garyburd"><code>@​garyburd</code></a></li>
<li>Document the allowed concurrency on Upgrader and Dialer (<a href="https://github-redirect.dependabot.com/gorilla/websocket/issues/636">#636</a>) <a href="https://github.com/ghost"><code>@​ghost</code></a></li>
<li>improve echo example (<a href="https://github-redirect.dependabot.com/gorilla/websocket/issues/671">#671</a>) <a href="https://github.com/hellflame"><code>@​hellflame</code></a></li>
<li>build: use build matrix; drop Go &lt;= 1.10 (<a href="https://github-redirect.dependabot.com/gorilla/websocket/issues/629">#629</a>) <a href="https://github.com/elithrar"><code>@​elithrar</code></a></li>
<li>Fix Docs w.r.t. setting subprotocols (<a href="https://github-redirect.dependabot.com/gorilla/websocket/issues/627">#627</a>) <a href="https://github.com/elithrar"><code>@​elithrar</code></a></li>
<li>Fix how the client checks for presence of Upgrade: websocket, Connection: upgrade (<a href="https://github-redirect.dependabot.com/gorilla/websocket/issues/604">#604</a>) <a href="https://github.com/bluetech"><code>@​bluetech</code></a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="9111bb834a"><code>9111bb8</code></a> Dialer: add optional method NetDialTLSContext (<a href="https://github-redirect.dependabot.com/gorilla/websocket/issues/746">#746</a>)</li>
<li><a href="2f25f7843d"><code>2f25f78</code></a> Update README (<a href="https://github-redirect.dependabot.com/gorilla/websocket/issues/757">#757</a>)</li>
<li><a href="4fad403619"><code>4fad403</code></a> Remove support for Go 1.8</li>
<li><a href="f0643a3a18"><code>f0643a3</code></a> Improve protocol error messages</li>
<li><a href="2d6ee4c55c"><code>2d6ee4c</code></a> Update autobahn example</li>
<li><a href="beca1d3940"><code>beca1d3</code></a> Fix broadcast benchmarks (<a href="https://github-redirect.dependabot.com/gorilla/websocket/issues/542">#542</a>)</li>
<li><a href="bcef8431c9"><code>bcef843</code></a> Use context.Context in TLS handshake (<a href="https://github-redirect.dependabot.com/gorilla/websocket/issues/751">#751</a>)</li>
<li><a href="2c89656910"><code>2c89656</code></a> Modify http Method String Literal to Variable (<a href="https://github-redirect.dependabot.com/gorilla/websocket/issues/728">#728</a>)</li>
<li><a href="1905f7e442"><code>1905f7e</code></a> Update source to match output from gofmt 1.17</li>
<li><a href="b4b5d887ad"><code>b4b5d88</code></a> Document the allowed concurrency on Upgrader and Dialer (<a href="https://github-redirect.dependabot.com/gorilla/websocket/issues/636">#636</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/gorilla/websocket/compare/v1.4.2...v1.5.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/gorilla/websocket&package-manager=go_modules&previous-version=1.4.2&new-version=1.5.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2022-02-16 18:40:44 +00:00
Marko
56ee72424f remove libsecp256k1 build tag (#7823)
We no longer use cgo for anything in this package.
Consolidate the non-cgo code with the rest of the library.
2022-02-15 11:06:18 -08:00
Sergio Mena
60f09840dd abci: PrepareProposal-VoteExtension integration [2nd try] (#7821)
* PrepareProposal-VoteExtension integration (#6915)

* make proto-gen

* Fix protobuf crash in e2e nightly tests

* Update types/vote.go

Co-authored-by: M. J. Fromberger <fromberger@interchain.io>

* Addressed @creachadair's comments

Co-authored-by: mconcat <monoidconcat@gmail.com>
Co-authored-by: M. J. Fromberger <fromberger@interchain.io>
2022-02-15 18:16:11 +01:00
M. J. Fromberger
44d9e9917c pubsub: check for termination in UnsubscribeAll (#7820)
This check was correctly handled in Unsubscribe, but not UnsubscribeAll.
2022-02-14 15:34:35 -08:00
Sergio Mena
d3548eb706 Completed the existing FinalizeBlock PR and rebased to master (#7798)
* Rebased and git-squashed the commits in PR #6546

migrate abci to finalizeBlock

work on abci, proxy and mempool

abciresponse, blok events, indexer, some tests

fix some tests

fix errors

fix errors in abci

fix tests amd errors

* Fixes after rebasing PR#6546

* Restored height to RequestFinalizeBlock & other

* Fixed more UTs

* Fixed kvstore

* More UT fixes

* last TC fixed

* make format

* Update internal/consensus/mempool_test.go

Co-authored-by: William Banfield <4561443+williambanfield@users.noreply.github.com>

* Addressed @williambanfield's comments

* Fixed UTs

* Addressed last comments from @williambanfield

* make format

Co-authored-by: marbar3778 <marbar3778@yahoo.com>
Co-authored-by: William Banfield <4561443+williambanfield@users.noreply.github.com>
2022-02-14 23:41:28 +01:00
M. J. Fromberger
7e09c2ef43 Clean up temp files more thoroughly after testing. (#7815)
Our test cases spew a lot of files and directories around $TMPDIR.  Make more
thorough use of the testing package's TempDir methods to ensure these are
cleaned up.

In a few cases, this required plumbing test contexts through existing helper
code. In a couple places an explicit path was required, to work around cases
where we do global setup during a TestMain function. Those cases probably
deserve more thorough cleansing (preferably with fire), but for now I have just
worked around it to keep focused on the cleanup.
2022-02-14 06:32:07 -08:00
Sam Kleinman
824960c565 libs/service: regularize Stop semantics and concurrency primitives (#7809) 2022-02-14 08:28:29 -05:00
M. J. Fromberger
73f605af3f indexer: skip Docker tests when Docker is not available (#7814)
To simplify local testing, do not report failures for tests that require Docker
when Docker is not avaliable. Instead, log a warning and skip the tests.
This has no effect in CI, where Docker is installed.
2022-02-14 01:46:16 -08:00
Callum Waters
9b724f7a6c github: update e2e workflows (#7803) 2022-02-14 10:03:04 +01:00
M. J. Fromberger
2f9355c579 docs: fix ToC file extension for RFC 004. (#7813) 2022-02-13 17:59:33 +00:00
JayT106
58d8bad99a mempool: fix benchmark CheckTx for hitting the GetEvictableTxs call (#7796)
Based on the discussion in #7723, make the CheckTx benchmark exercise 
GetEvictableTxs which is one of the critical paths in CheckTx.

After profiling the test, the sorting will occupy 90% of the CPU time in CheckTx.
In the test it doesn't count the influence of the preCheck, postCheck, and 
CheckTxAsync when the mempool is full.
2022-02-11 21:43:38 -08:00
M. J. Fromberger
ca6163a3ec Silence a staticcheck warning. (#7811)
There was a nolint directive on this deprecated import, which golangci-lint
complains about being unnecessary. However, removing it angers staticcheck,
which enforces deprecation warnings.

Use the right syntax to make both equally unhappy.
2022-02-11 21:48:40 +00:00
M. J. Fromberger
01262b8ca9 rpc: remove unused latency metric (#7810)
We have this one solitary metric from the go-metrics package.  In principle
this statistic could be useful, but the way we have it hooked up, nothing can
observe the value: We don't export it, we don't log it, and it does not auto
publish anywhere.

Given that this state of affairs has not changed since the metric was first
added in 2017 (c08618f), I think we can safely discard it. No one is now or has
ever gotten any data out of this metric.
2022-02-11 13:19:56 -08:00
William Banfield
0dbd38d4d9 RFC: add delete gas rfc (#7777)
This RFC attempts to explore the requirements for deleting the notion of Gas from Tendermint while allowing applications that need such functionality to build it.
2022-02-11 20:24:08 +00:00
Sam Kleinman
dbb7d6ecdd sync+p2p: remove closer (#7805) 2022-02-11 15:12:25 -05:00
Sam Kleinman
9e59fc6924 libs/cli: clean up package (#7806) 2022-02-11 11:30:16 -05:00
Sam Kleinman
662c0aac9e libs/strings: cleanup string helper function package (#7808) 2022-02-11 10:59:55 -05:00
Sam Kleinman
1fe1b6c032 libs/events: remove unused event cache (#7807) 2022-02-11 09:48:37 -05:00
Callum Waters
7fb4e04b02 Merge branch 'master' of github.com:tendermint/spec into callum/merge-spec 2022-02-11 14:10:50 +01:00
M. J. Fromberger
4ba5a053de rpc: allow GET parameters that support encoding.TextUnmarshaler (#7800)
Extend the decoding rules for URL query parameters so that if the target type
implements encoding.TextUnmarshaler, the decoder will use it.

This is a non-breaking change.
2022-02-10 18:32:18 -08:00
M. J. Fromberger
ef1cc5b516 docs: fix RPC output examples for GET queries (#7799)
Remove JSON-RPC wrappers from GET output, since they are no longer printed.
Also format examples with jq so they look a little neater.

Fixes #7779.

Co-authored-by: William Banfield <4561443+williambanfield@users.noreply.github.com>
2022-02-10 15:49:32 -08:00
Sam Kleinman
7885839b75 mempool: remove duplicate tx message from reactor logs (#7795) 2022-02-10 12:02:26 -05:00
Sam Kleinman
81dcc8d1b4 mempool+evidence: simplify cleanup (#7794) 2022-02-10 07:29:54 -05:00
Sam Kleinman
eed617c2d9 consensus: refactor operations in consensus queryMaj23Routine (#7791) 2022-02-09 14:47:50 -05:00
Sam Kleinman
c555226d2b consensus: tie peer threads to peer lifecylce context (#7792) 2022-02-09 12:01:12 -05:00
William Banfield
860f78f000 add proposer address to the message delay metrics (#7790) 2022-02-09 10:52:14 -05:00
M. J. Fromberger
205bfca66f types: add string format to 64-bit integer JSON fields (#7787)
This picks up a few remaining cases that I missed during my previous round of
adding these tags.
2022-02-09 13:34:23 +00:00
Anca Zamfir
27ccf3b590 Don't allow duplicates for light client providers (#7781)
* Allow for zero witness providers

* Verify provider duplicates, fix tests

* Add duplicate provider ID to the error

* Return error on attempt to remove last witness

* Verify duplicates when restoring from store
2022-02-08 22:09:10 +01:00
Sam Kleinman
fd50d90b70 light: remove legacy timeout scheme (#7776) 2022-02-08 12:26:24 -05:00
Sergio Mena
27297a447c Rebased to master the existing ProcessProposal PR (#7752)
* Rebased and git-squashed the commits in PR #7091

  - add processproposal proto/boilerplate/logic

  - mockery

  - gofmt

  - fix test

  - gofmt

  - move UNKNOWN response behaviour to reject

* Fixed build of some UTs

* Addressed William's comment on context

* Adapted TestProcessProposal

* BaseApp needs to ACCEPT vote extensions by default

* Added missing ProcessProposal to socket_server.go

* Re-renamed TwoThirdPrevote... to Valid...

* Addressed William's comment on ProcessProposal error

* Addressed Callum's comments

* fmt

Co-authored-by: mconcat <monoidconcat@gmail.com>
2022-02-08 17:32:17 +01:00
Callum Waters
f4e91c2aa8 roadmap: update to better reflect v0.36 changes (#7774) 2022-02-08 09:29:26 +01:00
William Banfield
e544709459 ADR: synchronize PBTS ADR with spec (#7764)
closes: #7758 

This change performs the following:
* Removes the description of the non-proposers waiting
* Removes descriptions of the `Accuracy` parameter that no longer exists
* Corrects the inequality to properly reflect the `timely` check.
* Renames the consensus params to `SynchronyParams`
* Minor cosmetic fixes.
2022-02-07 21:09:07 +00:00
Simon Kirillov
1fbe56da0c Fix issue 7782 (#7783)
Co-authored-by: Simon Kirillov <skirillov@wallarm.com>
Co-authored-by: Sam Kleinman <garen@tychoish.com>
2022-02-07 13:05:31 -05:00
Jasmina Malicevic
cd875c8a2c types: remove nested evidence field from block (#7765)
* types: replaced EvidenceData in block structure with EvidenceList

* types: introduced toProto, fromProto functions to EvidenceList

* updated Changelog

* Removed comments from tests
2022-02-07 13:57:52 +01:00
dependabot[bot]
a9fa2ac5f9 build(deps): Bump docker/build-push-action from 2.8.0 to 2.9.0 (#7780) 2022-02-07 11:07:28 +01:00
Sam Kleinman
7d5be3e5da adr: merge tendermint/spec repository into tendermint/tendermint (#7775) 2022-02-04 17:02:45 -05:00
Sergio Mena
4566f1e302 Removed protobufs related to vote extensions 2022-02-04 20:19:00 +01:00
Sergio Mena
1543e4122a Added all ABCI++ APIs to protobufs 2022-02-04 20:19:00 +01:00
Marko
5e90a98a7c proto: abci++ changes (#348)
* abci++ proto updates

* add finalizeblock

* add deprecated fields
2022-02-04 20:19:00 +01:00
Sergio Mena
854fd07461 Fixing handling of contexts in the ABCI++ rebased branch (#7768)
* Fixing context

* Removed logger change

* Fixing UTs

* Bump
2022-02-04 15:55:35 +01:00
Daniel
4fb99af40d PBTS: spec reorganization, summary of changes on README.md (#399)
* PBTS: brief context and proposal added to README

* PBTS: summary of algorithmic solution added to README

* PBTS: Context section of README improved

* PBTS: fixing links and page titles

* PBTS: moved first drafts to v1/, links updated

* PBTS: added issues to README, link to arXiv PDF

* PBTS: brief context and proposal added to README

* PBTS: summary of algorithmic solution added to README

* PBTS: Context section of README improved

* PBTS: fixing links and page titles

* PBTS: moved first drafts to v1/, links updated

* PBTS: added issues to README, link to arXiv PDF

* Apply suggestions from code review

Co-authored-by: William Banfield <4561443+williambanfield@users.noreply.github.com>
Co-authored-by: Josef Widder <44643235+josef-widder@users.noreply.github.com>

* Fixing linting problems

Co-authored-by: Daniel Cason <cason@gandria>
Co-authored-by: William Banfield <4561443+williambanfield@users.noreply.github.com>
Co-authored-by: Josef Widder <44643235+josef-widder@users.noreply.github.com>
2022-02-04 10:44:32 +01:00
JayT106
97d47b5263 mempool: IDs issue fixes (#7763) 2022-02-03 15:04:59 -05:00
William Banfield
329da35a84 Add the newly defined timeout parameters to the consensus parameters (#400) 2022-02-03 14:24:07 -05:00
M. J. Fromberger
c67ace3433 Revert "PrepareProposal-VoteExtension integration (#6915)" (#7769)
This reverts commit 39ffa80ae7.

Nightly end-to-end tests are currently failing; revert temporarily so we can
debug.
2022-02-03 09:42:08 -08:00
M. J. Fromberger
ce61abc038 rpc: remove the placeholder RunState type. (#7749)
* rpc/client: remove the placeholder RunState type.

I added the RunState type in #6971 to disconnect clients from the service
plumbing, which they do not need. Now that we have more complete context
plumbing, the lifecycle of a client no longer depends on this type: It serves
as a carrier for a logger, and a Boolean flag for "running" status, neither of
which is used outside of tests.

Logging in particular is defaulted to a no-op logger in all production use.
Arguably we could just remove the logging calls, since they are never invoked
except in tests. To defer the question of whether we should do that or make the
logging go somewhere more productive, I've preserved the existing use here.

Remove use of the IsRunning method that was provided by the RunState, and use
the Start method and context to govern client lifecycle.

Remove the one test that exercised "unstarted" clients. I would like to remove
that method entirely, but that will require updating the constructors for all
the client types to plumb a context and possibly other options. I have deferred
that for now.
2022-02-02 12:02:04 -08:00
Sam Kleinman
cb98d515dd consensus: delay start of peer routines (#7753) 2022-02-02 14:20:56 -05:00
William Banfield
de04f573cf types: make timely predicate adaptive after 10 rounds (#7739)
This change adds logic to double the message delay bound after every 10 rounds. Alternatives to this somewhat magic number were discussed. Specifically, whether or not to make '10' modifiable as a parameter was discussed. Since this behavior only exists to ensure liveness in the case that these values were poorly chosen to begin with, a method to configure this value was not created. Chains that notice many 'untimely' rounds per the [relevant metric](https://github.com/tendermint/tendermint/pull/7709) are expected to take action to increase the configured message delay to more accurately match the conditions of the network. 

closes: https://github.com/tendermint/spec/issues/371
2022-02-02 15:25:04 +00:00
William Banfield
91f898cb98 proto: merge the proposer-based timestamps parameters (#393) 2022-02-02 10:21:09 -05:00
Callum Waters
9fe1d4eeab remove unmaintained tutorials (#7751) 2022-02-02 16:03:50 +01:00
Jasmina Malicevic
74864f7fdb evidence: Refactored the evidence message to process Evidence instead of EvidenceList (#7700)
* evidence: Refactored the evidence message to send/recieve Evidence instead of EvidenceList

Peers send evidences one by one. The refactored code reflects this behaviour.

* Update internal/evidence/reactor.go

Co-authored-by: M. J. Fromberger <fromberger@interchain.io>

Co-authored-by: M. J. Fromberger <fromberger@interchain.io>
Co-authored-by: William Banfield <4561443+williambanfield@users.noreply.github.com>
2022-02-02 15:33:39 +01:00
dependabot[bot]
648f5ffa77 build(deps): bump docker/build-push-action from 2.8.0 to 2.9.0 (#397)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 2.8.0 to 2.9.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v2.8.0...v2.9.0)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: M. J. Fromberger <fromberger@interchain.io>
2022-02-02 04:33:55 -08:00
Kukovec
f8c4ec38ec Apalache annotations (#398) 2022-02-02 12:29:02 +01:00
mconcat
39ffa80ae7 PrepareProposal-VoteExtension integration (#6915) 2022-02-02 11:51:13 +01:00
mconcat
d2afb91e99 ABCI Vote Extension 2 (#6885)
* add proto, add boilerplates

* add canonical

* fix tests

* add vote signing test

* Update internal/consensus/msgs_test.go

* modify state execution in progress

* add extension signing

* add extension signing

* VoteExtension -> ExtendVote

* modify state execution in progress

* add extension signing

* verify in progress

* modify CommitSig

* fix test

* apply review

* update data structures

* Apply suggestions from code review

* Add comments

* fix test

* VoteExtensionSigned => VoteExtensionToSigned

* Apply suggestions from code review

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>

* *Signed -> *ToSign

* add Vote to RequestExtendVote

* add example VoteExtension

* apply reviews

* fix vote

* Apply suggestions from code review

Co-authored-by: Dev Ojha <ValarDragon@users.noreply.github.com>
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>

* fix typo, modify proto

* add abcipp_kvstore.go

* add extension test

* fix test

* fix test

* fix test

* fit lint

* uncomment test

* refactor test in progress

* gofmt

* apply review

* fix lint

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Dev Ojha <ValarDragon@users.noreply.github.com>
2022-02-02 11:51:13 +01:00
mconcat
29f7573762 abci: Vote Extension 1 (#6646)
* add proto, add boilerplates

* add canonical

* fix tests

* add vote signing test

* Update internal/consensus/msgs_test.go

* modify state execution in progress

* add extension signing

* VoteExtension -> ExtendVote

* apply review

* update data structures

* Add comments

* Apply suggestions from code review

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>

* *Signed -> *ToSign

* add Vote to RequestExtendVote

* apply reviews

* Apply suggestions from code review

Co-authored-by: Dev Ojha <ValarDragon@users.noreply.github.com>
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>

* fix typo, modify proto

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Dev Ojha <ValarDragon@users.noreply.github.com>
2022-02-02 11:51:13 +01:00
Marko
ff498ff333 abci: PrepareProposal (#6544) 2022-02-02 11:51:13 +01:00
Jasmina Malicevic
8e5b44d46a p2p/message: Changed evidence message to contain evidence, not a list… (#394)
* p2p/message: Changed evidence message to contain evidence, not a list of evidence

* Update spec/p2p/messages/evidence.md

Co-authored-by: Callum Waters <cmwaters19@gmail.com>

Co-authored-by: Callum Waters <cmwaters19@gmail.com>
2022-02-02 11:17:47 +01:00
Kukovec
17a197929c Updated Apalache type annotations (#395) 2022-02-01 19:49:18 +01:00
M. J. Fromberger
8a684c1bb5 rpc: fix layout of endpoint list (#7742)
* rpc: fix layout of endpoint list

The output of the default endpoint-list query was not correctly segregating
methods with and without arguments. Fix this, and also clean up the output to
be easier to read (both in code and in generated source).

Fixes #3618.
2022-01-31 14:52:38 -08:00
M. J. Fromberger
169099c846 docs: drop v0.32 from the doc site configuration (#7741) 2022-01-31 12:31:15 -08:00
M. J. Fromberger
75b1b1d6c5 rpc: simplify the handling of JSON-RPC request and response IDs (#7738)
* rpc: simplify the handling of JSON-RPC request and response IDs

Replace the ID wrapper interface with plain JSON. Internally, the client
libraries use only integer IDs, and the server does not care about the ID
structure apart from checking its validity.

Basic structure of this change:

- Remove the jsonrpcid interface and its helpers.
- Unexport the ID field of request and response.
- Add helpers for constructing requests and responses.
- Fix up usage and tests.
2022-01-31 12:11:42 -08:00
Sam Kleinman
2c074e24e6 rfc: p2p light client (#7672) 2022-01-31 12:45:58 -05:00
Sam Kleinman
1d3ecf37ee consensus: remove unused closer construct (#7734)
This is clearly a cob-web in the code, and may predict a solution to #7729, though this is difficult to backport because we don't have contexts in 0.35
2022-01-31 16:03:20 +00:00
Sam Kleinman
2f1e08e948 conensus: put timeouts on reactor tests (#7733) 2022-01-31 15:04:56 +00:00
Sam Kleinman
a4e2f05d7a cmd: avoid package state in cli constructors (#7719) 2022-01-31 09:52:30 -05:00
M. J. Fromberger
95158636cd rpc: clean up unmarshaling of batch-valued responses (#7728)
Update the interface of the batch decoder to match the type signature of the
single-response case. The caller provides the outputs, so there is no need to
return them as well.

No functional changes.
2022-01-31 06:16:10 -08:00
dependabot[bot]
89194a61a4 build(deps): Bump github.com/prometheus/client_golang from 1.12.0 to 1.12.1 (#7732)
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.12.0 to 1.12.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/prometheus/client_golang/releases">github.com/prometheus/client_golang's releases</a>.</em></p>
<blockquote>
<h2>1.12.1 / 2022-01-29</h2>
<ul>
<li>[BUGFIX] Make the Go 1.17 collector concurrency-safe <a href="https://github-redirect.dependabot.com/prometheus/client_golang/issues/969">#969</a>
<ul>
<li>Use simpler locking in the Go 1.17 collector <a href="https://github-redirect.dependabot.com/prometheus/client_golang/issues/975">#975</a></li>
</ul>
</li>
<li>[BUGFIX] Reduce granularity of histogram buckets for Go 1.17 collector <a href="https://github-redirect.dependabot.com/prometheus/client_golang/issues/974">#974</a></li>
<li>[ENHANCEMENT] API client: make HTTP reads more efficient <a href="https://github-redirect.dependabot.com/prometheus/client_golang/issues/976">#976</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/prometheus/client_golang/compare/v1.12.0...v1.12.1">https://github.com/prometheus/client_golang/compare/v1.12.0...v1.12.1</a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md">github.com/prometheus/client_golang's changelog</a>.</em></p>
<blockquote>
<h2>1.12.1 / 2022-01-29</h2>
<ul>
<li>[BUGFIX] Make the Go 1.17 collector concurrency-safe <a href="https://github-redirect.dependabot.com/prometheus/client_golang/issues/969">#969</a>
<ul>
<li>Use simpler locking in the Go 1.17 collector <a href="https://github-redirect.dependabot.com/prometheus/client_golang/issues/975">#975</a></li>
</ul>
</li>
<li>[BUGFIX] Reduce granularity of histogram buckets for Go 1.17 collector <a href="https://github-redirect.dependabot.com/prometheus/client_golang/issues/974">#974</a></li>
<li>[ENHANCEMENT] API client: make HTTP reads more efficient <a href="https://github-redirect.dependabot.com/prometheus/client_golang/issues/976">#976</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="2e1c4818cc"><code>2e1c481</code></a> Cut v1.12.1 (<a href="https://github-redirect.dependabot.com/prometheus/client_golang/issues/978">#978</a>)</li>
<li><a href="77626d64fa"><code>77626d6</code></a> Reduce granularity of histogram buckets for Go 1.17 collector (<a href="https://github-redirect.dependabot.com/prometheus/client_golang/issues/974">#974</a>)</li>
<li><a href="4dd3cbb4ab"><code>4dd3cbb</code></a> API client: make http reads more efficient (<a href="https://github-redirect.dependabot.com/prometheus/client_golang/issues/976">#976</a>)</li>
<li><a href="85206714ae"><code>8520671</code></a> Use simpler locking in the Go 1.17 collector (<a href="https://github-redirect.dependabot.com/prometheus/client_golang/issues/975">#975</a>)</li>
<li><a href="f63e219e6b"><code>f63e219</code></a> Make the Go 1.17 collector thread-safe (<a href="https://github-redirect.dependabot.com/prometheus/client_golang/issues/969">#969</a>)</li>
<li>See full diff in <a href="https://github.com/prometheus/client_golang/compare/v1.12.0...v1.12.1">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/prometheus/client_golang&package-manager=go_modules&previous-version=1.12.0&new-version=1.12.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2022-01-31 09:34:25 +00:00
M. J. Fromberger
b3c85b795a docs: fix some typos in ADR 075. (#7726)
* docs: fix some typos in ADR 075.

* fix typo typo
2022-01-31 09:14:42 +00:00
M. J. Fromberger
fbe86ea645 rpc: simplify and consolidate response construction (#7725)
Responses are constructed from requests using MakeResponse, MakeError, and
MakeErrorf. This ensures the response is always paired with the correct ID,
makes cases where there is no ID more explicit at the usage site, and
consolidates the handling of error introspection across transports.

The logic for unpacking errors and assigning JSON-RPC response types was
previously duplicated in three places. Consolidate it in the types package for
the RPC subsystem.

* update test cases
2022-01-28 13:33:02 -08:00
M. J. Fromberger
20886fdb39 rpc: clean up encoding of request and response messages (#7721)
Instead of having the exported Request and Response type expose the version
directly, delegate version injection to an unexported shim.  We already had the
shim; this just boosts it to the top level and does a bit more checking.

* Check JSON-RPC version marker.
2022-01-28 11:41:23 -08:00
M. J. Fromberger
6f6935a44b rpc: don't route websocket-only methods on GET requests (#7715) 2022-01-27 14:52:41 -08:00
Sam Kleinman
6822378334 mempool: return duplicate tx errors more consistently (#7714) 2022-01-27 16:44:07 -05:00
Alexander Shcherbakov
9b32346ebd light: Fix absence proof verification by light client (#7639)
- use the full key path to pass to the VerifyAbsence function
2022-01-27 22:30:19 +01:00
M. J. Fromberger
557d86316b rpc: clean up unused non-default websocket client options (#7713)
These are only ever used with the defaults, except in our own tests.  A search
of cs.github.com shows no other callers.

The use in the test was solely to bug out the go-metrics package so its
goroutines don't trigger the leak checker. Use the package's own flag for that
purpose instead. Note that calling "Stop" on the metric helps, but is not
sufficient -- the Stop does not wait for its goroutine to exit.
2022-01-27 11:49:08 -08:00
M. J. Fromberger
e87d40719d rpc: remove unused websocket options (#7712)
These options are never set to anything but the defaults, so drop the options
and inline the defaults.
2022-01-27 10:15:56 -08:00
William Banfield
bd8726c784 Use proposer timestamp instead of genesis time for height 1 block time (#7711)
Merged to pbts branch in #7541
2022-01-27 17:04:55 +00:00
mempirate
db3044ff3c rpc: add application info to status call (#7701)
* rpc/coretypes: add `ApplicationInfo` to `ResultStatus`
* internal/rpc/core: return application version

Co-authored-by: William Banfield <4561443+williambanfield@users.noreply.github.com>
Co-authored-by: M. J. Fromberger <michael.j.fromberger@gmail.com>
2022-01-27 07:24:01 -08:00
William Banfield
04bcfecce2 metrics: add metric for proposal timestamp difference (#7709)
Moving this over from the proposer-based timestamps branch #7550.
2022-01-27 14:42:56 +00:00
M. J. Fromberger
5eb50a43b5 ci: fix super-linter configuration settings (#7708)
- Revert the version pin from #7706.
- Override the YAML linter config to be more forgiving.
- Update YAML lint warnings in a number of files.

The choice of which lints to fix and which to override was ad hoc: I fixed the ones that were mainly whitespace oriented, and suppressed the ones that were document-structure related.

Fixes #7707.
2022-01-27 05:33:11 -08:00
M. J. Fromberger
1ac58469f3 Forward-port v0.35.1 changelogs. (#7705)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-01-26 20:40:23 +00:00
William Banfield
b37c10c324 params: increase default synchrony params (#7704) 2022-01-26 15:29:54 -05:00
M. J. Fromberger
09c41dc06d Pin super-linter to a less noisy version. (#7706)
The latest point release includes https://github.com/github/super-linter/pull/2295
which enables a bunch of checks that break existing use.
2022-01-26 11:57:44 -08:00
William Banfield
61f3aa0848 consensus: use buffered channel in TestStateFullRound1 (#7668) 2022-01-26 14:50:31 -05:00
dependabot[bot]
7fbad97e69 build(deps): Bump google.golang.org/grpc from 1.43.0 to 1.44.0 (#7695)
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.43.0 to 1.44.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.43.0...v1.44.0)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sam Kleinman <garen@tychoish.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: M. J. Fromberger <fromberger@interchain.io>
2022-01-26 09:26:40 -08:00
JayT106
2c9dec53a8 remove duplicate ABCIVersion (#7703) 2022-01-26 09:12:00 -08:00
M. J. Fromberger
05d8a0bd05 Mark ADR 075 as "accepted". (#7699) 2022-01-26 08:33:13 -08:00
William Banfield
0aa3b0b6fc Proposer-Based Timestamps Merge (#7605)
This pull request merges in the changes for implementing Proposer-based timestamps into `master`. The power was primarily being done in the `wb/proposer-based-timestamps` branch, with changes being merged into that branch during development. This pull request represents an amalgamation of the changes made into that development branch. All of the changes that were placed into that branch have been cleanly rebased on top of the latest `master`. The changes compile and the tests pass insofar as our tests in general pass.

### Note To Reviewers
 These changes have been extensively reviewed during development. There is not much new here. In the interest of making effective use of time, I would recommend against trying to perform a complete audit of the changes presented and instead examine for mistakes that may have occurred during the process of rebasing the changes. I gave the complete change set a first pass for any issues, but additional eyes would be very appreciated. 

In sum, this change set does the following:
closes #6942 
merges in #6849
2022-01-26 16:00:23 +00:00
M. J. Fromberger
441ecbaeec types: rename and extend the EventData interface (#7687)
This is the interface shared by types that can be used as event data in, for
example, subscriptions via the RPC.

To be compatible with the RPC service, data need to support JSON encoding.
Require this as part of the interface.
2022-01-26 07:01:55 -08:00
M. J. Fromberger
fcfe157f6b Remove unused xsalsa20symmetric package. (#7691)
This package has no uses within Tendermint core.
PR https://github.com/cosmos/cosmos-sdk/pull/11027 replaces the use in
the Cosmos SDK.

A follow-up to #7689 and #7690.
2022-01-26 06:23:20 -08:00
M. J. Fromberger
f64d64a7b5 ADR 074: RPC Event Subscription Interface (#7677)
Status: Proposed.
2022-01-26 06:19:32 -08:00
dependabot[bot]
b920cd4c32 build(deps): Bump github.com/golangci/golangci-lint from 1.43.0 to 1.44.0 (#7692)
Bumps [github.com/golangci/golangci-lint](https://github.com/golangci/golangci-lint) from 1.43.0 to 1.44.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/golangci/golangci-lint/releases">github.com/golangci/golangci-lint's releases</a>.</em></p>
<blockquote>
<h2>v1.44.0</h2>
<h2>Changelog</h2>
<ul>
<li>32cf48ed Add &quot;grouper&quot; linter (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2497">#2497</a>)</li>
<li>63f150ea Add decorder linter (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2453">#2453</a>)</li>
<li>55358972 Add errchkjson linter (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2362">#2362</a>)</li>
<li>e3d0247e Add maintidx linter (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2435">#2435</a>)</li>
<li>d2093896 Add support for multiple outputs (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2386">#2386</a>)</li>
<li>efb35995 Bump github.com/ashanbrown/forbidigo from 1.2.0 to 1.3.0 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2487">#2487</a>)</li>
<li>6e2e51d8 Bump makezero to v1.1.0 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2490">#2490</a>)</li>
<li>e788757b Ensure that the Issues key in JSON format is a list (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2358">#2358</a>)</li>
<li>eaed228d Print error text in  tag content for more readable junit report (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2460">#2460</a>)</li>
<li>b5d8e698 Return error if any linter fails to run (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2471">#2471</a>)</li>
<li>ec58c481 Show deprecated mark in the CLI linters help (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2350">#2350</a>)</li>
<li>68f530a8 add containedctx linter (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2382">#2382</a>)</li>
<li>c53eb78a asciicheck: bump to v0.1.1 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2510">#2510</a>)</li>
<li>ae537189 bodyclose: bump to HEAD (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2508">#2508</a>)</li>
<li>ba3453d2 build(deps): bump actions/cache from 2.1.6 to 2.1.7 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2383">#2383</a>)</li>
<li>80659f85 build(deps): bump github.com/BurntSushi/toml from 0.4.1 to 1.0.0 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2491">#2491</a>)</li>
<li>8bc95624 build(deps): bump github.com/breml/bidichk from 0.2.0 to 0.2.1 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2354">#2354</a>)</li>
<li>f311ffd2 build(deps): bump github.com/breml/errchkjson from 0.2.0 to 0.2.1 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2493">#2493</a>)</li>
<li>ec2820c5 build(deps): bump github.com/esimonov/ifshort from 1.0.3 to 1.0.4 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2436">#2436</a>)</li>
<li>83962f47 build(deps): bump github.com/fzipp/gocyclo from 0.3.1 to 0.4.0 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2425">#2425</a>)</li>
<li>6ddb9071 build(deps): bump github.com/go-critic/go-critic from 0.6.1 to 0.6.2 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2474">#2474</a>)</li>
<li>a79803fa build(deps): bump github.com/kulti/thelper from 0.4.0 to 0.5.0 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2492">#2492</a>)</li>
<li>9e129498 build(deps): bump github.com/ldez/tagliatelle from 0.2.0 to 0.3.0 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2454">#2454</a>)</li>
<li>0ac5d371 build(deps): bump github.com/mattn/go-colorable from 0.1.11 to 0.1.12 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2384">#2384</a>)</li>
<li>620bd9bb build(deps): bump github.com/mgechev/revive from 1.1.2 to 1.1.3 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2517">#2517</a>)</li>
<li>ecbb9c47 build(deps): bump github.com/nishanths/exhaustive from 0.3.6 to 0.6.0 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2353">#2353</a>)</li>
<li>fc888cf0 build(deps): bump github.com/nishanths/exhaustive from 0.6.0 to 0.7.11 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2371">#2371</a>)</li>
<li>88d3ec0f build(deps): bump github.com/quasilyte/go-ruleguard/dsl (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2455">#2455</a>)</li>
<li>131ab76b build(deps): bump github.com/quasilyte/go-ruleguard/dsl (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2472">#2472</a>)</li>
<li>441d8443 build(deps): bump github.com/quasilyte/go-ruleguard/dsl (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2519">#2519</a>)</li>
<li>7d5bc8f0 build(deps): bump github.com/securego/gosec/v2 from 2.9.1 to 2.9.2 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2372">#2372</a>)</li>
<li>d0aead44 build(deps): bump github.com/securego/gosec/v2 from 2.9.2 to 2.9.3 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2385">#2385</a>)</li>
<li>56f27d0a build(deps): bump github.com/securego/gosec/v2 from 2.9.3 to 2.9.5 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2413">#2413</a>)</li>
<li>9bad615c build(deps): bump github.com/securego/gosec/v2 from 2.9.5 to 2.9.6 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2516">#2516</a>)</li>
<li>d29d9f12 build(deps): bump github.com/shirou/gopsutil/v3 from 3.21.10 to 3.21.11 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2405">#2405</a>)</li>
<li>b4a3bd8c build(deps): bump github.com/shirou/gopsutil/v3 from 3.21.11 to 3.21.12 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2456">#2456</a>)</li>
<li>ca8cd60f build(deps): bump github.com/spf13/cobra from 1.2.1 to 1.3.0 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2426">#2426</a>)</li>
<li>4ca6a2fc build(deps): bump github.com/spf13/viper from 1.10.0 to 1.10.1 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2424">#2424</a>)</li>
<li>f960879b build(deps): bump github.com/spf13/viper from 1.9.0 to 1.10.0 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2412">#2412</a>)</li>
<li>018befd3 build(deps): bump github.com/tommy-muehle/go-mnd/v2 from 2.4.0 to 2.5.0 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2518">#2518</a>)</li>
<li>8cdecc96 build(deps): bump gitlab.com/bosi/decorder from 0.2.0 to 0.2.1 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2473">#2473</a>)</li>
<li>4119132f build(deps): bump honnef.co/go/tools from 0.2.1 to 0.2.2 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2370">#2370</a>)</li>
<li>b845512b build(deps): bump mvdan.cc/gofumpt from 0.1.1 to 0.2.0 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2373">#2373</a>)</li>
<li>107b8307 build(deps): bump mvdan.cc/gofumpt from 0.2.0 to 0.2.1 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2427">#2427</a>)</li>
<li>49501691 bump bidichk from v0.1.1 to v0.2.0</li>
<li>a471733b bump github.com/yeya24/promlinter from v0.1.0 to HEAD (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2500">#2500</a>)</li>
<li>7f25fee1 bump varnamelen from v0.4.0 to v0.5.0 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2369">#2369</a>)</li>
<li>1b535204 bump varnamelen to v0.4.0 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2348">#2348</a>)</li>
</ul>

</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/golangci/golangci-lint/blob/master/CHANGELOG.md">github.com/golangci/golangci-lint's changelog</a>.</em></p>
<blockquote>
<h3>v1.44.0</h3>
<ol>
<li>new linters:
<ul>
<li><code>containedctx</code>: <a href="https://github.com/sivchari/containedctx">https://github.com/sivchari/containedctx</a></li>
<li><code>decorder</code>: <a href="https://gitlab.com/bosi/decorder">https://gitlab.com/bosi/decorder</a></li>
<li><code>errchkjson</code>: <a href="https://github.com/breml/errchkjson">https://github.com/breml/errchkjson</a></li>
<li><code>maintidx</code>: <a href="https://github.com/yagipy/maintidx">https://github.com/yagipy/maintidx</a></li>
<li><code>grouper</code>: <a href="https://github.com/leonklingele/grouper">https://github.com/leonklingele/grouper</a></li>
</ul>
</li>
<li>updated linters:
<ul>
<li><code>asciicheck</code>: bump to v0.1.1</li>
<li><code>bidichk</code>: from 0.1.1 to 0.2.1</li>
<li><code>bodyclose</code>: bump to HEAD</li>
<li><code>decorder</code>: from 0.2.0 to 0.2.1</li>
<li><code>depguard</code>: from 1.0.1 to 1.1.0</li>
<li><code>errchkjson</code>: from 0.2.0 to 0.2.1</li>
<li><code>errorlint</code>: bump to HEAD</li>
<li><code>exhaustive</code>: drop deprecated/unused settings</li>
<li><code>exhaustive</code>: from v0.2.3 to 0.7.11</li>
<li><code>forbidigo</code>: from 1.2.0 to 1.3.0</li>
<li><code>forcetypeassert</code>: bump to v0.1.0</li>
<li><code>gocritic</code>: from 0.6.1 to 0.6.2</li>
<li><code>gocritic</code>: support autofix</li>
<li><code>gocyclo</code>: from 0.3.1 to 0.4.0</li>
<li><code>godot</code>: add period option</li>
<li><code>gofumpt</code>: from 0.1.1 to 0.2.1</li>
<li><code>gomnd</code>: from 2.4.0 to 2.5.0</li>
<li><code>gomnd</code>: new configuration</li>
<li><code>gosec</code>: from 2.9.1 to 2.9.6</li>
<li><code>ifshort</code>: from 1.0.3 to 1.0.4</li>
<li><code>ineffassign</code>: bump to HEAD</li>
<li><code>makezero</code>: to v1.1.0</li>
<li><code>promlinter</code>: from v0.1.0 to HEAD</li>
<li><code>revive</code>: fix <code>enableAllRules</code></li>
<li><code>revive</code>: from 1.1.2 to 1.1.3</li>
<li><code>staticcheck</code>: from 0.2.1 to 0.2.2</li>
<li><code>tagliatelle</code>: from 0.2.0 to 0.3.0</li>
<li><code>thelper</code>: from 0.4.0 to 0.5.0</li>
<li><code>unparam</code>: bump to HEAD</li>
<li><code>varnamelen</code>: bump to v0.5.0</li>
<li><code>wrapcheck</code>: update configuration to include <code>ignoreSignRegexps</code></li>
</ul>
</li>
<li>documentation:
<ul>
<li>linters: improve pages about configuration</li>
<li>improve page about false-positive</li>
<li><code>nolintlint</code>: fix wrong default value in comment</li>
<li><code>revive</code>: add a more detailed configuration</li>
</ul>
</li>
<li>misc:
<ul>
<li>outputs: Add support for multiple outputs</li>
<li>outputs: Print error text in <code>&lt;failure&gt;</code> tag content for more readable JUnit output</li>
<li>outputs: ensure that the Issues key in JSON format is a list</li>
<li>Return error if any linter fails to run</li>
</ul>
</li>
</ol>

</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="617470fa9e"><code>617470f</code></a> docs(revive): fix typo on the option <code>disabled</code>(<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2520">#2520</a>)</li>
<li><a href="32cf48edc9"><code>32cf48e</code></a> Add &quot;grouper&quot; linter (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2497">#2497</a>)</li>
<li><a href="620bd9bb3d"><code>620bd9b</code></a> build(deps): bump github.com/mgechev/revive from 1.1.2 to 1.1.3 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2517">#2517</a>)</li>
<li><a href="9bad615c90"><code>9bad615</code></a> build(deps): bump github.com/securego/gosec/v2 from 2.9.5 to 2.9.6 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2516">#2516</a>)</li>
<li><a href="441d84436d"><code>441d844</code></a> build(deps): bump github.com/quasilyte/go-ruleguard/dsl (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2519">#2519</a>)</li>
<li><a href="018befd392"><code>018befd</code></a> build(deps): bump github.com/tommy-muehle/go-mnd/v2 from 2.4.0 to 2.5.0 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2518">#2518</a>)</li>
<li><a href="1b53352339"><code>1b53352</code></a> docs: improve configuration documentation (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2514">#2514</a>)</li>
<li><a href="44474a103e"><code>44474a1</code></a> forcetypeassert: bump to v0.1.0 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2511">#2511</a>)</li>
<li><a href="c53eb78ae1"><code>c53eb78</code></a> asciicheck: bump to v0.1.1 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2510">#2510</a>)</li>
<li><a href="171b3caef4"><code>171b3ca</code></a> ineffassign: bump to HEAD (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2509">#2509</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/golangci/golangci-lint/compare/v1.43.0...v1.44.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/golangci/golangci-lint&package-manager=go_modules&previous-version=1.43.0&new-version=1.44.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2022-01-26 14:05:21 +00:00
M. J. Fromberger
51ffb95775 Remove unused chacha20poly1305 package. (#7690)
Fixes #7689.
2022-01-26 05:44:24 -08:00
M. J. Fromberger
079c7af007 pubsub: use concrete queries instead of an interface (#7686)
Remove the pubsub.Query interface and instead use the concrete query type.
Nothing uses any other implementation but pubsub/query.

* query: remove the error from the Matches method
* Update all usage.
2022-01-25 11:16:48 -08:00
Sam Kleinman
f163acf499 clist: reduce size of test workload for clist implementation (#7682) 2022-01-25 13:48:24 -05:00
Sam Kleinman
6a02714814 rpc: check error code for broadcast_tx_commit (#7683) 2022-01-25 13:35:03 -05:00
dependabot[bot]
5db7a7d6db build(deps): Bump github.com/vektra/mockery/v2 from 2.9.4 to 2.10.0 (#7685)
Bumps [github.com/vektra/mockery/v2](https://github.com/vektra/mockery) from 2.9.4 to 2.10.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/vektra/mockery/releases">github.com/vektra/mockery/v2's releases</a>.</em></p>
<blockquote>
<h2>v2.10.0</h2>
<h2>Changelog</h2>
<ul>
<li>95b8d4d Add mock generation with expecter</li>
<li>e5889c6 Merge branch 'master' into gejo-expecter-support</li>
<li>66d6564 Merge pull request <a href="https://github-redirect.dependabot.com/vektra/mockery/issues/396">#396</a> from Gevrai/gejo-expecter-support</li>
<li>b702d89 Update README.md</li>
</ul>
<h2>v2.9.5</h2>
<h2>Changelog</h2>
<ul>
<li>ff24d35 Adding more dependencies</li>
<li>5626edf Merge pull request <a href="https://github-redirect.dependabot.com/vektra/mockery/issues/427">#427</a> from vektra/update_deps</li>
<li>21d2728 Upgrade all dependencies</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="66d6564919"><code>66d6564</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/vektra/mockery/issues/396">#396</a> from Gevrai/gejo-expecter-support</li>
<li><a href="e5889c659c"><code>e5889c6</code></a> Merge branch 'master' into gejo-expecter-support</li>
<li><a href="b702d895c7"><code>b702d89</code></a> Update README.md</li>
<li><a href="5626edfab2"><code>5626edf</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/vektra/mockery/issues/427">#427</a> from vektra/update_deps</li>
<li><a href="ff24d35774"><code>ff24d35</code></a> Adding more dependencies</li>
<li><a href="21d2728377"><code>21d2728</code></a> Upgrade all dependencies</li>
<li><a href="95b8d4d7f0"><code>95b8d4d</code></a> Add mock generation with expecter</li>
<li>See full diff in <a href="https://github.com/vektra/mockery/compare/v2.9.4...v2.10.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/vektra/mockery/v2&package-manager=go_modules&previous-version=2.9.4&new-version=2.10.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2022-01-25 13:47:49 +00:00
Sam Kleinman
2c90a86a27 tests: reduce timeout to 4m from 8m (#7681) 2022-01-24 17:47:53 -05:00
M. J. Fromberger
7878ca6a8a Delete the custom libs/json (tmjson) package. (#7673)
There are no further uses of this package anywhere in Tendermint.
All the uses in the Cosmos SDK are for types that now work correctly with the
standard encoding/json package.
2022-01-24 08:15:34 -08:00
dependabot[bot]
f6ebd84ee2 build(deps): Bump vuepress-theme-cosmos from 1.0.182 to 1.0.183 in /docs (#7680)
Bumps [vuepress-theme-cosmos](https://github.com/cosmos/vuepress-theme-cosmos) from 1.0.182 to 1.0.183.
- [Release notes](https://github.com/cosmos/vuepress-theme-cosmos/releases)
- [Commits](https://github.com/cosmos/vuepress-theme-cosmos/commits)

---
updated-dependencies:
- dependency-name: vuepress-theme-cosmos
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Callum Waters <cmwaters19@gmail.com>
2022-01-24 05:57:39 -08:00
dependabot[bot]
80d3765ebf build(deps): Bump docker/build-push-action from 2.7.0 to 2.8.0 (#7679)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 2.7.0 to 2.8.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/docker/build-push-action/releases">docker/build-push-action's releases</a>.</em></p>
<blockquote>
<h2>v2.8.0</h2>
<ul>
<li>Allow specifying subdirectory with default git context (<a href="https://github-redirect.dependabot.com/docker/build-push-action/issues/531">#531</a>)</li>
<li>Add <code>cgroup-parent</code>, <code>shm-size</code>, <code>ulimit</code> inputs (<a href="https://github-redirect.dependabot.com/docker/build-push-action/issues/501">#501</a>)</li>
<li>Don't set outputs if empty or nil (<a href="https://github-redirect.dependabot.com/docker/build-push-action/issues/470">#470</a>)</li>
<li>docs: example to sanitize tags with metadata-action (<a href="https://github-redirect.dependabot.com/docker/build-push-action/issues/476">#476</a>)</li>
<li>docs: wrong syntax to sanitize repo slug (<a href="https://github-redirect.dependabot.com/docker/build-push-action/issues/475">#475</a>)</li>
<li>docs: test before pushing your image (<a href="https://github-redirect.dependabot.com/docker/build-push-action/issues/455">#455</a>)</li>
<li>readme: remove v1 section (<a href="https://github-redirect.dependabot.com/docker/build-push-action/issues/500">#500</a>)</li>
<li>ci: virtual env file system info (<a href="https://github-redirect.dependabot.com/docker/build-push-action/issues/510">#510</a>)</li>
<li>dev: update workflow (<a href="https://github-redirect.dependabot.com/docker/build-push-action/issues/499">#499</a>)</li>
<li>Bump <code>@​actions/core</code> from 1.5.0 to 1.6.0 (<a href="https://github-redirect.dependabot.com/docker/build-push-action/issues/160">#160</a>)</li>
<li>Bump ansi-regex from 5.0.0 to 5.0.1 (<a href="https://github-redirect.dependabot.com/docker/build-push-action/issues/469">#469</a>)</li>
<li>Bump tmpl from 1.0.4 to 1.0.5 (<a href="https://github-redirect.dependabot.com/docker/build-push-action/issues/465">#465</a>)</li>
<li>Bump csv-parse from 4.16.0 to 4.16.3 (<a href="https://github-redirect.dependabot.com/docker/build-push-action/issues/451">#451</a> <a href="https://github-redirect.dependabot.com/docker/build-push-action/issues/459">#459</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="1814d3dfb3"><code>1814d3d</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/docker/build-push-action/issues/531">#531</a> from BeyondEvil/subdir-with-default-context</li>
<li><a href="fc5a732e0c"><code>fc5a732</code></a> Add subdirectory for Git context</li>
<li><a href="b1aeb1103e"><code>b1aeb11</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/docker/build-push-action/issues/510">#510</a> from crazy-max/venv</li>
<li><a href="e31f93ab9f"><code>e31f93a</code></a> ci: virtual env file system info</li>
<li><a href="9ed5823618"><code>9ed5823</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/docker/build-push-action/issues/501">#501</a> from crazy-max/new-inputs</li>
<li><a href="4222161e3e"><code>4222161</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/docker/build-push-action/issues/500">#500</a> from crazy-max/readme</li>
<li><a href="67ff4df4b7"><code>67ff4df</code></a> add <code>cgroup-parent</code>, <code>shm-size</code>, <code>ulimit</code> inputs</li>
<li><a href="91274a04da"><code>91274a0</code></a> sort flags</li>
<li><a href="ff329397c0"><code>ff32939</code></a> readme: remove v1 section</li>
<li><a href="04841f2a72"><code>04841f2</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/docker/build-push-action/issues/499">#499</a> from crazy-max/update-workflow</li>
<li>Additional commits viewable in <a href="https://github.com/docker/build-push-action/compare/v2.7.0...v2.8.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=docker/build-push-action&package-manager=github_actions&previous-version=2.7.0&new-version=2.8.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2022-01-24 10:25:34 +00:00
M. J. Fromberger
f9c6cc9306 rpc: use encoding/json rather than tmjson (#7670)
The main change here is to use encoding/json to encode and decode RPC 
parameters, rather than the custom tmjson package. This includes:

- Update the HTTP POST handler parameter handling.
- Add field tags to 64-bit integer types to get string encoding (to match amino/tmjson).
- Add marshalers to struct types that mention interfaces.
- Inject wrappers to decode interface arguments in RPC handlers.
2022-01-21 15:10:28 -08:00
M. J. Fromberger
72c2e6a5b8 jsontypes: improve tests and error diagnostics (#7669)
Avert panics for corner cases (e.g., nil pointers) and for implementations that
reside only on the pointer type. Add documentation and tests.
2022-01-21 09:51:21 -08:00
Sam Kleinman
8280672d33 mempool: reactor concurrency test tweaks (#7651) 2022-01-21 12:07:58 -05:00
M. J. Fromberger
5a1b5b0229 Update pending changelog from #7607. (#7666) 2022-01-21 08:00:03 -08:00
Alexander Shcherbakov
3f2da0e4e3 Fix query against the latest state in light client (#7642) 2022-01-21 15:24:46 +01:00
William Banfield
db7d4abdae consensus: fix height advances in test state (#7648)
The problem with the `TestStateFullRound1` is that the state that we are observeing, `cs`, can advance to the next height before we query its data. Specifically, on line `388`, when we called `validatePrevote`, the `cs` State had already advanced to height 2, so querying that State for the votes of height 1 either yielded nil or an erroneous value. This change adds a `ensurePrevoteMatch` function that checks that the prevote occurred and checks that it is for the expected block at the same time. If this change looks reasonable I can just apply the same fix to all of the places where we perform `ensurePrevote` followed by `validatePrevote` to use this function instead.
2022-01-20 22:21:41 +00:00
Sam Kleinman
78e4c7d379 autofile: avoid shutdown race (#7650) 2022-01-20 17:06:44 -05:00
Sam Kleinman
9dd67ad99d tests: update cleanup opertunities (#7647) 2022-01-20 15:48:26 -05:00
kmax.eth
449e127e6c privval: avoid re-signing vote when RHS and signbytes are equal (#7592)
* avoid re-signing vote when RHS and signbytes are equal

* avoid re-signing proposal when RHS and signbytes are equal

Co-authored-by: Callum Waters <cmwaters19@gmail.com>
Co-authored-by: William Banfield <4561443+williambanfield@users.noreply.github.com>
2022-01-20 15:06:13 -05:00
Sam Kleinman
9f4f51318c tests: update docker versions to match build version (#7646) 2022-01-20 12:17:32 -05:00
Jasmina Malicevic
d68d25dcd5 light: return light client status on rpc /status (#7536)
*light: rpc /status returns status of light client ; code refactoring
 light: moved lightClientInfo into light.go, renamed String to ID
test/e2e: Return light client trusted height instead of SyncInfo trusted height
test/e2e/start.go: Not waiting for light client to catch up in tests. Removed querying of syncInfo in start if the node is a light node

* light: Removed call to primary /status. Added trustedPeriod to light info
* light/provider: added ID function to return IP of primary and witnesses
* light/provider/http/http_test: renamed String() to ID()
2022-01-20 14:53:20 +01:00
Sam Kleinman
4e5c2b5e8f consensus: use delivertxsync (#7616) 2022-01-19 16:58:12 -05:00
Gui
ebbc3f02f5 p2p: always advertise self, to enable mutual address discovery (#7594)
Fixes #7593
2022-01-19 21:39:59 +00:00
M. J. Fromberger
c8e8a62084 abci/client: simplify client interface (#7607)
This change has two main effects:

1. Remove most of the Async methods from the abci.Client interface.
   Remaining are FlushAsync, CommitTxAsync, and DeliverTxAsync.

2. Rename the synchronous methods to remove the "Sync" suffix.

The rest of the change is updating the implementations, subsets, and mocks of
the interface, along with the call sites that point to them.

* Fix stringly-typed mock stubs.
* Rename helper method.
2022-01-19 10:58:56 -08:00
M. J. Fromberger
68d4fed236 consensus/state: avert a data race with state update and tests (#7643) 2022-01-19 10:47:06 -08:00
dependabot[bot]
cbae11c8fc build(deps): bump docker/build-push-action from 2.7.0 to 2.8.0 (#389)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 2.7.0 to 2.8.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v2.7.0...v2.8.0)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-19 09:53:22 -08:00
M. J. Fromberger
02c354d62c Fix cron spec in GitHub workflow. (#390)
* Fix quoting lints.
2022-01-19 09:47:39 -08:00
William Banfield
7bc3a7274a privval: do not use old proposal timestamp (#7621)
After #7592, @cmwaters noticed that the logic for re-using old timestamps for proposals may not work with proposer-based timestamps. This change removes the logic to re-use old proposal timestamps since it is no longer correct. Two proposals with different timestamps can no longer be treated as equivalent. Signing a proposal that only differs by timestamp in the new algorithm can be thought of as roughly equivalent to signing a proposal that only differs by `BlockID` in the old scheme. 

I also investigated the codebase and checked for any place we updated a timestamp using the pattern `(Timestamp = |Timestamp: )` and saw no additional places where we are updating the timestamp of a proposal message. 

Here is the output of that search:

```
privval/file.go:372:			vote.Timestamp = timestamp
privval/file.go:453:	lastVote.Timestamp = now
privval/file.go:454:	newVote.Timestamp = now
internal/test/factory/commit.go:25:			Timestamp:        now,
internal/test/factory/vote.go:34:		Timestamp:        time,
internal/consensus/state.go:2261:		Timestamp:        cs.voteTime(),
internal/consensus/state.go:2286:	vote.Timestamp = v.Timestamp
light/detector.go:414:		ev.Timestamp = common.Time
light/detector.go:418:		ev.Timestamp = trusted.Time
types/block.go:616:		Timestamp:        ts,
types/block.go:725:		Timestamp:        cs.Timestamp,
types/block.go:736:	cs.Timestamp = csp.Timestamp
types/block.go:800:		Timestamp:        commitSig.Timestamp,
types/evidence.go:84:		Timestamp:        blockTime,
types/evidence.go:190:	dve.Timestamp = evidenceTime
types/evidence.go:202:		Timestamp:        dve.Timestamp,
types/evidence.go:228:		Timestamp:        pb.Timestamp,
types/evidence.go:382:		Timestamp: %v}#%X`,
types/evidence.go:491:	l.Timestamp = evidenceTime
types/evidence.go:517:		Timestamp:           l.Timestamp,
types/evidence.go:546:		Timestamp:           lpb.Timestamp,
types/evidence.go:722:		Timestamp:        time,
types/vote.go:80:		Timestamp:        vote.Timestamp,
types/vote.go:216:		Timestamp:        vote.Timestamp,
types/vote.go:240:	vote.Timestamp = pv.Timestamp
types/test_util.go:27:			Timestamp:        now,
types/proposal.go:44:		Timestamp: tmtime.Now(),
types/proposal.go:132:	pb.Timestamp = p.Timestamp
types/proposal.go:157:	p.Timestamp = pp.Timestamp
types/canonical.go:49:		Timestamp: proposal.Timestamp,
types/canonical.go:62:		Timestamp: vote.Timestamp,
test/e2e/runner/evidence.go:186:		Timestamp:        evTime,
```
2022-01-19 17:42:09 +00:00
M. J. Fromberger
a806739375 abci/client: use a no-op logger in the test (#7633)
This averts a log-after-close issue. We should probably also chase the shutdown
issues, but since ABCI clients should generally only shut down once per process
I don't think this is a real priority, and the trace is hairy.
2022-01-19 08:58:35 -08:00
M. J. Fromberger
1af4113033 Increase test splits from 4 to 6. (#7630)
Decrease the likelihood that two flaky tests will hit
the same batch.

Account for the increase in test load from #7608.
2022-01-19 08:24:12 -08:00
dependabot[bot]
e6f6a13f8a build(deps): Bump github.com/prometheus/client_golang (#7636) 2022-01-19 11:50:52 +01:00
M. J. Fromberger
aea428d322 build: Make sure to test packages with external tests (#7608)
The test filter was looking for "TestGoFiles", which does not include tests in
a separate package (e.g., "package foo_test" for "package foo").
This caused several packages not to be tested in CI, including:

  github.com/tendermint/tendermint/abci/client
  github.com/tendermint/tendermint/crypto
  github.com/tendermint/tendermint/crypto/tmhash
  github.com/tendermint/tendermint/internal/eventbus
  github.com/tendermint/tendermint/internal/evidence
  github.com/tendermint/tendermint/internal/inspect
  github.com/tendermint/tendermint/internal/jsontypes
  github.com/tendermint/tendermint/internal/libs/protoio
  github.com/tendermint/tendermint/internal/libs/sync
  github.com/tendermint/tendermint/internal/p2p/pex
  github.com/tendermint/tendermint/internal/pubsub
  github.com/tendermint/tendermint/internal/pubsub/query
  github.com/tendermint/tendermint/internal/pubsub/query/syntax
  github.com/tendermint/tendermint/internal/state/indexer
  github.com/tendermint/tendermint/internal/state/indexer/block/kv
  github.com/tendermint/tendermint/libs/json
  github.com/tendermint/tendermint/libs/log
  github.com/tendermint/tendermint/libs/os
  github.com/tendermint/tendermint/light
  github.com/tendermint/tendermint/light/provider/http
  github.com/tendermint/tendermint/privval/grpc
  github.com/tendermint/tendermint/proto/tendermint/blocksync
  github.com/tendermint/tendermint/proto/tendermint/consensus
  github.com/tendermint/tendermint/proto/tendermint/statesync
  github.com/tendermint/tendermint/rpc/client
  github.com/tendermint/tendermint/rpc/client/mock
  github.com/tendermint/tendermint/test/e2e/tests
  github.com/tendermint/tendermint/test/fuzz/mempool
  github.com/tendermint/tendermint/test/fuzz/p2p/secretconnection
  github.com/tendermint/tendermint/test/fuzz/rpc/jsonrpc/server

Updates #7626 and #7634.
2022-01-18 18:36:46 -08:00
William Banfield
b6307c42e0 consensus: check proposal non-nil in prevote message delay metric (#7625) 2022-01-18 19:57:00 -05:00
M. J. Fromberger
5eae2e62c0 privval: synchronize leak check with shutdown (#7629)
The interaction between defers and t.Cleanup can be delicate.
For this case, which regularly flakes in CI, be explicit:
Defer the closes and waits before making any attempt to leaktest.
2022-01-18 16:36:09 -08:00
M. J. Fromberger
a7eb95065d autofile: ensure files are not reopened after closing (#7628)
During file rotation and WAL shutdown, there was a race condition between users
of an autofile and its termination. To fix this, ensure operations on an
autofile are properly synchronized, and report errors when attempting to use an
autofile after it was closed.

Notably:

- Simplify the cancellation protocol between signal and Close.
- Exclude writers to an autofile during rotation.
- Add documentation about what is going on.

There is a lot more that could be improved here, but this addresses the more
obvious races that have been panicking unit tests.
2022-01-18 14:57:20 -08:00
M. J. Fromberger
5cca45bb45 pex: improve handling of closed channels (#7623)
Reverts and improves on #7622. The problem turns out not to be on the PEX
channel side, but on the pass-through (Go) channel.
2022-01-18 14:32:22 -08:00
M. J. Fromberger
417166704a pex: do not send nil envelopes to the reactor (#7622) 2022-01-18 12:01:04 -08:00
M. J. Fromberger
7fd97bf44b pex: avert a data race on map access in the reactor (#7614)
There was a path on which computing the next delivery time did not hold the
lock, defying the admonition on its comment.
2022-01-18 07:22:50 -08:00
William Banfield
0c82ceaa5f consensus: calculate prevote message delay metric (#7551)
## What does this pull request do?
This pull requests adds two metrics intended for use in calculating an experimental value for `MessageDelay`.

The metrics are as follows:
```
# HELP tendermint_consensus_complete_prevote_message_delay Difference in seconds between the proposal timestamp and the timestamp of the prevote that achieved 100% of the voting power in the prevote step.
# TYPE tendermint_consensus_complete_prevote_message_delay gauge
tendermint_consensus_complete_prevote_message_delay{chain_id="test-chain-aZbwF1"} 0.013025505

# HELP tendermint_consensus_quorum_prevote_message_delay Difference in seconds between the proposal timestamp and the timestamp of the prevote that achieved a quorum in the prevote step.
# TYPE tendermint_consensus_quorum_prevote_message_delay gauge
tendermint_consensus_quorum_prevote_message_delay{chain_id="test-chain-aZbwF1"} 0.013025505
```

## Why this change?

 For more information on what these metrics are calculating, see #7202. The aim is to merge to backport these metrics to v0.34 and run nodes on a few popular chains with these metrics to determine the experimental values for `MessageDelay` on these popular chains and use these to select our default `SynchronyParams.MessageDelay` value.

## Why Gauges for the metrics?
Gauges allow us to overwrite the metric on each successive observation. We can then capture these metrics over time to track the highest and lowest observed value.
2022-01-18 14:55:18 +00:00
Sam Kleinman
b10c74647f testing: use noop loger with leakteset in more places (#7604) 2022-01-18 09:08:20 -05:00
Sam Kleinman
c0b56e207a consensus: test shutdown to avoid hangs (#7603) 2022-01-18 08:55:13 -05:00
Kene
49153b753c rpc: paginate mempool /unconfirmed_txs endpoint (#7612)
This commit changes the behaviour of the /unconfirmed_txs endpoint by replacing limit with a page and perPage parameter for pagination.
The test case for unconfirmed_txs have been accommodated to properly test this change and the documentation for the API as well.
2022-01-18 10:58:32 +01:00
Sergio Mena
c06c6a9244 Remove natural language validation from 'Super linter': it shows false positives as errors 2022-01-17 10:25:14 +01:00
Sergio Mena
611cc63a27 Addressed Callum's latest comments 2022-01-17 10:25:14 +01:00
Sergio Mena
33f529b06b Revert "Included extra parameter in FinalizeBlock in an attempt to include https://github.com/tendermint/tendermint/issues/1909 in this spec"
This reverts commit 22e8aafa03c189a6d97301076b711199808ea438.
2022-01-17 10:25:14 +01:00
Sergio Mena
e7136888bb Addressed Callum's comments 2022-01-17 10:25:14 +01:00
Sergio Mena
eb233d5565 Update spec/abci++/abci++_methods_002_draft.md
Co-authored-by: Callum Waters <cmwaters19@gmail.com>
2022-01-17 10:25:14 +01:00
Sergio Mena
f774c09a97 Editorial/Lint changes 2022-01-17 10:25:14 +01:00
Sergio Mena
5c41de2b85 Update spec/abci++/abci++_app_requirements_002_draft.md
Co-authored-by: Josef Widder <44643235+josef-widder@users.noreply.github.com>
2022-01-17 10:25:14 +01:00
Sergio Mena
54a1773435 Addressed propose timeout issue if App is fully executing blocks 2022-01-17 10:25:14 +01:00
Sergio Mena
e3da1bf94a Handle the distinction between 'any' occurrences (*) and 'infinite' occurrences (omega) in the grammar 2022-01-17 10:25:14 +01:00
Sergio Mena
81be4d0d14 Included extra parameter in FinalizeBlock in an attempt to include https://github.com/tendermint/tendermint/issues/1909 in this spec 2022-01-17 10:25:14 +01:00
Sergio Mena
f4e1039830 Addressed outstanding comments 2022-01-17 10:25:14 +01:00
Sergio Mena
af8a1a2ce3 Fixed hyperlinks 2022-01-17 10:25:14 +01:00
Sergio Mena
0d610258f5 Addressed comments from @lklimek 2022-01-17 10:25:14 +01:00
Sergio Mena
ddb1eb27c9 Editorial changes 2022-01-17 10:25:14 +01:00
Sergio Mena
a75a2c6f00 Fixed bug in grammar 2022-01-17 10:25:14 +01:00
Sergio Mena
ff2104ec0b Moved the same_block boolean to ConsensusParams. Revamped the "Tendermint's behavior" section 2022-01-17 10:25:14 +01:00
Sergio Mena
009c120abb Addressed latest comments from Josef and William 2022-01-17 10:25:14 +01:00
Sergio Mena
7bbbba9acf Update spec/abci++/abci++_app_requirements_002_draft.md spec/abci++/abci++_basic_concepts_002_draft.md
Co-authored-by: William Banfield <4561443+williambanfield@users.noreply.github.com>
2022-01-17 10:25:14 +01:00
Sergio Mena
383d6b1117 Fixed rebase conflicts 2022-01-17 10:25:14 +01:00
Sergio Mena
7c1883c692 ABCI++: Found a solution to set the execution mode 2022-01-17 10:25:14 +01:00
Sergio Mena
523974167a ABCI++: Major refactor of spec's structure. Addressed Josef's comments. Merged ABCI's methods and data structs that didn't change. Added introductory paragraphs 2022-01-17 10:25:14 +01:00
Sergio Mena
57cc810744 Fixed 'bug' in Property 11. Reworked section 'App expectations from Tendermint' 2022-01-17 10:25:14 +01:00
Sergio Mena
438b490fe0 Update spec/abci++/abci++_properties_001_draft.md
Co-authored-by: Josef Widder <44643235+josef-widder@users.noreply.github.com>
2022-01-17 10:25:14 +01:00
Sergio Mena
243601d02a Reworked the text to reflect the contents of meeting on 2021-12-09 2022-01-17 10:25:14 +01:00
Sergio Mena
6fb0ca4201 Addressed William's latest comments. Added text: 'App devs SHOULD return true in ProcessProposal/VerifyVoteExtension' 2022-01-17 10:25:14 +01:00
Sergio Mena
9496ea84f8 Updated the text with results of discussions in the last days. Addressed William's comments 2022-01-17 10:25:14 +01:00
Sergio Mena
f3275ae608 Addressed comments from Wed's meetings. Tackled TODOs that are now well understood 2022-01-17 10:25:14 +01:00
Sergio Mena
500a4a1419 Addressed comments from meeting on 2021-11-30 2022-01-17 10:25:14 +01:00
Sergio Mena
8c2645aa81 Addressed comments from meeting on Nov 29. Draft PR ready for PR 2022-01-17 10:25:14 +01:00
Sergio Mena
e9211f5941 Second iteration. Extended all TODOs that don't need discussions. Params and types included. First version of ABCI++'s properties 2022-01-17 10:25:14 +01:00
Sergio Mena
836a723ca3 Developed the "Application's point of view" for ProcessProposal 2022-01-17 10:25:14 +01:00
Sergio Mena
86408529e0 Update spec/abci++/abci++_properties_001_draft.md
Co-authored-by: Josef Widder <44643235+josef-widder@users.noreply.github.com>
2022-01-17 10:25:14 +01:00
Sergio Mena
35eaa0b0a8 ABCI++ spec. First draft of properties 2022-01-17 10:25:14 +01:00
M. J. Fromberger
679b6a65b8 light: fix provider error plumbing (#7610)
The custom error types in the provider package did not propagate their wrapped
underlying reasons, making it difficult for the test to check that the correct
error was observed.

- Fix the custom errors to have a true underlying error (not just a string).
- Add Unwrap methods to support inspection by errors.Is.
- Update usage in a few places.
- Fix the test to check for acceptable variation.

Fixes #7609.
2022-01-16 13:48:21 -08:00
M. J. Fromberger
c24f003b55 protoio: fix incorrect test assertion (#7606)
After writing and then reading a bunch of random messages, the test was
checking that it did not read the same number of messages that it wrote.
The sense of this check was inverted; they should match.

Introduced by accident in #7522. I'm not sure why this did not show up in CI.

Edit: I now know why it didn't show up in ci: #7608.
2022-01-16 20:39:37 +00:00
Sebastian Gröbler
701e6026c5 Update README.md (#7602)
Fixed typo in exchange

Co-authored-by: M. J. Fromberger <fromberger@interchain.io>
2022-01-14 18:33:47 -08:00
M. J. Fromberger
dbe2146d0a rpc: simplify the encoding of interface-typed arguments in JSON (#7600)
Add package jsontypes that implements a subset of the custom libs/json 
package. Specifically it handles encoding and decoding of interface types
wrapped in "tagged" JSON objects. It omits the deep reflection on arbitrary
types, preserving only the handling of type tags wrapper encoding.

- Register interface types (Evidence, PubKey, PrivKey) for tagged encoding.
- Update the existing implementations to satisfy the type.
- Register those types with the jsontypes registry.
- Add string tags to 64-bit integer fields where needed.
- Add marshalers to structs that export interface-typed fields.
2022-01-14 18:14:09 -08:00
Sam Kleinman
7ed57ef5f9 statesync: more orderly dispatcher shutdown (#7601) 2022-01-14 16:34:12 -05:00
Sam Kleinman
2199e0a8a1 light: convert validation panics to errors (#7597) 2022-01-14 16:18:50 -05:00
M. J. Fromberger
bab9f68689 Attempt to fix the markdown link checker. (#387)
Make sure it runs for pull requests as well as pushes to master.
Otherwise, I think, it may not trigger to satisfy the requirement.

* Fold in version bump from #385.

Co-authored-by: sweexordious <chamirachid1@gmail.com>
2022-01-14 13:06:06 -08:00
Sam Kleinman
887cb219ab light: remove test panic (#7588) 2022-01-14 13:16:43 -05:00
Sam Kleinman
82b65868ce node+autofile: avoid leaks detected during WAL shutdown (#7599) 2022-01-14 13:04:01 -05:00
William Banfield
2f75899320 ADR-74: Migrate Timeout Parameters to Consensus Parameters (#7503)
related to: #7274 and #7275 

Still somewhat uncertain on two things that I'd appreciate more feedback on:
1. The optional temporary local overrides. Perhaps this is superfluous and we can simply make the transition without the override?
2. If this set of parameters seems to be large enough to allow application developers to create the chains they want but not so large as to be needlessly complex.
2022-01-14 16:48:59 +00:00
William Banfield
abb7c8c2b0 RFC-009: Consensus Parameter Upgrades (#7524)
Related to #7503
2022-01-14 16:47:02 +00:00
M. J. Fromberger
c065eeb18a Add changelog entries from release v0.34.15. (#7598)
Fixes #7596.
2022-01-14 16:07:53 +00:00
M. J. Fromberger
1ff69361e8 rpc: remove dependency of URL (GET) requests on tmjson (#7590)
The parameters for RPC GET requests are parsed from query arguments in the
request URL. Rework this code to remove the need for tmjson. The structure of a
call still requires reflection, and still works the same way as before, but the
code structure has been simplified and cleaned up a bit.

Points of note:

- Consolidate handling of pointer types, so we only need to dereference once.
- Reduce the number of allocations of reflective types.
- Report errors for unsupported types rather than returning untyped nil.

Update the tests as well. There was one test case that checked for an error on
a behaviour the OpenAPI docs explicitly demonstrates as supported, so I fixed
that test case, and also added some new ones for cases that weren't checked.

Related:

* Update e2e base Go image to 1.17 (to match config).
2022-01-14 07:53:53 -08:00
Sam Kleinman
159d763422 light: avoid panic for integer underflow (#7589) 2022-01-14 09:58:41 -05:00
M. J. Fromberger
9409cdea55 rpc: update fuzz criteria to match the implementation (#7595)
I missed this during my previous pass.

Requirements for handlers:

- First argument is context.Context.
- Last of two results is error.
2022-01-14 14:41:57 +00:00
M. J. Fromberger
ec59b1a1ae rpc: check RPC service functions more carefully (#7587)
Require that RPC functions take a context as their first argument, and return
an error as either their only result, or the second of two results.

This does not change how functions are dispatched, but will make it a little
easier to make more invasive changes in the near future.
2022-01-13 13:27:45 -08:00
Sam Kleinman
7e8fa4ed85 consensus: explicit test timeout (#7585) 2022-01-13 16:11:51 -05:00
M. J. Fromberger
b7c19a5cd4 rpc: clean up the RPCFunc constructor signature (#7586)
Instead of taking a comma-separated string of parameter names, take each
parameter name as a separate argument. Now that we no longer have an extra flag
for caching, this fits nicely into a variadic trailer.

* Update all usage of NewRPCFunc and NewWSRPCFunc.
2022-01-13 12:13:28 -08:00
Sam Kleinman
8ff367ad29 log: avoid use of legacy test logging (#7583) 2022-01-13 14:38:54 -05:00
M. J. Fromberger
81ee41228a rpc: consolidate RPC route map construction (#7582)
Define interfaces for the various methods a service may implement.  This is
basically just the set of things on Environment that are exported as RPCs, but
these are also implemented by the light proxy.

* internal/rpc: use NewRoutesMap to construct routes on service start
* light/proxy: use NewRoutesMap to construct RPC routes
2022-01-13 10:45:36 -08:00
Sam Kleinman
cef17e1c02 node+rpc: rpc environment should own it's creation (#7573) 2022-01-13 12:39:48 -05:00
Sam Kleinman
fd2eccbae1 consensus: use noop logger for WAL test (#7580) 2022-01-13 12:05:12 -05:00
Sam Kleinman
ed660bddeb node+privval: refactor privval construction (#7574) 2022-01-13 11:53:05 -05:00
M. J. Fromberger
5a89263dbe rpc: simplify panic recovery in the server middleware (#7578)
Rather than installing two separate panic handlers, defer the bookkeeping
separately from recovery, and lift the delegated handler call out to the top
level of the wrapper.

Also: Regularize the server middleware wrappers.
2022-01-13 07:02:21 -08:00
M. J. Fromberger
904957aaa9 rpc: rework how responses are written back via HTTP (#7575)
Add writeRPCResponse and writeHTTPResponse helpers, that handle the way RPC
responses are written to HTTP replies. These replace the exported helpers.

Visible effects:

- JSON results are now marshaled without indentation.
- HTTP status codes are now normalized.
- Cache control headers are no longer set.

Details:

- When writing a response to a URL (GET) request, do not marshal the whole
  JSON-RPC object into the body, only encode the result or the error object.
  This is a user-visible change.

- Do not change the HTTP status code for RPC errors. The RPC error already
  reports what went wrong, the HTTP status should only report problems with the
  HTTP transaction itself. This is a user-visible change.

- Encode JSON without indentation in POST response bodies. This is mainly cosmetic
  but saves quite a bit of response data. Indent is still applied to GET responses to make
  life easier for code examples.

- Remove an obsolete TODO about reporting an HTTP error on websocket upgrade.
  Nothing needed to change; the upgrader already reports an error.

- Report an HTTP error when starting the server loop fails.

- Improve logging for encoding errors.

- Log less aggressively.
2022-01-12 17:25:58 -08:00
Sam Kleinman
2a348cc1e9 logging: remove reamining instances of SetLogger interface (#7572) 2022-01-12 16:56:49 -05:00
Sam Kleinman
7a9a38d9d7 service: avoid debug logs before error (#7564) 2022-01-12 16:17:43 -05:00
Sam Kleinman
25e665df17 internal/libs: delete unused functionality (#7569) 2022-01-12 15:55:42 -05:00
Sam Kleinman
e07c4cdcf2 node: collapse initialization internals (#7567) 2022-01-12 15:32:22 -05:00
M. J. Fromberger
5c1399d803 rpc: fix mock test cases (#7571)
In two cases, we check for the content of an error right after asserting that
no error occurs. Fix the sense of those checks.

In one case, we check that there is no error with the diagnostic "expected
error". It's not clear whether this means "an error was expected" (which is
what I believe) or "we got the expected error". However, given the way the mock
plumbing is set up, the first interpretation seems right.
2022-01-12 20:17:53 +00:00
Sam Kleinman
6efdba8aa9 statesync: SyncAny test buffering (#7570) 2022-01-12 13:38:23 -05:00
M. J. Fromberger
1f5e64e5b6 rpc: remove cache control settings from the HTTP server (#7568)
We should not set cache-control headers on RPC responses. HTTP caching
interacts poorly with resources that are expected to change frequently, or
whose rate of change is unpredictable.

More subtly, all calls to the POST endpoint use the same URL, which means a
cacheable response from one call may actually "hide" an uncacheable response
from a subsequent one. This is less of a problem for the GET endpoints, but
that means the behaviour of RPCs varies depending on which HTTP method your
client happens to use. Websocket requests were already marked statically
uncacheable, adding yet a third combination.

To address this:

- Stop setting cache-control headers.
- Update the tests that were checking for those headers.
- Remove the flags to request cache-control.

Apart from affecting the HTTP response headers, this change does not modify the
behaviour of any of the RPC methods.
2022-01-12 18:20:59 +00:00
Sam Kleinman
fb10d1c705 statesync: clarify test cleanup (#7565) 2022-01-12 12:57:23 -05:00
Sam Kleinman
46f56fcea5 node: move seed node implementation to its own file (#7566) 2022-01-12 12:33:17 -05:00
dependabot[bot]
4d11336475 build(deps): Bump github.com/BurntSushi/toml from 0.4.1 to 1.0.0 (#7562)
Bumps [github.com/BurntSushi/toml](https://github.com/BurntSushi/toml) from 0.4.1 to 1.0.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/BurntSushi/toml/releases">github.com/BurntSushi/toml's releases</a>.</em></p>
<blockquote>
<h2>v1.0.0</h2>
<p>This release adds much more detailed errors, support for the <code>toml.Marshaler</code> interface, and several fixes.</p>
<p>There is no special meaning in the jump to v1.0; the 0.x releases were always treated as if they're 1.x with regards to compatibility; the versioning scheme for this library predates the release of modules.</p>
<h2>New features</h2>
<ul>
<li>
<p>Error reporting is much improved; the reported position of errors should now always be correct and the library can print more detailed errors (<a href="https://github-redirect.dependabot.com/BurntSushi/toml/issues/299">#299</a>, <a href="https://github-redirect.dependabot.com/BurntSushi/toml/issues/332">#332</a>)</p>
<p>Decode always return a <code>toml.ParseError</code>, which has three methods:</p>
<ul>
<li>
<p><code>Error()</code> behaves as before and shows a single concise line with the error.</p>
</li>
<li>
<p><code>ErrorWithLocation()</code> shows the same error, but also shows the line the error occurred at, similar to e.g. clang or the Rust compiler.</p>
</li>
<li>
<p><code>ErrorWithUsage()</code> is the same as <code>ErrorWithPosition()</code>, but may also show a longer usage guidance message. This isn't always present (in which case it behaves identical to <code>ErrorWithPosition()</code>), but it should be present for most common mistakes and sources of confusion.</p>
</li>
</ul>
<p>Which error the correct one to use is depends on your application and preferences; in general I would recommend using at least <code>ErrorWithPosition()</code> for user-facing errors, as it's much more helpful for users of any skill level. If your users are likely to be non-technical then <code>ErrorWithUsage()</code> is probably a good idea; I did my best to avoid technical jargon such as &quot;newline&quot; and phrase things in a way that's understandable by most people not intimately familiar with these sort of things.</p>
<p>Additionally, the TOML key that fialed should now always be reported in all errors.</p>
</li>
<li>
<p>Add <code>toml.Marshaler</code> interface. This can be used if you want full control over how something is marshalled as TOML, similar to <code>json.Marshaler</code> etc. This takes precedence over <code>encoding.TextMarshaler</code>. (<a href="https://github-redirect.dependabot.com/BurntSushi/toml/issues/327">#327</a>)</p>
</li>
<li>
<p>Allow TOML integers to be decoded to a Go float (<a href="https://github-redirect.dependabot.com/BurntSushi/toml/issues/325">#325</a>)</p>
<p>Previously <code>int = 42</code> could only be decoded to an <code>int*</code> type; now this can also be decoded in a <code>float</code> type as long as it can be represented without loss of data.</p>
</li>
</ul>
<h2>Fixes</h2>
<ul>
<li>
<p>Key.String() is now quoted when needed (<a href="https://github-redirect.dependabot.com/BurntSushi/toml/issues/333">#333</a>)</p>
</li>
<li>
<p>Fix decoding of nested structs on 32bit platforms (<a href="https://github-redirect.dependabot.com/BurntSushi/toml/issues/314">#314</a>)</p>
</li>
<li>
<p>Empty slices are now always <code>[]T{}</code> rather than nil, which was the behaviour in v0.3.1 and before. While they are identical for most purposes, encoding/json encodes them different (<code>[]</code> vs. <code>null</code>), making it an (accidentally) incompatible change (<a href="https://github-redirect.dependabot.com/BurntSushi/toml/issues/339">#339</a>)</p>
</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="4272474656"><code>4272474</code></a> Reject control characters everywhere</li>
<li><a href="9bbaaec997"><code>9bbaaec</code></a> Update toml-test</li>
<li><a href="8a54f3e8df"><code>8a54f3e</code></a> Merge TestDecodeInterfaceSlice in TestDecodeSlices</li>
<li><a href="9515b92979"><code>9515b92</code></a> Decode S=[] into a non-nil []interface{}. (<a href="https://github-redirect.dependabot.com/BurntSushi/toml/issues/339">#339</a>)</li>
<li><a href="7d0236fe74"><code>7d0236f</code></a> Make sure quoted keys with dots work well (<a href="https://github-redirect.dependabot.com/BurntSushi/toml/issues/333">#333</a>)</li>
<li><a href="ff0a3f89c2"><code>ff0a3f8</code></a> Add back build tags for toml-test files</li>
<li><a href="7356d5f888"><code>7356d5f</code></a> Few staticcheck fixes</li>
<li><a href="b1471ff6cf"><code>b1471ff</code></a> Don't allow &quot;0_0&quot;</li>
<li><a href="847ee8a07a"><code>847ee8a</code></a> Update toml-test</li>
<li><a href="461925704e"><code>4619257</code></a> Clearer errors when decoding to invalid types (<a href="https://github-redirect.dependabot.com/BurntSushi/toml/issues/332">#332</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/BurntSushi/toml/compare/v0.4.1...v1.0.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/BurntSushi/toml&package-manager=go_modules&previous-version=0.4.1&new-version=1.0.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2022-01-12 14:25:23 +00:00
Sam Kleinman
cc51bf7587 tests: remove in-test logging (#7558) 2022-01-11 16:39:31 -05:00
Sam Kleinman
841629f5b7 privval: improve client shutdown to prevent resource leak (#7544) 2022-01-11 15:09:19 -05:00
M. J. Fromberger
50ac52e28d rpc: replace custom context-like argument with context.Context (#7559)
* Rename rpctypes.Context to CallInfo.

Add methods to attach and recover this value from a context.Context.

* Rework RPC method handlers to accept "real" contexts.

- Replace *rpctypes.Context arguments with context.Context.
- Update usage of RPC context fields to use CallInfo.
2022-01-11 11:47:56 -08:00
M. J. Fromberger
a4d0a43100 rpc: refactor the HTTP POST handler (#7555)
No functional changes.

- Pull out a some helper code to simplify the control flow within the body of
  the HTTP request handler.

- Front-load the URL path check so it does not get repeated for each request.
2022-01-11 11:04:55 -08:00
Sam Kleinman
5bf1bdcfb4 reactors: skip log on some routine cancels (#7556) 2022-01-11 12:56:52 -05:00
M. J. Fromberger
7f8b75e1ee rpc: replace anonymous arguments with structured types (#7552)
Instead of using anonymous maps, define tagged struct types for JSON argument
encoding. This allows us to have the encoding rules we want without tmjson.

This commit handles the "easy" cases. BroadcastEvidence is omitted here,
because it depends on the interface encoding rules from tmjson. I will address
that in a forthcoming change.
2022-01-11 06:37:38 -08:00
Kene
2f858f1448 node: new concrete type for seed node implementation (#7521)
Defines a different concrete type that satisfies the service interface for a seed node.
update the seed node unit test to assert the new type.

Fixes #6775
2022-01-11 14:07:49 +01:00
M. J. Fromberger
6291d22f46 rpc: simplify the JSON-RPC client Caller interface (#7549)
* Update Caller interface and its documentation.
* Rework MapToRequest as ParamsToRequest.

The old interface returned the result as well as populating it.  Nothing was
using this, so drop the duplicated value from the return signature. Clarify the
documentation on the Caller type.

Rework the MapToRequest helper to take an arbitrary value instead of only a
map. This is groundwork for getting rid of the custom marshaling code. For now,
however, the implementation preserves the existing behaviour for the map, until
we can replace those.
2022-01-10 13:56:43 -08:00
Sam Kleinman
692701a551 abci: socket server shutdown response handler (#7547) 2022-01-10 16:26:40 -05:00
Sam Kleinman
d331a08607 statesync: use specific testing.T logger for tests (#7543) 2022-01-10 15:38:20 -05:00
M. J. Fromberger
8e58c564c0 rpc: collapse Caller and HTTPClient interfaces. (#7548)
These two interfaces are identical, and besides HTTPClient being confusingly
named, all but one location uses Caller. Update that one location, and drop the
redundant interface.
2022-01-10 11:52:52 -08:00
M. J. Fromberger
211d755aca rpc: remove positional parameter encoding from clients (#7545)
Apart from the tests for the websocket client, positional parameters are not
used by RPC clients. The server supports both arrays and objects, but the
client only needs to provide one or the other.
2022-01-10 11:20:30 -08:00
Sam Kleinman
0f3f2aa4bc log: remove support for traces (#7542) 2022-01-10 13:56:42 -05:00
Sam Kleinman
f19f84bc8c test: uniquify prom IDs (#7540) 2022-01-10 13:03:53 -05:00
dependabot[bot]
6c669b70a4 build(deps): Bump technote-space/get-diff-action from 5 to 6.0.1 (#7535)
Bumps [technote-space/get-diff-action](https://github.com/technote-space/get-diff-action) from 5 to 6.0.1.
- [Release notes](https://github.com/technote-space/get-diff-action/releases)
- [Changelog](https://github.com/technote-space/get-diff-action/blob/main/.releasegarc)
- [Commits](https://github.com/technote-space/get-diff-action/compare/v5...v6.0.1)

---
updated-dependencies:
- dependency-name: technote-space/get-diff-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-10 11:46:41 +01:00
M. J. Fromberger
366ab1947a Replace uses of libs/json with encoding/json. (#7534)
Where possible, replace uses of the custom JSON library with the standard
library. The custom library treats interface and unnamed lteral types
differently, so this change avoids those even where it would probably be safe
to switch them.
2022-01-08 08:47:26 -08:00
Sam Kleinman
d5c39f907d test/factory: pass testing.T around rather than errors for test fixtures (#7518) 2022-01-07 15:51:39 -05:00
Sam Kleinman
90cf742065 pex: regularize reactor constructor (#7532) 2022-01-07 13:52:11 -05:00
Sam Kleinman
aa76a367e0 blocksync: standardize construction process (#7531) 2022-01-07 13:40:08 -05:00
Sam Kleinman
ae7a76a175 evidence: reactor constructor (#7533) 2022-01-07 13:28:23 -05:00
Sam Kleinman
059b38afe4 mempool: refactor mempool constructor (#7530) 2022-01-07 12:49:22 -05:00
Sam Kleinman
fc36c7782f statesync: reactor and channel construction (#7529) 2022-01-07 12:04:17 -05:00
Sam Kleinman
10402b728f consensus+p2p: change how consensus reactor is constructed (#7525) 2022-01-07 10:59:10 -05:00
Sam Kleinman
74a8941854 consensus: remove reactor options (#7526) 2022-01-07 09:15:35 -05:00
Sam Kleinman
569629486b tests: remove panics from test fixtures (#7522) 2022-01-06 17:34:32 -05:00
Sam Kleinman
a91d3cb894 e2e: make tx test more stable (#7523) 2022-01-06 15:43:30 -05:00
Sam Kleinman
0ae974e639 libs/os: remove trap signal (#7515) 2022-01-06 08:26:37 -05:00
Sam Kleinman
386c3a0ff7 e2e: constrain test parallelism and reporting (#7516) 2022-01-05 17:45:16 -05:00
Sam Kleinman
752a3a6c24 types: tests should not panic (#7506) 2022-01-05 14:21:40 -05:00
Sam Kleinman
69f0a3b1c0 e2e: avoid global test context (#7512) 2022-01-05 13:35:27 -05:00
Sam Kleinman
332163ede6 testing: remove background contexts (#7509) 2022-01-05 12:42:57 -05:00
Sam Kleinman
8564c5079f e2e: use more simple strings for generated transactions (#7513) 2022-01-05 12:17:23 -05:00
Sam Kleinman
4137c16d3f privval: improve test hygine (#7511) 2022-01-05 11:58:14 -05:00
Sam Kleinman
f2cc496f09 testing: pass testing.T to assert and require always, assertion cleanup (#7508) 2022-01-05 09:25:08 -05:00
Sam Kleinman
3c8955e4b8 errors: formating cleanup (#7507) 2022-01-04 16:11:28 -05:00
Sam Kleinman
a67e0e6c43 light: remove global context from tests (#7505) 2022-01-04 13:35:49 -05:00
Sam Kleinman
5c0abb5367 testing: use scoped logger for all public packages (#7504) 2022-01-04 12:56:17 -05:00
Sam Kleinman
430817d9e9 types: remove panic from block methods (#7501) 2022-01-03 16:14:26 -05:00
M. J. Fromberger
5f85c8f536 types: fix path handling in node key tests (#7493)
These tests use a deterministic and unseeded random source to generate
non-colliding filenames for testing. When testing locally, this means tests are
not hermetic from one run to the next.

Use proper temp directories, and clean up after they're done.
2022-01-03 09:02:14 -08:00
M. J. Fromberger
7cdf560173 config: add a Deprecation annotation to P2PConfig.Seeds. (#7496) 2021-12-27 16:50:47 -08:00
dependabot[bot]
41bfcfeb31 build(deps): Bump docker/login-action from 1.10.0 to 1.12.0 (#7494)
Bumps [docker/login-action](https://github.com/docker/login-action) from 1.10.0 to 1.12.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/docker/login-action/releases">docker/login-action's releases</a>.</em></p>
<blockquote>
<h2>v1.12.0</h2>
<ul>
<li>ECR: only set credentials if username and password are specified (<a href="https://github-redirect.dependabot.com/docker/login-action/issues/128">#128</a>)</li>
<li>Refactor to use aws-sdk v3 (<a href="https://github-redirect.dependabot.com/docker/login-action/issues/128">#128</a>)</li>
</ul>
<h2>v1.11.0</h2>
<ul>
<li>ECR: switch implementation to use the AWS SDK (<a href="https://github-redirect.dependabot.com/docker/login-action/issues/126">#126</a>)</li>
<li><code>ecr</code> input to specify whether the given registry is ECR (<a href="https://github-redirect.dependabot.com/docker/login-action/issues/123">#123</a>)</li>
<li>Test against Windows runner (<a href="https://github-redirect.dependabot.com/docker/login-action/issues/126">#126</a>)</li>
<li>Update instructions for Google registry (<a href="https://github-redirect.dependabot.com/docker/login-action/issues/127">#127</a>)</li>
<li>Update dev workflow (<a href="https://github-redirect.dependabot.com/docker/login-action/issues/111">#111</a>)</li>
<li>Small changes for GHCR doc (<a href="https://github-redirect.dependabot.com/docker/login-action/issues/86">#86</a>)</li>
<li>Update dev dependencies (<a href="https://github-redirect.dependabot.com/docker/login-action/issues/85">#85</a>)</li>
<li>Bump ansi-regex from 5.0.0 to 5.0.1 (<a href="https://github-redirect.dependabot.com/docker/login-action/issues/101">#101</a>)</li>
<li>Bump tmpl from 1.0.4 to 1.0.5 (<a href="https://github-redirect.dependabot.com/docker/login-action/issues/100">#100</a>)</li>
<li>Bump <code>@​actions/core</code> from 1.4.0 to 1.6.0 (<a href="https://github-redirect.dependabot.com/docker/login-action/issues/94">#94</a> <a href="https://github-redirect.dependabot.com/docker/login-action/issues/103">#103</a>)</li>
<li>Bump codecov/codecov-action from 1 to 2 (<a href="https://github-redirect.dependabot.com/docker/login-action/issues/88">#88</a>)</li>
<li>Bump hosted-git-info from 2.8.8 to 2.8.9 (<a href="https://github-redirect.dependabot.com/docker/login-action/issues/83">#83</a>)</li>
<li>Bump node-notifier from 8.0.0 to 8.0.2 (<a href="https://github-redirect.dependabot.com/docker/login-action/issues/82">#82</a>)</li>
<li>Bump ws from 7.3.1 to 7.5.0 (<a href="https://github-redirect.dependabot.com/docker/login-action/issues/81">#81</a>)</li>
<li>Bump lodash from 4.17.20 to 4.17.21 (<a href="https://github-redirect.dependabot.com/docker/login-action/issues/80">#80</a>)</li>
<li>Bump y18n from 4.0.0 to 4.0.3 (<a href="https://github-redirect.dependabot.com/docker/login-action/issues/79">#79</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="42d299face"><code>42d299f</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/docker/login-action/issues/130">#130</a> from crazy-max/ci-workflow</li>
<li><a href="4858b0b5ea"><code>4858b0b</code></a> Update ci workflow</li>
<li><a href="1d7d8649e7"><code>1d7d864</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/docker/login-action/issues/128">#128</a> from Flydiverny/aws-sdk-v3</li>
<li><a href="58855695bb"><code>5885569</code></a> refactor: use v3 sdk</li>
<li><a href="d9927c4142"><code>d9927c4</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/docker/login-action/issues/123">#123</a> from crazy-max/ecr-input</li>
<li><a href="b9a4d91ee5"><code>b9a4d91</code></a> ecr input to specify whether the given registry is ECR</li>
<li><a href="b20b9f5e31"><code>b20b9f5</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/docker/login-action/issues/126">#126</a> from crazy-max/aws-sdk</li>
<li><a href="cb21399f71"><code>cb21399</code></a> ci: test against windows runner</li>
<li><a href="faae4d6665"><code>faae4d6</code></a> ecr: switch implementation to use the AWS SDK</li>
<li><a href="4d84a3c20f"><code>4d84a3c</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/docker/login-action/issues/127">#127</a> from crazy-max/carry-124</li>
<li>Additional commits viewable in <a href="https://github.com/docker/login-action/compare/v1.10.0...v1.12.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=docker/login-action&package-manager=github_actions&previous-version=1.10.0&new-version=1.12.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2021-12-27 17:42:10 +00:00
dependabot[bot]
a86965679d build(deps): Bump github.com/rs/cors from 1.8.0 to 1.8.2 (#7484)
Bumps [github.com/rs/cors](https://github.com/rs/cors) from 1.8.0 to 1.8.2.
- [Release notes](https://github.com/rs/cors/releases)
- [Commits](https://github.com/rs/cors/compare/v1.8.0...v1.8.2)

---
updated-dependencies:
- dependency-name: github.com/rs/cors
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: M. J. Fromberger <fromberger@interchain.io>
2021-12-22 09:00:50 -08:00
dependabot[bot]
b695d30aae build(deps): bump docker/login-action from 1.11.0 to 1.12.0 (#380)
Bumps [docker/login-action](https://github.com/docker/login-action) from 1.11.0 to 1.12.0.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v1.11.0...v1.12.0)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-12-22 08:18:31 -08:00
Carlos Rodriguez
2f5ad5f8cc docs: update go ws code snippets (#7486)
* doc: fix typos in /tx_search and /tx.
* docs: update of go snippets for subscribe and unsubscribe operations

Co-authored-by: Carlos Rodriguez <crodveg@gmail.com>
2021-12-22 08:13:53 -08:00
dependabot[bot]
98c122f471 build(deps): bump docker/login-action from 1.10.0 to 1.11.0 (#378)
* build(deps): bump docker/login-action from 1.10.0 to 1.11.0

Bumps [docker/login-action](https://github.com/docker/login-action) from 1.10.0 to 1.11.0.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v1.10.0...v1.11.0)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

* Run the omnibus linter always.

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: M. J. Fromberger <michael.j.fromberger@gmail.com>
2021-12-20 08:23:02 -08:00
sgmoore
e7afc57a6a Remove extra white space (#7477) 2021-12-19 08:07:27 -08:00
Sam Kleinman
1630d1cf3e privval: remove panics in privval implementation (#7475) 2021-12-17 16:28:32 -05:00
Sam Kleinman
3b6c3890d6 rfc: don't panic (#7472) 2021-12-17 16:15:01 -05:00
M. J. Fromberger
cea8bcc9bb Remove the "URI" RPC client. (#7474)
The JSON-RPC endpoint accepts requests via URL (GET) and JSON (POST).  There is
no real point in having client libraries for both modes.

A search of the SDK and on GitHub suggests that most usage is via the JSON
client (via the New constructor) or websocket (NewWS), and the only uses I
found of the NewURI client constructor are in copies of our own test code.

This does not change the functionalitiy of the server, so curl and other
URL-based clients in other languages will still function as before.
2021-12-17 09:56:41 -08:00
Sam Kleinman
9a0dbdbf13 libs/rand: remove custom seed function (#7473) 2021-12-17 12:15:27 -05:00
dependabot[bot]
ff615dda66 build(deps): Bump github.com/spf13/viper from 1.10.0 to 1.10.1 (#7470)
Bumps [github.com/spf13/viper](https://github.com/spf13/viper) from 1.10.0 to 1.10.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/spf13/viper/releases">github.com/spf13/viper's releases</a>.</em></p>
<blockquote>
<h2>v1.10.1</h2>
<p>This is a maintenance release upgrading the Consul dependency fixing CVEs.</p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="f646c50b18"><code>f646c50</code></a> chore(deps): update dependencies</li>
<li>See full diff in <a href="https://github.com/spf13/viper/compare/v1.10.0...v1.10.1">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/spf13/viper&package-manager=go_modules&previous-version=1.10.0&new-version=1.10.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2021-12-17 16:07:10 +00:00
dependabot[bot]
ead3a21927 build(deps): Bump github.com/rs/zerolog from 1.26.0 to 1.26.1 (#7469)
Bumps [github.com/rs/zerolog](https://github.com/rs/zerolog) from 1.26.0 to 1.26.1.
- [Release notes](https://github.com/rs/zerolog/releases)
- [Commits](https://github.com/rs/zerolog/compare/v1.26.0...v1.26.1)

---
updated-dependencies:
- dependency-name: github.com/rs/zerolog
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-12-17 08:25:29 -05:00
Callum Waters
f4babf9551 RFC006: Semantic Versioning (#365)
Co-authored-by: M. J. Fromberger <fromberger@interchain.io>
Co-authored-by: William Banfield <4561443+williambanfield@users.noreply.github.com>
2021-12-17 10:35:09 +01:00
Sam Kleinman
bef120dadf contexts: remove all TODO instances (#7466) 2021-12-16 15:15:26 -05:00
Callum Waters
184b105509 statesync: assert app version matches (#7463) 2021-12-16 18:25:26 +01:00
William Banfield
20c547a901 rfc: deterministic proto bytes serialization (#7427)
Major thanks to @creachadair for guidance in regards to the proto spec and for quick prototyping of a serialized-proto-canonicalizer.
2021-12-15 22:52:01 +00:00
dependabot[bot]
7705c9d086 build(deps): Bump google.golang.org/grpc from 1.42.0 to 1.43.0 (#7455)
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.42.0 to 1.43.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.43.0</h2>
<h1>API Changes</h1>
<ul>
<li>grpc: stabilize <code>WithConnectParams</code> <code>DialOption</code> (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4915">#4915</a>)
<ul>
<li>Special Thanks: <a href="https://github.com/hypnoglow"><code>@​hypnoglow</code></a></li>
</ul>
</li>
</ul>
<h1>Behavior Changes</h1>
<ul>
<li>status: support wrapped errors in <code>FromContextError</code> (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4977">#4977</a>)
<ul>
<li>Special Thanks: <a href="https://github.com/bestbeforetoday"><code>@​bestbeforetoday</code></a></li>
</ul>
</li>
<li>config: remove the environment variable to disable retry support (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4922">#4922</a>)</li>
</ul>
<h1>New Features</h1>
<ul>
<li>balancer: new field <code>Authority</code> in <code>BuildOptions</code> for server name to use in the authentication handshake with a remote load balancer (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4969">#4969</a>)</li>
</ul>
<h1>Bug Fixes</h1>
<ul>
<li>xds/resolver: fix possible <code>ClientConn</code> leak upon resolver initialization failure (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4900">#4900</a>)</li>
<li>client: fix <code>nil</code> panic in rare race conditions with the pick first LB policy (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4971">#4971</a>)</li>
<li>xds: improve RPC error messages when xDS connection errors occur (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5032">#5032</a>, <a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5054">#5054</a>)</li>
<li>transport: do not create stream object in the face of illegal stream IDs (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4873">#4873</a>)
<ul>
<li>Special Thanks: <a href="https://github.com/uds5501"><code>@​uds5501</code></a></li>
</ul>
</li>
</ul>
<h1>Documentation</h1>
<ul>
<li>client: clarify errors to indicate whether compressed or uncompressed messages exceeded size limits (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4918">#4918</a>)
<ul>
<li>Special Thanks: <a href="https://github.com/uds5501"><code>@​uds5501</code></a></li>
</ul>
</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="14c11384b7"><code>14c1138</code></a> Change version to 1.43.0 (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5039">#5039</a>)</li>
<li><a href="ae29ac3e1e"><code>ae29ac3</code></a> xds/client: send NewStream errors to the watchers (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5032">#5032</a>)</li>
<li><a href="296afc2e57"><code>296afc2</code></a> transport: better error message when per-RPC creds fail (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5033">#5033</a>)</li>
<li><a href="e15d978c82"><code>e15d978</code></a> xds/client: send connection errors to all watchers (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5054">#5054</a>)</li>
<li><a href="46e883a9ab"><code>46e883a</code></a> Backport &quot;xds/c2p: replace C2P resolver env var with experimental scheme suff...</li>
<li><a href="3786ae1778"><code>3786ae1</code></a> xds/resolver: Add support for cluster specifier plugins (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4987">#4987</a>)</li>
<li><a href="512e89474b"><code>512e894</code></a> rls: support extra_keys and constant_keys (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4995">#4995</a>)</li>
<li><a href="f3bbd12084"><code>f3bbd12</code></a> xds/bootstrap_config: add a string function to server config (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5031">#5031</a>)</li>
<li><a href="46935b9650"><code>46935b9</code></a> fix possible nil before casting (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5017">#5017</a>)</li>
<li><a href="c2bccd0b15"><code>c2bccd0</code></a> xds/kokoro: install go 1.17, and retry go build (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/5015">#5015</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/grpc/grpc-go/compare/v1.42.0...v1.43.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=google.golang.org/grpc&package-manager=go_modules&previous-version=1.42.0&new-version=1.43.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2021-12-15 16:26:20 +00:00
Daniel
20b2abb5f9 PBTS: new system model and problem statement (#375)
* PBTS: second version of system model

* PBTS: new model referred in algorithm spec

* PBTS: removed model discussion from algorithm spec

* PBTS: corrections on the ystem model

* PBTS: a pretty complex problem statement

* PBTS: minor fixes on the problem spefication

* PBTS: liveness part of problem specification

* PBTS: link updated, outdated note on sysmodel_v1

* Update spec/consensus/proposer-based-timestamp/pbts-algorithm_002_draft.md

Co-authored-by: William Banfield <4561443+williambanfield@users.noreply.github.com>

* Apply William's suggestions from code review

Co-authored-by: William Banfield <4561443+williambanfield@users.noreply.github.com>

* PBTS: new discussion and definition for accuracy

* Apply Josef's suggestion from code review

Co-authored-by: Josef Widder <44643235+josef-widder@users.noreply.github.com>

* PBTS: some tags added to sysmodel

* PBTS: motivation and link to Issue #371

* PBTS: fixing lint error

Co-authored-by: William Banfield <4561443+williambanfield@users.noreply.github.com>
Co-authored-by: Josef Widder <44643235+josef-widder@users.noreply.github.com>
2021-12-15 17:19:50 +01:00
M. J. Fromberger
82738eb016 Move the libs/pubsub package to internal scope (#7451)
No API changes, merely changes the import path.
2021-12-15 07:09:32 -08:00
dependabot[bot]
f3278e8b68 build(deps): Bump github.com/spf13/cobra from 1.2.1 to 1.3.0 (#7456)
Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.2.1 to 1.3.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/spf13/cobra/releases">github.com/spf13/cobra's releases</a>.</em></p>
<blockquote>
<h1>v1.3.0 - The Fall 2021 release 🍁</h1>
<h2>Completion fixes &amp; enhancements 💇🏼</h2>
<p>In <code>v1.2.0</code>, we introduced a new model for completions. Thanks to everyone for trying it, giving feedback, and providing numerous fixes! Continue to work with the new model as the old one (as noted in code comments) will be deprecated in a coming release.</p>
<ul>
<li><code>DisableFlagParsing</code> now triggers custom completions for flag names <a href="https://github-redirect.dependabot.com/spf13/cobra/issues/1161">#1161</a></li>
<li>Fixed unbound variables in bash completions causing edge case errors <a href="https://github-redirect.dependabot.com/spf13/cobra/issues/1321">#1321</a></li>
<li><code>help</code> completion formatting improvements &amp; fixes <a href="https://github-redirect.dependabot.com/spf13/cobra/issues/1444">#1444</a></li>
<li>All completions now follow the <code>help</code> example: short desc are now capitalized and removes extra spacing from long description <a href="https://github-redirect.dependabot.com/spf13/cobra/issues/1455">#1455</a></li>
<li>Typo fixes in bash &amp; zsh completions <a href="https://github-redirect.dependabot.com/spf13/cobra/issues/1459">#1459</a></li>
<li>Fixed mixed tab/spaces indentation in completion scripts. Now just 4 spaces <a href="https://github-redirect.dependabot.com/spf13/cobra/issues/1473">#1473</a></li>
<li>Support for different bash completion options. Bash completions v2 supports descriptions and requires descriptions to be removed for <code>menu-complete</code>, <code>menu-complete-backward</code> and <code>insert-completions</code>. These descriptions are now purposefully removed in support of this model. <a href="https://github-redirect.dependabot.com/spf13/cobra/issues/1509">#1509</a></li>
<li>Fix for invalid shell completions when using <code>~/.cobra.yaml</code>. Log message <code>Using config file: ~/.cobra.yaml</code> now printed to stderr <a href="https://github-redirect.dependabot.com/spf13/cobra/issues/1510">#1510</a></li>
<li>Removes unnecessary trailing spaces from completion command descriptions <a href="https://github-redirect.dependabot.com/spf13/cobra/issues/1520">#1520</a></li>
<li>Option to hid default <code>completion</code> command <a href="https://github-redirect.dependabot.com/spf13/cobra/issues/1541">#1541</a></li>
<li>Remove <code>__complete</code> command for programs without subcommands <a href="https://github-redirect.dependabot.com/spf13/cobra/issues/1563">#1563</a></li>
</ul>
<h2>Generator changes ⚙️</h2>
<p>Thanks to <a href="https://github.com/spf13"><code>@​spf13</code></a> for providing a number of changes to the Cobra generator tool, streamlining it for new users!</p>
<ul>
<li>The Cobra generator now <em>won't</em> automatically include Viper and cleans up a number of unused imports when not using Viper.</li>
<li>The Cobra generator's default license is now <code>none</code></li>
<li>The Cobra generator now works with Go modules</li>
<li>Documentation to reflect these changes</li>
</ul>
<h2>New Features </h2>
<ul>
<li>License can be specified by their SPDX identifiers <a href="https://github-redirect.dependabot.com/spf13/cobra/issues/1159">#1159</a></li>
<li><code>MatchAll</code> allows combining several PositionalArgs to work in concert. This now allows for enabling composing <code>PositionalArgs</code> <a href="https://github-redirect.dependabot.com/spf13/cobra/issues/896">#896</a></li>
</ul>
<h2>Bug Fixes 🐛</h2>
<ul>
<li>Fixed multiple error message from cobra <code>init</code> boilerplates <a href="https://github-redirect.dependabot.com/spf13/cobra/issues/1463">#1463</a> <a href="https://github-redirect.dependabot.com/spf13/cobra/issues/1552">#1552</a> <a href="https://github-redirect.dependabot.com/spf13/cobra/issues/1557">#1557</a></li>
</ul>
<h2>Testing 👀</h2>
<ul>
<li>Now testing golang 1.16.x and 1.17.x in CI <a href="https://github-redirect.dependabot.com/spf13/cobra/issues/1425">#1425</a></li>
<li>Fix for running diff test to ignore CR for windows <a href="https://github-redirect.dependabot.com/spf13/cobra/issues/949">#949</a></li>
<li>Added helper functions and reduced code reproduction in <code>args_test</code> <a href="https://github-redirect.dependabot.com/spf13/cobra/issues/1426">#1426</a></li>
<li>Now using official <code>golangci-lint</code> github action <a href="https://github-redirect.dependabot.com/spf13/cobra/issues/1477">#1477</a></li>
</ul>
<h2>Security 🔏</h2>
<ul>
<li>Added GitHub dependabot <a href="https://github-redirect.dependabot.com/spf13/cobra/issues/1427">#1427</a></li>
<li>Now using Viper <code>v1.10.0</code>
<ul>
<li>There is a known CVE in an <em>indirect</em> dependency from <code>viper</code>: <a href="https://github-redirect.dependabot.com/spf13/cobra/issues/1538">spf13/cobra#1538</a>. This will be patched in a future release</li>
</ul>
</li>
</ul>
<h2>Documentation 📝</h2>
<ul>
<li>Multiple projects added to the <code>projects_using_cobra.md</code> file: <a href="https://github-redirect.dependabot.com/spf13/cobra/issues/1377">#1377</a> <a href="https://github-redirect.dependabot.com/spf13/cobra/issues/1501">#1501</a> <a href="https://github-redirect.dependabot.com/spf13/cobra/issues/1454">#1454</a></li>
<li>Removed ToC from main readme file as it is now automagically displayed by GitHub <a href="https://github-redirect.dependabot.com/spf13/cobra/issues/1429">#1429</a></li>
<li>Documentation correct for when the <code>--author</code> flag is specified <a href="https://github-redirect.dependabot.com/spf13/cobra/issues/1009">#1009</a></li>
<li><code>shell_completions.md</code> has an easier to use snippet for copying and pasting shell completions <a href="https://github-redirect.dependabot.com/spf13/cobra/issues/1372">#1372</a></li>
</ul>

</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="178edbb247"><code>178edbb</code></a> Bump github.com/spf13/viper from 1.9.0 to 1.10.0 (<a href="https://github-redirect.dependabot.com/spf13/cobra/issues/1561">#1561</a>)</li>
<li><a href="9054739e08"><code>9054739</code></a> Remove __complete cmd for program without subcmds (<a href="https://github-redirect.dependabot.com/spf13/cobra/issues/1563">#1563</a>)</li>
<li><a href="19c9c74384"><code>19c9c74</code></a> Always include the os package import when generating the root command (<a href="https://github-redirect.dependabot.com/spf13/cobra/issues/1557">#1557</a>)</li>
<li><a href="01e05b8ea1"><code>01e05b8</code></a> Bump github.com/spf13/viper from 1.8.1 to 1.9.0 (<a href="https://github-redirect.dependabot.com/spf13/cobra/issues/1554">#1554</a>)</li>
<li><a href="36bff0a4d5"><code>36bff0a</code></a> fix root.go.golden (<a href="https://github-redirect.dependabot.com/spf13/cobra/issues/1552">#1552</a>)</li>
<li><a href="1854bb5c96"><code>1854bb5</code></a> Fix some typos (mostly found by codespell) (<a href="https://github-redirect.dependabot.com/spf13/cobra/issues/1514">#1514</a>)</li>
<li><a href="ff2c55e323"><code>ff2c55e</code></a> chore(ci): use golangci-lint-action (<a href="https://github-redirect.dependabot.com/spf13/cobra/issues/1477">#1477</a>)</li>
<li><a href="1beb476da9"><code>1beb476</code></a> fix: Duplicate error message from cobra init boilerplates (<a href="https://github-redirect.dependabot.com/spf13/cobra/issues/1463">#1463</a>)</li>
<li><a href="6f84ef4875"><code>6f84ef4</code></a> Provide option to hide default 'completion' cmd (<a href="https://github-redirect.dependabot.com/spf13/cobra/issues/1541">#1541</a>)</li>
<li><a href="ee75a2b1ed"><code>ee75a2b</code></a> Remove trailing spaces from bash completion command description (<a href="https://github-redirect.dependabot.com/spf13/cobra/issues/1520">#1520</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/spf13/cobra/compare/v1.2.1...v1.3.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/spf13/cobra&package-manager=go_modules&previous-version=1.2.1&new-version=1.3.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2021-12-15 13:54:42 +00:00
M. J. Fromberger
ab7da86b06 Internalize libs/sync. (#7450)
Inline the one usage of this library, and remove the lib.
2021-12-14 15:14:30 -08:00
M. J. Fromberger
da697089d0 Move libs/async to internal/libs/async. (#7449) 2021-12-14 14:05:42 -08:00
Sam Kleinman
f56df58fe8 testing,log: add testing.T logger connector (#7447) 2021-12-14 16:30:06 -05:00
Sam Kleinman
e3aaae570d node: minor package cleanups (#7444) 2021-12-14 14:56:28 -05:00
Sam Kleinman
2ff962a63a log: dissallow nil loggers (#7445) 2021-12-14 12:45:13 -05:00
M. J. Fromberger
a872dd75b7 Fix broken documentation link. (#7439)
A follow-up to #7416 and #7412.
2021-12-14 08:27:11 +00:00
Sam Kleinman
d0e03f01fc sync: remove special mutexes (#7438) 2021-12-13 13:35:32 -05:00
dependabot[bot]
2b35d8191c build(deps-dev): Bump watchpack from 2.3.0 to 2.3.1 in /docs (#7430)
Bumps [watchpack](https://github.com/webpack/watchpack) from 2.3.0 to 2.3.1.
- [Release notes](https://github.com/webpack/watchpack/releases)
- [Commits](https://github.com/webpack/watchpack/compare/v2.3.0...v2.3.1)

---
updated-dependencies:
- dependency-name: watchpack
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sam Kleinman <garen@tychoish.com>
Co-authored-by: M. J. Fromberger <fromberger@interchain.io>
2021-12-13 12:51:47 -05:00
Sam Kleinman
65c0aaee5e p2p: use recieve for channel iteration (#7425) 2021-12-13 11:04:44 -05:00
Jacob Gadikian
4e2aa63bb3 Go 1.17 (#7429)
Update tendermint to Go 1.17 because imports are easier to audit.

* Update README.md
* go mod tidy

Co-authored-by: M. J. Fromberger <fromberger@interchain.io>
2021-12-13 06:55:57 -08:00
dependabot[bot]
f80c235842 build(deps): Bump github.com/spf13/viper from 1.9.0 to 1.10.0 (#7434)
Bumps [github.com/spf13/viper](https://github.com/spf13/viper) from 1.9.0 to 1.10.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/spf13/viper/releases">github.com/spf13/viper's releases</a>.</em></p>
<blockquote>
<h2>v1.10.0</h2>
<p>This is a maintenance release primarily containing minor fixes and improvements.</p>
<h2>Changes</h2>
<h3>Added</h3>
<ul>
<li>Experimental finder based on io/fs</li>
<li>Tests are executed on Windows</li>
<li>Tests are executed on Go 1.17</li>
<li>Logger interface to decouple Viper from JWW</li>
</ul>
<hr />
<p>In addition to the above changes, this release comes with minor improvements, documentation changes an dependency updates.</p>
<p><strong>Many thanks to everyone who contributed to this release!</strong></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="a4bfcd9ea0"><code>a4bfcd9</code></a> chore(deps): update crypt</li>
<li><a href="1cb6606f6e"><code>1cb6606</code></a> build(deps): bump gopkg.in/ini.v1 from 1.65.0 to 1.66.2</li>
<li><a href="a785a79f22"><code>a785a79</code></a> refactor: replace jww with the new logger interface</li>
<li><a href="f1f6b2122c"><code>f1f6b21</code></a> feat: add logger interface and default implementation</li>
<li><a href="c43197d858"><code>c43197d</code></a> build(deps): bump github.com/mitchellh/mapstructure from 1.4.2 to 1.4.3</li>
<li><a href="2abe0ddbd4"><code>2abe0dd</code></a> build(deps): bump gopkg.in/ini.v1 from 1.64.0 to 1.65.0</li>
<li><a href="8ec82f8998"><code>8ec82f8</code></a> chore(deps): update crypt</li>
<li><a href="35877c8f77"><code>35877c8</code></a> chore: fix lint</li>
<li><a href="655a0aa730"><code>655a0aa</code></a> chore(deps): update golangci-lint</li>
<li><a href="946ae75247"><code>946ae75</code></a> ci: fix github script</li>
<li>Additional commits viewable in <a href="https://github.com/spf13/viper/compare/v1.9.0...v1.10.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/spf13/viper&package-manager=go_modules&previous-version=1.9.0&new-version=1.10.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2021-12-13 14:27:38 +00:00
dependabot[bot]
4da0a4b8ed build(deps): Bump github.com/adlio/schema from 1.2.2 to 1.2.3 (#7432)
Bumps [github.com/adlio/schema](https://github.com/adlio/schema) from 1.2.2 to 1.2.3.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/adlio/schema/releases">github.com/adlio/schema's releases</a>.</em></p>
<blockquote>
<h2>1.2.3</h2>
<h2>What's Changed</h2>
<ul>
<li>Restore ability to chain NewMigrartor().Apply() by <a href="https://github.com/adlio"><code>@​adlio</code></a> in <a href="https://github-redirect.dependabot.com/adlio/schema/pull/14">adlio/schema#14</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/adlio/schema/compare/v1.2.2...v1.2.3">https://github.com/adlio/schema/compare/v1.2.2...v1.2.3</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="770089bd75"><code>770089b</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/adlio/schema/issues/14">#14</a> from adlio/pointer-fix</li>
<li><a href="1fd2bbf008"><code>1fd2bbf</code></a> Restore the ability to run NewMigrator().Apply()</li>
<li>See full diff in <a href="https://github.com/adlio/schema/compare/v1.2.2...v1.2.3">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/adlio/schema&package-manager=go_modules&previous-version=1.2.2&new-version=1.2.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2021-12-13 12:36:35 +00:00
dependabot[bot]
f8bf2cb912 build(deps): Bump github.com/adlio/schema from 1.1.15 to 1.2.2 (#7423)
* build(deps): Bump github.com/adlio/schema from 1.1.15 to 1.2.2

Bumps [github.com/adlio/schema](https://github.com/adlio/schema) from 1.1.15 to 1.2.2.
- [Release notes](https://github.com/adlio/schema/releases)
- [Commits](https://github.com/adlio/schema/compare/v1.1.15...v1.2.2)

---
updated-dependencies:
- dependency-name: github.com/adlio/schema
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

* Work around API changes in the migrator package.

A recent update inadvertently broke the API by changing the receiver types of
the methods without updating the constructor.

See: https://github.com/adlio/schema/issues/13

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: M. J. Fromberger <fromberger@interchain.io>
2021-12-10 10:30:04 -08:00
M. J. Fromberger
a925f4fa84 Fix a panic in the indexer service test. (#7424)
The test service was starting up without a logger and crashing
while trying to log.
2021-12-10 10:03:42 -08:00
Emmanuel T Odeke
3e92899bd9 internal/libs/protoio: optimize MarshalDelimited by plain byteslice allocations+sync.Pool (#7325)
Noticed in profiles that invoking *VoteSignBytes always created a
bytes.Buffer, then discarded it inside protoio.MarshalDelimited.
I dug further and examined the call paths and noticed that we
unconditionally create the bytes.Buffer, even though we might
have proto messages (in the common case) that implement
MarshalTo([]byte), and invoked varintWriter. Instead by inlining
this case, we skip a bunch of allocations and CPU cycles,
which then reflects properly on all calling functions. Here
are the benchmark results:

```shell
$ benchstat before.txt after.txt
name                                        old time/op    new time/op      delta
types.VoteSignBytes-8                       705ns ± 3%     573ns ± 6%       -18.74% (p=0.000 n=18+20)
types.CommitVoteSignBytes-8                 8.15µs ± 9%    6.81µs ± 4%      -16.51% (p=0.000 n=20+19)
protoio.MarshalDelimitedWithMarshalTo-8     788ns ± 8%     772ns ± 3%       -2.01%  (p=0.050 n=20+20)
protoio.MarshalDelimitedNoMarshalTo-8       989ns ± 4%     845ns ± 2%       -14.51% (p=0.000 n=20+18)

name                                        old alloc/op   new alloc/op    delta
types.VoteSignBytes-8                       792B ± 0%      600B ± 0%       -24.24%  (p=0.000 n=20+20)
types.CommitVoteSignBytes-8                 9.52kB ± 0%    7.60kB ± 0%     -20.17%  (p=0.000 n=20+20)
protoio.MarshalDelimitedNoMarshalTo-8       808B ± 0%      440B ± 0%       -45.54%  (p=0.000 n=20+20)

name                                        old allocs/op  new allocs/op   delta
types.VoteSignBytes-8                       13.0 ± 0%      10.0 ± 0%       -23.08%  (p=0.000 n=20+20)
types.CommitVoteSignBytes-8                 140 ± 0%       110 ± 0%        -21.43%  (p=0.000 n=20+20)
protoio.MarshalDelimitedNoMarshalTo-8       10.0 ± 0%      7.0 ± 0%        -30.00%  (p=0.000 n=20+20)
```

Thanks to Tharsis who tasked me to help them increase TPS and who
are keen on improving Tendermint and efficiency.
2021-12-10 09:36:43 -08:00
Sam Kleinman
bd6dc3ca88 p2p: refactor channel Send/out (#7414) 2021-12-09 14:03:41 -05:00
M. J. Fromberger
f79b77036f Fix link to Terraform/Ansible documentation. (#7416) 2021-12-09 08:15:57 -08:00
dependabot[bot]
358fc5f6c4 build(deps): Bump github.com/adlio/schema from 1.1.14 to 1.1.15 (#7407)
Bumps [github.com/adlio/schema](https://github.com/adlio/schema) from 1.1.14 to 1.1.15.
<details>
<summary>Commits</summary>
<ul>
<li><a href="3b57e35342"><code>3b57e35</code></a> Security patch: Update upstream runc dependency to 1.0.3.</li>
<li>See full diff in <a href="https://github.com/adlio/schema/compare/v1.1.14...v1.1.15">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/adlio/schema&package-manager=go_modules&previous-version=1.1.14&new-version=1.1.15)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2021-12-08 16:21:45 +00:00
Sam Kleinman
867d406c6c state: pass connected context (#7410) 2021-12-08 11:09:08 -05:00
Sam Kleinman
9c21d4140b mempool: avoid arbitrary background contexts (#7409)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-12-08 14:29:13 +00:00
Sam Kleinman
cb88bd3941 p2p: migrate to use new interface for channel errors (#7403)
* p2p: migrate to use new interface for channel errors

* Update internal/p2p/p2ptest/require.go

Co-authored-by: M. J. Fromberger <michael.j.fromberger@gmail.com>

* rename

* feedback

Co-authored-by: M. J. Fromberger <michael.j.fromberger@gmail.com>
2021-12-08 14:05:01 +00:00
Sam Kleinman
892f5d9524 service: cleanup mempool and peer update shutdown (#7401) 2021-12-08 08:44:32 -05:00
Callum Waters
5ba3c6be42 cmd: cosmetic changes for errors and print statements (#7377)
* cmd: cosmetic changes for errors and print statements

* fix load block store test

* lint
2021-12-08 10:21:58 +00:00
Sam Kleinman
26d421b8f6 Revert "ci: tweak e2e configuration (#7400)" (#7404)
This reverts commit b057740bd3.
2021-12-07 21:17:55 +00:00
Sam Kleinman
587c91132b build: declare packages variable in correct makefile (#7402) 2021-12-07 14:53:22 -05:00
Sam Kleinman
b057740bd3 ci: tweak e2e configuration (#7400) 2021-12-07 11:47:22 -05:00
Sam Kleinman
0ff3d4b89d service: cleanup close channel in reactors (#7399) 2021-12-07 11:40:59 -05:00
Sam Kleinman
0b3e00a6b5 ci: skip docker image builds during PRs (#7397) 2021-12-07 10:54:14 -05:00
Sam Kleinman
6b35cc1a47 p2p: remove unneeded close channels from p2p layer (#7392) 2021-12-07 10:40:07 -05:00
Sam Kleinman
4b8fd28148 ci: fix missing dependency (#7396) 2021-12-07 10:27:49 -05:00
Sam Kleinman
065918d1cd ci: cleanup build/test targets (#7393) 2021-12-07 10:11:23 -05:00
M. J. Fromberger
02d456b8b8 Update Mergify configuration. (#7388)
Per https://docs.mergify.com/actions/merge/#commit-message, the
commit_message option is deprecated and will be removed in 2022.
Replace it with the template suggested here:

https://docs.mergify.com/actions/queue/
2021-12-06 13:27:39 -08:00
M. J. Fromberger
2d4844f97f Update mergify configuration. (#7385)
Per https://blog.mergify.com/strict-mode-deprecation/, the strict mode
has been deprecated and will be turned off on 10-Jan-2022. This updates
the config to use the new, approved thing instead of the old thing.
2021-12-06 12:20:28 -08:00
Sam Kleinman
a62ac27047 service: remove exported logger from base implemenation (#7381) 2021-12-06 10:16:42 -05:00
Sam Kleinman
4e355d80c4 p2p: implement interface for p2p.Channel without channels (#7378) 2021-12-03 15:19:04 -05:00
Sam Kleinman
5f9dd2e7f5 p2p/upnp: remove unused functionality (#7379) 2021-12-03 13:44:36 -05:00
M. J. Fromberger
8c52956007 Revert CI test timeout. (#7375)
I increased this while messing around with another PR, and
forgot to remove it before merging.
2021-12-03 14:13:24 +00:00
Sam Kleinman
8a991e288c service: plumb contexts to all (most) threads (#7363)
This continues the push of plumbing contexts through tendermint. I
attempted to find all goroutines in the production code (non-test) and
made sure that these threads would exit when their contexts were
canceled, and I believe this PR does that.
2021-12-02 21:38:38 +00:00
Sam Kleinman
b3be1d7d7a ci: move test execution to makefile (#7372) 2021-12-02 16:22:27 -05:00
Sam Kleinman
1e208d66e5 tools: remove tm-signer-harness (#7370) 2021-12-02 13:22:40 -05:00
Callum Waters
bca2080c01 cmd: add integration test and fix bug in rollback command (#7315) 2021-12-02 12:17:16 +01:00
Federico Kunze Küllmer
5f57d84dd3 rpc: implement header and header_by_hash queries (#7270) 2021-12-02 11:16:31 +01:00
William Banfield
f6c39126ed tools/tm-signer-harness: switch to not use hardcoded bytes for configs in test (#7362)
The current testing for this tool relies on hardcoding a set of configs into the tests. This means that when the config structure changes, the tests break. I'm not sure that this makes sense since we are separately testing our ability to read and validate the configuration file format. Hardcoding bytes into a different file duplicates this. Using the structs themselves should therefore be preferred.
2021-12-01 23:26:36 +00:00
Sam Kleinman
a823d167bc service: cleanup base implementation and some caller implementations (#7301) 2021-12-01 09:28:06 -05:00
Sam Kleinman
3749c37847 p2p: remove unused trust package (#7359) 2021-11-30 17:55:08 -05:00
M. J. Fromberger
76dea94a01 Remove now-unused nolint:lll directives. (#7356) 2021-11-30 21:32:21 +00:00
M. J. Fromberger
ab1788b922 Fix incorrect tests using the PSQL sink. (#7349)
Some of our tests were creating a psql event sink and expecting
it to report (or not report) certain kinds of errors. These tests
were ill-founded in a couple of ways:

1. Tests that required the Postgres driver were not loading it.
   This led to spurious successes on tests that wanted "some error"
   from the sink constructor, but didn't exercise the right path.

2. Tests that wanted a Postgres sink to succeed without a database.
   These tests "passed" because they weren't actually establishing a
   connection to the database, but if they had would have failed for
   the lack of one.

To fix this:
- Load the postgres driver in tests that need it.
- Verify connectivity before reporting successful creation of a PSQL event sink.
- Remove tests that wanted a psql sink without a database, since that case
  is already tested elsewhere.
2021-11-30 12:57:44 -08:00
Sam Kleinman
babd3acb70 e2e: generate keys for more stable load (#7344) 2021-11-30 20:21:48 +00:00
Sam Kleinman
24dcba9230 e2e: clarify apphash reporting (#7348) 2021-11-30 20:05:55 +00:00
Sam Kleinman
c4033f95c1 e2e: stabilize validator update form (#7340)
This might be a source of non-determinism in the e2e test.
2021-11-30 19:35:21 +00:00
Sam Kleinman
070445bc10 pex: improve goroutine lifecycle (#7343)
I saw a race detected in a test here that I think would be better
handled by just wiring up these threads.
2021-11-30 19:22:28 +00:00
Sam Kleinman
d5c18b68c8 e2e: more clear height test (#7347)
This is a more clear version of the stable parts of the apphash tests.
2021-11-30 17:34:16 +00:00
Sam Kleinman
cf5c7be4d8 e2e: control access to state in Info calls (#7345)
This is probably belt and suspenders, but might help the apphash clarity.
2021-11-30 17:19:47 +00:00
Callum Waters
b907d637ca update spec with header and headerbyhash rpc methods (#374) 2021-11-30 17:58:38 +01:00
Sam Kleinman
502f92bb97 lint: remove lll check (#7346) 2021-11-30 11:55:31 -05:00
M. J. Fromberger
4734f7d806 pubsub: Make the queue unwritable after shutdown. (#7316)
Prior to this change, shutting down the pubsub server could cause
any laggard publishers to race with the shutdown plumbing.

Fix that race condition, and plumb in the service context to the
runner so that it will respect the external signal directly.
Remove now-redundant local shutdown plumbing.
2021-11-30 07:30:35 -08:00
Sam Kleinman
4af2dbd03b eventbus: plumb contexts (#7337)
* eventbus: plumb contexts

* fix lint
2021-11-30 14:24:11 +00:00
M. J. Fromberger
c9f90953a2 Add pending change log entry for #7319. (#7339) 2021-11-30 06:08:21 -08:00
M. J. Fromberger
99ee730ee7 Remove the PEG query implementation. (#7336)
A follow-up to #7319.
2021-11-29 15:00:01 -08:00
dependabot[bot]
99c51b354c build(deps-dev): Bump watchpack from 2.2.0 to 2.3.0 in /docs (#7335)
Bumps [watchpack](https://github.com/webpack/watchpack) from 2.2.0 to 2.3.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/webpack/watchpack/releases">watchpack's releases</a>.</em></p>
<blockquote>
<h2>v2.3.0</h2>
<h1>Features</h1>
<ul>
<li>allow to grab separate file and directory time info objects</li>
<li>allow functions passed to the <code>ignored</code> option</li>
</ul>
<h1>Bugfixes</h1>
<ul>
<li>ignore EACCESS errors during initial scan</li>
</ul>
<h1>Performance</h1>
<ul>
<li>improve performance of watcher update</li>
</ul>
<h1>Contributing</h1>
<ul>
<li>CI tests node.js 17 too</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="b903dd384d"><code>b903dd3</code></a> 2.3.0</li>
<li><a href="c82a595128"><code>c82a595</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/webpack/watchpack/issues/211">#211</a> from webpack/bugfix/missing-info</li>
<li><a href="1e560268d3"><code>1e56026</code></a> fix missing time info in files</li>
<li><a href="89d5f4884c"><code>89d5f48</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/webpack/watchpack/issues/205">#205</a> from markjm/markjm/split</li>
<li><a href="f1f3586330"><code>f1f3586</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/webpack/watchpack/issues/210">#210</a> from webpack/ci/no-macos-polling</li>
<li><a href="8d14e94274"><code>8d14e94</code></a> Merge branch 'main' into markjm/split</li>
<li><a href="e71b62ba1f"><code>e71b62b</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/webpack/watchpack/issues/197">#197</a> from markjm/markjm/watch-change</li>
<li><a href="a3b2b82ec7"><code>a3b2b82</code></a> provide additional method instead of changing existing one</li>
<li><a href="aab3697418"><code>aab3697</code></a> disable testing polling for macos ci</li>
<li><a href="523793ef5d"><code>523793e</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/webpack/watchpack/issues/208">#208</a> from webpack/perf/update-watchers</li>
<li>Additional commits viewable in <a href="https://github.com/webpack/watchpack/compare/v2.2.0...v2.3.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=watchpack&package-manager=npm_and_yarn&previous-version=2.2.0&new-version=2.3.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2021-11-29 22:12:35 +00:00
Sam Kleinman
abc697b46c adr: lib2p implementation plan (#7282) 2021-11-29 17:02:27 -05:00
M. J. Fromberger
1dca1a8f97 Performance improvements for the event query API (#7319)
Rework the implementation of event query parsing and execution to
improve performance and reduce memory usage.

Previous memory and CPU profiles of the pubsub service showed query
processing as a significant hotspot. While we don't have evidence that
this is visibly hurting users, fixing it is fairly easy and self-contained.

Updates #6439.

Typical benchmark results comparing the original implementation (PEG) with the reworked implementation (Custom):
```
TEST                        TIME/OP  BYTES/OP  ALLOCS/OP  SPEEDUP   MEM SAVING
BenchmarkParsePEG-12       51716 ns  526832    27
BenchmarkParseCustom-12     2167 ns    4616    17         23.8x     99.1%
BenchmarkMatchPEG-12        3086 ns    1097    22
BenchmarkMatchCustom-12    294.2 ns      64     3         10.5x     94.1%
```

Components:
* Add a basic parsing benchmark.
* Move the original query implementation to a subdirectory.
* Add lexical scanner for Query expressions.
* Add a parser for Query expressions.
* Implement query compiler.
* Add test cases based on OpenAPI examples.
* Add MustCompile to replace the original MustParse, and update usage.
2021-11-29 13:08:48 -08:00
dependabot[bot]
d1f07047ec build(deps): Bump actions/cache from 2.1.6 to 2.1.7 (#7334)
Bumps [actions/cache](https://github.com/actions/cache) from 2.1.6 to 2.1.7.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/actions/cache/releases">actions/cache's releases</a>.</em></p>
<blockquote>
<h2>v2.1.7</h2>
<p>Support 10GB cache upload using the latest version <code>1.0.8</code> of <a href="https://www.npmjs.com/package/@actions/cache"><code>@actions/cache</code> </a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="937d244753"><code>937d244</code></a> bumping up action version to 2.1.7 (<a href="https://github-redirect.dependabot.com/actions/cache/issues/683">#683</a>)</li>
<li><a href="eb0698d1c5"><code>eb0698d</code></a> Bumping up <code>@​actions/cache</code> version to 1.0.8 (<a href="https://github-redirect.dependabot.com/actions/cache/issues/682">#682</a>)</li>
<li><a href="67b6d52d50"><code>67b6d52</code></a> (R renv) Remove unused renv-cache-path variable (<a href="https://github-redirect.dependabot.com/actions/cache/issues/663">#663</a>)</li>
<li><a href="92f67a4829"><code>92f67a4</code></a> (R renv) Fix Renv package cache location in examples (<a href="https://github-redirect.dependabot.com/actions/cache/issues/660">#660</a>)</li>
<li><a href="6bbe742add"><code>6bbe742</code></a> Use existing check-dist implementation (<a href="https://github-redirect.dependabot.com/actions/cache/issues/618">#618</a>)</li>
<li><a href="c9db520cf3"><code>c9db520</code></a> Create check-dist.yml (<a href="https://github-redirect.dependabot.com/actions/cache/issues/604">#604</a>)</li>
<li><a href="10906ba9cd"><code>10906ba</code></a> Bump ws from 5.2.2 to 5.2.3 (<a href="https://github-redirect.dependabot.com/actions/cache/issues/610">#610</a>)</li>
<li><a href="2ebdcff279"><code>2ebdcff</code></a> Add &quot;see more&quot; link to GHE-not-supported warning (<a href="https://github-redirect.dependabot.com/actions/cache/issues/609">#609</a>)</li>
<li><a href="5807af2642"><code>5807af2</code></a> Fix bugs in example of how to use with pipenv (<a href="https://github-redirect.dependabot.com/actions/cache/issues/607">#607</a>)</li>
<li><a href="0638051e9a"><code>0638051</code></a> Golang example tweak - add <code>go-build</code> path - rebuild page TOC (<a href="https://github-redirect.dependabot.com/actions/cache/issues/577">#577</a>)</li>
<li>See full diff in <a href="https://github.com/actions/cache/compare/v2.1.6...v2.1.7">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/cache&package-manager=github_actions&previous-version=2.1.6&new-version=2.1.7)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2021-11-29 13:04:54 +00:00
Piotr Pędziwiatr
a36dd49eae docs: go tutorial fixed for 0.35.0 version (#7329) (#7330) 2021-11-27 09:16:15 -08:00
Josef Widder
eaa2629352 Update README.md (#373) 2021-11-27 17:01:17 +01:00
Daniel
339304f87c PBTS: new minimal set of changes in consensus algorithm (#369)
* PBTS: second draft of protocol specification

* PBTS: updates in consensus algorithm v2

* PBTS: adding/fixing links in second draft

* PBTS: updated links for new algorithm specification

* PBTS: changes suggested by Josef

Co-authored-by: Josef Widder <44643235+josef-widder@users.noreply.github.com>

* PBTS: minor fixes and additions to spec

Co-authored-by: Josef Widder <44643235+josef-widder@users.noreply.github.com>
2021-11-27 11:18:46 +01:00
M. J. Fromberger
da3449599f Update example code in OpenAPI docs. (#7318)
The event examples for the query filter language were not updated after the
change of key and value types from []byte to string. Also, the attributes need
to be a slice not a bare value.
2021-11-25 07:45:38 -08:00
M. J. Fromberger
b7e5349e98 Fix a (trivial) typo in the RPC docs. (#368) 2021-11-25 12:13:23 +01:00
William Banfield
02c7dca945 docs: add abci timing metrics to the metrics docs (#7311) 2021-11-23 19:53:59 +00:00
M. J. Fromberger
e92aa56a75 Clean up lint failures for Markdown files (#367)
Many of the Markdown files in this repository fail the Markdown lint check.
This change cleans up most of them, either by:

- Removing links to targets that no longer exist.
- Updating links to targets that have moved.
- Disabling the linter for files that need more revision.
- Clean up trailing whitespace in files that peeves the super-linter.

Fixes #363.
2021-11-22 14:22:55 -08:00
M. J. Fromberger
26b887b883 build: update location of proto builder image (#7296)
Updates #7272.
2021-11-19 18:45:38 +00:00
Andrew Farmer
48e008ed10 acbi: fix readme link to protocol buffers (#362) 2021-11-19 13:11:46 -05:00
Sam Kleinman
7e58f02eb8 service: remove quit method (#7293) 2021-11-19 11:49:51 -05:00
M. J. Fromberger
be628fce3b build: Update the builder image location. (#364)
Point Makefile to ghcr.io instead of DockerHub.
2021-11-19 07:57:30 -08:00
M. J. Fromberger
d783273b05 Update build image workflow. (#361)
Push the builder image to ghcr.io instead of dockerhub.
Clean up the proto builder Dockerfile.
2021-11-18 18:10:08 -08:00
Sam Kleinman
6ab62fe7b6 service: remove stop method and use contexts (#7292) 2021-11-18 17:56:21 -05:00
William Banfield
1c34d17240 proto: rebuild the proto files from the spec repository (#7291)
* proto: rebuild the proto files from the spec repository

* remove proto checks
2021-11-17 00:06:19 +00:00
William Banfield
ffe8742e1c Revert "proto: abci++ changes (#348)" (#360)
This reverts commit caaafc4449.
2021-11-16 16:21:48 -05:00
William Banfield
a00de7199f update proto generation and testing pipelines (#358)
This pull request aims to make it possible to generate, format, and lint the protos within this repo.
To accomplish that end, the Dockerfile containing common tools for building the tendermint protos has been moved into this repository and several accompanying changes were made to streamline the proto generation process.
2021-11-16 14:34:42 -05:00
dependabot[bot]
44b5d330b0 build(deps): Bump github.com/tendermint/tm-db from 0.6.4 to 0.6.6 (#7287)
Bumps [github.com/tendermint/tm-db](https://github.com/tendermint/tm-db) from 0.6.4 to 0.6.6.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/tendermint/tm-db/releases">github.com/tendermint/tm-db's releases</a>.</em></p>
<blockquote>
<h2>Release v0.6.6</h2>
<p>This release is the same API as v0.6.4, but bypasses the accidental v0.6.5
release that exported a different API. Any existing users of v0.6.5 may continue
to use that tag.</p>
<p><a href="https://github.com/tendermint/tm-db/blob/v0.6.6/CHANGELOG.md">https://github.com/tendermint/tm-db/blob/v0.6.6/CHANGELOG.md</a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/tendermint/tm-db/blob/master/CHANGELOG.md">github.com/tendermint/tm-db's changelog</a>.</em></p>
<blockquote>
<h2>0.6.6</h2>
<p><strong>2021-11-08</strong></p>
<p><strong>Important note:</strong> Version v0.6.5 was accidentally tagged and should be
avoided.  This version is identical to v0.6.4 in package structure and API, but
has updated the version marker so that normal <code>go get</code> upgrades will not
require modifying existing use of v0.6.4.</p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="0e6efdda1b"><code>0e6efdd</code></a> Prepare a new compatibility release v0.6.6. (<a href="https://github-redirect.dependabot.com/tendermint/tm-db/issues/203">#203</a>)</li>
<li><a href="8f92601b65"><code>8f92601</code></a> testing: tools/Dockerfile: Upgrade RocksDB to 6.24.2 (<a href="https://github-redirect.dependabot.com/tendermint/tm-db/issues/197">#197</a>)</li>
<li><a href="16415bfbd7"><code>16415bf</code></a> build(deps): bump google.golang.org/grpc from 1.38.0 to 1.42.0 (<a href="https://github-redirect.dependabot.com/tendermint/tm-db/issues/193">#193</a>)</li>
<li><a href="11c5e90c12"><code>11c5e90</code></a> Update mergify configuration. (<a href="https://github-redirect.dependabot.com/tendermint/tm-db/issues/198">#198</a>)</li>
<li><a href="d3744d52e8"><code>d3744d5</code></a> Retract the accidentally-released v0.6.5. (<a href="https://github-redirect.dependabot.com/tendermint/tm-db/issues/194">#194</a>)</li>
<li><a href="6dc0379403"><code>6dc0379</code></a> Update CODEOWNERS file. (<a href="https://github-redirect.dependabot.com/tendermint/tm-db/issues/196">#196</a>)</li>
<li><a href="63a566e765"><code>63a566e</code></a> Enable cgo for testing. (<a href="https://github-redirect.dependabot.com/tendermint/tm-db/issues/200">#200</a>)</li>
<li><a href="451c8444fb"><code>451c844</code></a> Revert rocksdb version at tip. (<a href="https://github-redirect.dependabot.com/tendermint/tm-db/issues/202">#202</a>)</li>
<li><a href="d65205892e"><code>d652058</code></a> build: fix the image to work with golangci-lint (<a href="https://github-redirect.dependabot.com/tendermint/tm-db/issues/201">#201</a>)</li>
<li><a href="8882f27066"><code>8882f27</code></a> Update Go version in the build container. (<a href="https://github-redirect.dependabot.com/tendermint/tm-db/issues/195">#195</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/tendermint/tm-db/compare/v0.6.4...v0.6.6">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/tendermint/tm-db&package-manager=go_modules&previous-version=0.6.4&new-version=0.6.6)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2021-11-16 16:36:20 +00:00
Sam Kleinman
d7606777cf libs/service: pass logger explicitly (#7288)
This is a very small change, but removes a method from the
`service.Service` interface (a win!) and forces callers to explicitly
pass loggers in to objects during construction rather than (later)
injecting them. There's not a real need for this kind of lazy
construction of loggers, and I think a decent potential for confusion
for mutable loggers.

The main concern I have is that this changes the constructor API for
ABCI clients. I think this is fine, and I suspect that as we plumb
contexts through, and make changes to the RPC services there'll be a
number of similar sorts of changes to various (quasi) public
interfaces, which I think we should welcome.
2021-11-16 16:20:56 +00:00
M. J. Fromberger
dbac109d01 docs: clarify where doc site config settings must land (#7289)
Since the doc site is built from the backport branches, the config changes for
a new major release also need to be replicated into the backport branch as well
as master. Update the release docs to mention that specifically, since I missed
it during the v0.35 release.
2021-11-16 14:31:10 +00:00
Marko
caaafc4449 proto: abci++ changes (#348)
* abci++ proto updates

* add finalizeblock

* add deprecated fields
2021-11-16 10:43:13 +01:00
William Banfield
d5df412b26 proto: update the mechanism for generating protos from spec repo (#7269)
This pull request updates the `protocgen.sh` script to insert the `go_package` option to all of the downloaded proto files. A related pull request into the spec repo removes this options from the .proto files: https://github.com/tendermint/spec/pull/358

This pull requests, along with the related spec PR, aim to move the creation of the `tendermintdev/docker-build-proto` container into the spec repo. This change also relies on several fixes to that container that are made in the PR into the spec repo.
2021-11-15 20:06:15 +00:00
Sam Kleinman
2a455be46c libs/os: remove arbitrary os.Exit (#7284)
I think calling os.Exit at arbitrary points is _bad_ and is good to
delete. I think panics in the case of data courruption have a chance
of providing useful information.
2021-11-15 19:25:29 +00:00
Sam Kleinman
a15ae5b53a node+consensus: handshaker initialization (#7283)
This mostly just pushes more of initialization out of the node package.
2021-11-15 18:28:52 +00:00
William Banfield
f28d629e28 ADR: Update the proposer-based timestamp spec per discussion with @cason (#7153)
* update the proposer-based timestamps spec per discussion with @cason

* add vote to list of changed structs

* sentence fix

* clarify crypto sig logic update

* language updates per feedback from @cason

* fix POL < 0 wording

* update timely description for non-polka
2021-11-12 15:21:48 -05:00
Sam Kleinman
27560cf7a4 p2p: reduce peer score for dial failures (#7265)
When dialing fails to succeed we should reduce the score of the peer,
which puts the peer at (potentially) greater chances of being removed
from the peer manager, and reduces the chance of the peer being
gossiped by the PEX reactor.
2021-11-10 15:52:18 +00:00
William Banfield
4acd117b5e evidence: remove source of non-determinism from test (#7266)
The evidence test produces a set of mock evidence in the evidence pool of the 'Primary' node. The test then fills the evidence pools of secondaries with half of this mock evidence. Finally, the test waits until the secondary has an evidence pool as full as the primary. 

The assertions that are removed here were checking that the primary and secondaries' evidence channels were empty. However, nothing in the test actually ensures that the channels are empty. The test only waits for the secondaries to have received the complete set of evidence, and the secondaries already received half of the evidence at the beginning. It's more than possible that the secondaries can receive the complete set of evidence and not finish reading the duplicate evidence off the channels.
2021-11-09 20:48:01 +00:00
M. J. Fromberger
9dc3d7f9a2 Set a cap on the length of subscription queries. (#7263)
As a safety measure, don't allow a query string to be unreasonably
long. The query filter is not especially efficient, so a query that
needs more than basic detail should filter coarsely in the subscriber
and refine on the client side.

This affects Subscribe and TxSearch queries.
2021-11-09 08:35:51 -08:00
dependabot[bot]
e4466b7905 build(deps): Bump github.com/lib/pq from 1.10.3 to 1.10.4 (#7261)
Bumps [github.com/lib/pq](https://github.com/lib/pq) from 1.10.3 to 1.10.4.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/lib/pq/releases">github.com/lib/pq's releases</a>.</em></p>
<blockquote>
<h2>v1.10.4</h2>
<ul>
<li>Keep track of (context cancelled) error on connection.</li>
<li>Fix android build</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="8446d16b89"><code>8446d16</code></a> issue 1062: Keep track of (context cancelled) error on connection, and make r...</li>
<li><a href="6a102c04ac"><code>6a102c0</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/lib/pq/issues/1060">#1060</a> from ian4hu/patch-1</li>
<li><a href="a54251e1b6"><code>a54251e</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/lib/pq/issues/1061">#1061</a> from mjl-/fix-flaky-TestConnPrepareContext</li>
<li><a href="2b4fa17b44"><code>2b4fa17</code></a> Fix flaky TestConnPrepareContext</li>
<li><a href="b33a1b722c"><code>b33a1b7</code></a> Fix android build</li>
<li><a href="16e9cadb5a"><code>16e9cad</code></a> Fix build in android</li>
<li><a href="26399a7687"><code>26399a7</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/lib/pq/issues/1057">#1057</a> from jfcg/master</li>
<li><a href="087077605f"><code>0870776</code></a> fix possible integer truncation</li>
<li><a href="c01ab77091"><code>c01ab77</code></a> Create codeql-analysis.yml</li>
<li>See full diff in <a href="https://github.com/lib/pq/compare/v1.10.3...v1.10.4">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/lib/pq&package-manager=go_modules&previous-version=1.10.3&new-version=1.10.4)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2021-11-09 13:22:40 +00:00
Callum Waters
b3b90f820c consensus: add some more checks to vote counting (#7253) 2021-11-09 10:51:19 +01:00
JayT106
1e701ed9b5 fix LGTM warning (#7257) 2021-11-08 12:45:56 -08:00
dependabot[bot]
2af7d8defd build(deps): Bump google.golang.org/grpc from 1.41.0 to 1.42.0 (#7200)
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.41.0 to 1.42.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.42.0</h2>
<h1>Behavior Changes</h1>
<ul>
<li>grpc: Dial(&quot;unix://relative-path&quot;) no longer works (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4817">#4817</a>)
<ul>
<li>use &quot;unix://absolute-path&quot; or &quot;unix:relative-path&quot; instead in accordance with <a href="https://github.com/grpc/grpc/blob/master/doc/naming.md#name-syntax">our documentation</a></li>
</ul>
</li>
<li>xds/csds: use new field <code>GenericXdsConfig</code> instead of <code>PerXdsConfig</code> (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4898">#4898</a>)</li>
</ul>
<h1>New Features</h1>
<ul>
<li>grpc: support <code>grpc.WithAuthority</code> when secure credentials are used (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4817">#4817</a>)</li>
<li>creds/google: add NewDefaultCredentialsWithOptions() to support custom per-RPC creds (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4830">#4830</a>)</li>
<li>authz: create file watcher interceptor for gRPC SDK API (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4760">#4760</a>)</li>
<li>attributes: add <code>Equal</code> method (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4855">#4855</a>)</li>
<li>resolver: add <code>AddressMap</code> and <code>State.BalancerAttributes</code> (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4855">#4855</a>)</li>
<li>resolver: Add <code>URL</code> field to <code>Target</code> to store parsed dial target (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4817">#4817</a>)</li>
<li>grpclb: add a <code>target_name</code> field to lb config to specify target when used as a child policy (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4847">#4847</a>)</li>
<li>grpclog: support formatting log output as JSON (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4854">#4854</a>)</li>
</ul>
<h1>Bug Fixes</h1>
<ul>
<li>server: add missing conn.Close if the connection dies before reading the HTTP/2 preface (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4837">#4837</a>)</li>
<li>grpclb: recover if addresses are received after an empty server list was received previously (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4879">#4879</a>)</li>
<li>authz: support empty principals and fix rbac authenticated matcher (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4883">#4883</a>)</li>
<li>xds/rds: NACK the RDS response if it contains unknown cluster specifier (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4788">#4788</a>)</li>
<li>xds/priority: do not switch to low priority when high priority is in Idle (e.g. ringhash) (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4889">#4889</a>)</li>
</ul>
<h1>Documentation</h1>
<ul>
<li>grpc: stabilize WithDefaultServiceConfig and improve godoc (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4888">#4888</a>)</li>
<li>status: clarify FromError docstring (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4880">#4880</a>)</li>
<li>examples: add example illustrating the use of unix abstract sockets (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4848">#4848</a>)</li>
<li>examples: update load balancing example to use loadBalancingConfig (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4887">#4887</a>)</li>
<li>doc: promote WithDisableRetry to stable; clarify retry is enabled by default (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4901">#4901</a>)</li>
</ul>
<h1>API Changes</h1>
<ul>
<li>credentials: Mark <code>TransportCredentials.OverrideServerName</code> method as deprecated (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4817">#4817</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="aff571cc86"><code>aff571c</code></a> Change version to 1.42.0 (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4910">#4910</a>)</li>
<li><a href="2d7bdf2d23"><code>2d7bdf2</code></a> xds: Set RBAC on by default (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4909">#4909</a>)</li>
<li><a href="d47437c91e"><code>d47437c</code></a> xds: Fix invert functionality for header matcher (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4902">#4902</a>)</li>
<li><a href="9fa2698264"><code>9fa2698</code></a> xds/csds: populate new GenericXdsConfig field (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4898">#4898</a>)</li>
<li><a href="6e8625df63"><code>6e8625d</code></a> doc: promote WithDisableRetry to stable; clarify retry is enabled by default ...</li>
<li><a href="f1d87c14c2"><code>f1d87c1</code></a> client: properly disable retry if GRPC_GO_RETRY=off (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4899">#4899</a>)</li>
<li><a href="03753f593c"><code>03753f5</code></a> creds/google: fix CFE cluster name check (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4893">#4893</a>)</li>
<li><a href="4f21cde702"><code>4f21cde</code></a> authz: support empty principals and fix rbac authenticated matcher (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4883">#4883</a>)</li>
<li><a href="f00baa6c3c"><code>f00baa6</code></a> resolver: replace AddressMap.Range with Keys (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4891">#4891</a>)</li>
<li><a href="2a312458e6"><code>2a31245</code></a> client: don't force passthrough as default resolver (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4890">#4890</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/grpc/grpc-go/compare/v1.41.0...v1.42.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=google.golang.org/grpc&package-manager=go_modules&previous-version=1.41.0&new-version=1.42.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2021-11-06 02:37:58 +00:00
M. J. Fromberger
d5865af1f4 Add basic metrics to the indexer package. (#7250)
This follows the same model as we did in the p2p package.

Rework the indexer service constructor to take a struct of arguments,
that makes it easier to construct the optional settings.
Deprecate but do not remove the existing constructor.

Clean up node initialization a little bit.
2021-11-05 12:50:53 -07:00
M. J. Fromberger
54d7030510 pubsub: Move indexing out of the primary subscription path (#7231)
This is part of the work described by #7156.

Remove "unbuffered subscriptions" from the pubsub service.
Replace them with a dedicated blocking "observer" mechanism.
Use the observer mechanism for indexing.

Add a SubscribeWithArgs method and deprecate the old Subscribe
method. Remove SubscribeUnbuffered entirely (breaking).

Rework the Subscription interface to eliminate exposed channels.
Subscriptions now use a context to manage lifecycle notifications.

Internalize the eventbus package.
2021-11-05 10:25:25 -07:00
M. J. Fromberger
b4055a0753 Fix ToC entry for RFC 006. (#7248)
Oops.
2021-11-05 15:55:48 +00:00
M. J. Fromberger
432067cc0e RFC 006: Event Subscription (#7184)
This is intended to document some ergonomic and reliability issues with the
existing implementation of the event subscription service on the Tendermint
node, and to discuss possible approaches to improving them.
2021-11-05 08:23:17 -07:00
M. J. Fromberger
6c7d6f761b Remove unused libs/cmap. (#7245)
A follow-up to #7197.
2021-11-05 10:31:06 +00:00
M. J. Fromberger
3335cbe8b7 Update master changelog after v0.35.0 tag. (#7243)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-11-04 16:40:43 +00:00
JayT106
641a5ec998 rpc: fix inappropriate http request log (#7244) 2021-11-04 17:38:08 +01:00
M. J. Fromberger
b3b1279d1f Add v0.35 to the configs for building the docs website. (#7055) 2021-11-04 08:29:23 -07:00
Sam Kleinman
797541e742 docs: add upgrading info about node service (#7241)
* docs: add info about RPC local to upgrading docs

* Apply suggestions from code review

Co-authored-by: Callum Waters <cmwaters19@gmail.com>

* cleanup codeblock

Co-authored-by: Callum Waters <cmwaters19@gmail.com>
2021-11-04 13:20:26 +00:00
Callum Waters
ae92b135d8 docs: update bounty links (#7203) 2021-11-03 22:28:59 +01:00
dependabot[bot]
a2f4f3fb48 build(deps): Bump github.com/golangci/golangci-lint from 1.42.1 to 1.43.0 (#7219)
Bumps [github.com/golangci/golangci-lint](https://github.com/golangci/golangci-lint) from 1.42.1 to 1.43.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/golangci/golangci-lint/releases">github.com/golangci/golangci-lint's releases</a>.</em></p>
<blockquote>
<h2>v1.43.0</h2>
<h2>Changelog</h2>
<p>bdc2f96d Add code comments to document source code (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2306">#2306</a>)
861262b7 Add github.com/breml/bidichk linter (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2330">#2330</a>)
32292622 Add nilnil linter (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2236">#2236</a>)
20699a72 Add tenv linter (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2221">#2221</a>)
e612577d Bump gochecknoglobals to v0.1.0 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2317">#2317</a>)
1be9570a Refactor: preallocate slices (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2340">#2340</a>)
813ba7d9 Update index.mdx (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2230">#2230</a>)
f500e4cb add varnamelen linter (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2240">#2240</a>)
e6c56694 build(deps): bump github.com/Antonboom/errname from 0.1.4 to 0.1.5 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2249">#2249</a>)
a37843b1 build(deps): bump github.com/butuzov/ireturn from 0.1.0 to 0.1.1 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2246">#2246</a>)
680f3e6c build(deps): bump github.com/charithe/durationcheck from 0.0.8 to 0.0.9 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2289">#2289</a>)
00e47702 build(deps): bump github.com/esimonov/ifshort from 1.0.2 to 1.0.3 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2303">#2303</a>)
d3fc84bc build(deps): bump github.com/fatih/color from 1.12.0 to 1.13.0 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2259">#2259</a>)
4ce9a19e build(deps): bump github.com/go-critic/go-critic from 0.5.6 to 0.6.0 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2041">#2041</a>)
5adafe52 build(deps): bump github.com/jingyugao/rowserrcheck from 1.1.0 to 1.1.1 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2326">#2326</a>)
3fe324a1 build(deps): bump github.com/kunwardeep/paralleltest from 1.0.2 to 1.0.3 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2244">#2244</a>)
739ccd3f build(deps): bump github.com/mattn/go-colorable from 0.1.10 to 0.1.11 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2277">#2277</a>)
c6c55d25 build(deps): bump github.com/mattn/go-colorable from 0.1.8 to 0.1.9 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2252">#2252</a>)
8f2af022 build(deps): bump github.com/mattn/go-colorable from 0.1.9 to 0.1.10 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2260">#2260</a>)
78d309e7 build(deps): bump github.com/mgechev/revive from 1.1.1 to 1.1.2 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2276">#2276</a>)
1012c10d build(deps): bump github.com/nakabonne/nestif from 0.3.0 to 0.3.1 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2325">#2325</a>)
6edca924 build(deps): bump github.com/securego/gosec/v2 from 2.8.1 to 2.9.1 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2299">#2299</a>)
963257f9 build(deps): bump github.com/shirou/gopsutil/v3 from 3.21.7 to 3.21.8 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2225">#2225</a>)
b9f015cc build(deps): bump github.com/shirou/gopsutil/v3 from 3.21.8 to 3.21.9 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2275">#2275</a>)
9f628531 build(deps): bump github.com/shirou/gopsutil/v3 from 3.21.9 to 3.21.10 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2327">#2327</a>)
f1258315 build(deps): bump github.com/spf13/viper from 1.8.1 to 1.9.0 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2243">#2243</a>)
60a9d16f build(deps): bump github.com/tetafro/godot from 1.4.10 to 1.4.11 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2248">#2248</a>)
8c60147b build(deps): bump github.com/tetafro/godot from 1.4.9 to 1.4.10 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2226">#2226</a>)
2fb65636 build(deps): bump github.com/tomarrell/wrapcheck/v2 from 2.3.0 to 2.3.1 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2278">#2278</a>)
9bb917de build(deps): bump github.com/tomarrell/wrapcheck/v2 from 2.3.1 to 2.4.0 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2324">#2324</a>)
59c7b10b build(deps): bump github.com/valyala/quicktemplate from 1.6.3 to 1.7.0 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2250">#2250</a>)
5d4fe00f build(deps): bump golang.org/x/tools from 0.1.5 to 0.1.6 (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2245">#2245</a>)
91016acc build(deps): bump tmpl from 1.0.4 to 1.0.5 in /.github/peril (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2247">#2247</a>)
f47f4f55 codeql: Remove unneeded steps (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2336">#2336</a>)
413bec6a errcheck: empty selector name. (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2309">#2309</a>)
7fc2fe81 feat: add contextcheck linter (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2216">#2216</a>)
8cb9c769 fix: Add missing space in &quot;disabled by config&quot; warning (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2310">#2310</a>)
a8887d56 fix: don't hide enable-all option (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2338">#2338</a>)
cf9f3f95 fix: go.sum (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2262">#2262</a>)
2c01ea7f gocritic: add support for variable substitution in ruleguard path settings (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2308">#2308</a>)
cc262bba gosec: filter issues according to the severity and confidence (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2295">#2295</a>)
9b577fcb new-from-rev: add support for finding issues in entire files in a diff (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2264">#2264</a>)
2ea496f2 new-linter: ireturn (checks for function return type) (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2219">#2219</a>)
17d24ebd nlreturn: add block-size option (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2237">#2237</a>)</p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="861262b71f"><code>861262b</code></a> Add github.com/breml/bidichk linter (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2330">#2330</a>)</li>
<li><a href="77d4115b0f"><code>77d4115</code></a> docs: add documentation for go-critic and ruleguard settings (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2304">#2304</a>)</li>
<li><a href="2c01ea7ff2"><code>2c01ea7</code></a> gocritic: add support for variable substitution in ruleguard path settings (#...</li>
<li><a href="f9f6486e15"><code>f9f6486</code></a> docs: change Github to GitHub in comments and docs (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2341">#2341</a>)</li>
<li><a href="1be9570abf"><code>1be9570</code></a> Refactor: preallocate slices (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2340">#2340</a>)</li>
<li><a href="a8887d5655"><code>a8887d5</code></a> fix: don't hide enable-all option (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2338">#2338</a>)</li>
<li><a href="f47f4f5557"><code>f47f4f5</code></a> codeql: Remove unneeded steps (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2336">#2336</a>)</li>
<li><a href="8cb9c769ff"><code>8cb9c76</code></a> fix: Add missing space in &quot;disabled by config&quot; warning (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2310">#2310</a>)</li>
<li><a href="a2b2968b12"><code>a2b2968</code></a> build(deps): bump gatsby-plugin-robots-txt in /docs (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2332">#2332</a>)</li>
<li><a href="dcaaa894af"><code>dcaaa89</code></a> build(deps): bump gatsby-remark-copy-linked-files in /docs (<a href="https://github-redirect.dependabot.com/golangci/golangci-lint/issues/2335">#2335</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/golangci/golangci-lint/compare/v1.42.1...v1.43.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/golangci/golangci-lint&package-manager=go_modules&previous-version=1.42.1&new-version=1.43.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2021-11-03 16:40:55 +00:00
M. J. Fromberger
01c43c153b doc: Set up Dependabot on new backport branches. (#7227) 2021-11-03 16:28:46 +00:00
M. J. Fromberger
0de4aa1765 Fix spurious crasher in mempool fuzz test. (#7190)
We were creating a TestLogger without testing being initialized.
Switch to a no-op logger instead.
2021-11-03 08:36:02 -07:00
M. J. Fromberger
dc28734dad pubsub: Remove uninformative publisher benchmarks. (#7195)
Prior to #7177, these benchmarks did not provide any useful data about the
performance of the pubsub system (in fact, prior to #7178, half of them did not
work at all).

Specifically, they create a bunch of subscribers with 1 buffer slot on a
default publisher and copy messages to them. But because the publisher is
single-threaded, and doesn't block for delivery, all this tested is how long it
takes to receive a single message from a channel and deliver it to another
channel. The resulting stat does not even vary meaningfully with batch size,
since it's testing a serial workload.

Since #7177 the benchmarks do correctly reflect delivery time (good), but still
do not tell us anything useful: The latencies that matter for pubsub are not
internal queuing, but the effects of backpressure on the publisher via the
subscribers. That's an integration problem, and simulating a fake workload does
not provide meaningful results.

On that basis, remove these benchmarks.
2021-11-03 07:39:09 -07:00
Sam Kleinman
6f08c14375 ci: update dependabot configuration (#7204)
I increased the chill of the github actions and NPM/docs dependencies,
and added default automerging of the go dependencies.
2021-11-03 13:30:53 +00:00
Sam Kleinman
ffcd347ef6 pex: allow disabled pex reactor (#7198)
This ensures the implementation respects disabling the pex reactor.
2021-11-03 11:51:42 +00:00
dependabot[bot]
279e8027d3 build(deps): Bump actions/checkout from 2.3.5 to 2.4.0 (#7199)
Bumps [actions/checkout](https://github.com/actions/checkout) from 2.3.5 to 2.4.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/actions/checkout/releases">actions/checkout's releases</a>.</em></p>
<blockquote>
<h2>v2.4.0</h2>
<ul>
<li>Convert SSH URLs like <code>org-&lt;ORG_ID&gt;@github.com:</code> to <code>https://github.com/</code> - <a href="https://github-redirect.dependabot.com/actions/checkout/pull/621">pr</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="ec3a7ce113"><code>ec3a7ce</code></a> set insteadOf url for org-id (<a href="https://github-redirect.dependabot.com/actions/checkout/issues/621">#621</a>)</li>
<li><a href="fd47087372"><code>fd47087</code></a> codeql should analyze lib not dist (<a href="https://github-redirect.dependabot.com/actions/checkout/issues/620">#620</a>)</li>
<li><a href="3d677ac575"><code>3d677ac</code></a> script to generate license info (<a href="https://github-redirect.dependabot.com/actions/checkout/issues/614">#614</a>)</li>
<li><a href="826ba42d6c"><code>826ba42</code></a> npm audit fix (<a href="https://github-redirect.dependabot.com/actions/checkout/issues/612">#612</a>)</li>
<li><a href="eb8a193c1d"><code>eb8a193</code></a> update dev dependencies and react to new linting rules (<a href="https://github-redirect.dependabot.com/actions/checkout/issues/611">#611</a>)</li>
<li><a href="c49af7ca1f"><code>c49af7c</code></a> Create codeql-analysis.yml (<a href="https://github-redirect.dependabot.com/actions/checkout/issues/602">#602</a>)</li>
<li>See full diff in <a href="https://github.com/actions/checkout/compare/v2.3.5...v2.4.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=2.3.5&new-version=2.4.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2021-11-03 11:21:45 +00:00
Sam Kleinman
e2b626fc92 node: cleanup construction (#7191) 2021-11-03 07:16:35 -04:00
Sam Kleinman
63192ac300 consensus: remove stale WAL benchmark (#7194) 2021-11-03 07:01:46 -04:00
dependabot[bot]
5bc9cb6260 build(deps): Bump github.com/rs/zerolog from 1.25.0 to 1.26.0 (#7192)
Bumps [github.com/rs/zerolog](https://github.com/rs/zerolog) from 1.25.0 to 1.26.0.
- [Release notes](https://github.com/rs/zerolog/releases)
- [Commits](https://github.com/rs/zerolog/compare/v1.25.0...v1.26.0)

---
updated-dependencies:
- dependency-name: github.com/rs/zerolog
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-02 07:18:12 -07:00
M. J. Fromberger
d32913c889 pubsub: Use a dynamic queue for buffered subscriptions (#7177)
Updates #7156, and a follow-up to #7070.

Event subscriptions in Tendermint currently use a fixed-length Go
channel as a queue. When the channel fills up, the publisher
immediately terminates the subscription. This prevents slow
subscribers from creating memory pressure on the node by not
servicing their queue fast enough.

Replace the buffered channel used to deliver events to buffered
subscribers with an explicit queue. The queue provides a soft
quota and burst credit mechanism: Clients that usually keep up
can survive occasional bursts, without allowing truly slow
clients to hog resources indefinitely.
2021-11-01 10:38:27 -07:00
William Banfield
5599ec37bf fuzz: remove fuzz cases for deleted code (#7187)
fuzz: remove fuzz cases for deleted code
2021-11-01 15:46:35 +01:00
Sam Kleinman
5cc980698a mempool: consoldate implementations (#7171)
* mempool: consoldate implementations

* update chagelog

* fix test

* Apply suggestions from code review

Co-authored-by: M. J. Fromberger <michael.j.fromberger@gmail.com>

* cleanup locking comments

* context twiddle

* migrate away from deprecated ioutil APIs (#7175)

Co-authored-by: Callum Waters <cmwaters19@gmail.com>
Co-authored-by: M. J. Fromberger <fromberger@interchain.io>

Co-authored-by: M. J. Fromberger <michael.j.fromberger@gmail.com>
Co-authored-by: Callum Waters <cmwaters19@gmail.com>
Co-authored-by: M. J. Fromberger <fromberger@interchain.io>
2021-10-29 04:19:06 -04:00
Sharad Chand
8441b3715a migrate away from deprecated ioutil APIs (#7175)
Co-authored-by: Callum Waters <cmwaters19@gmail.com>
Co-authored-by: M. J. Fromberger <fromberger@interchain.io>
2021-10-28 10:34:07 -07:00
Sam Kleinman
6108d0a9b5 config: expose ability to write config to arbitrary paths (#7174) 2021-10-28 05:17:23 -04:00
M. J. Fromberger
1fd7060542 pubsub: Use distinct client IDs for test subscriptions. (#7178)
Fixes #7176. Some of the benchmarks create a bunch of different subscriptions all sharing the same query. These were all using the same client ID, which violates one of the subscriber rules. Ensure each subscriber gets a unique ID.

This has been broken as long as this library has been in the repo—I tracked it back to bb9aa85d and it was already failing there, so I think this never really worked. I'm not sure these test anything useful, but at least now they run.
2021-10-28 07:57:45 +00:00
William Banfield
4d09a6c25d abci: fix readme link (#7173) 2021-10-27 20:27:09 -07:00
Sam Kleinman
e2a103a315 mempool: port reactor tests from legacy implementation (#7162) 2021-10-27 09:45:17 -04:00
Sam Kleinman
93eb940dcd config: WriteConfigFile should return error (#7169) 2021-10-27 08:46:18 -04:00
dependabot[bot]
e5d019d51b build(deps): Bump url-parse from 1.5.1 to 1.5.3 in /docs (#7166)
Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.5.1 to 1.5.3.
<details>
<summary>Commits</summary>
<ul>
<li><a href="ad44493166"><code>ad44493</code></a> [dist] 1.5.3</li>
<li><a href="c7984617e2"><code>c798461</code></a> [fix] Fix host parsing for file URLs (<a href="https://github-redirect.dependabot.com/unshiftio/url-parse/issues/210">#210</a>)</li>
<li><a href="201034b867"><code>201034b</code></a> [dist] 1.5.2</li>
<li><a href="2d9ac2c940"><code>2d9ac2c</code></a> [fix] Sanitize only special URLs (<a href="https://github-redirect.dependabot.com/unshiftio/url-parse/issues/209">#209</a>)</li>
<li><a href="fb128af4f4"><code>fb128af</code></a> [fix] Use <code>'null'</code> as <code>origin</code> for non special URLs</li>
<li><a href="fed6d9e338"><code>fed6d9e</code></a> [fix] Add a leading slash only if the URL is special</li>
<li><a href="94872e7ab9"><code>94872e7</code></a> [fix] Do not incorrectly set the <code>slashes</code> property to <code>true</code></li>
<li><a href="81ab967889"><code>81ab967</code></a> [fix] Ignore slashes after the protocol for special URLs</li>
<li><a href="ee22050a48"><code>ee22050</code></a> [ci] Use GitHub Actions</li>
<li><a href="d2979b586d"><code>d2979b5</code></a> [fix] Special case the <code>file:</code> protocol (<a href="https://github-redirect.dependabot.com/unshiftio/url-parse/issues/204">#204</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/unshiftio/url-parse/compare/1.5.1...1.5.3">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=url-parse&package-manager=npm_and_yarn&previous-version=1.5.1&new-version=1.5.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)
You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/tendermint/tendermint/network/alerts).

</details>
2021-10-27 09:01:14 +00:00
dependabot[bot]
0dd5970894 build(deps): Bump path-parse from 1.0.6 to 1.0.7 in /docs (#7164)
Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.6 to 1.0.7.
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a href="https://github.com/jbgutierrez/path-parse/commits/v1.0.7">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=path-parse&package-manager=npm_and_yarn&previous-version=1.0.6&new-version=1.0.7)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)
You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/tendermint/tendermint/network/alerts).

</details>
2021-10-27 08:59:48 +00:00
dependabot[bot]
ab237091bb build(deps): Bump ws from 6.2.1 to 6.2.2 in /docs (#7165)
Bumps [ws](https://github.com/websockets/ws) from 6.2.1 to 6.2.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/websockets/ws/releases">ws's releases</a>.</em></p>
<blockquote>
<h2>6.2.2</h2>
<h1>Bug fixes</h1>
<ul>
<li>Backported 00c425ec to the 6.x release line (78c676d2).</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="9bdb58070d"><code>9bdb580</code></a> [dist] 6.2.2</li>
<li><a href="78c676d2a1"><code>78c676d</code></a> [security] Fix ReDoS vulnerability</li>
<li>See full diff in <a href="https://github.com/websockets/ws/compare/6.2.1...6.2.2">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=ws&package-manager=npm_and_yarn&previous-version=6.2.1&new-version=6.2.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)
You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/tendermint/tendermint/network/alerts).

</details>
2021-10-27 08:57:58 +00:00
dependabot[bot]
2416ff3be9 build(deps): Bump postcss from 7.0.35 to 7.0.39 in /docs (#7167)
Bumps [postcss](https://github.com/postcss/postcss) from 7.0.35 to 7.0.39.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/postcss/postcss/releases">postcss's releases</a>.</em></p>
<blockquote>
<h2>7.0.39</h2>
<ul>
<li>Reduce package size.</li>
<li>Backport <code>nanocolors</code> to <code>picocolors</code> migration.</li>
</ul>
<h2>7.0.38</h2>
<ul>
<li>Update <code>Processor#version</code>.</li>
</ul>
<h2>7.0.37</h2>
<ul>
<li>Backport <code>chalk</code> to <code>nanocolors</code> migration.</li>
</ul>
<h2>7.0.36</h2>
<ul>
<li>Backport ReDoS vulnerabilities from PostCSS 8.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/postcss/postcss/blob/7.0.39/CHANGELOG.md">postcss's changelog</a>.</em></p>
<blockquote>
<h2>7.0.39</h2>
<ul>
<li>Reduce package size.</li>
<li>Backport <code>nanocolors</code> to <code>picocolors</code> migration.</li>
</ul>
<h2>7.0.38</h2>
<ul>
<li>Update <code>Processor#version</code>.</li>
</ul>
<h2>7.0.37</h2>
<ul>
<li>Backport <code>chalk</code> to <code>nanocolors</code> migration.</li>
</ul>
<h2>7.0.36</h2>
<ul>
<li>Backport ReDoS vulnerabilities from PostCSS 8.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="e17c1ef762"><code>e17c1ef</code></a> Release 7.0.39 version</li>
<li><a href="6791bd3d5f"><code>6791bd3</code></a> Reduce npm package</li>
<li><a href="44c581a55a"><code>44c581a</code></a> Replace nanocolors with picocolors</li>
<li><a href="8ba21fd8f4"><code>8ba21fd</code></a> Remove eslint-ci</li>
<li><a href="3994c4aa3c"><code>3994c4a</code></a> Release 7.0.38 version</li>
<li><a href="6944e1dd80"><code>6944e1d</code></a> Remove development keys from package.json</li>
<li><a href="4dd0af024a"><code>4dd0af0</code></a> Release 7.0.37 version</li>
<li><a href="8408eb4105"><code>8408eb4</code></a> Add compilation step</li>
<li><a href="0c680639c3"><code>0c68063</code></a> Move tests to GitHub Actions</li>
<li><a href="98b61ba5b4"><code>98b61ba</code></a> Replace chalk to nanocolors</li>
<li>Additional commits viewable in <a href="https://github.com/postcss/postcss/compare/7.0.35...7.0.39">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=postcss&package-manager=npm_and_yarn&previous-version=7.0.35&new-version=7.0.39)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)
You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/tendermint/tendermint/network/alerts).

</details>
2021-10-27 08:56:03 +00:00
dependabot[bot]
4725b00af1 build(deps): Bump prismjs from 1.23.0 to 1.25.0 in /docs (#7168)
Bumps [prismjs](https://github.com/PrismJS/prism) from 1.23.0 to 1.25.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/PrismJS/prism/releases">prismjs's releases</a>.</em></p>
<blockquote>
<h2>v1.25.0</h2>
<p>Release 1.25.0</p>
<h2>v1.24.1</h2>
<p>Release 1.24.1</p>
<h2>v1.24.0</h2>
<p>Release 1.24.0</p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/PrismJS/prism/blob/master/CHANGELOG.md">prismjs's changelog</a>.</em></p>
<blockquote>
<h2>1.25.0 (2021-09-16)</h2>
<h3>New components</h3>
<ul>
<li><strong>AviSynth</strong> (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/3071">#3071</a>) <a href="https://github.com/PrismJS/prism/commit/746a4b1a"><code>746a4b1a</code></a></li>
<li><strong>Avro IDL</strong> (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/3051">#3051</a>) <a href="https://github.com/PrismJS/prism/commit/87e5a376"><code>87e5a376</code></a></li>
<li><strong>Bicep</strong> (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/3027">#3027</a>) <a href="https://github.com/PrismJS/prism/commit/c1dce998"><code>c1dce998</code></a></li>
<li><strong>GAP (CAS)</strong> (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/3054">#3054</a>) <a href="https://github.com/PrismJS/prism/commit/23cd9b65"><code>23cd9b65</code></a></li>
<li><strong>GN</strong> (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/3062">#3062</a>) <a href="https://github.com/PrismJS/prism/commit/4f97b82b"><code>4f97b82b</code></a></li>
<li><strong>Hoon</strong> (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/2978">#2978</a>) <a href="https://github.com/PrismJS/prism/commit/ea776756"><code>ea776756</code></a></li>
<li><strong>Kusto</strong> (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/3068">#3068</a>) <a href="https://github.com/PrismJS/prism/commit/e008ea05"><code>e008ea05</code></a></li>
<li><strong>Magma (CAS)</strong> (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/3055">#3055</a>) <a href="https://github.com/PrismJS/prism/commit/a1b67ce3"><code>a1b67ce3</code></a></li>
<li><strong>MAXScript</strong> (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/3060">#3060</a>) <a href="https://github.com/PrismJS/prism/commit/4fbdd2f8"><code>4fbdd2f8</code></a></li>
<li><strong>Mermaid</strong> (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/3050">#3050</a>) <a href="https://github.com/PrismJS/prism/commit/148c1eca"><code>148c1eca</code></a></li>
<li><strong>Razor C#</strong> (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/3064">#3064</a>) <a href="https://github.com/PrismJS/prism/commit/4433ccfc"><code>4433ccfc</code></a></li>
<li><strong>Systemd configuration file</strong> (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/3053">#3053</a>) <a href="https://github.com/PrismJS/prism/commit/8df825e0"><code>8df825e0</code></a></li>
<li><strong>Wren</strong> (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/3063">#3063</a>) <a href="https://github.com/PrismJS/prism/commit/6a356d25"><code>6a356d25</code></a></li>
</ul>
<h3>Updated components</h3>
<ul>
<li><strong>Bicep</strong>
<ul>
<li>Added support for multiline and interpolated strings and other improvements (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/3028">#3028</a>) <a href="https://github.com/PrismJS/prism/commit/748bb9ac"><code>748bb9ac</code></a></li>
</ul>
</li>
<li><strong>C#</strong>
<ul>
<li>Added <code>with</code> keyword &amp; improved record support (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/2993">#2993</a>) <a href="https://github.com/PrismJS/prism/commit/fdd291c0"><code>fdd291c0</code></a></li>
<li>Added <code>record</code>, <code>init</code>, and <code>nullable</code> keyword (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/2991">#2991</a>) <a href="https://github.com/PrismJS/prism/commit/9b561565"><code>9b561565</code></a></li>
<li>Added context check for <code>from</code> keyword (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/2970">#2970</a>) <a href="https://github.com/PrismJS/prism/commit/158f25d4"><code>158f25d4</code></a></li>
</ul>
</li>
<li><strong>C++</strong>
<ul>
<li>Fixed generic function false positive (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/3043">#3043</a>) <a href="https://github.com/PrismJS/prism/commit/5de8947f"><code>5de8947f</code></a></li>
</ul>
</li>
<li><strong>Clojure</strong>
<ul>
<li>Improved tokenization (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/3056">#3056</a>) <a href="https://github.com/PrismJS/prism/commit/8d0b74b5"><code>8d0b74b5</code></a></li>
</ul>
</li>
<li><strong>Hoon</strong>
<ul>
<li>Fixed mixed-case aura tokenization (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/3002">#3002</a>) <a href="https://github.com/PrismJS/prism/commit/9c8911bd"><code>9c8911bd</code></a></li>
</ul>
</li>
<li><strong>Liquid</strong>
<ul>
<li>Added all objects from Shopify reference (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/2998">#2998</a>) <a href="https://github.com/PrismJS/prism/commit/693b7433"><code>693b7433</code></a></li>
<li>Added <code>empty</code> keyword (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/2997">#2997</a>) <a href="https://github.com/PrismJS/prism/commit/fe3bc526"><code>fe3bc526</code></a></li>
</ul>
</li>
<li><strong>Log file</strong>
<ul>
<li>Added support for Java stack traces (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/3003">#3003</a>) <a href="https://github.com/PrismJS/prism/commit/b0365e70"><code>b0365e70</code></a></li>
</ul>
</li>
<li><strong>Markup</strong>
<ul>
<li>Made most patterns greedy (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/3065">#3065</a>) <a href="https://github.com/PrismJS/prism/commit/52e8cee9"><code>52e8cee9</code></a></li>
<li>Fixed ReDoS (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/3078">#3078</a>) <a href="https://github.com/PrismJS/prism/commit/0ff371bb"><code>0ff371bb</code></a></li>
</ul>
</li>
<li><strong>PureScript</strong>
<ul>
<li>Made <code>∀</code> a keyword (alias for <code>forall</code>) (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/3005">#3005</a>) <a href="https://github.com/PrismJS/prism/commit/b38fc89a"><code>b38fc89a</code></a></li>
<li>Improved Haskell and PureScript (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/3020">#3020</a>) <a href="https://github.com/PrismJS/prism/commit/679539ec"><code>679539ec</code></a></li>
</ul>
</li>
<li><strong>Python</strong>
<ul>
<li>Support for underscores in numbers (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/3039">#3039</a>) <a href="https://github.com/PrismJS/prism/commit/6f5d68f7"><code>6f5d68f7</code></a></li>
</ul>
</li>
<li><strong>Sass</strong>
<ul>
<li>Fixed issues with CSS Extras (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/2994">#2994</a>) <a href="https://github.com/PrismJS/prism/commit/14fdfe32"><code>14fdfe32</code></a></li>
</ul>
</li>
<li><strong>Shell session</strong>
<ul>
<li>Fixed command false positives (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/3048">#3048</a>) <a href="https://github.com/PrismJS/prism/commit/35b88fcf"><code>35b88fcf</code></a></li>
<li>Added support for the percent sign as shell symbol (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/3010">#3010</a>) <a href="https://github.com/PrismJS/prism/commit/4492b62b"><code>4492b62b</code></a></li>
</ul>
</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="99d94fa7c3"><code>99d94fa</code></a> 1.25.0</li>
<li><a href="6d8e54703b"><code>6d8e547</code></a> Updated changelog (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/3083">#3083</a>)</li>
<li><a href="e008ea056d"><code>e008ea0</code></a> Added support for Kusto (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/3068">#3068</a>)</li>
<li><a href="4433ccfc0c"><code>4433ccf</code></a> Added support for ASP.NET Razor (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/3064">#3064</a>)</li>
<li><a href="6a356d253a"><code>6a356d2</code></a> Added support for Wren (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/3063">#3063</a>)</li>
<li><a href="4fbdd2f8f8"><code>4fbdd2f</code></a> Added support for MAXScript (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/3060">#3060</a>)</li>
<li><a href="746a4b1adf"><code>746a4b1</code></a> Added AviSynth language definition (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/3071">#3071</a>)</li>
<li><a href="ffb2043909"><code>ffb2043</code></a> Twilight theme: Increase selector specificities of plugin overrides (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/3081">#3081</a>)</li>
<li><a href="52e8cee97a"><code>52e8cee</code></a> Markup: Made most patterns greedy (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/3065">#3065</a>)</li>
<li><a href="c7b6a7f6a5"><code>c7b6a7f</code></a> Previewers: Ensure popup is visible across themes (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/3080">#3080</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/PrismJS/prism/compare/v1.23.0...v1.25.0">compare view</a></li>
</ul>
</details>
<details>
<summary>Maintainer changes</summary>
<p>This version was pushed to npm by <a href="https://www.npmjs.com/~rundevelopment">rundevelopment</a>, a new releaser for prismjs since your current version.</p>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=prismjs&package-manager=npm_and_yarn&previous-version=1.23.0&new-version=1.25.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)
You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/tendermint/tendermint/network/alerts).

</details>
2021-10-27 08:54:53 +00:00
Callum Waters
ce89292712 docs: fix broken links and layout (#7154)
This PR does a few minor touch ups to the docs
2021-10-27 08:36:32 +00:00
Sam Kleinman
4bd8c5ab6f p2p: transport should be captive resposibility of router (#7160)
The main (and minor) win of this PR is that the transport is fully the
responsibility of the router and the node doesn't need to be responsible for its lifecylce.
2021-10-26 16:34:44 +00:00
Sam Kleinman
b15b2c1b78 flowrate: cleanup unused files (#7158)
I saw one of these tests fail and it looks like it was using code that
wasn't being called anywhere, so I deleted it, and avoided the package
name aliasing.
2021-10-26 16:11:34 +00:00
Sam Kleinman
cb39e2f917 node,blocksync,config: remove support for running nodes with blocksync disabled (#7159)
We stopped testing these configurations a while ago, and it doesn't
really make sense to allow nodes to run in this configuration. This
drops support for non-blocksync nodes and cleans up the
configuration/tests accordingly.

Closes: #6908
2021-10-26 14:35:14 +00:00
William Banfield
b4bc6bb4e8 p2p: add message type into the send/recv bytes metrics (#7155)
This pull request adds a new "mesage_type" label to the send/recv bytes metrics calculated in the p2p code.

Below is a snippet of the updated metrics that includes the updated label:
```
tendermint_p2p_peer_receive_bytes_total{chID="32",chain_id="ci",message_type="consensus_HasVote",peer_id="2551a13ed720101b271a5df4816d1e4b3d3bd133"} 652
tendermint_p2p_peer_receive_bytes_total{chID="32",chain_id="ci",message_type="consensus_HasVote",peer_id="4b1068420ef739db63377250553562b9a978708a"} 631
tendermint_p2p_peer_receive_bytes_total{chID="32",chain_id="ci",message_type="consensus_HasVote",peer_id="927c50a5e508c747830ce3ba64a3f70fdda58ef2"} 631
tendermint_p2p_peer_receive_bytes_total{chID="32",chain_id="ci",message_type="consensus_NewRoundStep",peer_id="2551a13ed720101b271a5df4816d1e4b3d3bd133"} 393
tendermint_p2p_peer_receive_bytes_total{chID="32",chain_id="ci",message_type="consensus_NewRoundStep",peer_id="4b1068420ef739db63377250553562b9a978708a"} 357
tendermint_p2p_peer_receive_bytes_total{chID="32",chain_id="ci",message_type="consensus_NewRoundStep",peer_id="927c50a5e508c747830ce3ba64a3f70fdda58ef2"} 386
```
2021-10-26 12:45:33 +00:00
Sam Kleinman
23be048294 p2p: use correct transport configuration (#7152) 2021-10-25 07:19:20 -04:00
Marko
0d68161cc8 docs: add reactor sections (#6510) 2021-10-22 18:14:43 +02:00
Callum Waters
68ca65f5d7 pex: remove legacy proto messages (#7147)
This PR implements the proto changes made in https://github.com/tendermint/spec/pull/352, removing the legacy messages that were used in the pex reactor.
2021-10-22 12:07:46 +00:00
Sam Kleinman
88bdd328ed e2e: evidence test refactor (#7146)
I've seen this failure a few times and this change seems like it
reduces the number of times that we're waiting (and can therefore hit
a timeout.)
2021-10-21 16:02:26 +00:00
Callum Waters
a8ff617773 state: add height assertion to rollback function (#7143) 2021-10-21 13:40:43 +02:00
Sam Kleinman
a8917040a8 e2e: avoid unset defaults in generated tests (#7145)
I've observed a few cases in tests that are probably wrong, and added
some tests to cover this.
2021-10-20 16:38:59 +00:00
Sam Kleinman
a30860a307 e2e: always enable blocksync (#7144)
I believe it was the case that blocksync was not consistently enabled in master, and this makes makes it the default in the master tests.
2021-10-20 14:38:29 +00:00
M. J. Fromberger
f7f4067968 pubsub: simplify and improve server concurrency handling (#7070)
Rework the internal plumbing of the server. This change does not modify the
exported interfaces or semantics of the package, and all the existing tests
still pass.

The main changes here are to:

- Simplify the interface for subscription indexing with a typed index rather
  than a single nested map.

- Ensure orderly shutdown of channels, so that there is no longer a dynamic
  race with concurrent publishers & subscribers at shutdown.

- Remove a layer of indirection between publishers and subscribers. This mainly
  helps legibility.

- Remove order dependencies between registration and delivery.

- Add documentation comments where they seemed helpful, and clarified the
  existing comments where it was practical.

Although performance was not a primary goal of this change, the simplifications
did very slightly reduce memory use and increase throughput on the existing
benchmarks, though the delta is not statistically significant.

    BENCHMARK                BEFORE AFTER SPEEDUP (%) B/op (B) B/op (A)
    Benchmark10Clients-12    5947   5566  6.4         2017     1942
    Benchmark100Clients-12   6111   5762  5.7         1992     1910
    Benchmark1000Clients-12  6983   6344  9.2         2046     1959
2021-10-19 15:32:13 -07:00
William Banfield
b0130c88fb mempool: remove panic when recheck-tx was not sent to ABCI application (#7134)
This pull request fixes a panic that exists in both mempools. The panic occurs when the ABCI client misses a response from the ABCI application. This happen when the ABCI client drops the request as a result of a full client queue. The fix here was to loop through the ordered list of recheck-tx in the callback until one matches the currently observed recheck request.
2021-10-19 13:30:52 +00:00
dependabot[bot]
0408888a5e build(deps): Bump actions/checkout from 2.3.4 to 2.3.5 (#7139)
Bumps [actions/checkout](https://github.com/actions/checkout) from 2.3.4 to 2.3.5.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/actions/checkout/releases">actions/checkout's releases</a>.</em></p>
<blockquote>
<h2>v2.3.5</h2>
<p>Update dependencies</p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="1e204e9a92"><code>1e204e9</code></a> update licensed check (<a href="https://github-redirect.dependabot.com/actions/checkout/issues/606">#606</a>)</li>
<li><a href="0299a0d2b6"><code>0299a0d</code></a> update dist (<a href="https://github-redirect.dependabot.com/actions/checkout/issues/605">#605</a>)</li>
<li><a href="be0f448456"><code>be0f448</code></a> Bump ws from 5.2.2 to 5.2.3 (<a href="https://github-redirect.dependabot.com/actions/checkout/issues/604">#604</a>)</li>
<li><a href="56c00a7b1f"><code>56c00a7</code></a> Bump tmpl from 1.0.4 to 1.0.5 (<a href="https://github-redirect.dependabot.com/actions/checkout/issues/588">#588</a>)</li>
<li><a href="85e47d1a2b"><code>85e47d1</code></a> Bump path-parse from 1.0.6 to 1.0.7 (<a href="https://github-redirect.dependabot.com/actions/checkout/issues/568">#568</a>)</li>
<li><a href="3fc17f8645"><code>3fc17f8</code></a> Bump hosted-git-info from 2.8.5 to 2.8.9 (<a href="https://github-redirect.dependabot.com/actions/checkout/issues/500">#500</a>)</li>
<li><a href="e3bc06d986"><code>e3bc06d</code></a> Bump lodash from 4.17.15 to 4.17.21 (<a href="https://github-redirect.dependabot.com/actions/checkout/issues/499">#499</a>)</li>
<li><a href="442567ba57"><code>442567b</code></a> Bump handlebars from 4.5.3 to 4.7.7 (<a href="https://github-redirect.dependabot.com/actions/checkout/issues/497">#497</a>)</li>
<li><a href="7f00b66d06"><code>7f00b66</code></a> Bump y18n from 4.0.0 to 4.0.1 (<a href="https://github-redirect.dependabot.com/actions/checkout/issues/469">#469</a>)</li>
<li><a href="eccf386318"><code>eccf386</code></a> Bump <code>@​actions/core</code> from 1.1.3 to 1.2.6 (<a href="https://github-redirect.dependabot.com/actions/checkout/issues/361">#361</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/actions/checkout/compare/v2.3.4...v2.3.5">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=2.3.4&new-version=2.3.5)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2021-10-19 07:47:36 +00:00
Marko
19ec4a5322 tools: clone proto files from spec (#6976)
## Description

clone proto files from spec in order to have them in a single location

closes https://github.com/tendermint/spec/issues/343
2021-10-18 08:22:02 +00:00
Sam Kleinman
ca8f004112 p2p: remove final shims from p2p package (#7136)
This is, perhaps, the trival final piece of #7075 that I've been
working on.

There's more work to be done: 
- push more of the setup into the pacakges themselves
- move channel-based sending/filtering out of the 
- simplify the buffering throuhgout the p2p stack.
2021-10-15 20:08:09 +00:00
Sam Kleinman
7143f14a63 p2p: simplify open channel interface (#7133)
A fourth #7075 component patch to simplify the channel creation interface
2021-10-15 18:00:24 +00:00
Sam Kleinman
cbe6ad6cd5 p2p: flatten channel descriptor (#7132) 2021-10-15 13:03:10 -04:00
Sam Kleinman
0900ea8396 p2p: channel shim cleanup (#7129) 2021-10-15 12:31:33 -04:00
Sam Kleinman
f4a56f4034 p2p: refactor channel description (#7130)
This is another small sliver of #7075, with the intention of removing
the legacy shim layer related to channel registration.
2021-10-15 15:45:12 +00:00
Marko
66a11fe527 blocksync: remove v0 folder structure (#7128)
Remove v0 blocksync folder structure.
2021-10-15 13:03:53 +00:00
M. J. Fromberger
006e6108a1 Fix the protobuf generation script. (#7127)
This should have been part of #7121, but I missed it.
2021-10-15 12:18:53 +00:00
Callum Waters
c3dc7d20df docs: add roadmap to repo (#7107) 2021-10-15 10:35:36 +02:00
Jared Zhou
b95c261981 rpc: fix typo in broadcast commit (#7124) 2021-10-14 10:34:25 +02:00
M. J. Fromberger
bc1a20dbb8 Revert temporary patch to buf.yaml. (#7122)
This patch was needed to pass the buf breakage check for the proto file removed
in #7121, but now that master contains the change we no longer need the patch.
2021-10-13 23:37:50 +00:00
M. J. Fromberger
86f00135dd rpc: Remove the deprecated gRPC interface to the RPC service (#7121)
This change removes the partial gRPC interface to the RPC service, which was
deprecated in resolution of #6718.

Details:
- rpc: Remove the client and server interfaces and proto definitions.
- Remove the gRPC settings from the config library.
- Remove gRPC setup for the RPC service in the node startup.
- Fix various test helpers to remove gRPC bits.
- Remove the --rpc.grpc-laddr flag from the CLI.

Note that to satisfy the protobuf interface check, this change also includes a
temporary edit to buf.yaml, that I will revert after this is merged.
2021-10-13 15:01:01 -07:00
William Banfield
ff7b0e638e p2p: fix priority queue bytes pending calculation (#7120)
This metric describes itself as 'pending' but never actual decrements when the messages are removed from the queue.

This change fixes that by decrementing the metric when the data is removed from the queue.
2021-10-13 21:18:44 +00:00
William Banfield
36a1acff52 internal/proxy: add initial set of abci metrics (#7115)
This PR adds an initial set of metrics for use ABCI. The initial metrics enable the calculation of timing histograms and call counts for each of the ABCI methods. The metrics are also labeled as either 'sync' or 'async' to determine if the method call was performed using ABCI's `*Async` methods.

An example of these metrics is included here for reference:
```
tendermint_abci_connection_method_timing_bucket{chain_id="ci",method="commit",type="sync",le="0.0001"} 0
tendermint_abci_connection_method_timing_bucket{chain_id="ci",method="commit",type="sync",le="0.0004"} 5
tendermint_abci_connection_method_timing_bucket{chain_id="ci",method="commit",type="sync",le="0.002"} 12
tendermint_abci_connection_method_timing_bucket{chain_id="ci",method="commit",type="sync",le="0.009"} 13
tendermint_abci_connection_method_timing_bucket{chain_id="ci",method="commit",type="sync",le="0.02"} 13
tendermint_abci_connection_method_timing_bucket{chain_id="ci",method="commit",type="sync",le="0.1"} 13
tendermint_abci_connection_method_timing_bucket{chain_id="ci",method="commit",type="sync",le="0.65"} 13
tendermint_abci_connection_method_timing_bucket{chain_id="ci",method="commit",type="sync",le="2"} 13
tendermint_abci_connection_method_timing_bucket{chain_id="ci",method="commit",type="sync",le="6"} 13
tendermint_abci_connection_method_timing_bucket{chain_id="ci",method="commit",type="sync",le="25"} 13
tendermint_abci_connection_method_timing_bucket{chain_id="ci",method="commit",type="sync",le="+Inf"} 13
tendermint_abci_connection_method_timing_sum{chain_id="ci",method="commit",type="sync"} 0.007802058000000001
tendermint_abci_connection_method_timing_count{chain_id="ci",method="commit",type="sync"} 13
```

These metrics can easily be graphed using prometheus's `histogram_quantile(...)` method to pick out a particular quantile to graph or examine. I chose buckets that were somewhat of an estimate of expected range of times for ABCI operations. They start at .0001 seconds and range to 25 seconds. The hope is that this range captures enough possible times to be useful for us and operators.
2021-10-13 20:52:25 +00:00
Sam Kleinman
164de91842 rpc: move evidence tests to shared fixtures (#7119)
This is follow on to the work in #7112.
2021-10-13 18:29:03 +00:00
Callum Waters
a524e95b19 pex: update pex messages (#352) 2021-10-13 17:20:55 +02:00
Callum Waters
4fe0f262d4 changelog: add 0.34.14 updates (#7117)
This PR adds the 0.34.14 changes to the changelog in master
2021-10-13 12:28:43 +00:00
M. J. Fromberger
6538776e6a build: Fix build-docker to include the full context. (#7114)
Fixes #7068. The build-docker rule relies on being able to run make
build-linux, but did not pull the Makefile into the build context.
There are various ways to fix this, but this was probably the smallest.
2021-10-12 22:29:06 +00:00
Sam Kleinman
4781d04d18 node: always close database engine (#7113) 2021-10-12 17:40:59 -04:00
Sam Kleinman
52ed994416 test: cleanup rpc/client and node test fixtures (#7112) 2021-10-12 16:49:45 -04:00
lklimek
0524558696 refactor: assignment copies lock value (#7108)
Co-authored-by: M. J. Fromberger <fromberger@interchain.io>
2021-10-12 13:22:57 -07:00
Sam Kleinman
d837432681 ci: use run-multiple.sh for e2e pr tests (#7111)
* ci: use run-multiple.sh for e2e pr tests

* fix labeling

* Update .github/workflows/e2e-nightly-35x.yml

Co-authored-by: M. J. Fromberger <michael.j.fromberger@gmail.com>

Co-authored-by: M. J. Fromberger <michael.j.fromberger@gmail.com>
2021-10-12 16:28:10 +00:00
Sam Kleinman
34a3fcd8fc Revert "abci: change client to use multi-reader mutexes (#6306)" (#7106)
This reverts commit 1c4dbe30d4.
2021-10-12 11:29:31 -04:00
M. J. Fromberger
48295955ed light: Update links in package docs. (#7099)
Fixes #7098. The light client documentation moved to the spec repository.

I was not able to figure out what happened to light-client-protocol.md, it was removed in #5252 but no corresponding file exists in the spec repository. Since the spec also discusses the protocol, this change simply links to the spec and removes the non-functional reference.

Alternatively we could link to the top-level [light client doc](https://docs.tendermint.com/master/tendermint-core/light-client.html) if you think that's better.
2021-10-11 23:21:45 +00:00
Sam Kleinman
ded310093e lint: fix collection of stale errors (#7090)
Few things that had been annoying.
2021-10-09 15:33:54 +00:00
Sam Kleinman
befd669794 e2e: light nodes should use builtin abci app (#7095) 2021-10-09 04:20:09 +00:00
Sam Kleinman
3646b635d3 p2p, types: remove legacy NetAddress type (#7084) 2021-10-08 12:29:20 -04:00
Callum Waters
59404003ee p2p: rename pexV2 to pex (#7088) 2021-10-08 16:53:54 +02:00
Sam Kleinman
f2a8f5e054 e2e: abci protocol should be consistent across networks (#7078)
It seems weird in retrospect that we allow networks to contain
applications that use different ABCI protocols.
2021-10-08 13:42:23 +00:00
Sam Kleinman
1b5bb5348f p2p: cleanup unused arguments (#7079)
This is mostly just reading through the output of uparam, after
noticing that there were a few places where we were ignoring some arguments.
2021-10-08 12:49:17 +00:00
Callum Waters
4ca130d226 cli: allow node operator to rollback last state (#7033) 2021-10-08 09:15:13 +02:00
Sam Kleinman
1f438f205a e2e: improve network connectivity (#7077)
This tweaks the connectivity of test configurations, in hopes that more will be viable.

Additionally reduces the prevalence of testing the legacy mempool.
2021-10-07 23:07:35 +00:00
Sam Kleinman
5bf30bb049 p2p: cleanup transport interface (#7071)
This is another batch of things to cleanup in the legacy P2P system.
2021-10-06 19:17:44 +00:00
Dev Ojha
86b66994d4 ABCI++ markdown integration into Tendermint (for spec) (#327) 2021-10-06 16:10:23 +02:00
dependabot[bot]
e53f92ba9c build(deps): Bump github.com/adlio/schema from 1.1.13 to 1.1.14 (#7069)
Bumps [github.com/adlio/schema](https://github.com/adlio/schema) from 1.1.13 to 1.1.14.
- [Release notes](https://github.com/adlio/schema/releases)
- [Commits](https://github.com/adlio/schema/compare/v1.1.13...v1.1.14)

---
updated-dependencies:
- dependency-name: github.com/adlio/schema
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-10-06 09:14:55 -04:00
Callum Waters
e4d6f6df09 docs: create separate releases doc (#7040) 2021-10-06 11:59:21 +02:00
Prajjwol Gautam
f0914e66e3 Typo fix in README.md (#350) 2021-10-06 06:31:16 +00:00
Sam Kleinman
0ef1a12186 ci: fix p2p configuration for e2e tests (#7066)
My earlier p2p cleanup code removed support for the p2p tests from the
e2e generator and runner, but missed removing the CI
configuration. This patch remedies that.
2021-10-06 04:11:19 +00:00
Sam Kleinman
72aee47847 ci: 0.35.x nightly should run from master and checkout the release branch (#7067)
Nightly branches run CI from master branch, and the configuration misses checking out the correct ref.
2021-10-06 04:08:54 +00:00
M. J. Fromberger
109814c85a Clarify decision record for ADR-065. (#7062)
While discussing a question about the indexing interface (#7044), we found some
confusion about the intent of the design decisions in ADR 065.

Based on discussion with the original authors of the ADR, this commit adds some
language to the Decisions section to spell out the intentions more clearly, and
to call out future work that this ADR did not explicitly decide about.
2021-10-05 14:10:11 -07:00
Sam Kleinman
851d2e3bde mempool,rpc: add removetx rpc method (#7047)
Addresses one of the concerns with #7041.

Provides a mechanism (via the RPC interface) to delete a single transaction, described by its hash, from the mempool. The method returns an error if the transaction cannot be found. Once the transaction is removed it remains in the cache and cannot be resubmitted until the cache is cleared or it expires from the cache.
2021-10-05 20:23:15 +00:00
Sam Kleinman
3ea81bfaa7 p2p: remove wdrr queue (#7064)
This code hasn't been battle tested, and seems to have grown
increasingly flaky int tests. Given our general direction of reducing
queue complexity over the next couple of releases I think it makes
sense to remove it.
2021-10-05 20:09:31 +00:00
Callum Waters
5703ae2fb3 e2e: automatically prune old app snapshots (#7034)
This PR tackles the case of using the e2e application in a long lived testnet. The application continually saves snapshots (usually every 100 blocks) which after a while bloats the size of the application. This PR prunes older snapshots so that only the most recent 10 snapshots remain.
2021-10-05 18:19:12 +00:00
Sam Kleinman
03ad7d6f20 p2p: delete legacy stack initial pass (#7035)
A few notes:

- this is not all the deletion that we can do, but this is the most
  "simple" case: it leaves in shims, and there's some trivial
  additional cleanup to the transport that can happen but that
  requires writing more code, and I wanted this to be easy to review
  above all else.
  
- This should land *after* we cut the branch for 0.35, but I'm
  anticipating that to happen soon, and I wanted to run this through
  CI.
2021-10-05 13:40:32 +00:00
William Banfield
f5b9c210ca consensus: wait until peerUpdates channel is closed to close remaining peers (#7058)
The race occurred as a result of a goroutine launched by `processPeerUpdate` racing with the `OnStop` method. The `processPeerUpdates` goroutine deletes from the map as `OnStop` is reading from it. This change updates the `OnStop` method to wait for the peer updates channel to be done before closing the peers. It also copies the map contents to a new map so that it will not conflict with the view of the map that the goroutine created in `processPeerUpdate` sees.
2021-10-04 22:37:18 +00:00
Sam Kleinman
cb69ed8135 blocksync/v2: remove unsupported reactor (#7046)
This commit should be one of the first to land as part of the v0.36
cycle *after* cutting the 0.35 branch. 

The blocksync/v2 reactor was originally implemented as an experiement
to produce an implementation of the blockstack protocol that would be
easier to test and validate, but it was never appropriately
operationalized and this implementation was never fully debugged. When
the p2p layer was refactored as part of the 0.35 cycle, the v2
implementation was not refactored and it was left in the codebase but
not removed. This commit just removes all references to it.
2021-10-04 21:12:51 +00:00
William Banfield
c201e3b54d scripts: fix authors script to take a ref (#7051)
This script is referenced from the release documentation, we should make sure it's functional. This is helpful in generating the "Special Thanks" section of the changelog.
2021-10-04 19:47:50 +00:00
M. J. Fromberger
b30ec89ee9 Add an e2e workflow for the v0.35.x backport branch. (#7048) 2021-10-04 10:35:16 -07:00
Sam Kleinman
6276fdcb5d ci: mergify support for 0.35 backports (#7050) 2021-10-04 13:04:15 -04:00
M. J. Fromberger
f361ce09b3 Update Go toolchains to 1.17 in Actions workflows. (#7049) 2021-10-04 15:40:50 +00:00
William Banfield
243c62cc68 statesync: improve rare p2p race condition (#7042)
This is intended to fix a test failure that occurs in the p2p state provider. The issue presents as the state provider timing out waiting for the consensus params response. 

The reason that this can occur is because the statesync reactor has the possibility of attempting to respond to the params request before the state provider is ready to read it. This results in the reactor hitting the `default` case seen here and then never sending on the channel. The stateprovider will then block waiting for a response and never receive one because the reactor opted not to send it.
2021-10-01 20:33:12 +00:00
William Banfield
177850a2c9 statesync: remove deadlock on init fail (#7029)
When statesync is stopped during shutdown, it has the possibility of deadlocking. A dump of goroutines reveals that this is related to the peerUpdates channel not returning anything on its `Done()` channel when `OnStop` is called. As this is occuring, `processPeerUpdate` is attempting to acquire the reactor lock. It appears that this lock can never be acquired. I looked for the places where the lock may remain locked accidentally and cleaned them up in hopes to eradicate the issue. Dumps of the relevant goroutines may be found below. Note that the line numbers below are relative to the code in the `v0.35.0-rc1` tag.

```
goroutine 36 [chan receive]:
github.com/tendermint/tendermint/internal/statesync.(*Reactor).OnStop(0xc00058f200)
        github.com/tendermint/tendermint/internal/statesync/reactor.go:243 +0x117
github.com/tendermint/tendermint/libs/service.(*BaseService).Stop(0xc00058f200, 0x0, 0x0)
        github.com/tendermint/tendermint/libs/service/service.go:171 +0x323
github.com/tendermint/tendermint/node.(*nodeImpl).OnStop(0xc0001ea240)
        github.com/tendermint/tendermint/node/node.go:769 +0x132
github.com/tendermint/tendermint/libs/service.(*BaseService).Stop(0xc0001ea240, 0x0, 0x0)
        github.com/tendermint/tendermint/libs/service/service.go:171 +0x323
github.com/tendermint/tendermint/cmd/tendermint/commands.NewRunNodeCmd.func1.1()
        github.com/tendermint/tendermint/cmd/tendermint/commands/run_node.go:143 +0x62
github.com/tendermint/tendermint/libs/os.TrapSignal.func1(0xc000629500, 0x7fdb52f96358, 0xc0002b5030, 0xc00000daa0)
        github.com/tendermint/tendermint/libs/os/os.go:26 +0x102
created by github.com/tendermint/tendermint/libs/os.TrapSignal
        github.com/tendermint/tendermint/libs/os/os.go:22 +0xe6

goroutine 188 [semacquire]:
sync.runtime_SemacquireMutex(0xc00026b1cc, 0x0, 0x1)
        runtime/sema.go:71 +0x47
sync.(*Mutex).lockSlow(0xc00026b1c8)
        sync/mutex.go:138 +0x105
sync.(*Mutex).Lock(...)
        sync/mutex.go:81
sync.(*RWMutex).Lock(0xc00026b1c8)
        sync/rwmutex.go:111 +0x90
github.com/tendermint/tendermint/internal/statesync.(*Reactor).processPeerUpdate(0xc00026b080, 0xc000650008, 0x28, 0x124de90, 0x4)
        github.com/tendermint/tendermint/internal/statesync/reactor.go:849 +0x1a5
github.com/tendermint/tendermint/internal/statesync.(*Reactor).processPeerUpdates(0xc00026b080)
        github.com/tendermint/tendermint/internal/statesync/reactor.go:883 +0xab
created by github.com/tendermint/tendermint/internal/statesync.(*Reactor.OnStart
        github.com/tendermint/tendermint/internal/statesync/reactor.go:219 +0xcd)
```
2021-09-30 19:19:10 +00:00
M. J. Fromberger
bdd815ebc9 Align atomic struct field for compatibility in 32-bit ABIs. (#7037)
The layout of struct fields means that interior fields may not be properly
aligned for 64-bit access.

Fixes #7000.
2021-09-30 10:53:05 -07:00
M. J. Fromberger
77052370cc Update default config template to match mapstructure keys. (#7036)
Fix a couple of cases where we updated the keys in the config reader, but
forgot to update some of their uses in the default template.

Fixes #7031.
2021-09-30 17:13:32 +00:00
William Banfield
6a0d9c832a blocksync: fix shutdown deadlock issue (#7030)
When shutting down blocksync, it is observed that the process can hang completely. A dump of running goroutines reveals that this is due to goroutines not listening on the correct shutdown signal. Namely, the `poolRoutine` goroutine does not wait on `pool.Quit`. The `poolRoutine` does not receive any other shutdown signal during `OnStop` becuase it must stop before the `r.closeCh` is closed. Currently the `poolRoutine` listens in the `closeCh` which will not close until the `poolRoutine` stops and calls `poolWG.Done()`.

This change also puts the `requestRoutine()` in the `OnStart` method to make it more visible since it does not rely on anything that is spawned in the `poolRoutine`.

```
goroutine 183 [semacquire]:
sync.runtime_Semacquire(0xc0000d3bd8)
        runtime/sema.go:56 +0x45
sync.(*WaitGroup).Wait(0xc0000d3bd0)
        sync/waitgroup.go:130 +0x65
github.com/tendermint/tendermint/internal/blocksync/v0.(*Reactor).OnStop(0xc0000d3a00)
        github.com/tendermint/tendermint/internal/blocksync/v0/reactor.go:193 +0x47
github.com/tendermint/tendermint/libs/service.(*BaseService).Stop(0xc0000d3a00, 0x0, 0x0)
        github.com/tendermint/tendermint/libs/service/service.go:171 +0x323
github.com/tendermint/tendermint/node.(*nodeImpl).OnStop(0xc00052c000)
        github.com/tendermint/tendermint/node/node.go:758 +0xc62
github.com/tendermint/tendermint/libs/service.(*BaseService).Stop(0xc00052c000, 0x0, 0x0)
        github.com/tendermint/tendermint/libs/service/service.go:171 +0x323
github.com/tendermint/tendermint/cmd/tendermint/commands.NewRunNodeCmd.func1.1()
        github.com/tendermint/tendermint/cmd/tendermint/commands/run_node.go:143 +0x62
github.com/tendermint/tendermint/libs/os.TrapSignal.func1(0xc000df6d20, 0x7f04a68da900, 0xc0004a8930, 0xc0005a72d8)
        github.com/tendermint/tendermint/libs/os/os.go:26 +0x102
created by github.com/tendermint/tendermint/libs/os.TrapSignal
        github.com/tendermint/tendermint/libs/os/os.go:22 +0xe6


goroutine 161 [select]:
github.com/tendermint/tendermint/internal/blocksync/v0.(*Reactor).poolRoutine(0xc0000d3a00, 0x0)
        github.com/tendermint/tendermint/internal/blocksync/v0/reactor.go:464 +0x2b3
created by github.com/tendermint/tendermint/internal/blocksync/v0.(*Reactor).OnStart
        github.com/tendermint/tendermint/internal/blocksync/v0/reactor.go:174 +0xf1

goroutine 162 [select]:
github.com/tendermint/tendermint/internal/blocksync/v0.(*Reactor).processBlockSyncCh(0xc0000d3a00)
        github.com/tendermint/tendermint/internal/blocksync/v0/reactor.go:310 +0x151
created by github.com/tendermint/tendermint/internal/blocksync/v0.(*Reactor).OnStart
        github.com/tendermint/tendermint/internal/blocksync/v0/reactor.go:177 +0x54

goroutine 163 [select]:
github.com/tendermint/tendermint/internal/blocksync/v0.(*Reactor).processPeerUpdates(0xc0000d3a00)
        github.com/tendermint/tendermint/internal/blocksync/v0/reactor.go:363 +0x12b
created by github.com/tendermint/tendermint/internal/blocksync/v0.(*Reactor).OnStart
        github.com/tendermint/tendermint/internal/blocksync/v0/reactor.go:178 +0x76
```
2021-09-30 16:19:18 +00:00
Tess Rinearson
c9d92f5f19 .github: remove tessr and bez from codeowners (#7028) 2021-09-29 22:02:28 +02:00
Sam Kleinman
23fe6fd2f9 statesync: ensure test network properly configured (#7026)
This test reliably gets hung up on network configuration, (which may
be a real issue,) but it's network setup is handcranked and we should
ensure that the test focuses on it's core assertions and doesn't fail for 
test architecture reasons.
2021-09-29 16:38:27 +00:00
M. J. Fromberger
962caeae65 Make doc site index default to the latest release (#7023)
Fix the order of lines in docs/versions so that v0.34 is last (the current release).

Related changes:

- Update docs/DOCS_README.md to reflect the current state of how we publish the site.
- Fix the build-docs target in Makefile to not perturb the package-lock.json during the build.
- Fix the Makefile rule to not clobber package-lock.json.
2021-09-29 08:38:52 -07:00
Sam Kleinman
8758078786 consensus: avoid unbuffered channel in state test (#7025) 2021-09-29 11:19:34 -04:00
Sam Kleinman
b1dfbb8bc3 e2e: generator ensure p2p modes (#7021) 2021-09-28 17:04:37 -04:00
Sam Kleinman
c18470a5f1 e2e: use network size in load generator (#7019) 2021-09-28 16:47:35 -04:00
M. J. Fromberger
ea539dcb98 Update changelog for v0.35.0-rc2. (#7011)
Also, relinkify and update the bounty URL.
2021-09-28 07:59:47 -07:00
Sam Kleinman
e35a42fc68 e2e: use smaller transactions (#7016)
75% of the failures in the last run all ran with the 10kb
transactions. I'd like to dial it back and see if things improve more.
2021-09-28 14:39:26 +00:00
lklimek
1bd1593f20 fix: race condition in p2p_switch and pex_reactor (#7015)
Closes https://github.com/tendermint/tendermint/issues/7014
2021-09-28 09:32:14 -04:00
Sam Kleinman
6be36613c9 e2e: reduce number of stateless nodes in test networks (#7010) 2021-09-27 17:00:05 -04:00
Sam Kleinman
9a16d930c6 statesync: add logging while waiting for peers (#7007) 2021-09-27 16:46:40 -04:00
Sam Kleinman
8023a2aeef e2e: add generator tests (#7008) 2021-09-27 15:38:03 -04:00
Sam Kleinman
6eaa3b24d6 ci: use cheaper codecov data collection (#7009) 2021-09-27 15:22:25 -04:00
Sam Kleinman
b150ea6b3e e2e: avoid seed nodes when statesyncing (#7006) 2021-09-27 14:08:08 -04:00
Sam Kleinman
b879f71e8e e2e: reduce log noise (#7004) 2021-09-27 13:27:08 -04:00
dependabot[bot]
bce7c2f73b build(deps): Bump google.golang.org/grpc from 1.40.0 to 1.41.0 (#7003) 2021-09-27 17:12:56 +02:00
Callum Waters
60a6c6fb1a e2e: allow running of single node using the e2e app (#6982) 2021-09-27 15:43:07 +02:00
Sam Kleinman
fb9eaf576a e2e: improve chances of statesyncing success (#7001)
This reduces this situation where a node will get stuck block syncing,
which seemed to happen a lot in last nights run.
2021-09-26 16:10:36 +00:00
Sam Kleinman
37ca98a544 e2e: reduce number of statesyncs in test networks (#6999) 2021-09-25 19:14:38 -04:00
Sam Kleinman
c101fa17ab e2e: add limit and sort to generator (#6998)
I observed a couple of problems with the generator in some recent tests: 

- there were a couple of hybrid test cases which did not have any
  legacy nodes (randomness and all.) I change the probability to
  produce more reliable results.

- added options to the generation to be able to add a max (to
  compliment the earlier min) number of nodes for local testing. 

- added an option to support reversing the sort order so "more
  complex" networks were first, as well as tweaked some of the point
  values. 

- this refactored the generators cli parsing to be a bit more clear.
2021-09-25 15:53:04 +00:00
M. J. Fromberger
118bfe2087 abci: Flush socket requests and responses immediately. (#6997)
The main effect of this change is to flush the socket client and server message
encoding buffers immediately once the message is fully and correctly encoded.
This allows us to remove the timer and some other special cases, without
changing the observed behaviour of the system.

-- Background

The socket protocol client and server each use a buffered writer to encode
request and response messages onto the underlying connection. This reduces the
possibility of a single message being split across multiple writes, but has the
side-effect that a request may remain buffered for some time.

The implementation worked around this by keeping a ticker that occasionally
triggers a flush, and by flushing the writer in response to an explicit request
baked into the client/server protocol (see also #6994).

These workarounds are both unnecessary: Once a message has been dequeued for
sending and fully encoded in wire format, there is no real use keeping all or
part of it buffered locally.  Moreover, using an asynchronous process to flush
the buffer makes the round-trip performance of the request unpredictable.

-- Benchmarks

Code: https://play.golang.org/p/0ChUOxJOiHt

I found no pre-existing performance benchmarks to justify the flush pattern,
but a natural question is whether this will significantly harm client/server
performance.  To test this, I implemented a simple benchmark that transfers
randomly-sized byte buffers from a no-op "client" to a no-op "server" over a
Unix-domain socket, using a buffered writer, both with and without explicit
flushes after each write.

As the following data show, flushing every time (FLUSH=true) does reduce raw
throughput, but not by a significant amount except for very small request
sizes, where the transfer time is already trivial (1.9μs).  Given that the
client is calibrated for 1MiB transactions, the overhead is not meaningful.

The percentage in each section is the speedup for flushing only when the buffer
is full, relative to flushing every block.  The benchmark uses the default
buffer size (4096 bytes), which is the same value used by the socket client and
server implementation:

  FLUSH  NBLOCKS  MAX      AVG     TOTAL       ELAPSED       TIME/BLOCK
  false  3957471  512      255     1011165416  2.00018873s   505ns
  true   1068568  512      255     273064368   2.000217051s  1.871µs
                                                             (73%)

  false  536096   4096     2048    1098066401  2.000229108s  3.731µs
  true   477911   4096     2047    978746731   2.000177825s  4.185µs
                                                             (10.8%)

  false  124595   16384    8181    1019340160  2.000235086s  16.053µs
  true   120995   16384    8179    989703064   2.000329349s  16.532µs
                                                             (2.9%)

  false  2114     1048576  525693  1111316541  2.000479928s  946.3µs
  true   2083     1048576  526379  1096449173  2.001817137s  961.025µs
                                                             (1.5%)

Note also that the FLUSH=false baseline is actually faster than the production
code, which flushes more often than is required by the buffer filling up.

Moreover, the timer slows down the overall transaction rate of the client and
server, indepenedent of how fast the socket transfer is, so the loss on a real
workload is probably much less.
2021-09-24 15:37:25 -07:00
Sam Kleinman
71c6682b57 statesync: clean up reactor/syncer lifecylce (#6995)
I've been noticing that there are a number of situations where the
statesync reactor blocks waiting for peers (or similar,) I've moved
things around to improve outcomes in local tests.
2021-09-24 21:40:12 +00:00
Sam Kleinman
dbad701515 ci: use smart merges (#6993) 2021-09-24 14:59:10 -04:00
Sam Kleinman
5e45676875 e2e: do not inject evidence through light proxy (#6992)
In the last run, there were two problems at the RPC layer returned
from light nodes' RPC end points. I think exercising the light client
proxy RPC system is something that can/should be done via unit
testing, and that likely these errors are (in production) transient
and (in CI) very likely to fail for test environment issues.
2021-09-24 18:27:00 +00:00
Sam Kleinman
08982c81fc e2e: skip validation of status apphash (#6991)
I believe this assertion is likely redundant given that we're checking the block apphash.
2021-09-24 17:49:06 +00:00
Sam Kleinman
b203c91799 rpc: implement BroadcastTxCommit without event subscriptions (#6984) 2021-09-24 13:01:35 -04:00
Sam Kleinman
ab8cfb9f57 e2e: tighten timing for load generation (#6990) 2021-09-24 12:28:51 -04:00
Sam Kleinman
c909f8a236 e2e: avoid non-determinism in app hash check (#6985) 2021-09-24 11:52:47 -04:00
Sam Kleinman
363b87e8ea changelog: add entry for interanlizations (#6989) 2021-09-24 10:50:19 -04:00
dependabot[bot]
dd4141e76f build(deps): Bump github.com/go-kit/kit from 0.11.0 to 0.12.0 (#6988)
Bumps [github.com/go-kit/kit](https://github.com/go-kit/kit) from 0.11.0 to 0.12.0.
- [Release notes](https://github.com/go-kit/kit/releases)
- [Commits](https://github.com/go-kit/kit/compare/v0.11.0...v0.12.0)

---
updated-dependencies:
- dependency-name: github.com/go-kit/kit
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-24 10:15:30 -04:00
Sam Kleinman
5ccd668c78 e2e: load should be proportional to network (#6983) 2021-09-23 16:58:10 -04:00
Sam Kleinman
e94c418ad9 e2e: always preserve failed networks (#6981) 2021-09-23 14:52:14 -04:00
Sam Kleinman
3d410e4a6b e2e: only check validator sets after statesync (#6980) 2021-09-23 14:31:59 -04:00
Sam Kleinman
8a171b8426 e2e: improve manifest sorting algorithim (#6979) 2021-09-23 12:42:20 -04:00
Sam Kleinman
bb8ffcb95b store: move pacakge to internal (#6978) 2021-09-23 11:46:42 -04:00
M. J. Fromberger
cf7537ea5f cleanup: Reduce and normalize import path aliasing. (#6975)
The code in the Tendermint repository makes heavy use of import aliasing.
This is made necessary by our extensive reuse of common base package names, and
by repetition of similar names across different subdirectories.

Unfortunately we have not been very consistent about which packages we alias in
various circumstances, and the aliases we use vary. In the spirit of the advice
in the style guide and https://github.com/golang/go/wiki/CodeReviewComments#imports,
his change makes an effort to clean up and normalize import aliasing.

This change makes no API or behavioral changes. It is a pure cleanup intended
o help make the code more readable to developers (including myself) trying to
understand what is being imported where.

Only unexported names have been modified, and the changes were generated and
applied mechanically with gofmt -r and comby, respecting the lexical and
syntactic rules of Go.  Even so, I did not fix every inconsistency. Where the
changes would be too disruptive, I left it alone.

The principles I followed in this cleanup are:

- Remove aliases that restate the package name.
- Remove aliases where the base package name is unambiguous.
- Move overly-terse abbreviations from the import to the usage site.
- Fix lexical issues (remove underscores, remove capitalization).
- Fix import groupings to more closely match the style guide.
- Group blank (side-effecting) imports and ensure they are commented.
- Add aliases to multiple imports with the same base package name.
2021-09-23 07:52:07 -07:00
Marko
c9beef796d proto: regenerate code (#6977)
## Description

Replace all seemed to have been used causing proto files to be changed without being regenerated
2021-09-23 12:37:11 +00:00
Marko
fa2ccc80da proto: add tendermint go changes (#349)
* add missed proto files

* add abci changes

* rename blockchain to blocksync

* Update proto/tendermint/abci/types.proto

Co-authored-by: Callum Waters <cmwaters19@gmail.com>

Co-authored-by: Callum Waters <cmwaters19@gmail.com>
2021-09-23 10:26:25 +00:00
M. J. Fromberger
41ac5b90c5 Fix script paths in go:generate directives. (#6973)
We moved some files further down in the directory structure in #6964, which
caused the relative paths to the mockery wrapper to stop working.

There does not seem to be an obvious way to get the module root as a default
environment variable, so for now I just added the extra up-slashes.
2021-09-23 01:02:24 +00:00
M. J. Fromberger
7e4cc595d3 Remove the unused rpc/client/mocks package. (#6974)
This package is not used in the tendermint repository since 31e7cdee.

Note that this is not the same package as rpc/client/mock (N.B. singular) which
is still used in some tests.

A search of GitHub turns up only 11 uses, all of which are in clones of the
tendermint repo at old commits..
2021-09-22 17:45:11 -07:00
M. J. Fromberger
1995ef2572 rpc: Strip down the base RPC client interface. (#6971)
* rpc: Strip down the base RPC client interface.

Prior to this change, the RPC client interface requires implementing the entire
Service interface, but most of the methods of Service are not needed by the
concrete clients. Dissociate the Client interface from the Service interface.

- Extract only those methods of Service that are necessary to make the existing
  clients work.

- Update the clients to combine Start/Onstart and Stop/OnStop. This does not
  change what the clients do to start or stop. Only the websocket clients make
  use of this functionality anyway.

  The websocket implementation uses some plumbing from the BaseService helper.
  We should be able to excising that entirely, but the current interface
  dependencies among the clients would require a much larger change, and one
  that leaks into other (non-RPC) packages.

  As a less-invasive intermediate step, preserve the existing client behaviour
  (and tests) by extracting the necessary subset of the BaseService
  functionality to an analogous RunState helper for clients. I plan to obsolete
  that type in a future PR, but for now this makes a useful waypoint.

Related:
- Clean up client implementations.
- Update mocks.
2021-09-22 14:26:35 -07:00
Sam Kleinman
d04b6c2a5e e2e: run multiple should use preserve (#6972) 2021-09-22 13:13:31 -04:00
Sam Kleinman
1c4950dbd2 state: move package to internal (#6964) 2021-09-22 13:04:25 -04:00
Sam Kleinman
638346500d ci: reduce number of groups for 0.34 e2e runs (#6968) 2021-09-22 12:48:38 -04:00
Sam Kleinman
07d10184a1 inspect: remove duplicated construction path (#6966) 2021-09-22 12:32:49 -04:00
Sam Kleinman
5a13c7075b rfc: event system (#6957) 2021-09-21 11:22:55 -04:00
Daria K
0f53a590ff readme: update discord links (#6965)
This updates the Discord invite links.
2021-09-21 10:35:40 +00:00
Marko
df2d744ea9 config/docs: update and deprecated (#6879)
## Description

- Add deprecated to config values in toml
- update config in configuration doc
- explain how to set up a node with the new network

- add sentence about not needing to fork tendermint for built-in tutorial
 - closes #6865 
- add note to use a released version of tendermint with the tutorials. This is to avoid unknown issues prior to a release.
2021-09-21 10:32:00 +00:00
William Banfield
60d6856782 apps.md fixups (#341)
* wip

* wip

* wip

* remove comments in favor of gh comments

* wip

* udpates to language, should must etc

* Apply suggestions from code review

Co-authored-by: M. J. Fromberger <fromberger@interchain.io>

* remove tendermint cache description

Co-authored-by: M. J. Fromberger <fromberger@interchain.io>
2021-09-21 07:23:54 +00:00
JayT106
84ffaaaf37 statesync/rpc: metrics for the statesync and the rpc SyncInfo (#6795) 2021-09-21 09:22:16 +02:00
Sam Kleinman
9dfdc62eb7 proxy: move proxy package to internal (#6953) 2021-09-20 15:18:48 -04:00
dependabot[bot]
cf59b8b38e build(deps): Bump github.com/spf13/viper from 1.8.1 to 1.9.0 (#6961)
Bumps [github.com/spf13/viper](https://github.com/spf13/viper) from 1.8.1 to 1.9.0.
- [Release notes](https://github.com/spf13/viper/releases)
- [Commits](https://github.com/spf13/viper/compare/v1.8.1...v1.9.0)

---
updated-dependencies:
- dependency-name: github.com/spf13/viper
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sam Kleinman <garen@tychoish.com>
2021-09-20 13:03:10 -04:00
Sam Kleinman
87b876a73b crypto/armor: remove unused package (#6963) 2021-09-20 12:30:26 -04:00
Ismail Khoffi
ad067d73b9 rfc: Fix a few typos and formatting glitches p2p roadmap (#6960) 2021-09-20 09:02:29 -04:00
dependabot[bot]
ea6eecbb91 build(deps): Bump github.com/vektra/mockery/v2 from 2.9.3 to 2.9.4 (#6956)
Bumps [github.com/vektra/mockery/v2](https://github.com/vektra/mockery) from 2.9.3 to 2.9.4.
- [Release notes](https://github.com/vektra/mockery/releases)
- [Changelog](https://github.com/vektra/mockery/blob/master/.goreleaser.yml)
- [Commits](https://github.com/vektra/mockery/compare/v2.9.3...v2.9.4)

---
updated-dependencies:
- dependency-name: github.com/vektra/mockery/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-17 10:06:40 -04:00
Callum Waters
e2a038e039 light: update initialization description (#320) 2021-09-17 12:10:26 +02:00
William Banfield
bf9232e99f e2e: cleanup on all errors if preserve not specified (#6950)
If the e2e tests error, they leave all of the e2e state around including containers and networks etc. 
We should clean this up when the tests shuts down, even if it exits in error.
2021-09-17 08:35:49 +00:00
Sam Kleinman
b0423e2445 e2e: allow load generator to succed for short tests (#6952)
This should address last night's failure. We've taken the perspective
of "the load generator shouldn't cause tests to fail" in recent
days/weeks, and I think this is just a next step along that line. The
e2e tests shouldn't test performance. 

I included some comments indicating the ways that this isn't ideal (it
is perhaps not), and I think that if test networks could make
assertions about the required rate, that might be a cool future
improvement (and good, perhaps, for system benchmarking.)
2021-09-16 15:45:51 +00:00
dependabot[bot]
b0684bd300 build(deps): Bump github.com/vektra/mockery/v2 from 2.9.0 to 2.9.3 (#6951)
Bumps [github.com/vektra/mockery/v2](https://github.com/vektra/mockery) from 2.9.0 to 2.9.3.
- [Release notes](https://github.com/vektra/mockery/releases)
- [Changelog](https://github.com/vektra/mockery/blob/master/.goreleaser.yml)
- [Commits](https://github.com/vektra/mockery/compare/v2.9.0...v2.9.3)

---
updated-dependencies:
- dependency-name: github.com/vektra/mockery/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-16 08:41:46 -04:00
William Banfield
382947ce93 rfc: add performance taxonomy rfc (#6921)
This document attempts to capture and discuss some of the areas of Tendermint that seem to be cited as causing performance issue. I'm hoping to continue to gather feedback and input on this document to better understand what issues Tendermint performance may cause for our users. 

The overall goal of this document is to allow the maintainers and community to get a better sense of these issues and to be more capably able to discuss them and weight trade-offs about any proposed performance-focused changes. This document does not aim to propose any performance improvements. It does suggest useful places for benchmarks and places where additional metrics would be useful for diagnosing and further understanding Tendermint performance.

Please comment with areas where my reasoning seems off or with additional areas that Tendermint performance may be causing user pain.
2021-09-16 06:13:27 +00:00
Callum Waters
9a7ce08e3e statesync: shut down node when statesync fails (#6944) 2021-09-16 07:43:23 +02:00
Sam Kleinman
55f6d20977 e2e: skip broadcastTxCommit check (#6949)
I think the `Sync` check covers our primary use case, and perhaps we
can turn this back on in the future after some kind of event-system
rewrite, or RPC rewrite that will avoid the serverside timeout.
2021-09-15 21:24:35 +00:00
Sam Kleinman
b9c35c1263 docs: fix openapi yaml lint (#6948)
saw this in the super lint.
2021-09-15 19:29:25 +00:00
Sam Kleinman
f08f72e334 rfc: e2e improvements (#6941) 2021-09-15 15:26:39 -04:00
Callum Waters
e932b469ed e2e: tweak semantics of waitForHeight (#6943) 2021-09-15 20:49:24 +02:00
Callum Waters
5db2a39643 docs: add documentation of unsafe_flush_mempool to openapi (#6947) 2021-09-15 17:28:01 +02:00
Sam Kleinman
6909158933 e2e: reduce load pressure (#6939) 2021-09-14 10:44:30 -04:00
dependabot[bot]
de2cffe7a4 build(deps): Bump codecov/codecov-action from 2.0.3 to 2.1.0 (#6938) 2021-09-14 08:31:41 -04:00
Sam Kleinman
c257cda212 e2e: slow load processes with longer evidence timeouts (#6936)
These are mostly the timeouts that I think we're still hitting in CI. 

At this point, the tests (on master) pass on my local machine (which is quite beefy) so I think this is just the first in (perhaps?) a sequence of changes that attempt to change timeouts and load patterns so that the tests pass in CI more reliably.
2021-09-13 20:57:25 +00:00
M. J. Fromberger
5a49d1b997 RFC 002 Interprocess Communication in Tendermint (#6913)
Communication in Tendermint among consensus nodes, applications, and operator
tools all use different message formats and transport mechanisms.  In some
cases there are multiple options. Having all these options complicates both the
code and the developer experience, and hides bugs. To support a more robust,
trustworthy, and usable system, we should document which communication paths
are essential, which could be removed or reduced in scope, and what we can
improve for the most important use cases.

This document proposes a variety of possible improvements of varying size and
scope. Specific design proposals should get their own documentation.
2021-09-13 15:41:21 -04:00
M. J. Fromberger
e4feb56813 Update CHANGELOG.md for release v0.34.13. (#6935)
Fixes #6933. I forgot to update master after I did the v0.34.13 release.
2021-09-13 18:58:04 +00:00
Sam Kleinman
abbe8209b5 e2e: reduce load volume (#6932) 2021-09-13 13:45:01 -04:00
Sam Kleinman
723bf92ebb ci: skip coverage tasks for test infrastructure (#6934) 2021-09-13 13:23:16 -04:00
Sam Kleinman
ef79241f79 ci: skip coverage for non-go changes (#6927) 2021-09-13 09:06:56 -04:00
Sam Kleinman
3bf0c7a712 e2e: improve p2p mode selection (#6929)
The previous implemention of hybrid set testing, which was entirely my
own creation, was a bit peculiar, and I think this probably clears thins up.

The previous implementation had far fewer legacy nodes in hybrid
networks, *and* also for some reason that I can't quite explain,
caused a test case to fail.
2021-09-12 06:30:58 +00:00
Sam Kleinman
055f1b3279 ci: disable codecov patch status check (#6930) 2021-09-10 19:08:04 -04:00
Sam Kleinman
1998cf7e77 e2e: compile tests (#6926) 2021-09-10 13:34:26 -04:00
Sam Kleinman
c3bcf9b180 e2e: test multiple broadcast tx methods (#6925) 2021-09-10 12:03:41 -04:00
Callum Waters
f1b9613301 e2e: increase retain height to at least twice evidence age (#6924) 2021-09-10 16:18:01 +02:00
dependabot[bot]
5d279c93db build(deps): Bump github.com/rs/zerolog from 1.24.0 to 1.25.0 (#6923)
Bumps [github.com/rs/zerolog](https://github.com/rs/zerolog) from 1.24.0 to 1.25.0.
<details>
<summary>Commits</summary>
<ul>
<li><a href="65adfd88ec"><code>65adfd8</code></a> Make Fields method accept both map and slice (<a href="https://github-redirect.dependabot.com/rs/zerolog/issues/352">#352</a>)</li>
<li>See full diff in <a href="https://github.com/rs/zerolog/compare/v1.24.0...v1.25.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/rs/zerolog&package-manager=go_modules&previous-version=1.24.0&new-version=1.25.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2021-09-10 13:38:55 +00:00
Sam Kleinman
af71f1cbcb e2e: load generation and logging changes (#6912) 2021-09-10 09:26:17 -04:00
Sam Kleinman
1a9bad9dd3 ci: tweak code coverage settings (#6920) 2021-09-09 15:58:52 -04:00
M. J. Fromberger
db690c3b68 rpc: fix hash encoding in JSON parameters (#6813)
The responses from node RPCs encode hash values as hexadecimal strings. This
behaviour is stipulated in our OpenAPI documentation. In some cases, however,
hashes received as JSON parameters were being decoded as byte buffers, as is
the convention for JSON.

This resulted in the confusing situation that a hash reported by one request
(e.g., broadcast_tx_commit) could not be passed as a parameter to another
(e.g., tx) via JSON, without translating the hex-encoded output hash into the
base64 encoding used by JSON for opaque bytes.

Fixes #6802.
2021-09-09 15:51:17 -04:00
Sam Kleinman
0c3601bcac e2e: introduce canonical ordering of manifests (#6918) 2021-09-09 14:31:17 -04:00
Sam Kleinman
816e9b0b49 ci: drop codecov bot (#6917) 2021-09-09 14:04:56 -04:00
Sam Kleinman
2a224fb2bd rfc: database storage engine (#6897) 2021-09-09 12:42:15 -04:00
William Banfield
2a74c9c498 update readme to more accurately reflect the tendermint public api (#6916) 2021-09-08 17:49:36 -04:00
William Banfield
dc0e04d243 rename configuration parameters to use the new blocksync nomenclature (#6896)
The 0.35 release cycle renamed the 'fastsync' functionality to 'blocksync'. This change brings the configuration parameters in line with that change. Namely, it updates the configuration file `[fastsync]` field to be `[blocksync]` and changes the command line flag and config file parameters `--fast-sync` and `fast-sync` to `--enable-block-sync` and `enable-block-sync` respectively.

Error messages were added to help users encountering these changes be able to quickly make the needed update to their files/scripts.

When using the old command line argument for fast-sync, the following is printed

```
./build/tendermint start --proxy-app=kvstore --consensus.create-empty-blocks=false --fast-sync=false
ERROR: invalid argument "false" for "--fast-sync" flag: --fast-sync has been deprecated, please use --enable-block-sync
```

When using one of the old config file parameters, the following is printed:
```
./build/tendermint start --proxy-app=kvstore --consensus.create-empty-blocks=false
ERROR: error in config file: a configuration parameter named 'fast-sync' was found in the configuration file. The 'fast-sync' parameter has been renamed to 'enable-block-sync', please update the 'fast-sync' field in your configuration file to 'enable-block-sync'
```
2021-09-08 13:58:12 +00:00
William Banfield
63aeb50665 upgrading: add information into the UPGRADING.md for users of the codebase wishing to upgrade (#6898)
* add information on upgrading to the new p2p library

* clarify p2p backwards compatibility

* reorder p2p queue list

* add demo for p2p selection

* fix spacing in upgrading
2021-09-08 09:41:12 -04:00
William Banfield
9b458a1c43 update changelog ahead of v0.35 release (#6893)
This change moves the changelog entries from CHANGELOG_PENDING.md to CHANGELOG.md ahead of the 0.35 release.
2021-09-07 22:38:45 +00:00
M. J. Fromberger
cfe64ed8b6 cleanup: fix order of linters in the golangci-lint config (#6910)
This is a cosmetic change that restores lexicographic order to the selected
linters in the CI config. No change to which linters we run, only putting them
back in order so it's easier to spot the one you care about.
2021-09-07 20:08:46 +00:00
M. J. Fromberger
db6e031a16 doc: fix a typo in the indexing section (#6909) 2021-09-07 18:44:23 +00:00
dependabot[bot]
04cca018c7 build(deps): Bump github.com/golangci/golangci-lint (#6907)
Bumps [github.com/golangci/golangci-lint](https://github.com/golangci/golangci-lint) from 1.42.0 to 1.42.1.
- [Release notes](https://github.com/golangci/golangci-lint/releases)
- [Changelog](https://github.com/golangci/golangci-lint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/golangci/golangci-lint/compare/v1.42.0...v1.42.1)

---
updated-dependencies:
- dependency-name: github.com/golangci/golangci-lint
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-07 08:55:25 -04:00
Callum Waters
8fe651ba30 e2e: clean up generation of evidence (#6904) 2021-09-07 12:20:43 +02:00
Peter Lai
89539d0454 networks: update to latest DigitalOcean modules (#6902) 2021-09-06 18:04:56 +02:00
dependabot[bot]
4bab061cb2 build(deps): Bump docker/setup-buildx-action from 1.5.0 to 1.6.0 (#6903) 2021-09-06 15:07:27 +02:00
Peter Lai
5ee39f05b9 network: update terraform config (#6901) 2021-09-06 11:53:28 +02:00
Sam Kleinman
1f8bb74bba e2e: skip assertions for stateless nodes (#6894) 2021-09-03 13:25:36 -04:00
Sam Kleinman
77615b900f e2e: wait for all nodes rather than just one (#6892) 2021-09-03 13:03:16 -04:00
Sam Kleinman
21b5e5931a e2e: skip light clients when waiting for height (#6891) 2021-09-03 10:19:15 -04:00
dependabot[bot]
0055f9efcc build(deps): Bump github.com/lib/pq from 1.10.2 to 1.10.3 (#6890)
Bumps [github.com/lib/pq](https://github.com/lib/pq) from 1.10.2 to 1.10.3.
- [Release notes](https://github.com/lib/pq/releases)
- [Commits](https://github.com/lib/pq/compare/v1.10.2...v1.10.3)

---
updated-dependencies:
- dependency-name: github.com/lib/pq
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-03 09:07:30 -04:00
Callum Waters
bda948e814 statesync: implement p2p state provider (#6807) 2021-09-02 13:19:18 +02:00
Mateusz Górski
f793752d07 Update supervisor_001_draft.md (#333)
* Update supervisor_001_draft.md

If the only node in the *FullNodes* set is the primary, that was just deemed faulty, we can't find honest primary.

* Update supervisor_001_draft.md
2021-09-02 10:13:19 +02:00
William Banfield
bf71990d2f abci.md fixup (#339)
* abci: points of clarification ahead of v0.1.0

* lint++

* typo

* lint++

* double word score

* grammar

* Update spec/abci/abci.md

Co-authored-by: M. J. Fromberger <fromberger@interchain.io>

* Update spec/abci/abci.md

Co-authored-by: M. J. Fromberger <fromberger@interchain.io>

* Update spec/abci/abci.md

Co-authored-by: M. J. Fromberger <fromberger@interchain.io>

* Update spec/abci/abci.md

Co-authored-by: M. J. Fromberger <fromberger@interchain.io>

* Update spec/abci/abci.md

Co-authored-by: M. J. Fromberger <fromberger@interchain.io>

* Update spec/abci/abci.md

Co-authored-by: M. J. Fromberger <fromberger@interchain.io>

* Update spec/abci/abci.md

Co-authored-by: M. J. Fromberger <fromberger@interchain.io>

* Update spec/abci/abci.md

Co-authored-by: M. J. Fromberger <fromberger@interchain.io>

* Update spec/abci/abci.md

Co-authored-by: M. J. Fromberger <fromberger@interchain.io>

* Update spec/abci/abci.md

Co-authored-by: M. J. Fromberger <fromberger@interchain.io>

* Update spec/abci/abci.md

Co-authored-by: M. J. Fromberger <fromberger@interchain.io>

* Update spec/abci/abci.md

Co-authored-by: M. J. Fromberger <fromberger@interchain.io>

* Update spec/abci/abci.md

Co-authored-by: M. J. Fromberger <fromberger@interchain.io>

* pr feedback

* wip

* update non-zero status code docs

* fix event description

* update CheckTx description

Co-authored-by: M. J. Fromberger <fromberger@interchain.io>
2021-09-01 17:33:35 -04:00
Sam Kleinman
511bd3eb7f e2e: weight protocol dimensions (#6884)
This changes the focus of the e2e suite, to (roughly) focus on
configurations that are more well used. Most production users of
tendermint run ABCI application in process and the GRPC/socket methods
cover the vast majority of the remaining use cases. 

Perhaps we should consider drop support unix domain sockets in a
future release, but I think in the mean time it's useful to have the
tests *mostly* focus on the primary use cases.
2021-09-01 19:52:40 +00:00
Sam Kleinman
9a0081f076 e2e: change restart mechanism (#6883) 2021-09-01 12:49:45 -04:00
M. J. Fromberger
7fe3e78a38 Update the psql indexer schema and implementation (#6868)
Update the schema and implementation of the Postgres event indexer to improve 
certain types of queries against the index. These changes address the use cases
raised by #6843, and are partly inspired by the prototype schema in that issue.

In the old schema, events were flattened, making it difficult to find all the events 
associated with a particular block or transaction. In addition, events with no key/value
attributes were entirely lost, since entries were generated only for attributes.

To address these issues, this new schema records blocks, transactions, events,
and attributes in separate tables, and provides views that join these tables to
give a more convenient query surface for block and transaction events.

- All events for a given block can be queried from the `block_events` view.
- All events for a given transaction can be queried from the `tx_events` view.
- Multiple events for the same key can be indexed for both blocks and transactions.

The tests have been reworked, but all of the existing test cases for the old schema 
still pass with the new implementation. Various other minor cleanups are included,

ADR-065 is also updated to reflect the updated schema.
2021-08-31 18:35:07 -04:00
Sam Kleinman
7169d26ddf e2e: more reliable method for selecting node to inject evidence (#6880)
In retrospect my previous implementation of this node, could get
unlucky and never find the correct node. This method is more reliable.
2021-08-31 21:56:06 +00:00
William Banfield
41e681293c proto: move proto files under the correct directory related to their package name (#344) 2021-08-31 17:27:55 -04:00
Sam Kleinman
c4df8a3840 types: move mempool error for consistency (#6875)
This is a little change just to make things more consistent ahead of
the 0.35 release.
2021-08-30 17:42:58 +00:00
dependabot[bot]
f858ebeb88 build(deps): Bump github.com/rs/zerolog from 1.23.0 to 1.24.0 (#6874)
Bumps [github.com/rs/zerolog](https://github.com/rs/zerolog) from 1.23.0 to 1.24.0.
- [Release notes](https://github.com/rs/zerolog/releases)
- [Commits](https://github.com/rs/zerolog/compare/v1.23.0...v1.24.0)

---
updated-dependencies:
- dependency-name: github.com/rs/zerolog
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-30 09:34:54 -04:00
Jeeyong Um
c9347a0647 docs: remove return code in normal case from go built-in example (#6841)
An explicit exit prevents the deferred cleanup code from running. In this case,
falling off the end of main will achieve the same goal as an explicit exit.
2021-08-29 12:14:20 -04:00
Sam Kleinman
0df421b37f e2e: add weighted random configuration selector (#6869)
When revwing #6807 I assumed that `probSetChoice` worked this way. 

I think that the coverage of various configuration options should
generally track what we expect the actual useage to be to focus the
most test coverage on the configurations that are the most prevelent.
2021-08-27 16:32:40 +00:00
Sam Kleinman
94e1eb8cfe rfc: fix link style (#6870)
This is super minor, but chaning this to fix a broken link and to
match the existing style of the ADRs.
2021-08-27 16:21:12 +00:00
Sam Kleinman
23abb0de8b rfc: p2p next steps (#6866) 2021-08-27 12:14:59 -04:00
Aleksandr Bezobchuk
58a6cfff9a internal/consensus: update error log (#6863)
Issues reported in Osmosis, where the message is extremely long. Also, there is absolutely no reason to log the message IMO. If we must, we can make the message log DEBUG.
2021-08-25 22:43:21 +00:00
Sam Kleinman
6e921f6644 p2p: change default to use new stack (#6862)
This is just a configuration change to default to using the new stack
unless explicitly disabled (e.g. `UseLegacy`) this renames the
configuration value and makes the configuration logic more clear.

The legacy option is good to retain as a fallback if the new stack has
issues operationally, but we should make sure that most of the time
we're using the new stack.
2021-08-25 17:33:38 +00:00
Sam Kleinman
a0a5d45cb1 lint: change deprecated linter (#6861)
This is a super minor change that silences a warning when running the linter locally.
2021-08-25 12:26:11 +00:00
Sam Kleinman
9c8379ef30 e2e: more consistent node selection during tests (#6857)
In the transaction load generator, the e2e test harness previously distributed load randomly to hosts, which was a source of test non-determinism. This change distributes the load generation to the different nodes in the set in a round robin fashion, to produce more reliable results, but does not otherwise change the behavior of the test harness.
2021-08-25 12:24:01 +00:00
dependabot[bot]
e053643b95 build(deps): Bump codecov/codecov-action from 2.0.2 to 2.0.3 (#6860)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 2.0.2 to 2.0.3.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/master/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v2.0.2...v2.0.3)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-25 08:12:04 -04:00
M. J. Fromberger
41a361ed8d psql: add documentation and simplify constructor API (#6856)
Add documentation comments to the psql event sink package, and simplify the
constructor function so that it does not return the SQL database handle.  The
handle is needed for testing, so expose that via a separate method on the
concrete type.

Update the tests and existing usage for the change. This change does not affect
the behaviour of the sink, so there are no functional changes, only syntactic
updates.
2021-08-24 17:18:27 -04:00
William Banfield
c939e155a6 abci: clarify connection use in-process (#337)
* abci: clarify connection use in-process

* Update abci.md

* Update spec/abci/abci.md

Co-authored-by: M. J. Fromberger <fromberger@interchain.io>

* Update spec/abci/abci.md

Co-authored-by: M. J. Fromberger <fromberger@interchain.io>

* invert abci explanations

* lint++

* lint++

* lint++

* lint++

Co-authored-by: M. J. Fromberger <fromberger@interchain.io>
2021-08-24 14:27:19 -04:00
William Banfield
bc2b529b95 inspect: add inspect mode for debugging crashed tendermint node (#6785)
EDIT: Updated, see [comment below]( https://github.com/tendermint/tendermint/pull/6785#issuecomment-897793175)

This change adds a sketch of the `Debug` mode. 

This change adds a `Debug` struct to the node package. This `Debug` struct is intended to be created and started by a command in the `cmd` directory. The `Debug` struct runs the RPC server on the data directories: both the state store and the block store.

This change required a good deal of refactoring. Namely, a new `rpc.go` file was added to the `node` package. This file encapsulates functions for starting RPC servers used by nodes. A potential additional change is to further factor this code into shared code _in_ the `rpc` package. 

Minor API tweaks were also made that seemed appropriate such as the mechanism for fetching routes from the `rpc/core` package.

Additional work is required to register the `Debug` service as a command in the `cmd` directory but I am looking for feedback on if this direction seems appropriate before diving much further.

closes: #5908
2021-08-24 18:12:06 +00:00
Tess Rinearson
6d5ff590c3 contributing: remove release_notes.md reference (#6846) 2021-08-24 19:07:53 +02:00
Sam Kleinman
d8642a941e cmd: remove deprecated snakes (#6854)
just following up on a deprecation.
2021-08-24 16:06:27 +00:00
Sam Kleinman
d7c3a8f682 time: make median time library type private (#6853)
This is a very minor change, but I was looking through the code, and
this seems like it shouldn't be exported or used more broadly, so I've
moved it out.
2021-08-24 15:43:13 +00:00
M. J. Fromberger
ce3c059a0d ADR 072: Re-instate a request-for-comments archive. (#6851)
This ADR restores a variation of the old Request for Comments documentation
that we previously used. The proposal differs from the original formulation,
and does not replace ADRs.
2021-08-23 18:06:01 -04:00
Sam Kleinman
39dee8abc5 pubsub: improve handling of closed blocking subsciptions. (#6852) 2021-08-23 16:41:45 -04:00
Hlib Kanunnikov
d0e33b4292 blocksync: complete transition from Blockchain to BlockSync (#6847) 2021-08-23 16:45:08 +02:00
William Banfield
8700ca9d1a ADR 071: Proposer-based Timestamps (#6799)
Architectural decision record for Proposer-based timestamps.
2021-08-20 16:07:20 -04:00
Sam Kleinman
a374f74f7c e2e: cleanup node start function (#6842)
I realized after my last commit that my change made a following line of code a bit redundant.

(alternatively my last change was redunadnt to the existing code.)

I took this oppertunity to make some minor cleanups and logging changes to the node changes which I hope will make tests a bit more clear.
2021-08-20 17:26:04 +00:00
dependabot[bot]
3a234e1144 build(deps): Bump docker/build-push-action from 2.6.1 to 2.7.0 (#6845)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 2.6.1 to 2.7.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v2.6.1...v2.7.0)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-20 13:32:11 +02:00
William Banfield
26ee62aa52 abci: clarify what abci stands for (#336)
* abci: clarify what abci stands for

* link to abci type protos.
2021-08-19 17:04:31 -04:00
Aleksandr Bezobchuk
cce0a3c171 docs: add package godoc for indexer (#6839)
* docs: add indexer godoc

* docs++

* docs++

* docs++

* docs++

* docs++

* Update state/indexer/doc.go

Co-authored-by: M. J. Fromberger <fromberger@interchain.io>

* Update state/indexer/doc.go

Co-authored-by: M. J. Fromberger <fromberger@interchain.io>

* Update state/indexer/doc.go

Co-authored-by: M. J. Fromberger <fromberger@interchain.io>

* Update state/indexer/doc.go

Co-authored-by: M. J. Fromberger <fromberger@interchain.io>

* Update state/indexer/doc.go

Co-authored-by: M. J. Fromberger <fromberger@interchain.io>

* Update state/indexer/doc.go

Co-authored-by: M. J. Fromberger <fromberger@interchain.io>

* docs++

Co-authored-by: M. J. Fromberger <fromberger@interchain.io>
2021-08-19 20:25:17 +00:00
Sam Kleinman
a4cc8317da e2e: avoid starting nodes from the future (#6835) 2021-08-18 14:33:28 -04:00
Sam Kleinman
e44ab95f2f core: text cleanup (#332) 2021-08-18 13:14:38 -04:00
Tess Rinearson
69f6eee2e4 changelog: linkify the 0.34.11 release notes (#6836)
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
2021-08-18 12:06:13 +00:00
dependabot[bot]
afb6af8bc3 build(deps): Bump github.com/golangci/golangci-lint (#6837)
Bumps [github.com/golangci/golangci-lint](https://github.com/golangci/golangci-lint) from 1.41.1 to 1.42.0.
- [Release notes](https://github.com/golangci/golangci-lint/releases)
- [Changelog](https://github.com/golangci/golangci-lint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/golangci/golangci-lint/compare/v1.41.1...v1.42.0)

---
updated-dependencies:
- dependency-name: github.com/golangci/golangci-lint
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-18 08:02:16 -04:00
Mateusz Górski
4c3339ab6a Update supervisor_001_draft.md (#334) 2021-08-18 10:45:58 +00:00
Tess Rinearson
0ed3ba6279 changelog: update to reflect 0.34.12 release (#6833) 2021-08-18 11:55:57 +02:00
Tess Rinearson
267aac2e90 changelog_pending: add missing item (#6829) 2021-08-17 15:45:14 +02:00
Tess Rinearson
471f83d557 contributing: update release instructions to use backport branches (#6827) 2021-08-17 15:28:20 +02:00
Sam Kleinman
1e985f6226 rpc: update peer format in specification in NetInfo operation (#331) 2021-08-16 08:54:23 -04:00
Aleksandr Bezobchuk
393a02a729 rpc: log update (#6825)
We INFO log every `ABCIQuery`. This can output a tremendous amount of noise in the logs, can cause cosmovisor to completely crash and slows down the node due to I/O. This log is completely unnecessary.

Let's get this backported into v0.43 and get that into v0.43 and v0.42 releases of the SDK


/cc @marbar3778
2021-08-14 01:40:14 +00:00
Sam Kleinman
bf77c0c544 rpc: support new p2p infrastructure (#6820) 2021-08-13 15:39:07 -04:00
Carlos Rodriguez
511e52c2fc doc: fix typos in /tx_search and /tx. (#6823)
Just a few small typos in the descriptions of the /tx_search and /tx endpoints.
2021-08-13 15:02:30 +00:00
dependabot[bot]
1f76cb1546 build(deps): Bump google.golang.org/grpc from 1.39.1 to 1.40.0 (#6819)
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.39.1 to 1.40.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.40.0</h2>
<h1>Behavior Changes</h1>
<ul>
<li>balancer: client channel no longer connects to idle subchannels that are returned by the pickers; LB policy should call SubConn.Connect instead. (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4579">#4579</a>)
<ul>
<li>This change is in line with existing documentation stating the balancer must call Connect on idle SubConns in order for them to connect, and is preparation for an upcoming change that transitions SubConns to the idle state when connections are lost.  See <a href="https://pkg.go.dev/google.golang.org/grpc/balancer#SubConn">https://pkg.go.dev/google.golang.org/grpc/balancer#SubConn</a> for more details.</li>
</ul>
</li>
</ul>
<h1>Bug Fixes</h1>
<ul>
<li>transport: fail RPCs without HTTP status 200 (OK), according to the gRPC spec (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4474">#4474</a>)
<ul>
<li>Special Thanks: <a href="https://github.com/JNProtzman"><code>@​JNProtzman</code></a></li>
</ul>
</li>
<li>binarylog: fail the <code>Write()</code> method if proto marshaling fails (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4582">#4582</a>)
<ul>
<li>Special Thanks: <a href="https://github.com/Jille"><code>@​Jille</code></a></li>
</ul>
</li>
<li>binarylog: exit the flusher goroutine upon closing the <code>bufferedSink</code> (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4583">#4583</a>)
<ul>
<li>Special Thanks: <a href="https://github.com/Jille"><code>@​Jille</code></a></li>
</ul>
</li>
</ul>
<h1>New Features</h1>
<ul>
<li>metadata: add Delete method to MD to encapsulate lowercasing (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4549">#4549</a>)
<ul>
<li>Special Thanks: <a href="https://github.com/konradreiche"><code>@​konradreiche</code></a></li>
</ul>
</li>
<li>xds/cds: support logical DNS cluster and aggregated cluster (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4594">#4594</a>)</li>
<li>stats: add stats.Begin.IsClientStream and IsServerStream to indicate the type of RPC invoked (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4533">#4533</a>)
<ul>
<li>Special Thanks: <a href="https://github.com/leviska"><code>@​leviska</code></a></li>
</ul>
</li>
</ul>
<h1>Performance Improvements</h1>
<ul>
<li>server: improve performance when multiple interceptors are used (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4524">#4524</a>)
<ul>
<li>Special Thanks: <a href="https://github.com/amenzhinsky"><code>@​amenzhinsky</code></a></li>
</ul>
</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="41e044e1c8"><code>41e044e</code></a> server: fix leaked net.Conn (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4644">#4644</a>) (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4670">#4670</a>)</li>
<li><a href="1634fd3fc3"><code>1634fd3</code></a> Change version to 1.40.0 (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4623">#4623</a>)</li>
<li><a href="b1a15ac370"><code>b1a15ac</code></a> server: fix leaked net.Conn (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4644">#4644</a>)</li>
<li><a href="00edd8c13a"><code>00edd8c</code></a> Add xDS k8s url-map test Kokoro job (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4614">#4614</a>)</li>
<li><a href="1ddab33869"><code>1ddab33</code></a> client: fix detection of whether IO was performed in NewStream (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4611">#4611</a>)</li>
<li><a href="582ef458c6"><code>582ef45</code></a> cluster_resolver: move balancer config types into cluster_resolver package an...</li>
<li><a href="c513103bee"><code>c513103</code></a> Add extra layer on top of RBAC Engine (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4576">#4576</a>)</li>
<li><a href="a0bed723f1"><code>a0bed72</code></a> xds: add http filters to FilterChain matching (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4595">#4595</a>)</li>
<li><a href="0a8c63739a"><code>0a8c637</code></a> grpclb: propagate the most recent connection error when grpclb enters transie...</li>
<li><a href="8332d5b997"><code>8332d5b</code></a> test: fix possible goroutine leaks in unit tests (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4570">#4570</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/grpc/grpc-go/compare/v1.39.1...v1.40.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=google.golang.org/grpc&package-manager=go_modules&previous-version=1.39.1&new-version=1.40.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2021-08-12 15:23:37 +00:00
Sam Kleinman
d56a44b884 node: minimize hardcoded service initialization (#6798)
* node: minimize hardcoded service initialization

* hacking

* nil safety

* reduce space

* remove genesis state store

* fix lint

* fix pex

* unwind some odering effects

* fix tests

* remove unused experiment
2021-08-12 13:38:17 +00:00
Sam Kleinman
cbfc04df6d rpc: avoid panics in unsafe rpc calls with new p2p stack (#6817) 2021-08-11 13:20:01 -04:00
Sam Kleinman
a6d20a6660 pubsub: unsubscribe locking handling (#6816) 2021-08-11 11:37:05 -04:00
Sam Kleinman
97435139ad adr: node initialization (#6562) 2021-08-11 10:34:45 -04:00
Sam Kleinman
66084a01dc commands: add key migration cli (#6790) 2021-08-10 14:58:21 -04:00
M. J. Fromberger
53d53e6205 bytes: clean up and simplify encoding of HexBytes (#6810)
As written, the encoding step unnecessarily made and moved multiple copies of
the encoded representation. Reduce this to a single allocation and encode the
data in-place so that a shift is no longer required.

Also: Add a test to ensure letter digits are capitalized, which was previously not
verified but was expected downstream.

No functional changes.
2021-08-10 09:58:18 -04:00
M. J. Fromberger
a7ecf49c10 Add new team member to CODEOWNERS. (#6811) 2021-08-09 23:30:58 -04:00
Callum Waters
72adbf9cc9 statesync: new messages for gossiping consensus params (#328) 2021-08-09 15:41:44 +02:00
Sam Kleinman
31994cadc0 docs: upgrade documentation for custom mempools (#6794)
This is proposed language for the upgrade process about the new custom
reactor/mempool support.
2021-08-06 19:51:07 +00:00
dependabot[bot]
e5312942e3 build(deps): Bump google.golang.org/grpc from 1.39.0 to 1.39.1 (#6801)
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.39.0 to 1.39.1.
<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.39.1</h2>
<ul>
<li>server: fix bug that net.Conn is leaked if the connection is closed (io.EOF) immediately with no traffic (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4642">#4642</a>)</li>
<li>transport: fix race in transport stream accessing s.recvCompress (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4627">#4627</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="db17d4b4ad"><code>db17d4b</code></a> Change version to 1.39.1 (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4651">#4651</a>)</li>
<li><a href="8d1369b150"><code>8d1369b</code></a> server: fix leaked net.Conn (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4642">#4642</a>)</li>
<li><a href="2e0b66bb0e"><code>2e0b66b</code></a> transport: fix race accessing s.recvCompress (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4627">#4627</a>)</li>
<li><a href="db2d595725"><code>db2d595</code></a> Change version to 1.39.1-dev (<a href="https://github-redirect.dependabot.com/grpc/grpc-go/issues/4542">#4542</a>)</li>
<li>See full diff in <a href="https://github.com/grpc/grpc-go/compare/v1.39.0...v1.39.1">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=google.golang.org/grpc&package-manager=go_modules&previous-version=1.39.0&new-version=1.39.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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)


</details>
2021-08-06 14:28:58 +00:00
dependabot[bot]
4db71da68e build(deps): Bump github.com/BurntSushi/toml from 0.3.1 to 0.4.1 (#6796)
Bumps [github.com/BurntSushi/toml](https://github.com/BurntSushi/toml) from 0.3.1 to 0.4.1.
- [Release notes](https://github.com/BurntSushi/toml/releases)
- [Commits](https://github.com/BurntSushi/toml/compare/v0.3.1...v0.4.1)

---
updated-dependencies:
- dependency-name: github.com/BurntSushi/toml
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-05 10:08:49 -04:00
William Banfield
e801328128 clist: add simple property tests (#6791)
Adds a simple property test to the `clist` package. This test uses the [rapid](https://github.com/flyingmutant/rapid) library and works by modeling the internal clist as a simple array.

Follow up from this mornings workshop with the Regen team.
2021-08-03 19:30:05 +00:00
M. J. Fromberger
4cbaf70d1f docs: fix a typo in the genesis_chunked description (#6792) 2021-08-03 15:08:23 -04:00
Callum Waters
8029cf7a0f evidence: add section explaining evidence (#324) 2021-08-03 11:14:28 +02:00
rene
e5f9dd2736 docs: fix typo (#6789) 2021-08-02 17:25:59 -04:00
dependabot[bot]
e922016121 build(deps): Bump technote-space/get-diff-action from 4 to 5 (#6788)
Bumps [technote-space/get-diff-action](https://github.com/technote-space/get-diff-action) from 4 to 5.
- [Release notes](https://github.com/technote-space/get-diff-action/releases)
- [Changelog](https://github.com/technote-space/get-diff-action/blob/main/.releasegarc)
- [Commits](https://github.com/technote-space/get-diff-action/compare/v4...v5)

---
updated-dependencies:
- dependency-name: technote-space/get-diff-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
2021-08-02 12:25:37 -04:00
William Banfield
dc7c212c41 mempool/v1: test reactor does not panic on broadcast (#6772)
This changes adds a failing test for issue #6660. It achieves this by adding a transaction, starting the `broadcastTxRoutine` in a goroutine and then adding another transaction to the mempool. The `broadcastTxRoutine` can receive the second inserted transaction before `insertTx` returns. In that case, `broadcastTxRoutine` will derefence a nil pointer when referencing the `gossipEl` and panic.
2021-08-02 13:02:43 +00:00
William Banfield
4e96c6b234 tools: add mockery to tools.go and remove mockery version strings (#6787)
This change aims to keep versions of mockery consistent across developer laptops.

This change adds mockery to the `tools.go` file so that its version can be managed consistently in the `go.mod` file.

Additionally, this change temporarily disables adding mockery's version number to generated files. There is an outstanding issue against the mockery project related to the version string behavior when running from `go get`. I have created a pull request to fix this issue in the mockery project.
see: https://github.com/vektra/mockery/issues/397
2021-07-30 20:47:15 +00:00
Callum Waters
02f8e4c0bd blockstore: fix problem with seen commit (#6782) 2021-07-30 17:37:04 +02:00
dependabot[bot]
3aec71cdd4 build(deps): Bump styfle/cancel-workflow-action from 0.9.0 to 0.9.1 (#6786) 2021-07-30 09:21:27 -04:00
M. J. Fromberger
6dd8984fef Fix and clarify breaks from select cases. (#6781)
Update those break statements inside case clauses that are intended to reach an
enclosing for loop, so that they correctly exit the loop.

The candidate files for this change were located using:

    % staticcheck -checks SA4011 ./... | cut -d: -f-2

This change is intended to preserve the intended semantics of the code, but
since the code as-written did not have its intended effect, some behaviour may
change. Specifically: Some loops may have run longer than they were supposed
to, prior to this change.

In one case I was not able to clearly determine the intended outcome. That case
has been commented but otherwise left as-written.

Fixes #6780.
2021-07-29 22:28:32 -04:00
JayT106
9a2a7d4307 state/privval: vote timestamp fix (#6748) 2021-07-29 12:52:53 +02:00
M. J. Fromberger
8f06e0c9e7 cleanup: remove redundant error plumbing (#6778)
This is a mostly-automated fixup using Comby (https://comby.dev) to remove 
lexically-obvious redundant error checks. No functional changes are intended.

To reproduce the core change:

    # Collapse redundant error check conditionals
    % comby -in-place 'if err != nil {
       return err
    }
    return nil' 'return err' .go

    # Fold out unnecessary error temporaries
    % comby -in-place ':[spc~^\s*]err :[~:?]= :[any]
       return err' ':[spc]return :[any]' .go

Fixes #6479 and related cases.
2021-07-28 15:38:46 -04:00
Sam Kleinman
6a94b55d12 rpc: add documentation for genesis chunked api (#6776) 2021-07-28 14:20:40 -04:00
Callum Waters
ed7fa80693 stale bot: ignore issues (#325) 2021-07-22 11:11:04 +02:00
Marko
8f9cd23016 update proto files for release (#318) 2021-07-16 14:45:02 +00:00
Callum Waters
24f22eeb52 address discrepancies between spec and implementation (#322) 2021-07-16 12:49:15 +02:00
dependabot[bot]
f790b6f903 build(deps): bump actions/stale from 3.0.19 to 4 (#319)
Bumps [actions/stale](https://github.com/actions/stale) from 3.0.19 to 4.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v3.0.19...v4)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-major
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-07-15 12:58:24 +00:00
William Banfield
0ff67d6b1e update spec to reference currently used timestamp type (#317) 2021-07-14 17:10:49 -04:00
dependabot[bot]
aa8f656573 build(deps): bump gaurav-nelson/github-action-markdown-link-check (#313)
Bumps [gaurav-nelson/github-action-markdown-link-check](https://github.com/gaurav-nelson/github-action-markdown-link-check) from 1.0.12 to 1.0.13.
- [Release notes](https://github.com/gaurav-nelson/github-action-markdown-link-check/releases)
- [Commits](https://github.com/gaurav-nelson/github-action-markdown-link-check/compare/1.0.12...1.0.13)

---
updated-dependencies:
- dependency-name: gaurav-nelson/github-action-markdown-link-check
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-07-12 08:34:06 +00:00
Callum Waters
6039594121 add new pex messages (#312) 2021-07-07 12:48:19 +02:00
Giuliano
24222c5855 Add C++ code generation and test scenario (#310)
* add parameters to byzantine send action

* make net not trusted

it's not necessary since for proofs Ivy will assume that the environment
does not break action preconditions

* use require instead of assume

it seems that assume is not checked when other isolates call!

* add comment

* add comment

* run with random seed

* make domain model extractable to C++

* substitute require for assume

assumes in an action are not checked when the action is called! I.e.
they place no requirement on the caller; we're just assuming that the
caller is going to do the right thing. This wasn't very important here
but it leade to a minor inconsistency slipping through.

* make the net isolate not trusted

there was no need for it

* add tendermint_test.ivy

contains a simple test scenario that show that the specification is no
vacuuous

* update comment

* add comments

* throw if trying to parse nset value in the repl

* add comment

* minor refactoring
2021-07-07 12:46:23 +02:00
crypto-facs
6bd5263515 rpc: Add totalGasUSed to block_results response (#308) 2021-06-24 15:01:36 +00:00
Aleksandr Bezobchuk
89d381f7cf update ResponseCheckTx (#306) 2021-06-07 09:35:47 -04:00
Sam Kleinman
5559e14355 rpc: add chunked genesis endpoint (#299)
* rpc: add chunked genesis endpoint

* fix lint

* feedback

* add info about error

* fix lint

Co-authored-by: marbar3778 <marbar3778@yahoo.com>
2021-06-03 09:46:21 +00:00
Marko
a2a9ffbe7e rpc: clarify timestamps (#304)
* clarify timestamps

* changelog entry

* Update spec/rpc/README.md

Co-authored-by: Callum Waters <cmwaters19@gmail.com>

Co-authored-by: Callum Waters <cmwaters19@gmail.com>
2021-06-02 12:03:33 +00:00
Marko
8dd91a7ac3 add a changelog to track changes (#303)
* add a changelog to track changes

* Update CHANGELOG.md

Co-authored-by: Callum Waters <cmwaters19@gmail.com>

Co-authored-by: Callum Waters <cmwaters19@gmail.com>
2021-05-27 11:04:37 +00:00
Yixin Luo
f3216e6953 rename HasVote to ReceivedVote (#289) 2021-05-25 07:42:30 +00:00
dependabot[bot]
90434cb74d build(deps): bump actions/stale from 3.0.18 to 3.0.19 (#302)
Bumps [actions/stale](https://github.com/actions/stale) from 3.0.18 to 3.0.19.
- [Release notes](https://github.com/actions/stale/releases)
- [Commits](https://github.com/actions/stale/compare/v3.0.18...v3.0.19)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-25 07:37:38 +00:00
dependabot[bot]
aba090a69a build(deps): bump actions/stale from 3 to 3.0.18 (#300)
Bumps [actions/stale](https://github.com/actions/stale) from 3 to 3.0.18.
- [Release notes](https://github.com/actions/stale/releases)
- [Commits](https://github.com/actions/stale/compare/v3...v3.0.18)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-20 10:50:56 +00:00
Sam Kleinman
048f6a32f9 lint: fix lint errors (#301) 2021-05-12 18:33:24 -04:00
MengXiangJian
4a9bcebe2a fix message type for block-sync (#298) 2021-05-12 11:28:40 +02:00
Jordan Sexton
4b79bccc0b Fixed a broken link (#291) 2021-05-07 14:29:12 -04:00
Giuliano
292828a01b A few improvements to the Ivy proof (#288)
* Avoid quantifier alternation cycle

The problematic quantifier alternation cycle arose because the
definition of accountability_violation was unfolded.

This commit also restructures the induction proof for clarity.

* add count_lines.sh

* fix typo and add forgotten complete=fo in comment

Co-authored-by: Giuliano <giuliano@eic-61-11.galois.com>
2021-05-04 14:28:07 +02:00
Marko
5dfaa54350 rpc: define spec for RPC (#276)
* add rpc spec and support outline

* add json

* add more routes remove unneeded ones

* add rest of rpc endpoints

* add jsonrpc calls

* add more jsonrpc calls

* fix blockchain

* cleanup unused links and add links to repos

* Update spec/rpc/README.md

Co-authored-by: Callum Waters <cmwaters19@gmail.com>

* add missing param from consensus param

* Update spec/rpc/README.md

Co-authored-by: Callum Waters <cmwaters19@gmail.com>

* Update spec/rpc/README.md

Co-authored-by: Callum Waters <cmwaters19@gmail.com>

* fix cast and add doc to readme

Co-authored-by: Callum Waters <cmwaters19@gmail.com>
Co-authored-by: Marko Baricevic <markobaricevic@Fergalicious.local>
2021-04-27 09:25:32 +00:00
Ethan Buchman
00446bb9f4 Update README.md (#286) 2021-04-23 19:52:48 +00:00
Callum Waters
255942e8c7 p2p: update state sync messages for reverse sync (#285) 2021-04-23 13:22:09 +02:00
Callum Waters
84ee4249ae core: update a few sections (#284) 2021-04-20 10:21:27 +02:00
Callum Waters
b39af911ae RFC: ReverseSync - fetching historical data (#224) 2021-04-19 17:02:09 +02:00
Dev Ojha
0dc5d4df07 ABCI++ RFC (#254)
* ABCI++ RFC

This commit adds an RFC for ABCI++, which is a collection of three new phases of communication between the consensus engine and the application.

Co-authored-by: Sunny Aggarwal <sunnya97@protonmail.ch>

* Fix bugs pointed out by @liamsi

* Update rfc/004-abci++.md

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>

* Fix markdown lints

* Update rfc/004-abci++.md

Co-authored-by: Ismail Khoffi <Ismail.Khoffi@gmail.com>

* Update rfc/004-abci++.md

Co-authored-by: Tess Rinearson <tess.rinearson@gmail.com>

* Update rfc/004-abci++.md

Co-authored-by: Tess Rinearson <tess.rinearson@gmail.com>

* Add information about the rename in the context section

* Bold RFC

* Add example for self-authenticating vote data

* More exposition of the term IPC

* Update pros / negatives

* Fix sentence fragment

* Add desc for no-ops

Co-authored-by: Sunny Aggarwal <sunnya97@protonmail.ch>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Ismail Khoffi <Ismail.Khoffi@gmail.com>
Co-authored-by: Tess Rinearson <tess.rinearson@gmail.com>
2021-04-09 10:33:45 +00:00
Sam Kleinman
ea8238f090 abci: reorder sidebar (#282) 2021-04-06 06:59:57 +00:00
istoilkovska
640b71038b Proposer-based timestamp specification (#261)
* added proposer-based timestamp spec

* Update spec/consensus/proposer-based-timestamp/pbts_001_draft.md

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>

* Update spec/consensus/proposer-based-timestamp/pbts_001_draft.md

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>

* Update spec/consensus/proposer-based-timestamp/pbts-algorithm_001_draft.md

Co-authored-by: Marko <marbar3778@yahoo.com>

* Update spec/consensus/proposer-based-timestamp/pbts-algorithm_001_draft.md

* Update spec/consensus/proposer-based-timestamp/pbts-sysmodel_001_draft.md

Co-authored-by: Callum Waters <cmwaters19@gmail.com>

* fixes from PR

Co-authored-by: Josef Widder <44643235+josef-widder@users.noreply.github.com>
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Marko <marbar3778@yahoo.com>
Co-authored-by: Callum Waters <cmwaters19@gmail.com>
2021-03-23 16:40:21 +01:00
Marko
5c32ebcda8 p2p: links (#268)
* fix links

* fix more links
2021-03-23 11:13:42 +00:00
Marko
b2465e0c3a genesis: Explain fields in genesis file (#270)
* describe the genesis

* Update spec/core/genesis.md

Co-authored-by: Dev Ojha <ValarDragon@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Callum Waters <cmwaters19@gmail.com>

* add wording on app_state

* Update spec/core/genesis.md

Co-authored-by: Callum Waters <cmwaters19@gmail.com>

Co-authored-by: Dev Ojha <ValarDragon@users.noreply.github.com>
Co-authored-by: Callum Waters <cmwaters19@gmail.com>
2021-03-23 10:13:02 +00:00
Marko
9f6a4bcf23 readme: cleanup (#262)
* modify readme

* add rfc and proto

* add rust=spec back to avoid breakage

* lint readme
2021-03-17 13:51:10 +00:00
Ethan Buchman
b4a31746dd Fix list of RFCs (#266) 2021-03-17 08:43:54 +01:00
Marko
b270ab8d15 spec: merge rust-spec (#252) 2021-03-01 08:54:08 +00:00
Ethan Buchman
227e5269ca abci: note on concurrency (#258)
Co-authored-by: Marko <marbar3778@yahoo.com>
2021-02-26 10:30:09 +00:00
Marko
b315f04980 proto: modify height int64 to uint64 (#253) 2021-02-16 13:06:00 +00:00
Marko
abaffef912 proto: add files (#246)
Co-authored-by: Erik Grinaker <erik@interchain.berlin>
2021-01-28 12:10:22 +00:00
Marko
038f3e025a params: remove block timeiota (#248) 2021-01-27 11:29:54 +00:00
Igor Konnov
2f590a6392 non-critical bugfix in the TLA+ spec (found by new version of apalache) (#244) 2021-01-21 11:50:06 +01:00
Marko
72d15a4b07 spec: remove reactor section (#242)
Co-authored-by: Tess Rinearson <tess.rinearson@gmail.com>
2021-01-19 16:28:05 +01:00
Josef Widder
1b2b24055c Update supervisor_001_draft.md (#243) 2021-01-15 13:39:36 +01:00
Marko
d260ff3e37 abci: rewrite to proto interface (#237) 2021-01-12 15:15:37 +01:00
Marko
a4672048e7 reactors: remove bcv1 (#241) 2021-01-11 18:23:40 +01:00
Marko
fc569173a1 layout: add section titles (#240) 2021-01-11 18:23:18 +01:00
dependabot[bot]
ce146d00d7 build(deps): bump gaurav-nelson/github-action-markdown-link-check (#239)
Bumps [gaurav-nelson/github-action-markdown-link-check](https://github.com/gaurav-nelson/github-action-markdown-link-check) from 1.0.11 to 1.0.12.
- [Release notes](https://github.com/gaurav-nelson/github-action-markdown-link-check/releases)
- [Commits](https://github.com/gaurav-nelson/github-action-markdown-link-check/compare/1.0.11...0fe4911067fa322422f325b002d2038ba5602170)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-01-11 12:12:49 +01:00
Anton Kaliaev
439a5bcacb p2p: update frame size (#235)
Reflect the change made in https://github.com/tendermint/tendermint/pull/5805

The MTU (Maximum Transmission Unit) for Ethernet is 1500 bytes.
The IP header and the TCP header take up 20 bytes each at least (unless
optional header fields are used) and thus the max for (non-Jumbo frame)
Ethernet is 1500 - 20 -20 = 1460
Source: https://stackoverflow.com/a/3074427/820520
2020-12-18 12:19:38 +01:00
Josef Widder
accd7ffe18 Update README.md (#234) 2020-12-16 13:27:23 +01:00
Josef Widder
42751ea4f3 Computing attack types (#232)
Add light attack evidence handling
2020-12-15 18:45:26 +01:00
dependabot[bot]
acb9a7d734 build(deps): bump gaurav-nelson/github-action-markdown-link-check (#233)
Bumps [gaurav-nelson/github-action-markdown-link-check](https://github.com/gaurav-nelson/github-action-markdown-link-check) from 1.0.8 to 1.0.11.
- [Release notes](https://github.com/gaurav-nelson/github-action-markdown-link-check/releases)
- [Commits](https://github.com/gaurav-nelson/github-action-markdown-link-check/compare/1.0.8...2a60e0fe41b5361f446ccace6621a1a2a5c324cf)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-12-14 21:53:43 +01:00
Igor Konnov
31cfa53082 The TLA+ specification of the attackers detection (#231)
* the working attackers isolation spec, needs more comments

* the TLA+ spec of the attackers isolation
2020-12-11 15:03:48 +01:00
Josef Widder
26ef2ccddb Draft of evidence handling for discussion (#225)
* start with accountability deliverable

* problem statement

* draft function

* quite complete draft. ready to discuss with Igor

* Update isolate-attackers_001_draft.md

* Update isolate-attackers_001_draft.md

* Update isolate-attackers_001_draft.md

* Update isolate-attackers_001_draft.md

* Update isolate-attackers_001_draft.md

* ready for TLA+ to take over

* isolate

* isolateamnesiatodos

* Update isolate-attackers_001_draft.md

* Update rust-spec/lightclient/attacks/isolate-attackers_001_draft.md

Co-authored-by: Igor Konnov <konnov@forsyte.at>

* Update rust-spec/lightclient/attacks/isolate-attackers_001_draft.md

Co-authored-by: Igor Konnov <konnov@forsyte.at>

* Update rust-spec/lightclient/attacks/isolate-attackers_001_draft.md

Co-authored-by: Igor Konnov <konnov@forsyte.at>

* Update rust-spec/lightclient/attacks/isolate-attackers_001_draft.md

Co-authored-by: Igor Konnov <konnov@forsyte.at>

* Update rust-spec/lightclient/attacks/isolate-attackers_001_draft.md

Co-authored-by: Igor Konnov <konnov@forsyte.at>

* Update rust-spec/lightclient/attacks/isolate-attackers_001_draft.md

Co-authored-by: Igor Konnov <konnov@forsyte.at>

* Update rust-spec/lightclient/attacks/isolate-attackers_001_draft.md

Co-authored-by: Igor Konnov <konnov@forsyte.at>

* Update rust-spec/lightclient/attacks/isolate-attackers_001_draft.md

Co-authored-by: Igor Konnov <konnov@forsyte.at>
2020-12-11 14:34:16 +01:00
Shahan Khatchadourian
6abcb13dab BFT requires _less than_ 1/3 faulty validators (#228)
Thanks fo spotting the imprecision in the text, @shahankhatch !
2020-12-02 12:01:18 +01:00
Marko
033608bbf1 abci: add abci_version to requestInfo (#223) 2020-11-24 15:15:08 +01:00
Marko
871d0514cd abci: lastcommitinfo.round extra sentence (#221) 2020-11-17 10:33:01 +01:00
Igor Konnov
c1ff62fe44 Light client detector spec in TLA+ and refactoring of light client verification TLA+ spec (#216)
Add light client detector spec in TLA+
2020-11-09 11:08:33 +01:00
Giuliano
66e9106b4d add Ivy proofs (#210)
* add Ivy proofs

* fix docker-compose command
2020-11-09 11:05:26 +01:00
Josef Widder
d5e0294003 Detector English Spec ready (#215)
Add detector English spec
2020-11-09 11:03:20 +01:00
Marko
32b811a1fb encoding: add secp, ref zip215, tables (#212) 2020-11-09 09:53:00 +01:00
Callum Waters
819e89ac7a evidence: update data structures to reflect added support of abci evidence (#213) 2020-11-06 09:41:24 +01:00
Marko
cf03759ff5 docs: make blockchain not viewable (#211) 2020-11-05 12:17:11 +01:00
Marko
9fce8480b0 Core: move validation & data structures together (#176)
Co-authored-by: Callum Waters <cmwaters19@gmail.com>
2020-11-05 10:09:59 +01:00
Marko
d31a4a4b34 RFC: adopt zip 215 (#144)
Co-authored-by: Robert Zaremba <robert@zaremba.ch>
2020-11-05 09:57:08 +01:00
Josef Widder
9ad6440bc0 Sequential Supervisor (#186)
* move from tendermint-rs but needs discussion

* markdown lint

* TODO links replaced

* links

* links

* links lint

* Update rust-spec/lightclient/supervisor/supervisor.md

* Update rust-spec/lightclient/supervisor/supervisor.md

* Update rust-spec/lightclient/supervisor/supervisor.md

* Update rust-spec/lightclient/supervisor/supervisor.md

* moved peer handling definitions to supervisor

* polishing

* rename

* Update rust-spec/lightclient/supervisor/supervisor_001_draft.md

* Update rust-spec/lightclient/supervisor/supervisor_001_draft.md

* changes to maintain StateVerified again

* ready for changes in verification

* start of supervisor

* module name

* fixed

* more details

* supevisor completed. Now I have to add function to verification

* ready for review

* tla comment

* removed issues

* Update rust-spec/lightclient/supervisor/supervisor_001_draft.md

* intro text fixed

* indentation

* Update rust-spec/lightclient/supervisor/supervisor_001_draft.md

* comment to entry points

Co-authored-by: Marko Baricevic <marbar3778@yahoo.com>
2020-11-02 17:35:25 +01:00
Marko
97928e190a github: issue template for proposals (#190) 2020-11-02 16:06:17 +01:00
Josef Widder
ec8af314cc spec: update light client verification to match supervisor (#171)
* VDD renaming of verification spec + links fixed

* latest()

* backwards

* added TODOs

* link in old file to new name

* better text

* revision done. needs one more round of reading

* renamed constants in 001 according to TLA+ and impl

* ready for PR

* forgot linting

* Update rust-spec/lightclient/verification/verification_002_draft.md

* Update rust-spec/lightclient/verification/verification_002_draft.md

* added lightstore function needed for supervisor

* added lightstore functions for supervisor

* ident

* Update rust-spec/lightclient/verification/verification_002_draft.md
2020-10-22 14:26:56 +02:00
dependabot[bot]
a3fadb7c1a build(deps): bump gaurav-nelson/github-action-markdown-link-check from 1.0.7 to 1.0.8 (#188)
Bumps [gaurav-nelson/github-action-markdown-link-check](https://github.com/gaurav-nelson/github-action-markdown-link-check) from 1.0.7 to 1.0.8.
- [Release notes](https://github.com/gaurav-nelson/github-action-markdown-link-check/releases)
- [Commits](https://github.com/gaurav-nelson/github-action-markdown-link-check/compare/1.0.7...e3c371c731b2f494f856dc5de7f61cea4d519907)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-10-21 13:15:32 +02:00
Sam Hart
01622f81e9 Update README.md (#185) 2020-10-14 17:08:20 +02:00
Igor Konnov
792767d1cb Extending the blockchain specification (in the light client) to produce different ratios of faults (#183)
* cleaning unused definitions

* introduced the ratio of faulty processes
2020-10-08 10:42:00 +02:00
Josef Widder
0794fc8ff2 first check latest with secondary (#184) 2020-10-08 09:51:00 +02:00
Marko
c5576dfa69 spec: protobuf changes (#156)
Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
2020-10-06 12:40:25 +02:00
Marko
04fb20e33d remove setOption (#181) 2020-10-05 08:54:41 +02:00
Josef Widder
8391fa0b89 TLA+ specs from MBT revision (#173) 2020-10-01 11:31:53 +02:00
Marko
3e56eb5fe3 fix markdown linter (#172) 2020-09-29 14:23:40 +02:00
Callum Waters
733b020899 evidence: update data structures (#165) 2020-09-29 14:05:44 +02:00
Andrey Kuprianov
109a73f672 describe valset sorting according to v0.34 requirements (#169) 2020-09-25 09:22:14 +02:00
Josef Widder
80747a0872 fixed an overlooked conflict (#167) 2020-09-24 09:59:24 +02:00
Josef Widder
f3033c5515 spec: Light client attack detector (#164)
* start with new detection and evidence spec

* more definitions at top

* sketch of functions

* pre post draft

* evidence proof

* typo

* evidence theory polished

* some TODOs resolved

* more TODOs

* links

* second to last revision before PR

* links

* I will read once more and then make a PR

* removed peer handling definitions

* secondary

* ready to review

* detector ready for review

* Update rust-spec/lightclient/detection/detection.md

Co-authored-by: Zarko Milosevic <zarko@informal.systems>

* Update rust-spec/lightclient/detection/detection.md

Co-authored-by: Zarko Milosevic <zarko@informal.systems>

* Update rust-spec/lightclient/detection/detection.md

Co-authored-by: Zarko Milosevic <zarko@informal.systems>

* Update rust-spec/lightclient/detection/detection.md

Co-authored-by: Zarko Milosevic <zarko@informal.systems>

* Update rust-spec/lightclient/detection/detection.md

Co-authored-by: Zarko Milosevic <zarko@informal.systems>

* Update rust-spec/lightclient/detection/detection.md

Co-authored-by: Zarko Milosevic <zarko@informal.systems>

* Update rust-spec/lightclient/detection/detection.md

* skip-trace

* PossibleCommit explained

* Update rust-spec/lightclient/detection/detection.md

Co-authored-by: Zarko Milosevic <zarko@informal.systems>

* comments by Zarko

* renamed and changed link in README

Co-authored-by: Zarko Milosevic <zarko@informal.systems>
2020-09-24 09:53:50 +02:00
Anton Kaliaev
6c95c3f250 spec/reactors/mempool: batch txs per peer (#155)
* spec/reactors/mempool: batch txs per peer

Refs https://github.com/tendermint/tendermint/issues/625

* update
2020-09-10 21:56:00 +02:00
Josef Widder
a66bb37e32 Update README.md (#160) 2020-09-10 15:07:24 +02:00
Josef Widder
606abc7fc0 Fastsync spec from tendermint-rs (#157)
* fastsync spec from tendermint-rs

* fixed broken link

* fixed linting

* more fixes

* markdown lint

* move fast_sync to rust-spec

Co-authored-by: Marko Baricevic <marbar3778@yahoo.com>
2020-09-10 13:03:50 +02:00
Josef Widder
b74b1c2b68 Current versions of light client specs from tendermint-rs (#158)
* current versions of light client specs from tendermint-rs

* markdown lint

* linting

* links

* links

* links

Co-authored-by: Marko Baricevic <marbar3778@yahoo.com>
2020-09-10 12:56:15 +02:00
Marko
dd325bb191 add a stale bot (#134) 2020-09-10 10:41:28 +02:00
Marko
d8a2c8f6f1 spec: remove evidences (#153) 2020-09-02 18:17:11 +02:00
Marko
1075f77cc3 spec: extract light-client to its own directory (#152)
Co-authored-by: Callum Waters <cmwaters19@gmail.com>
2020-09-01 10:47:14 +02:00
Marko
45bbbb6317 spec: update abci events (#151) 2020-09-01 10:05:34 +02:00
Marko
6140847bba docs: add sections to abci (#150) 2020-08-31 15:50:07 +02:00
dependabot[bot]
cda8006569 build(deps): bump gaurav-nelson/github-action-markdown-link-check from 0.6.0 to 1.0.7 (#149)
Bumps [gaurav-nelson/github-action-markdown-link-check](https://github.com/gaurav-nelson/github-action-markdown-link-check) from 0.6.0 to 1.0.7.

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-08-24 13:54:15 +02:00
Marko
9dbf818055 ci: add dependabot config (#148) 2020-08-24 13:52:22 +02:00
Marko
efbbc9462f ci: add markdown linter (#146) 2020-08-24 11:47:31 +02:00
Tess Rinearson
c9d3564634 remove unused directories and update README (#145)
This change removes unused directories (`papers` and `research`) 
and updates the README to reflect our strategy for merging the 
informalsystems/tendermint-rs specs into this repository.

Partially addresses #121.
2020-08-21 12:40:31 +02:00
Erik Grinaker
8dd2ed4c6f update ResponseInitChain.app_hash description (#143) 2020-08-13 13:05:12 +02:00
Erik Grinaker
f3207cee52 add description of arbitrary initial height (#135) 2020-08-13 10:45:05 +02:00
Erik Grinaker
a84c59734f accept RFC-002 (#142) 2020-08-13 10:44:27 +02:00
Callum Waters
430a4d0504 update evidence verification (#139) 2020-08-12 14:19:09 +02:00
Erik Grinaker
89ac8f6e62 update hashing of empty inputs, and initial block LastResultsHash (#141) 2020-08-11 16:52:23 +02:00
Erik Grinaker
95acfdead1 abci: add ResponseInitChain.app_hash (#140) 2020-08-11 16:48:22 +02:00
Erik Grinaker
604923e034 RFC-002: non-zero genesis (#119) 2020-08-11 13:28:59 +02:00
Callum Waters
713a773c81 Evidence time is sourced from block time (#138) 2020-08-10 21:20:24 +02:00
Erik Grinaker
e96921822d spec: revert event hashing (#132) 2020-08-06 11:10:11 +02:00
Sean Braithwaite
29f4e13e05 Merge pull request #130 from tendermint/marko/bring_blockchain_back
spec: bringing blockchain back
2020-08-03 17:48:34 +02:00
Marko Baricevic
ef1e0ff886 add correct links 2020-08-03 10:52:05 +02:00
Marko Baricevic
c5e45ecb48 bring blockchain back 2020-08-03 10:48:38 +02:00
Callum Waters
31b182b7aa update spec with the removal of phantom validator evidence (#126) 2020-07-31 12:03:44 +02:00
Sean Braithwaite
d46cd7f573 Merge pull request #125 from tendermint/anton/2769-canonical
spec/consensus: canonical vs subjective commit
2020-07-30 12:00:54 +02:00
Anton Kaliaev
0445156ed9 Apply suggestions from code review
Co-authored-by: Igor Konnov <igor.konnov@gmail.com>
2020-07-29 15:45:46 +04:00
Anton Kaliaev
3a29521848 spec/consensus: canonical vs subjective commit
Refs https://github.com/tendermint/tendermint/issues/2769
2020-07-29 15:13:15 +04:00
Marko
2bd673c8eb blockchain: remove duplicate evidence sections (#124) 2020-07-29 08:24:42 +02:00
Marko
8ff136c716 blockchain: rename to core (#123) 2020-07-28 16:51:14 +02:00
Anton Kaliaev
b10ff00e1b spec/abci: expand on Validator#Address (#118)
Refs https://github.com/tendermint/tendermint/issues/3732
2020-07-22 16:50:24 +04:00
Erik Grinaker
6b570e2111 abci: tweak node sync estimate (#115) 2020-07-10 20:16:13 +02:00
Anton Kaliaev
89922df775 abci: add AppVersion to ConsensusParams (#106) 2020-06-23 12:19:37 +04:00
Callum Waters
1bd2aacb56 spec: update evidence in blockchain.md (#108)
now evidence reflects the actual evidence present in the tendermint repo
2020-06-19 15:50:26 +02:00
Alexander Simmerl
30ef12d0bb spec: link to abci server implementations (#100) 2020-06-15 10:42:48 +02:00
Anton Kaliaev
199124048e spec: modify Header.LastResultsHash (#97)
Refs: https://github.com/tendermint/tendermint/issues/1007
PR: https://github.com/tendermint/tendermint/pull/4845
2020-06-12 14:41:51 +04:00
Callum Waters
9c0754e617 spec: add ProofTrialPeriod to EvidenceParam (#99) 2020-06-11 10:10:06 +02:00
Anton Kaliaev
0d5f212f30 reactors/pex: masked IP is used as group key (#96) 2020-05-25 09:32:55 +04:00
Callum Waters
5acd1540c0 Update evidence params with MaxNum (#95)
evidence params now includes maxNum which is the maximum number of evidence that can be committed on a single block
2020-05-12 13:41:44 +02:00
Tess Rinearson
d65205ecad document state sync ABCI interface and P2P protocol (#93)
* Revert "Revert "document state sync ABCI interface and P2P protocol (#90)" (#92)"

This reverts commit 90797cef90.

* update with new enum case

* fix links

Co-authored-by: Erik Grinaker <erik@interchain.berlin>
2020-05-11 09:27:37 +04:00
Anton Kaliaev
3c27335db3 reactors/pex: specify hash function (#94)
https://github.com/tendermint/tendermint/pull/4810/files
2020-05-08 22:15:08 +04:00
Anton Kaliaev
c3cd54a8e0 blockchain: change validator set sorting method (#91)
* abci: specify sorting of RequestInitChain.Validators

* blockchain: change validator sorting method

Refs https://github.com/tendermint/tendermint/issues/2478
2020-05-06 11:02:20 +04:00
Tess Rinearson
90797cef90 Revert "document state sync ABCI interface and P2P protocol (#90)" (#92)
This reverts commit 9842b4b0fb.
2020-05-05 14:53:49 +02:00
Erik Grinaker
9842b4b0fb document state sync ABCI interface and P2P protocol (#90)
The corresponding Tendermint PRs are tendermint/tendermint#4704 and tendermint/tendermint#4705.
2020-05-05 14:40:00 +02:00
Anton Kaliaev
f399abd7ac abci: update MaxAgeNumBlocks & MaxAgeDuration docs (#88) 2020-04-21 17:15:26 +02:00
Anton Kaliaev
7a0cdd53d5 abci: add MaxAgeNumBlocks/MaxAgeDuration to EvidenceParams (#87) 2020-04-14 14:46:21 +04:00
Erik Grinaker
ebda9dcac5 abci: add basic description of ABCI Commit.ResponseHeight (#85)
Documentation for block pruning, once it's merged: tendermint/tendermint#4588.

Minimum documentation, for now - we probably shouldn't encourage using this feature too much until we release state sync.
2020-04-14 10:54:25 +04:00
Erik Grinaker
15b15d2060 accept RFC-001 (#86) 2020-04-03 13:07:57 +02:00
Erik Grinaker
3ab6026ad7 RFC-001: configurable block retention (#84)
* Added RFC for truncated block history coordination

* Clarified minimum block retention

* Added hard checks on block retention and snapshot interval, and made some minor tweaks

* Genesis parameters are immutable

* Use local config for snapshot interval

* Reordered parameter descriptions

* Clarified local config option for snapshot-interval

* rewrite for ABCI commit response

* Renamed RFC

* add block retention diagram

* Removed retain_blocks table

* fix image numbers

* resolved open questions

* image quality
2020-04-02 15:38:00 +02:00
Marko
1152120dea remove .idea dir (#83)
Signed-off-by: Marko Baricevic <marbar3778@yahoo.com>
2020-03-19 12:20:44 +01:00
Marko
d45389e2b0 codeowners: add code owners (#82)
* codeowners: add code owners

- added some codeowners
please comment if youd like to be added as well.

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

* remove comment of repo maintainers
2020-03-15 17:37:25 +01:00
Callum Waters
9440fc16ce Merge pull request #81 from tendermint/callum/markdown-link-checker
Add markdown link checker
2020-03-10 16:27:21 +01:00
Callum Michael Waters
3f04e8bbce second attempt at fixing all links 2020-03-10 16:22:14 +01:00
Callum Michael Waters
c9a664a2f8 first attempt at fixing all links 2020-03-10 16:15:59 +01:00
Callum Waters
4f0fb3325a removed folder-path flag 2020-03-10 15:51:23 +01:00
Callum Waters
e963deff5a changed tab spacing 2020-03-10 15:48:31 +01:00
Callum Michael Waters
ee5c790878 add markdown link checker 2020-03-10 15:32:51 +01:00
Callum Waters
327767a1c1 Merge pull request #80 from tendermint/callum/link-pex-reactor
update link to the pex reactor
2020-03-10 15:04:27 +01:00
Callum Waters
edb4928357 update link to the pex reactor 2020-03-10 14:41:17 +01:00
Marko
b0f35a64d9 evidence: Add time to evidence params (#69)
* evidence: Add time to evidence params

- this pr is grouped together with https://github.com/tendermint/tendermint/pull/4254, once that PR is merged then this one can be as well.

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

* remove note

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

* Apply suggestions from code review

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

Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
2020-02-23 14:09:58 +01:00
Marko
56ffcf709a docs: update specs to remove cmn (#77)
- cmn was remvoed in favor of sub pkgs. cmn.kvpair is now kv.pair

Signed-off-by: Marko Baricevic <marbar3778@yahoo.com>
2020-02-03 18:37:09 +01:00
Zaki Manian
452f0b775a p2p: Merlin based malleability fixes (#72)
* Update the secret connection spec with the use of merlin to eliminte handshake malleability

* Update spec/p2p/peer.md

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

* Update spec/p2p/peer.md

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

* Update spec/p2p/peer.md

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

Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
2020-01-27 11:34:53 +04:00
Zarko Milosevic
cf24489764 Merge pull request #76 from tendermint/ismail/fix-link-light
Fix link in readme
2020-01-24 15:31:11 +01:00
Ismail Khoffi
576e40eabd Fix link in readme
./light -> ./light-client
2020-01-24 15:17:04 +01:00
Zarko Milosevic
206139f384 Merge pull request #75 from tendermint/bucky/lite-light
lite->light
2020-01-23 23:28:51 +01:00
Ethan Buchman
603364bdaa lite->light 2020-01-23 09:22:40 -08:00
Zarko Milosevic
033a0cb53f Merge pull request #61 from tendermint/zm_lite_client_algo
Update specification of light client algorithm to align with the code
2020-01-23 14:50:49 +01:00
Zarko Milosevic
026fddee4f Aligh the correctness arguments with the pseudocode changes 2020-01-23 14:49:45 +01:00
Zarko Milosevic
dc542068ae Merge pull request #73 from tendermint/bucky/light-reorg
Move light specs to their own dir, add readme and diagram
2020-01-23 11:14:38 +01:00
Ethan Buchman
c35d6e706f update readme 2020-01-22 13:52:54 -08:00
Ethan Buchman
bd2f41bf79 fix image 2020-01-22 13:49:09 -08:00
Ethan Buchman
d1bd98d5e0 detection TODO 2020-01-22 13:19:24 -08:00
Ethan Buchman
035838901e add diagram 2020-01-22 13:17:16 -08:00
Ethan Buchman
e342c21336 add redirects 2020-01-22 13:10:08 -08:00
Ethan Buchman
eb9e1f961c titles 2020-01-22 13:06:49 -08:00
Ethan Buchman
f26eb4ee89 light client dir and readmes 2020-01-22 12:55:31 -08:00
Zarko Milosevic
146e251892 Address reviewer comment's. Intermediate commit 2020-01-08 17:49:32 +01:00
Zarko Milosevic
7130c2e68c Removing Store from API and providing end-to-end timing guarantees 2020-01-06 18:30:59 +01:00
Zarko Milosevic
4a9eb1f1ac Intermediate commit (aligning spec with the code) 2019-12-31 13:31:35 +01:00
Zarko Milosevic
0adde9d415 Separating algorithm from proofs 2019-12-26 13:11:01 +01:00
Zarko Milosevic
ee0cc537b8 Addressing reviewer's comments 2019-12-25 13:58:27 +01:00
Zarko Milosevic
4f7c55507c Address reviewer's comments 2019-12-12 12:37:36 +01:00
Zarko Milosevic
8528cdb314 Merge remote-tracking branch 'remotes/origin/master' into zm_lite_client_algo
# Conflicts:
#	spec/consensus/light-client.md
2019-12-11 16:18:17 +01:00
Zarko Milosevic
9ddfc79813 Add explanation on difference between trusted models 2019-12-11 16:13:47 +01:00
Zarko Milosevic
069906a25d Improve algorithms 2019-12-11 15:20:14 +01:00
Zarko Milosevic
5c580846bb Improved error handling 2019-12-06 15:56:05 +01:00
Anca Zamfir
afda2d39b6 some suggestions for pseuodocode changes 2019-12-06 12:43:16 +01:00
Sunny Aggarwal
743a658613 Add sr25519 amino documentation (#67)
* sr25519 amino

* Update spec/blockchain/encoding.md

Co-Authored-By: Marko <marbar3778@yahoo.com>
2019-12-04 12:44:28 +01:00
dongsamb
dbc8765104 Add spec doc about unconditional_peer, persistent_peers_max_dial of ADR-050 (#68)
* Add spec doc about unconditional_peer_ids, persistent_peers_max_dial_period of ADR-050

* Add indefinitely dialing condition
2019-12-04 09:09:24 +01:00
Zarko Milosevic
2306108d8a Apply suggestions from code review
Co-Authored-By: Anca Zamfir <ancazamfir@users.noreply.github.com>
2019-12-02 12:40:47 +01:00
Zarko Milosevic
4ee393c3da Clean up error conditions and simplify pseudocode 2019-11-28 15:42:35 +01:00
Anton Kaliaev
953523c3cb reflect breaking changes made to Commit (#63)
* reflect breaking changes made to Commit

PR: https://github.com/tendermint/tendermint/pull/4146
Issue: https://github.com/tendermint/tendermint/issues/1648

* types: rename Commit#Precommits to Signatures

* update BlockIDFlagAbsent comment

* remove iota
2019-11-23 11:02:08 +01:00
Zarko Milosevic
d862fd4ec7 Merge pull request #56 from tendermint/zm_fix_system_model
Fix model section
2019-11-21 12:53:20 +01:00
Marko
7b3138e694 spec: update spec with tendermint updates (#62)
* spec: update spec with tendermint updates

- this in preperation of deleting the spec folder in docs in tendermint/tendermint

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

* spec: added in reactors & p2p

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

* spec: update readme in spec to comply with docs site

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

* docs: addded more changes from tednermint/tendermint

Signed-off-by: Marko Baricevic <marbar3778@yahoo.com>
2019-11-21 11:15:24 +01:00
Zarko Milosevic
a4b68ec2fb Add non-recursive specification of Bisection algorithm
- Fix timing issues by introducing Delta parameter
2019-11-15 12:47:48 +01:00
Zarko Milosevic
f618acf2ab Fix model section 2019-10-29 12:01:13 +01:00
Marko
513c67230f Add Section for P2P (#53)
* Add Section for P2P

- moved over the section on p2p

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

* add some more files

Signed-off-by: Marko Baricevic <marbar3778@yahoo.com>
2019-10-07 15:02:20 +02:00
Marko
fa3430ad16 spec/consensus/signing: add more details about nil and amnesia (#54)
- Add more details about nil votes and about amnesia attacks

Signed-off-by: Marko Baricevic <marbar3778@yahoo.com>
2019-10-02 15:28:56 -07:00
Marko
95cf253b6d Add ABCI SPEC (#51)
- move the abci spec from tendermint to spec repo

Signed-off-by: Marko Baricevic <marbar3778@yahoo.com>
2019-09-17 16:07:08 +02:00
Marko
9b3531d7d6 Add consesnus and blockchain specs, (#52)
- Open questions
	- Do  we want to split lite client work from consesnsus
	- From the blockchain spec, is encoding nessecary in the spec

Signed-off-by: Marko Baricevic <marbar3778@yahoo.com>
2019-09-17 16:06:20 +02:00
Marko
81a0198af2 This PR is to create signed commits to be able to merge (#50)
Signed-off-by: Marko Baricevic <marbar3778@yahoo.com>
2019-09-14 19:56:17 +02:00
Marko
87abbf78e6 Prepare to Nuke Develop (#47)
* state -> step

* vote -> v

* New version of the algorithm and the proof

* New version of the algorithm and the proofs

* Added algorithm description

* Add algorithm description

* Add introduction

* Add conclusion

* Add conclusion file

* fix warnings (caption was defined twice)

- only the latter is used anyways (centers captions)
- this makes it possible to autom. building the paper

* Update grammar

* s/state_p/step_p

* Address Ismail's comments

* intro: language fixes

* definitions: language fixes

* consensus: various fixes

* proof: some fixes

* try to improve reviewability

* \eq -> =

* textwrap to 79

* various minor fixes

* proof: fix itemization

* proof: more minor fixes

* proof: timeouts are functions

* proof: fixes to lemma6

* Intro changes and improve title page

* Add Marko and Ming to acks

* add readme

* Format algorithm correctly

Clarify condition semantic and timeouts

Improve descriptions

* patform -> platform

* Ensure that rules are mutually exclusive

- various clarifications and small improvements

* Release v0.6

* small nits for smoother readability
2019-09-03 14:07:40 +02:00
milosevic
b362894a56 Merge pull request #8 from tendermint/align-algorithm-with-code
Align protocol with Tendermint code and add find valid value mechanism
2017-12-06 09:52:32 +01:00
Zarko Milosevic
2866ba1a2c Align protocol with Tendermint code and add find valid value mechanism 2017-12-06 09:48:53 +01:00
milosevic
5764a81410 Merge pull request #1 from tendermint/feature/add-timeouts
Add three timeouts and align pseudocode better with existing algorithm
2017-09-11 09:18:07 +02:00
Milosevic, Zarko
4a81d0a02f Add three timeouts and align pseudocode better with existing algorithm 2017-09-11 09:12:27 +02:00
Milosevic, Zarko
9d864da353 Initial commit 2017-07-10 08:28:56 +02:00
1242 changed files with 136666 additions and 79181 deletions

4
.github/CODEOWNERS vendored
View File

@@ -7,5 +7,7 @@
# global owners are only requested if there isn't a more specific
# codeowner specified below. For this reason, the global codeowners
# are often repeated in package-level definitions.
* @alexanderbez @ebuchman @cmwaters @tessr @tychoish @williambanfield
* @ebuchman @cmwaters @tychoish @williambanfield @creachadair @sergio-mena @jmalicevic @thanethomson @ancazamfir @samricotta
# Spec related changes can be approved by the protocol design team
/spec @josef-widder @milosevic @cason @sergio-mena @jmalicevic

37
.github/ISSUE_TEMPLATE/proposal.md vendored Normal file
View File

@@ -0,0 +1,37 @@
---
name: Protocol Change Proposal
about: Create a proposal to request a change to the protocol
---
<!-- < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < ☺
v ✰ Thanks for opening an issue! ✰
v Before smashing the submit button please review the template.
v Word of caution: Under-specified proposals may be rejected summarily
☺ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -->
# Protocol Change Proposal
## Summary
<!-- Short, concise description of the proposed change -->
## Problem Definition
<!-- Why do we need this change?
What problems may be addressed by introducing this change?
What benefits does Tendermint stand to gain by including this change?
Are there any disadvantages of including this change? -->
## Proposal
<!-- Detailed description of requirements of implementation -->
____
#### For Admin Use
- [ ] Not duplicate issue
- [ ] Appropriate labels applied
- [ ] Appropriate contributors tagged
- [ ] Contributor assigned/self-assigned

View File

@@ -1,16 +1,16 @@
pullRequestOpened: |
:wave: Thanks for creating a PR!
:wave: Thanks for creating a PR!
Before we can merge this PR, please make sure that all the following items have been
Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
write a little note why.
- [ ] Wrote tests
- [ ] Updated CHANGELOG_PENDING.md
- [ ] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
- [ ] Updated relevant documentation (`docs/`) and code comments
- [ ] Re-reviewed `Files changed` in the Github PR explorer
- [ ] Applied Appropriate Labels
- [ ] Wrote tests
- [ ] Updated CHANGELOG_PENDING.md
- [ ] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
- [ ] Updated relevant documentation (`docs/`) and code comments
- [ ] Re-reviewed `Files changed` in the Github PR explorer
- [ ] Applied Appropriate Labels
Thank you for your contribution to Tendermint! :rocket:
Thank you for your contribution to Tendermint! :rocket:

14
.github/codecov.yml vendored
View File

@@ -5,19 +5,14 @@ coverage:
status:
project:
default:
threshold: 1%
patch: on
threshold: 20%
patch: off
changes: off
github_checks:
annotations: false
comment:
layout: "diff, files"
behavior: default
require_changes: no
require_base: no
require_head: yes
comment: false
ignore:
- "docs"
@@ -25,3 +20,6 @@ ignore:
- "scripts"
- "**/*.pb.go"
- "libs/pubsub/query/query.peg.go"
- "*.md"
- "*.rst"
- "*.yml"

View File

@@ -3,25 +3,89 @@ updates:
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: daily
time: "11:00"
interval: weekly
target-branch: "master"
open-pull-requests-limit: 10
labels:
- T:dependencies
- S:automerge
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: weekly
target-branch: "v0.34.x"
open-pull-requests-limit: 10
labels:
- T:dependencies
- S:automerge
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: weekly
target-branch: "v0.35.x"
open-pull-requests-limit: 10
labels:
- T:dependencies
- S:automerge
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: weekly
target-branch: "v0.36.x"
open-pull-requests-limit: 10
labels:
- T:dependencies
- S:automerge
- package-ecosystem: npm
directory: "/docs"
schedule:
interval: daily
time: "11:00"
interval: weekly
open-pull-requests-limit: 10
reviewers:
- fadeev
###################################
##
## Update All Go Dependencies
- package-ecosystem: gomod
directory: "/"
schedule:
interval: daily
time: "11:00"
interval: weekly
target-branch: "master"
open-pull-requests-limit: 10
reviewers:
- melekes
- tessr
labels:
- T:dependencies
- S:automerge
- package-ecosystem: gomod
directory: "/"
schedule:
interval: weekly
target-branch: "v0.34.x"
open-pull-requests-limit: 10
labels:
- T:dependencies
- S:automerge
- package-ecosystem: gomod
directory: "/"
schedule:
interval: weekly
target-branch: "v0.35.x"
open-pull-requests-limit: 10
labels:
- T:dependencies
- S:automerge
- package-ecosystem: gomod
directory: "/"
schedule:
interval: weekly
target-branch: "v0.36.x"
open-pull-requests-limit: 10
labels:
- T:dependencies
- S:automerge

View File

@@ -1,8 +0,0 @@
default: true,
MD007: { "indent": 4 }
MD013: false
MD024: { siblings_only: true }
MD025: false
MD033: { no-inline-html: false }
no-hard-tabs: false
whitespace: false

8
.github/linters/markdownlint.yml vendored Normal file
View File

@@ -0,0 +1,8 @@
default: true,
MD007: {"indent": 4}
MD013: false
MD024: {siblings_only: true}
MD025: false
MD033: {no-inline-html: false}
no-hard-tabs: false
whitespace: false

9
.github/linters/yaml-lint.yml vendored Normal file
View File

@@ -0,0 +1,9 @@
---
# Default rules for YAML linting from super-linter.
# See: See https://yamllint.readthedocs.io/en/stable/rules.html
extends: default
rules:
document-end: disable
document-start: disable
line-length: disable
truthy: disable

31
.github/mergify.yml vendored
View File

@@ -1,13 +1,22 @@
queue_rules:
- name: default
conditions:
- base=master
- label=S:automerge
pull_request_rules:
- name: Automerge to master
conditions:
- base=master
- label=S:automerge
actions:
merge:
queue:
method: squash
strict: true
commit_message: title+body
name: default
commit_message_template: |
{{ title }} (#{{ number }})
{{ body }}
- name: backport patches to v0.34.x branch
conditions:
- base=master
@@ -16,3 +25,19 @@ pull_request_rules:
backport:
branches:
- v0.34.x
- name: backport patches to v0.35.x branch
conditions:
- base=master
- label=S:backport-to-v0.35.x
actions:
backport:
branches:
- v0.35.x
- name: backport patches to v0.36.x branch
conditions:
- base=master
- label=S:backport-to-v0.36.x
actions:
backport:
branches:
- v0.36.x

82
.github/workflows/build.yml vendored Normal file
View File

@@ -0,0 +1,82 @@
name: Build
# Tests runs different tests (test_abci_apps, test_abci_cli, test_apps)
# This workflow runs on every push to master or release branch and every pull requests
# All jobs will pass without running if no *{.go, .mod, .sum} files have been modified
on:
pull_request:
push:
branches:
- master
- release/**
jobs:
build:
name: Build
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
goarch: ["arm", "amd64"]
goos: ["linux"]
timeout-minutes: 5
steps:
- uses: actions/setup-go@v3
with:
go-version: "1.18"
- uses: actions/checkout@v3
- uses: technote-space/get-diff-action@v6
with:
PATTERNS: |
**/**.go
"!test/"
go.mod
go.sum
Makefile
- name: install
run: GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} make build
if: "env.GIT_DIFF != ''"
test_abci_cli:
runs-on: ubuntu-latest
needs: build
timeout-minutes: 5
steps:
- uses: actions/setup-go@v3
with:
go-version: "1.18"
- uses: actions/checkout@v3
- uses: technote-space/get-diff-action@v6
with:
PATTERNS: |
**/**.go
go.mod
go.sum
- name: install
run: make install_abci
if: "env.GIT_DIFF != ''"
- run: abci/tests/test_cli/test.sh
shell: bash
if: "env.GIT_DIFF != ''"
test_apps:
runs-on: ubuntu-latest
needs: build
timeout-minutes: 5
steps:
- uses: actions/setup-go@v3
with:
go-version: "1.18"
- uses: actions/checkout@v3
- uses: technote-space/get-diff-action@v6
with:
PATTERNS: |
**/**.go
go.mod
go.sum
- name: install
run: make install install_abci
if: "env.GIT_DIFF != ''"
- name: test_apps
run: test/app/test.sh
shell: bash
if: "env.GIT_DIFF != ''"

75
.github/workflows/check-generated.yml vendored Normal file
View File

@@ -0,0 +1,75 @@
# Verify that generated code is up-to-date.
#
# Note that we run these checks regardless whether the input files have
# changed, because generated code can change in response to toolchain updates
# even if no files in the repository are modified.
name: Check generated code
on:
pull_request:
branches:
- master
permissions:
contents: read
jobs:
check-mocks:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v3
with:
go-version: '1.18'
- uses: actions/checkout@v3
- name: "Check generated mocks"
run: |
set -euo pipefail
readonly MOCKERY=2.12.3 # N.B. no leading "v"
curl -sL "https://github.com/vektra/mockery/releases/download/v${MOCKERY}/mockery_${MOCKERY}_Linux_x86_64.tar.gz" | tar -C /usr/local/bin -xzf -
make mockery 2>/dev/null
if ! git diff --stat --exit-code ; then
echo ">> ERROR:"
echo ">>"
echo ">> Generated mocks require update (either Mockery or source files may have changed)."
echo ">> Ensure your tools are up-to-date, re-run 'make mockery' and update this PR."
echo ">>"
exit 1
fi
check-proto:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v3
with:
go-version: '1.18'
- uses: actions/checkout@v3
with:
fetch-depth: 1 # we need a .git directory to run git diff
- name: "Check protobuf generated code"
run: |
set -euo pipefail
# Install buf and gogo tools, so that differences that arise from
# toolchain differences are also caught.
readonly tools="$(mktemp -d)"
export PATH="${PATH}:${tools}/bin"
export GOBIN="${tools}/bin"
go install github.com/bufbuild/buf/cmd/buf
go install github.com/gogo/protobuf/protoc-gen-gogofaster@latest
make proto-gen
if ! git diff --stat --exit-code ; then
echo ">> ERROR:"
echo ">>"
echo ">> Protobuf generated code requires update (either tools or .proto files may have changed)."
echo ">> Ensure your tools are up-to-date, re-run 'make proto-gen' and update this PR."
echo ">>"
exit 1
fi

View File

@@ -1,127 +0,0 @@
name: Test Coverage
on:
pull_request:
push:
branches:
- master
- release/**
jobs:
split-test-files:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4
- name: Create a file with all the pkgs
run: go list ./... > pkgs.txt
- name: Split pkgs into 4 files
run: split -d -n l/4 pkgs.txt pkgs.txt.part.
# cache multiple
- uses: actions/upload-artifact@v2
with:
name: "${{ github.sha }}-00"
path: ./pkgs.txt.part.00
- uses: actions/upload-artifact@v2
with:
name: "${{ github.sha }}-01"
path: ./pkgs.txt.part.01
- uses: actions/upload-artifact@v2
with:
name: "${{ github.sha }}-02"
path: ./pkgs.txt.part.02
- uses: actions/upload-artifact@v2
with:
name: "${{ github.sha }}-03"
path: ./pkgs.txt.part.03
build-linux:
name: Build
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
goarch: ["arm", "amd64"]
timeout-minutes: 5
steps:
- uses: actions/setup-go@v2
with:
go-version: "1.16"
- uses: actions/checkout@v2.3.4
- uses: technote-space/get-diff-action@v4
with:
PATTERNS: |
**/**.go
go.mod
go.sum
- name: install
run: GOOS=linux GOARCH=${{ matrix.goarch }} make build
if: "env.GIT_DIFF != ''"
tests:
runs-on: ubuntu-latest
needs: split-test-files
strategy:
fail-fast: false
matrix:
part: ["00", "01", "02", "03"]
steps:
- uses: actions/setup-go@v2
with:
go-version: "1.16"
- uses: actions/checkout@v2.3.4
- uses: technote-space/get-diff-action@v4
with:
PATTERNS: |
**/**.go
go.mod
go.sum
- uses: actions/download-artifact@v2
with:
name: "${{ github.sha }}-${{ matrix.part }}"
if: env.GIT_DIFF
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.16
- name: test & coverage report creation
run: |
cat pkgs.txt.part.${{ matrix.part }} | xargs go test -mod=readonly -timeout 8m -race -coverprofile=${{ matrix.part }}profile.out -covermode=atomic
if: env.GIT_DIFF
- uses: actions/upload-artifact@v2
with:
name: "${{ github.sha }}-${{ matrix.part }}-coverage"
path: ./${{ matrix.part }}profile.out
upload-coverage-report:
runs-on: ubuntu-latest
needs: tests
steps:
- uses: actions/checkout@v2.3.4
- uses: technote-space/get-diff-action@v4
with:
PATTERNS: |
**/**.go
go.mod
go.sum
- uses: actions/download-artifact@v2
with:
name: "${{ github.sha }}-00-coverage"
if: env.GIT_DIFF
- uses: actions/download-artifact@v2
with:
name: "${{ github.sha }}-01-coverage"
if: env.GIT_DIFF
- uses: actions/download-artifact@v2
with:
name: "${{ github.sha }}-02-coverage"
if: env.GIT_DIFF
- uses: actions/download-artifact@v2
with:
name: "${{ github.sha }}-03-coverage"
if: env.GIT_DIFF
- run: |
cat ./*profile.out | grep -v "mode: atomic" >> coverage.txt
if: env.GIT_DIFF
- uses: codecov/codecov-action@v2.0.2
with:
file: ./coverage.txt
if: env.GIT_DIFF

View File

@@ -1,20 +1,19 @@
name: Build & Push
# Build & Push rebuilds the tendermint docker image on every push to master and creation of tags
name: Docker
# Build & Push rebuilds the tendermint docker image on every push to master and creation of tags
# and pushes the image to https://hub.docker.com/r/interchainio/simapp/tags
on:
pull_request:
push:
branches:
- master
tags:
- "v[0-9]+.[0-9]+.[0-9]+" # Push events to matching v*, i.e. v1.0, v20.15.10
- "v[0-9]+.[0-9]+.[0-9]+-rc*" # Push events to matching v*, i.e. v1.0-rc1, v20.15.10-rc5
- "v[0-9]+.[0-9]+.[0-9]+" # Push events to matching v*, i.e. v1.0, v20.15.10
- "v[0-9]+.[0-9]+.[0-9]+-rc*" # Push events to matching v*, i.e. v1.0-rc1, v20.15.10-rc5
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4
- uses: actions/checkout@v3
- name: Prepare
id: prep
run: |
@@ -39,18 +38,18 @@ jobs:
with:
platforms: all
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1.5.0
- name: Set up Docker Build
uses: docker/setup-buildx-action@v2.0.0
- name: Login to DockerHub
if: ${{ github.event_name != 'pull_request' }}
uses: docker/login-action@v1.10.0
uses: docker/login-action@v2.0.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Publish to Docker Hub
uses: docker/build-push-action@v2.6.1
uses: docker/build-push-action@v3.1.0
with:
context: .
file: ./DOCKER/Dockerfile

62
.github/workflows/docs-deployment.yml vendored Normal file
View File

@@ -0,0 +1,62 @@
# Build and deploy the docs.tendermint.com website content.
# The static content is published to GitHub Pages.
#
# For documentation build info, see docs/DOCS_README.md.
name: Build static documentation site
on:
workflow_dispatch: # allow manual updates
push:
branches:
- master
paths:
- docs/**
- spec/**
jobs:
# This is split into two jobs so that the build, which runs npm, does not
# have write access to anything. The deploy requires write access to publish
# to the branch used by GitHub Pages, however, so we can't just make the
# whole workflow read-only.
build:
name: VuePress build
runs-on: ubuntu-latest
container:
image: alpine:latest
permissions:
contents: read
steps:
- name: Install generator dependencies
run: |
apk add --no-cache make bash git npm
- uses: actions/checkout@v3
with:
# We need to fetch full history so the backport branches for previous
# versions will be available for the build.
fetch-depth: 0
- name: Build documentation
run: |
git config --global --add safe.directory "$PWD"
make build-docs
- uses: actions/upload-artifact@v3
with:
name: build-output
path: ~/output/
deploy:
name: Deploy to GitHub Pages
runs-on: ubuntu-latest
needs: build
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: build-output
path: ~/output
- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: 'docs-tendermint-com'
folder: ~/output
single-commit: true

20
.github/workflows/docs-toc.yml vendored Normal file
View File

@@ -0,0 +1,20 @@
# Verify that important design docs have ToC entries.
name: Check documentation ToC
on:
pull_request:
push:
branches:
- master
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: technote-space/get-diff-action@v6
with:
PATTERNS: |
docs/architecture/**
docs/rfc/**
- run: ./docs/presubmit.sh
if: env.GIT_DIFF

36
.github/workflows/e2e-manual.yml vendored Normal file
View File

@@ -0,0 +1,36 @@
# Runs randomly generated E2E testnets nightly on master
# manually run e2e tests
name: e2e-manual
on:
workflow_dispatch:
jobs:
e2e-nightly-test:
# Run parallel jobs for the listed testnet groups (must match the
# ./build/generator -g flag)
strategy:
fail-fast: false
matrix:
group: ['00', '01', '02', '03', '04']
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/setup-go@v3
with:
go-version: '1.18'
- uses: actions/checkout@v3
- name: Build
working-directory: test/e2e
# Run make jobs in parallel, since we can't run steps in parallel.
run: make -j2 docker generator runner tests
- name: Generate testnets
working-directory: test/e2e
# When changing -g, also change the matrix groups above
run: ./build/generator -g 5 -d networks/nightly/
- name: Run ${{ matrix.p2p }} p2p testnets
working-directory: test/e2e
run: ./run-multiple.sh networks/nightly/*-group${{ matrix.group }}-*.toml

View File

@@ -1,12 +1,10 @@
# Runs randomly generated E2E testnets nightly
# on the 0.34.x release branch
# Runs randomly generated E2E testnets nightly on the 0.34.x branch.
# !! If you change something in this file, you probably want
# to update the e2e-nightly-master workflow as well!
# !! This file should be kept in sync with the e2e-nightly-master.yml file,
# modulo changes to the version labels.
name: e2e-nightly-34x
on:
workflow_dispatch: # allow running workflow manually, in theory
schedule:
- cron: '0 2 * * *'
@@ -17,15 +15,15 @@ jobs:
strategy:
fail-fast: false
matrix:
group: ['00', '01', '02', '03']
group: ['00', '01']
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/setup-go@v2
- uses: actions/setup-go@v3
with:
go-version: '1.16'
go-version: '1.18'
- uses: actions/checkout@v2.3.4
- uses: actions/checkout@v3
with:
ref: 'v0.34.x'
@@ -37,7 +35,7 @@ jobs:
- name: Generate testnets
working-directory: test/e2e
# When changing -g, also change the matrix groups above
run: ./build/generator -g 4 -d networks/nightly
run: ./build/generator -g 2 -d networks/nightly
- name: Run testnets in group ${{ matrix.group }}
working-directory: test/e2e
@@ -58,19 +56,3 @@ jobs:
SLACK_COLOR: danger
SLACK_MESSAGE: Nightly E2E tests failed on v0.34.x
SLACK_FOOTER: ''
e2e-nightly-success: # may turn this off once they seem to pass consistently
needs: e2e-nightly-test
if: ${{ success() }}
runs-on: ubuntu-latest
steps:
- name: Notify Slack on success
uses: rtCamp/action-slack-notify@12e36fc18b0689399306c2e0b3e0f2978b7f1ee7
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_CHANNEL: tendermint-internal
SLACK_USERNAME: Nightly E2E Tests
SLACK_ICON_EMOJI: ':white_check_mark:'
SLACK_COLOR: good
SLACK_MESSAGE: Nightly E2E tests passed on v0.34.x
SLACK_FOOTER: ''

75
.github/workflows/e2e-nightly-35x.yml vendored Normal file
View File

@@ -0,0 +1,75 @@
# Runs randomly generated E2E testnets nightly on the v0.35.x branch.
# !! This file should be kept in sync with the e2e-nightly-master.yml file,
# modulo changes to the version labels.
name: e2e-nightly-35x
on:
schedule:
- cron: '0 2 * * *'
jobs:
e2e-nightly-test:
# Run parallel jobs for the listed testnet groups (must match the
# ./build/generator -g flag)
strategy:
fail-fast: false
matrix:
p2p: ['legacy', 'new', 'hybrid']
group: ['00', '01', '02', '03']
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/setup-go@v3
with:
go-version: '1.18'
- uses: actions/checkout@v3
with:
ref: 'v0.35.x'
- name: Build
working-directory: test/e2e
# Run make jobs in parallel, since we can't run steps in parallel.
run: make -j2 docker generator runner tests
- name: Generate testnets
working-directory: test/e2e
# When changing -g, also change the matrix groups above
run: ./build/generator -g 4 -d networks/nightly/${{ matrix.p2p }} -p ${{ matrix.p2p }}
- name: Run ${{ matrix.p2p }} p2p testnets in group ${{ matrix.group }}
working-directory: test/e2e
run: ./run-multiple.sh networks/nightly/${{ matrix.p2p }}/*-group${{ matrix.group }}-*.toml
e2e-nightly-fail-2:
needs: e2e-nightly-test
if: ${{ failure() }}
runs-on: ubuntu-latest
steps:
- name: Notify Slack on failure
uses: rtCamp/action-slack-notify@12e36fc18b0689399306c2e0b3e0f2978b7f1ee7
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_CHANNEL: tendermint-internal
SLACK_USERNAME: Nightly E2E Tests
SLACK_ICON_EMOJI: ':skull:'
SLACK_COLOR: danger
SLACK_MESSAGE: Nightly E2E tests failed on v0.35.x
SLACK_FOOTER: ''
e2e-nightly-success: # may turn this off once they seem to pass consistently
needs: e2e-nightly-test
if: ${{ success() }}
runs-on: ubuntu-latest
steps:
- name: Notify Slack on success
uses: rtCamp/action-slack-notify@12e36fc18b0689399306c2e0b3e0f2978b7f1ee7
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_CHANNEL: tendermint-internal
SLACK_USERNAME: Nightly E2E Tests
SLACK_ICON_EMOJI: ':white_check_mark:'
SLACK_COLOR: good
SLACK_MESSAGE: Nightly E2E tests passed on v0.35.x
SLACK_FOOTER: ''

74
.github/workflows/e2e-nightly-36x.yml vendored Normal file
View File

@@ -0,0 +1,74 @@
# Runs randomly generated E2E testnets nightly on the v0.36.x branch.
# !! This file should be kept in sync with the e2e-nightly-master.yml file,
# modulo changes to the version labels.
name: e2e-nightly-36x
on:
schedule:
- cron: '0 2 * * *'
jobs:
e2e-nightly-test:
# Run parallel jobs for the listed testnet groups (must match the
# ./build/generator -g flag)
strategy:
fail-fast: false
matrix:
group: ['00', '01', '02', '03', '04']
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/setup-go@v3
with:
go-version: '1.18'
- uses: actions/checkout@v3
with:
ref: 'v0.36.x'
- name: Build
working-directory: test/e2e
# Run make jobs in parallel, since we can't run steps in parallel.
run: make -j2 docker generator runner tests
- name: Generate testnets
working-directory: test/e2e
# When changing -g, also change the matrix groups above
run: ./build/generator -g 5 -d networks/nightly
- name: Run testnets in group ${{ matrix.group }}
working-directory: test/e2e
run: ./run-multiple.sh networks/nightly/*-group${{ matrix.group }}-*.toml
e2e-nightly-fail-2:
needs: e2e-nightly-test
if: ${{ failure() }}
runs-on: ubuntu-latest
steps:
- name: Notify Slack on failure
uses: rtCamp/action-slack-notify@12e36fc18b0689399306c2e0b3e0f2978b7f1ee7
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_CHANNEL: tendermint-internal
SLACK_USERNAME: Nightly E2E Tests
SLACK_ICON_EMOJI: ':skull:'
SLACK_COLOR: danger
SLACK_MESSAGE: Nightly E2E tests failed on v0.36.x
SLACK_FOOTER: ''
e2e-nightly-success: # may turn this off once they seem to pass consistently
needs: e2e-nightly-test
if: ${{ success() }}
runs-on: ubuntu-latest
steps:
- name: Notify Slack on success
uses: rtCamp/action-slack-notify@12e36fc18b0689399306c2e0b3e0f2978b7f1ee7
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_CHANNEL: tendermint-internal
SLACK_USERNAME: Nightly E2E Tests
SLACK_ICON_EMOJI: ':white_check_mark:'
SLACK_COLOR: good
SLACK_MESSAGE: Nightly E2E tests passed on v0.36.x
SLACK_FOOTER: ''

View File

@@ -1,48 +1,47 @@
# Runs randomly generated E2E testnets nightly on master
# !! If you change something in this file, you probably want
# to update the e2e-nightly-34x workflow as well!
# !! Relevant changes to this file should be propagated to the e2e-nightly-<V>x
# files for the supported backport branches, when appropriate, modulo version
# markers.
name: e2e-nightly-master
on:
workflow_dispatch: # allow running workflow manually
schedule:
- cron: '0 2 * * *'
jobs:
e2e-nightly-test-2:
e2e-nightly-test:
# Run parallel jobs for the listed testnet groups (must match the
# ./build/generator -g flag)
strategy:
fail-fast: false
matrix:
p2p: ['legacy', 'new', 'hybrid']
group: ['00', '01']
group: ['00', '01', '02', '03', "04"]
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/setup-go@v2
- uses: actions/setup-go@v3
with:
go-version: '1.16'
go-version: '1.18'
- uses: actions/checkout@v2.3.4
- uses: actions/checkout@v3
- name: Build
working-directory: test/e2e
# Run make jobs in parallel, since we can't run steps in parallel.
run: make -j2 docker generator runner
run: make -j2 docker generator runner tests
- name: Generate testnets
working-directory: test/e2e
# When changing -g, also change the matrix groups above
run: ./build/generator -g 2 -d networks/nightly/${{ matrix.p2p }} -p ${{ matrix.p2p }}
run: ./build/generator -g 5 -d networks/nightly/
- name: Run ${{ matrix.p2p }} p2p testnets in group ${{ matrix.group }}
- name: Run ${{ matrix.p2p }} p2p testnets
working-directory: test/e2e
run: ./run-multiple.sh networks/nightly/${{ matrix.p2p }}/*-group${{ matrix.group }}-*.toml
run: ./run-multiple.sh networks/nightly/*-group${{ matrix.group }}-*.toml
e2e-nightly-fail-2:
needs: e2e-nightly-test-2
needs: e2e-nightly-test
if: ${{ failure() }}
runs-on: ubuntu-latest
steps:
@@ -57,8 +56,8 @@ jobs:
SLACK_MESSAGE: Nightly E2E tests failed on master
SLACK_FOOTER: ''
e2e-nightly-success: # may turn this off once they seem to pass consistently
needs: e2e-nightly-test-2
e2e-nightly-success: # may turn this off once they seem to pass consistently
needs: e2e-nightly-test
if: ${{ success() }}
runs-on: ubuntu-latest
steps:

View File

@@ -2,7 +2,7 @@ name: e2e
# Runs the CI end-to-end test network on all pushes to master or release branches
# and every pull request, but only if any Go files have been changed.
on:
workflow_dispatch: # allow running workflow manually
workflow_dispatch: # allow running workflow manually
pull_request:
push:
branches:
@@ -14,11 +14,11 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/setup-go@v2
- uses: actions/setup-go@v3
with:
go-version: '1.16'
- uses: actions/checkout@v2.3.4
- uses: technote-space/get-diff-action@v4
go-version: '1.18'
- uses: actions/checkout@v3
- uses: technote-space/get-diff-action@v6
with:
PATTERNS: |
**/**.go
@@ -28,15 +28,10 @@ jobs:
- name: Build
working-directory: test/e2e
# Run two make jobs in parallel, since we can't run steps in parallel.
run: make -j2 docker runner
run: make -j2 docker runner tests
if: "env.GIT_DIFF != ''"
- name: Run CI testnet
working-directory: test/e2e
run: ./build/runner -f networks/ci.toml
run: ./run-multiple.sh networks/ci.toml
if: "env.GIT_DIFF != ''"
- name: Emit logs on failure
if: ${{ failure() }}
working-directory: test/e2e
run: ./build/runner -f networks/ci.toml logs

View File

@@ -1,7 +1,7 @@
# Runs fuzzing nightly.
name: fuzz-nightly
name: Fuzz Tests
on:
workflow_dispatch: # allow running workflow manually
workflow_dispatch: # allow running workflow manually
schedule:
- cron: '0 3 * * *'
pull_request:
@@ -13,34 +13,19 @@ jobs:
fuzz-nightly-test:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v2
- uses: actions/setup-go@v3
with:
go-version: '1.16'
go-version: '1.18'
- uses: actions/checkout@v2.3.4
- uses: actions/checkout@v3
- name: Install go-fuzz
working-directory: test/fuzz
run: go get -u github.com/dvyukov/go-fuzz/go-fuzz github.com/dvyukov/go-fuzz/go-fuzz-build
run: go install github.com/dvyukov/go-fuzz/go-fuzz@latest github.com/dvyukov/go-fuzz/go-fuzz-build@latest
- name: Fuzz mempool-v1
- name: Fuzz mempool
working-directory: test/fuzz
run: timeout -s SIGINT --preserve-status 10m make fuzz-mempool-v1
continue-on-error: true
- name: Fuzz mempool-v0
working-directory: test/fuzz
run: timeout -s SIGINT --preserve-status 10m make fuzz-mempool-v0
continue-on-error: true
- name: Fuzz p2p-addrbook
working-directory: test/fuzz
run: timeout -s SIGINT --preserve-status 10m make fuzz-p2p-addrbook
continue-on-error: true
- name: Fuzz p2p-pex
working-directory: test/fuzz
run: timeout -s SIGINT --preserve-status 10m make fuzz-p2p-pex
run: timeout -s SIGINT --preserve-status 10m make fuzz-mempool
continue-on-error: true
- name: Fuzz p2p-sc
@@ -54,14 +39,14 @@ jobs:
continue-on-error: true
- name: Archive crashers
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: crashers
path: test/fuzz/**/crashers
retention-days: 3
- name: Archive suppressions
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: suppressions
path: test/fuzz/**/suppressions

View File

@@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 3
steps:
- uses: styfle/cancel-workflow-action@0.9.0
- uses: styfle/cancel-workflow-action@0.10.0
with:
workflow_id: 1041851,1401230,2837803
access_token: ${{ github.token }}

View File

@@ -46,7 +46,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout the Jepsen repository
uses: actions/checkout@v2.3.4
uses: actions/checkout@v3
with:
repository: 'tendermint/jepsen'
@@ -58,7 +58,7 @@ jobs:
run: docker exec -i jepsen-control bash -c 'source /root/.bashrc; cd /jepsen/tendermint; lein run test --nemesis ${{ github.event.inputs.nemesis }} --workload ${{ github.event.inputs.workload }} --concurrency ${{ github.event.inputs.concurrency }} --tendermint-url ${{ github.event.inputs.tendermintUrl }} --merkleeyes-url ${{ github.event.inputs.merkleeyesUrl }} --time-limit ${{ github.event.inputs.timeLimit }} ${{ github.event.inputs.dupOrSuperByzValidators }}'
- name: Archive results
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: results
path: tendermint/store/latest

View File

@@ -1,12 +0,0 @@
name: Check Markdown links
on:
schedule:
- cron: '* */24 * * *'
jobs:
markdown-link-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4
- uses: gaurav-nelson/github-action-markdown-link-check@1.0.13
with:
folder-path: "docs"

View File

@@ -1,7 +1,11 @@
name: Lint
# Lint runs golangci-lint over the entire Tendermint repository
# This workflow is run on every pull request and push to master
# The `golangci` job will pass without running if no *.{go, mod, sum} files have been modified.
name: Golang Linter
# Lint runs golangci-lint over the entire Tendermint repository.
#
# This workflow is run on every pull request and push to master.
#
# The `golangci` job will pass without running if no *.{go, mod, sum}
# files have been modified.
on:
pull_request:
push:
@@ -13,17 +17,22 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 8
steps:
- uses: actions/checkout@v2.3.4
- uses: technote-space/get-diff-action@v4
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '1.18'
- uses: technote-space/get-diff-action@v6
with:
PATTERNS: |
**/**.go
go.mod
go.sum
- uses: golangci/golangci-lint-action@v2.5.2
- uses: golangci/golangci-lint-action@v3
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: v1.38
# Required: the version of golangci-lint is required and
# must be specified without patch version: we always use the
# latest patch version.
version: v1.45
args: --timeout 10m
github-token: ${{ secrets.github_token }}
if: env.GIT_DIFF

View File

@@ -1,4 +1,4 @@
name: Lint
name: Markdown Linter
on:
push:
branches:
@@ -19,14 +19,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2.3.4
uses: actions/checkout@v3
- name: Lint Code Base
uses: docker://github/super-linter:v3
uses: docker://github/super-linter:v4
env:
LINTER_RULES_PATH: .
VALIDATE_ALL_CODEBASE: true
DEFAULT_BRANCH: master
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VALIDATE_MD: true
VALIDATE_OPENAPI: true
VALIDATE_YAML: true
YAML_CONFIG_FILE: yaml-lint.yml

23
.github/workflows/markdown-links.yml vendored Normal file
View File

@@ -0,0 +1,23 @@
name: Check Markdown links
on:
push:
branches:
- master
pull_request:
branches: [master]
jobs:
markdown-link-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: technote-space/get-diff-action@v6
with:
PATTERNS: |
**/**.md
- uses: creachadair/github-action-markdown-link-check@master
with:
check-modified-files-only: 'yes'
config-file: '.md-link-check.json'
if: env.GIT_DIFF

View File

@@ -1,51 +0,0 @@
name: Build & Push TM Proto Builder
on:
pull_request:
paths:
- "tools/proto/*"
push:
branches:
- master
paths:
- "tools/proto/*"
schedule:
# run this job once a month to recieve any go or buf updates
- cron: "* * 1 * *"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4
- name: Prepare
id: prep
run: |
DOCKER_IMAGE=tendermintdev/docker-build-proto
VERSION=noop
if [[ $GITHUB_REF == refs/tags/* ]]; then
VERSION=${GITHUB_REF#refs/tags/}
elif [[ $GITHUB_REF == refs/heads/* ]]; then
VERSION=$(echo ${GITHUB_REF#refs/heads/} | sed -r 's#/+#-#g')
if [ "${{ github.event.repository.default_branch }}" = "$VERSION" ]; then
VERSION=latest
fi
fi
TAGS="${DOCKER_IMAGE}:${VERSION}"
echo ::set-output name=tags::${TAGS}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1.5.0
- name: Login to DockerHub
uses: docker/login-action@v1.10.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Publish to Docker Hub
uses: docker/build-push-action@v2.6.1
with:
context: ./tools/proto
file: ./tools/proto/Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.prep.outputs.tags }}

21
.github/workflows/proto-lint.yml vendored Normal file
View File

@@ -0,0 +1,21 @@
name: Protobuf Lint
on:
pull_request:
paths:
- 'proto/**'
push:
branches:
- master
paths:
- 'proto/**'
jobs:
lint:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v3
- uses: bufbuild/buf-setup-action@v1.6.0
- uses: bufbuild/buf-lint-action@v1
with:
input: 'proto'

View File

@@ -1,23 +0,0 @@
name: Protobuf
# Protobuf runs buf (https://buf.build/) lint and check-breakage
# This workflow is only run when a .proto file has been modified
on:
workflow_dispatch: # allow running workflow manually
pull_request:
paths:
- "**.proto"
jobs:
proto-lint:
runs-on: ubuntu-latest
timeout-minutes: 4
steps:
- uses: actions/checkout@v2.3.4
- name: lint
run: make proto-lint
proto-breakage:
runs-on: ubuntu-latest
timeout-minutes: 4
steps:
- uses: actions/checkout@v2.3.4
- name: check-breakage
run: make proto-check-breaking-ci

View File

@@ -2,36 +2,35 @@ name: "Release"
on:
push:
branches:
branches:
- "RC[0-9]/**"
tags:
- "v[0-9]+.[0-9]+.[0-9]+" # Push events to matching v*, i.e. v1.0, v20.15.10
- "v[0-9]+.[0-9]+.[0-9]+" # Push events to matching v*, i.e. v1.0, v20.15.10
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2.3.4
uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-go@v2
- uses: actions/setup-go@v3
with:
go-version: '1.16'
- run: echo https://github.com/tendermint/tendermint/blob/${GITHUB_REF#refs/tags/}/CHANGELOG.md#${GITHUB_REF#refs/tags/} > ../release_notes.md
if: startsWith(github.ref, 'refs/tags/')
go-version: '1.18'
- name: Build
uses: goreleaser/goreleaser-action@v2
uses: goreleaser/goreleaser-action@v3
if: ${{ github.event_name == 'pull_request' }}
with:
version: latest
args: build --skip-validate # skip validate skips initial sanity checks in order to be able to fully run
- run: echo https://github.com/tendermint/tendermint/blob/${GITHUB_REF#refs/tags/}/CHANGELOG.md#${GITHUB_REF#refs/tags/} > ../release_notes.md
- name: Release
uses: goreleaser/goreleaser-action@v2
uses: goreleaser/goreleaser-action@v3
if: startsWith(github.ref, 'refs/tags/')
with:
version: latest

View File

@@ -7,7 +7,7 @@ jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v4
- uses: actions/stale@v5
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-pr-message: "This pull request has been automatically marked as stale because it has not had

View File

@@ -1,106 +1,34 @@
name: Tests
# Tests runs different tests (test_abci_apps, test_abci_cli, test_apps)
# This workflow runs on every push to master or release branch and every pull requests
# All jobs will pass without running if no *{.go, .mod, .sum} files have been modified
name: Test
on:
pull_request:
push:
paths:
- "**.go"
branches:
- master
- release/**
jobs:
build:
name: Build
tests:
runs-on: ubuntu-latest
timeout-minutes: 5
strategy:
fail-fast: false
matrix:
part: ["00", "01", "02", "03", "04", "05"]
steps:
- uses: actions/setup-go@v2
- uses: actions/setup-go@v3
with:
go-version: "1.16"
- uses: actions/checkout@v2.3.4
- uses: technote-space/get-diff-action@v4
go-version: "1.18"
- uses: actions/checkout@v3
- uses: technote-space/get-diff-action@v6
with:
PATTERNS: |
**/**.go
"!test/"
go.mod
go.sum
- name: install
run: make install install_abci
if: "env.GIT_DIFF != ''"
- uses: actions/cache@v2.1.6
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
if: env.GIT_DIFF
# Cache binaries for use by other jobs
- uses: actions/cache@v2.1.6
with:
path: ~/go/bin
key: ${{ runner.os }}-${{ github.sha }}-tm-binary
if: env.GIT_DIFF
test_abci_cli:
runs-on: ubuntu-latest
needs: build
timeout-minutes: 5
steps:
- uses: actions/setup-go@v2
with:
go-version: "1.16"
- uses: actions/checkout@v2.3.4
- uses: technote-space/get-diff-action@v4
with:
PATTERNS: |
**/**.go
go.mod
go.sum
- uses: actions/cache@v2.1.6
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
if: env.GIT_DIFF
- uses: actions/cache@v2.1.6
with:
path: ~/go/bin
key: ${{ runner.os }}-${{ github.sha }}-tm-binary
if: env.GIT_DIFF
- run: abci/tests/test_cli/test.sh
shell: bash
if: env.GIT_DIFF
test_apps:
runs-on: ubuntu-latest
needs: build
timeout-minutes: 5
steps:
- uses: actions/setup-go@v2
with:
go-version: "1.16"
- uses: actions/checkout@v2.3.4
- uses: technote-space/get-diff-action@v4
with:
PATTERNS: |
**/**.go
go.mod
go.sum
- uses: actions/cache@v2.1.6
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
if: env.GIT_DIFF
- uses: actions/cache@v2.1.6
with:
path: ~/go/bin
key: ${{ runner.os }}-${{ github.sha }}-tm-binary
if: env.GIT_DIFF
- name: test_apps
run: test/app/test.sh
shell: bash
Makefile
- name: Run Go Tests
run: |
make test-group-${{ matrix.part }} NUM_SPLIT=6
if: env.GIT_DIFF

9
.gitignore vendored
View File

@@ -25,6 +25,7 @@ docs/_build
docs/dist
docs/node_modules/
docs/spec
docs/.vuepress/public/rpc
index.html.md
libs/pubsub/query/fuzz_test/output
profile\.out
@@ -46,3 +47,11 @@ test/fuzz/**/corpus
test/fuzz/**/crashers
test/fuzz/**/suppressions
test/fuzz/**/*.zip
proto/spec/**/*.pb.go
*.aux
*.bbl
*.blg
*.log
*.pdf
*.gz
*.dvi

View File

@@ -1,32 +1,35 @@
linters:
enable:
- asciicheck
- bodyclose
- deadcode
- depguard
- dogsled
- dupl
- errcheck
- exportloopref
# - funlen
# - gochecknoglobals
# - gochecknoinits
# - gocognit
- goconst
- gocritic
# - gocritic
# - gocyclo
# - godox
- gofmt
- goimports
- golint
- revive
- gosec
- gosimple
- govet
- ineffassign
# - interfacer
- lll
- misspell
# - lll
# - maligned
- misspell
- nakedret
- nolintlint
- prealloc
- scopelint
- staticcheck
- structcheck
- stylecheck
@@ -37,18 +40,12 @@ linters:
- varcheck
# - whitespace
# - wsl
# - gocognit
- nolintlint
- asciicheck
issues:
exclude-rules:
- path: _test\.go
linters:
- gosec
- linters:
- lll
source: "https://"
max-same-issues: 50
linters-settings:

View File

@@ -29,8 +29,8 @@ release:
archives:
- files:
- LICENSE
- README.md
- UPGRADING.md
- SECURITY.md
- CHANGELOG.md
- LICENSE
- README.md
- UPGRADING.md
- SECURITY.md
- CHANGELOG.md

11
.markdownlint.yml Normal file
View File

@@ -0,0 +1,11 @@
default: true
MD001: false
MD007: {indent: 4}
MD013: false
MD024: {siblings_only: true}
MD025: false
MD033: false
MD036: false
MD010: false
MD012: false
MD028: false

6
.md-link-check.json Normal file
View File

@@ -0,0 +1,6 @@
{
"retryOn429": true,
"retryCount": 5,
"fallbackRetryDelay": "30s",
"aliveStatusCodes": [200, 206, 503]
}

View File

@@ -1,6 +1,466 @@
# Changelog
Friendly reminder, we have a [bug bounty program](https://hackerone.com/tendermint).
Friendly reminder: We have a [bug bounty program](https://hackerone.com/cosmos).
## v0.35.9
July 20, 2022
This release fixes a deadlock that could occur in some cases when using the
priority mempool with the ABCI socket client.
### BUG FIXES
- [mempool] [\#9030](https://github.com/tendermint/tendermint/pull/9030) rework lock discipline to mitigate callback deadlocks (@creachadair)
## v0.35.8
July 12, 2022
Special thanks to external contributors on this release: @joeabbey
This release fixes an unbounded heap growth issue in the implementation of the
priority mempool, as well as some configuration, logging, and peer dialing
improvements in the non-legacy p2p stack. It also adds a new opt-in
"simple-priority" value for the `p2p.queue-type` setting, that should improve
gossip performance for non-legacy peer networks.
### BREAKING CHANGES
- CLI/RPC/Config
- [node] [\#8902](https://github.com/tendermint/tendermint/pull/8902) Always start blocksync and avoid misconfiguration (@tychoish)
### FEATURES
- [cli] [\#8675](https://github.com/tendermint/tendermint/pull/8675) Add command to force compact goleveldb databases (@cmwaters)
### IMPROVEMENTS
- [p2p] [\#8914](https://github.com/tendermint/tendermint/pull/8914) [\#8875](https://github.com/tendermint/tendermint/pull/8875) Improvements to peer dialing (backported). (@tychoish)
- [p2p] [\#8820](https://github.com/tendermint/tendermint/pull/8820) add eviction metrics and cleanup dialing error handling (backport #8819) (@tychoish)
- [logging] [\#8896](https://github.com/tendermint/tendermint/pull/8896) Do not pre-process log results (backport #8895). (@tychoish)
- [p2p] [\#8956](https://github.com/tendermint/tendermint/pull/8956) Simpler priority queue (backport #8929). (@tychoish)
### BUG FIXES
- [mempool] [\#8944](https://github.com/tendermint/tendermint/pull/8944) Fix unbounded heap growth in the priority mempool. (@creachadair)
- [p2p] [\#8869](https://github.com/tendermint/tendermint/pull/8869) Set empty timeouts to configed values. (backport #8847). (@williambanfield)
## v0.35.7
June 16, 2022
### BUG FIXES
- [p2p] [\#8692](https://github.com/tendermint/tendermint/pull/8692) scale the number of stored peers by the configured maximum connections (#8684)
- [rpc] [\#8715](https://github.com/tendermint/tendermint/pull/8715) always close http bodies (backport #8712)
- [p2p] [\#8760](https://github.com/tendermint/tendermint/pull/8760) accept should not abort on first error (backport #8759)
### BREAKING CHANGES
- P2P Protocol
- [p2p] [\#8737](https://github.com/tendermint/tendermint/pull/8737) Introduce "inactive" peer label to avoid re-dialing incompatible peers. (@tychoish)
- [p2p] [\#8737](https://github.com/tendermint/tendermint/pull/8737) Increase frequency of dialing attempts to reduce latency for peer acquisition. (@tychoish)
- [p2p] [\#8737](https://github.com/tendermint/tendermint/pull/8737) Improvements to peer scoring and sorting to gossip a greater variety of peers during PEX. (@tychoish)
- [p2p] [\#8737](https://github.com/tendermint/tendermint/pull/8737) Track incoming and outgoing peers separately to ensure more peer slots open for incoming connections. (@tychoish)
## v0.35.6
June 3, 2022
### FEATURES
- [migrate] [\#8672](https://github.com/tendermint/tendermint/pull/8672) provide function for database production (backport #8614) (@tychoish)
### BUG FIXES
- [consensus] [\#8651](https://github.com/tendermint/tendermint/pull/8651) restructure peer catchup sleep (@tychoish)
- [pex] [\#8657](https://github.com/tendermint/tendermint/pull/8657) align max address thresholds (@cmwaters)
- [cmd] [\#8668](https://github.com/tendermint/tendermint/pull/8668) don't used global config for reset commands (@cmwaters)
- [p2p] [\#8681](https://github.com/tendermint/tendermint/pull/8681) shed peers from store from other networks (backport #8678) (@tychoish)
## v0.35.5
May 26, 2022
### BUG FIXES
- [p2p] [\#8371](https://github.com/tendermint/tendermint/pull/8371) fix setting in con-tracker (backport #8370) (@tychoish)
- [blocksync] [\#8496](https://github.com/tendermint/tendermint/pull/8496) validate block against state before persisting it to disk (@cmwaters)
- [statesync] [\#8494](https://github.com/tendermint/tendermint/pull/8494) avoid potential race (@tychoish)
- [keymigrate] [\#8467](https://github.com/tendermint/tendermint/pull/8467) improve filtering for legacy transaction hashes (backport #8466) (@creachadair)
- [rpc] [\#8594](https://github.com/tendermint/tendermint/pull/8594) fix encoding of block_results responses (@creachadair)
## v0.35.4
April 18, 2022
Special thanks to external contributors on this release: @firelizzard18
### FEATURES
- [cli] [\#8300](https://github.com/tendermint/tendermint/pull/8300) Add a tool to update old config files to the latest version [backport [\#8281](https://github.com/tendermint/tendermint/pull/8281)]. (@creachadair)
### IMPROVEMENTS
### BUG FIXES
- [cli] [\#8294](https://github.com/tendermint/tendermint/pull/8294) keymigrate: ensure block hash keys are correctly translated. (@creachadair)
- [cli] [\#8352](https://github.com/tendermint/tendermint/pull/8352) keymigrate: ensure transaction hash keys are correctly translated. (@creachadair)
## v0.35.3
April 8, 2022
### FEATURES
- [cli] [\#8081](https://github.com/tendermint/tendermint/pull/8081) add a safer-to-use `reset-state` command. (@marbar3778)
### IMPROVEMENTS
- [consensus] [\#8138](https://github.com/tendermint/tendermint/pull/8138) change lock handling in reactor and handleMsg for RoundState. (@williambanfield)
### BUG FIXES
- [cli] [\#8276](https://github.com/tendermint/tendermint/pull/8276) scmigrate: ensure target key is correctly renamed. (@creachadair)
## v0.35.2
February 28, 2022
Special thanks to external contributors on this release: @ashcherbakov, @yihuang, @waelsy123
### IMPROVEMENTS
- [consensus] [\#7875](https://github.com/tendermint/tendermint/pull/7875) additional timing metrics. (@williambanfield)
### BUG FIXES
- [abci] [\#7990](https://github.com/tendermint/tendermint/pull/7990) revert buffer limit change. (@williambanfield)
- [cli] [#7837](https://github.com/tendermint/tendermint/pull/7837) fix app hash in state rollback. (@yihuang)
- [cli] [\#7869](https://github.com/tendermint/tendermint/pull/7869) Update unsafe-reset-all command to match release v35. (waelsy123)
- [light] [\#7640](https://github.com/tendermint/tendermint/pull/7640) Light Client: fix absence proof verification (@ashcherbakov)
- [light] [\#7641](https://github.com/tendermint/tendermint/pull/7641) Light Client: fix querying against the latest height (@ashcherbakov)
- [mempool] [\#7718](https://github.com/tendermint/tendermint/pull/7718) return duplicate tx errors more consistently. (@tychoish)
- [rpc] [\#7744](https://github.com/tendermint/tendermint/pull/7744) fix layout of endpoint list. (@creachadair)
- [statesync] [\#7886](https://github.com/tendermint/tendermint/pull/7886) assert app version matches. (@cmwaters)
## v0.35.1
January 26, 2022
Special thanks to external contributors on this release: @altergui, @odeke-em,
@thanethomson
### BREAKING CHANGES
- CLI/RPC/Config
- [config] [\#7276](https://github.com/tendermint/tendermint/pull/7276) rpc: Add experimental config params to allow for subscription buffer size control (@thanethomson).
- P2P Protocol
- [p2p] [\#7265](https://github.com/tendermint/tendermint/pull/7265) Peer manager reduces peer score for each failed dial attempts for peers that have not successfully dialed. (@tychoish)
- [p2p] [\#7594](https://github.com/tendermint/tendermint/pull/7594) always advertise self, to enable mutual address discovery. (@altergui)
### FEATURES
- [rpc] [\#7270](https://github.com/tendermint/tendermint/pull/7270) Add `header` and `header_by_hash` RPC Client queries. (@fedekunze) (@cmwaters)
### IMPROVEMENTS
- [internal/protoio] [\#7325](https://github.com/tendermint/tendermint/pull/7325) Optimized `MarshalDelimited` by inlining the common case and using a `sync.Pool` in the worst case. (@odeke-em)
- [\#7338](https://github.com/tendermint/tendermint/pull/7338) pubsub: Performance improvements for the event query API (backport of #7319) (@creachadair)
- [\#7252](https://github.com/tendermint/tendermint/pull/7252) Add basic metrics to the indexer package. (@creachadair)
- [\#7338](https://github.com/tendermint/tendermint/pull/7338) Performance improvements for the event query API. (@creachadair)
### BUG FIXES
- [\#7310](https://github.com/tendermint/tendermint/issues/7310) pubsub: Report a non-nil error when shutting down (fixes #7306).
- [\#7355](https://github.com/tendermint/tendermint/pull/7355) Fix incorrect tests using the PSQL sink. (@creachadair)
- [\#7683](https://github.com/tendermint/tendermint/pull/7683) rpc: check error code for broadcast_tx_commit. (@tychoish)
## v0.35.0
November 4, 2021
Special thanks to external contributors on this release: @JayT106,
@bipulprasad, @alessio, @Yawning, @silasdavis, @cuonglm, @tanyabouman,
@JoeKash, @githubsands, @jeebster, @crypto-facs, @liamsi, and @gotjoshua
### FEATURES
- [cli] [#7033](https://github.com/tendermint/tendermint/pull/7033) Add a `rollback` command to rollback to the previous tendermint state in the event of an incorrect app hash. (@cmwaters)
- [config] [\#7174](https://github.com/tendermint/tendermint/pull/7174) expose ability to write config to arbitrary paths. (@tychoish)
- [mempool, rpc] [\#7065](https://github.com/tendermint/tendermint/pull/7065) add removetx rpc method (backport of #7047) (@tychoish).
- [\#6982](https://github.com/tendermint/tendermint/pull/6982) tendermint binary has built-in suppport for running the e2e application (with state sync support) (@cmwaters).
- [config] Add `--mode` flag and config variable. See [ADR-52](https://github.com/tendermint/tendermint/blob/master/docs/architecture/adr-052-tendermint-mode.md) @dongsam
- [rpc] [\#6329](https://github.com/tendermint/tendermint/pull/6329) Don't cap page size in unsafe mode (@gotjoshua, @cmwaters)
- [pex] [\#6305](https://github.com/tendermint/tendermint/pull/6305) v2 pex reactor with backwards compatability. Introduces two new pex messages to
accomodate for the new p2p stack. Removes the notion of seeds and crawling. All peer
exchange reactors behave the same. (@cmwaters)
- [crypto] [\#6376](https://github.com/tendermint/tendermint/pull/6376) Enable sr25519 as a validator key type
- [mempool] [\#6466](https://github.com/tendermint/tendermint/pull/6466) Introduction of a prioritized mempool. (@alexanderbez)
- `Priority` and `Sender` have been introduced into the `ResponseCheckTx` type, where the `priority` will determine the prioritization of
the transaction when a proposer reaps transactions for a block proposal. The `sender` field acts as an index.
- Operators may toggle between the legacy mempool reactor, `v0`, and the new prioritized reactor, `v1`, by setting the
`mempool.version` configuration, where `v1` is the default configuration.
- Applications that do not specify a priority, i.e. zero, will have transactions reaped by the order in which they are received by the node.
- Transactions are gossiped in FIFO order as they are in `v0`.
- [config/indexer] [\#6411](https://github.com/tendermint/tendermint/pull/6411) Introduce support for custom event indexing data sources, specifically PostgreSQL. (@JayT106)
- [blocksync/event] [\#6619](https://github.com/tendermint/tendermint/pull/6619) Emit blocksync status event when switching consensus/blocksync (@JayT106)
- [statesync/event] [\#6700](https://github.com/tendermint/tendermint/pull/6700) Emit statesync status start/end event (@JayT106)
- [inspect] [\#6785](https://github.com/tendermint/tendermint/pull/6785) Add a new `inspect` command for introspecting the state and block store of a crashed tendermint node. (@williambanfield)
### BUG FIXES
- [\#7106](https://github.com/tendermint/tendermint/pull/7106) Revert mutex change to ABCI Clients (@tychoish).
- [\#7142](https://github.com/tendermint/tendermint/pull/7142) mempool: remove panic when recheck-tx was not sent to ABCI application (@williambanfield).
- [consensus]: [\#7060](https://github.com/tendermint/tendermint/pull/7060) <!-- markdown-link-check-disable-line -->
wait until peerUpdates channel is closed to close remaining peers (@williambanfield)
- [privval] [\#5638](https://github.com/tendermint/tendermint/pull/5638) Increase read/write timeout to 5s and calculate ping interval based on it (@JoeKash)
- [evidence] [\#6375](https://github.com/tendermint/tendermint/pull/6375) Fix bug with inconsistent LightClientAttackEvidence hashing (cmwaters)
- [rpc] [\#6507](https://github.com/tendermint/tendermint/pull/6507) Ensure RPC client can handle URLs without ports (@JayT106)
- [statesync] [\#6463](https://github.com/tendermint/tendermint/pull/6463) Adds Reverse Sync feature to fetch historical light blocks after state sync in order to verify any evidence (@cmwaters)
- [blocksync] [\#6590](https://github.com/tendermint/tendermint/pull/6590) Update the metrics during blocksync (@JayT106)
### BREAKING CHANGES
- Go API
- [crypto/armor]: [\#6963](https://github.com/tendermint/tendermint/pull/6963) remove package which is unused, and based on
deprecated fundamentals. Downstream users should maintain this
library. (@tychoish)
- [state] [store] [proxy] [rpc/core]: [\#6937](https://github.com/tendermint/tendermint/pull/6937) move packages to
`internal` to prevent consumption of these internal APIs by
external users. (@tychoish)
- [pubsub] [\#6634](https://github.com/tendermint/tendermint/pull/6634) The `Query#Matches` method along with other pubsub methods, now accepts a `[]abci.Event` instead of `map[string][]string`. (@alexanderbez)
- [p2p] [\#6618](https://github.com/tendermint/tendermint/pull/6618) [\#6583](https://github.com/tendermint/tendermint/pull/6583) Move `p2p.NodeInfo`, `p2p.NodeID` and `p2p.NetAddress` into `types` to support use in external packages. (@tychoish)
- [node] [\#6540](https://github.com/tendermint/tendermint/pull/6540) Reduce surface area of the `node` package by making most of the implementation details private. (@tychoish)
- [p2p] [\#6547](https://github.com/tendermint/tendermint/pull/6547) Move the entire `p2p` package and all reactor implementations into `internal`. (@tychoish)
- [libs/log] [\#6534](https://github.com/tendermint/tendermint/pull/6534) Remove the existing custom Tendermint logger backed by go-kit. The logging interface, `Logger`, remains. Tendermint still provides a default logger backed by the performant zerolog logger. (@alexanderbez)
- [libs/time] [\#6495](https://github.com/tendermint/tendermint/pull/6495) Move types/time to libs/time to improve consistency. (@tychoish)
- [mempool] [\#6529](https://github.com/tendermint/tendermint/pull/6529) The `Context` field has been removed from the `TxInfo` type. `CheckTx` now requires a `Context` argument. (@alexanderbez)
- [abci/client, proxy] [\#5673](https://github.com/tendermint/tendermint/pull/5673) `Async` funcs return an error, `Sync` and `Async` funcs accept `context.Context` (@melekes)
- [p2p] Remove unused function `MakePoWTarget`. (@erikgrinaker)
- [libs/bits] [\#5720](https://github.com/tendermint/tendermint/pull/5720) Validate `BitArray` in `FromProto`, which now returns an error (@melekes)
- [proto/p2p] Rename `DefaultNodeInfo` and `DefaultNodeInfoOther` to `NodeInfo` and `NodeInfoOther` (@erikgrinaker)
- [proto/p2p] Rename `NodeInfo.default_node_id` to `node_id` (@erikgrinaker)
- [libs/os] Kill() and {Must,}{Read,Write}File() functions have been removed. (@alessio)
- [store] [\#5848](https://github.com/tendermint/tendermint/pull/5848) Remove block store state in favor of using the db iterators directly (@cmwaters)
- [state] [\#5864](https://github.com/tendermint/tendermint/pull/5864) Use an iterator when pruning state (@cmwaters)
- [types] [\#6023](https://github.com/tendermint/tendermint/pull/6023) Remove `tm2pb.Header`, `tm2pb.BlockID`, `tm2pb.PartSetHeader` and `tm2pb.NewValidatorUpdate`.
- Each of the above types has a `ToProto` and `FromProto` method or function which replaced this logic.
- [light] [\#6054](https://github.com/tendermint/tendermint/pull/6054) Move `MaxRetryAttempt` option from client to provider.
- `NewWithOptions` now sets the max retry attempts and timeouts (@cmwaters)
- [all] [\#6077](https://github.com/tendermint/tendermint/pull/6077) Change spelling from British English to American (@cmwaters)
- Rename "Subscription.Cancelled()" to "Subscription.Canceled()" in libs/pubsub
- Rename "behaviour" pkg to "behavior" and internalized it in blocksync v2
- [rpc/client/http] [\#6176](https://github.com/tendermint/tendermint/pull/6176) Remove `endpoint` arg from `New`, `NewWithTimeout` and `NewWithClient` (@melekes)
- [rpc/client/http] [\#6176](https://github.com/tendermint/tendermint/pull/6176) Unexpose `WSEvents` (@melekes)
- [rpc/jsonrpc/client/ws_client] [\#6176](https://github.com/tendermint/tendermint/pull/6176) `NewWS` no longer accepts options (use `NewWSWithOptions` and `OnReconnect` funcs to configure the client) (@melekes)
- [internal/libs] [\#6366](https://github.com/tendermint/tendermint/pull/6366) Move `autofile`, `clist`,`fail`,`flowrate`, `protoio`, `sync`, `tempfile`, `test` and `timer` lib packages to an internal folder
- [libs/rand] [\#6364](https://github.com/tendermint/tendermint/pull/6364) Remove most of libs/rand in favour of standard lib's `math/rand` (@liamsi)
- [mempool] [\#6466](https://github.com/tendermint/tendermint/pull/6466) The original mempool reactor has been versioned as `v0` and moved to a sub-package under the root `mempool` package.
Some core types have been kept in the `mempool` package such as `TxCache` and it's implementations, the `Mempool` interface itself
and `TxInfo`. (@alexanderbez)
- [crypto/sr25519] [\#6526](https://github.com/tendermint/tendermint/pull/6526) Do not re-execute the Ed25519-style key derivation step when doing signing and verification. The derivation is now done once and only once. This breaks `sr25519.GenPrivKeyFromSecret` output compatibility. (@Yawning)
- [types] [\#6627](https://github.com/tendermint/tendermint/pull/6627) Move `NodeKey` to types to make the type public.
- [config] [\#6627](https://github.com/tendermint/tendermint/pull/6627) Extend `config` to contain methods `LoadNodeKeyID` and `LoadorGenNodeKeyID`
- [blocksync] [\#6755](https://github.com/tendermint/tendermint/pull/6755) Rename `FastSync` and `Blockchain` package to `BlockSync` (@cmwaters)
- CLI/RPC/Config
- [pubsub/events] [\#6634](https://github.com/tendermint/tendermint/pull/6634) The `ResultEvent.Events` field is now of type `[]abci.Event` preserving event order instead of `map[string][]string`. (@alexanderbez)
- [config] [\#5598](https://github.com/tendermint/tendermint/pull/5598) The `test_fuzz` and `test_fuzz_config` P2P settings have been removed. (@erikgrinaker)
- [config] [\#5728](https://github.com/tendermint/tendermint/pull/5728) `fastsync.version = "v1"` is no longer supported (@melekes)
- [cli] [\#5772](https://github.com/tendermint/tendermint/pull/5772) `gen_node_key` prints JSON-encoded `NodeKey` rather than ID and does not save it to `node_key.json` (@melekes)
- [cli] [\#5777](https://github.com/tendermint/tendermint/pull/5777) use hyphen-case instead of snake_case for all cli commands and config parameters (@cmwaters)
- [rpc] [\#6019](https://github.com/tendermint/tendermint/pull/6019) standardise RPC errors and return the correct status code (@bipulprasad & @cmwaters)
- [rpc] [\#6168](https://github.com/tendermint/tendermint/pull/6168) Change default sorting to desc for `/tx_search` results (@melekes)
- [cli] [\#6282](https://github.com/tendermint/tendermint/pull/6282) User must specify the node mode when using `tendermint init` (@cmwaters)
- [state/indexer] [\#6382](https://github.com/tendermint/tendermint/pull/6382) reconstruct indexer, move txindex into the indexer package (@JayT106)
- [cli] [\#6372](https://github.com/tendermint/tendermint/pull/6372) Introduce `BootstrapPeers` as part of the new p2p stack. Peers to be connected on startup (@cmwaters)
- [config] [\#6462](https://github.com/tendermint/tendermint/pull/6462) Move `PrivValidator` configuration out of `BaseConfig` into its own section. (@tychoish)
- [rpc] [\#6610](https://github.com/tendermint/tendermint/pull/6610) Add MaxPeerBlockHeight into /status rpc call (@JayT106)
- [blocksync/rpc] [\#6620](https://github.com/tendermint/tendermint/pull/6620) Add TotalSyncedTime & RemainingTime to SyncInfo in /status RPC (@JayT106)
- [rpc/grpc] [\#6725](https://github.com/tendermint/tendermint/pull/6725) Mark gRPC in the RPC layer as deprecated.
- [blocksync/v2] [\#6730](https://github.com/tendermint/tendermint/pull/6730) Fast Sync v2 is deprecated, please use v0
- [rpc] Add genesis_chunked method to support paginated and parallel fetching of large genesis documents.
- [rpc/jsonrpc/server] [\#6785](https://github.com/tendermint/tendermint/pull/6785) `Listen` function updated to take an `int` argument, `maxOpenConnections`, instead of an entire config object. (@williambanfield)
- [rpc] [\#6820](https://github.com/tendermint/tendermint/pull/6820) Update RPC methods to reflect changes in the p2p layer, disabling support for `UnsafeDialPeers` and `UnsafeDialPeers` when used with the new p2p layer, and changing the response format of the peer list in `NetInfo` for all users.
- [cli] [\#6854](https://github.com/tendermint/tendermint/pull/6854) Remove deprecated snake case commands. (@tychoish)
- [tools] [\#6498](https://github.com/tendermint/tendermint/pull/6498) Set OS home dir to instead of the hardcoded PATH. (@JayT106)
- [cli/indexer] [\#6676](https://github.com/tendermint/tendermint/pull/6676) Reindex events command line tooling. (@JayT106)
- Apps
- [ABCI] [\#6408](https://github.com/tendermint/tendermint/pull/6408) Change the `key` and `value` fields from `[]byte` to `string` in the `EventAttribute` type. (@alexanderbez)
- [ABCI] [\#5447](https://github.com/tendermint/tendermint/pull/5447) Remove `SetOption` method from `ABCI.Client` interface
- [ABCI] [\#5447](https://github.com/tendermint/tendermint/pull/5447) Reset `Oneof` indexes for `Request` and `Response`.
- [ABCI] [\#5818](https://github.com/tendermint/tendermint/pull/5818) Use protoio for msg length delimitation. Migrates from int64 to uint64 length delimiters.
- [ABCI] [\#3546](https://github.com/tendermint/tendermint/pull/3546) Add `mempool_error` field to `ResponseCheckTx`. This field will contain an error string if Tendermint encountered an error while adding a transaction to the mempool. (@williambanfield)
- [Version] [\#6494](https://github.com/tendermint/tendermint/pull/6494) `TMCoreSemVer` has been renamed to `TMVersion`.
- It is not required any longer to set ldflags to set version strings
- [abci/counter] [\#6684](https://github.com/tendermint/tendermint/pull/6684) Delete counter example app
- Data Storage
- [store/state/evidence/light] [\#5771](https://github.com/tendermint/tendermint/pull/5771) Use an order-preserving varint key encoding (@cmwaters)
- [mempool] [\#6396](https://github.com/tendermint/tendermint/pull/6396) Remove mempool's write ahead log (WAL), (previously unused by the tendermint code). (@tychoish)
- [state] [\#6541](https://github.com/tendermint/tendermint/pull/6541) Move pruneBlocks from consensus/state to state/execution. (@JayT106)
### IMPROVEMENTS
- [libs/log] Console log formatting changes as a result of [\#6534](https://github.com/tendermint/tendermint/pull/6534) and [\#6589](https://github.com/tendermint/tendermint/pull/6589). (@tychoish)
- [statesync] [\#6566](https://github.com/tendermint/tendermint/pull/6566) Allow state sync fetchers and request timeout to be configurable. (@alexanderbez)
- [types] [\#6478](https://github.com/tendermint/tendermint/pull/6478) Add `block_id` to `newblock` event (@jeebster)
- [crypto/ed25519] [\#5632](https://github.com/tendermint/tendermint/pull/5632) Adopt zip215 `ed25519` verification. (@marbar3778)
- [crypto/ed25519] [\#6526](https://github.com/tendermint/tendermint/pull/6526) Use [curve25519-voi](https://github.com/oasisprotocol/curve25519-voi) for `ed25519` signing and verification. (@Yawning)
- [crypto/sr25519] [\#6526](https://github.com/tendermint/tendermint/pull/6526) Use [curve25519-voi](https://github.com/oasisprotocol/curve25519-voi) for `sr25519` signing and verification. (@Yawning)
- [privval] [\#5603](https://github.com/tendermint/tendermint/pull/5603) Add `--key` to `init`, `gen_validator`, `testnet` & `unsafe_reset_priv_validator` for use in generating `secp256k1` keys.
- [privval] [\#5725](https://github.com/tendermint/tendermint/pull/5725) Add gRPC support to private validator.
- [privval] [\#5876](https://github.com/tendermint/tendermint/pull/5876) `tendermint show-validator` will query the remote signer if gRPC is being used (@marbar3778)
- [abci/client] [\#5673](https://github.com/tendermint/tendermint/pull/5673) `Async` requests return an error if queue is full (@melekes)
- [mempool] [\#5673](https://github.com/tendermint/tendermint/pull/5673) Cancel `CheckTx` requests if RPC client disconnects or times out (@melekes)
- [abci] [\#5706](https://github.com/tendermint/tendermint/pull/5706) Added `AbciVersion` to `RequestInfo` allowing applications to check ABCI version when connecting to Tendermint. (@marbar3778)
- [blocksync/v1] [\#5728](https://github.com/tendermint/tendermint/pull/5728) Remove blocksync v1 (@melekes)
- [blocksync/v0] [\#5741](https://github.com/tendermint/tendermint/pull/5741) Relax termination conditions and increase sync timeout (@melekes)
- [cli] [\#5772](https://github.com/tendermint/tendermint/pull/5772) `gen_node_key` output now contains node ID (`id` field) (@melekes)
- [blocksync/v2] [\#5774](https://github.com/tendermint/tendermint/pull/5774) Send status request when new peer joins (@melekes)
- [store] [\#5888](https://github.com/tendermint/tendermint/pull/5888) store.SaveBlock saves using batches instead of transactions for now to improve ACID properties. This is a quick fix for underlying issues around tm-db and ACID guarantees. (@githubsands)
- [consensus] [\#5987](https://github.com/tendermint/tendermint/pull/5987) and [\#5792](https://github.com/tendermint/tendermint/pull/5792) Remove the `time_iota_ms` consensus parameter. Merge `tmproto.ConsensusParams` and `abci.ConsensusParams`. (@marbar3778, @valardragon)
- [types] [\#5994](https://github.com/tendermint/tendermint/pull/5994) Reduce the use of protobuf types in core logic. (@marbar3778)
- `ConsensusParams`, `BlockParams`, `ValidatorParams`, `EvidenceParams`, `VersionParams`, `sm.Version` and `version.Consensus` have become native types. They still utilize protobuf when being sent over the wire or written to disk.
- [rpc/client/http] [\#6163](https://github.com/tendermint/tendermint/pull/6163) Do not drop events even if the `out` channel is full (@melekes)
- [node] [\#6059](https://github.com/tendermint/tendermint/pull/6059) Validate and complete genesis doc before saving to state store (@silasdavis)
- [state] [\#6067](https://github.com/tendermint/tendermint/pull/6067) Batch save state data (@githubsands & @cmwaters)
- [crypto] [\#6120](https://github.com/tendermint/tendermint/pull/6120) Implement batch verification interface for ed25519 and sr25519. (@marbar3778)
- [types] [\#6120](https://github.com/tendermint/tendermint/pull/6120) use batch verification for verifying commits signatures.
- If the key type supports the batch verification API it will try to batch verify. If the verification fails we will single verify each signature.
- [privval/file] [\#6185](https://github.com/tendermint/tendermint/pull/6185) Return error on `LoadFilePV`, `LoadFilePVEmptyState`. Allows for better programmatic control of Tendermint.
- [privval] [\#6240](https://github.com/tendermint/tendermint/pull/6240) Add `context.Context` to privval interface.
- [rpc] [\#6265](https://github.com/tendermint/tendermint/pull/6265) set cache control in http-rpc response header (@JayT106)
- [statesync] [\#6378](https://github.com/tendermint/tendermint/pull/6378) Retry requests for snapshots and add a minimum discovery time (5s) for new snapshots.
- [node/state] [\#6370](https://github.com/tendermint/tendermint/pull/6370) graceful shutdown in the consensus reactor (@JayT106)
- [crypto/merkle] [\#6443](https://github.com/tendermint/tendermint/pull/6443) Improve HashAlternatives performance (@cuonglm)
- [crypto/merkle] [\#6513](https://github.com/tendermint/tendermint/pull/6513) Optimize HashAlternatives (@marbar3778)
- [p2p/pex] [\#6509](https://github.com/tendermint/tendermint/pull/6509) Improve addrBook.hash performance (@cuonglm)
- [consensus/metrics] [\#6549](https://github.com/tendermint/tendermint/pull/6549) Change block_size gauge to a histogram for better observability over time (@marbar3778)
- [statesync] [\#6587](https://github.com/tendermint/tendermint/pull/6587) Increase chunk priority and re-request chunks that don't arrive (@cmwaters)
- [state/privval] [\#6578](https://github.com/tendermint/tendermint/pull/6578) No GetPubKey retry beyond the proposal/voting window (@JayT106)
- [rpc] [\#6615](https://github.com/tendermint/tendermint/pull/6615) Add TotalGasUsed to block_results response (@crypto-facs)
- [cmd/tendermint/commands] [\#6623](https://github.com/tendermint/tendermint/pull/6623) replace `$HOME/.some/test/dir` with `t.TempDir` (@tanyabouman)
- [statesync] \6807 Implement P2P state provider as an alternative to RPC (@cmwaters)
## v0.34.19
### BUG FIXES
- [cli] [\#8270](https://github.com/tendermint/tendermint/issues/8270) fix reset commands (@alexanderbez).
## v0.34.18
### BREAKING CHANGES
- CLI/RPC/Config
- [cli] [\#8258](https://github.com/tendermint/tendermint/pull/8258) Fix a bug in the cli that caused `unsafe-reset-all` to panic
## v0.34.17
### BREAKING CHANGES
- CLI/RPC/Config
- [cli] [\#8081](https://github.com/tendermint/tendermint/issues/8081) make the reset command safe to use (@marbar3778).
### BUG FIXES
- [consensus] [\#8079](https://github.com/tendermint/tendermint/issues/8079) start the timeout ticker before relay (backport #7844) (@creachadair).
- [consensus] [\#7992](https://github.com/tendermint/tendermint/issues/7992) [\#7994](https://github.com/tendermint/tendermint/issues/7994) change lock handling in handleMsg and reactor to alleviate issues gossiping during long ABCI calls (@williambanfield).
## v0.34.16
Special thanks to external contributors on this release: @yihuang
### BUG FIXES
- [consensus] [\#7617](https://github.com/tendermint/tendermint/issues/7617) calculate prevote message delay metric (backport #7551) (@williambanfield).
- [consensus] [\#7631](https://github.com/tendermint/tendermint/issues/7631) check proposal non-nil in prevote message delay metric (backport #7625) (@williambanfield).
- [statesync] [\#7885](https://github.com/tendermint/tendermint/issues/7885) statesync: assert app version matches (backport #7856) (@cmwaters).
- [statesync] [\#7881](https://github.com/tendermint/tendermint/issues/7881) fix app hash in state rollback (backport #7837) (@cmwaters).
- [cli] [#7837](https://github.com/tendermint/tendermint/pull/7837) fix app hash in state rollback. (@yihuang).
## v0.34.15
Special thanks to external contributors on this release: @thanethomson
### BUG FIXES
- [\#7368](https://github.com/tendermint/tendermint/issues/7368) cmd: add integration test for rollback functionality (@cmwaters).
- [\#7309](https://github.com/tendermint/tendermint/issues/7309) pubsub: Report a non-nil error when shutting down (fixes #7306).
- [\#7057](https://github.com/tendermint/tendermint/pull/7057) Import Postgres driver support for the psql indexer (@creachadair).
- [\#7106](https://github.com/tendermint/tendermint/pull/7106) Revert mutex change to ABCI Clients (@tychoish).
### IMPROVEMENTS
- [config] [\#7230](https://github.com/tendermint/tendermint/issues/7230) rpc: Add experimental config params to allow for subscription buffer size control (@thanethomson).
## v0.34.14
This release backports the `rollback` feature to allow recovery in the event of an incorrect app hash.
### FEATURES
- [\#6982](https://github.com/tendermint/tendermint/pull/6982) The tendermint binary now has built-in suppport for running the end-to-end test application (with state sync support) (@cmwaters).
- [cli] [#7033](https://github.com/tendermint/tendermint/pull/7033) Add a `rollback` command to rollback to the previous tendermint state. This may be useful in the event of non-determinstic app hash or when reverting an upgrade. @cmwaters
### IMPROVEMENTS
- [\#7103](https://github.com/tendermint/tendermint/pull/7104) Remove IAVL dependency (backport of #6550) (@cmwaters)
### BUG FIXES
- [\#7057](https://github.com/tendermint/tendermint/pull/7057) Import Postgres driver support for the psql indexer (@creachadair).
- [ABCI] [\#7110](https://github.com/tendermint/tendermint/issues/7110) Revert "change client to use multi-reader mutexes (#6873)" (@tychoish).
## v0.34.13
*September 6, 2021*
This release backports improvements to state synchronization and ABCI
performance under concurrent load, and the PostgreSQL event indexer.
### IMPROVEMENTS
- [statesync] [\#6881](https://github.com/tendermint/tendermint/issues/6881) improvements to stateprovider logic (@cmwaters)
- [ABCI] [\#6873](https://github.com/tendermint/tendermint/issues/6873) change client to use multi-reader mutexes (@tychoish)
- [indexing] [\#6906](https://github.com/tendermint/tendermint/issues/6906) enable the PostgreSQL indexer sink (@creachadair)
## v0.34.12
*August 17, 2021*
Special thanks to external contributors on this release: @JayT106.
### FEATURES
- [rpc] [\#6717](https://github.com/tendermint/tendermint/pull/6717) introduce
`/genesis_chunked` rpc endpoint for handling large genesis files by chunking them (@tychoish)
### IMPROVEMENTS
- [rpc] [\#6825](https://github.com/tendermint/tendermint/issues/6825) Remove egregious INFO log from `ABCI#Query` RPC. (@alexanderbez)
### BUG FIXES
- [light] [\#6685](https://github.com/tendermint/tendermint/pull/6685) fix bug
with incorrectly handling contexts that would occasionally freeze state sync. (@cmwaters)
- [privval] [\#6748](https://github.com/tendermint/tendermint/issues/6748) Fix vote timestamp to prevent chain halt (@JayT106)
## v0.34.11
@@ -12,25 +472,25 @@ adding two new parameters to the state sync config.
### BREAKING CHANGES
- Apps
- [Version] \#6494 `TMCoreSemVer` is not required to be set as a ldflag any longer.
- [Version] [\#6494](https://github.com/tendermint/tendermint/pull/6494) `TMCoreSemVer` is not required to be set as a ldflag any longer.
### IMPROVEMENTS
- [statesync] \#6566 Allow state sync fetchers and request timeout to be configurable. (@alexanderbez)
- [statesync] \#6378 Retry requests for snapshots and add a minimum discovery time (5s) for new snapshots. (@tychoish)
- [statesync] \#6582 Increase chunk priority and add multiple retry chunk requests (@cmwaters)
- [statesync] [\#6566](https://github.com/tendermint/tendermint/pull/6566) Allow state sync fetchers and request timeout to be configurable. (@alexanderbez)
- [statesync] [\#6378](https://github.com/tendermint/tendermint/pull/6378) Retry requests for snapshots and add a minimum discovery time (5s) for new snapshots. (@tychoish)
- [statesync] [\#6582](https://github.com/tendermint/tendermint/pull/6582) Increase chunk priority and add multiple retry chunk requests (@cmwaters)
### BUG FIXES
- [evidence] \#6375 Fix bug with inconsistent LightClientAttackEvidence hashing (@cmwaters)
- [evidence] [\#6375](https://github.com/tendermint/tendermint/pull/6375) Fix bug with inconsistent LightClientAttackEvidence hashing (@cmwaters)
## v0.34.10
*April 14, 2021*
This release fixes a bug where peers would sometimes try to send messages
This release fixes a bug where peers would sometimes try to send messages
on incorrect channels. Special thanks to our friends at Oasis Labs for surfacing
this issue!
this issue!
- [p2p/node] [\#6339](https://github.com/tendermint/tendermint/issues/6339) Fix bug with using custom channels (@cmwaters)
- [light] [\#6346](https://github.com/tendermint/tendermint/issues/6346) Correctly handle too high errors to improve client robustness (@cmwaters)
@@ -39,7 +499,7 @@ this issue!
*April 8, 2021*
This release fixes a moderate severity security issue, Security Advisory Alderfly,
This release fixes a moderate severity security issue, Security Advisory Alderfly,
which impacts all networks that rely on Tendermint light clients.
Further details will be released once networks have upgraded.
@@ -112,7 +572,7 @@ shout-out to @marbar3778 for diagnosing it quickly.
## v0.34.6
*February 18, 2021*
*February 18, 2021*
_Tendermint Core v0.34.5 and v0.34.6 have been recalled due to release tooling problems._
@@ -120,9 +580,9 @@ _Tendermint Core v0.34.5 and v0.34.6 have been recalled due to release tooling p
*February 11, 2021*
This release includes a fix for a memory leak in the evidence reactor (see #6068, below).
All Tendermint clients are recommended to upgrade.
Thank you to our friends at Crypto.com for the initial report of this memory leak!
This release includes a fix for a memory leak in the evidence reactor (see #6068, below).
All Tendermint clients are recommended to upgrade.
Thank you to our friends at Crypto.com for the initial report of this memory leak!
Special thanks to other external contributors on this release: @yayajacky, @odidev, @laniehei, and @c29r3!
@@ -132,17 +592,17 @@ Special thanks to other external contributors on this release: @yayajacky, @odid
- [light] [\#6026](https://github.com/tendermint/tendermint/pull/6026) Fix a bug when height isn't provided for the rpc calls: `/commit` and `/validators` (@cmwaters)
- [evidence] [\#6068](https://github.com/tendermint/tendermint/pull/6068) Terminate broadcastEvidenceRoutine when peer is stopped (@melekes)
## v0.34.3
## v0.34.3
*January 19, 2021*
This release includes a fix for a high-severity security vulnerability,
This release includes a fix for a high-severity security vulnerability,
a DoS-vector that impacted Tendermint Core v0.34.0-v0.34.2. For more details, see
[Security Advisory Mulberry](https://github.com/tendermint/tendermint/security/advisories/GHSA-p658-8693-mhvg)
or https://nvd.nist.gov/vuln/detail/CVE-2021-21271.
[Security Advisory Mulberry](https://github.com/tendermint/tendermint/security/advisories/GHSA-p658-8693-mhvg)
or https://nvd.nist.gov/vuln/detail/CVE-2021-21271.
Tendermint Core v0.34.3 also updates GoGo Protobuf to 1.3.2 in order to pick up the fix for
https://nvd.nist.gov/vuln/detail/CVE-2021-3121.
https://nvd.nist.gov/vuln/detail/CVE-2021-3121.
### BUG FIXES
@@ -234,14 +694,14 @@ Special thanks to external contributors on this release: @james-ray, @fedekunze,
- [blockchain] [\#4637](https://github.com/tendermint/tendermint/pull/4637) Migrate blockchain reactor(s) to Protobuf encoding (@marbar3778)
- [evidence] [\#4949](https://github.com/tendermint/tendermint/pull/4949) Migrate evidence reactor to Protobuf encoding (@marbar3778)
- [mempool] [\#4940](https://github.com/tendermint/tendermint/pull/4940) Migrate mempool from to Protobuf encoding (@marbar3778)
- [mempool] [\#5321](https://github.com/tendermint/tendermint/pull/5321) Batch transactions when broadcasting them to peers (@melekes)
- [mempool] [\#5321](https://github.com/tendermint/tendermint/pull/5321) Batch transactions when broadcasting them to peers (@melekes)
- `MaxBatchBytes` new config setting defines the max size of one batch.
- [p2p/pex] [\#4973](https://github.com/tendermint/tendermint/pull/4973) Migrate `p2p/pex` reactor to Protobuf encoding (@marbar3778)
- [statesync] [\#4943](https://github.com/tendermint/tendermint/pull/4943) Migrate state sync reactor to Protobuf encoding (@marbar3778)
- Blockchain Protocol
- [evidence] [\#4725](https://github.com/tendermint/tendermint/pull/4725) Remove `Pubkey` from `DuplicateVoteEvidence` (@marbar3778)
- [evidence] [\#4725](https://github.com/tendermint/tendermint/pull/4725) Remove `Pubkey` from `DuplicateVoteEvidence` (@marbar3778)
- [evidence] [\#5499](https://github.com/tendermint/tendermint/pull/5449) Cap evidence to a maximum number of bytes (supercedes [\#4780](https://github.com/tendermint/tendermint/pull/4780)) (@cmwaters)
- [merkle] [\#5193](https://github.com/tendermint/tendermint/pull/5193) Header hashes are no longer empty for empty inputs, notably `DataHash`, `EvidenceHash`, and `LastResultsHash` (@erikgrinaker)
- [state] [\#4845](https://github.com/tendermint/tendermint/pull/4845) Include `GasWanted` and `GasUsed` into `LastResultsHash` (@melekes)
@@ -287,7 +747,7 @@ Special thanks to external contributors on this release: @james-ray, @fedekunze,
- [light] [\#5347](https://github.com/tendermint/tendermint/pull/5347) `NewClient`, `NewHTTPClient`, `VerifyHeader` and `VerifyLightBlockAtHeight` now accept `context.Context` as 1st param (@melekes)
- [merkle] [\#5193](https://github.com/tendermint/tendermint/pull/5193) `HashFromByteSlices` and `ProofsFromByteSlices` now return a hash for empty inputs, following RFC6962 (@erikgrinaker)
- [proto] [\#5025](https://github.com/tendermint/tendermint/pull/5025) All proto files have been moved to `/proto` directory. (@marbar3778)
- Using the recommended the file layout from buf, [see here for more info](https://buf.build/docs/lint-checkers#file_layout)
- Using the recommended the file layout from buf, [see here for more info](https://docs.buf.build/lint/rules) <!-- markdown-link-check-disable-line -->
- [rpc/client] [\#4947](https://github.com/tendermint/tendermint/pull/4947) `Validators`, `TxSearch` `page`/`per_page` params become pointers (@melekes)
- `UnconfirmedTxs` `limit` param is a pointer
- [rpc/jsonrpc/server] [\#5141](https://github.com/tendermint/tendermint/pull/5141) Remove `WriteRPCResponseArrayHTTP` (use `WriteRPCResponseHTTP` instead) (@melekes)
@@ -300,7 +760,7 @@ Special thanks to external contributors on this release: @james-ray, @fedekunze,
- [types] [\#4852](https://github.com/tendermint/tendermint/pull/4852) Vote & Proposal `SignBytes` is now func `VoteSignBytes` & `ProposalSignBytes` (@marbar3778)
- [types] [\#4798](https://github.com/tendermint/tendermint/pull/4798) Simplify `VerifyCommitTrusting` func + remove extra validation (@melekes)
- [types] [\#4845](https://github.com/tendermint/tendermint/pull/4845) Remove `ABCIResult` (@melekes)
- [types] [\#5029](https://github.com/tendermint/tendermint/pull/5029) Rename all values from `PartsHeader` to `PartSetHeader` to have consistency (@marbar3778)
- [types] [\#5029](https://github.com/tendermint/tendermint/pull/5029) Rename all values from `PartsHeader` to `PartSetHeader` to have consistency (@marbar3778)
- [types] [\#4939](https://github.com/tendermint/tendermint/pull/4939) `Total` in `Parts` & `PartSetHeader` has been changed from a `int` to a `uint32` (@marbar3778)
- [types] [\#4939](https://github.com/tendermint/tendermint/pull/4939) Vote: `ValidatorIndex` & `Round` are now `int32` (@marbar3778)
- [types] [\#4939](https://github.com/tendermint/tendermint/pull/4939) Proposal: `POLRound` & `Round` are now `int32` (@marbar3778)
@@ -338,7 +798,7 @@ Special thanks to external contributors on this release: @james-ray, @fedekunze,
- [evidence] [\#4722](https://github.com/tendermint/tendermint/pull/4722) Consolidate evidence store and pool types to improve evidence DB (@cmwaters)
- [evidence] [\#4839](https://github.com/tendermint/tendermint/pull/4839) Reject duplicate evidence from being proposed (@cmwaters)
- [evidence] [\#5219](https://github.com/tendermint/tendermint/pull/5219) Change the source of evidence time to block time (@cmwaters)
- [libs] [\#5126](https://github.com/tendermint/tendermint/pull/5126) Add a sync package which wraps sync.(RW)Mutex & deadlock.(RW)Mutex and use a build flag (deadlock) in order to enable deadlock checking (@marbar3778)
- [libs] [\#5126](https://github.com/tendermint/tendermint/pull/5126) Add a sync package which wraps sync.(RW)Mutex & deadlock.(RW)Mutex and use a build flag (deadlock) in order to enable deadlock checking (@marbar3778)
- [light] [\#4935](https://github.com/tendermint/tendermint/pull/4935) Fetch and compare a new header with witnesses in parallel (@melekes)
- [light] [\#4929](https://github.com/tendermint/tendermint/pull/4929) Compare header with witnesses only when doing bisection (@melekes)
- [light] [\#4916](https://github.com/tendermint/tendermint/pull/4916) Validate basic for inbound validator sets and headers before further processing them (@cmwaters)
@@ -706,7 +1166,7 @@ and a validator address plus a timestamp. Note we may remove the validator
address & timestamp fields in the future (see ADR-25).
`lite2` package has been added to solve `lite` issues and introduce weak
subjectivity interface. Refer to the [spec](https://github.com/tendermint/spec/blob/master/spec/consensus/light-client.md) for complete details.
subjectivity interface. Refer to the [spec](./spec/consensus/light-client/) for complete details.
`lite` package is now deprecated and will be removed in v0.34 release.
### BREAKING CHANGES:
@@ -1067,7 +1527,7 @@ Special thanks to external contributors on this release: @jon-certik, @gracenoah
*August 28, 2019*
@climber73 wrote the [Writing a Tendermint Core application in Java
(gRPC)](https://github.com/tendermint/tendermint/blob/master/docs/guides/java.md)
(gRPC)](https://github.com/tendermint/tendermint/blob/master/docs/guides/java.md) <!-- markdown-link-check-disable-line -->
guide.
Special thanks to external contributors on this release:
@@ -1646,7 +2106,7 @@ more details.
- [rpc] [\#3269](https://github.com/tendermint/tendermint/issues/2826) Limit number of unique clientIDs with open subscriptions. Configurable via `rpc.max_subscription_clients`
- [rpc] [\#3269](https://github.com/tendermint/tendermint/issues/2826) Limit number of unique queries a given client can subscribe to at once. Configurable via `rpc.max_subscriptions_per_client`.
- [rpc] [\#3435](https://github.com/tendermint/tendermint/issues/3435) Default ReadTimeout and WriteTimeout changed to 10s. WriteTimeout can increased by setting `rpc.timeout_broadcast_tx_commit` in the config.
- [rpc/client] [\#3269](https://github.com/tendermint/tendermint/issues/3269) Update `EventsClient` interface to reflect new pubsub/eventBus API [ADR-33](https://github.com/tendermint/tendermint/blob/develop/docs/architecture/adr-033-pubsub.md). This includes `Subscribe`, `Unsubscribe`, and `UnsubscribeAll` methods.
- [rpc/client] [\#3269](https://github.com/tendermint/tendermint/issues/3269) Update `EventsClient` interface to reflect new pubsub/eventBus API [ADR-33](https://github.com/tendermint/tendermint/blob/master/docs/architecture/adr-033-pubsub.md). This includes `Subscribe`, `Unsubscribe`, and `UnsubscribeAll` methods.
* Apps
- [abci] [\#3403](https://github.com/tendermint/tendermint/issues/3403) Remove `time_iota_ms` from BlockParams. This is a
@@ -1699,7 +2159,7 @@ more details.
- [blockchain] [\#3358](https://github.com/tendermint/tendermint/pull/3358) Fix timer leak in `BlockPool` (@guagualvcha)
- [cmd] [\#3408](https://github.com/tendermint/tendermint/issues/3408) Fix `testnet` command's panic when creating non-validator configs (using `--n` flag) (@srmo)
- [libs/db/remotedb/grpcdb] [\#3402](https://github.com/tendermint/tendermint/issues/3402) Close Iterator/ReverseIterator after use
- [libs/pubsub] [\#951](https://github.com/tendermint/tendermint/issues/951), [\#1880](https://github.com/tendermint/tendermint/issues/1880) Use non-blocking send when dispatching messages [ADR-33](https://github.com/tendermint/tendermint/blob/develop/docs/architecture/adr-033-pubsub.md)
- [libs/pubsub] [\#951](https://github.com/tendermint/tendermint/issues/951), [\#1880](https://github.com/tendermint/tendermint/issues/1880) Use non-blocking send when dispatching messages [ADR-33](https://github.com/tendermint/tendermint/blob/master/docs/architecture/adr-033-pubsub.md)
- [lite] [\#3364](https://github.com/tendermint/tendermint/issues/3364) Fix `/validators` and `/abci_query` proxy endpoints
(@guagualvcha)
- [p2p/conn] [\#3347](https://github.com/tendermint/tendermint/issues/3347) Reject all-zero shared secrets in the Diffie-Hellman step of secret-connection
@@ -1760,13 +2220,13 @@ handshake by authenticating the NetAddress.ID of the peer we're dialing.
This release fixes yet another issue with the proposer selection algorithm.
We hope it's the last one, but we won't be surprised if it's not.
We plan to one day expose the selection algorithm more directly to
the application ([\#3285](https://github.com/tendermint/tendermint/issues/3285)), and even to support randomness ([\#763](https://github.com/tendermint/tendermint/issues/763)).
the application ([\#3285](https://github.com/tendermint/tendermint/issues/3285)), and even to support randomness ([\#763](https://github.com/tendermint/tendermint/issues/763)). <!-- markdown-link-check-disable-line -->
For more, see issues marked
[proposer-selection](https://github.com/tendermint/tendermint/labels/proposer-selection).
This release also includes a fix to prevent Tendermint from including the same
piece of evidence in more than one block. This issue was reported by @chengwenxi in our
[bug bounty program](https://hackerone.com/tendermint).
[bug bounty program](https://hackerone.com/cosmos).
### BREAKING CHANGES:
@@ -2259,7 +2719,7 @@ Special thanks to external contributors on this release:
@james-ray, @overbool, @phymbert, @Slamper, @Uzair1995, @yutianwu.
Special thanks to @Slamper for a series of bug reports in our [bug bounty
program](https://hackerone.com/tendermint) which are fixed in this release.
program](https://hackerone.com/cosmos) which are fixed in this release.
This release is primarily about adding Version fields to various data structures,
optimizing consensus messages for signing and verification in
@@ -2403,7 +2863,7 @@ Special thanks to external contributors on this release:
This release is mostly about the ConsensusParams - removing fields and enforcing MaxGas.
It also addresses some issues found via security audit, removes various unused
functions from `libs/common`, and implements
[ADR-012](https://github.com/tendermint/tendermint/blob/develop/docs/architecture/adr-012-peer-transport.md).
[ADR-012](https://github.com/tendermint/tendermint/blob/master/docs/architecture/adr-012-peer-transport.md).
BREAKING CHANGES:
@@ -2468,7 +2928,7 @@ are affected by a change.
A few more breaking changes are in the works - each will come with a clear
Architecture Decision Record (ADR) explaining the change. You can review ADRs
[here](https://github.com/tendermint/tendermint/tree/develop/docs/architecture)
[here](https://github.com/tendermint/tendermint/tree/master/docs/architecture)
or in the [open Pull Requests](https://github.com/tendermint/tendermint/pulls).
You can also check in on the [issues marked as
breaking](https://github.com/tendermint/tendermint/issues?q=is%3Aopen+is%3Aissue+label%3Abreaking).
@@ -2484,7 +2944,7 @@ BREAKING CHANGES:
- [abci] Added address of the original proposer of the block to Header
- [abci] Change ABCI Header to match Tendermint exactly
- [abci] [\#2159](https://github.com/tendermint/tendermint/issues/2159) Update use of `Validator` (see
[ADR-018](https://github.com/tendermint/tendermint/blob/develop/docs/architecture/adr-018-ABCI-Validators.md)):
[ADR-018](https://github.com/tendermint/tendermint/blob/master/docs/architecture/adr-018-ABCI-Validators.md)):
- Remove PubKey from `Validator` (so it's just Address and Power)
- Introduce `ValidatorUpdate` (with just PubKey and Power)
- InitChain and EndBlock use ValidatorUpdate
@@ -2506,7 +2966,7 @@ BREAKING CHANGES:
- [state] [\#1815](https://github.com/tendermint/tendermint/issues/1815) Validator set changes are now delayed by one block (!)
- Add NextValidatorSet to State, changes on-disk representation of state
- [state] [\#2184](https://github.com/tendermint/tendermint/issues/2184) Enforce ConsensusParams.BlockSize.MaxBytes (See
[ADR-020](https://github.com/tendermint/tendermint/blob/develop/docs/architecture/adr-020-block-size.md)).
[ADR-020](https://github.com/tendermint/tendermint/blob/master/docs/architecture/adr-020-block-size.md)).
- Remove ConsensusParams.BlockSize.MaxTxs
- Introduce maximum sizes for all components of a block, including ChainID
- [types] Updates to the block Header:
@@ -2517,7 +2977,7 @@ BREAKING CHANGES:
- [consensus] [\#2203](https://github.com/tendermint/tendermint/issues/2203) Implement BFT time
- Timestamp in block must be monotonic and equal the median of timestamps in block's LastCommit
- [crypto] [\#2239](https://github.com/tendermint/tendermint/issues/2239) Secp256k1 signature changes (See
[ADR-014](https://github.com/tendermint/tendermint/blob/develop/docs/architecture/adr-014-secp-malleability.md)):
[ADR-014](https://github.com/tendermint/tendermint/blob/master/docs/architecture/adr-014-secp-malleability.md)):
- format changed from DER to `r || s`, both little endian encoded as 32 bytes.
- malleability removed by requiring `s` to be in canonical form.
@@ -2747,7 +3207,7 @@ BREAKING CHANGES:
FEATURES
- [cmd] Added metrics (served under `/metrics` using a Prometheus client;
disabled by default). See the new `instrumentation` section in the config and
[metrics](https://tendermint.readthedocs.io/projects/tools/en/develop/metrics.html)
[metrics](https://github.com/tendermint/tendermint/blob/master/docs/nodes/metrics.md)
guide.
- [p2p] Add IPv6 support to peering.
- [p2p] Add `external_address` to config to allow specifying the address for
@@ -2861,7 +3321,7 @@ BREAKING:
FEATURES
- [rpc] the RPC documentation is now published to https://tendermint.github.io/slate
- [rpc] the RPC documentation is now published to `https://tendermint.github.io/slate`
- [p2p] AllowDuplicateIP config option to refuse connections from same IP.
- true by default for now, false by default in next breaking release
- [docs] Add docs for query, tx indexing, events, pubsub
@@ -3339,7 +3799,7 @@ containing substructs: `BaseConfig`, `P2PConfig`, `MempoolConfig`, `ConsensusCon
- Change some [function and method signatures](https://gist.github.com/ebuchman/640d5fc6c2605f73497992fe107ebe0b) accomodate new config
- Logger
- Replace static `log15` logger with a simple interface, and provide a new implementation using `go-kit`.
- Replace static `log15` logger with a simple interface, and provide a new implementation using `go-kit`. <!-- markdown-link-check-disable-next-line -->
See our new [logging library](https://github.com/tendermint/tmlibs/log) and [blog post](https://tendermint.com/blog/abstracting-the-logger-interface-in-go) for more details
- Levels `warn` and `notice` are removed (you may need to change them in your `config.toml`!)
- Change some [function and method signatures](https://gist.github.com/ebuchman/640d5fc6c2605f73497992fe107ebe0b) to accept a logger

View File

@@ -1,160 +1,104 @@
# Unreleased Changes
Friendly reminder: We have a [bug bounty program](https://hackerone.com/cosmos).
## vX.X
Special thanks to external contributors on this release:
Month, DD, YYYY
Friendly reminder: We have a [bug bounty program](https://hackerone.com/tendermint).
Special thanks to external contributors on this release:
### BREAKING CHANGES
- CLI/RPC/Config
- [pubsub/events] \#6634 The `ResultEvent.Events` field is now of type `[]abci.Event` preserving event order instead of `map[string][]string`. (@alexanderbez)
- [config] \#5598 The `test_fuzz` and `test_fuzz_config` P2P settings have been removed. (@erikgrinaker)
- [config] \#5728 `fast_sync = "v1"` is no longer supported (@melekes)
- [cli] \#5772 `gen_node_key` prints JSON-encoded `NodeKey` rather than ID and does not save it to `node_key.json` (@melekes)
- [cli] \#5777 use hyphen-case instead of snake_case for all cli commands and config parameters (@cmwaters)
- [rpc] \#6019 standardise RPC errors and return the correct status code (@bipulprasad & @cmwaters)
- [rpc] \#6168 Change default sorting to desc for `/tx_search` results (@melekes)
- [cli] \#6282 User must specify the node mode when using `tendermint init` (@cmwaters)
- [state/indexer] \#6382 reconstruct indexer, move txindex into the indexer package (@JayT106)
- [cli] \#6372 Introduce `BootstrapPeers` as part of the new p2p stack. Peers to be connected on startup (@cmwaters)
- [config] \#6462 Move `PrivValidator` configuration out of `BaseConfig` into its own section. (@tychoish)
- [rpc] \#6610 Add MaxPeerBlockHeight into /status rpc call (@JayT106)
- [fastsync/rpc] \#6620 Add TotalSyncedTime & RemainingTime to SyncInfo in /status RPC (@JayT106)
- [rpc/grpc] \#6725 Mark gRPC in the RPC layer as deprecated.
- [blockchain/v2] \#6730 Fast Sync v2 is deprecated, please use v0
- [rpc] \#7121 Remove the deprecated gRPC interface to the RPC service. (@creachadair)
- [blocksync] \#7159 Remove support for disabling blocksync in any circumstance. (@tychoish)
- [mempool] \#7171 Remove legacy mempool implementation. (@tychoish)
- [rpc] \#7575 Rework how RPC responses are written back via HTTP. (@creachadair)
- [rpc] \#7713 Remove unused options for websocket clients. (@creachadair)
- [config] \#7930 Add new event subscription options and defaults. (@creachadair)
- [rpc] \#7982 Add new Events interface and deprecate Subscribe. (@creachadair)
- [cli] \#8081 make the reset command safe to use by intoducing `reset-state` command. Fixed by \#8259. (@marbar3778, @cmwaters)
- [config] \#8222 default indexer configuration to null. (@creachadair)
- [rpc] \#8570 rework timeouts to be per-method instead of global. (@creachadair)
- [rpc] \#8624 deprecate `broadcast_tx_commit` and `braodcast_tx_sync` and `broadcast_tx_async` in favor of `braodcast_tx`. (@tychoish)
- [config] \#8654 remove deprecated `seeds` field from config. Users should switch to `bootstrap-peers` instead. (@cmwaters)
- Apps
- [ABCI] \#6408 Change the `key` and `value` fields from `[]byte` to `string` in the `EventAttribute` type. (@alexanderbez)
- [ABCI] \#5447 Remove `SetOption` method from `ABCI.Client` interface
- [ABCI] \#5447 Reset `Oneof` indexes for `Request` and `Response`.
- [ABCI] \#5818 Use protoio for msg length delimitation. Migrates from int64 to uint64 length delimiters.
- [ABCI] \#3546 Add `mempool_error` field to `ResponseCheckTx`. This field will contain an error string if Tendermint encountered an error while adding a transaction to the mempool. (@williambanfield)
- [Version] \#6494 `TMCoreSemVer` has been renamed to `TMVersion`.
- It is not required any longer to set ldflags to set version strings
- [abci/counter] \#6684 Delete counter example app
- [tendermint/spec] \#7804 Migrate spec from [spec repo](https://github.com/tendermint/spec).
- [abci] \#7984 Remove the locks preventing concurrent use of ABCI applications by Tendermint. (@tychoish)
- [abci] \#8605 Remove info, log, events, gasUsed and mempoolError fields from ResponseCheckTx as they are not used by Tendermint. (@jmalicevic)
- [abci] \#8664 Move `app_hash` parameter from `Commit` to `FinalizeBlock`. (@sergio-mena)
- [abci] \#8656 Added cli command for `PrepareProposal`. (@jmalicevic)
- [sink/psql] \#8637 tx_results emitted from psql sink are now json encoded, previously they were protobuf encoded
- [abci] \#8901 Added cli command for `ProcessProposal`. (@hvanz)
- P2P Protocol
- [p2p] \#7035 Remove legacy P2P routing implementation and associated configuration options. (@tychoish)
- [p2p] \#7265 Peer manager reduces peer score for each failed dial attempts for peers that have not successfully dialed. (@tychoish)
- [p2p] [\#7594](https://github.com/tendermint/tendermint/pull/7594) always advertise self, to enable mutual address discovery. (@altergui)
- [p2p] \#8737 Introduce "inactive" peer label to avoid re-dialing incompatible peers. (@tychoish)
- [p2p] \#8737 Increase frequency of dialing attempts to reduce latency for peer acquisition. (@tychoish)
- [p2p] \#8737 Improvements to peer scoring and sorting to gossip a greater variety of peers during PEX. (@tychoish)
- [p2p] \#8737 Track incoming and outgoing peers separately to ensure more peer slots open for incoming connections. (@tychoish)
- Go API
- [pubsub] \#6634 The `Query#Matches` method along with other pubsub methods, now accepts a `[]abci.Event` instead of `map[string][]string`. (@alexanderbez)
- [p2p] \#6618 Move `p2p.NodeInfo` into `types` to support use of the SDK. (@tychoish)
- [p2p] \#6583 Make `p2p.NodeID` and `p2p.NetAddress` exported types to support their use in the RPC layer. (@tychoish)
- [node] \#6540 Reduce surface area of the `node` package by making most of the implementation details private. (@tychoish)
- [p2p] \#6547 Move the entire `p2p` package and all reactor implementations into `internal`. (@tychoish)
- [libs/log] \#6534 Remove the existing custom Tendermint logger backed by go-kit. The logging interface, `Logger`, remains. Tendermint still provides a default logger backed by the performant zerolog logger. (@alexanderbez)
- [libs/time] \#6495 Move types/time to libs/time to improve consistency. (@tychoish)
- [mempool] \#6529 The `Context` field has been removed from the `TxInfo` type. `CheckTx` now requires a `Context` argument. (@alexanderbez)
- [abci/client, proxy] \#5673 `Async` funcs return an error, `Sync` and `Async` funcs accept `context.Context` (@melekes)
- [p2p] Remove unused function `MakePoWTarget`. (@erikgrinaker)
- [libs/bits] \#5720 Validate `BitArray` in `FromProto`, which now returns an error (@melekes)
- [proto/p2p] Rename `DefaultNodeInfo` and `DefaultNodeInfoOther` to `NodeInfo` and `NodeInfoOther` (@erikgrinaker)
- [proto/p2p] Rename `NodeInfo.default_node_id` to `node_id` (@erikgrinaker)
- [libs/os] Kill() and {Must,}{Read,Write}File() functions have been removed. (@alessio)
- [store] \#5848 Remove block store state in favor of using the db iterators directly (@cmwaters)
- [state] \#5864 Use an iterator when pruning state (@cmwaters)
- [types] \#6023 Remove `tm2pb.Header`, `tm2pb.BlockID`, `tm2pb.PartSetHeader` and `tm2pb.NewValidatorUpdate`.
- Each of the above types has a `ToProto` and `FromProto` method or function which replaced this logic.
- [light] \#6054 Move `MaxRetryAttempt` option from client to provider.
- `NewWithOptions` now sets the max retry attempts and timeouts (@cmwaters)
- [all] \#6077 Change spelling from British English to American (@cmwaters)
- Rename "Subscription.Cancelled()" to "Subscription.Canceled()" in libs/pubsub
- Rename "behaviour" pkg to "behavior" and internalized it in blockchain v2
- [rpc/client/http] \#6176 Remove `endpoint` arg from `New`, `NewWithTimeout` and `NewWithClient` (@melekes)
- [rpc/client/http] \#6176 Unexpose `WSEvents` (@melekes)
- [rpc/jsonrpc/client/ws_client] \#6176 `NewWS` no longer accepts options (use `NewWSWithOptions` and `OnReconnect` funcs to configure the client) (@melekes)
- [internal/libs] \#6366 Move `autofile`, `clist`,`fail`,`flowrate`, `protoio`, `sync`, `tempfile`, `test` and `timer` lib packages to an internal folder
- [libs/rand] \#6364 Remove most of libs/rand in favour of standard lib's `math/rand` (@liamsi)
- [mempool] \#6466 The original mempool reactor has been versioned as `v0` and moved to a sub-package under the root `mempool` package.
Some core types have been kept in the `mempool` package such as `TxCache` and it's implementations, the `Mempool` interface itself
and `TxInfo`. (@alexanderbez)
- [crypto/sr25519] \#6526 Do not re-execute the Ed25519-style key derivation step when doing signing and verification. The derivation is now done once and only once. This breaks `sr25519.GenPrivKeyFromSecret` output compatibility. (@Yawning)
- [types] \#6627 Move `NodeKey` to types to make the type public.
- [config] \#6627 Extend `config` to contain methods `LoadNodeKeyID` and `LoadorGenNodeKeyID`
- [blocksync] \#6755 Rename `FastSync` and `Blockchain` package to `BlockSync`
(@cmwaters)
- [rpc] \#7474 Remove the "URI" RPC client. (@creachadair)
- [libs/pubsub] \#7451 Internalize the pubsub packages. (@creachadair)
- [libs/sync] \#7450 Internalize and remove the library. (@creachadair)
- [libs/async] \#7449 Move library to internal. (@creachadair)
- [pubsub] \#7231 Remove unbuffered subscriptions and rework the Subscription interface. (@creachadair)
- [eventbus] \#7231 Move the EventBus type to the internal/eventbus package. (@creachadair)
- [blocksync] \#7046 Remove v2 implementation of the blocksync service and recactor, which was disabled in the previous release. (@tychoish)
- [p2p] \#7064 Remove WDRR queue implementation. (@tychoish)
- [config] \#7169 `WriteConfigFile` now returns an error. (@tychoish)
- [libs/service] \#7288 Remove SetLogger method on `service.Service` interface. (@tychoish)
- [abci/client] \#7607 Simplify client interface (removes most "async" methods). (@creachadair)
- [libs/json] \#7673 Remove the libs/json (tmjson) library. (@creachadair)
- [crypto] \#8412 \#8432 Remove `crypto/tmhash` package in favor of small functions in `crypto` package and cleanup of unused functions. (@tychoish)
- Blockchain Protocol
- Data Storage
- [store/state/evidence/light] \#5771 Use an order-preserving varint key encoding (@cmwaters)
- [mempool] \#6396 Remove mempool's write ahead log (WAL), (previously unused by the tendermint code). (@tychoish)
- [state] \#6541 Move pruneBlocks from consensus/state to state/execution. (@JayT106)
- Tooling
- [tools] \#6498 Set OS home dir to instead of the hardcoded PATH. (@JayT106)
- [cli/indexer] \#6676 Reindex events command line tooling. (@JayT106)
### FEATURES
- [config] Add `--mode` flag and config variable. See [ADR-52](https://github.com/tendermint/tendermint/blob/master/docs/architecture/adr-052-tendermint-mode.md) @dongsam
- [rpc] \#6329 Don't cap page size in unsafe mode (@gotjoshua, @cmwaters)
- [pex] \#6305 v2 pex reactor with backwards compatability. Introduces two new pex messages to
accomodate for the new p2p stack. Removes the notion of seeds and crawling. All peer
exchange reactors behave the same. (@cmwaters)
- [crypto] \#6376 Enable sr25519 as a validator key
- [mempool] \#6466 Introduction of a prioritized mempool. (@alexanderbez)
- `Priority` and `Sender` have been introduced into the `ResponseCheckTx` type, where the `priority` will determine the prioritization of
the transaction when a proposer reaps transactions for a block proposal. The `sender` field acts as an index.
- Operators may toggle between the legacy mempool reactor, `v0`, and the new prioritized reactor, `v1`, by setting the
`mempool.version` configuration, where `v1` is the default configuration.
- Applications that do not specify a priority, i.e. zero, will have transactions reaped by the order in which they are received by the node.
- Transactions are gossiped in FIFO order as they are in `v0`.
- [config/indexer] \#6411 Introduce support for custom event indexing data sources, specifically PostgreSQL. (@JayT106)
- [fastsync/event] \#6619 Emit fastsync status event when switching consensus/fastsync (@JayT106)
- [statesync/event] \#6700 Emit statesync status start/end event (@JayT106)
- [rpc] [\#7270](https://github.com/tendermint/tendermint/pull/7270) Add `header` and `header_by_hash` RPC Client queries. (@fedekunze)
- [rpc] [\#7701] Add `ApplicationInfo` to `status` rpc call which contains the application version. (@jonasbostoen)
- [cli] [#7033](https://github.com/tendermint/tendermint/pull/7033) Add a `rollback` command to rollback to the previous tendermint state in the event of non-determinstic app hash or reverting an upgrade.
- [mempool, rpc] \#7041 Add removeTx operation to the RPC layer. (@tychoish)
- [consensus] \#7354 add a new `synchrony` field to the `ConsensusParams` struct for controlling the parameters of the proposer-based timestamp algorithm. (@williambanfield)
- [consensus] \#7376 Update the proposal logic per the Propose-based timestamps specification so that the proposer will wait for the previous block time to occur before proposing the next block. (@williambanfield)
- [consensus] \#7391 Use the proposed block timestamp as the proposal timestamp. Update the block validation logic to ensure that the proposed block's timestamp matches the timestamp in the proposal message. (@williambanfield)
- [consensus] \#7415 Update proposal validation logic to Prevote nil if a proposal does not meet the conditions for Timelyness per the proposer-based timestamp specification. (@anca)
- [consensus] \#7382 Update block validation to no longer require the block timestamp to be the median of the timestamps of the previous commit. (@anca)
- [consensus] \#7711 Use the proposer timestamp for the first height instead of the genesis time. Chains will still start consensus at the genesis time. (@anca)
- [cli] \#8281 Add a tool to update old config files to the latest version. (@creachadair)
- [consenus] \#8514 move `RecheckTx` from the local node mempool config to a global `ConsensusParams` field in `BlockParams` (@cmwaters)
- [abci] ABCI++ [specified](https://github.com/tendermint/tendermint/tree/master/spec/abci%2B%2B). (@sergio-mena, @cmwaters, @josef-widder)
- [abci] ABCI++ [implemented](https://github.com/orgs/tendermint/projects/9). (@williambanfield, @thanethomson, @sergio-mena)
### IMPROVEMENTS
- [libs/log] Console log formatting changes as a result of \#6534 and \#6589. (@tychoish)
- [statesync] \#6566 Allow state sync fetchers and request timeout to be configurable. (@alexanderbez)
- [types] \#6478 Add `block_id` to `newblock` event (@jeebster)
- [crypto/ed25519] \#5632 Adopt zip215 `ed25519` verification. (@marbar3778)
- [crypto/ed25519] \#6526 Use [curve25519-voi](https://github.com/oasisprotocol/curve25519-voi) for `ed25519` signing and verification. (@Yawning)
- [crypto/sr25519] \#6526 Use [curve25519-voi](https://github.com/oasisprotocol/curve25519-voi) for `sr25519` signing and verification. (@Yawning)
- [privval] \#5603 Add `--key` to `init`, `gen_validator`, `testnet` & `unsafe_reset_priv_validator` for use in generating `secp256k1` keys.
- [privval] \#5725 Add gRPC support to private validator.
- [privval] \#5876 `tendermint show-validator` will query the remote signer if gRPC is being used (@marbar3778)
- [abci/client] \#5673 `Async` requests return an error if queue is full (@melekes)
- [mempool] \#5673 Cancel `CheckTx` requests if RPC client disconnects or times out (@melekes)
- [abci] \#5706 Added `AbciVersion` to `RequestInfo` allowing applications to check ABCI version when connecting to Tendermint. (@marbar3778)
- [blockchain/v1] \#5728 Remove in favor of v2 (@melekes)
- [blockchain/v0] \#5741 Relax termination conditions and increase sync timeout (@melekes)
- [cli] \#5772 `gen_node_key` output now contains node ID (`id` field) (@melekes)
- [blockchain/v2] \#5774 Send status request when new peer joins (@melekes)
- [consensus] \#5792 Deprecates the `time_iota_ms` consensus parameter, to reduce the bug surface. The parameter is no longer used. (@valardragon)
- [store] \#5888 store.SaveBlock saves using batches instead of transactions for now to improve ACID properties. This is a quick fix for underlying issues around tm-db and ACID guarantees. (@githubsands)
- [consensus] \#5987 Remove `time_iota_ms` from consensus params. Merge `tmproto.ConsensusParams` and `abci.ConsensusParams`. (@marbar3778)
- [types] \#5994 Reduce the use of protobuf types in core logic. (@marbar3778)
- `ConsensusParams`, `BlockParams`, `ValidatorParams`, `EvidenceParams`, `VersionParams`, `sm.Version` and `version.Consensus` have become native types. They still utilize protobuf when being sent over the wire or written to disk.
- [rpc/client/http] \#6163 Do not drop events even if the `out` channel is full (@melekes)
- [node] \#6059 Validate and complete genesis doc before saving to state store (@silasdavis)
- [state] \#6067 Batch save state data (@githubsands & @cmwaters)
- [crypto] \#6120 Implement batch verification interface for ed25519 and sr25519. (@marbar3778)
- [types] \#6120 use batch verification for verifying commits signatures.
- If the key type supports the batch verification API it will try to batch verify. If the verification fails we will single verify each signature.
- [privval/file] \#6185 Return error on `LoadFilePV`, `LoadFilePVEmptyState`. Allows for better programmatic control of Tendermint.
- [privval] \#6240 Add `context.Context` to privval interface.
- [rpc] \#6265 set cache control in http-rpc response header (@JayT106)
- [statesync] \#6378 Retry requests for snapshots and add a minimum discovery time (5s) for new snapshots.
- [node/state] \#6370 graceful shutdown in the consensus reactor (@JayT106)
- [crypto/merkle] \#6443 Improve HashAlternatives performance (@cuonglm)
- [crypto/merkle] \#6513 Optimize HashAlternatives (@marbar3778)
- [p2p/pex] \#6509 Improve addrBook.hash performance (@cuonglm)
- [consensus/metrics] \#6549 Change block_size gauge to a histogram for better observability over time (@marbar3778)
- [statesync] \#6587 Increase chunk priority and re-request chunks that don't arrive (@cmwaters)
- [state/privval] \#6578 No GetPubKey retry beyond the proposal/voting window (@JayT106)
- [rpc] \#6615 Add TotalGasUsed to block_results response (@crypto-facs)
- [cmd/tendermint/commands] \#6623 replace `$HOME/.some/test/dir` with `t.TempDir` (@tanyabouman)
- [internal/protoio] \#7325 Optimized `MarshalDelimited` by inlining the common case and using a `sync.Pool` in the worst case. (@odeke-em)
- [consensus] \#6969 remove logic to 'unlock' a locked block.
- [evidence] \#7700 Evidence messages contain single Evidence instead of EvidenceList (@jmalicevic)
- [evidence] \#7802 Evidence pool emits events when evidence is validated and updates a metric when the number of evidence in the evidence pool changes. (@jmalicevic)
- [pubsub] \#7319 Performance improvements for the event query API (@creachadair)
- [node] \#7521 Define concrete type for seed node implementation (@spacech1mp)
- [rpc] \#7612 paginate mempool /unconfirmed_txs rpc endpoint (@spacech1mp)
- [light] [\#7536](https://github.com/tendermint/tendermint/pull/7536) rpc /status call returns info about the light client (@jmalicevic)
- [types] \#7765 Replace EvidenceData with EvidenceList to avoid unnecessary nesting of evidence fields within a block. (@jmalicevic)
### BUG FIXES
- [privval] \#5638 Increase read/write timeout to 5s and calculate ping interval based on it (@JoeKash)
- [blockchain/v1] [\#5701](https://github.com/tendermint/tendermint/pull/5701) Handle peers without blocks (@melekes)
- [blockchain/v1] \#5711 Fix deadlock (@melekes)
- [evidence] \#6375 Fix bug with inconsistent LightClientAttackEvidence hashing (cmwaters)
- [rpc] \#6507 fix RPC client doesn't handle url's without ports (@JayT106)
- [statesync] \#6463 Adds Reverse Sync feature to fetch historical light blocks after state sync in order to verify any evidence (@cmwaters)
- [fastsync] \#6590 Update the metrics during fast-sync (@JayT106)
- [gitignore] \#6668 Fix gitignore of abci-cli (@tanyabouman)
- [light] \#6687 Fix bug with incorrecly handled contexts in the light client (@cmwaters)
- fix: assignment copies lock value in `BitArray.UnmarshalJSON()` (@lklimek)
- [light] \#7640 Light Client: fix absence proof verification (@ashcherbakov)
- [light] \#7641 Light Client: fix querying against the latest height (@ashcherbakov)
- [cli] [#7837](https://github.com/tendermint/tendermint/pull/7837) fix app hash in state rollback. (@yihuang)
- [cli] \#8276 scmigrate: ensure target key is correctly renamed. (@creachadair)
- [cli] \#8294 keymigrate: ensure block hash keys are correctly translated. (@creachadair)
- [cli] \#8352 keymigrate: ensure transaction hash keys are correctly translated. (@creachadair)
- (indexer) \#8625 Fix overriding tx index of duplicated txs.

View File

@@ -20,7 +20,7 @@ This code of conduct applies to all projects run by the Tendermint/COSMOS team a
* Please keep unstructured critique to a minimum. If you have solid ideas you want to experiment with, make a fork and see how it works.
* We will exclude you from interaction if you insult, demean or harass anyone. That is not welcome behaviour. We interpret the term “harassment” as including the definition in the [Citizen Code of Conduct](http://citizencodeofconduct.org/); if you have any lack of clarity about what might be included in that concept, please read their definition. In particular, we dont tolerate behavior that excludes people in socially marginalized groups.
* We will exclude you from interaction if you insult, demean or harass anyone. That is not welcome behaviour. We interpret the term “harassment” as including the definition in the [Citizen Code of Conduct](https://github.com/stumpsyn/policies/blob/master/citizen_code_of_conduct.md); if you have any lack of clarity about what might be included in that concept, please read their definition. In particular, we dont tolerate behavior that excludes people in socially marginalized groups.
* Private harassment is also unacceptable. No matter who you are, if you feel you have been or are being harassed or made uncomfortable by a community member, please contact one of the channel admins or the person mentioned above immediately. Whether youre a regular contributor or a newcomer, we care about making this community a safe place for you and weve got your back.

View File

@@ -105,11 +105,33 @@ specify exactly the dependency you want to update, eg.
## Protobuf
We use [Protocol Buffers](https://developers.google.com/protocol-buffers) along with [gogoproto](https://github.com/gogo/protobuf) to generate code for use across Tendermint Core.
We use [Protocol Buffers](https://developers.google.com/protocol-buffers) along
with [`gogoproto`](https://github.com/gogo/protobuf) to generate code for use
across Tendermint Core.
For linting, checking breaking changes and generating proto stubs, we use [buf](https://buf.build/). If you would like to run linting and check if the changes you have made are breaking then you will need to have docker running locally. Then the linting cmd will be `make proto-lint` and the breaking changes check will be `make proto-check-breaking`.
To generate proto stubs, lint, and check protos for breaking changes, you will
need to install [buf](https://buf.build/) and `gogoproto`. Then, from the root
of the repository, run:
We use [Docker](https://www.docker.com/) to generate the protobuf stubs. To generate the stubs yourself, make sure docker is running then run `make proto-gen`.
```bash
# Lint all of the .proto files in proto/tendermint
make proto-lint
# Check if any of your local changes (prior to committing to the Git repository)
# are breaking
make proto-check-breaking
# Generate Go code from the .proto files in proto/tendermint
make proto-gen
```
To automatically format `.proto` files, you will need
[`clang-format`](https://clang.llvm.org/docs/ClangFormat.html) installed. Once
installed, you can run:
```bash
make proto-format
```
### Visual Studio Code
@@ -227,116 +249,6 @@ Fixes #nnnn
Each PR should have one commit once it lands on `master`; this can be accomplished by using the "squash and merge" button on Github. Be sure to edit your commit message, though!
### Release Procedure
#### Major Release
This major release process assumes that this release was preceded by release candidates.
If there were no release candidates, and you'd like to cut a major release directly from master, see below.
1. Start on the latest RC branch (`RCx/vX.X.0`).
2. Run integration tests.
3. Branch off of the RC branch (`git checkout -b release-prep`) and prepare the release:
- "Squash" changes from the changelog entries for the RCs into a single entry,
and add all changes included in `CHANGELOG_PENDING.md`.
(Squashing includes both combining all entries, as well as removing or simplifying
any intra-RC changes. It may also help to alphabetize the entries by package name.)
- Run `python ./scripts/linkify_changelog.py CHANGELOG.md` to add links for
all PRs
- Ensure that UPGRADING.md is up-to-date and includes notes on any breaking changes
or other upgrading flows.
- Bump TMVersionDefault version in `version.go`
- Bump P2P and block protocol versions in `version.go`, if necessary
- Bump ABCI protocol version in `version.go`, if necessary
- Add any release notes you would like to be added to the body of the release to `release_notes.md`.
4. Open a PR with these changes against the RC branch (`RCx/vX.X.0`).
5. Once these changes are on the RC branch, branch off of the RC branch again to create a release branch:
- `git checkout RCx/vX.X.0`
- `git checkout -b release/vX.X.0`
6. Push a tag with prepared release details. This will trigger the actual release `vX.X.0`.
- `git tag -a vX.X.0 -m 'Release vX.X.0'`
- `git push origin vX.X.0`
7. Make sure that `master` is updated with the latest `CHANGELOG.md`, `CHANGELOG_PENDING.md`, and `UPGRADING.md`.
8. Create the long-lived minor release branch `RC0/vX.X.1` for the next point release on this
new major release series.
##### Major Release (from `master`)
1. Start on `master`
2. Run integration tests (see `test_integrations` in Makefile)
3. Prepare release in a pull request against `master` (to be squash merged):
- Copy `CHANGELOG_PENDING.md` to top of `CHANGELOG.md`; if this release
had release candidates, squash all the RC updates into one
- Run `python ./scripts/linkify_changelog.py CHANGELOG.md` to add links for
all issues
- Run `bash ./scripts/authors.sh` to get a list of authors since the latest
release, and add the github aliases of external contributors to the top of
the changelog. To lookup an alias from an email, try `bash ./scripts/authors.sh <email>`
- Reset the `CHANGELOG_PENDING.md`
- Bump TMVersionDefault version in `version.go`
- Bump P2P and block protocol versions in `version.go`, if necessary
- Bump ABCI protocol version in `version.go`, if necessary
- Make sure all significant breaking changes are covered in `UPGRADING.md`
- Add any release notes you would like to be added to the body of the release to `release_notes.md`.
4. Push a tag with prepared release details (this will trigger the release `vX.X.0`)
- `git tag -a vX.X.x -m 'Release vX.X.x'`
- `git push origin vX.X.x`
5. Update the `CHANGELOG.md` file on master with the releases changelog.
6. Delete any RC branches and tags for this release (if applicable)
#### Minor Release (Point Releases)
Minor releases are done differently from major releases: They are built off of long-lived backport branches, rather than from master.
Each release "line" (e.g. 0.34 or 0.33) has its own long-lived backport branch, and
the backport branches have names like `v0.34.x` or `v0.33.x` (literally, `x`; it is not a placeholder in this case).
As non-breaking changes land on `master`, they should also be backported (cherry-picked) to these backport branches.
We use Mergify's [backport feature](https://mergify.io/features/backports) to automatically backport to the needed branch. Depending on which backport branch you need to backport to there will be labels for them. To notify the bot to backport a pull request, mark the pull request with the label `backport-to-<backport_branch>`. Once the original pull request is merged, the bot will try to cherry-pick the pull request to the backport branch. If the bot fails to backport, it will open a pull request. The author of the original pull request is responsible for solving the conflicts and merging the pull request.
Minor releases don't have release candidates by default, although any tricky changes may merit a release candidate.
To create a minor release:
1. Checkout the long-lived backport branch: `git checkout vX.X.x`
2. Run integration tests: `make test_integrations`
3. Check out a new branch and prepare the release:
- Copy `CHANGELOG_PENDING.md` to top of `CHANGELOG.md`
- Run `python ./scripts/linkify_changelog.py CHANGELOG.md` to add links for all issues
- Run `bash ./scripts/authors.sh` to get a list of authors since the latest release, and add the GitHub aliases of external contributors to the top of the CHANGELOG. To lookup an alias from an email, try `bash ./scripts/authors.sh <email>`
- Reset the `CHANGELOG_PENDING.md`
- Bump the ABCI version number, if necessary.
(Note that ABCI follows semver, and that ABCI versions are the only versions
which can change during minor releases, and only field additions are valid minor changes.)
- Add any release notes you would like to be added to the body of the release to `release_notes.md`.
4. Open a PR with these changes that will land them back on `vX.X.x`
5. Once this change has landed on the backport branch, make sure to pull it locally, then push a tag.
- `git tag -a vX.X.x -m 'Release vX.X.x'`
- `git push origin vX.X.x`
6. Create a pull request back to master with the CHANGELOG & version changes from the latest release.
- Remove all `R:minor` labels from the pull requests that were included in the release.
- Do not merge the backport branch into master.
#### Release Candidates
Before creating an official release, especially a major release, we may want to create a
release candidate (RC) for our friends and partners to test out. We use git tags to
create RCs, and we build them off of RC branches. RC branches typically have names formatted
like `RCX/vX.X.X` (or, concretely, `RC0/v0.34.0`), while the tags themselves follow
the "standard" release naming conventions, with `-rcX` at the end (`vX.X.X-rcX`).
(Note that branches and tags _cannot_ have the same names, so it's important that these branches
have distinct names from the tags/release names.)
1. Start from the RC branch (e.g. `RC0/v0.34.0`).
2. Create the new tag, specifying a name and a tag "message":
`git tag -a v0.34.0-rc0 -m "Release Candidate v0.34.0-rc0`
3. Push the tag back up to origin:
`git push origin v0.34.0-rc4`
Now the tag should be available on the repo's releases page.
4. Create a new release candidate branch for any possible updates to the RC:
`git checkout -b RC1/v0.34.0; git push origin RC1/v0.34.0`
## Testing
### Unit tests

1
DOCKER/.gitignore vendored
View File

@@ -1 +0,0 @@
tendermint

View File

@@ -1,14 +1,14 @@
# stage 1 Generate Tendermint Binary
FROM golang:1.16-alpine as builder
FROM golang:1.17-alpine as builder
RUN apk update && \
apk upgrade && \
apk --no-cache add make
apk --no-cache add make git
COPY / /tendermint
WORKDIR /tendermint
RUN make build-linux
# stage 2
FROM golang:1.15-alpine
FROM golang:1.17-alpine
LABEL maintainer="hello@tendermint.com"
# Tendermint will be looking for the genesis file in /tendermint/config/genesis.json
@@ -53,4 +53,3 @@ CMD ["start"]
# Expose the data directory as a volume since there's mutable state in there
VOLUME [ "$TMHOME" ]

View File

@@ -1,28 +0,0 @@
FROM amazonlinux:2
RUN yum -y update && \
yum -y install wget
RUN wget http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm && \
rpm -ivh epel-release-latest-7.noarch.rpm
RUN yum -y groupinstall "Development Tools"
RUN yum -y install leveldb-devel which
ENV GOVERSION=1.16.5
RUN cd /tmp && \
wget https://dl.google.com/go/go${GOVERSION}.linux-amd64.tar.gz && \
tar -C /usr/local -xf go${GOVERSION}.linux-amd64.tar.gz && \
mkdir -p /go/src && \
mkdir -p /go/bin
ENV PATH=$PATH:/usr/local/go/bin:/go/bin
ENV GOBIN=/go/bin
ENV GOPATH=/go/src
RUN mkdir -p /tendermint
WORKDIR /tendermint
CMD ["/usr/bin/make", "build", "TENDERMINT_BUILD_OPTIONS=cleveldb"]

View File

@@ -1,16 +0,0 @@
FROM golang:latest
# Grab deps (jq, hexdump, xxd, killall)
RUN apt-get update && \
apt-get install -y --no-install-recommends \
jq bsdmainutils vim-common psmisc netcat
# Add testing deps for curl
RUN echo 'deb http://httpredir.debian.org/debian testing main non-free contrib' >> /etc/apt/sources.list && \
apt-get update && \
apt-get install -y --no-install-recommends curl
VOLUME /go
EXPOSE 26656
EXPOSE 26657

View File

@@ -1,13 +0,0 @@
build:
@sh -c "'$(CURDIR)/build.sh'"
push:
@sh -c "'$(CURDIR)/push.sh'"
build_testing:
docker build --tag tendermint/testing -f ./Dockerfile.testing .
build_amazonlinux_buildimage:
docker build -t "tendermint/tendermint:build_c-amazonlinux" -f Dockerfile.build_c-amazonlinux .
.PHONY: build push build_testing build_amazonlinux_buildimage

View File

@@ -8,7 +8,7 @@ Official releases can be found [here](https://github.com/tendermint/tendermint/r
The Dockerfile for tendermint is not expected to change in the near future. The master file used for all builds can be found [here](https://raw.githubusercontent.com/tendermint/tendermint/master/DOCKER/Dockerfile).
Respective versioned files can be found <https://raw.githubusercontent.com/tendermint/tendermint/vX.XX.XX/DOCKER/Dockerfile> (replace the Xs with the version number).
Respective versioned files can be found at `https://raw.githubusercontent.com/tendermint/tendermint/vX.XX.XX/DOCKER/Dockerfile` (replace the Xs with the version number).
## Quick reference

View File

@@ -1,20 +0,0 @@
#!/usr/bin/env bash
set -e
# Get the tag from the version, or try to figure it out.
if [ -z "$TAG" ]; then
TAG=$(awk -F\" '/TMCoreSemVer =/ { print $2; exit }' < ../version/version.go)
fi
if [ -z "$TAG" ]; then
echo "Please specify a tag."
exit 1
fi
TAG_NO_PATCH=${TAG%.*}
read -p "==> Build 3 docker images with the following tags (latest, $TAG, $TAG_NO_PATCH)? y/n" -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]
then
docker build -t "tendermint/tendermint" -t "tendermint/tendermint:$TAG" -t "tendermint/tendermint:$TAG_NO_PATCH" .
fi

View File

@@ -1,22 +0,0 @@
#!/usr/bin/env bash
set -e
# Get the tag from the version, or try to figure it out.
if [ -z "$TAG" ]; then
TAG=$(awk -F\" '/TMCoreSemVer =/ { print $2; exit }' < ../version/version.go)
fi
if [ -z "$TAG" ]; then
echo "Please specify a tag."
exit 1
fi
TAG_NO_PATCH=${TAG%.*}
read -p "==> Push 3 docker images with the following tags (latest, $TAG, $TAG_NO_PATCH)? y/n" -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]
then
docker push "tendermint/tendermint:latest"
docker push "tendermint/tendermint:$TAG"
docker push "tendermint/tendermint:$TAG_NO_PATCH"
fi

103
Makefile
View File

@@ -1,6 +1,5 @@
#!/usr/bin/make -f
PACKAGES=$(shell go list ./...)
BUILDDIR ?= $(CURDIR)/build
BUILD_TAGS?=tendermint
@@ -14,8 +13,6 @@ endif
LD_FLAGS = -X github.com/tendermint/tendermint/version.TMVersion=$(VERSION)
BUILD_FLAGS = -mod=readonly -ldflags "$(LD_FLAGS)"
HTTPS_GIT := https://github.com/tendermint/tendermint.git
DOCKER_BUF := docker run -v $(shell pwd):/workspace --workdir /workspace bufbuild/buf
CGO_ENABLED ?= 0
# handle nostrip
@@ -79,32 +76,44 @@ $(BUILDDIR)/:
### Protobuf ###
###############################################################################
proto-all: proto-gen proto-lint proto-check-breaking
.PHONY: proto-all
check-proto-deps:
ifeq (,$(shell which protoc-gen-gogofaster))
$(error "gogofaster plugin for protoc is required. Run 'go install github.com/gogo/protobuf/protoc-gen-gogofaster@latest' to install")
endif
.PHONY: check-proto-deps
proto-gen:
@docker pull -q tendermintdev/docker-build-proto
check-proto-format-deps:
ifeq (,$(shell which clang-format))
$(error "clang-format is required for Protobuf formatting. See instructions for your platform on how to install it.")
endif
.PHONY: check-proto-format-deps
proto-gen: check-proto-deps
@echo "Generating Protobuf files"
@docker run -v $(shell pwd):/workspace --workdir /workspace tendermintdev/docker-build-proto sh ./scripts/protocgen.sh
@go run github.com/bufbuild/buf/cmd/buf generate
@mv ./proto/tendermint/abci/types.pb.go ./abci/types/
.PHONY: proto-gen
proto-lint:
@$(DOCKER_BUF) check lint --error-format=json
# These targets are provided for convenience and are intended for local
# execution only.
proto-lint: check-proto-deps
@echo "Linting Protobuf files"
@go run github.com/bufbuild/buf/cmd/buf lint
.PHONY: proto-lint
proto-format:
proto-format: check-proto-format-deps
@echo "Formatting Protobuf files"
docker run -v $(shell pwd):/workspace --workdir /workspace tendermintdev/docker-build-proto find ./ -not -path "./third_party/*" -name *.proto -exec clang-format -i {} \;
@find . -name '*.proto' -path "./proto/*" -exec clang-format -i {} \;
.PHONY: proto-format
proto-check-breaking:
@$(DOCKER_BUF) check breaking --against-input .git#branch=master
proto-check-breaking: check-proto-deps
@echo "Checking for breaking changes in Protobuf files against local branch"
@echo "Note: This is only useful if your changes have not yet been committed."
@echo " Otherwise read up on buf's \"breaking\" command usage:"
@echo " https://docs.buf.build/breaking/usage"
@go run github.com/bufbuild/buf/cmd/buf breaking --against ".git"
.PHONY: proto-check-breaking
proto-check-breaking-ci:
@$(DOCKER_BUF) check breaking --against-input $(HTTPS_GIT)#branch=master
.PHONY: proto-check-breaking-ci
###############################################################################
### Build ABCI ###
###############################################################################
@@ -118,7 +127,7 @@ install_abci:
.PHONY: install_abci
###############################################################################
### Privval Server ###
### Privval Server ###
###############################################################################
build_privval_server:
@@ -131,11 +140,11 @@ generate_test_cert:
# generate server cerificate
@certstrap request-cert -cn server -ip 127.0.0.1
# self-sign server cerificate with rootCA
@certstrap sign server --CA "root CA"
@certstrap sign server --CA "root CA"
# generate client cerificate
@certstrap request-cert -cn client -ip 127.0.0.1
# self-sign client cerificate with rootCA
@certstrap sign client --CA "root CA"
@certstrap sign client --CA "root CA"
.PHONY: generate_test_cert
###############################################################################
@@ -160,7 +169,7 @@ go.sum: go.mod
draw_deps:
@# requires brew install graphviz or apt-get install graphviz
go get github.com/RobotsAndPencils/goviz
go install github.com/RobotsAndPencils/goviz@latest
@goviz -i github.com/tendermint/tendermint/cmd/tendermint -d 3 | dot -Tpng -o dependency-graph.png
.PHONY: draw_deps
@@ -214,7 +223,8 @@ DESTINATION = ./index.html.md
build-docs:
@cd docs && \
while read -r branch path_prefix; do \
(git checkout $${branch} && npm install && VUEPRESS_BASE="/$${path_prefix}/" npm run build) ; \
( git checkout $${branch} && npm ci --quiet && \
VUEPRESS_BASE="/$${path_prefix}/" npm run build --quiet ) ; \
mkdir -p ~/output/$${path_prefix} ; \
cp -r .vuepress/dist/* ~/output/$${path_prefix}/ ; \
cp ~/output/$${path_prefix}/index.html ~/output ; \
@@ -225,21 +235,34 @@ build-docs:
### Docker image ###
###############################################################################
build-docker: build-linux
cp $(BUILDDIR)/tendermint DOCKER/tendermint
docker build --label=tendermint --tag="tendermint/tendermint" DOCKER
rm -rf DOCKER/tendermint
build-docker:
docker build --label=tendermint --tag="tendermint/tendermint" -f DOCKER/Dockerfile .
.PHONY: build-docker
###############################################################################
### Mocks ###
### Mocks ###
###############################################################################
mockery:
go generate -run="mockery" ./...
go generate -run="./scripts/mockery_generate.sh" ./...
.PHONY: mockery
###############################################################################
### Metrics ###
###############################################################################
metrics: testdata-metrics
go generate -run="scripts/metricsgen" ./...
.PHONY: metrics
# By convention, the go tool ignores subdirectories of directories named
# 'testdata'. This command invokes the generate command on the folder directly
# to avoid this.
testdata-metrics:
ls ./scripts/metricsgen/testdata | xargs -I{} go generate -run="scripts/metricsgen" ./scripts/metricsgen/testdata/{}
.PHONY: testdata-metrics
###############################################################################
### Local testnet using docker ###
###############################################################################
@@ -303,3 +326,25 @@ build-reproducible:
--name latest-build cosmossdk/rbuilder:latest
docker cp -a latest-build:/home/builder/artifacts/ $(CURDIR)/
.PHONY: build-reproducible
# Implements test splitting and running. This is pulled directly from
# the github action workflows for better local reproducibility.
GO_TEST_FILES != find $(CURDIR) -name "*_test.go"
# default to four splits by default
NUM_SPLIT ?= 4
$(BUILDDIR):
mkdir -p $@
# The format statement filters out all packages that don't have tests.
# Note we need to check for both in-package tests (.TestGoFiles) and
# out-of-package tests (.XTestGoFiles).
$(BUILDDIR)/packages.txt:$(GO_TEST_FILES) $(BUILDDIR)
go list -f "{{ if (or .TestGoFiles .XTestGoFiles) }}{{ .ImportPath }}{{ end }}" ./... | sort > $@
split-test-packages:$(BUILDDIR)/packages.txt
split -d -n l/$(NUM_SPLIT) $< $<.
test-group-%:split-test-packages
cat $(BUILDDIR)/packages.txt.$* | xargs go test -mod=readonly -timeout=5m -race -coverprofile=$(BUILDDIR)/$*.profile.out

View File

@@ -3,13 +3,13 @@
![banner](docs/tendermint-core-image.jpg)
[Byzantine-Fault Tolerant](https://en.wikipedia.org/wiki/Byzantine_fault_tolerance)
[State Machines](https://en.wikipedia.org/wiki/State_machine_replication).
[State Machine Replication](https://en.wikipedia.org/wiki/State_machine_replication).
Or [Blockchain](<https://en.wikipedia.org/wiki/Blockchain_(database)>), for short.
[![version](https://img.shields.io/github/tag/tendermint/tendermint.svg)](https://github.com/tendermint/tendermint/releases/latest)
[![API Reference](https://camo.githubusercontent.com/915b7be44ada53c290eb157634330494ebe3e30a/68747470733a2f2f676f646f632e6f72672f6769746875622e636f6d2f676f6c616e672f6764646f3f7374617475732e737667)](https://pkg.go.dev/github.com/tendermint/tendermint)
[![Go version](https://img.shields.io/badge/go-1.16-blue.svg)](https://github.com/moovweb/gvm)
[![Discord chat](https://img.shields.io/discord/669268347736686612.svg)](https://discord.gg/vcExX9T)
[![Discord chat](https://img.shields.io/discord/669268347736686612.svg)](https://discord.gg/cosmosnetwork)
[![license](https://img.shields.io/github/license/tendermint/tendermint.svg)](https://github.com/tendermint/tendermint/blob/master/LICENSE)
[![tendermint/tendermint](https://tokei.rs/b1/github/tendermint/tendermint?category=lines)](https://github.com/tendermint/tendermint)
[![Sourcegraph](https://sourcegraph.com/github.com/tendermint/tendermint/-/badge.svg)](https://sourcegraph.com/github.com/tendermint/tendermint?badge)
@@ -20,25 +20,31 @@ Or [Blockchain](<https://en.wikipedia.org/wiki/Blockchain_(database)>), for shor
Tendermint Core is a Byzantine Fault Tolerant (BFT) middleware that takes a state transition machine - written in any programming language - and securely replicates it on many machines.
For protocol details, see [the specification](https://github.com/tendermint/spec).
For protocol details, refer to the [Tendermint Specification](./spec/README.md).
For detailed analysis of the consensus protocol, including safety and liveness proofs,
see our recent paper, "[The latest gossip on BFT consensus](https://arxiv.org/abs/1807.04938)".
read our paper, "[The latest gossip on BFT consensus](https://arxiv.org/abs/1807.04938)".
## Documentation
Complete documentation can be found on the [website](https://docs.tendermint.com/).
## Releases
Please do not depend on master as your production branch. Use [releases](https://github.com/tendermint/tendermint/releases) instead.
Tendermint has been in the production of private and public environments, most notably the blockchains of the Cosmos Network. we haven't released v1.0 yet since we are making breaking changes to the protocol and the APIs.
Tendermint has been in the production of private and public environments, most notably the blockchains of the Cosmos Network. we haven't released v1.0 yet since we are making breaking changes to the protocol and the APIs.
See below for more details about [versioning](#versioning).
In any case, if you intend to run Tendermint in production, we're happy to help. You can
contact us [over email](mailto:hello@interchain.berlin) or [join the chat](https://discord.gg/vcExX9T).
contact us [over email](mailto:hello@interchain.io) or [join the chat](https://discord.gg/cosmosnetwork).
More on how releases are conducted can be found [here](./RELEASES.md).
## Security
To report a security vulnerability, see our [bug bounty
program](https://hackerone.com/tendermint).
program](https://hackerone.com/cosmos).
For examples of the kinds of bugs we're looking for, see [our security policy](SECURITY.md).
We also maintain a dedicated mailing list for security updates. We will only ever use this mailing list
@@ -48,22 +54,17 @@ to notify you of vulnerabilities and fixes in Tendermint Core. You can subscribe
| Requirement | Notes |
|-------------|------------------|
| Go version | Go1.16 or higher |
## Documentation
Complete documentation can be found on the [website](https://docs.tendermint.com/master/).
| Go version | Go1.17 or higher |
### Install
See the [install instructions](/docs/introduction/install.md).
See the [install instructions](./docs/introduction/install.md).
### Quick Start
- [Single node](/docs/introduction/quick-start.md)
- [Local cluster using docker-compose](/docs/networks/docker-compose.md)
- [Remote cluster using Terraform and Ansible](/docs/networks/terraform-and-ansible.md)
- [Join the Cosmos testnet](https://cosmos.network/testnet)
- [Single node](./docs/introduction/quick-start.md)
- [Local cluster using docker-compose](./docs/tools/docker-compose.md)
- [Remote cluster using Terraform and Ansible](./docs/tools/terraform-and-ansible.md)
## Contributing
@@ -71,9 +72,9 @@ Please abide by the [Code of Conduct](CODE_OF_CONDUCT.md) in all interactions.
Before contributing to the project, please take a look at the [contributing guidelines](CONTRIBUTING.md)
and the [style guide](STYLE_GUIDE.md). You may also find it helpful to read the
[specifications](https://github.com/tendermint/spec), watch the [Developer Sessions](/docs/DEV_SESSIONS.md),
[specifications](./spec/README.md),
and familiarize yourself with our
[Architectural Decision Records](https://github.com/tendermint/tendermint/tree/master/docs/architecture).
[Architectural Decision Records (ADRs)](./docs/architecture/README.md) and [Request For Comments (RFCs)](./docs/rfc/README.md).
## Versioning
@@ -82,32 +83,12 @@ and familiarize yourself with our
Tendermint uses [Semantic Versioning](http://semver.org/) to determine when and how the version changes.
According to SemVer, anything in the public API can change at any time before version 1.0.0
To provide some stability to Tendermint users in these 0.X.X days, the MINOR version is used
to signal breaking changes across a subset of the total public API. This subset includes all
interfaces exposed to other processes (cli, rpc, p2p, etc.), but does not
include the Go APIs.
To provide some stability to users of 0.X.X versions of Tendermint, the MINOR version is used
to signal breaking changes across Tendermint's API. This API includes all
publicly exposed types, functions, and methods in non-internal Go packages as well as
the types and methods accessible via the Tendermint RPC interface.
That said, breaking changes in the following packages will be documented in the
CHANGELOG even if they don't lead to MINOR version bumps:
- crypto
- config
- libs
- bits
- bytes
- json
- log
- math
- net
- os
- protoio
- rand
- sync
- strings
- service
- node
- rpc/client
- types
Breaking changes to these public APIs will be documented in the CHANGELOG.
### Upgrades
@@ -115,7 +96,7 @@ In an effort to avoid accumulating technical debt prior to 1.0.0,
we do not guarantee that breaking changes (ie. bumps in the MINOR version)
will work with existing Tendermint blockchains. In these cases you will
have to start a new blockchain, or write something custom to get the old
data into the new chain. However, any bump in the PATCH version should be
data into the new chain. However, any bump in the PATCH version should be
compatible with existing blockchain histories.
@@ -130,24 +111,23 @@ in [UPGRADING.md](./UPGRADING.md).
## Resources
### Tendermint Core
### Roadmap
For details about the blockchain data structures and the p2p protocols, see the
[Tendermint specification](https://docs.tendermint.com/master/spec/).
We keep a public up-to-date version of our roadmap [here](./docs/roadmap/roadmap.md)
For details on using the software, see the [documentation](/docs/) which is also
hosted at: <https://docs.tendermint.com/master/>
### Libraries
### Tools
Benchmarking is provided by [`tm-load-test`](https://github.com/informalsystems/tm-load-test).
Additional tooling can be found in [/docs/tools](/docs/tools).
- [Cosmos SDK](http://github.com/cosmos/cosmos-sdk); A framework for building applications in Golang
- [Tendermint in Rust](https://github.com/informalsystems/tendermint-rs)
- [ABCI Tower](https://github.com/penumbra-zone/tower-abci)
### Applications
- [Cosmos SDK](http://github.com/cosmos/cosmos-sdk); a cryptocurrency application framework
- [Ethermint](http://github.com/cosmos/ethermint); Ethereum on Tendermint
- [Many more](https://tendermint.com/ecosystem)
- [Cosmos Hub](https://hub.cosmos.network/)
- [Terra](https://www.terra.money/)
- [Celestia](https://celestia.org/)
- [Anoma](https://anoma.network/)
- [Vocdoni](https://docs.vocdoni.io/)
### Research
@@ -160,7 +140,7 @@ Additional tooling can be found in [/docs/tools](/docs/tools).
## Join us!
Tendermint Core is maintained by [Interchain GmbH](https://interchain.berlin).
If you'd like to work full-time on Tendermint Core, [we're hiring](https://interchain-gmbh.breezy.hr/p/682fb7e8a6f601-software-engineer-tendermint-core)!
If you'd like to work full-time on Tendermint Core, [we're hiring](https://interchain-gmbh.breezy.hr/)!
Funding for Tendermint Core development comes primarily from the [Interchain Foundation](https://interchain.io),
a Swiss non-profit. The Tendermint trademark is owned by [Tendermint Inc.](https://tendermint.com), the for-profit entity

343
RELEASES.md Normal file
View File

@@ -0,0 +1,343 @@
# Releases
Tendermint uses modified [semantic versioning](https://semver.org/) with each
release following a `vX.Y.Z` format. Tendermint is currently on major version
0 and uses the minor version to signal breaking changes. The `master` branch is
used for active development and thus it is not advisable to build against it.
The latest changes are always initially merged into `master`.
Releases are specified using tags and are built from long-lived "backport" branches
that are cut from `master` when the release process begins.
Each release "line" (e.g. 0.34 or 0.33) has its own long-lived backport branch,
and the backport branches have names like `v0.34.x` or `v0.33.x`
(literally, `x`; it is not a placeholder in this case). Tendermint only
maintains the last two releases at a time (the oldest release is predominantly
just security patches).
## Backporting
As non-breaking changes land on `master`, they should also be backported
to these backport branches.
We use Mergify's [backport feature](https://mergify.io/features/backports) to automatically backport
to the needed branch. There should be a label for any backport branch that you'll be targeting.
To notify the bot to backport a pull request, mark the pull request with the label corresponding
to the correct backport branch. For example, to backport to v0.35.x, add the label `S:backport-to-v0.35.x`.
Once the original pull request is merged, the bot will try to cherry-pick the pull request
to the backport branch. If the bot fails to backport, it will open a pull request.
The author of the original pull request is responsible for solving the conflicts and
merging the pull request.
### Creating a backport branch
If this is the first release candidate for a minor version release, e.g.
v0.25.0, you get to have the honor of creating the backport branch!
Note that, after creating the backport branch, you'll also need to update the
tags on `master` so that `go mod` is able to order the branches correctly. You
should tag `master` with a "dev" tag that is "greater than" the backport
branches tags. See [#6072](https://github.com/tendermint/tendermint/pull/6072)
for more context.
In the following example, we'll assume that we're making a backport branch for
the 0.35.x line.
1. Start on `master`
2. Create and push the backport branch:
```sh
git checkout -b v0.35.x
git push origin v0.35.x
```
3. Create a PR to update the documentation directory for the backport branch.
We only maintain RFC and ADR documents on master, to avoid confusion.
In addition, we rewrite Markdown URLs pointing to master to point to the
backport branch, so that generated documentation will link to the correct
versions of files elsewhere in the repository. For context on the latter,
see https://github.com/tendermint/tendermint/issues/7675.
To prepare the PR:
```sh
# Remove the RFC and ADR documents from the backport.
# We only maintain these on master to avoid confusion.
git rm -r docs/rfc docs/architecture
# Update absolute links to point to the backport.
go run ./scripts/linkpatch -recur -target v0.35.x -skip-path docs/DOCS_README.md,docs/README.md docs
# Create and push the PR.
git checkout -b update-docs-v035x
git commit -m "Update docs for v0.35.x backport branch." docs
git push -u origin update-docs-v035x
```
Be sure to merge this PR before making other changes on the newly-created
backport branch.
After doing these steps, go back to `master` and do the following:
1. Tag `master` as the dev branch for the _next_ minor version release and push
it up to GitHub.
For example:
```sh
git tag -a v0.36.0-dev -m "Development base for Tendermint v0.36."
git push origin v0.36.0-dev
```
2. Create a new workflow to run e2e nightlies for the new backport branch.
(See [e2e-nightly-master.yml][e2e] for an example.)
3. Add a new section to the Mergify config (`.github/mergify.yml`) to enable the
backport bot to work on this branch, and add a corresponding `S:backport-to-v0.35.x`
[label](https://github.com/tendermint/tendermint/labels) so the bot can be triggered.
4. Add a new section to the Dependabot config (`.github/dependabot.yml`) to
enable automatic update of Go dependencies on this branch. Copy and edit one
of the existing branch configurations to set the correct `target-branch`.
[e2e]: https://github.com/tendermint/tendermint/blob/master/.github/workflows/e2e-nightly-master.yml
## Release candidates
Before creating an official release, especially a minor release, we may want to create a
release candidate (RC) for our friends and partners to test out. We use git tags to
create RCs, and we build them off of backport branches.
Tags for RCs should follow the "standard" release naming conventions, with `-rcX` at the end
(for example, `v0.35.0-rc0`).
(Note that branches and tags _cannot_ have the same names, so it's important that these branches
have distinct names from the tags/release names.)
If this is the first RC for a minor release, you'll have to make a new backport branch (see above).
Otherwise:
1. Start from the backport branch (e.g. `v0.35.x`).
2. Run the integration tests and the e2e nightlies
(which can be triggered from the Github UI;
e.g., https://github.com/tendermint/tendermint/actions/workflows/e2e-nightly-34x.yml).
3. Prepare the changelog:
- Move the changes included in `CHANGELOG_PENDING.md` into `CHANGELOG.md`. Each RC should have
it's own changelog section. These will be squashed when the final candidate is released.
- Run `python ./scripts/linkify_changelog.py CHANGELOG.md` to add links for
all PRs
- Ensure that `UPGRADING.md` is up-to-date and includes notes on any breaking changes
or other upgrading flows.
- Bump TMVersionDefault version in `version.go`
- Bump P2P and block protocol versions in `version.go`, if necessary.
Check the changelog for breaking changes in these components.
- Bump ABCI protocol version in `version.go`, if necessary
4. Open a PR with these changes against the backport branch.
5. Once these changes have landed on the backport branch, be sure to pull them back down locally.
6. Once you have the changes locally, create the new tag, specifying a name and a tag "message":
`git tag -a v0.35.0-rc0 -m "Release Candidate v0.35.0-rc0`
7. Push the tag back up to origin:
`git push origin v0.35.0-rc0`
Now the tag should be available on the repo's releases page.
8. Future RCs will continue to be built off of this branch.
Note that this process should only be used for "true" RCs--
release candidates that, if successful, will be the next release.
For more experimental "RCs," create a new, short-lived branch and tag that instead.
## Minor release
This minor release process assumes that this release was preceded by release candidates.
If there were no release candidates, begin by creating a backport branch, as described above.
Before performing these steps, be sure the [Minor Release Checklist](#minor-release-checklist) has been completed.
1. Start on the backport branch (e.g. `v0.35.x`)
2. Run integration tests (`make test_integrations`) and the e2e nightlies.
3. Prepare the release:
- "Squash" changes from the changelog entries for the RCs into a single entry,
and add all changes included in `CHANGELOG_PENDING.md`.
(Squashing includes both combining all entries, as well as removing or simplifying
any intra-RC changes. It may also help to alphabetize the entries by package name.)
- Run `python ./scripts/linkify_changelog.py CHANGELOG.md` to add links for
all PRs
- Ensure that `UPGRADING.md` is up-to-date and includes notes on any breaking changes
or other upgrading flows.
- Bump TMVersionDefault version in `version.go`
- Bump P2P and block protocol versions in `version.go`, if necessary
- Bump ABCI protocol version in `version.go`, if necessary
4. Open a PR with these changes against the backport branch.
5. Once these changes are on the backport branch, push a tag with prepared release details.
This will trigger the actual release `v0.35.0`.
- `git tag -a v0.35.0 -m 'Release v0.35.0'`
- `git push origin v0.35.0`
6. Make sure that `master` is updated with the latest `CHANGELOG.md`, `CHANGELOG_PENDING.md`, and `UPGRADING.md`.
7. Add the release to the documentation site generator config (see
[DOCS_README.md](./docs/DOCS_README.md) for more details). In summary:
- Start on branch `master`.
- Add a new line at the bottom of [`docs/versions`](./docs/versions) to
ensure the newest release is the default for the landing page.
- Add a new entry to `themeConfig.versions` in
[`docs/.vuepress/config.js`](./docs/.vuepress/config.js) to include the
release in the dropdown versions menu.
- Commit these changes to `master` and backport them into the backport
branch for this release.
## Patch release
Patch releases are done differently from minor releases: They are built off of
long-lived backport branches, rather than from master. As non-breaking changes
land on `master`, they should also be backported into these backport branches.
Patch releases don't have release candidates by default, although any tricky
changes may merit a release candidate.
To create a patch release:
1. Checkout the long-lived backport branch: `git checkout v0.35.x`
2. Run integration tests (`make test_integrations`) and the nightlies.
3. Check out a new branch and prepare the release:
- Copy `CHANGELOG_PENDING.md` to top of `CHANGELOG.md`
- Run `python ./scripts/linkify_changelog.py CHANGELOG.md` to add links for all issues
- Run `bash ./scripts/authors.sh` to get a list of authors since the latest release, and add the GitHub aliases of external contributors to the top of the CHANGELOG. To lookup an alias from an email, try `bash ./scripts/authors.sh <email>`
- Reset the `CHANGELOG_PENDING.md`
- Bump the TMDefaultVersion in `version.go`
- Bump the ABCI version number, if necessary.
(Note that ABCI follows semver, and that ABCI versions are the only versions
which can change during patch releases, and only field additions are valid patch changes.)
4. Open a PR with these changes that will land them back on `v0.35.x`
5. Once this change has landed on the backport branch, make sure to pull it locally, then push a tag.
- `git tag -a v0.35.1 -m 'Release v0.35.1'`
- `git push origin v0.35.1`
6. Create a pull request back to master with the CHANGELOG & version changes from the latest release.
- Remove all `R:patch` labels from the pull requests that were included in the release.
- Do not merge the backport branch into master.
## Minor Release Checklist
The following set of steps are performed on all releases that increment the
_minor_ version, e.g. v0.25 to v0.26. These steps ensure that Tendermint is
well tested, stable, and suitable for adoption by the various diverse projects
that rely on Tendermint.
### Feature Freeze
Ahead of any minor version release of Tendermint, the software enters 'Feature
Freeze' for at least two weeks. A feature freeze means that _no_ new features
are added to the code being prepared for release. No code changes should be made
to the code being released that do not directly improve pressing issues of code
quality. The following must not be merged during a feature freeze:
* Refactors that are not related to specific bug fixes.
* Dependency upgrades.
* New test code that does not test a discovered regression.
* New features of any kind.
* Documentation or spec improvements that are not related to the newly developed
code.
This period directly follows the creation of the [backport
branch](#creating-a-backport-branch). The Tendermint team instead directs all
attention to ensuring that the existing code is stable and reliable. Broken
tests are fixed, flakey-tests are remedied, end-to-end test failures are
thoroughly diagnosed and all efforts of the team are aimed at improving the
quality of the code. During this period, the upgrade harness tests are run
repeatedly and a variety of in-house testnets are run to ensure Tendermint
functions at the scale it will be used by application developers and node
operators.
### Nightly End-To-End Tests
The Tendermint team maintains [a set of end-to-end
tests](https://github.com/tendermint/tendermint/blob/master/test/e2e/README.md#L1)
that run each night on the latest commit of the project and on the code in the
tip of each supported backport branch. These tests start a network of containerized
Tendermint processes and run automated checks that the network functions as
expected in both stable and unstable conditions. During the feature freeze,
these tests are run nightly and must pass consistently for a release of
Tendermint to be considered stable.
### Upgrade Harness
> TODO(williambanfield): Change to past tense and clarify this section once
> upgrade harness is complete.
The Tendermint team is creating an upgrade test harness to exercise the
workflow of stopping an instance of Tendermint running one version of the
software and starting up the same application running the next version. To
support upgrade testing, we will add the ability to terminate the Tendermint
process at specific pre-defined points in its execution so that we can verify
upgrades work in a representative sample of stop conditions.
### Large Scale Testnets
The Tendermint end-to-end tests run a small network (~10s of nodes) to exercise
basic consensus interactions. Real world deployments of Tendermint often have over
a hundred nodes just in the validator set, with many others acting as full
nodes and sentry nodes. To gain more assurance before a release, we will also run
larger-scale test networks to shake out emergent behaviors at scale.
Large-scale test networks are run on a set of virtual machines (VMs). Each VM
is equipped with 4 Gigabytes of RAM and 2 CPU cores. The network runs a very
simple key-value store application. The application adds artificial delays to
different ABCI calls to simulate a slow application. Each testnet is briefly
run with no load being generated to collect a baseline performance. Once
baseline is captured, a consistent load is applied across the network. This
load takes the form of 10% of the running nodes all receiving a consistent
stream of two hundred transactions per minute each.
During each test net, the following metrics are monitored and collected on each
node:
* Consensus rounds per height
* Maximum connected peers, Minimum connected peers, Rate of change of peer connections
* Memory resident set size
* CPU utilization
* Blocks produced per minute
* Seconds for each step of consensus (Propose, Prevote, Precommit, Commit)
* Latency to receive block proposals
For these tests we intentionally target low-powered host machines (with low core
counts and limited memory) to ensure we observe similar kinds of resource contention
and limitation that real-world deployments of Tendermint experience in production.
#### 200 Node Testnet
To test the stability and performance of Tendermint in a real world scenario,
a 200 node test network is run. The network comprises 5 seed nodes, 100
validators and 95 non-validating full nodes. All nodes begin by dialing
a subset of the seed nodes to discover peers. The network is run for several
days, with metrics being collected continuously. In cases of changes to performance
critical systems, testnets of larger sizes should be considered.
#### Rotating Node Testnet
Real-world deployments of Tendermint frequently see new nodes arrive and old
nodes exit the network. The rotating node testnet ensures that Tendermint is
able to handle this reliably. In this test, a network with 10 validators and
3 seed nodes is started. A rolling set of 25 full nodes are started and each
connects to the network by dialing one of the seed nodes. Once the node is able
to blocksync to the head of the chain and begins producing blocks using
Tendermint consensus it is stopped. Once stopped, a new node is started and
takes its place. This network is run for several days.
#### Network Partition Testnet
Tendermint is expected to recover from network partitions. A partition where no
subset of the nodes is left with the super-majority of the stake is expected to
stop making blocks. Upon alleviation of the partition, the network is expected
to once again become fully connected and capable of producing blocks. The
network partition testnet ensures that Tendermint is able to handle this
reliably at scale. In this test, a network with 100 validators and 95 full
nodes is started. All validators have equal stake. Once the network is
producing blocks, a set of firewall rules is deployed to create a partitioned
network with 50% of the stake on one side and 50% on the other. Once the
network stops producing blocks, the firewall rules are removed and the nodes
are monitored to ensure they reconnect and that the network again begins
producing blocks.
#### Absent Stake Testnet
Tendermint networks often run with _some_ portion of the voting power offline.
The absent stake testnet ensures that large networks are able to handle this
reliably. A set of 150 validator nodes and three seed nodes is started. The set
of 150 validators is configured to only possess a cumulative stake of 67% of
the total stake. The remaining 33% of the stake is configured to belong to
a validator that is never actually run in the test network. The network is run
for multiple days, ensuring that it is able to produce blocks without issue.

View File

@@ -4,7 +4,7 @@
As part of our [Coordinated Vulnerability Disclosure
Policy](https://tendermint.com/security), we operate a [bug
bounty](https://hackerone.com/tendermint).
bounty](https://hackerone.com/cosmos).
See the policy for more details on submissions and rewards, and see "Example Vulnerabilities" (below) for examples of the kinds of bugs we're most interested in.
### Guidelines
@@ -86,7 +86,7 @@ If you are running older versions of Tendermint Core, we encourage you to upgrad
## Scope
The full scope of our bug bounty program is outlined on our [Hacker One program page](https://hackerone.com/tendermint). Please also note that, in the interest of the safety of our users and staff, a few things are explicitly excluded from scope:
The full scope of our bug bounty program is outlined on our [Hacker One program page](https://hackerone.com/cosmos). Please also note that, in the interest of the safety of our users and staff, a few things are explicitly excluded from scope:
* Any third-party services
* Findings from physical testing, such as office access

View File

@@ -2,7 +2,220 @@
This guide provides instructions for upgrading to specific versions of Tendermint Core.
## Unreleased
## v0.36
### ABCI Changes
### ResponseCheckTx Parameter Change
`ResponseCheckTx` had fields that are not used by Tendermint, they are now removed.
In 0.36, we removed the following fields, from `ResponseCheckTx`: `Log`, `Info`, `Events`,
`GasUsed` and `MempoolError`.
`MempoolError` was used to signal to operators that a transaction was rejected from the mempool
by Tendermint itself. Right now, we return a regular error when this happens.
#### ABCI++
For information on how ABCI++ works, see the
[Specification](spec/abci%2B%2B/README.md).
In particular, the simplest way to upgrade your application is described
[here](spec/abci%2B%2B/abci++_tmint_expected_behavior.md#adapting-existing-applications-that-use-abci).
#### Moving the `app_hash` parameter
The Application's hash (or any data representing the Application's current
state) is known by the time `FinalizeBlock` finishes its execution.
Accordingly, the `app_hash` parameter has been moved from `ResponseCommit` to
`ResponseFinalizeBlock`, since it makes sense for the Application to return
this value as soon as is it known.
#### ABCI Mutex
In previous versions of ABCI, Tendermint was prevented from making
concurrent calls to ABCI implementations by virtue of mutexes in the
implementation of Tendermint's ABCI infrastructure. These mutexes have
been removed from the current implementation and applications will now
be responsible for managing their own concurrency control.
To replicate the prior semantics, ensure that ABCI applications have a
single mutex that protects all ABCI method calls from concurrent
access. You can relax these requirements if your application can
provide safe concurrent access via other means. This safety is an
application concern so be very sure to test the application thoroughly
using realistic workloads and the race detector to ensure your
applications remains correct.
### Config Changes
- We have added a new, experimental tool to help operators migrate
configuration files created by previous versions of Tendermint.
To try this tool, run:
```shell
# Install the tool.
go install github.com/tendermint/tendermint/scripts/confix@latest
# Run the tool with the old configuration file as input.
# Replace the -config argument with your path.
confix -config ~/.tendermint/config/config.toml -out updated.toml
```
This tool should be able to update configurations from v0.34 and v0.35. We
plan to extend it to handle older configuration files in the future. For now,
it will report an error (without making any changes) if it does not recognize
the version that created the file.
- The default configuration for a newly-created node now disables indexing for
ABCI event metadata. Existing node configurations that already have indexing
turned on are not affected. Operators who wish to enable indexing for a new
node, however, must now edit the `config.toml` explicitly.
- The function of seed nodes was modified in the past release. Now, seed nodes
are treated identically to any other peer, however they only run the PEX
reactor. Because of this `seeds` has been removed from the config. Users
should add any seed nodes in the list of `bootstrap-peers`.
### RPC Changes
Tendermint v0.36 adds a new RPC event subscription API. The existing event
subscription API based on websockets is now deprecated. It will continue to
work throughout the v0.36 release, but the `subscribe`, `unsubscribe`, and
`unsubscribe_all` methods, along with websocket support, will be removed in
Tendermint v0.37. Callers currently using these features should migrate as
soon as is practical to the new API.
To enable the new API, node operators set a new `event-log-window-size`
parameter in the `[rpc]` section of the `config.toml` file. This defines a
duration of time during which the node will log all events published to the
event bus for use by RPC consumers.
Consumers use the new `events` JSON-RPC method to poll for events matching
their query in the log. Unlike the streaming API, events are not discarded if
the caller is slow, loses its connection, or crashes. As long as the client
recovers before its events expire from the log window, it will be able to
replay and catch up after recovering. Also unlike the streaming API, the client
can tell if it has truly missed events because they have expired from the log.
The `events` method is a normal JSON-RPC method, and does not require any
non-standard response processing (in contrast with the old `subscribe`).
Clients can modify their query at any time, and no longer need to coordinate
subscribe and unsubscribe calls to handle multiple queries.
The Go client implementations in the Tendermint Core repository have all been
updated to add a new `Events` method, including the light client proxy.
A new `rpc/client/eventstream` package has also been added to make it easier
for users to update existing use of the streaming API to use the polling API
The `eventstream` package handles polling and delivers matching events to a
callback.
For more detailed information, see [ADR 075](https://tinyurl.com/adr075) which
defines and describes the new API in detail.
#### BroadcastTx Methods
All callers should use the new `broadcast_tx` method, which has the
same semantics as the legacy `broadcast_tx_sync` method. The
`broadcast_tx_sync` and `broadcast_tx_async` methods are now
deprecated and will be removed in 0.37.
Additionally the `broadcast_tx_commit` method is *also* deprecated,
and will be removed in 0.37. Client code that submits a transaction
and needs to wait for it to be committed to the chain, should poll
the tendermint to observe the transaction in the committed state.
### Timeout Parameter Changes
Tendermint v0.36 updates how the Tendermint consensus timing parameters are
configured. These parameters, `timeout-propose`, `timeout-propose-delta`,
`timeout-prevote`, `timeout-prevote-delta`, `timeout-precommit`,
`timeout-precommit-delta`, `timeout-commit`, and `skip-timeout-commit`, were
previously configured in `config.toml`. These timing parameters have moved and
are no longer configured in the `config.toml` file. These parameters have been
migrated into the `ConsensusParameters`. Nodes with these parameters set in the
local configuration file will see a warning logged on startup indicating that
these parameters are no longer used.
These parameters have also been pared-down. There are no longer separate
parameters for both the `prevote` and `precommit` phases of Tendermint. The
separate `timeout-prevote` and `timeout-precommit` parameters have been merged
into a single `timeout-vote` parameter that configures both of these similar
phases of the consensus protocol.
A set of reasonable defaults have been put in place for these new parameters
that will take effect when the node starts up in version v0.36. New chains
created using v0.36 and beyond will be able to configure these parameters in the
chain's `genesis.json` file. Chains that upgrade to v0.36 from a previous
compatible version of Tendermint will begin running with the default values.
Upgrading applications that wish to use different values from the defaults for
these parameters may do so by setting the `ConsensusParams.Timeout` field of the
`FinalizeBlock` `ABCI` response.
As a safety measure in case of unusual timing issues during the upgrade to
v0.36, an operator may override the consensus timeout values for a single node.
Note, however, that these overrides will be removed in Tendermint v0.37. See
[configuration](https://github.com/tendermint/tendermint/blob/master/docs/nodes/configuration.md)
for more information about these overrides.
For more discussion of this, see [ADR 074](https://tinyurl.com/adr074), which
lays out the reasoning for the changes as well as [RFC
009](https://tinyurl.com/rfc009) for a discussion of the complexities of
upgrading consensus parameters.
### RecheckTx Parameter Change
`RecheckTx` was previously enabled by the `recheck` parameter in the mempool
section of the `config.toml`.
Setting it to true made Tendermint invoke another `CheckTx` ABCI call on
each transaction remaining in the mempool following the execution of a block.
Similar to the timeout parameter changes, this parameter makes more sense as a
network-wide coordinated variable so that applications can be written knowing
either all nodes agree on whether to run `RecheckTx`.
Applications can turn on `RecheckTx` by altering the `ConsensusParams` in the
`FinalizeBlock` ABCI response.
### CLI Changes
The functionality around resetting a node has been extended to make it safer. The
`unsafe-reset-all` command has been replaced by a `reset` command with four
subcommands: `blockchain`, `peers`, `unsafe-signer` and `unsafe-all`.
- `tendermint reset blockchain`: Clears a node of all blocks, consensus state, evidence,
and indexed transactions. NOTE: This command does not reset application state.
If you need to rollback the last application state (to recover from application
nondeterminism), see instead the `tendermint rollback` command.
- `tendermint reset peers`: Clears the peer store, which persists information on peers used
by the networking layer. This can be used to get rid of stale addresses or to switch
to a predefined set of static peers.
- `tendermint reset unsafe-signer`: Resets the watermark level of the PrivVal File signer
allowing it to sign votes from the genesis height. This should only be used in testing as
it can lead to the node double signing.
- `tendermint reset unsafe-all`: A summation of the other three commands. This will delete
the entire `data` directory which may include application data as well.
### Go API Changes
#### `crypto` Package Cleanup
The `github.com/tendermint/tendermint/crypto/tmhash` package was removed
to improve clarity. Users are encouraged to use the standard library
`crypto/sha256` package directly. However, as a convenience, some constants
and one function have moved to the Tendermint `crypto` package:
- The `crypto.Checksum` function returns the sha256 checksum of a
byteslice. This is a wrapper around `sha256.Sum265` from the
standard libary, but provided as a function to ease type
requirements (the library function returns a `[32]byte` rather than
a `[]byte`).
- `tmhash.TruncatedSize` is now `crypto.AddressSize` which was
previously an alias for the same value.
- `tmhash.Size` and `tmhash.BlockSize` are now `crypto.HashSize` and
`crypto.HashSize`.
- `tmhash.SumTruncated` is now available via `crypto.AddressHash` or by
`crypto.Checksum(<...>)[:crypto.AddressSize]`
## v0.35
### ABCI Changes
@@ -17,17 +230,26 @@ This guide provides instructions for upgrading to specific versions of Tendermin
### Config Changes
* `fast_sync = "v1"` and `fast_sync = "v2"` are no longer supported. Please use `v0` instead.
* The configuration file field `[fastsync]` has been renamed to `[blocksync]`.
* The top level configuration file field `fast-sync` has moved under the new `[blocksync]`
field as `blocksync.enable`.
* `blocksync.version = "v1"` and `blocksync.version = "v2"` (previously `fastsync`)
are no longer supported. Please use `v0` instead. During the v0.35 release cycle, `v0` was
determined to suit the existing needs and the cost of maintaining the `v1` and `v2` modules
was determined to be greater than necessary.
* All config parameters are now hyphen-case (also known as kebab-case) instead of snake_case. Before restarting the node make sure
you have updated all the variables in your `config.toml` file.
* Added `--mode` flag and `mode` config variable on `config.toml` for setting Mode of the Node: `full` | `validator` | `seed` (default: `full`)
[ADR-52](https://github.com/tendermint/tendermint/blob/master/docs/architecture/adr-052-tendermint-mode.md)
* `BootstrapPeers` has been added as part of the new p2p stack. This will eventually replace
`Seeds`. Bootstrap peers are connected with on startup if needed for peer discovery. Unlike
persistent peers, there's no gaurantee that the node will remain connected with these peers.
persistent peers, there's no gaurantee that the node will remain connected with these peers.
* configuration values starting with `priv-validator-` have moved to the new
`priv-validator` section, without the `priv-validator-` prefix.
@@ -35,10 +257,36 @@ This guide provides instructions for upgrading to specific versions of Tendermin
* The fast sync process as well as the blockchain package and service has all
been renamed to block sync
### Database Key Format Changes
The format of all tendermint on-disk database keys changes in
0.35. Upgrading nodes must either re-sync all data or run a migration
script provided in this release.
The script located in
`github.com/tendermint/tendermint/scripts/keymigrate/migrate.go` provides the
function `Migrate(context.Context, db.DB)` which you can operationalize as
makes sense for your deployment.
For ease of use the `tendermint` command includes a CLI version of the
migration script, which you can invoke, as in:
tendermint key-migrate
This reads the configuration file as normal and allows the `--db-backend` and
`--db-dir` flags to override the database location as needed.
The migration operation is intended to be idempotent, and should be safe to
rerun on the same database multiple times. As a safety measure, however, we
recommend that operators test out the migration on a copy of the database
first, if it is practical to do so, before applying it to the production data.
### CLI Changes
* You must now specify the node mode (validator|full|seed) in `tendermint init [mode]`
* The `--fast-sync` command line option has been renamed to `--blocksync.enable`
* If you had previously used `tendermint gen_node_key` to generate a new node
key, keep in mind that it no longer saves the output to a file. You can use
`tendermint init validator` or pipe the output of `tendermint gen_node_key` to
@@ -53,8 +301,8 @@ This guide provides instructions for upgrading to specific versions of Tendermin
### API Changes
The p2p layer was reimplemented as part of the 0.35 release cycle, and
all reactors were refactored. As part of that work these
The p2p layer was reimplemented as part of the 0.35 release cycle and
all reactors were refactored to accomodate the change. As part of that work these
implementations moved into the `internal` package and are no longer
considered part of the public Go API of tendermint. These packages
are:
@@ -66,7 +314,7 @@ are:
- `blockchain`
- `evidence`
Accordingly, the space `node` package was changed to reduce access to
Accordingly, the `node` package changed to reduce access to
tendermint internals: applications that use tendermint as a library
will need to change to accommodate these changes. Most notably:
@@ -77,10 +325,100 @@ will need to change to accommodate these changes. Most notably:
longer exported and have been replaced with `node.New` and
`node.NewDefault` which provide more functional interfaces.
### RPC changes
To access any of the functionality previously available via the
`node.Node` type, use the `*local.Local` "RPC" client, that exposes
the full RPC interface provided as direct function calls. Import the
`github.com/tendermint/tendermint/rpc/client/local` package and pass
the node service as in the following:
```go
logger := log.NewNopLogger()
// Construct and start up a node with default settings.
node := node.NewDefault(logger)
// Construct a local (in-memory) RPC client to the node.
client := local.New(logger, node.(local.NodeService))
```
### gRPC Support
Mark gRPC in the RPC layer as deprecated and to be removed in 0.36.
### Peer Management Interface
When running with the new P2P Layer, the methods `UnsafeDialSeeds` and
`UnsafeDialPeers` RPC methods will always return an error. They are
deprecated and will be removed in 0.36 when the legacy peer stack is
removed.
Additionally the format of the Peer list returned in the `NetInfo`
method changes in this release to accommodate the different way that
the new stack tracks data about peers. This change affects users of
both stacks.
### Using the updated p2p library
The P2P library was reimplemented in this release. The new implementation is
enabled by default in this version of Tendermint. The legacy implementation is still
included in this version of Tendermint as a backstop to work around unforeseen
production issues. The new and legacy version are interoperable. If necessary,
you can enable the legacy implementation in the server configuration file.
To make use of the legacy P2P implemementation add or update the following field of
your server's configuration file under the `[p2p]` section:
```toml
[p2p]
...
use-legacy = true
...
```
If you need to do this, please consider filing an issue in the Tendermint repository
to let us know why. We plan to remove the legacy P2P code in the next (v0.36) release.
#### New p2p queue types
The new p2p implementation enables selection of the queue type to be used for
passing messages between peers.
The following values may be used when selecting which queue type to use:
* `fifo`: (**default**) An unbuffered and lossless queue that passes messages through
in the order in which they were received.
* `priority`: A priority queue of messages.
* `wdrr`: A queue implementing the Weighted Deficit Round Robin algorithm. A
weighted deficit round robin queue is created per peer. Each queue contains a
separate 'flow' for each of the channels of communication that exist between any two
peers. Tendermint maintains a channel per message type between peers. Each WDRR
queue maintains a shared buffered with a fixed capacity through which messages on different
flows are passed.
For more information on WDRR scheduling, see: https://en.wikipedia.org/wiki/Deficit_round_robin
To select a queue type, add or update the following field under the `[p2p]`
section of your server's configuration file.
```toml
[p2p]
...
queue-type = wdrr
...
```
### Support for Custom Reactor and Mempool Implementations
The changes to p2p layer removed existing support for custom
reactors. Based on our understanding of how this functionality was
used, the introduction of the prioritized mempool covers nearly all of
the use cases for custom reactors. If you are currently running custom
reactors and mempools and are having trouble seeing the migration path
for your project please feel free to reach out to the Tendermint Core
development team directly.
## v0.34.0
**Upgrading to Tendermint 0.34 requires a blockchain restart.**
@@ -97,7 +435,7 @@ Note also that Tendermint 0.34 also requires Go 1.16 or higher.
were added to support the new State Sync feature.
Previously, syncing a new node to a preexisting network could take days; but with State Sync,
new nodes are able to join a network in a matter of seconds.
Read [the spec](https://docs.tendermint.com/master/spec/abci/apps.html#state-sync)
Read [the spec](https://github.com/tendermint/tendermint/blob/master/spec/abci/apps.md)
if you want to learn more about State Sync, or if you'd like your application to use it.
(If you don't want to support State Sync in your application, you can just implement these new
ABCI methods as no-ops, leaving them empty.)
@@ -222,7 +560,6 @@ The `bech32` package has moved to the Cosmos SDK:
### CLI
The `tendermint lite` command has been renamed to `tendermint light` and has a slightly different API.
See [the docs](https://docs.tendermint.com/master/tendermint-core/light-client-protocol.html#http-proxy) for details.
### Light Client
@@ -234,8 +571,8 @@ Other user-relevant changes include:
* The old `lite` package was removed; the new light client uses the `light` package.
* The `Verifier` was broken up into two pieces:
* Core verification logic (pure `VerifyX` functions)
* `Client` object, which represents the complete light client
* Core verification logic (pure `VerifyX` functions)
* `Client` object, which represents the complete light client
* The new light clients stores headers & validator sets as `LightBlock`s
* The RPC client can be found in the `/rpc` directory.
* The HTTP(S) proxy is located in the `/proxy` directory.
@@ -367,12 +704,12 @@ Evidence Params has been changed to include duration.
### Go API
* `libs/common` has been removed in favor of specific pkgs.
* `async`
* `service`
* `rand`
* `net`
* `strings`
* `cmap`
* `async`
* `service`
* `rand`
* `net`
* `strings`
* `cmap`
* removal of `errors` pkg
### RPC Changes
@@ -441,9 +778,9 @@ Prior to the update, suppose your `ResponseDeliverTx` look like:
```go
abci.ResponseDeliverTx{
Tags: []kv.Pair{
{Key: []byte("sender"), Value: []byte("foo")},
{Key: []byte("recipient"), Value: []byte("bar")},
{Key: []byte("amount"), Value: []byte("35")},
{Key: []byte("sender"), Value: []byte("foo")},
{Key: []byte("recipient"), Value: []byte("bar")},
{Key: []byte("amount"), Value: []byte("35")},
}
}
```
@@ -462,14 +799,14 @@ the following `Events`:
```go
abci.ResponseDeliverTx{
Events: []abci.Event{
{
Type: "transfer",
Attributes: kv.Pairs{
{Key: []byte("sender"), Value: []byte("foo")},
{Key: []byte("recipient"), Value: []byte("bar")},
{Key: []byte("amount"), Value: []byte("35")},
},
}
{
Type: "transfer",
Attributes: kv.Pairs{
{Key: []byte("sender"), Value: []byte("foo")},
{Key: []byte("recipient"), Value: []byte("bar")},
{Key: []byte("amount"), Value: []byte("35")},
},
}
}
```
@@ -497,7 +834,7 @@ the compilation tag:
Use `cleveldb` tag instead of `gcc` to compile Tendermint with CLevelDB or
use `make build_c` / `make install_c` (full instructions can be found at
<https://tendermint.com/docs/introduction/install.html#compile-with-cleveldb-support>)
<https://docs.tendermint.com/v0.35/introduction/install.html)
## v0.31.0
@@ -517,9 +854,9 @@ In this case, the WS client will receive an error with description:
"jsonrpc": "2.0",
"id": "{ID}#event",
"error": {
"code": -32000,
"msg": "Server error",
"data": "subscription was canceled (reason: client is not pulling messages fast enough)" // or "subscription was canceled (reason: Tendermint exited)"
"code": -32000,
"msg": "Server error",
"data": "subscription was canceled (reason: client is not pulling messages fast enough)" // or "subscription was canceled (reason: Tendermint exited)"
}
}
@@ -725,9 +1062,9 @@ just the `Data` field set:
```go
[]ProofOp{
ProofOp{
Data: <proof bytes>,
}
ProofOp{
Data: <proof bytes>,
}
}
```

View File

@@ -19,7 +19,7 @@ To get up and running quickly, see the [getting started guide](../docs/app-dev/g
A detailed description of the ABCI methods and message types is contained in:
- [The main spec](https://github.com/tendermint/spec/blob/master/spec/abci/abci.md)
- [The main spec](../spec/abci/abci.md)
- [A protobuf file](../proto/tendermint/abci/types.proto)
- [A Go interface](./types/application.go)

View File

@@ -1,4 +1,4 @@
package abcicli
package abciclient
import (
"context"
@@ -6,7 +6,7 @@ import (
"sync"
"github.com/tendermint/tendermint/abci/types"
tmsync "github.com/tendermint/tendermint/internal/libs/sync"
"github.com/tendermint/tendermint/libs/log"
"github.com/tendermint/tendermint/libs/service"
)
@@ -15,142 +15,57 @@ const (
echoRetryIntervalSeconds = 1
)
//go:generate mockery --case underscore --name Client
//go:generate ../../scripts/mockery_generate.sh Client
// Client defines an interface for an ABCI client.
//
// All `Async` methods return a `ReqRes` object and an error.
// All `Sync` methods return the appropriate protobuf ResponseXxx struct and an error.
// Client defines the interface for an ABCI client.
//
// NOTE these are client errors, eg. ABCI socket connectivity issues.
// Application-related errors are reflected in response via ABCI error codes
// and logs.
// and (potentially) error response.
type Client interface {
service.Service
types.Application
SetResponseCallback(Callback)
Error() error
// Asynchronous requests
FlushAsync(context.Context) (*ReqRes, error)
EchoAsync(ctx context.Context, msg string) (*ReqRes, error)
InfoAsync(context.Context, types.RequestInfo) (*ReqRes, error)
DeliverTxAsync(context.Context, types.RequestDeliverTx) (*ReqRes, error)
CheckTxAsync(context.Context, types.RequestCheckTx) (*ReqRes, error)
QueryAsync(context.Context, types.RequestQuery) (*ReqRes, error)
CommitAsync(context.Context) (*ReqRes, error)
InitChainAsync(context.Context, types.RequestInitChain) (*ReqRes, error)
BeginBlockAsync(context.Context, types.RequestBeginBlock) (*ReqRes, error)
EndBlockAsync(context.Context, types.RequestEndBlock) (*ReqRes, error)
ListSnapshotsAsync(context.Context, types.RequestListSnapshots) (*ReqRes, error)
OfferSnapshotAsync(context.Context, types.RequestOfferSnapshot) (*ReqRes, error)
LoadSnapshotChunkAsync(context.Context, types.RequestLoadSnapshotChunk) (*ReqRes, error)
ApplySnapshotChunkAsync(context.Context, types.RequestApplySnapshotChunk) (*ReqRes, error)
// Synchronous requests
FlushSync(context.Context) error
EchoSync(ctx context.Context, msg string) (*types.ResponseEcho, error)
InfoSync(context.Context, types.RequestInfo) (*types.ResponseInfo, error)
DeliverTxSync(context.Context, types.RequestDeliverTx) (*types.ResponseDeliverTx, error)
CheckTxSync(context.Context, types.RequestCheckTx) (*types.ResponseCheckTx, error)
QuerySync(context.Context, types.RequestQuery) (*types.ResponseQuery, error)
CommitSync(context.Context) (*types.ResponseCommit, error)
InitChainSync(context.Context, types.RequestInitChain) (*types.ResponseInitChain, error)
BeginBlockSync(context.Context, types.RequestBeginBlock) (*types.ResponseBeginBlock, error)
EndBlockSync(context.Context, types.RequestEndBlock) (*types.ResponseEndBlock, error)
ListSnapshotsSync(context.Context, types.RequestListSnapshots) (*types.ResponseListSnapshots, error)
OfferSnapshotSync(context.Context, types.RequestOfferSnapshot) (*types.ResponseOfferSnapshot, error)
LoadSnapshotChunkSync(context.Context, types.RequestLoadSnapshotChunk) (*types.ResponseLoadSnapshotChunk, error)
ApplySnapshotChunkSync(context.Context, types.RequestApplySnapshotChunk) (*types.ResponseApplySnapshotChunk, error)
Flush(context.Context) error
Echo(context.Context, string) (*types.ResponseEcho, error)
}
//----------------------------------------
// NewClient returns a new ABCI client of the specified transport type.
// It returns an error if the transport is not "socket" or "grpc"
func NewClient(addr, transport string, mustConnect bool) (client Client, err error) {
func NewClient(logger log.Logger, addr, transport string, mustConnect bool) (Client, error) {
switch transport {
case "socket":
client = NewSocketClient(addr, mustConnect)
return NewSocketClient(logger, addr, mustConnect), nil
case "grpc":
client = NewGRPCClient(addr, mustConnect)
return NewGRPCClient(logger, addr, mustConnect), nil
default:
err = fmt.Errorf("unknown abci transport %s", transport)
return nil, fmt.Errorf("unknown abci transport %s", transport)
}
return
}
type Callback func(*types.Request, *types.Response)
type ReqRes struct {
type requestAndResponse struct {
*types.Request
*sync.WaitGroup
*types.Response // Not set atomically, so be sure to use WaitGroup.
*types.Response
mtx tmsync.RWMutex
done bool // Gets set to true once *after* WaitGroup.Done().
cb func(*types.Response) // A single callback that may be set.
mtx sync.Mutex
signal chan struct{}
}
func NewReqRes(req *types.Request) *ReqRes {
return &ReqRes{
Request: req,
WaitGroup: waitGroup1(),
Response: nil,
done: false,
cb: nil,
func makeReqRes(req *types.Request) *requestAndResponse {
return &requestAndResponse{
Request: req,
Response: nil,
signal: make(chan struct{}),
}
}
// Sets sets the callback. If reqRes is already done, it will call the cb
// immediately. Note, reqRes.cb should not change if reqRes.done and only one
// callback is supported.
func (r *ReqRes) SetCallback(cb func(res *types.Response)) {
r.mtx.Lock()
if r.done {
r.mtx.Unlock()
cb(r.Response)
return
}
r.cb = cb
r.mtx.Unlock()
}
// InvokeCallback invokes a thread-safe execution of the configured callback
// if non-nil.
func (r *ReqRes) InvokeCallback() {
// markDone marks the ReqRes object as done.
func (r *requestAndResponse) markDone() {
r.mtx.Lock()
defer r.mtx.Unlock()
if r.cb != nil {
r.cb(r.Response)
}
}
// GetCallback returns the configured callback of the ReqRes object which may be
// nil. Note, it is not safe to concurrently call this in cases where it is
// marked done and SetCallback is called before calling GetCallback as that
// will invoke the callback twice and create a potential race condition.
//
// ref: https://github.com/tendermint/tendermint/issues/5439
func (r *ReqRes) GetCallback() func(*types.Response) {
r.mtx.RLock()
defer r.mtx.RUnlock()
return r.cb
}
// SetDone marks the ReqRes object as done.
func (r *ReqRes) SetDone() {
r.mtx.Lock()
defer r.mtx.Unlock()
r.done = true
}
func waitGroup1() (wg *sync.WaitGroup) {
wg = &sync.WaitGroup{}
wg.Add(1)
return
close(r.signal)
}

View File

@@ -1,4 +1,4 @@
// Package abcicli provides an ABCI implementation in Go.
// Package abciclient provides an ABCI implementation in Go.
//
// There are 3 clients available:
// 1. socket (unix or TCP)
@@ -7,23 +7,14 @@
//
// ## Socket client
//
// async: the client maintains an internal buffer of a fixed size. when the
// buffer becomes full, all Async calls will return an error immediately.
//
// sync: the client blocks on 1) enqueuing the Sync request 2) enqueuing the
// Flush requests 3) waiting for the Flush response
// The client blocks for enqueuing the request, for enqueuing the
// Flush to send the request, and for the Flush response to return.
//
// ## Local client
//
// async: global mutex is locked during each call (meaning it's not really async!)
// sync: global mutex is locked during each call
// The global mutex is locked during each call
//
// ## gRPC client
//
// async: gRPC is synchronous, but an internal buffer of a fixed size is used
// to store responses and later call callbacks (separate goroutine per
// response).
//
// sync: waits for all Async calls to complete (essentially what Flush does in
// the socket client) and calls Sync method.
package abcicli
// The client waits for all calls to complete.
package abciclient

View File

@@ -1,16 +1,17 @@
package abcicli
package abciclient
import (
"context"
"fmt"
"errors"
"net"
"sync"
"time"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"
"github.com/tendermint/tendermint/abci/types"
tmsync "github.com/tendermint/tendermint/internal/libs/sync"
"github.com/tendermint/tendermint/libs/log"
tmnet "github.com/tendermint/tendermint/libs/net"
"github.com/tendermint/tendermint/libs/service"
)
@@ -18,16 +19,16 @@ import (
// A gRPC client.
type grpcClient struct {
service.BaseService
logger log.Logger
mustConnect bool
client types.ABCIApplicationClient
conn *grpc.ClientConn
chReqRes chan *ReqRes // dispatches "async" responses to callbacks *in order*, needed by mempool
client types.ABCIApplicationClient
conn *grpc.ClientConn
mtx tmsync.RWMutex
addr string
err error
resCb func(*types.Request, *types.Response) // listens to all callbacks
mtx sync.Mutex
addr string
err error
}
var _ Client = (*grpcClient)(nil)
@@ -35,26 +36,13 @@ var _ Client = (*grpcClient)(nil)
// NewGRPCClient creates a gRPC client, which will connect to addr upon the
// start. Note Client#Start returns an error if connection is unsuccessful and
// mustConnect is true.
//
// GRPC calls are synchronous, but some callbacks expect to be called
// asynchronously (eg. the mempool expects to be able to lock to remove bad txs
// from cache). To accommodate, we finish each call in its own go-routine,
// which is expensive, but easy - if you want something better, use the socket
// protocol! maybe one day, if people really want it, we use grpc streams, but
// hopefully not :D
func NewGRPCClient(addr string, mustConnect bool) Client {
func NewGRPCClient(logger log.Logger, addr string, mustConnect bool) Client {
cli := &grpcClient{
logger: logger,
addr: addr,
mustConnect: mustConnect,
// Buffering the channel is needed to make calls appear asynchronous,
// which is required when the caller makes multiple async calls before
// processing callbacks (e.g. due to holding locks). 64 means that a
// caller can make up to 64 async calls before a callback must be
// processed (otherwise it deadlocks). It also means that we can make 64
// gRPC calls while processing a slow callback at the channel head.
chReqRes: make(chan *ReqRes, 64),
}
cli.BaseService = *service.NewBaseService(nil, "grpcClient", cli)
cli.BaseService = *service.NewBaseService(logger, "grpcClient", cli)
return cli
}
@@ -62,61 +50,52 @@ func dialerFunc(ctx context.Context, addr string) (net.Conn, error) {
return tmnet.Connect(addr)
}
func (cli *grpcClient) OnStart() error {
// This processes asynchronous request/response messages and dispatches
// them to callbacks.
go func() {
// Use a separate function to use defer for mutex unlocks (this handles panics)
callCb := func(reqres *ReqRes) {
cli.mtx.Lock()
defer cli.mtx.Unlock()
reqres.SetDone()
reqres.Done()
// Notify client listener if set
if cli.resCb != nil {
cli.resCb(reqres.Request, reqres.Response)
}
// Notify reqRes listener if set
if cb := reqres.GetCallback(); cb != nil {
cb(reqres.Response)
}
}
for reqres := range cli.chReqRes {
if reqres != nil {
callCb(reqres)
} else {
cli.Logger.Error("Received nil reqres")
}
}
}()
func (cli *grpcClient) OnStart(ctx context.Context) error {
timer := time.NewTimer(0)
defer timer.Stop()
RETRY_LOOP:
for {
conn, err := grpc.Dial(cli.addr, grpc.WithInsecure(), grpc.WithContextDialer(dialerFunc))
conn, err := grpc.Dial(cli.addr,
grpc.WithTransportCredentials(insecure.NewCredentials()),
grpc.WithContextDialer(dialerFunc),
)
if err != nil {
if cli.mustConnect {
return err
}
cli.Logger.Error(fmt.Sprintf("abci.grpcClient failed to connect to %v. Retrying...\n", cli.addr), "err", err)
time.Sleep(time.Second * dialRetryIntervalSeconds)
continue RETRY_LOOP
cli.logger.Error("abci.grpcClient failed to connect, Retrying...", "addr", cli.addr, "err", err)
timer.Reset(time.Second * dialRetryIntervalSeconds)
select {
case <-ctx.Done():
return ctx.Err()
case <-timer.C:
continue RETRY_LOOP
}
}
cli.Logger.Info("Dialed server. Waiting for echo.", "addr", cli.addr)
cli.logger.Info("Dialed server. Waiting for echo.", "addr", cli.addr)
client := types.NewABCIApplicationClient(conn)
cli.conn = conn
ENSURE_CONNECTED:
for {
_, err := client.Echo(context.Background(), &types.RequestEcho{Message: "hello"}, grpc.WaitForReady(true))
_, err := client.Echo(ctx, &types.RequestEcho{Message: "hello"}, grpc.WaitForReady(true))
if err == nil {
break ENSURE_CONNECTED
}
cli.Logger.Error("Echo failed", "err", err)
time.Sleep(time.Second * echoRetryIntervalSeconds)
if errors.Is(err, context.Canceled) || errors.Is(err, context.DeadlineExceeded) {
return err
}
cli.logger.Error("Echo failed", "err", err)
timer.Reset(time.Second * echoRetryIntervalSeconds)
select {
case <-ctx.Done():
return ctx.Err()
case <-timer.C:
continue ENSURE_CONNECTED
}
}
cli.client = client
@@ -125,382 +104,81 @@ RETRY_LOOP:
}
func (cli *grpcClient) OnStop() {
if cli.conn != nil {
cli.conn.Close()
}
close(cli.chReqRes)
}
func (cli *grpcClient) StopForError(err error) {
if !cli.IsRunning() {
return
}
cli.mtx.Lock()
if cli.err == nil {
cli.err = err
}
cli.mtx.Unlock()
defer cli.mtx.Unlock()
cli.Logger.Error(fmt.Sprintf("Stopping abci.grpcClient for error: %v", err.Error()))
if err := cli.Stop(); err != nil {
cli.Logger.Error("Error stopping abci.grpcClient", "err", err)
if cli.conn != nil {
cli.err = cli.conn.Close()
}
}
func (cli *grpcClient) Error() error {
cli.mtx.RLock()
defer cli.mtx.RUnlock()
cli.mtx.Lock()
defer cli.mtx.Unlock()
return cli.err
}
// Set listener for all responses
// NOTE: callback may get internally generated flush responses.
func (cli *grpcClient) SetResponseCallback(resCb Callback) {
cli.mtx.Lock()
defer cli.mtx.Unlock()
cli.resCb = resCb
}
//----------------------------------------
// NOTE: call is synchronous, use ctx to break early if needed
func (cli *grpcClient) EchoAsync(ctx context.Context, msg string) (*ReqRes, error) {
req := types.ToRequestEcho(msg)
res, err := cli.client.Echo(ctx, req.GetEcho(), grpc.WaitForReady(true))
if err != nil {
return nil, err
}
return cli.finishAsyncCall(ctx, req, &types.Response{Value: &types.Response_Echo{Echo: res}})
func (cli *grpcClient) Flush(ctx context.Context) error { return nil }
func (cli *grpcClient) Echo(ctx context.Context, msg string) (*types.ResponseEcho, error) {
return cli.client.Echo(ctx, types.ToRequestEcho(msg).GetEcho(), grpc.WaitForReady(true))
}
// NOTE: call is synchronous, use ctx to break early if needed
func (cli *grpcClient) FlushAsync(ctx context.Context) (*ReqRes, error) {
req := types.ToRequestFlush()
res, err := cli.client.Flush(ctx, req.GetFlush(), grpc.WaitForReady(true))
if err != nil {
return nil, err
}
return cli.finishAsyncCall(ctx, req, &types.Response{Value: &types.Response_Flush{Flush: res}})
func (cli *grpcClient) Info(ctx context.Context, params *types.RequestInfo) (*types.ResponseInfo, error) {
return cli.client.Info(ctx, types.ToRequestInfo(params).GetInfo(), grpc.WaitForReady(true))
}
// NOTE: call is synchronous, use ctx to break early if needed
func (cli *grpcClient) InfoAsync(ctx context.Context, params types.RequestInfo) (*ReqRes, error) {
req := types.ToRequestInfo(params)
res, err := cli.client.Info(ctx, req.GetInfo(), grpc.WaitForReady(true))
if err != nil {
return nil, err
}
return cli.finishAsyncCall(ctx, req, &types.Response{Value: &types.Response_Info{Info: res}})
func (cli *grpcClient) CheckTx(ctx context.Context, params *types.RequestCheckTx) (*types.ResponseCheckTx, error) {
return cli.client.CheckTx(ctx, types.ToRequestCheckTx(params).GetCheckTx(), grpc.WaitForReady(true))
}
// NOTE: call is synchronous, use ctx to break early if needed
func (cli *grpcClient) DeliverTxAsync(ctx context.Context, params types.RequestDeliverTx) (*ReqRes, error) {
req := types.ToRequestDeliverTx(params)
res, err := cli.client.DeliverTx(ctx, req.GetDeliverTx(), grpc.WaitForReady(true))
if err != nil {
return nil, err
}
return cli.finishAsyncCall(ctx, req, &types.Response{Value: &types.Response_DeliverTx{DeliverTx: res}})
func (cli *grpcClient) Query(ctx context.Context, params *types.RequestQuery) (*types.ResponseQuery, error) {
return cli.client.Query(ctx, types.ToRequestQuery(params).GetQuery(), grpc.WaitForReady(true))
}
// NOTE: call is synchronous, use ctx to break early if needed
func (cli *grpcClient) CheckTxAsync(ctx context.Context, params types.RequestCheckTx) (*ReqRes, error) {
req := types.ToRequestCheckTx(params)
res, err := cli.client.CheckTx(ctx, req.GetCheckTx(), grpc.WaitForReady(true))
if err != nil {
return nil, err
}
return cli.finishAsyncCall(ctx, req, &types.Response{Value: &types.Response_CheckTx{CheckTx: res}})
func (cli *grpcClient) Commit(ctx context.Context) (*types.ResponseCommit, error) {
return cli.client.Commit(ctx, types.ToRequestCommit().GetCommit(), grpc.WaitForReady(true))
}
// NOTE: call is synchronous, use ctx to break early if needed
func (cli *grpcClient) QueryAsync(ctx context.Context, params types.RequestQuery) (*ReqRes, error) {
req := types.ToRequestQuery(params)
res, err := cli.client.Query(ctx, req.GetQuery(), grpc.WaitForReady(true))
if err != nil {
return nil, err
}
return cli.finishAsyncCall(ctx, req, &types.Response{Value: &types.Response_Query{Query: res}})
func (cli *grpcClient) InitChain(ctx context.Context, params *types.RequestInitChain) (*types.ResponseInitChain, error) {
return cli.client.InitChain(ctx, types.ToRequestInitChain(params).GetInitChain(), grpc.WaitForReady(true))
}
// NOTE: call is synchronous, use ctx to break early if needed
func (cli *grpcClient) CommitAsync(ctx context.Context) (*ReqRes, error) {
req := types.ToRequestCommit()
res, err := cli.client.Commit(ctx, req.GetCommit(), grpc.WaitForReady(true))
if err != nil {
return nil, err
}
return cli.finishAsyncCall(ctx, req, &types.Response{Value: &types.Response_Commit{Commit: res}})
func (cli *grpcClient) ListSnapshots(ctx context.Context, params *types.RequestListSnapshots) (*types.ResponseListSnapshots, error) {
return cli.client.ListSnapshots(ctx, types.ToRequestListSnapshots(params).GetListSnapshots(), grpc.WaitForReady(true))
}
// NOTE: call is synchronous, use ctx to break early if needed
func (cli *grpcClient) InitChainAsync(ctx context.Context, params types.RequestInitChain) (*ReqRes, error) {
req := types.ToRequestInitChain(params)
res, err := cli.client.InitChain(ctx, req.GetInitChain(), grpc.WaitForReady(true))
if err != nil {
return nil, err
}
return cli.finishAsyncCall(ctx, req, &types.Response{Value: &types.Response_InitChain{InitChain: res}})
func (cli *grpcClient) OfferSnapshot(ctx context.Context, params *types.RequestOfferSnapshot) (*types.ResponseOfferSnapshot, error) {
return cli.client.OfferSnapshot(ctx, types.ToRequestOfferSnapshot(params).GetOfferSnapshot(), grpc.WaitForReady(true))
}
// NOTE: call is synchronous, use ctx to break early if needed
func (cli *grpcClient) BeginBlockAsync(ctx context.Context, params types.RequestBeginBlock) (*ReqRes, error) {
req := types.ToRequestBeginBlock(params)
res, err := cli.client.BeginBlock(ctx, req.GetBeginBlock(), grpc.WaitForReady(true))
if err != nil {
return nil, err
}
return cli.finishAsyncCall(ctx, req, &types.Response{Value: &types.Response_BeginBlock{BeginBlock: res}})
func (cli *grpcClient) LoadSnapshotChunk(ctx context.Context, params *types.RequestLoadSnapshotChunk) (*types.ResponseLoadSnapshotChunk, error) {
return cli.client.LoadSnapshotChunk(ctx, types.ToRequestLoadSnapshotChunk(params).GetLoadSnapshotChunk(), grpc.WaitForReady(true))
}
// NOTE: call is synchronous, use ctx to break early if needed
func (cli *grpcClient) EndBlockAsync(ctx context.Context, params types.RequestEndBlock) (*ReqRes, error) {
req := types.ToRequestEndBlock(params)
res, err := cli.client.EndBlock(ctx, req.GetEndBlock(), grpc.WaitForReady(true))
if err != nil {
return nil, err
}
return cli.finishAsyncCall(ctx, req, &types.Response{Value: &types.Response_EndBlock{EndBlock: res}})
func (cli *grpcClient) ApplySnapshotChunk(ctx context.Context, params *types.RequestApplySnapshotChunk) (*types.ResponseApplySnapshotChunk, error) {
return cli.client.ApplySnapshotChunk(ctx, types.ToRequestApplySnapshotChunk(params).GetApplySnapshotChunk(), grpc.WaitForReady(true))
}
// NOTE: call is synchronous, use ctx to break early if needed
func (cli *grpcClient) ListSnapshotsAsync(ctx context.Context, params types.RequestListSnapshots) (*ReqRes, error) {
req := types.ToRequestListSnapshots(params)
res, err := cli.client.ListSnapshots(ctx, req.GetListSnapshots(), grpc.WaitForReady(true))
if err != nil {
return nil, err
}
return cli.finishAsyncCall(ctx, req, &types.Response{Value: &types.Response_ListSnapshots{ListSnapshots: res}})
func (cli *grpcClient) PrepareProposal(ctx context.Context, params *types.RequestPrepareProposal) (*types.ResponsePrepareProposal, error) {
return cli.client.PrepareProposal(ctx, types.ToRequestPrepareProposal(params).GetPrepareProposal(), grpc.WaitForReady(true))
}
// NOTE: call is synchronous, use ctx to break early if needed
func (cli *grpcClient) OfferSnapshotAsync(ctx context.Context, params types.RequestOfferSnapshot) (*ReqRes, error) {
req := types.ToRequestOfferSnapshot(params)
res, err := cli.client.OfferSnapshot(ctx, req.GetOfferSnapshot(), grpc.WaitForReady(true))
if err != nil {
return nil, err
}
return cli.finishAsyncCall(ctx, req, &types.Response{Value: &types.Response_OfferSnapshot{OfferSnapshot: res}})
func (cli *grpcClient) ProcessProposal(ctx context.Context, params *types.RequestProcessProposal) (*types.ResponseProcessProposal, error) {
return cli.client.ProcessProposal(ctx, types.ToRequestProcessProposal(params).GetProcessProposal(), grpc.WaitForReady(true))
}
// NOTE: call is synchronous, use ctx to break early if needed
func (cli *grpcClient) LoadSnapshotChunkAsync(
ctx context.Context,
params types.RequestLoadSnapshotChunk,
) (*ReqRes, error) {
req := types.ToRequestLoadSnapshotChunk(params)
res, err := cli.client.LoadSnapshotChunk(ctx, req.GetLoadSnapshotChunk(), grpc.WaitForReady(true))
if err != nil {
return nil, err
}
return cli.finishAsyncCall(ctx, req, &types.Response{Value: &types.Response_LoadSnapshotChunk{LoadSnapshotChunk: res}})
func (cli *grpcClient) ExtendVote(ctx context.Context, params *types.RequestExtendVote) (*types.ResponseExtendVote, error) {
return cli.client.ExtendVote(ctx, types.ToRequestExtendVote(params).GetExtendVote(), grpc.WaitForReady(true))
}
// NOTE: call is synchronous, use ctx to break early if needed
func (cli *grpcClient) ApplySnapshotChunkAsync(
ctx context.Context,
params types.RequestApplySnapshotChunk,
) (*ReqRes, error) {
req := types.ToRequestApplySnapshotChunk(params)
res, err := cli.client.ApplySnapshotChunk(ctx, req.GetApplySnapshotChunk(), grpc.WaitForReady(true))
if err != nil {
return nil, err
}
return cli.finishAsyncCall(
ctx,
req,
&types.Response{Value: &types.Response_ApplySnapshotChunk{ApplySnapshotChunk: res}},
)
func (cli *grpcClient) VerifyVoteExtension(ctx context.Context, params *types.RequestVerifyVoteExtension) (*types.ResponseVerifyVoteExtension, error) {
return cli.client.VerifyVoteExtension(ctx, types.ToRequestVerifyVoteExtension(params).GetVerifyVoteExtension(), grpc.WaitForReady(true))
}
// finishAsyncCall creates a ReqRes for an async call, and immediately populates it
// with the response. We don't complete it until it's been ordered via the channel.
func (cli *grpcClient) finishAsyncCall(ctx context.Context, req *types.Request, res *types.Response) (*ReqRes, error) {
reqres := NewReqRes(req)
reqres.Response = res
select {
case cli.chReqRes <- reqres: // use channel for async responses, since they must be ordered
return reqres, nil
case <-ctx.Done():
return nil, ctx.Err()
}
}
// finishSyncCall waits for an async call to complete. It is necessary to call all
// sync calls asynchronously as well, to maintain call and response ordering via
// the channel, and this method will wait until the async call completes.
func (cli *grpcClient) finishSyncCall(reqres *ReqRes) *types.Response {
// It's possible that the callback is called twice, since the callback can
// be called immediately on SetCallback() in addition to after it has been
// set. This is because completing the ReqRes happens in a separate critical
// section from the one where the callback is called: there is a race where
// SetCallback() is called between completing the ReqRes and dispatching the
// callback.
//
// We also buffer the channel with 1 response, since SetCallback() will be
// called synchronously if the reqres is already completed, in which case
// it will block on sending to the channel since it hasn't gotten around to
// receiving from it yet.
//
// ReqRes should really handle callback dispatch internally, to guarantee
// that it's only called once and avoid the above race conditions.
var once sync.Once
ch := make(chan *types.Response, 1)
reqres.SetCallback(func(res *types.Response) {
once.Do(func() {
ch <- res
})
})
return <-ch
}
//----------------------------------------
func (cli *grpcClient) FlushSync(ctx context.Context) error {
return nil
}
func (cli *grpcClient) EchoSync(ctx context.Context, msg string) (*types.ResponseEcho, error) {
reqres, err := cli.EchoAsync(ctx, msg)
if err != nil {
return nil, err
}
return cli.finishSyncCall(reqres).GetEcho(), cli.Error()
}
func (cli *grpcClient) InfoSync(
ctx context.Context,
req types.RequestInfo,
) (*types.ResponseInfo, error) {
reqres, err := cli.InfoAsync(ctx, req)
if err != nil {
return nil, err
}
return cli.finishSyncCall(reqres).GetInfo(), cli.Error()
}
func (cli *grpcClient) DeliverTxSync(
ctx context.Context,
params types.RequestDeliverTx,
) (*types.ResponseDeliverTx, error) {
reqres, err := cli.DeliverTxAsync(ctx, params)
if err != nil {
return nil, err
}
return cli.finishSyncCall(reqres).GetDeliverTx(), cli.Error()
}
func (cli *grpcClient) CheckTxSync(
ctx context.Context,
params types.RequestCheckTx,
) (*types.ResponseCheckTx, error) {
reqres, err := cli.CheckTxAsync(ctx, params)
if err != nil {
return nil, err
}
return cli.finishSyncCall(reqres).GetCheckTx(), cli.Error()
}
func (cli *grpcClient) QuerySync(
ctx context.Context,
req types.RequestQuery,
) (*types.ResponseQuery, error) {
reqres, err := cli.QueryAsync(ctx, req)
if err != nil {
return nil, err
}
return cli.finishSyncCall(reqres).GetQuery(), cli.Error()
}
func (cli *grpcClient) CommitSync(ctx context.Context) (*types.ResponseCommit, error) {
reqres, err := cli.CommitAsync(ctx)
if err != nil {
return nil, err
}
return cli.finishSyncCall(reqres).GetCommit(), cli.Error()
}
func (cli *grpcClient) InitChainSync(
ctx context.Context,
params types.RequestInitChain,
) (*types.ResponseInitChain, error) {
reqres, err := cli.InitChainAsync(ctx, params)
if err != nil {
return nil, err
}
return cli.finishSyncCall(reqres).GetInitChain(), cli.Error()
}
func (cli *grpcClient) BeginBlockSync(
ctx context.Context,
params types.RequestBeginBlock,
) (*types.ResponseBeginBlock, error) {
reqres, err := cli.BeginBlockAsync(ctx, params)
if err != nil {
return nil, err
}
return cli.finishSyncCall(reqres).GetBeginBlock(), cli.Error()
}
func (cli *grpcClient) EndBlockSync(
ctx context.Context,
params types.RequestEndBlock,
) (*types.ResponseEndBlock, error) {
reqres, err := cli.EndBlockAsync(ctx, params)
if err != nil {
return nil, err
}
return cli.finishSyncCall(reqres).GetEndBlock(), cli.Error()
}
func (cli *grpcClient) ListSnapshotsSync(
ctx context.Context,
params types.RequestListSnapshots,
) (*types.ResponseListSnapshots, error) {
reqres, err := cli.ListSnapshotsAsync(ctx, params)
if err != nil {
return nil, err
}
return cli.finishSyncCall(reqres).GetListSnapshots(), cli.Error()
}
func (cli *grpcClient) OfferSnapshotSync(
ctx context.Context,
params types.RequestOfferSnapshot,
) (*types.ResponseOfferSnapshot, error) {
reqres, err := cli.OfferSnapshotAsync(ctx, params)
if err != nil {
return nil, err
}
return cli.finishSyncCall(reqres).GetOfferSnapshot(), cli.Error()
}
func (cli *grpcClient) LoadSnapshotChunkSync(
ctx context.Context,
params types.RequestLoadSnapshotChunk) (*types.ResponseLoadSnapshotChunk, error) {
reqres, err := cli.LoadSnapshotChunkAsync(ctx, params)
if err != nil {
return nil, err
}
return cli.finishSyncCall(reqres).GetLoadSnapshotChunk(), cli.Error()
}
func (cli *grpcClient) ApplySnapshotChunkSync(
ctx context.Context,
params types.RequestApplySnapshotChunk) (*types.ResponseApplySnapshotChunk, error) {
reqres, err := cli.ApplySnapshotChunkAsync(ctx, params)
if err != nil {
return nil, err
}
return cli.finishSyncCall(reqres).GetApplySnapshotChunk(), cli.Error()
func (cli *grpcClient) FinalizeBlock(ctx context.Context, params *types.RequestFinalizeBlock) (*types.ResponseFinalizeBlock, error) {
return cli.client.FinalizeBlock(ctx, types.ToRequestFinalizeBlock(params).GetFinalizeBlock(), grpc.WaitForReady(true))
}

View File

@@ -1,10 +1,10 @@
package abcicli
package abciclient
import (
"context"
types "github.com/tendermint/tendermint/abci/types"
tmsync "github.com/tendermint/tendermint/internal/libs/sync"
"github.com/tendermint/tendermint/libs/log"
"github.com/tendermint/tendermint/libs/service"
)
@@ -14,10 +14,7 @@ import (
// RPC endpoint), but defers are used everywhere for the sake of consistency.
type localClient struct {
service.BaseService
mtx *tmsync.RWMutex
types.Application
Callback
}
var _ Client = (*localClient)(nil)
@@ -25,337 +22,19 @@ var _ Client = (*localClient)(nil)
// NewLocalClient creates a local client, which will be directly calling the
// methods of the given app.
//
// Both Async and Sync methods ignore the given context.Context parameter.
func NewLocalClient(mtx *tmsync.RWMutex, app types.Application) Client {
if mtx == nil {
mtx = &tmsync.RWMutex{}
}
// The client methods ignore their context argument.
func NewLocalClient(logger log.Logger, app types.Application) Client {
cli := &localClient{
mtx: mtx,
Application: app,
}
cli.BaseService = *service.NewBaseService(nil, "localClient", cli)
cli.BaseService = *service.NewBaseService(logger, "localClient", cli)
return cli
}
func (app *localClient) SetResponseCallback(cb Callback) {
app.mtx.Lock()
defer app.mtx.Unlock()
app.Callback = cb
}
// TODO: change types.Application to include Error()?
func (app *localClient) Error() error {
return nil
}
func (app *localClient) FlushAsync(ctx context.Context) (*ReqRes, error) {
// Do nothing
return newLocalReqRes(types.ToRequestFlush(), nil), nil
}
func (app *localClient) EchoAsync(ctx context.Context, msg string) (*ReqRes, error) {
app.mtx.Lock()
defer app.mtx.Unlock()
return app.callback(
types.ToRequestEcho(msg),
types.ToResponseEcho(msg),
), nil
}
func (app *localClient) InfoAsync(ctx context.Context, req types.RequestInfo) (*ReqRes, error) {
app.mtx.RLock()
defer app.mtx.RUnlock()
res := app.Application.Info(req)
return app.callback(
types.ToRequestInfo(req),
types.ToResponseInfo(res),
), nil
}
func (app *localClient) DeliverTxAsync(ctx context.Context, params types.RequestDeliverTx) (*ReqRes, error) {
app.mtx.Lock()
defer app.mtx.Unlock()
res := app.Application.DeliverTx(params)
return app.callback(
types.ToRequestDeliverTx(params),
types.ToResponseDeliverTx(res),
), nil
}
func (app *localClient) CheckTxAsync(ctx context.Context, req types.RequestCheckTx) (*ReqRes, error) {
app.mtx.Lock()
defer app.mtx.Unlock()
res := app.Application.CheckTx(req)
return app.callback(
types.ToRequestCheckTx(req),
types.ToResponseCheckTx(res),
), nil
}
func (app *localClient) QueryAsync(ctx context.Context, req types.RequestQuery) (*ReqRes, error) {
app.mtx.RLock()
defer app.mtx.RUnlock()
res := app.Application.Query(req)
return app.callback(
types.ToRequestQuery(req),
types.ToResponseQuery(res),
), nil
}
func (app *localClient) CommitAsync(ctx context.Context) (*ReqRes, error) {
app.mtx.Lock()
defer app.mtx.Unlock()
res := app.Application.Commit()
return app.callback(
types.ToRequestCommit(),
types.ToResponseCommit(res),
), nil
}
func (app *localClient) InitChainAsync(ctx context.Context, req types.RequestInitChain) (*ReqRes, error) {
app.mtx.Lock()
defer app.mtx.Unlock()
res := app.Application.InitChain(req)
return app.callback(
types.ToRequestInitChain(req),
types.ToResponseInitChain(res),
), nil
}
func (app *localClient) BeginBlockAsync(ctx context.Context, req types.RequestBeginBlock) (*ReqRes, error) {
app.mtx.Lock()
defer app.mtx.Unlock()
res := app.Application.BeginBlock(req)
return app.callback(
types.ToRequestBeginBlock(req),
types.ToResponseBeginBlock(res),
), nil
}
func (app *localClient) EndBlockAsync(ctx context.Context, req types.RequestEndBlock) (*ReqRes, error) {
app.mtx.Lock()
defer app.mtx.Unlock()
res := app.Application.EndBlock(req)
return app.callback(
types.ToRequestEndBlock(req),
types.ToResponseEndBlock(res),
), nil
}
func (app *localClient) ListSnapshotsAsync(ctx context.Context, req types.RequestListSnapshots) (*ReqRes, error) {
app.mtx.Lock()
defer app.mtx.Unlock()
res := app.Application.ListSnapshots(req)
return app.callback(
types.ToRequestListSnapshots(req),
types.ToResponseListSnapshots(res),
), nil
}
func (app *localClient) OfferSnapshotAsync(ctx context.Context, req types.RequestOfferSnapshot) (*ReqRes, error) {
app.mtx.Lock()
defer app.mtx.Unlock()
res := app.Application.OfferSnapshot(req)
return app.callback(
types.ToRequestOfferSnapshot(req),
types.ToResponseOfferSnapshot(res),
), nil
}
func (app *localClient) LoadSnapshotChunkAsync(
ctx context.Context,
req types.RequestLoadSnapshotChunk,
) (*ReqRes, error) {
app.mtx.Lock()
defer app.mtx.Unlock()
res := app.Application.LoadSnapshotChunk(req)
return app.callback(
types.ToRequestLoadSnapshotChunk(req),
types.ToResponseLoadSnapshotChunk(res),
), nil
}
func (app *localClient) ApplySnapshotChunkAsync(
ctx context.Context,
req types.RequestApplySnapshotChunk,
) (*ReqRes, error) {
app.mtx.Lock()
defer app.mtx.Unlock()
res := app.Application.ApplySnapshotChunk(req)
return app.callback(
types.ToRequestApplySnapshotChunk(req),
types.ToResponseApplySnapshotChunk(res),
), nil
}
//-------------------------------------------------------
func (app *localClient) FlushSync(ctx context.Context) error {
return nil
}
func (app *localClient) EchoSync(ctx context.Context, msg string) (*types.ResponseEcho, error) {
func (*localClient) OnStart(context.Context) error { return nil }
func (*localClient) OnStop() {}
func (*localClient) Error() error { return nil }
func (*localClient) Flush(context.Context) error { return nil }
func (*localClient) Echo(_ context.Context, msg string) (*types.ResponseEcho, error) {
return &types.ResponseEcho{Message: msg}, nil
}
func (app *localClient) InfoSync(ctx context.Context, req types.RequestInfo) (*types.ResponseInfo, error) {
app.mtx.RLock()
defer app.mtx.RUnlock()
res := app.Application.Info(req)
return &res, nil
}
func (app *localClient) DeliverTxSync(
ctx context.Context,
req types.RequestDeliverTx,
) (*types.ResponseDeliverTx, error) {
app.mtx.Lock()
defer app.mtx.Unlock()
res := app.Application.DeliverTx(req)
return &res, nil
}
func (app *localClient) CheckTxSync(
ctx context.Context,
req types.RequestCheckTx,
) (*types.ResponseCheckTx, error) {
app.mtx.Lock()
defer app.mtx.Unlock()
res := app.Application.CheckTx(req)
return &res, nil
}
func (app *localClient) QuerySync(
ctx context.Context,
req types.RequestQuery,
) (*types.ResponseQuery, error) {
app.mtx.RLock()
defer app.mtx.RUnlock()
res := app.Application.Query(req)
return &res, nil
}
func (app *localClient) CommitSync(ctx context.Context) (*types.ResponseCommit, error) {
app.mtx.Lock()
defer app.mtx.Unlock()
res := app.Application.Commit()
return &res, nil
}
func (app *localClient) InitChainSync(
ctx context.Context,
req types.RequestInitChain,
) (*types.ResponseInitChain, error) {
app.mtx.Lock()
defer app.mtx.Unlock()
res := app.Application.InitChain(req)
return &res, nil
}
func (app *localClient) BeginBlockSync(
ctx context.Context,
req types.RequestBeginBlock,
) (*types.ResponseBeginBlock, error) {
app.mtx.Lock()
defer app.mtx.Unlock()
res := app.Application.BeginBlock(req)
return &res, nil
}
func (app *localClient) EndBlockSync(
ctx context.Context,
req types.RequestEndBlock,
) (*types.ResponseEndBlock, error) {
app.mtx.Lock()
defer app.mtx.Unlock()
res := app.Application.EndBlock(req)
return &res, nil
}
func (app *localClient) ListSnapshotsSync(
ctx context.Context,
req types.RequestListSnapshots,
) (*types.ResponseListSnapshots, error) {
app.mtx.Lock()
defer app.mtx.Unlock()
res := app.Application.ListSnapshots(req)
return &res, nil
}
func (app *localClient) OfferSnapshotSync(
ctx context.Context,
req types.RequestOfferSnapshot,
) (*types.ResponseOfferSnapshot, error) {
app.mtx.Lock()
defer app.mtx.Unlock()
res := app.Application.OfferSnapshot(req)
return &res, nil
}
func (app *localClient) LoadSnapshotChunkSync(
ctx context.Context,
req types.RequestLoadSnapshotChunk) (*types.ResponseLoadSnapshotChunk, error) {
app.mtx.Lock()
defer app.mtx.Unlock()
res := app.Application.LoadSnapshotChunk(req)
return &res, nil
}
func (app *localClient) ApplySnapshotChunkSync(
ctx context.Context,
req types.RequestApplySnapshotChunk) (*types.ResponseApplySnapshotChunk, error) {
app.mtx.Lock()
defer app.mtx.Unlock()
res := app.Application.ApplySnapshotChunk(req)
return &res, nil
}
//-------------------------------------------------------
func (app *localClient) callback(req *types.Request, res *types.Response) *ReqRes {
app.Callback(req, res)
return newLocalReqRes(req, res)
}
func newLocalReqRes(req *types.Request, res *types.Response) *ReqRes {
reqRes := NewReqRes(req)
reqRes.Response = res
reqRes.SetDone()
return reqRes
}

View File

@@ -1,16 +1,11 @@
// Code generated by mockery v0.0.0-dev. DO NOT EDIT.
// Code generated by mockery. DO NOT EDIT.
package mocks
import (
context "context"
abcicli "github.com/tendermint/tendermint/abci/client"
log "github.com/tendermint/tendermint/libs/log"
mock "github.com/stretchr/testify/mock"
types "github.com/tendermint/tendermint/abci/types"
)
@@ -19,35 +14,12 @@ type Client struct {
mock.Mock
}
// ApplySnapshotChunkAsync provides a mock function with given fields: _a0, _a1
func (_m *Client) ApplySnapshotChunkAsync(_a0 context.Context, _a1 types.RequestApplySnapshotChunk) (*abcicli.ReqRes, error) {
ret := _m.Called(_a0, _a1)
var r0 *abcicli.ReqRes
if rf, ok := ret.Get(0).(func(context.Context, types.RequestApplySnapshotChunk) *abcicli.ReqRes); ok {
r0 = rf(_a0, _a1)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*abcicli.ReqRes)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, types.RequestApplySnapshotChunk) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// ApplySnapshotChunkSync provides a mock function with given fields: _a0, _a1
func (_m *Client) ApplySnapshotChunkSync(_a0 context.Context, _a1 types.RequestApplySnapshotChunk) (*types.ResponseApplySnapshotChunk, error) {
// ApplySnapshotChunk provides a mock function with given fields: _a0, _a1
func (_m *Client) ApplySnapshotChunk(_a0 context.Context, _a1 *types.RequestApplySnapshotChunk) (*types.ResponseApplySnapshotChunk, error) {
ret := _m.Called(_a0, _a1)
var r0 *types.ResponseApplySnapshotChunk
if rf, ok := ret.Get(0).(func(context.Context, types.RequestApplySnapshotChunk) *types.ResponseApplySnapshotChunk); ok {
if rf, ok := ret.Get(0).(func(context.Context, *types.RequestApplySnapshotChunk) *types.ResponseApplySnapshotChunk); ok {
r0 = rf(_a0, _a1)
} else {
if ret.Get(0) != nil {
@@ -56,7 +28,7 @@ func (_m *Client) ApplySnapshotChunkSync(_a0 context.Context, _a1 types.RequestA
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, types.RequestApplySnapshotChunk) error); ok {
if rf, ok := ret.Get(1).(func(context.Context, *types.RequestApplySnapshotChunk) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
@@ -65,81 +37,12 @@ func (_m *Client) ApplySnapshotChunkSync(_a0 context.Context, _a1 types.RequestA
return r0, r1
}
// BeginBlockAsync provides a mock function with given fields: _a0, _a1
func (_m *Client) BeginBlockAsync(_a0 context.Context, _a1 types.RequestBeginBlock) (*abcicli.ReqRes, error) {
ret := _m.Called(_a0, _a1)
var r0 *abcicli.ReqRes
if rf, ok := ret.Get(0).(func(context.Context, types.RequestBeginBlock) *abcicli.ReqRes); ok {
r0 = rf(_a0, _a1)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*abcicli.ReqRes)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, types.RequestBeginBlock) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// BeginBlockSync provides a mock function with given fields: _a0, _a1
func (_m *Client) BeginBlockSync(_a0 context.Context, _a1 types.RequestBeginBlock) (*types.ResponseBeginBlock, error) {
ret := _m.Called(_a0, _a1)
var r0 *types.ResponseBeginBlock
if rf, ok := ret.Get(0).(func(context.Context, types.RequestBeginBlock) *types.ResponseBeginBlock); ok {
r0 = rf(_a0, _a1)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*types.ResponseBeginBlock)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, types.RequestBeginBlock) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// CheckTxAsync provides a mock function with given fields: _a0, _a1
func (_m *Client) CheckTxAsync(_a0 context.Context, _a1 types.RequestCheckTx) (*abcicli.ReqRes, error) {
ret := _m.Called(_a0, _a1)
var r0 *abcicli.ReqRes
if rf, ok := ret.Get(0).(func(context.Context, types.RequestCheckTx) *abcicli.ReqRes); ok {
r0 = rf(_a0, _a1)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*abcicli.ReqRes)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, types.RequestCheckTx) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// CheckTxSync provides a mock function with given fields: _a0, _a1
func (_m *Client) CheckTxSync(_a0 context.Context, _a1 types.RequestCheckTx) (*types.ResponseCheckTx, error) {
// CheckTx provides a mock function with given fields: _a0, _a1
func (_m *Client) CheckTx(_a0 context.Context, _a1 *types.RequestCheckTx) (*types.ResponseCheckTx, error) {
ret := _m.Called(_a0, _a1)
var r0 *types.ResponseCheckTx
if rf, ok := ret.Get(0).(func(context.Context, types.RequestCheckTx) *types.ResponseCheckTx); ok {
if rf, ok := ret.Get(0).(func(context.Context, *types.RequestCheckTx) *types.ResponseCheckTx); ok {
r0 = rf(_a0, _a1)
} else {
if ret.Get(0) != nil {
@@ -148,7 +51,7 @@ func (_m *Client) CheckTxSync(_a0 context.Context, _a1 types.RequestCheckTx) (*t
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, types.RequestCheckTx) error); ok {
if rf, ok := ret.Get(1).(func(context.Context, *types.RequestCheckTx) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
@@ -157,31 +60,8 @@ func (_m *Client) CheckTxSync(_a0 context.Context, _a1 types.RequestCheckTx) (*t
return r0, r1
}
// CommitAsync provides a mock function with given fields: _a0
func (_m *Client) CommitAsync(_a0 context.Context) (*abcicli.ReqRes, error) {
ret := _m.Called(_a0)
var r0 *abcicli.ReqRes
if rf, ok := ret.Get(0).(func(context.Context) *abcicli.ReqRes); ok {
r0 = rf(_a0)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*abcicli.ReqRes)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context) error); ok {
r1 = rf(_a0)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// CommitSync provides a mock function with given fields: _a0
func (_m *Client) CommitSync(_a0 context.Context) (*types.ResponseCommit, error) {
// Commit provides a mock function with given fields: _a0
func (_m *Client) Commit(_a0 context.Context) (*types.ResponseCommit, error) {
ret := _m.Called(_a0)
var r0 *types.ResponseCommit
@@ -203,82 +83,13 @@ func (_m *Client) CommitSync(_a0 context.Context) (*types.ResponseCommit, error)
return r0, r1
}
// DeliverTxAsync provides a mock function with given fields: _a0, _a1
func (_m *Client) DeliverTxAsync(_a0 context.Context, _a1 types.RequestDeliverTx) (*abcicli.ReqRes, error) {
// Echo provides a mock function with given fields: _a0, _a1
func (_m *Client) Echo(_a0 context.Context, _a1 string) (*types.ResponseEcho, error) {
ret := _m.Called(_a0, _a1)
var r0 *abcicli.ReqRes
if rf, ok := ret.Get(0).(func(context.Context, types.RequestDeliverTx) *abcicli.ReqRes); ok {
r0 = rf(_a0, _a1)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*abcicli.ReqRes)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, types.RequestDeliverTx) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// DeliverTxSync provides a mock function with given fields: _a0, _a1
func (_m *Client) DeliverTxSync(_a0 context.Context, _a1 types.RequestDeliverTx) (*types.ResponseDeliverTx, error) {
ret := _m.Called(_a0, _a1)
var r0 *types.ResponseDeliverTx
if rf, ok := ret.Get(0).(func(context.Context, types.RequestDeliverTx) *types.ResponseDeliverTx); ok {
r0 = rf(_a0, _a1)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*types.ResponseDeliverTx)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, types.RequestDeliverTx) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// EchoAsync provides a mock function with given fields: ctx, msg
func (_m *Client) EchoAsync(ctx context.Context, msg string) (*abcicli.ReqRes, error) {
ret := _m.Called(ctx, msg)
var r0 *abcicli.ReqRes
if rf, ok := ret.Get(0).(func(context.Context, string) *abcicli.ReqRes); ok {
r0 = rf(ctx, msg)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*abcicli.ReqRes)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, msg)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// EchoSync provides a mock function with given fields: ctx, msg
func (_m *Client) EchoSync(ctx context.Context, msg string) (*types.ResponseEcho, error) {
ret := _m.Called(ctx, msg)
var r0 *types.ResponseEcho
if rf, ok := ret.Get(0).(func(context.Context, string) *types.ResponseEcho); ok {
r0 = rf(ctx, msg)
r0 = rf(_a0, _a1)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*types.ResponseEcho)
@@ -287,52 +98,6 @@ func (_m *Client) EchoSync(ctx context.Context, msg string) (*types.ResponseEcho
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, msg)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// EndBlockAsync provides a mock function with given fields: _a0, _a1
func (_m *Client) EndBlockAsync(_a0 context.Context, _a1 types.RequestEndBlock) (*abcicli.ReqRes, error) {
ret := _m.Called(_a0, _a1)
var r0 *abcicli.ReqRes
if rf, ok := ret.Get(0).(func(context.Context, types.RequestEndBlock) *abcicli.ReqRes); ok {
r0 = rf(_a0, _a1)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*abcicli.ReqRes)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, types.RequestEndBlock) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// EndBlockSync provides a mock function with given fields: _a0, _a1
func (_m *Client) EndBlockSync(_a0 context.Context, _a1 types.RequestEndBlock) (*types.ResponseEndBlock, error) {
ret := _m.Called(_a0, _a1)
var r0 *types.ResponseEndBlock
if rf, ok := ret.Get(0).(func(context.Context, types.RequestEndBlock) *types.ResponseEndBlock); ok {
r0 = rf(_a0, _a1)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*types.ResponseEndBlock)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, types.RequestEndBlock) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
@@ -355,22 +120,22 @@ func (_m *Client) Error() error {
return r0
}
// FlushAsync provides a mock function with given fields: _a0
func (_m *Client) FlushAsync(_a0 context.Context) (*abcicli.ReqRes, error) {
ret := _m.Called(_a0)
// ExtendVote provides a mock function with given fields: _a0, _a1
func (_m *Client) ExtendVote(_a0 context.Context, _a1 *types.RequestExtendVote) (*types.ResponseExtendVote, error) {
ret := _m.Called(_a0, _a1)
var r0 *abcicli.ReqRes
if rf, ok := ret.Get(0).(func(context.Context) *abcicli.ReqRes); ok {
r0 = rf(_a0)
var r0 *types.ResponseExtendVote
if rf, ok := ret.Get(0).(func(context.Context, *types.RequestExtendVote) *types.ResponseExtendVote); ok {
r0 = rf(_a0, _a1)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*abcicli.ReqRes)
r0 = ret.Get(0).(*types.ResponseExtendVote)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context) error); ok {
r1 = rf(_a0)
if rf, ok := ret.Get(1).(func(context.Context, *types.RequestExtendVote) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
}
@@ -378,8 +143,31 @@ func (_m *Client) FlushAsync(_a0 context.Context) (*abcicli.ReqRes, error) {
return r0, r1
}
// FlushSync provides a mock function with given fields: _a0
func (_m *Client) FlushSync(_a0 context.Context) error {
// FinalizeBlock provides a mock function with given fields: _a0, _a1
func (_m *Client) FinalizeBlock(_a0 context.Context, _a1 *types.RequestFinalizeBlock) (*types.ResponseFinalizeBlock, error) {
ret := _m.Called(_a0, _a1)
var r0 *types.ResponseFinalizeBlock
if rf, ok := ret.Get(0).(func(context.Context, *types.RequestFinalizeBlock) *types.ResponseFinalizeBlock); ok {
r0 = rf(_a0, _a1)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*types.ResponseFinalizeBlock)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *types.RequestFinalizeBlock) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Flush provides a mock function with given fields: _a0
func (_m *Client) Flush(_a0 context.Context) error {
ret := _m.Called(_a0)
var r0 error
@@ -392,35 +180,12 @@ func (_m *Client) FlushSync(_a0 context.Context) error {
return r0
}
// InfoAsync provides a mock function with given fields: _a0, _a1
func (_m *Client) InfoAsync(_a0 context.Context, _a1 types.RequestInfo) (*abcicli.ReqRes, error) {
ret := _m.Called(_a0, _a1)
var r0 *abcicli.ReqRes
if rf, ok := ret.Get(0).(func(context.Context, types.RequestInfo) *abcicli.ReqRes); ok {
r0 = rf(_a0, _a1)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*abcicli.ReqRes)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, types.RequestInfo) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// InfoSync provides a mock function with given fields: _a0, _a1
func (_m *Client) InfoSync(_a0 context.Context, _a1 types.RequestInfo) (*types.ResponseInfo, error) {
// Info provides a mock function with given fields: _a0, _a1
func (_m *Client) Info(_a0 context.Context, _a1 *types.RequestInfo) (*types.ResponseInfo, error) {
ret := _m.Called(_a0, _a1)
var r0 *types.ResponseInfo
if rf, ok := ret.Get(0).(func(context.Context, types.RequestInfo) *types.ResponseInfo); ok {
if rf, ok := ret.Get(0).(func(context.Context, *types.RequestInfo) *types.ResponseInfo); ok {
r0 = rf(_a0, _a1)
} else {
if ret.Get(0) != nil {
@@ -429,7 +194,7 @@ func (_m *Client) InfoSync(_a0 context.Context, _a1 types.RequestInfo) (*types.R
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, types.RequestInfo) error); ok {
if rf, ok := ret.Get(1).(func(context.Context, *types.RequestInfo) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
@@ -438,35 +203,12 @@ func (_m *Client) InfoSync(_a0 context.Context, _a1 types.RequestInfo) (*types.R
return r0, r1
}
// InitChainAsync provides a mock function with given fields: _a0, _a1
func (_m *Client) InitChainAsync(_a0 context.Context, _a1 types.RequestInitChain) (*abcicli.ReqRes, error) {
ret := _m.Called(_a0, _a1)
var r0 *abcicli.ReqRes
if rf, ok := ret.Get(0).(func(context.Context, types.RequestInitChain) *abcicli.ReqRes); ok {
r0 = rf(_a0, _a1)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*abcicli.ReqRes)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, types.RequestInitChain) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// InitChainSync provides a mock function with given fields: _a0, _a1
func (_m *Client) InitChainSync(_a0 context.Context, _a1 types.RequestInitChain) (*types.ResponseInitChain, error) {
// InitChain provides a mock function with given fields: _a0, _a1
func (_m *Client) InitChain(_a0 context.Context, _a1 *types.RequestInitChain) (*types.ResponseInitChain, error) {
ret := _m.Called(_a0, _a1)
var r0 *types.ResponseInitChain
if rf, ok := ret.Get(0).(func(context.Context, types.RequestInitChain) *types.ResponseInitChain); ok {
if rf, ok := ret.Get(0).(func(context.Context, *types.RequestInitChain) *types.ResponseInitChain); ok {
r0 = rf(_a0, _a1)
} else {
if ret.Get(0) != nil {
@@ -475,7 +217,7 @@ func (_m *Client) InitChainSync(_a0 context.Context, _a1 types.RequestInitChain)
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, types.RequestInitChain) error); ok {
if rf, ok := ret.Get(1).(func(context.Context, *types.RequestInitChain) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
@@ -498,35 +240,12 @@ func (_m *Client) IsRunning() bool {
return r0
}
// ListSnapshotsAsync provides a mock function with given fields: _a0, _a1
func (_m *Client) ListSnapshotsAsync(_a0 context.Context, _a1 types.RequestListSnapshots) (*abcicli.ReqRes, error) {
ret := _m.Called(_a0, _a1)
var r0 *abcicli.ReqRes
if rf, ok := ret.Get(0).(func(context.Context, types.RequestListSnapshots) *abcicli.ReqRes); ok {
r0 = rf(_a0, _a1)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*abcicli.ReqRes)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, types.RequestListSnapshots) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// ListSnapshotsSync provides a mock function with given fields: _a0, _a1
func (_m *Client) ListSnapshotsSync(_a0 context.Context, _a1 types.RequestListSnapshots) (*types.ResponseListSnapshots, error) {
// ListSnapshots provides a mock function with given fields: _a0, _a1
func (_m *Client) ListSnapshots(_a0 context.Context, _a1 *types.RequestListSnapshots) (*types.ResponseListSnapshots, error) {
ret := _m.Called(_a0, _a1)
var r0 *types.ResponseListSnapshots
if rf, ok := ret.Get(0).(func(context.Context, types.RequestListSnapshots) *types.ResponseListSnapshots); ok {
if rf, ok := ret.Get(0).(func(context.Context, *types.RequestListSnapshots) *types.ResponseListSnapshots); ok {
r0 = rf(_a0, _a1)
} else {
if ret.Get(0) != nil {
@@ -535,7 +254,7 @@ func (_m *Client) ListSnapshotsSync(_a0 context.Context, _a1 types.RequestListSn
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, types.RequestListSnapshots) error); ok {
if rf, ok := ret.Get(1).(func(context.Context, *types.RequestListSnapshots) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
@@ -544,35 +263,12 @@ func (_m *Client) ListSnapshotsSync(_a0 context.Context, _a1 types.RequestListSn
return r0, r1
}
// LoadSnapshotChunkAsync provides a mock function with given fields: _a0, _a1
func (_m *Client) LoadSnapshotChunkAsync(_a0 context.Context, _a1 types.RequestLoadSnapshotChunk) (*abcicli.ReqRes, error) {
ret := _m.Called(_a0, _a1)
var r0 *abcicli.ReqRes
if rf, ok := ret.Get(0).(func(context.Context, types.RequestLoadSnapshotChunk) *abcicli.ReqRes); ok {
r0 = rf(_a0, _a1)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*abcicli.ReqRes)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, types.RequestLoadSnapshotChunk) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// LoadSnapshotChunkSync provides a mock function with given fields: _a0, _a1
func (_m *Client) LoadSnapshotChunkSync(_a0 context.Context, _a1 types.RequestLoadSnapshotChunk) (*types.ResponseLoadSnapshotChunk, error) {
// LoadSnapshotChunk provides a mock function with given fields: _a0, _a1
func (_m *Client) LoadSnapshotChunk(_a0 context.Context, _a1 *types.RequestLoadSnapshotChunk) (*types.ResponseLoadSnapshotChunk, error) {
ret := _m.Called(_a0, _a1)
var r0 *types.ResponseLoadSnapshotChunk
if rf, ok := ret.Get(0).(func(context.Context, types.RequestLoadSnapshotChunk) *types.ResponseLoadSnapshotChunk); ok {
if rf, ok := ret.Get(0).(func(context.Context, *types.RequestLoadSnapshotChunk) *types.ResponseLoadSnapshotChunk); ok {
r0 = rf(_a0, _a1)
} else {
if ret.Get(0) != nil {
@@ -581,7 +277,7 @@ func (_m *Client) LoadSnapshotChunkSync(_a0 context.Context, _a1 types.RequestLo
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, types.RequestLoadSnapshotChunk) error); ok {
if rf, ok := ret.Get(1).(func(context.Context, *types.RequestLoadSnapshotChunk) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
@@ -590,35 +286,12 @@ func (_m *Client) LoadSnapshotChunkSync(_a0 context.Context, _a1 types.RequestLo
return r0, r1
}
// OfferSnapshotAsync provides a mock function with given fields: _a0, _a1
func (_m *Client) OfferSnapshotAsync(_a0 context.Context, _a1 types.RequestOfferSnapshot) (*abcicli.ReqRes, error) {
ret := _m.Called(_a0, _a1)
var r0 *abcicli.ReqRes
if rf, ok := ret.Get(0).(func(context.Context, types.RequestOfferSnapshot) *abcicli.ReqRes); ok {
r0 = rf(_a0, _a1)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*abcicli.ReqRes)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, types.RequestOfferSnapshot) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// OfferSnapshotSync provides a mock function with given fields: _a0, _a1
func (_m *Client) OfferSnapshotSync(_a0 context.Context, _a1 types.RequestOfferSnapshot) (*types.ResponseOfferSnapshot, error) {
// OfferSnapshot provides a mock function with given fields: _a0, _a1
func (_m *Client) OfferSnapshot(_a0 context.Context, _a1 *types.RequestOfferSnapshot) (*types.ResponseOfferSnapshot, error) {
ret := _m.Called(_a0, _a1)
var r0 *types.ResponseOfferSnapshot
if rf, ok := ret.Get(0).(func(context.Context, types.RequestOfferSnapshot) *types.ResponseOfferSnapshot); ok {
if rf, ok := ret.Get(0).(func(context.Context, *types.RequestOfferSnapshot) *types.ResponseOfferSnapshot); ok {
r0 = rf(_a0, _a1)
} else {
if ret.Get(0) != nil {
@@ -627,7 +300,7 @@ func (_m *Client) OfferSnapshotSync(_a0 context.Context, _a1 types.RequestOfferS
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, types.RequestOfferSnapshot) error); ok {
if rf, ok := ret.Get(1).(func(context.Context, *types.RequestOfferSnapshot) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
@@ -636,54 +309,21 @@ func (_m *Client) OfferSnapshotSync(_a0 context.Context, _a1 types.RequestOfferS
return r0, r1
}
// OnReset provides a mock function with given fields:
func (_m *Client) OnReset() error {
ret := _m.Called()
var r0 error
if rf, ok := ret.Get(0).(func() error); ok {
r0 = rf()
} else {
r0 = ret.Error(0)
}
return r0
}
// OnStart provides a mock function with given fields:
func (_m *Client) OnStart() error {
ret := _m.Called()
var r0 error
if rf, ok := ret.Get(0).(func() error); ok {
r0 = rf()
} else {
r0 = ret.Error(0)
}
return r0
}
// OnStop provides a mock function with given fields:
func (_m *Client) OnStop() {
_m.Called()
}
// QueryAsync provides a mock function with given fields: _a0, _a1
func (_m *Client) QueryAsync(_a0 context.Context, _a1 types.RequestQuery) (*abcicli.ReqRes, error) {
// PrepareProposal provides a mock function with given fields: _a0, _a1
func (_m *Client) PrepareProposal(_a0 context.Context, _a1 *types.RequestPrepareProposal) (*types.ResponsePrepareProposal, error) {
ret := _m.Called(_a0, _a1)
var r0 *abcicli.ReqRes
if rf, ok := ret.Get(0).(func(context.Context, types.RequestQuery) *abcicli.ReqRes); ok {
var r0 *types.ResponsePrepareProposal
if rf, ok := ret.Get(0).(func(context.Context, *types.RequestPrepareProposal) *types.ResponsePrepareProposal); ok {
r0 = rf(_a0, _a1)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*abcicli.ReqRes)
r0 = ret.Get(0).(*types.ResponsePrepareProposal)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, types.RequestQuery) error); ok {
if rf, ok := ret.Get(1).(func(context.Context, *types.RequestPrepareProposal) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
@@ -692,12 +332,35 @@ func (_m *Client) QueryAsync(_a0 context.Context, _a1 types.RequestQuery) (*abci
return r0, r1
}
// QuerySync provides a mock function with given fields: _a0, _a1
func (_m *Client) QuerySync(_a0 context.Context, _a1 types.RequestQuery) (*types.ResponseQuery, error) {
// ProcessProposal provides a mock function with given fields: _a0, _a1
func (_m *Client) ProcessProposal(_a0 context.Context, _a1 *types.RequestProcessProposal) (*types.ResponseProcessProposal, error) {
ret := _m.Called(_a0, _a1)
var r0 *types.ResponseProcessProposal
if rf, ok := ret.Get(0).(func(context.Context, *types.RequestProcessProposal) *types.ResponseProcessProposal); ok {
r0 = rf(_a0, _a1)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*types.ResponseProcessProposal)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *types.RequestProcessProposal) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Query provides a mock function with given fields: _a0, _a1
func (_m *Client) Query(_a0 context.Context, _a1 *types.RequestQuery) (*types.ResponseQuery, error) {
ret := _m.Called(_a0, _a1)
var r0 *types.ResponseQuery
if rf, ok := ret.Get(0).(func(context.Context, types.RequestQuery) *types.ResponseQuery); ok {
if rf, ok := ret.Get(0).(func(context.Context, *types.RequestQuery) *types.ResponseQuery); ok {
r0 = rf(_a0, _a1)
} else {
if ret.Get(0) != nil {
@@ -706,7 +369,7 @@ func (_m *Client) QuerySync(_a0 context.Context, _a1 types.RequestQuery) (*types
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, types.RequestQuery) error); ok {
if rf, ok := ret.Get(1).(func(context.Context, *types.RequestQuery) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
@@ -715,89 +378,59 @@ func (_m *Client) QuerySync(_a0 context.Context, _a1 types.RequestQuery) (*types
return r0, r1
}
// Quit provides a mock function with given fields:
func (_m *Client) Quit() <-chan struct{} {
ret := _m.Called()
// Start provides a mock function with given fields: _a0
func (_m *Client) Start(_a0 context.Context) error {
ret := _m.Called(_a0)
var r0 <-chan struct{}
if rf, ok := ret.Get(0).(func() <-chan struct{}); ok {
r0 = rf()
var r0 error
if rf, ok := ret.Get(0).(func(context.Context) error); ok {
r0 = rf(_a0)
} else {
r0 = ret.Error(0)
}
return r0
}
// VerifyVoteExtension provides a mock function with given fields: _a0, _a1
func (_m *Client) VerifyVoteExtension(_a0 context.Context, _a1 *types.RequestVerifyVoteExtension) (*types.ResponseVerifyVoteExtension, error) {
ret := _m.Called(_a0, _a1)
var r0 *types.ResponseVerifyVoteExtension
if rf, ok := ret.Get(0).(func(context.Context, *types.RequestVerifyVoteExtension) *types.ResponseVerifyVoteExtension); ok {
r0 = rf(_a0, _a1)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(<-chan struct{})
r0 = ret.Get(0).(*types.ResponseVerifyVoteExtension)
}
}
return r0
}
// Reset provides a mock function with given fields:
func (_m *Client) Reset() error {
ret := _m.Called()
var r0 error
if rf, ok := ret.Get(0).(func() error); ok {
r0 = rf()
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *types.RequestVerifyVoteExtension) error); ok {
r1 = rf(_a0, _a1)
} else {
r0 = ret.Error(0)
r1 = ret.Error(1)
}
return r0
}
// SetLogger provides a mock function with given fields: _a0
func (_m *Client) SetLogger(_a0 log.Logger) {
_m.Called(_a0)
}
// SetResponseCallback provides a mock function with given fields: _a0
func (_m *Client) SetResponseCallback(_a0 abcicli.Callback) {
_m.Called(_a0)
}
// Start provides a mock function with given fields:
func (_m *Client) Start() error {
ret := _m.Called()
var r0 error
if rf, ok := ret.Get(0).(func() error); ok {
r0 = rf()
} else {
r0 = ret.Error(0)
}
return r0
}
// Stop provides a mock function with given fields:
func (_m *Client) Stop() error {
ret := _m.Called()
var r0 error
if rf, ok := ret.Get(0).(func() error); ok {
r0 = rf()
} else {
r0 = ret.Error(0)
}
return r0
}
// String provides a mock function with given fields:
func (_m *Client) String() string {
ret := _m.Called()
var r0 string
if rf, ok := ret.Get(0).(func() string); ok {
r0 = rf()
} else {
r0 = ret.Get(0).(string)
}
return r0
return r0, r1
}
// Wait provides a mock function with given fields:
func (_m *Client) Wait() {
_m.Called()
}
type NewClientT interface {
mock.TestingT
Cleanup(func())
}
// NewClient creates a new instance of Client. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewClient(t NewClientT) *Client {
mock := &Client{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}

View File

@@ -1,4 +1,4 @@
package abcicli
package abciclient
import (
"bufio"
@@ -8,45 +8,30 @@ import (
"fmt"
"io"
"net"
"reflect"
"sync"
"time"
"github.com/tendermint/tendermint/abci/types"
tmsync "github.com/tendermint/tendermint/internal/libs/sync"
"github.com/tendermint/tendermint/internal/libs/timer"
"github.com/tendermint/tendermint/libs/log"
tmnet "github.com/tendermint/tendermint/libs/net"
"github.com/tendermint/tendermint/libs/service"
)
const (
// reqQueueSize is the max number of queued async requests.
// (memory: 256MB max assuming 1MB transactions)
reqQueueSize = 256
// Don't wait longer than...
flushThrottleMS = 20
)
type reqResWithContext struct {
R *ReqRes
C context.Context // if context.Err is not nil, reqRes will be thrown away (ignored)
}
// This is goroutine-safe, but users should beware that the application in
// general is not meant to be interfaced with concurrent callers.
type socketClient struct {
service.BaseService
logger log.Logger
addr string
mustConnect bool
conn net.Conn
reqQueue chan *reqResWithContext
flushTimer *timer.ThrottleTimer
reqQueue chan *requestAndResponse
mtx tmsync.RWMutex
mtx sync.Mutex
err error
reqSent *list.List // list of requests sent, waiting for response
resCb func(*types.Request, *types.Response) // called on all requests, if set.
reqSent *list.List // list of requests sent, waiting for response
}
var _ Client = (*socketClient)(nil)
@@ -54,27 +39,27 @@ var _ Client = (*socketClient)(nil)
// NewSocketClient creates a new socket client, which connects to a given
// address. If mustConnect is true, the client will return an error upon start
// if it fails to connect.
func NewSocketClient(addr string, mustConnect bool) Client {
func NewSocketClient(logger log.Logger, addr string, mustConnect bool) Client {
cli := &socketClient{
reqQueue: make(chan *reqResWithContext, reqQueueSize),
flushTimer: timer.NewThrottleTimer("socketClient", flushThrottleMS),
logger: logger,
reqQueue: make(chan *requestAndResponse),
mustConnect: mustConnect,
addr: addr,
reqSent: list.New(),
resCb: nil,
addr: addr,
reqSent: list.New(),
}
cli.BaseService = *service.NewBaseService(nil, "socketClient", cli)
cli.BaseService = *service.NewBaseService(logger, "socketClient", cli)
return cli
}
// OnStart implements Service by connecting to the server and spawning reading
// and writing goroutines.
func (cli *socketClient) OnStart() error {
func (cli *socketClient) OnStart(ctx context.Context) error {
var (
err error
conn net.Conn
)
timer := time.NewTimer(0)
defer timer.Stop()
for {
conn, err = tmnet.Connect(cli.addr)
@@ -82,15 +67,24 @@ func (cli *socketClient) OnStart() error {
if cli.mustConnect {
return err
}
cli.Logger.Error(fmt.Sprintf("abci.socketClient failed to connect to %v. Retrying after %vs...",
cli.addr, dialRetryIntervalSeconds), "err", err)
time.Sleep(time.Second * dialRetryIntervalSeconds)
continue
cli.logger.Error("abci.socketClient failed to connect, retrying after",
"retry_after", dialRetryIntervalSeconds,
"target", cli.addr,
"err", err)
timer.Reset(time.Second * dialRetryIntervalSeconds)
select {
case <-ctx.Done():
return ctx.Err()
case <-timer.C:
continue
}
}
cli.conn = conn
go cli.sendRequestsRoutine(conn)
go cli.recvResponseRoutine(conn)
go cli.sendRequestsRoutine(ctx, conn)
go cli.recvResponseRoutine(ctx, conn)
return nil
}
@@ -101,89 +95,63 @@ func (cli *socketClient) OnStop() {
if cli.conn != nil {
cli.conn.Close()
}
cli.flushQueue()
cli.flushTimer.Stop()
cli.drainQueue()
}
// Error returns an error if the client was stopped abruptly.
func (cli *socketClient) Error() error {
cli.mtx.RLock()
defer cli.mtx.RUnlock()
return cli.err
}
// SetResponseCallback sets a callback, which will be executed for each
// non-error & non-empty response from the server.
//
// NOTE: callback may get internally generated flush responses.
func (cli *socketClient) SetResponseCallback(resCb Callback) {
cli.mtx.Lock()
defer cli.mtx.Unlock()
cli.resCb = resCb
return cli.err
}
//----------------------------------------
func (cli *socketClient) sendRequestsRoutine(conn io.Writer) {
w := bufio.NewWriter(conn)
func (cli *socketClient) sendRequestsRoutine(ctx context.Context, conn io.Writer) {
bw := bufio.NewWriter(conn)
for {
select {
case <-ctx.Done():
return
case reqres := <-cli.reqQueue:
// cli.Logger.Debug("Sent request", "requestType", reflect.TypeOf(reqres.Request), "request", reqres.Request)
// N.B. We must enqueue before sending out the request, otherwise the
// server may reply before we do it, and the receiver will fail for an
// unsolicited reply.
cli.trackRequest(reqres)
if reqres.C.Err() != nil {
cli.Logger.Debug("Request's context is done", "req", reqres.R, "err", reqres.C.Err())
continue
}
cli.willSendReq(reqres.R)
err := types.WriteMessage(reqres.R.Request, w)
if err != nil {
if err := types.WriteMessage(reqres.Request, bw); err != nil {
cli.stopForError(fmt.Errorf("write to buffer: %w", err))
return
}
// If it's a flush request, flush the current buffer.
if _, ok := reqres.R.Request.Value.(*types.Request_Flush); ok {
err = w.Flush()
if err != nil {
cli.stopForError(fmt.Errorf("flush buffer: %w", err))
return
}
if err := bw.Flush(); err != nil {
cli.stopForError(fmt.Errorf("flush buffer: %w", err))
return
}
case <-cli.flushTimer.Ch: // flush queue
select {
case cli.reqQueue <- &reqResWithContext{R: NewReqRes(types.ToRequestFlush()), C: context.Background()}:
default:
// Probably will fill the buffer, or retry later.
}
case <-cli.Quit():
return
}
}
}
func (cli *socketClient) recvResponseRoutine(conn io.Reader) {
func (cli *socketClient) recvResponseRoutine(ctx context.Context, conn io.Reader) {
r := bufio.NewReader(conn)
for {
var res = &types.Response{}
err := types.ReadMessage(r, res)
if err != nil {
if ctx.Err() != nil {
return
}
res := &types.Response{}
if err := types.ReadMessage(r, res); err != nil {
cli.stopForError(fmt.Errorf("read message: %w", err))
return
}
// cli.Logger.Debug("Received response", "responseType", reflect.TypeOf(res), "response", res)
switch r := res.Value.(type) {
case *types.Response_Exception: // app responded with error
// XXX After setting cli.err, release waiters (e.g. reqres.Done())
cli.stopForError(errors.New(r.Exception.Error))
return
default:
err := cli.didRecvResponse(res)
if err != nil {
if err := cli.didRecvResponse(res); err != nil {
cli.stopForError(err)
return
}
@@ -191,7 +159,13 @@ func (cli *socketClient) recvResponseRoutine(conn io.Reader) {
}
}
func (cli *socketClient) willSendReq(reqres *ReqRes) {
func (cli *socketClient) trackRequest(reqres *requestAndResponse) {
// N.B. We must NOT hold the client state lock while checking this, or we
// may deadlock with shutdown.
if !cli.IsRunning() {
return
}
cli.mtx.Lock()
defer cli.mtx.Unlock()
cli.reqSent.PushBack(reqres)
@@ -204,359 +178,189 @@ func (cli *socketClient) didRecvResponse(res *types.Response) error {
// Get the first ReqRes.
next := cli.reqSent.Front()
if next == nil {
return fmt.Errorf("unexpected %v when nothing expected", reflect.TypeOf(res.Value))
return fmt.Errorf("unexpected %T when nothing expected", res.Value)
}
reqres := next.Value.(*ReqRes)
reqres := next.Value.(*requestAndResponse)
if !resMatchesReq(reqres.Request, res) {
return fmt.Errorf("unexpected %v when response to %v expected",
reflect.TypeOf(res.Value), reflect.TypeOf(reqres.Request.Value))
return fmt.Errorf("unexpected %T when response to %T expected", res.Value, reqres.Request.Value)
}
reqres.Response = res
reqres.Done() // release waiters
reqres.markDone() // release waiters
cli.reqSent.Remove(next) // pop first item from linked list
// Notify client listener if set (global callback).
if cli.resCb != nil {
cli.resCb(reqres.Request, res)
}
// Notify reqRes listener if set (request specific callback).
//
// NOTE: It is possible this callback isn't set on the reqres object. At this
// point, in which case it will be called after, when it is set.
reqres.InvokeCallback()
return nil
}
//----------------------------------------
func (cli *socketClient) EchoAsync(ctx context.Context, msg string) (*ReqRes, error) {
return cli.queueRequestAsync(ctx, types.ToRequestEcho(msg))
}
func (cli *socketClient) FlushAsync(ctx context.Context) (*ReqRes, error) {
return cli.queueRequestAsync(ctx, types.ToRequestFlush())
}
func (cli *socketClient) InfoAsync(ctx context.Context, req types.RequestInfo) (*ReqRes, error) {
return cli.queueRequestAsync(ctx, types.ToRequestInfo(req))
}
func (cli *socketClient) DeliverTxAsync(ctx context.Context, req types.RequestDeliverTx) (*ReqRes, error) {
return cli.queueRequestAsync(ctx, types.ToRequestDeliverTx(req))
}
func (cli *socketClient) CheckTxAsync(ctx context.Context, req types.RequestCheckTx) (*ReqRes, error) {
return cli.queueRequestAsync(ctx, types.ToRequestCheckTx(req))
}
func (cli *socketClient) QueryAsync(ctx context.Context, req types.RequestQuery) (*ReqRes, error) {
return cli.queueRequestAsync(ctx, types.ToRequestQuery(req))
}
func (cli *socketClient) CommitAsync(ctx context.Context) (*ReqRes, error) {
return cli.queueRequestAsync(ctx, types.ToRequestCommit())
}
func (cli *socketClient) InitChainAsync(ctx context.Context, req types.RequestInitChain) (*ReqRes, error) {
return cli.queueRequestAsync(ctx, types.ToRequestInitChain(req))
}
func (cli *socketClient) BeginBlockAsync(ctx context.Context, req types.RequestBeginBlock) (*ReqRes, error) {
return cli.queueRequestAsync(ctx, types.ToRequestBeginBlock(req))
}
func (cli *socketClient) EndBlockAsync(ctx context.Context, req types.RequestEndBlock) (*ReqRes, error) {
return cli.queueRequestAsync(ctx, types.ToRequestEndBlock(req))
}
func (cli *socketClient) ListSnapshotsAsync(ctx context.Context, req types.RequestListSnapshots) (*ReqRes, error) {
return cli.queueRequestAsync(ctx, types.ToRequestListSnapshots(req))
}
func (cli *socketClient) OfferSnapshotAsync(ctx context.Context, req types.RequestOfferSnapshot) (*ReqRes, error) {
return cli.queueRequestAsync(ctx, types.ToRequestOfferSnapshot(req))
}
func (cli *socketClient) LoadSnapshotChunkAsync(
ctx context.Context,
req types.RequestLoadSnapshotChunk,
) (*ReqRes, error) {
return cli.queueRequestAsync(ctx, types.ToRequestLoadSnapshotChunk(req))
}
func (cli *socketClient) ApplySnapshotChunkAsync(
ctx context.Context,
req types.RequestApplySnapshotChunk,
) (*ReqRes, error) {
return cli.queueRequestAsync(ctx, types.ToRequestApplySnapshotChunk(req))
}
//----------------------------------------
func (cli *socketClient) FlushSync(ctx context.Context) error {
reqRes, err := cli.queueRequest(ctx, types.ToRequestFlush(), true)
if err != nil {
return queueErr(err)
func (cli *socketClient) doRequest(ctx context.Context, req *types.Request) (*types.Response, error) {
if !cli.IsRunning() {
return nil, errors.New("client has stopped")
}
if err := cli.Error(); err != nil {
return err
}
gotResp := make(chan struct{})
go func() {
// NOTE: if we don't flush the queue, its possible to get stuck here
reqRes.Wait()
close(gotResp)
}()
reqres := makeReqRes(req)
select {
case <-gotResp:
return cli.Error()
case cli.reqQueue <- reqres:
case <-ctx.Done():
return ctx.Err()
return nil, fmt.Errorf("can't queue req: %w", ctx.Err())
}
}
func (cli *socketClient) EchoSync(ctx context.Context, msg string) (*types.ResponseEcho, error) {
reqres, err := cli.queueRequestAndFlushSync(ctx, types.ToRequestEcho(msg))
if err != nil {
return nil, err
}
return reqres.Response.GetEcho(), nil
}
func (cli *socketClient) InfoSync(
ctx context.Context,
req types.RequestInfo,
) (*types.ResponseInfo, error) {
reqres, err := cli.queueRequestAndFlushSync(ctx, types.ToRequestInfo(req))
if err != nil {
return nil, err
}
return reqres.Response.GetInfo(), nil
}
func (cli *socketClient) DeliverTxSync(
ctx context.Context,
req types.RequestDeliverTx,
) (*types.ResponseDeliverTx, error) {
reqres, err := cli.queueRequestAndFlushSync(ctx, types.ToRequestDeliverTx(req))
if err != nil {
return nil, err
}
return reqres.Response.GetDeliverTx(), nil
}
func (cli *socketClient) CheckTxSync(
ctx context.Context,
req types.RequestCheckTx,
) (*types.ResponseCheckTx, error) {
reqres, err := cli.queueRequestAndFlushSync(ctx, types.ToRequestCheckTx(req))
if err != nil {
return nil, err
}
return reqres.Response.GetCheckTx(), nil
}
func (cli *socketClient) QuerySync(
ctx context.Context,
req types.RequestQuery,
) (*types.ResponseQuery, error) {
reqres, err := cli.queueRequestAndFlushSync(ctx, types.ToRequestQuery(req))
if err != nil {
return nil, err
}
return reqres.Response.GetQuery(), nil
}
func (cli *socketClient) CommitSync(ctx context.Context) (*types.ResponseCommit, error) {
reqres, err := cli.queueRequestAndFlushSync(ctx, types.ToRequestCommit())
if err != nil {
return nil, err
}
return reqres.Response.GetCommit(), nil
}
func (cli *socketClient) InitChainSync(
ctx context.Context,
req types.RequestInitChain,
) (*types.ResponseInitChain, error) {
reqres, err := cli.queueRequestAndFlushSync(ctx, types.ToRequestInitChain(req))
if err != nil {
return nil, err
}
return reqres.Response.GetInitChain(), nil
}
func (cli *socketClient) BeginBlockSync(
ctx context.Context,
req types.RequestBeginBlock,
) (*types.ResponseBeginBlock, error) {
reqres, err := cli.queueRequestAndFlushSync(ctx, types.ToRequestBeginBlock(req))
if err != nil {
return nil, err
}
return reqres.Response.GetBeginBlock(), nil
}
func (cli *socketClient) EndBlockSync(
ctx context.Context,
req types.RequestEndBlock,
) (*types.ResponseEndBlock, error) {
reqres, err := cli.queueRequestAndFlushSync(ctx, types.ToRequestEndBlock(req))
if err != nil {
return nil, err
}
return reqres.Response.GetEndBlock(), nil
}
func (cli *socketClient) ListSnapshotsSync(
ctx context.Context,
req types.RequestListSnapshots,
) (*types.ResponseListSnapshots, error) {
reqres, err := cli.queueRequestAndFlushSync(ctx, types.ToRequestListSnapshots(req))
if err != nil {
return nil, err
}
return reqres.Response.GetListSnapshots(), nil
}
func (cli *socketClient) OfferSnapshotSync(
ctx context.Context,
req types.RequestOfferSnapshot,
) (*types.ResponseOfferSnapshot, error) {
reqres, err := cli.queueRequestAndFlushSync(ctx, types.ToRequestOfferSnapshot(req))
if err != nil {
return nil, err
}
return reqres.Response.GetOfferSnapshot(), nil
}
func (cli *socketClient) LoadSnapshotChunkSync(
ctx context.Context,
req types.RequestLoadSnapshotChunk) (*types.ResponseLoadSnapshotChunk, error) {
reqres, err := cli.queueRequestAndFlushSync(ctx, types.ToRequestLoadSnapshotChunk(req))
if err != nil {
return nil, err
}
return reqres.Response.GetLoadSnapshotChunk(), nil
}
func (cli *socketClient) ApplySnapshotChunkSync(
ctx context.Context,
req types.RequestApplySnapshotChunk) (*types.ResponseApplySnapshotChunk, error) {
reqres, err := cli.queueRequestAndFlushSync(ctx, types.ToRequestApplySnapshotChunk(req))
if err != nil {
return nil, err
}
return reqres.Response.GetApplySnapshotChunk(), nil
}
//----------------------------------------
// queueRequest enqueues req onto the queue. If the queue is full, it ether
// returns an error (sync=false) or blocks (sync=true).
//
// When sync=true, ctx can be used to break early. When sync=false, ctx will be
// used later to determine if request should be dropped (if ctx.Err is
// non-nil).
//
// The caller is responsible for checking cli.Error.
func (cli *socketClient) queueRequest(ctx context.Context, req *types.Request, sync bool) (*ReqRes, error) {
reqres := NewReqRes(req)
if sync {
select {
case cli.reqQueue <- &reqResWithContext{R: reqres, C: context.Background()}:
case <-ctx.Done():
return nil, ctx.Err()
select {
case <-reqres.signal:
if err := cli.Error(); err != nil {
return nil, err
}
} else {
select {
case cli.reqQueue <- &reqResWithContext{R: reqres, C: ctx}:
default:
return nil, errors.New("buffer is full")
}
}
// Maybe auto-flush, or unset auto-flush
switch req.Value.(type) {
case *types.Request_Flush:
cli.flushTimer.Unset()
default:
cli.flushTimer.Set()
return reqres.Response, nil
case <-ctx.Done():
return nil, ctx.Err()
}
return reqres, nil
}
func (cli *socketClient) queueRequestAsync(
ctx context.Context,
req *types.Request,
) (*ReqRes, error) {
reqres, err := cli.queueRequest(ctx, req, false)
if err != nil {
return nil, queueErr(err)
}
return reqres, cli.Error()
}
func (cli *socketClient) queueRequestAndFlushSync(
ctx context.Context,
req *types.Request,
) (*ReqRes, error) {
reqres, err := cli.queueRequest(ctx, req, true)
if err != nil {
return nil, queueErr(err)
}
if err := cli.FlushSync(ctx); err != nil {
return nil, err
}
return reqres, cli.Error()
}
func queueErr(e error) error {
return fmt.Errorf("can't queue req: %w", e)
}
func (cli *socketClient) flushQueue() {
// drainQueue marks as complete and discards all remaining pending requests
// from the queue.
func (cli *socketClient) drainQueue() {
cli.mtx.Lock()
defer cli.mtx.Unlock()
// mark all in-flight messages as resolved (they will get cli.Error())
for req := cli.reqSent.Front(); req != nil; req = req.Next() {
reqres := req.Value.(*ReqRes)
reqres.Done()
reqres := req.Value.(*requestAndResponse)
reqres.markDone()
}
}
// mark all queued messages as resolved
LOOP:
for {
select {
case reqres := <-cli.reqQueue:
reqres.R.Done()
default:
break LOOP
}
//----------------------------------------
func (cli *socketClient) Flush(ctx context.Context) error {
_, err := cli.doRequest(ctx, types.ToRequestFlush())
if err != nil {
return err
}
return nil
}
func (cli *socketClient) Echo(ctx context.Context, msg string) (*types.ResponseEcho, error) {
res, err := cli.doRequest(ctx, types.ToRequestEcho(msg))
if err != nil {
return nil, err
}
return res.GetEcho(), nil
}
func (cli *socketClient) Info(ctx context.Context, req *types.RequestInfo) (*types.ResponseInfo, error) {
res, err := cli.doRequest(ctx, types.ToRequestInfo(req))
if err != nil {
return nil, err
}
return res.GetInfo(), nil
}
func (cli *socketClient) CheckTx(ctx context.Context, req *types.RequestCheckTx) (*types.ResponseCheckTx, error) {
res, err := cli.doRequest(ctx, types.ToRequestCheckTx(req))
if err != nil {
return nil, err
}
return res.GetCheckTx(), nil
}
func (cli *socketClient) Query(ctx context.Context, req *types.RequestQuery) (*types.ResponseQuery, error) {
res, err := cli.doRequest(ctx, types.ToRequestQuery(req))
if err != nil {
return nil, err
}
return res.GetQuery(), nil
}
func (cli *socketClient) Commit(ctx context.Context) (*types.ResponseCommit, error) {
res, err := cli.doRequest(ctx, types.ToRequestCommit())
if err != nil {
return nil, err
}
return res.GetCommit(), nil
}
func (cli *socketClient) InitChain(ctx context.Context, req *types.RequestInitChain) (*types.ResponseInitChain, error) {
res, err := cli.doRequest(ctx, types.ToRequestInitChain(req))
if err != nil {
return nil, err
}
return res.GetInitChain(), nil
}
func (cli *socketClient) ListSnapshots(ctx context.Context, req *types.RequestListSnapshots) (*types.ResponseListSnapshots, error) {
res, err := cli.doRequest(ctx, types.ToRequestListSnapshots(req))
if err != nil {
return nil, err
}
return res.GetListSnapshots(), nil
}
func (cli *socketClient) OfferSnapshot(ctx context.Context, req *types.RequestOfferSnapshot) (*types.ResponseOfferSnapshot, error) {
res, err := cli.doRequest(ctx, types.ToRequestOfferSnapshot(req))
if err != nil {
return nil, err
}
return res.GetOfferSnapshot(), nil
}
func (cli *socketClient) LoadSnapshotChunk(ctx context.Context, req *types.RequestLoadSnapshotChunk) (*types.ResponseLoadSnapshotChunk, error) {
res, err := cli.doRequest(ctx, types.ToRequestLoadSnapshotChunk(req))
if err != nil {
return nil, err
}
return res.GetLoadSnapshotChunk(), nil
}
func (cli *socketClient) ApplySnapshotChunk(ctx context.Context, req *types.RequestApplySnapshotChunk) (*types.ResponseApplySnapshotChunk, error) {
res, err := cli.doRequest(ctx, types.ToRequestApplySnapshotChunk(req))
if err != nil {
return nil, err
}
return res.GetApplySnapshotChunk(), nil
}
func (cli *socketClient) PrepareProposal(ctx context.Context, req *types.RequestPrepareProposal) (*types.ResponsePrepareProposal, error) {
res, err := cli.doRequest(ctx, types.ToRequestPrepareProposal(req))
if err != nil {
return nil, err
}
return res.GetPrepareProposal(), nil
}
func (cli *socketClient) ProcessProposal(ctx context.Context, req *types.RequestProcessProposal) (*types.ResponseProcessProposal, error) {
res, err := cli.doRequest(ctx, types.ToRequestProcessProposal(req))
if err != nil {
return nil, err
}
return res.GetProcessProposal(), nil
}
func (cli *socketClient) ExtendVote(ctx context.Context, req *types.RequestExtendVote) (*types.ResponseExtendVote, error) {
res, err := cli.doRequest(ctx, types.ToRequestExtendVote(req))
if err != nil {
return nil, err
}
return res.GetExtendVote(), nil
}
func (cli *socketClient) VerifyVoteExtension(ctx context.Context, req *types.RequestVerifyVoteExtension) (*types.ResponseVerifyVoteExtension, error) {
res, err := cli.doRequest(ctx, types.ToRequestVerifyVoteExtension(req))
if err != nil {
return nil, err
}
return res.GetVerifyVoteExtension(), nil
}
func (cli *socketClient) FinalizeBlock(ctx context.Context, req *types.RequestFinalizeBlock) (*types.ResponseFinalizeBlock, error) {
res, err := cli.doRequest(ctx, types.ToRequestFinalizeBlock(req))
if err != nil {
return nil, err
}
return res.GetFinalizeBlock(), nil
}
//----------------------------------------
@@ -569,8 +373,6 @@ func resMatchesReq(req *types.Request, res *types.Response) (ok bool) {
_, ok = res.Value.(*types.Response_Flush)
case *types.Request_Info:
_, ok = res.Value.(*types.Response_Info)
case *types.Request_DeliverTx:
_, ok = res.Value.(*types.Response_DeliverTx)
case *types.Request_CheckTx:
_, ok = res.Value.(*types.Response_CheckTx)
case *types.Request_Commit:
@@ -579,10 +381,14 @@ func resMatchesReq(req *types.Request, res *types.Response) (ok bool) {
_, ok = res.Value.(*types.Response_Query)
case *types.Request_InitChain:
_, ok = res.Value.(*types.Response_InitChain)
case *types.Request_BeginBlock:
_, ok = res.Value.(*types.Response_BeginBlock)
case *types.Request_EndBlock:
_, ok = res.Value.(*types.Response_EndBlock)
case *types.Request_ProcessProposal:
_, ok = res.Value.(*types.Response_ProcessProposal)
case *types.Request_PrepareProposal:
_, ok = res.Value.(*types.Response_PrepareProposal)
case *types.Request_ExtendVote:
_, ok = res.Value.(*types.Response_ExtendVote)
case *types.Request_VerifyVoteExtension:
_, ok = res.Value.(*types.Response_VerifyVoteExtension)
case *types.Request_ApplySnapshotChunk:
_, ok = res.Value.(*types.Response_ApplySnapshotChunk)
case *types.Request_LoadSnapshotChunk:
@@ -591,6 +397,8 @@ func resMatchesReq(req *types.Request, res *types.Response) (ok bool) {
_, ok = res.Value.(*types.Response_ListSnapshots)
case *types.Request_OfferSnapshot:
_, ok = res.Value.(*types.Response_OfferSnapshot)
case *types.Request_FinalizeBlock:
_, ok = res.Value.(*types.Response_FinalizeBlock)
}
return ok
}
@@ -604,8 +412,6 @@ func (cli *socketClient) stopForError(err error) {
cli.err = err
cli.mtx.Unlock()
cli.Logger.Info("Stopping abci.socketClient", "reason", err)
if err := cli.Stop(); err != nil {
cli.Logger.Error("Error stopping abci.socketClient", "err", err)
}
cli.logger.Info("Stopping abci.socketClient", "reason", err)
cli.Stop()
}

View File

@@ -1,127 +0,0 @@
package abcicli_test
import (
"context"
"fmt"
"testing"
"time"
"math/rand"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
abcicli "github.com/tendermint/tendermint/abci/client"
"github.com/tendermint/tendermint/abci/server"
"github.com/tendermint/tendermint/abci/types"
"github.com/tendermint/tendermint/libs/service"
)
var ctx = context.Background()
func TestProperSyncCalls(t *testing.T) {
app := slowApp{}
s, c := setupClientServer(t, app)
t.Cleanup(func() {
if err := s.Stop(); err != nil {
t.Error(err)
}
})
t.Cleanup(func() {
if err := c.Stop(); err != nil {
t.Error(err)
}
})
resp := make(chan error, 1)
go func() {
// This is BeginBlockSync unrolled....
reqres, err := c.BeginBlockAsync(ctx, types.RequestBeginBlock{})
assert.NoError(t, err)
err = c.FlushSync(context.Background())
assert.NoError(t, err)
res := reqres.Response.GetBeginBlock()
assert.NotNil(t, res)
resp <- c.Error()
}()
select {
case <-time.After(time.Second):
require.Fail(t, "No response arrived")
case err, ok := <-resp:
require.True(t, ok, "Must not close channel")
assert.NoError(t, err, "This should return success")
}
}
func TestHangingSyncCalls(t *testing.T) {
app := slowApp{}
s, c := setupClientServer(t, app)
t.Cleanup(func() {
if err := s.Stop(); err != nil {
t.Log(err)
}
})
t.Cleanup(func() {
if err := c.Stop(); err != nil {
t.Log(err)
}
})
resp := make(chan error, 1)
go func() {
// Start BeginBlock and flush it
reqres, err := c.BeginBlockAsync(ctx, types.RequestBeginBlock{})
assert.NoError(t, err)
flush, err := c.FlushAsync(ctx)
assert.NoError(t, err)
// wait 20 ms for all events to travel socket, but
// no response yet from server
time.Sleep(20 * time.Millisecond)
// kill the server, so the connections break
err = s.Stop()
assert.NoError(t, err)
// wait for the response from BeginBlock
reqres.Wait()
flush.Wait()
resp <- c.Error()
}()
select {
case <-time.After(time.Second):
require.Fail(t, "No response arrived")
case err, ok := <-resp:
require.True(t, ok, "Must not close channel")
assert.Error(t, err, "We should get EOF error")
}
}
func setupClientServer(t *testing.T, app types.Application) (
service.Service, abcicli.Client) {
// some port between 20k and 30k
port := 20000 + rand.Int31()%10000
addr := fmt.Sprintf("localhost:%d", port)
s, err := server.NewServer(addr, "socket", app)
require.NoError(t, err)
err = s.Start()
require.NoError(t, err)
c := abcicli.NewSocketClient(addr, true)
err = c.Start()
require.NoError(t, err)
return s, c
}
type slowApp struct {
types.BaseApplication
}
func (slowApp) BeginBlock(req types.RequestBeginBlock) types.ResponseBeginBlock {
time.Sleep(200 * time.Millisecond)
return types.ResponseBeginBlock{}
}

View File

@@ -2,35 +2,33 @@ package main
import (
"bufio"
"context"
"bytes"
"encoding/hex"
"errors"
"fmt"
"io"
"os"
"os/signal"
"strings"
"syscall"
"github.com/spf13/cobra"
"github.com/tendermint/tendermint/libs/log"
tmos "github.com/tendermint/tendermint/libs/os"
"github.com/tendermint/tendermint/version"
abcicli "github.com/tendermint/tendermint/abci/client"
abciclient "github.com/tendermint/tendermint/abci/client"
"github.com/tendermint/tendermint/abci/example/code"
"github.com/tendermint/tendermint/abci/example/kvstore"
"github.com/tendermint/tendermint/abci/server"
servertest "github.com/tendermint/tendermint/abci/tests/server"
"github.com/tendermint/tendermint/abci/types"
"github.com/tendermint/tendermint/abci/version"
"github.com/tendermint/tendermint/proto/tendermint/crypto"
)
// client is a global variable so it can be reused by the console
var (
client abcicli.Client
logger log.Logger
ctx = context.Background()
client abciclient.Client
)
// flags
@@ -50,43 +48,42 @@ var (
flagPersist string
)
var RootCmd = &cobra.Command{
Use: "abci-cli",
Short: "the ABCI CLI tool wraps an ABCI client",
Long: "the ABCI CLI tool wraps an ABCI client and is used for testing ABCI servers",
PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
func RootCmmand(logger log.Logger) *cobra.Command {
return &cobra.Command{
Use: "abci-cli",
Short: "the ABCI CLI tool wraps an ABCI client",
Long: "the ABCI CLI tool wraps an ABCI client and is used for testing ABCI servers",
PersistentPreRunE: func(cmd *cobra.Command, args []string) (err error) {
switch cmd.Use {
case "kvstore", "version":
switch cmd.Use {
case "kvstore", "version":
return nil
}
if client == nil {
var err error
client, err = abciclient.NewClient(logger.With("module", "abci-client"), flagAddress, flagAbci, false)
if err != nil {
return err
}
if err := client.Start(cmd.Context()); err != nil {
return err
}
}
return nil
}
if logger == nil {
logger = log.MustNewDefaultLogger(log.LogFormatPlain, log.LogLevelInfo, false)
}
if client == nil {
var err error
client, err = abcicli.NewClient(flagAddress, flagAbci, false)
if err != nil {
return err
}
client.SetLogger(logger.With("module", "abci-client"))
if err := client.Start(); err != nil {
return err
}
}
return nil
},
},
}
}
// Structure for data passed to print response.
type response struct {
// generic abci response
Data []byte
Code uint32
Info string
Log string
Data []byte
Code uint32
Info string
Log string
Status int32
Query *queryResponse
}
@@ -99,56 +96,48 @@ type queryResponse struct {
}
func Execute() error {
addGlobalFlags()
addCommands()
return RootCmd.Execute()
logger, err := log.NewDefaultLogger(log.LogFormatPlain, log.LogLevelInfo)
if err != nil {
return err
}
cmd := RootCmmand(logger)
addGlobalFlags(cmd)
addCommands(cmd, logger)
return cmd.Execute()
}
func addGlobalFlags() {
RootCmd.PersistentFlags().StringVarP(&flagAddress,
func addGlobalFlags(cmd *cobra.Command) {
cmd.PersistentFlags().StringVarP(&flagAddress,
"address",
"",
"tcp://0.0.0.0:26658",
"address of application socket")
RootCmd.PersistentFlags().StringVarP(&flagAbci, "abci", "", "socket", "either socket or grpc")
RootCmd.PersistentFlags().BoolVarP(&flagVerbose,
cmd.PersistentFlags().StringVarP(&flagAbci, "abci", "", "socket", "either socket or grpc")
cmd.PersistentFlags().BoolVarP(&flagVerbose,
"verbose",
"v",
false,
"print the command and results as if it were a console session")
RootCmd.PersistentFlags().StringVarP(&flagLogLevel, "log_level", "", "debug", "set the logger level")
cmd.PersistentFlags().StringVarP(&flagLogLevel, "log_level", "", "debug", "set the logger level")
}
func addQueryFlags() {
queryCmd.PersistentFlags().StringVarP(&flagPath, "path", "", "/store", "path to prefix query with")
queryCmd.PersistentFlags().IntVarP(&flagHeight, "height", "", 0, "height to query the blockchain at")
queryCmd.PersistentFlags().BoolVarP(&flagProve,
"prove",
"",
false,
"whether or not to return a merkle proof of the query result")
}
func addKVStoreFlags() {
kvstoreCmd.PersistentFlags().StringVarP(&flagPersist, "persist", "", "", "directory to use for a database")
}
func addCommands() {
RootCmd.AddCommand(batchCmd)
RootCmd.AddCommand(consoleCmd)
RootCmd.AddCommand(echoCmd)
RootCmd.AddCommand(infoCmd)
RootCmd.AddCommand(deliverTxCmd)
RootCmd.AddCommand(checkTxCmd)
RootCmd.AddCommand(commitCmd)
RootCmd.AddCommand(versionCmd)
RootCmd.AddCommand(testCmd)
addQueryFlags()
RootCmd.AddCommand(queryCmd)
func addCommands(cmd *cobra.Command, logger log.Logger) {
cmd.AddCommand(batchCmd)
cmd.AddCommand(consoleCmd)
cmd.AddCommand(echoCmd)
cmd.AddCommand(infoCmd)
cmd.AddCommand(finalizeBlockCmd)
cmd.AddCommand(checkTxCmd)
cmd.AddCommand(commitCmd)
cmd.AddCommand(versionCmd)
cmd.AddCommand(testCmd)
cmd.AddCommand(prepareProposalCmd)
cmd.AddCommand(processProposalCmd)
cmd.AddCommand(getQueryCmd())
// examples
addKVStoreFlags()
RootCmd.AddCommand(kvstoreCmd)
cmd.AddCommand(getKVStoreCmd(logger))
}
var batchCmd = &cobra.Command{
@@ -165,10 +154,11 @@ where example.file looks something like:
check_tx 0x00
check_tx 0xff
deliver_tx 0x00
finalize_block 0x00
commit
check_tx 0x00
deliver_tx 0x01
deliver_tx 0x04
finalize_block 0x01 0x04 0xff
commit
info
`,
Args: cobra.ExactArgs(0),
@@ -184,7 +174,7 @@ This command opens an interactive console for running any of the other commands
without opening a new connection each time
`,
Args: cobra.ExactArgs(0),
ValidArgs: []string{"echo", "info", "deliver_tx", "check_tx", "commit", "query"},
ValidArgs: []string{"echo", "info", "query", "check_tx", "prepare_proposal", "process_proposal", "finalize_block", "commit"},
RunE: cmdConsole,
}
@@ -203,12 +193,12 @@ var infoCmd = &cobra.Command{
RunE: cmdInfo,
}
var deliverTxCmd = &cobra.Command{
Use: "deliver_tx",
Short: "deliver a new transaction to the application",
Long: "deliver a new transaction to the application",
Args: cobra.ExactArgs(1),
RunE: cmdDeliverTx,
var finalizeBlockCmd = &cobra.Command{
Use: "finalize_block",
Short: "deliver a block of transactions to the application",
Long: "deliver a block of transactions to the application",
Args: cobra.MinimumNArgs(0),
RunE: cmdFinalizeBlock,
}
var checkTxCmd = &cobra.Command{
@@ -233,25 +223,59 @@ var versionCmd = &cobra.Command{
Long: "print ABCI console version",
Args: cobra.ExactArgs(0),
RunE: func(cmd *cobra.Command, args []string) error {
fmt.Println(version.Version)
fmt.Println(version.ABCIVersion)
return nil
},
}
var queryCmd = &cobra.Command{
Use: "query",
Short: "query the application state",
Long: "query the application state",
Args: cobra.ExactArgs(1),
RunE: cmdQuery,
var prepareProposalCmd = &cobra.Command{
Use: "prepare_proposal",
Short: "prepare proposal",
Long: "prepare proposal",
Args: cobra.MinimumNArgs(0),
RunE: cmdPrepareProposal,
}
var kvstoreCmd = &cobra.Command{
Use: "kvstore",
Short: "ABCI demo example",
Long: "ABCI demo example",
Args: cobra.ExactArgs(0),
RunE: cmdKVStore,
var processProposalCmd = &cobra.Command{
Use: "process_proposal",
Short: "process proposal",
Long: "process proposal",
Args: cobra.MinimumNArgs(0),
RunE: cmdProcessProposal,
}
func getQueryCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "query",
Short: "query the application state",
Long: "query the application state",
Args: cobra.ExactArgs(1),
RunE: cmdQuery,
}
cmd.PersistentFlags().StringVarP(&flagPath, "path", "", "/store", "path to prefix query with")
cmd.PersistentFlags().IntVarP(&flagHeight, "height", "", 0, "height to query the blockchain at")
cmd.PersistentFlags().BoolVarP(&flagProve,
"prove",
"",
false,
"whether or not to return a merkle proof of the query result")
return cmd
}
func getKVStoreCmd(logger log.Logger) *cobra.Command {
cmd := &cobra.Command{
Use: "kvstore",
Short: "ABCI demo example",
Long: "ABCI demo example",
Args: cobra.ExactArgs(0),
RunE: makeKVStoreCmd(logger),
}
cmd.PersistentFlags().StringVarP(&flagPersist, "persist", "", "", "directory to use for a database")
return cmd
}
var testCmd = &cobra.Command{
@@ -292,23 +316,57 @@ func compose(fs []func() error) error {
}
func cmdTest(cmd *cobra.Command, args []string) error {
ctx := cmd.Context()
return compose(
[]func() error{
func() error { return servertest.InitChain(client) },
func() error { return servertest.Commit(client, nil) },
func() error { return servertest.DeliverTx(client, []byte("abc"), code.CodeTypeBadNonce, nil) },
func() error { return servertest.Commit(client, nil) },
func() error { return servertest.DeliverTx(client, []byte{0x00}, code.CodeTypeOK, nil) },
func() error { return servertest.Commit(client, []byte{0, 0, 0, 0, 0, 0, 0, 1}) },
func() error { return servertest.DeliverTx(client, []byte{0x00}, code.CodeTypeBadNonce, nil) },
func() error { return servertest.DeliverTx(client, []byte{0x01}, code.CodeTypeOK, nil) },
func() error { return servertest.DeliverTx(client, []byte{0x00, 0x02}, code.CodeTypeOK, nil) },
func() error { return servertest.DeliverTx(client, []byte{0x00, 0x03}, code.CodeTypeOK, nil) },
func() error { return servertest.DeliverTx(client, []byte{0x00, 0x00, 0x04}, code.CodeTypeOK, nil) },
func() error { return servertest.InitChain(ctx, client) },
func() error { return servertest.Commit(ctx, client) },
func() error {
return servertest.DeliverTx(client, []byte{0x00, 0x00, 0x06}, code.CodeTypeBadNonce, nil)
return servertest.FinalizeBlock(ctx, client, [][]byte{
[]byte("abc"),
}, []uint32{
code.CodeTypeBadNonce,
}, nil, nil)
},
func() error { return servertest.Commit(ctx, client) },
func() error {
return servertest.FinalizeBlock(ctx, client, [][]byte{
{0x00},
}, []uint32{
code.CodeTypeOK,
}, nil, []byte{0, 0, 0, 0, 0, 0, 0, 1})
},
func() error { return servertest.Commit(ctx, client) },
func() error {
return servertest.FinalizeBlock(ctx, client, [][]byte{
{0x00},
{0x01},
{0x00, 0x02},
{0x00, 0x03},
{0x00, 0x00, 0x04},
{0x00, 0x00, 0x06},
}, []uint32{
code.CodeTypeBadNonce,
code.CodeTypeOK,
code.CodeTypeOK,
code.CodeTypeOK,
code.CodeTypeOK,
code.CodeTypeBadNonce,
}, nil, []byte{0, 0, 0, 0, 0, 0, 0, 5})
},
func() error { return servertest.Commit(ctx, client) },
func() error {
return servertest.PrepareProposal(ctx, client, [][]byte{
{0x01},
}, []types.TxRecord_TxAction{
types.TxRecord_UNMODIFIED,
}, nil)
},
func() error {
return servertest.ProcessProposal(ctx, client, [][]byte{
{0x01},
}, types.ResponseProcessProposal_ACCEPT)
},
func() error { return servertest.Commit(client, []byte{0, 0, 0, 0, 0, 0, 0, 5}) },
})
}
@@ -401,14 +459,18 @@ func muxOnCommands(cmd *cobra.Command, pArgs []string) error {
return cmdCheckTx(cmd, actualArgs)
case "commit":
return cmdCommit(cmd, actualArgs)
case "deliver_tx":
return cmdDeliverTx(cmd, actualArgs)
case "finalize_block":
return cmdFinalizeBlock(cmd, actualArgs)
case "echo":
return cmdEcho(cmd, actualArgs)
case "info":
return cmdInfo(cmd, actualArgs)
case "query":
return cmdQuery(cmd, actualArgs)
case "prepare_proposal":
return cmdPrepareProposal(cmd, actualArgs)
case "process_proposal":
return cmdProcessProposal(cmd, actualArgs)
default:
return cmdUnimplemented(cmd, pArgs)
}
@@ -426,12 +488,9 @@ func cmdUnimplemented(cmd *cobra.Command, args []string) error {
})
fmt.Println("Available commands:")
fmt.Printf("%s: %s\n", echoCmd.Use, echoCmd.Short)
fmt.Printf("%s: %s\n", infoCmd.Use, infoCmd.Short)
fmt.Printf("%s: %s\n", checkTxCmd.Use, checkTxCmd.Short)
fmt.Printf("%s: %s\n", deliverTxCmd.Use, deliverTxCmd.Short)
fmt.Printf("%s: %s\n", queryCmd.Use, queryCmd.Short)
fmt.Printf("%s: %s\n", commitCmd.Use, commitCmd.Short)
for _, cmd := range cmd.Commands() {
fmt.Printf("%s: %s\n", cmd.Use, cmd.Short)
}
fmt.Println("Use \"[command] --help\" for more information about a command.")
return nil
@@ -443,13 +502,15 @@ func cmdEcho(cmd *cobra.Command, args []string) error {
if len(args) > 0 {
msg = args[0]
}
res, err := client.EchoSync(ctx, msg)
res, err := client.Echo(cmd.Context(), msg)
if err != nil {
return err
}
printResponse(cmd, args, response{
Data: []byte(res.Message),
})
return nil
}
@@ -459,7 +520,7 @@ func cmdInfo(cmd *cobra.Command, args []string) error {
if len(args) == 1 {
version = args[0]
}
res, err := client.InfoSync(ctx, types.RequestInfo{Version: version})
res, err := client.Info(cmd.Context(), &types.RequestInfo{Version: version})
if err != nil {
return err
}
@@ -471,29 +532,33 @@ func cmdInfo(cmd *cobra.Command, args []string) error {
const codeBad uint32 = 10
// Append a new tx to application
func cmdDeliverTx(cmd *cobra.Command, args []string) error {
if len(args) == 0 {
printResponse(cmd, args, response{
Code: codeBad,
Log: "want the tx",
// Append new txs to application
func cmdFinalizeBlock(cmd *cobra.Command, args []string) error {
txs := make([][]byte, len(args))
for i, arg := range args {
txBytes, err := stringOrHexToBytes(arg)
if err != nil {
return err
}
txs[i] = txBytes
}
res, err := client.FinalizeBlock(cmd.Context(), &types.RequestFinalizeBlock{Txs: txs})
if err != nil {
return err
}
resps := make([]response, 0, len(res.TxResults)+1)
for _, tx := range res.TxResults {
resps = append(resps, response{
Code: tx.Code,
Data: tx.Data,
Info: tx.Info,
Log: tx.Log,
})
return nil
}
txBytes, err := stringOrHexToBytes(args[0])
if err != nil {
return err
}
res, err := client.DeliverTxSync(ctx, types.RequestDeliverTx{Tx: txBytes})
if err != nil {
return err
}
printResponse(cmd, args, response{
Code: res.Code,
Data: res.Data,
Info: res.Info,
Log: res.Log,
resps = append(resps, response{
Data: res.AppHash,
})
printResponse(cmd, args, resps...)
return nil
}
@@ -510,28 +575,24 @@ func cmdCheckTx(cmd *cobra.Command, args []string) error {
if err != nil {
return err
}
res, err := client.CheckTxSync(ctx, types.RequestCheckTx{Tx: txBytes})
res, err := client.CheckTx(cmd.Context(), &types.RequestCheckTx{Tx: txBytes})
if err != nil {
return err
}
printResponse(cmd, args, response{
Code: res.Code,
Data: res.Data,
Info: res.Info,
Log: res.Log,
})
return nil
}
// Get application Merkle root hash
func cmdCommit(cmd *cobra.Command, args []string) error {
res, err := client.CommitSync(ctx)
_, err := client.Commit(cmd.Context())
if err != nil {
return err
}
printResponse(cmd, args, response{
Data: res.Data,
})
printResponse(cmd, args, response{})
return nil
}
@@ -550,7 +611,7 @@ func cmdQuery(cmd *cobra.Command, args []string) error {
return err
}
resQuery, err := client.QuerySync(ctx, types.RequestQuery{
resQuery, err := client.Query(cmd.Context(), &types.RequestQuery{
Data: queryBytes,
Path: flagPath,
Height: int64(flagHeight),
@@ -573,80 +634,155 @@ func cmdQuery(cmd *cobra.Command, args []string) error {
return nil
}
func cmdKVStore(cmd *cobra.Command, args []string) error {
logger := log.MustNewDefaultLogger(log.LogFormatPlain, log.LogLevelInfo, false)
func inTxArray(txByteArray [][]byte, tx []byte) bool {
for _, txTmp := range txByteArray {
if bytes.Equal(txTmp, tx) {
return true
}
// Create the application - in memory or persisted to disk
var app types.Application
if flagPersist == "" {
app = kvstore.NewApplication()
} else {
app = kvstore.NewPersistentKVStoreApplication(flagPersist)
app.(*kvstore.PersistentKVStoreApplication).SetLogger(logger.With("module", "kvstore"))
}
return false
}
func cmdPrepareProposal(cmd *cobra.Command, args []string) error {
txsBytesArray := make([][]byte, len(args))
for i, arg := range args {
txBytes, err := stringOrHexToBytes(arg)
if err != nil {
return err
}
txsBytesArray[i] = txBytes
}
// Start the listener
srv, err := server.NewServer(flagAddress, flagAbci, app)
res, err := client.PrepareProposal(cmd.Context(), &types.RequestPrepareProposal{
Txs: txsBytesArray,
// kvstore has to have this parameter in order not to reject a tx as the default value is 0
MaxTxBytes: 65536,
})
if err != nil {
return err
}
srv.SetLogger(logger.With("module", "abci-server"))
if err := srv.Start(); err != nil {
resps := make([]response, 0, len(res.TxResults)+1)
for _, tx := range res.TxRecords {
existingTx := inTxArray(txsBytesArray, tx.Tx)
if tx.Action == types.TxRecord_UNKNOWN ||
(existingTx && tx.Action == types.TxRecord_ADDED) ||
(!existingTx && (tx.Action == types.TxRecord_UNMODIFIED || tx.Action == types.TxRecord_REMOVED)) {
resps = append(resps, response{
Code: codeBad,
Log: "Failed. Tx: " + string(tx.GetTx()) + " action: " + tx.Action.String(),
})
} else {
resps = append(resps, response{
Code: code.CodeTypeOK,
Log: "Succeeded. Tx: " + string(tx.Tx) + " action: " + tx.Action.String(),
})
}
}
printResponse(cmd, args, resps...)
return nil
}
func cmdProcessProposal(cmd *cobra.Command, args []string) error {
txsBytesArray := make([][]byte, len(args))
for i, arg := range args {
txBytes, err := stringOrHexToBytes(arg)
if err != nil {
return err
}
txsBytesArray[i] = txBytes
}
res, err := client.ProcessProposal(cmd.Context(), &types.RequestProcessProposal{
Txs: txsBytesArray,
})
if err != nil {
return err
}
// Stop upon receiving SIGTERM or CTRL-C.
tmos.TrapSignal(logger, func() {
// Cleanup
if err := srv.Stop(); err != nil {
logger.Error("Error while stopping server", "err", err)
}
printResponse(cmd, args, response{
Status: int32(res.Status),
})
return nil
}
func makeKVStoreCmd(logger log.Logger) func(*cobra.Command, []string) error {
return func(cmd *cobra.Command, args []string) error {
// Create the application - in memory or persisted to disk
var app types.Application
if flagPersist == "" {
app = kvstore.NewApplication()
} else {
app = kvstore.NewPersistentKVStoreApplication(logger, flagPersist)
}
// Start the listener
srv, err := server.NewServer(logger.With("module", "abci-server"), flagAddress, flagAbci, app)
if err != nil {
return err
}
ctx, cancel := signal.NotifyContext(cmd.Context(), syscall.SIGTERM)
defer cancel()
if err := srv.Start(ctx); err != nil {
return err
}
// Run forever.
<-ctx.Done()
return nil
}
// Run forever.
select {}
}
//--------------------------------------------------------------------------------
func printResponse(cmd *cobra.Command, args []string, rsp response) {
func printResponse(cmd *cobra.Command, args []string, rsps ...response) {
if flagVerbose {
fmt.Println(">", cmd.Use, strings.Join(args, " "))
}
// Always print the status code.
if rsp.Code == types.CodeTypeOK {
fmt.Printf("-> code: OK\n")
} else {
fmt.Printf("-> code: %d\n", rsp.Code)
}
if len(rsp.Data) != 0 {
// Do no print this line when using the commit command
// because the string comes out as gibberish
if cmd.Use != "commit" {
fmt.Printf("-> data: %s\n", rsp.Data)
for _, rsp := range rsps {
// Always print the status code.
if rsp.Code == types.CodeTypeOK {
fmt.Printf("-> code: OK\n")
} else {
fmt.Printf("-> code: %d\n", rsp.Code)
}
fmt.Printf("-> data.hex: 0x%X\n", rsp.Data)
}
if rsp.Log != "" {
fmt.Printf("-> log: %s\n", rsp.Log)
}
if rsp.Query != nil {
fmt.Printf("-> height: %d\n", rsp.Query.Height)
if rsp.Query.Key != nil {
fmt.Printf("-> key: %s\n", rsp.Query.Key)
fmt.Printf("-> key.hex: %X\n", rsp.Query.Key)
if len(rsp.Data) != 0 {
// Do no print this line when using the finalize_block command
// because the string comes out as gibberish
if cmd.Use != "finalize_block" {
fmt.Printf("-> data: %s\n", rsp.Data)
}
fmt.Printf("-> data.hex: 0x%X\n", rsp.Data)
}
if rsp.Query.Value != nil {
fmt.Printf("-> value: %s\n", rsp.Query.Value)
fmt.Printf("-> value.hex: %X\n", rsp.Query.Value)
if rsp.Log != "" {
fmt.Printf("-> log: %s\n", rsp.Log)
}
if rsp.Query.ProofOps != nil {
fmt.Printf("-> proof: %#v\n", rsp.Query.ProofOps)
if cmd.Use == "process_proposal" {
fmt.Printf("-> status: %s\n", types.ResponseProcessProposal_ProposalStatus_name[rsp.Status])
}
if rsp.Query != nil {
fmt.Printf("-> height: %d\n", rsp.Query.Height)
if rsp.Query.Key != nil {
fmt.Printf("-> key: %s\n", rsp.Query.Key)
fmt.Printf("-> key.hex: %X\n", rsp.Query.Key)
}
if rsp.Query.Value != nil {
fmt.Printf("-> value: %s\n", rsp.Query.Value)
fmt.Printf("-> value.hex: %X\n", rsp.Query.Value)
}
if rsp.Query.ProofOps != nil {
fmt.Printf("-> proof: %#v\n", rsp.Query.ProofOps)
}
}
}
}

View File

@@ -6,18 +6,18 @@ import (
"math/rand"
"net"
"os"
"reflect"
"testing"
"time"
"github.com/stretchr/testify/require"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"
"github.com/tendermint/tendermint/libs/log"
tmnet "github.com/tendermint/tendermint/libs/net"
abcicli "github.com/tendermint/tendermint/abci/client"
abciclient "github.com/tendermint/tendermint/abci/client"
"github.com/tendermint/tendermint/abci/example/code"
"github.com/tendermint/tendermint/abci/example/kvstore"
abciserver "github.com/tendermint/tendermint/abci/server"
@@ -29,95 +29,69 @@ func init() {
}
func TestKVStore(t *testing.T) {
fmt.Println("### Testing KVStore")
testStream(t, kvstore.NewApplication())
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
logger := log.NewNopLogger()
t.Log("### Testing KVStore")
testBulk(ctx, t, logger, kvstore.NewApplication())
}
func TestBaseApp(t *testing.T) {
fmt.Println("### Testing BaseApp")
testStream(t, types.NewBaseApplication())
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
logger := log.NewNopLogger()
t.Log("### Testing BaseApp")
testBulk(ctx, t, logger, types.NewBaseApplication())
}
func TestGRPC(t *testing.T) {
fmt.Println("### Testing GRPC")
testGRPCSync(t, types.NewGRPCApplication(types.NewBaseApplication()))
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
logger := log.NewNopLogger()
t.Log("### Testing GRPC")
testGRPCSync(ctx, t, logger, types.NewBaseApplication())
}
func testStream(t *testing.T, app types.Application) {
const numDeliverTxs = 20000
func testBulk(ctx context.Context, t *testing.T, logger log.Logger, app types.Application) {
t.Helper()
const numDeliverTxs = 700000
socketFile := fmt.Sprintf("test-%08x.sock", rand.Int31n(1<<30))
defer os.Remove(socketFile)
socket := fmt.Sprintf("unix://%v", socketFile)
// Start the listener
server := abciserver.NewSocketServer(socket, app)
server.SetLogger(log.TestingLogger().With("module", "abci-server"))
err := server.Start()
server := abciserver.NewSocketServer(logger.With("module", "abci-server"), socket, app)
t.Cleanup(server.Wait)
err := server.Start(ctx)
require.NoError(t, err)
t.Cleanup(func() {
if err := server.Stop(); err != nil {
t.Error(err)
}
})
// Connect to the socket
client := abcicli.NewSocketClient(socket, false)
client.SetLogger(log.TestingLogger().With("module", "abci-client"))
err = client.Start()
client := abciclient.NewSocketClient(logger.With("module", "abci-client"), socket, false)
t.Cleanup(client.Wait)
err = client.Start(ctx)
require.NoError(t, err)
t.Cleanup(func() {
if err := client.Stop(); err != nil {
t.Error(err)
}
})
done := make(chan struct{})
counter := 0
client.SetResponseCallback(func(req *types.Request, res *types.Response) {
// Process response
switch r := res.Value.(type) {
case *types.Response_DeliverTx:
counter++
if r.DeliverTx.Code != code.CodeTypeOK {
t.Error("DeliverTx failed with ret_code", r.DeliverTx.Code)
}
if counter > numDeliverTxs {
t.Fatalf("Too many DeliverTx responses. Got %d, expected %d", counter, numDeliverTxs)
}
if counter == numDeliverTxs {
go func() {
time.Sleep(time.Second * 1) // Wait for a bit to allow counter overflow
close(done)
}()
return
}
case *types.Response_Flush:
// ignore
default:
t.Error("Unexpected response type", reflect.TypeOf(res.Value))
}
})
ctx := context.Background()
// Write requests
// Construct request
rfb := &types.RequestFinalizeBlock{Txs: make([][]byte, numDeliverTxs)}
for counter := 0; counter < numDeliverTxs; counter++ {
// Send request
_, err = client.DeliverTxAsync(ctx, types.RequestDeliverTx{Tx: []byte("test")})
require.NoError(t, err)
// Sometimes send flush messages
if counter%128 == 0 {
err = client.FlushSync(context.Background())
require.NoError(t, err)
}
rfb.Txs[counter] = []byte("test")
}
// Send bulk request
res, err := client.FinalizeBlock(ctx, rfb)
require.NoError(t, err)
require.Equal(t, numDeliverTxs, len(res.TxResults), "Number of txs doesn't match")
for _, tx := range res.TxResults {
require.Equal(t, tx.Code, code.CodeTypeOK, "Tx failed")
}
// Send final flush message
_, err = client.FlushAsync(ctx)
err = client.Flush(ctx)
require.NoError(t, err)
<-done
}
//-------------------------
@@ -127,30 +101,25 @@ func dialerFunc(ctx context.Context, addr string) (net.Conn, error) {
return tmnet.Connect(addr)
}
func testGRPCSync(t *testing.T, app types.ABCIApplicationServer) {
numDeliverTxs := 2000
socketFile := fmt.Sprintf("test-%08x.sock", rand.Int31n(1<<30))
func testGRPCSync(ctx context.Context, t *testing.T, logger log.Logger, app types.Application) {
t.Helper()
numDeliverTxs := 680000
socketFile := fmt.Sprintf("/tmp/test-%08x.sock", rand.Int31n(1<<30))
defer os.Remove(socketFile)
socket := fmt.Sprintf("unix://%v", socketFile)
// Start the listener
server := abciserver.NewGRPCServer(socket, app)
server.SetLogger(log.TestingLogger().With("module", "abci-server"))
if err := server.Start(); err != nil {
t.Fatalf("Error starting GRPC server: %v", err.Error())
}
server := abciserver.NewGRPCServer(logger.With("module", "abci-server"), socket, app)
t.Cleanup(func() {
if err := server.Stop(); err != nil {
t.Error(err)
}
})
require.NoError(t, server.Start(ctx))
t.Cleanup(server.Wait)
// Connect to the socket
conn, err := grpc.Dial(socket, grpc.WithInsecure(), grpc.WithContextDialer(dialerFunc))
if err != nil {
t.Fatalf("Error dialing GRPC server: %v", err.Error())
}
conn, err := grpc.Dial(socket,
grpc.WithTransportCredentials(insecure.NewCredentials()),
grpc.WithContextDialer(dialerFunc),
)
require.NoError(t, err, "Error dialing GRPC server")
t.Cleanup(func() {
if err := conn.Close(); err != nil {
@@ -160,26 +129,17 @@ func testGRPCSync(t *testing.T, app types.ABCIApplicationServer) {
client := types.NewABCIApplicationClient(conn)
// Write requests
// Construct request
rfb := types.RequestFinalizeBlock{Txs: make([][]byte, numDeliverTxs)}
for counter := 0; counter < numDeliverTxs; counter++ {
// Send request
response, err := client.DeliverTx(context.Background(), &types.RequestDeliverTx{Tx: []byte("test")})
if err != nil {
t.Fatalf("Error in GRPC DeliverTx: %v", err.Error())
}
counter++
if response.Code != code.CodeTypeOK {
t.Error("DeliverTx failed with ret_code", response.Code)
}
if counter > numDeliverTxs {
t.Fatal("Too many DeliverTx responses")
}
t.Log("response", counter)
if counter == numDeliverTxs {
go func() {
time.Sleep(time.Second * 1) // Wait for a bit to allow counter overflow
}()
}
rfb.Txs[counter] = []byte("test")
}
// Send request
response, err := client.FinalizeBlock(ctx, &rfb)
require.NoError(t, err, "Error in GRPC FinalizeBlock")
require.Equal(t, numDeliverTxs, len(response.TxResults), "Number of txs returned via GRPC doesn't match")
for _, tx := range response.TxResults {
require.Equal(t, tx.Code, code.CodeTypeOK, "Tx failed")
}
}

View File

@@ -4,7 +4,7 @@ There are two app's here: the KVStoreApplication and the PersistentKVStoreApplic
## KVStoreApplication
The KVStoreApplication is a simple merkle key-value store.
The KVStoreApplication is a simple merkle key-value store.
Transactions of the form `key=value` are stored as key-value pairs in the tree.
Transactions without an `=` sign set the value to the key.
The app has no replay protection (other than what the mempool provides).
@@ -12,7 +12,7 @@ The app has no replay protection (other than what the mempool provides).
## PersistentKVStoreApplication
The PersistentKVStoreApplication wraps the KVStoreApplication
and provides two additional features:
and provides three additional features:
1) persistence of state across app restarts (using Tendermint's ABCI-Handshake mechanism)
2) validator set changes
@@ -27,4 +27,4 @@ Validator set changes are effected using the following transaction format:
where `pubkeyN` is a base64-encoded 32-byte ed25519 key and `powerN` is a new voting power for the validator with `pubkeyN` (possibly a new one).
To remove a validator from the validator set, set power to `0`.
There is no sybil protection against new validators joining.
There is no sybil protection against new validators joining.

View File

@@ -1,6 +1,7 @@
package kvstore
import (
"context"
mrand "math/rand"
"github.com/tendermint/tendermint/abci/types"
@@ -32,8 +33,9 @@ func RandVals(cnt int) []types.ValidatorUpdate {
// InitKVStore initializes the kvstore app with some data,
// which allows tests to pass and is fine as long as you
// don't make any tx that modify the validator state
func InitKVStore(app *PersistentKVStoreApplication) {
app.InitChain(types.RequestInitChain{
func InitKVStore(ctx context.Context, app *PersistentKVStoreApplication) error {
_, err := app.InitChain(ctx, &types.RequestInitChain{
Validators: RandVals(1),
})
return err
}

View File

@@ -2,14 +2,22 @@ package kvstore
import (
"bytes"
"context"
"encoding/base64"
"encoding/binary"
"encoding/json"
"fmt"
"strconv"
"strings"
"sync"
dbm "github.com/tendermint/tm-db"
"github.com/tendermint/tendermint/abci/example/code"
"github.com/tendermint/tendermint/abci/types"
"github.com/tendermint/tendermint/crypto/encoding"
"github.com/tendermint/tendermint/libs/log"
cryptoproto "github.com/tendermint/tendermint/proto/tendermint/crypto"
"github.com/tendermint/tendermint/version"
)
@@ -65,35 +73,70 @@ var _ types.Application = (*Application)(nil)
type Application struct {
types.BaseApplication
mu sync.Mutex
state State
RetainBlocks int64 // blocks to retain after commit (via ResponseCommit.RetainHeight)
logger log.Logger
// validator set
ValUpdates []types.ValidatorUpdate
valAddrToPubKeyMap map[string]cryptoproto.PublicKey
}
func NewApplication() *Application {
state := loadState(dbm.NewMemDB())
return &Application{state: state}
return &Application{
logger: log.NewNopLogger(),
state: loadState(dbm.NewMemDB()),
valAddrToPubKeyMap: make(map[string]cryptoproto.PublicKey),
}
}
func (app *Application) Info(req types.RequestInfo) (resInfo types.ResponseInfo) {
return types.ResponseInfo{
func (app *Application) InitChain(_ context.Context, req *types.RequestInitChain) (*types.ResponseInitChain, error) {
app.mu.Lock()
defer app.mu.Unlock()
for _, v := range req.Validators {
r := app.updateValidator(v)
if r.IsErr() {
app.logger.Error("error updating validators", "r", r)
panic("problem updating validators")
}
}
return &types.ResponseInitChain{}, nil
}
func (app *Application) Info(_ context.Context, req *types.RequestInfo) (*types.ResponseInfo, error) {
app.mu.Lock()
defer app.mu.Unlock()
return &types.ResponseInfo{
Data: fmt.Sprintf("{\"size\":%v}", app.state.Size),
Version: version.ABCIVersion,
AppVersion: ProtocolVersion,
LastBlockHeight: app.state.Height,
LastBlockAppHash: app.state.AppHash,
}
}, nil
}
// tx is either "key=value" or just arbitrary bytes
func (app *Application) DeliverTx(req types.RequestDeliverTx) types.ResponseDeliverTx {
var key, value string
// tx is either "val:pubkey!power" or "key=value" or just arbitrary bytes
func (app *Application) handleTx(tx []byte) *types.ExecTxResult {
// if it starts with "val:", update the validator set
// format is "val:pubkey!power"
if isValidatorTx(tx) {
// update validators in the merkle tree
// and in app.ValUpdates
return app.execValidatorTx(tx)
}
parts := bytes.Split(req.Tx, []byte("="))
if isPrepareTx(tx) {
return app.execPrepareTx(tx)
}
var key, value string
parts := bytes.Split(tx, []byte("="))
if len(parts) == 2 {
key, value = string(parts[0]), string(parts[1])
} else {
key, value = string(req.Tx), string(req.Tx)
key, value = string(tx), string(tx)
}
err := app.state.db.Set(prefixKey([]byte(key)), []byte(value))
@@ -114,60 +157,311 @@ func (app *Application) DeliverTx(req types.RequestDeliverTx) types.ResponseDeli
},
}
return types.ResponseDeliverTx{Code: code.CodeTypeOK, Events: events}
return &types.ExecTxResult{Code: code.CodeTypeOK, Events: events}
}
func (app *Application) CheckTx(req types.RequestCheckTx) types.ResponseCheckTx {
return types.ResponseCheckTx{Code: code.CodeTypeOK, GasWanted: 1}
func (app *Application) Close() error {
app.mu.Lock()
defer app.mu.Unlock()
return app.state.db.Close()
}
func (app *Application) Commit() types.ResponseCommit {
func (app *Application) FinalizeBlock(_ context.Context, req *types.RequestFinalizeBlock) (*types.ResponseFinalizeBlock, error) {
app.mu.Lock()
defer app.mu.Unlock()
// reset valset changes
app.ValUpdates = make([]types.ValidatorUpdate, 0)
// Punish validators who committed equivocation.
for _, ev := range req.Misbehavior {
if ev.Type == types.MisbehaviorType_DUPLICATE_VOTE {
addr := string(ev.Validator.Address)
if pubKey, ok := app.valAddrToPubKeyMap[addr]; ok {
app.updateValidator(types.ValidatorUpdate{
PubKey: pubKey,
Power: ev.Validator.Power - 1,
})
app.logger.Info("Decreased val power by 1 because of the equivocation",
"val", addr)
} else {
panic(fmt.Errorf("wanted to punish val %q but can't find it", addr))
}
}
}
respTxs := make([]*types.ExecTxResult, len(req.Txs))
for i, tx := range req.Txs {
respTxs[i] = app.handleTx(tx)
}
// Using a memdb - just return the big endian size of the db
appHash := make([]byte, 8)
binary.PutVarint(appHash, app.state.Size)
app.state.AppHash = appHash
app.state.Height++
return &types.ResponseFinalizeBlock{TxResults: respTxs, ValidatorUpdates: app.ValUpdates, AppHash: appHash}, nil
}
func (*Application) CheckTx(_ context.Context, req *types.RequestCheckTx) (*types.ResponseCheckTx, error) {
return &types.ResponseCheckTx{Code: code.CodeTypeOK, GasWanted: 1}, nil
}
func (app *Application) Commit(_ context.Context) (*types.ResponseCommit, error) {
app.mu.Lock()
defer app.mu.Unlock()
saveState(app.state)
resp := types.ResponseCommit{Data: appHash}
resp := &types.ResponseCommit{}
if app.RetainBlocks > 0 && app.state.Height >= app.RetainBlocks {
resp.RetainHeight = app.state.Height - app.RetainBlocks + 1
}
return resp
return resp, nil
}
// Returns an associated value or nil if missing.
func (app *Application) Query(reqQuery types.RequestQuery) (resQuery types.ResponseQuery) {
func (app *Application) Query(_ context.Context, reqQuery *types.RequestQuery) (*types.ResponseQuery, error) {
app.mu.Lock()
defer app.mu.Unlock()
if reqQuery.Path == "/val" {
key := []byte("val:" + string(reqQuery.Data))
value, err := app.state.db.Get(key)
if err != nil {
panic(err)
}
return &types.ResponseQuery{
Key: reqQuery.Data,
Value: value,
}, nil
}
if reqQuery.Prove {
value, err := app.state.db.Get(prefixKey(reqQuery.Data))
if err != nil {
panic(err)
}
resQuery := types.ResponseQuery{
Index: -1,
Key: reqQuery.Data,
Value: value,
Height: app.state.Height,
}
if value == nil {
resQuery.Log = "does not exist"
} else {
resQuery.Log = "exists"
}
resQuery.Index = -1 // TODO make Proof return index
resQuery.Key = reqQuery.Data
resQuery.Value = value
resQuery.Height = app.state.Height
return
return &resQuery, nil
}
resQuery.Key = reqQuery.Data
value, err := app.state.db.Get(prefixKey(reqQuery.Data))
if err != nil {
panic(err)
}
resQuery := types.ResponseQuery{
Key: reqQuery.Data,
Value: value,
Height: app.state.Height,
}
if value == nil {
resQuery.Log = "does not exist"
} else {
resQuery.Log = "exists"
}
resQuery.Value = value
resQuery.Height = app.state.Height
return resQuery
return &resQuery, nil
}
func (app *Application) PrepareProposal(_ context.Context, req *types.RequestPrepareProposal) (*types.ResponsePrepareProposal, error) {
app.mu.Lock()
defer app.mu.Unlock()
return &types.ResponsePrepareProposal{
TxRecords: app.substPrepareTx(req.Txs, req.MaxTxBytes),
}, nil
}
func (*Application) ProcessProposal(_ context.Context, req *types.RequestProcessProposal) (*types.ResponseProcessProposal, error) {
for _, tx := range req.Txs {
if len(tx) == 0 || isPrepareTx(tx) {
return &types.ResponseProcessProposal{Status: types.ResponseProcessProposal_REJECT}, nil
}
}
return &types.ResponseProcessProposal{Status: types.ResponseProcessProposal_ACCEPT}, nil
}
//---------------------------------------------
// update validators
func (app *Application) Validators() (validators []types.ValidatorUpdate) {
app.mu.Lock()
defer app.mu.Unlock()
itr, err := app.state.db.Iterator(nil, nil)
if err != nil {
panic(err)
}
for ; itr.Valid(); itr.Next() {
if isValidatorTx(itr.Key()) {
validator := new(types.ValidatorUpdate)
err := types.ReadMessage(bytes.NewBuffer(itr.Value()), validator)
if err != nil {
panic(err)
}
validators = append(validators, *validator)
}
}
if err = itr.Error(); err != nil {
panic(err)
}
return
}
func MakeValSetChangeTx(pubkey cryptoproto.PublicKey, power int64) []byte {
pk, err := encoding.PubKeyFromProto(pubkey)
if err != nil {
panic(err)
}
pubStr := base64.StdEncoding.EncodeToString(pk.Bytes())
return []byte(fmt.Sprintf("val:%s!%d", pubStr, power))
}
func isValidatorTx(tx []byte) bool {
return strings.HasPrefix(string(tx), ValidatorSetChangePrefix)
}
// format is "val:pubkey!power"
// pubkey is a base64-encoded 32-byte ed25519 key
func (app *Application) execValidatorTx(tx []byte) *types.ExecTxResult {
tx = tx[len(ValidatorSetChangePrefix):]
// get the pubkey and power
pubKeyAndPower := strings.Split(string(tx), "!")
if len(pubKeyAndPower) != 2 {
return &types.ExecTxResult{
Code: code.CodeTypeEncodingError,
Log: fmt.Sprintf("Expected 'pubkey!power'. Got %v", pubKeyAndPower)}
}
pubkeyS, powerS := pubKeyAndPower[0], pubKeyAndPower[1]
// decode the pubkey
pubkey, err := base64.StdEncoding.DecodeString(pubkeyS)
if err != nil {
return &types.ExecTxResult{
Code: code.CodeTypeEncodingError,
Log: fmt.Sprintf("Pubkey (%s) is invalid base64", pubkeyS)}
}
// decode the power
power, err := strconv.ParseInt(powerS, 10, 64)
if err != nil {
return &types.ExecTxResult{
Code: code.CodeTypeEncodingError,
Log: fmt.Sprintf("Power (%s) is not an int", powerS)}
}
// update
return app.updateValidator(types.UpdateValidator(pubkey, power, ""))
}
// add, update, or remove a validator
func (app *Application) updateValidator(v types.ValidatorUpdate) *types.ExecTxResult {
pubkey, err := encoding.PubKeyFromProto(v.PubKey)
if err != nil {
panic(fmt.Errorf("can't decode public key: %w", err))
}
key := []byte("val:" + string(pubkey.Bytes()))
if v.Power == 0 {
// remove validator
hasKey, err := app.state.db.Has(key)
if err != nil {
panic(err)
}
if !hasKey {
pubStr := base64.StdEncoding.EncodeToString(pubkey.Bytes())
return &types.ExecTxResult{
Code: code.CodeTypeUnauthorized,
Log: fmt.Sprintf("Cannot remove non-existent validator %s", pubStr)}
}
if err = app.state.db.Delete(key); err != nil {
panic(err)
}
delete(app.valAddrToPubKeyMap, string(pubkey.Address()))
} else {
// add or update validator
value := bytes.NewBuffer(make([]byte, 0))
if err := types.WriteMessage(&v, value); err != nil {
return &types.ExecTxResult{
Code: code.CodeTypeEncodingError,
Log: fmt.Sprintf("error encoding validator: %v", err)}
}
if err = app.state.db.Set(key, value.Bytes()); err != nil {
panic(err)
}
app.valAddrToPubKeyMap[string(pubkey.Address())] = v.PubKey
}
// we only update the changes array if we successfully updated the tree
app.ValUpdates = append(app.ValUpdates, v)
return &types.ExecTxResult{Code: code.CodeTypeOK}
}
// -----------------------------
// prepare proposal machinery
const PreparePrefix = "prepare"
func isPrepareTx(tx []byte) bool {
return bytes.HasPrefix(tx, []byte(PreparePrefix))
}
// execPrepareTx is noop. tx data is considered as placeholder
// and is substitute at the PrepareProposal.
func (app *Application) execPrepareTx(tx []byte) *types.ExecTxResult {
// noop
return &types.ExecTxResult{}
}
// substPrepareTx substitutes all the transactions prefixed with 'prepare' in the
// proposal for transactions with the prefix stripped.
// It marks all of the original transactions as 'REMOVED' so that
// Tendermint will remove them from its mempool.
func (app *Application) substPrepareTx(blockData [][]byte, maxTxBytes int64) []*types.TxRecord {
trs := make([]*types.TxRecord, 0, len(blockData))
var removed []*types.TxRecord
var totalBytes int64
for _, tx := range blockData {
txMod := tx
action := types.TxRecord_UNMODIFIED
if isPrepareTx(tx) {
removed = append(removed, &types.TxRecord{
Tx: tx,
Action: types.TxRecord_REMOVED,
})
txMod = bytes.TrimPrefix(tx, []byte(PreparePrefix))
action = types.TxRecord_ADDED
}
totalBytes += int64(len(txMod))
if totalBytes > maxTxBytes {
break
}
trs = append(trs, &types.TxRecord{
Tx: txMod,
Action: action,
})
}
return append(trs, removed...)
}

View File

@@ -3,20 +3,19 @@ package kvstore
import (
"context"
"fmt"
"io/ioutil"
"sort"
"testing"
"github.com/fortytw2/leaktest"
"github.com/stretchr/testify/require"
"github.com/tendermint/tendermint/libs/log"
"github.com/tendermint/tendermint/libs/service"
abcicli "github.com/tendermint/tendermint/abci/client"
abciclient "github.com/tendermint/tendermint/abci/client"
"github.com/tendermint/tendermint/abci/example/code"
abciserver "github.com/tendermint/tendermint/abci/server"
"github.com/tendermint/tendermint/abci/types"
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
)
const (
@@ -24,37 +23,43 @@ const (
testValue = "def"
)
var ctx = context.Background()
func testKVStore(t *testing.T, app types.Application, tx []byte, key, value string) {
req := types.RequestDeliverTx{Tx: tx}
ar := app.DeliverTx(req)
require.False(t, ar.IsErr(), ar)
func testKVStore(ctx context.Context, t *testing.T, app types.Application, tx []byte, key, value string) {
req := &types.RequestFinalizeBlock{Txs: [][]byte{tx}}
ar, err := app.FinalizeBlock(ctx, req)
require.NoError(t, err)
require.Equal(t, 1, len(ar.TxResults))
require.False(t, ar.TxResults[0].IsErr())
// repeating tx doesn't raise error
ar = app.DeliverTx(req)
require.False(t, ar.IsErr(), ar)
ar, err = app.FinalizeBlock(ctx, req)
require.NoError(t, err)
require.Equal(t, 1, len(ar.TxResults))
require.False(t, ar.TxResults[0].IsErr())
// commit
app.Commit()
_, err = app.Commit(ctx)
require.NoError(t, err)
info := app.Info(types.RequestInfo{})
info, err := app.Info(ctx, &types.RequestInfo{})
require.NoError(t, err)
require.NotZero(t, info.LastBlockHeight)
// make sure query is fine
resQuery := app.Query(types.RequestQuery{
resQuery, err := app.Query(ctx, &types.RequestQuery{
Path: "/store",
Data: []byte(key),
})
require.NoError(t, err)
require.Equal(t, code.CodeTypeOK, resQuery.Code)
require.Equal(t, key, string(resQuery.Key))
require.Equal(t, value, string(resQuery.Value))
require.EqualValues(t, info.LastBlockHeight, resQuery.Height)
// make sure proof is fine
resQuery = app.Query(types.RequestQuery{
resQuery, err = app.Query(ctx, &types.RequestQuery{
Path: "/store",
Data: []byte(key),
Prove: true,
})
require.NoError(t, err)
require.EqualValues(t, code.CodeTypeOK, resQuery.Code)
require.Equal(t, key, string(resQuery.Key))
require.Equal(t, value, string(resQuery.Value))
@@ -62,43 +67,55 @@ func testKVStore(t *testing.T, app types.Application, tx []byte, key, value stri
}
func TestKVStoreKV(t *testing.T) {
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
kvstore := NewApplication()
key := testKey
value := key
tx := []byte(key)
testKVStore(t, kvstore, tx, key, value)
testKVStore(ctx, t, kvstore, tx, key, value)
value = testValue
tx = []byte(key + "=" + value)
testKVStore(t, kvstore, tx, key, value)
testKVStore(ctx, t, kvstore, tx, key, value)
}
func TestPersistentKVStoreKV(t *testing.T) {
dir, err := ioutil.TempDir("/tmp", "abci-kvstore-test") // TODO
if err != nil {
t.Fatal(err)
}
kvstore := NewPersistentKVStoreApplication(dir)
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
dir := t.TempDir()
logger := log.NewNopLogger()
kvstore := NewPersistentKVStoreApplication(logger, dir)
key := testKey
value := key
tx := []byte(key)
testKVStore(t, kvstore, tx, key, value)
testKVStore(ctx, t, kvstore, tx, key, value)
value = testValue
tx = []byte(key + "=" + value)
testKVStore(t, kvstore, tx, key, value)
testKVStore(ctx, t, kvstore, tx, key, value)
}
func TestPersistentKVStoreInfo(t *testing.T) {
dir, err := ioutil.TempDir("/tmp", "abci-kvstore-test") // TODO
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
dir := t.TempDir()
logger := log.NewNopLogger()
kvstore := NewPersistentKVStoreApplication(logger, dir)
if err := InitKVStore(ctx, kvstore); err != nil {
t.Fatal(err)
}
height := int64(0)
resInfo, err := kvstore.Info(ctx, &types.RequestInfo{})
if err != nil {
t.Fatal(err)
}
kvstore := NewPersistentKVStoreApplication(dir)
InitKVStore(kvstore)
height := int64(0)
resInfo := kvstore.Info(types.RequestInfo{})
if resInfo.LastBlockHeight != height {
t.Fatalf("expected height of %d, got %d", height, resInfo.LastBlockHeight)
}
@@ -106,14 +123,19 @@ func TestPersistentKVStoreInfo(t *testing.T) {
// make and apply block
height = int64(1)
hash := []byte("foo")
header := tmproto.Header{
Height: height,
if _, err := kvstore.FinalizeBlock(ctx, &types.RequestFinalizeBlock{Hash: hash, Height: height}); err != nil {
t.Fatal(err)
}
kvstore.BeginBlock(types.RequestBeginBlock{Hash: hash, Header: header})
kvstore.EndBlock(types.RequestEndBlock{Height: header.Height})
kvstore.Commit()
resInfo = kvstore.Info(types.RequestInfo{})
if _, err := kvstore.Commit(ctx); err != nil {
t.Fatal(err)
}
resInfo, err = kvstore.Info(ctx, &types.RequestInfo{})
if err != nil {
t.Fatal(err)
}
if resInfo.LastBlockHeight != height {
t.Fatalf("expected height of %d, got %d", height, resInfo.LastBlockHeight)
}
@@ -122,20 +144,22 @@ func TestPersistentKVStoreInfo(t *testing.T) {
// add a validator, remove a validator, update a validator
func TestValUpdates(t *testing.T) {
dir, err := ioutil.TempDir("/tmp", "abci-kvstore-test") // TODO
if err != nil {
t.Fatal(err)
}
kvstore := NewPersistentKVStoreApplication(dir)
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
kvstore := NewApplication()
// init with some validators
total := 10
nInit := 5
vals := RandVals(total)
// initialize with the first nInit
kvstore.InitChain(types.RequestInitChain{
_, err := kvstore.InitChain(ctx, &types.RequestInitChain{
Validators: vals[:nInit],
})
if err != nil {
t.Fatal(err)
}
vals1, vals2 := vals[:nInit], kvstore.Validators()
valsEqual(t, vals1, vals2)
@@ -148,7 +172,7 @@ func TestValUpdates(t *testing.T) {
tx1 := MakeValSetChangeTx(v1.PubKey, v1.Power)
tx2 := MakeValSetChangeTx(v2.PubKey, v2.Power)
makeApplyBlock(t, kvstore, 1, diff, tx1, tx2)
makeApplyBlock(ctx, t, kvstore, 1, diff, tx1, tx2)
vals1, vals2 = vals[:nInit+2], kvstore.Validators()
valsEqual(t, vals1, vals2)
@@ -163,7 +187,7 @@ func TestValUpdates(t *testing.T) {
tx2 = MakeValSetChangeTx(v2.PubKey, v2.Power)
tx3 := MakeValSetChangeTx(v3.PubKey, v3.Power)
makeApplyBlock(t, kvstore, 2, diff, tx1, tx2, tx3)
makeApplyBlock(ctx, t, kvstore, 2, diff, tx1, tx2, tx3)
vals1 = append(vals[:nInit-2], vals[nInit+1]) // nolint: gocritic
vals2 = kvstore.Validators()
@@ -179,7 +203,7 @@ func TestValUpdates(t *testing.T) {
diff = []types.ValidatorUpdate{v1}
tx1 = MakeValSetChangeTx(v1.PubKey, v1.Power)
makeApplyBlock(t, kvstore, 3, diff, tx1)
makeApplyBlock(ctx, t, kvstore, 3, diff, tx1)
vals1 = append([]types.ValidatorUpdate{v1}, vals1[1:]...)
vals2 = kvstore.Validators()
@@ -187,34 +211,31 @@ func TestValUpdates(t *testing.T) {
}
func makeApplyBlock(
t *testing.T,
kvstore types.Application,
heightInt int,
diff []types.ValidatorUpdate,
txs ...[]byte) {
func makeApplyBlock(ctx context.Context, t *testing.T, kvstore types.Application, heightInt int, diff []types.ValidatorUpdate, txs ...[]byte) {
// make and apply block
height := int64(heightInt)
hash := []byte("foo")
header := tmproto.Header{
resFinalizeBlock, err := kvstore.FinalizeBlock(ctx, &types.RequestFinalizeBlock{
Hash: hash,
Height: height,
Txs: txs,
})
if err != nil {
t.Fatal(err)
}
kvstore.BeginBlock(types.RequestBeginBlock{Hash: hash, Header: header})
for _, tx := range txs {
if r := kvstore.DeliverTx(types.RequestDeliverTx{Tx: tx}); r.IsErr() {
t.Fatal(r)
}
_, err = kvstore.Commit(ctx)
if err != nil {
t.Fatal(err)
}
resEndBlock := kvstore.EndBlock(types.RequestEndBlock{Height: header.Height})
kvstore.Commit()
valsEqual(t, diff, resEndBlock.ValidatorUpdates)
valsEqual(t, diff, resFinalizeBlock.ValidatorUpdates)
}
// order doesn't matter
func valsEqual(t *testing.T, vals1, vals2 []types.ValidatorUpdate) {
t.Helper()
if len(vals1) != len(vals2) {
t.Fatalf("vals dont match in len. got %d, expected %d", len(vals2), len(vals1))
}
@@ -229,136 +250,141 @@ func valsEqual(t *testing.T, vals1, vals2 []types.ValidatorUpdate) {
}
}
func makeSocketClientServer(app types.Application, name string) (abcicli.Client, service.Service, error) {
func makeSocketClientServer(
ctx context.Context,
t *testing.T,
logger log.Logger,
app types.Application,
name string,
) (abciclient.Client, service.Service, error) {
t.Helper()
ctx, cancel := context.WithCancel(ctx)
t.Cleanup(cancel)
t.Cleanup(leaktest.Check(t))
// Start the listener
socket := fmt.Sprintf("unix://%s.sock", name)
logger := log.TestingLogger()
server := abciserver.NewSocketServer(socket, app)
server.SetLogger(logger.With("module", "abci-server"))
if err := server.Start(); err != nil {
server := abciserver.NewSocketServer(logger.With("module", "abci-server"), socket, app)
if err := server.Start(ctx); err != nil {
cancel()
return nil, nil, err
}
// Connect to the socket
client := abcicli.NewSocketClient(socket, false)
client.SetLogger(logger.With("module", "abci-client"))
if err := client.Start(); err != nil {
if err = server.Stop(); err != nil {
return nil, nil, err
}
client := abciclient.NewSocketClient(logger.With("module", "abci-client"), socket, false)
if err := client.Start(ctx); err != nil {
cancel()
return nil, nil, err
}
return client, server, nil
}
func makeGRPCClientServer(app types.Application, name string) (abcicli.Client, service.Service, error) {
func makeGRPCClientServer(
ctx context.Context,
t *testing.T,
logger log.Logger,
app types.Application,
name string,
) (abciclient.Client, service.Service, error) {
ctx, cancel := context.WithCancel(ctx)
t.Cleanup(cancel)
t.Cleanup(leaktest.Check(t))
// Start the listener
socket := fmt.Sprintf("unix://%s.sock", name)
logger := log.TestingLogger()
gapp := types.NewGRPCApplication(app)
server := abciserver.NewGRPCServer(socket, gapp)
server.SetLogger(logger.With("module", "abci-server"))
if err := server.Start(); err != nil {
server := abciserver.NewGRPCServer(logger.With("module", "abci-server"), socket, app)
if err := server.Start(ctx); err != nil {
cancel()
return nil, nil, err
}
client := abcicli.NewGRPCClient(socket, true)
client.SetLogger(logger.With("module", "abci-client"))
if err := client.Start(); err != nil {
if err := server.Stop(); err != nil {
return nil, nil, err
}
client := abciclient.NewGRPCClient(logger.With("module", "abci-client"), socket, true)
if err := client.Start(ctx); err != nil {
cancel()
return nil, nil, err
}
return client, server, nil
}
func TestClientServer(t *testing.T) {
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
logger := log.NewNopLogger()
// set up socket app
kvstore := NewApplication()
client, server, err := makeSocketClientServer(kvstore, "kvstore-socket")
client, server, err := makeSocketClientServer(ctx, t, logger, kvstore, "kvstore-socket")
require.NoError(t, err)
t.Cleanup(func() {
if err := server.Stop(); err != nil {
t.Error(err)
}
})
t.Cleanup(func() {
if err := client.Stop(); err != nil {
t.Error(err)
}
})
t.Cleanup(func() { cancel(); server.Wait() })
t.Cleanup(func() { cancel(); client.Wait() })
runClientTests(t, client)
runClientTests(ctx, t, client)
// set up grpc app
kvstore = NewApplication()
gclient, gserver, err := makeGRPCClientServer(kvstore, "kvstore-grpc")
gclient, gserver, err := makeGRPCClientServer(ctx, t, logger, kvstore, "/tmp/kvstore-grpc")
require.NoError(t, err)
t.Cleanup(func() {
if err := gserver.Stop(); err != nil {
t.Error(err)
}
})
t.Cleanup(func() {
if err := gclient.Stop(); err != nil {
t.Error(err)
}
})
t.Cleanup(func() { cancel(); gserver.Wait() })
t.Cleanup(func() { cancel(); gclient.Wait() })
runClientTests(t, gclient)
runClientTests(ctx, t, gclient)
}
func runClientTests(t *testing.T, client abcicli.Client) {
func runClientTests(ctx context.Context, t *testing.T, client abciclient.Client) {
// run some tests....
key := testKey
value := key
tx := []byte(key)
testClient(t, client, tx, key, value)
testClient(ctx, t, client, tx, key, value)
value = testValue
tx = []byte(key + "=" + value)
testClient(t, client, tx, key, value)
testClient(ctx, t, client, tx, key, value)
}
func testClient(t *testing.T, app abcicli.Client, tx []byte, key, value string) {
ar, err := app.DeliverTxSync(ctx, types.RequestDeliverTx{Tx: tx})
func testClient(ctx context.Context, t *testing.T, app abciclient.Client, tx []byte, key, value string) {
ar, err := app.FinalizeBlock(ctx, &types.RequestFinalizeBlock{Txs: [][]byte{tx}})
require.NoError(t, err)
require.False(t, ar.IsErr(), ar)
// repeating tx doesn't raise error
ar, err = app.DeliverTxSync(ctx, types.RequestDeliverTx{Tx: tx})
require.Equal(t, 1, len(ar.TxResults))
require.False(t, ar.TxResults[0].IsErr())
// repeating FinalizeBlock doesn't raise error
ar, err = app.FinalizeBlock(ctx, &types.RequestFinalizeBlock{Txs: [][]byte{tx}})
require.NoError(t, err)
require.False(t, ar.IsErr(), ar)
require.Equal(t, 1, len(ar.TxResults))
require.False(t, ar.TxResults[0].IsErr())
// commit
_, err = app.CommitSync(ctx)
_, err = app.Commit(ctx)
require.NoError(t, err)
info, err := app.InfoSync(ctx, types.RequestInfo{})
info, err := app.Info(ctx, &types.RequestInfo{})
require.NoError(t, err)
require.NotZero(t, info.LastBlockHeight)
// make sure query is fine
resQuery, err := app.QuerySync(ctx, types.RequestQuery{
resQuery, err := app.Query(ctx, &types.RequestQuery{
Path: "/store",
Data: []byte(key),
})
require.Nil(t, err)
require.NoError(t, err)
require.Equal(t, code.CodeTypeOK, resQuery.Code)
require.Equal(t, key, string(resQuery.Key))
require.Equal(t, value, string(resQuery.Value))
require.EqualValues(t, info.LastBlockHeight, resQuery.Height)
// make sure proof is fine
resQuery, err = app.QuerySync(ctx, types.RequestQuery{
resQuery, err = app.Query(ctx, &types.RequestQuery{
Path: "/store",
Data: []byte(key),
Prove: true,
})
require.Nil(t, err)
require.NoError(t, err)
require.Equal(t, code.CodeTypeOK, resQuery.Code)
require.Equal(t, key, string(resQuery.Key))
require.Equal(t, value, string(resQuery.Value))

View File

@@ -1,19 +1,13 @@
package kvstore
import (
"bytes"
"encoding/base64"
"fmt"
"strconv"
"strings"
"context"
dbm "github.com/tendermint/tm-db"
"github.com/tendermint/tendermint/abci/example/code"
"github.com/tendermint/tendermint/abci/types"
cryptoenc "github.com/tendermint/tendermint/crypto/encoding"
"github.com/tendermint/tendermint/libs/log"
pc "github.com/tendermint/tendermint/proto/tendermint/crypto"
cryptoproto "github.com/tendermint/tendermint/proto/tendermint/crypto"
)
const (
@@ -25,262 +19,28 @@ const (
var _ types.Application = (*PersistentKVStoreApplication)(nil)
type PersistentKVStoreApplication struct {
app *Application
// validator set
ValUpdates []types.ValidatorUpdate
valAddrToPubKeyMap map[string]pc.PublicKey
logger log.Logger
*Application
}
func NewPersistentKVStoreApplication(dbDir string) *PersistentKVStoreApplication {
name := "kvstore"
db, err := dbm.NewGoLevelDB(name, dbDir)
func NewPersistentKVStoreApplication(logger log.Logger, dbDir string) *PersistentKVStoreApplication {
db, err := dbm.NewGoLevelDB("kvstore", dbDir)
if err != nil {
panic(err)
}
state := loadState(db)
return &PersistentKVStoreApplication{
app: &Application{state: state},
valAddrToPubKeyMap: make(map[string]pc.PublicKey),
logger: log.NewNopLogger(),
Application: &Application{
valAddrToPubKeyMap: make(map[string]cryptoproto.PublicKey),
state: loadState(db),
logger: logger,
},
}
}
func (app *PersistentKVStoreApplication) Close() error {
return app.app.state.db.Close()
func (app *PersistentKVStoreApplication) OfferSnapshot(_ context.Context, req *types.RequestOfferSnapshot) (*types.ResponseOfferSnapshot, error) {
return &types.ResponseOfferSnapshot{Result: types.ResponseOfferSnapshot_ABORT}, nil
}
func (app *PersistentKVStoreApplication) SetLogger(l log.Logger) {
app.logger = l
}
func (app *PersistentKVStoreApplication) Info(req types.RequestInfo) types.ResponseInfo {
res := app.app.Info(req)
res.LastBlockHeight = app.app.state.Height
res.LastBlockAppHash = app.app.state.AppHash
return res
}
// tx is either "val:pubkey!power" or "key=value" or just arbitrary bytes
func (app *PersistentKVStoreApplication) DeliverTx(req types.RequestDeliverTx) types.ResponseDeliverTx {
// if it starts with "val:", update the validator set
// format is "val:pubkey!power"
if isValidatorTx(req.Tx) {
// update validators in the merkle tree
// and in app.ValUpdates
return app.execValidatorTx(req.Tx)
}
// otherwise, update the key-value store
return app.app.DeliverTx(req)
}
func (app *PersistentKVStoreApplication) CheckTx(req types.RequestCheckTx) types.ResponseCheckTx {
return app.app.CheckTx(req)
}
// Commit will panic if InitChain was not called
func (app *PersistentKVStoreApplication) Commit() types.ResponseCommit {
return app.app.Commit()
}
// When path=/val and data={validator address}, returns the validator update (types.ValidatorUpdate) varint encoded.
// For any other path, returns an associated value or nil if missing.
func (app *PersistentKVStoreApplication) Query(reqQuery types.RequestQuery) (resQuery types.ResponseQuery) {
switch reqQuery.Path {
case "/val":
key := []byte("val:" + string(reqQuery.Data))
value, err := app.app.state.db.Get(key)
if err != nil {
panic(err)
}
resQuery.Key = reqQuery.Data
resQuery.Value = value
return
default:
return app.app.Query(reqQuery)
}
}
// Save the validators in the merkle tree
func (app *PersistentKVStoreApplication) InitChain(req types.RequestInitChain) types.ResponseInitChain {
for _, v := range req.Validators {
r := app.updateValidator(v)
if r.IsErr() {
app.logger.Error("Error updating validators", "r", r)
}
}
return types.ResponseInitChain{}
}
// Track the block hash and header information
func (app *PersistentKVStoreApplication) BeginBlock(req types.RequestBeginBlock) types.ResponseBeginBlock {
// reset valset changes
app.ValUpdates = make([]types.ValidatorUpdate, 0)
// Punish validators who committed equivocation.
for _, ev := range req.ByzantineValidators {
if ev.Type == types.EvidenceType_DUPLICATE_VOTE {
addr := string(ev.Validator.Address)
if pubKey, ok := app.valAddrToPubKeyMap[addr]; ok {
app.updateValidator(types.ValidatorUpdate{
PubKey: pubKey,
Power: ev.Validator.Power - 1,
})
app.logger.Info("Decreased val power by 1 because of the equivocation",
"val", addr)
} else {
app.logger.Error("Wanted to punish val, but can't find it",
"val", addr)
}
}
}
return types.ResponseBeginBlock{}
}
// Update the validator set
func (app *PersistentKVStoreApplication) EndBlock(req types.RequestEndBlock) types.ResponseEndBlock {
return types.ResponseEndBlock{ValidatorUpdates: app.ValUpdates}
}
func (app *PersistentKVStoreApplication) ListSnapshots(
req types.RequestListSnapshots) types.ResponseListSnapshots {
return types.ResponseListSnapshots{}
}
func (app *PersistentKVStoreApplication) LoadSnapshotChunk(
req types.RequestLoadSnapshotChunk) types.ResponseLoadSnapshotChunk {
return types.ResponseLoadSnapshotChunk{}
}
func (app *PersistentKVStoreApplication) OfferSnapshot(
req types.RequestOfferSnapshot) types.ResponseOfferSnapshot {
return types.ResponseOfferSnapshot{Result: types.ResponseOfferSnapshot_ABORT}
}
func (app *PersistentKVStoreApplication) ApplySnapshotChunk(
req types.RequestApplySnapshotChunk) types.ResponseApplySnapshotChunk {
return types.ResponseApplySnapshotChunk{Result: types.ResponseApplySnapshotChunk_ABORT}
}
//---------------------------------------------
// update validators
func (app *PersistentKVStoreApplication) Validators() (validators []types.ValidatorUpdate) {
itr, err := app.app.state.db.Iterator(nil, nil)
if err != nil {
panic(err)
}
for ; itr.Valid(); itr.Next() {
if isValidatorTx(itr.Key()) {
validator := new(types.ValidatorUpdate)
err := types.ReadMessage(bytes.NewBuffer(itr.Value()), validator)
if err != nil {
panic(err)
}
validators = append(validators, *validator)
}
}
if err = itr.Error(); err != nil {
panic(err)
}
return
}
func MakeValSetChangeTx(pubkey pc.PublicKey, power int64) []byte {
pk, err := cryptoenc.PubKeyFromProto(pubkey)
if err != nil {
panic(err)
}
pubStr := base64.StdEncoding.EncodeToString(pk.Bytes())
return []byte(fmt.Sprintf("val:%s!%d", pubStr, power))
}
func isValidatorTx(tx []byte) bool {
return strings.HasPrefix(string(tx), ValidatorSetChangePrefix)
}
// format is "val:pubkey!power"
// pubkey is a base64-encoded 32-byte ed25519 key
func (app *PersistentKVStoreApplication) execValidatorTx(tx []byte) types.ResponseDeliverTx {
tx = tx[len(ValidatorSetChangePrefix):]
// get the pubkey and power
pubKeyAndPower := strings.Split(string(tx), "!")
if len(pubKeyAndPower) != 2 {
return types.ResponseDeliverTx{
Code: code.CodeTypeEncodingError,
Log: fmt.Sprintf("Expected 'pubkey!power'. Got %v", pubKeyAndPower)}
}
pubkeyS, powerS := pubKeyAndPower[0], pubKeyAndPower[1]
// decode the pubkey
pubkey, err := base64.StdEncoding.DecodeString(pubkeyS)
if err != nil {
return types.ResponseDeliverTx{
Code: code.CodeTypeEncodingError,
Log: fmt.Sprintf("Pubkey (%s) is invalid base64", pubkeyS)}
}
// decode the power
power, err := strconv.ParseInt(powerS, 10, 64)
if err != nil {
return types.ResponseDeliverTx{
Code: code.CodeTypeEncodingError,
Log: fmt.Sprintf("Power (%s) is not an int", powerS)}
}
// update
return app.updateValidator(types.UpdateValidator(pubkey, power, ""))
}
// add, update, or remove a validator
func (app *PersistentKVStoreApplication) updateValidator(v types.ValidatorUpdate) types.ResponseDeliverTx {
pubkey, err := cryptoenc.PubKeyFromProto(v.PubKey)
if err != nil {
panic(fmt.Errorf("can't decode public key: %w", err))
}
key := []byte("val:" + string(pubkey.Bytes()))
if v.Power == 0 {
// remove validator
hasKey, err := app.app.state.db.Has(key)
if err != nil {
panic(err)
}
if !hasKey {
pubStr := base64.StdEncoding.EncodeToString(pubkey.Bytes())
return types.ResponseDeliverTx{
Code: code.CodeTypeUnauthorized,
Log: fmt.Sprintf("Cannot remove non-existent validator %s", pubStr)}
}
if err = app.app.state.db.Delete(key); err != nil {
panic(err)
}
delete(app.valAddrToPubKeyMap, string(pubkey.Address()))
} else {
// add or update validator
value := bytes.NewBuffer(make([]byte, 0))
if err := types.WriteMessage(&v, value); err != nil {
return types.ResponseDeliverTx{
Code: code.CodeTypeEncodingError,
Log: fmt.Sprintf("Error encoding validator: %v", err)}
}
if err = app.app.state.db.Set(key, value.Bytes()); err != nil {
panic(err)
}
app.valAddrToPubKeyMap[string(pubkey.Address())] = v.PubKey
}
// we only update the changes array if we successfully updated the tree
app.ValUpdates = append(app.ValUpdates, v)
return types.ResponseDeliverTx{Code: code.CodeTypeOK}
func (app *PersistentKVStoreApplication) ApplySnapshotChunk(_ context.Context, req *types.RequestApplySnapshotChunk) (*types.ResponseApplySnapshotChunk, error) {
return &types.ResponseApplySnapshotChunk{Result: types.ResponseApplySnapshotChunk_ABORT}, nil
}

View File

@@ -1,61 +1,83 @@
package server
import (
"context"
"net"
"google.golang.org/grpc"
"github.com/tendermint/tendermint/abci/types"
"github.com/tendermint/tendermint/libs/log"
tmnet "github.com/tendermint/tendermint/libs/net"
"github.com/tendermint/tendermint/libs/service"
)
type GRPCServer struct {
service.BaseService
logger log.Logger
proto string
addr string
listener net.Listener
server *grpc.Server
proto string
addr string
server *grpc.Server
app types.ABCIApplicationServer
app types.Application
}
// NewGRPCServer returns a new gRPC ABCI server
func NewGRPCServer(protoAddr string, app types.ABCIApplicationServer) service.Service {
func NewGRPCServer(logger log.Logger, protoAddr string, app types.Application) service.Service {
proto, addr := tmnet.ProtocolAndAddress(protoAddr)
s := &GRPCServer{
proto: proto,
addr: addr,
listener: nil,
app: app,
logger: logger,
proto: proto,
addr: addr,
app: app,
}
s.BaseService = *service.NewBaseService(nil, "ABCIServer", s)
s.BaseService = *service.NewBaseService(logger, "ABCIServer", s)
return s
}
// OnStart starts the gRPC service.
func (s *GRPCServer) OnStart() error {
func (s *GRPCServer) OnStart(ctx context.Context) error {
ln, err := net.Listen(s.proto, s.addr)
if err != nil {
return err
}
s.listener = ln
s.server = grpc.NewServer()
types.RegisterABCIApplicationServer(s.server, s.app)
types.RegisterABCIApplicationServer(s.server, &gRPCApplication{Application: s.app})
s.Logger.Info("Listening", "proto", s.proto, "addr", s.addr)
s.logger.Info("Listening", "proto", s.proto, "addr", s.addr)
go func() {
if err := s.server.Serve(s.listener); err != nil {
s.Logger.Error("Error serving gRPC server", "err", err)
go func() {
<-ctx.Done()
s.server.GracefulStop()
}()
if err := s.server.Serve(ln); err != nil {
s.logger.Error("error serving gRPC server", "err", err)
}
}()
return nil
}
// OnStop stops the gRPC server.
func (s *GRPCServer) OnStop() {
s.server.Stop()
func (s *GRPCServer) OnStop() { s.server.Stop() }
//-------------------------------------------------------
// gRPCApplication is a gRPC shim for Application
type gRPCApplication struct {
types.Application
}
func (app *gRPCApplication) Echo(_ context.Context, req *types.RequestEcho) (*types.ResponseEcho, error) {
return &types.ResponseEcho{Message: req.Message}, nil
}
func (app *gRPCApplication) Flush(_ context.Context, req *types.RequestFlush) (*types.ResponseFlush, error) {
return &types.ResponseFlush{}, nil
}
func (app *gRPCApplication) Commit(ctx context.Context, req *types.RequestCommit) (*types.ResponseCommit, error) {
return app.Application.Commit(ctx)
}

View File

@@ -12,17 +12,18 @@ import (
"fmt"
"github.com/tendermint/tendermint/abci/types"
"github.com/tendermint/tendermint/libs/log"
"github.com/tendermint/tendermint/libs/service"
)
func NewServer(protoAddr, transport string, app types.Application) (service.Service, error) {
func NewServer(logger log.Logger, protoAddr, transport string, app types.Application) (service.Service, error) {
var s service.Service
var err error
switch transport {
case "socket":
s = NewSocketServer(protoAddr, app)
s = NewSocketServer(logger, protoAddr, app)
case "grpc":
s = NewGRPCServer(protoAddr, types.NewGRPCApplication(app))
s = NewGRPCServer(logger, protoAddr, app)
default:
err = fmt.Errorf("unknown server type %s", transport)
}

View File

@@ -2,15 +2,16 @@ package server
import (
"bufio"
"context"
"errors"
"fmt"
"io"
"net"
"os"
"runtime"
"sync"
"github.com/tendermint/tendermint/abci/types"
tmsync "github.com/tendermint/tendermint/internal/libs/sync"
tmlog "github.com/tendermint/tendermint/libs/log"
"github.com/tendermint/tendermint/libs/log"
tmnet "github.com/tendermint/tendermint/libs/net"
"github.com/tendermint/tendermint/libs/service"
)
@@ -19,243 +20,298 @@ import (
type SocketServer struct {
service.BaseService
isLoggerSet bool
logger log.Logger
proto string
addr string
listener net.Listener
connsMtx tmsync.Mutex
conns map[int]net.Conn
connsMtx sync.Mutex
connsClose map[int]func()
nextConnID int
appMtx tmsync.Mutex
app types.Application
app types.Application
}
func NewSocketServer(protoAddr string, app types.Application) service.Service {
func NewSocketServer(logger log.Logger, protoAddr string, app types.Application) service.Service {
proto, addr := tmnet.ProtocolAndAddress(protoAddr)
s := &SocketServer{
proto: proto,
addr: addr,
listener: nil,
app: app,
conns: make(map[int]net.Conn),
logger: logger,
proto: proto,
addr: addr,
listener: nil,
app: app,
connsClose: make(map[int]func()),
}
s.BaseService = *service.NewBaseService(nil, "ABCIServer", s)
s.BaseService = *service.NewBaseService(logger, "ABCIServer", s)
return s
}
func (s *SocketServer) SetLogger(l tmlog.Logger) {
s.BaseService.SetLogger(l)
s.isLoggerSet = true
}
func (s *SocketServer) OnStart() error {
func (s *SocketServer) OnStart(ctx context.Context) error {
ln, err := net.Listen(s.proto, s.addr)
if err != nil {
return err
}
s.listener = ln
go s.acceptConnectionsRoutine()
go s.acceptConnectionsRoutine(ctx)
return nil
}
func (s *SocketServer) OnStop() {
if err := s.listener.Close(); err != nil {
s.Logger.Error("Error closing listener", "err", err)
s.logger.Error("error closing listener", "err", err)
}
s.connsMtx.Lock()
defer s.connsMtx.Unlock()
for id, conn := range s.conns {
delete(s.conns, id)
if err := conn.Close(); err != nil {
s.Logger.Error("Error closing connection", "id", id, "conn", conn, "err", err)
}
for _, closer := range s.connsClose {
closer()
}
}
func (s *SocketServer) addConn(conn net.Conn) int {
func (s *SocketServer) addConn(closer func()) int {
s.connsMtx.Lock()
defer s.connsMtx.Unlock()
connID := s.nextConnID
s.nextConnID++
s.conns[connID] = conn
s.connsClose[connID] = closer
return connID
}
// deletes conn even if close errs
func (s *SocketServer) rmConn(connID int) error {
func (s *SocketServer) rmConn(connID int) {
s.connsMtx.Lock()
defer s.connsMtx.Unlock()
conn, ok := s.conns[connID]
if !ok {
return fmt.Errorf("connection %d does not exist", connID)
if closer, ok := s.connsClose[connID]; ok {
closer()
delete(s.connsClose, connID)
}
delete(s.conns, connID)
return conn.Close()
}
func (s *SocketServer) acceptConnectionsRoutine() {
func (s *SocketServer) acceptConnectionsRoutine(ctx context.Context) {
for {
if ctx.Err() != nil {
return
}
// Accept a connection
s.Logger.Info("Waiting for new connection...")
s.logger.Info("Waiting for new connection...")
conn, err := s.listener.Accept()
if err != nil {
if !s.IsRunning() {
return // Ignore error from listener closing.
}
s.Logger.Error("Failed to accept connection", "err", err)
s.logger.Error("Failed to accept connection", "err", err)
continue
}
s.Logger.Info("Accepted a new connection")
cctx, ccancel := context.WithCancel(ctx)
connID := s.addConn(ccancel)
connID := s.addConn(conn)
s.logger.Info("Accepted a new connection", "id", connID)
closeConn := make(chan error, 2) // Push to signal connection closed
responses := make(chan *types.Response, 1000) // A channel to buffer responses
once := &sync.Once{}
closer := func(err error) {
ccancel()
once.Do(func() {
if cerr := conn.Close(); err != nil {
s.logger.Error("error closing connection",
"id", connID,
"close_err", cerr,
"err", err)
}
s.rmConn(connID)
switch {
case errors.Is(err, context.Canceled):
s.logger.Error("Connection terminated",
"id", connID,
"err", err)
case errors.Is(err, context.DeadlineExceeded):
s.logger.Error("Connection encountered timeout",
"id", connID,
"err", err)
case errors.Is(err, io.EOF):
s.logger.Error("Connection was closed by client",
"id", connID)
case err != nil:
s.logger.Error("Connection error",
"id", connID,
"err", err)
default:
s.logger.Error("Connection was closed",
"id", connID)
}
})
}
// Read requests from conn and deal with them
go s.handleRequests(closeConn, conn, responses)
go s.handleRequests(cctx, closer, conn, responses)
// Pull responses from 'responses' and write them to conn.
go s.handleResponses(closeConn, conn, responses)
// Wait until signal to close connection
go s.waitForClose(closeConn, connID)
}
}
func (s *SocketServer) waitForClose(closeConn chan error, connID int) {
err := <-closeConn
switch {
case err == io.EOF:
s.Logger.Error("Connection was closed by client")
case err != nil:
s.Logger.Error("Connection error", "err", err)
default:
// never happens
s.Logger.Error("Connection was closed")
}
// Close the connection
if err := s.rmConn(connID); err != nil {
s.Logger.Error("Error closing connection", "err", err)
go s.handleResponses(cctx, closer, conn, responses)
}
}
// Read requests from conn and deal with them
func (s *SocketServer) handleRequests(closeConn chan error, conn io.Reader, responses chan<- *types.Response) {
var count int
func (s *SocketServer) handleRequests(ctx context.Context, closer func(error), conn io.Reader, responses chan<- *types.Response) {
var bufReader = bufio.NewReader(conn)
defer func() {
// make sure to recover from any app-related panics to allow proper socket cleanup
r := recover()
if r != nil {
if r := recover(); r != nil {
const size = 64 << 10
buf := make([]byte, size)
buf = buf[:runtime.Stack(buf, false)]
err := fmt.Errorf("recovered from panic: %v\n%s", r, buf)
if !s.isLoggerSet {
fmt.Fprintln(os.Stderr, err)
}
closeConn <- err
s.appMtx.Unlock()
closer(fmt.Errorf("recovered from panic: %v\n%s", r, buf))
}
}()
for {
var req = &types.Request{}
err := types.ReadMessage(bufReader, req)
if err != nil {
if err == io.EOF {
closeConn <- err
} else {
closeConn <- fmt.Errorf("error reading message: %w", err)
}
req := &types.Request{}
if err := types.ReadMessage(bufReader, req); err != nil {
closer(fmt.Errorf("error reading message: %w", err))
return
}
s.appMtx.Lock()
count++
s.handleRequest(req, responses)
s.appMtx.Unlock()
resp, err := s.processRequest(ctx, req)
if err != nil {
closer(err)
return
}
select {
case <-ctx.Done():
closer(ctx.Err())
return
case responses <- resp:
}
}
}
func (s *SocketServer) handleRequest(req *types.Request, responses chan<- *types.Response) {
func (s *SocketServer) processRequest(ctx context.Context, req *types.Request) (*types.Response, error) {
switch r := req.Value.(type) {
case *types.Request_Echo:
responses <- types.ToResponseEcho(r.Echo.Message)
return types.ToResponseEcho(r.Echo.Message), nil
case *types.Request_Flush:
responses <- types.ToResponseFlush()
return types.ToResponseFlush(), nil
case *types.Request_Info:
res := s.app.Info(*r.Info)
responses <- types.ToResponseInfo(res)
case *types.Request_DeliverTx:
res := s.app.DeliverTx(*r.DeliverTx)
responses <- types.ToResponseDeliverTx(res)
res, err := s.app.Info(ctx, r.Info)
if err != nil {
return nil, err
}
return types.ToResponseInfo(res), nil
case *types.Request_CheckTx:
res := s.app.CheckTx(*r.CheckTx)
responses <- types.ToResponseCheckTx(res)
res, err := s.app.CheckTx(ctx, r.CheckTx)
if err != nil {
return nil, err
}
return types.ToResponseCheckTx(res), nil
case *types.Request_Commit:
res := s.app.Commit()
responses <- types.ToResponseCommit(res)
res, err := s.app.Commit(ctx)
if err != nil {
return nil, err
}
return types.ToResponseCommit(res), nil
case *types.Request_Query:
res := s.app.Query(*r.Query)
responses <- types.ToResponseQuery(res)
res, err := s.app.Query(ctx, r.Query)
if err != nil {
return nil, err
}
return types.ToResponseQuery(res), nil
case *types.Request_InitChain:
res := s.app.InitChain(*r.InitChain)
responses <- types.ToResponseInitChain(res)
case *types.Request_BeginBlock:
res := s.app.BeginBlock(*r.BeginBlock)
responses <- types.ToResponseBeginBlock(res)
case *types.Request_EndBlock:
res := s.app.EndBlock(*r.EndBlock)
responses <- types.ToResponseEndBlock(res)
res, err := s.app.InitChain(ctx, r.InitChain)
if err != nil {
return nil, err
}
return types.ToResponseInitChain(res), nil
case *types.Request_ListSnapshots:
res := s.app.ListSnapshots(*r.ListSnapshots)
responses <- types.ToResponseListSnapshots(res)
res, err := s.app.ListSnapshots(ctx, r.ListSnapshots)
if err != nil {
return nil, err
}
return types.ToResponseListSnapshots(res), nil
case *types.Request_OfferSnapshot:
res := s.app.OfferSnapshot(*r.OfferSnapshot)
responses <- types.ToResponseOfferSnapshot(res)
res, err := s.app.OfferSnapshot(ctx, r.OfferSnapshot)
if err != nil {
return nil, err
}
return types.ToResponseOfferSnapshot(res), nil
case *types.Request_PrepareProposal:
res, err := s.app.PrepareProposal(ctx, r.PrepareProposal)
if err != nil {
return nil, err
}
return types.ToResponsePrepareProposal(res), nil
case *types.Request_ProcessProposal:
res, err := s.app.ProcessProposal(ctx, r.ProcessProposal)
if err != nil {
return nil, err
}
return types.ToResponseProcessProposal(res), nil
case *types.Request_LoadSnapshotChunk:
res := s.app.LoadSnapshotChunk(*r.LoadSnapshotChunk)
responses <- types.ToResponseLoadSnapshotChunk(res)
res, err := s.app.LoadSnapshotChunk(ctx, r.LoadSnapshotChunk)
if err != nil {
return nil, err
}
return types.ToResponseLoadSnapshotChunk(res), nil
case *types.Request_ApplySnapshotChunk:
res := s.app.ApplySnapshotChunk(*r.ApplySnapshotChunk)
responses <- types.ToResponseApplySnapshotChunk(res)
res, err := s.app.ApplySnapshotChunk(ctx, r.ApplySnapshotChunk)
if err != nil {
return nil, err
}
return types.ToResponseApplySnapshotChunk(res), nil
case *types.Request_ExtendVote:
res, err := s.app.ExtendVote(ctx, r.ExtendVote)
if err != nil {
return nil, err
}
return types.ToResponseExtendVote(res), nil
case *types.Request_VerifyVoteExtension:
res, err := s.app.VerifyVoteExtension(ctx, r.VerifyVoteExtension)
if err != nil {
return nil, err
}
return types.ToResponseVerifyVoteExtension(res), nil
case *types.Request_FinalizeBlock:
res, err := s.app.FinalizeBlock(ctx, r.FinalizeBlock)
if err != nil {
return nil, err
}
return types.ToResponseFinalizeBlock(res), nil
default:
responses <- types.ToResponseException("Unknown request")
return types.ToResponseException("Unknown request"), errors.New("unknown request type")
}
}
// Pull responses from 'responses' and write them to conn.
func (s *SocketServer) handleResponses(closeConn chan error, conn io.Writer, responses <-chan *types.Response) {
var count int
var bufWriter = bufio.NewWriter(conn)
func (s *SocketServer) handleResponses(
ctx context.Context,
closer func(error),
conn io.Writer,
responses <-chan *types.Response,
) {
bw := bufio.NewWriter(conn)
for {
var res = <-responses
err := types.WriteMessage(res, bufWriter)
if err != nil {
closeConn <- fmt.Errorf("error writing message: %w", err)
select {
case <-ctx.Done():
closer(ctx.Err())
return
}
if _, ok := res.Value.(*types.Response_Flush); ok {
err = bufWriter.Flush()
if err != nil {
closeConn <- fmt.Errorf("error flushing write buffer: %w", err)
case res := <-responses:
if err := types.WriteMessage(res, bw); err != nil {
closer(fmt.Errorf("error writing message: %w", err))
return
}
if err := bw.Flush(); err != nil {
closer(fmt.Errorf("error writing message: %w", err))
return
}
}
count++
}
}

View File

@@ -1,27 +1,40 @@
package tests
import (
"context"
"testing"
"github.com/fortytw2/leaktest"
"github.com/stretchr/testify/assert"
abciclient "github.com/tendermint/tendermint/abci/client"
abciclientent "github.com/tendermint/tendermint/abci/client"
"github.com/tendermint/tendermint/abci/example/kvstore"
abciserver "github.com/tendermint/tendermint/abci/server"
"github.com/tendermint/tendermint/libs/log"
)
func TestClientServerNoAddrPrefix(t *testing.T) {
addr := "localhost:26658"
transport := "socket"
t.Cleanup(leaktest.Check(t))
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
const (
addr = "localhost:26658"
transport = "socket"
)
app := kvstore.NewApplication()
logger := log.NewTestingLogger(t)
server, err := abciserver.NewServer(addr, transport, app)
server, err := abciserver.NewServer(logger, addr, transport, app)
assert.NoError(t, err, "expected no error on NewServer")
err = server.Start()
err = server.Start(ctx)
assert.NoError(t, err, "expected no error on server.Start")
t.Cleanup(server.Wait)
client, err := abciclient.NewClient(addr, transport, true)
client, err := abciclientent.NewClient(logger, addr, transport, true)
assert.NoError(t, err, "expected no error on NewClient")
err = client.Start()
err = client.Start(ctx)
assert.NoError(t, err, "expected no error on client.Start")
t.Cleanup(client.Wait)
}

View File

@@ -7,14 +7,12 @@ import (
"fmt"
mrand "math/rand"
abcicli "github.com/tendermint/tendermint/abci/client"
abciclient "github.com/tendermint/tendermint/abci/client"
"github.com/tendermint/tendermint/abci/types"
tmrand "github.com/tendermint/tendermint/libs/rand"
)
var ctx = context.Background()
func InitChain(client abcicli.Client) error {
func InitChain(ctx context.Context, client abciclient.Client) error {
total := 10
vals := make([]types.ValidatorUpdate, total)
for i := 0; i < total; i++ {
@@ -23,7 +21,7 @@ func InitChain(client abcicli.Client) error {
power := mrand.Int()
vals[i] = types.UpdateValidator(pubkey, int64(power), "")
}
_, err := client.InitChainSync(ctx, types.RequestInitChain{
_, err := client.InitChain(ctx, &types.RequestInitChain{
Validators: vals,
})
if err != nil {
@@ -34,49 +32,77 @@ func InitChain(client abcicli.Client) error {
return nil
}
func Commit(client abcicli.Client, hashExp []byte) error {
res, err := client.CommitSync(ctx)
data := res.Data
func Commit(ctx context.Context, client abciclient.Client) error {
_, err := client.Commit(ctx)
if err != nil {
fmt.Println("Failed test: Commit")
fmt.Printf("error while committing: %v\n", err)
return err
}
if !bytes.Equal(data, hashExp) {
fmt.Println("Failed test: Commit")
fmt.Printf("Commit hash was unexpected. Got %X expected %X\n", data, hashExp)
return errors.New("commitTx failed")
}
fmt.Println("Passed test: Commit")
return nil
}
func DeliverTx(client abcicli.Client, txBytes []byte, codeExp uint32, dataExp []byte) error {
res, _ := client.DeliverTxSync(ctx, types.RequestDeliverTx{Tx: txBytes})
code, data, log := res.Code, res.Data, res.Log
if code != codeExp {
fmt.Println("Failed test: DeliverTx")
fmt.Printf("DeliverTx response code was unexpected. Got %v expected %v. Log: %v\n",
code, codeExp, log)
return errors.New("deliverTx error")
func FinalizeBlock(ctx context.Context, client abciclient.Client, txBytes [][]byte, codeExp []uint32, dataExp []byte, hashExp []byte) error {
res, _ := client.FinalizeBlock(ctx, &types.RequestFinalizeBlock{Txs: txBytes})
appHash := res.AppHash
for i, tx := range res.TxResults {
code, data, log := tx.Code, tx.Data, tx.Log
if code != codeExp[i] {
fmt.Println("Failed test: FinalizeBlock")
fmt.Printf("FinalizeBlock response code was unexpected. Got %v expected %v. Log: %v\n",
code, codeExp, log)
return errors.New("FinalizeBlock error")
}
if !bytes.Equal(data, dataExp) {
fmt.Println("Failed test: FinalizeBlock")
fmt.Printf("FinalizeBlock response data was unexpected. Got %X expected %X\n",
data, dataExp)
return errors.New("FinalizeBlock error")
}
}
if !bytes.Equal(data, dataExp) {
fmt.Println("Failed test: DeliverTx")
fmt.Printf("DeliverTx response data was unexpected. Got %X expected %X\n",
data, dataExp)
return errors.New("deliverTx error")
if !bytes.Equal(appHash, hashExp) {
fmt.Println("Failed test: FinalizeBlock")
fmt.Printf("Application hash was unexpected. Got %X expected %X\n", appHash, hashExp)
return errors.New("FinalizeBlock error")
}
fmt.Println("Passed test: DeliverTx")
fmt.Println("Passed test: FinalizeBlock")
return nil
}
func CheckTx(client abcicli.Client, txBytes []byte, codeExp uint32, dataExp []byte) error {
res, _ := client.CheckTxSync(ctx, types.RequestCheckTx{Tx: txBytes})
code, data, log := res.Code, res.Data, res.Log
func PrepareProposal(ctx context.Context, client abciclient.Client, txBytes [][]byte, codeExp []types.TxRecord_TxAction, dataExp []byte) error {
res, _ := client.PrepareProposal(ctx, &types.RequestPrepareProposal{Txs: txBytes})
for i, tx := range res.TxRecords {
if tx.Action != codeExp[i] {
fmt.Println("Failed test: PrepareProposal")
fmt.Printf("PrepareProposal response code was unexpected. Got %v expected %v.",
tx.Action, codeExp)
return errors.New("PrepareProposal error")
}
}
fmt.Println("Passed test: PrepareProposal")
return nil
}
func ProcessProposal(ctx context.Context, client abciclient.Client, txBytes [][]byte, statusExp types.ResponseProcessProposal_ProposalStatus) error {
res, _ := client.ProcessProposal(ctx, &types.RequestProcessProposal{Txs: txBytes})
if res.Status != statusExp {
fmt.Println("Failed test: ProcessProposal")
fmt.Printf("ProcessProposal response status was unexpected. Got %v expected %v.",
res.Status, statusExp)
return errors.New("ProcessProposal error")
}
fmt.Println("Passed test: ProcessProposal")
return nil
}
func CheckTx(ctx context.Context, client abciclient.Client, txBytes []byte, codeExp uint32, dataExp []byte) error {
res, _ := client.CheckTx(ctx, &types.RequestCheckTx{Tx: txBytes})
code, data := res.Code, res.Data
if code != codeExp {
fmt.Println("Failed test: CheckTx")
fmt.Printf("CheckTx response code was unexpected. Got %v expected %v. Log: %v\n",
code, codeExp, log)
fmt.Printf("CheckTx response code was unexpected. Got %v expected %v.,",
code, codeExp)
return errors.New("checkTx")
}
if !bytes.Equal(data, dataExp) {

View File

@@ -1,10 +1,18 @@
echo hello
info
prepare_proposal "abc"
process_proposal "abc"
finalize_block "abc"
commit
deliver_tx "abc"
info
commit
query "abc"
deliver_tx "def=xyz"
finalize_block "def=xyz" "ghi=123"
commit
query "def"
prepare_proposal "preparedef"
process_proposal "def"
process_proposal "preparedef"
prepare_proposal
process_proposal
finalize_block
commit

View File

@@ -8,11 +8,20 @@
-> data: {"size":0}
-> data.hex: 0x7B2273697A65223A307D
> commit
> prepare_proposal "abc"
-> code: OK
-> data.hex: 0x0000000000000000
-> log: Succeeded. Tx: abc action: UNMODIFIED
> deliver_tx "abc"
> process_proposal "abc"
-> code: OK
-> status: ACCEPT
> finalize_block "abc"
-> code: OK
-> code: OK
-> data.hex: 0x0200000000000000
> commit
-> code: OK
> info
@@ -20,32 +29,57 @@
-> data: {"size":1}
-> data.hex: 0x7B2273697A65223A317D
> commit
-> code: OK
-> data.hex: 0x0200000000000000
> query "abc"
-> code: OK
-> log: exists
-> height: 2
-> height: 1
-> key: abc
-> key.hex: 616263
-> value: abc
-> value.hex: 616263
> deliver_tx "def=xyz"
> finalize_block "def=xyz" "ghi=123"
-> code: OK
-> code: OK
-> code: OK
-> data.hex: 0x0600000000000000
> commit
-> code: OK
-> data.hex: 0x0400000000000000
> query "def"
-> code: OK
-> log: exists
-> height: 3
-> height: 2
-> key: def
-> key.hex: 646566
-> value: xyz
-> value.hex: 78797A
> prepare_proposal "preparedef"
-> code: OK
-> log: Succeeded. Tx: def action: ADDED
-> code: OK
-> log: Succeeded. Tx: preparedef action: REMOVED
> process_proposal "def"
-> code: OK
-> status: ACCEPT
> process_proposal "preparedef"
-> code: OK
-> status: REJECT
> prepare_proposal
> process_proposal
-> code: OK
-> status: ACCEPT
> finalize_block
-> code: OK
-> data.hex: 0x0600000000000000
> commit
-> code: OK

View File

@@ -1,7 +1,10 @@
check_tx 0x00
check_tx 0xff
deliver_tx 0x00
finalize_block 0x00
commit
check_tx 0x00
deliver_tx 0x01
deliver_tx 0x04
finalize_block 0x01
commit
finalize_block 0x04
commit
info

View File

@@ -4,20 +4,35 @@
> check_tx 0xff
-> code: OK
> deliver_tx 0x00
> finalize_block 0x00
-> code: OK
-> code: OK
-> data.hex: 0x0200000000000000
> commit
-> code: OK
> check_tx 0x00
-> code: OK
> deliver_tx 0x01
> finalize_block 0x01
-> code: OK
-> code: OK
-> data.hex: 0x0400000000000000
> commit
-> code: OK
> deliver_tx 0x04
> finalize_block 0x04
-> code: OK
-> code: OK
-> data.hex: 0x0600000000000000
> commit
-> code: OK
> info
-> code: OK
-> data: {"hashes":0,"txs":3}
-> data.hex: 0x7B22686173686573223A302C22747873223A337D
-> data: {"size":3}
-> data.hex: 0x7B2273697A65223A337D

View File

@@ -30,6 +30,8 @@ function testExample() {
cat "${INPUT}.out.new"
echo "Expected:"
cat "${INPUT}.out"
echo "Diff:"
diff "${INPUT}.out" "${INPUT}.out.new"
exit 1
fi

View File

@@ -1,33 +1,36 @@
package types
import (
"context"
)
import "context"
//go:generate ../../scripts/mockery_generate.sh Application
// Application is an interface that enables any finite, deterministic state machine
// to be driven by a blockchain-based replication engine via the ABCI.
// All methods take a RequestXxx argument and return a ResponseXxx argument,
// except CheckTx/DeliverTx, which take `tx []byte`, and `Commit`, which takes nothing.
type Application interface {
// Info/Query Connection
Info(RequestInfo) ResponseInfo // Return application info
Query(RequestQuery) ResponseQuery // Query for state
Info(context.Context, *RequestInfo) (*ResponseInfo, error) // Return application info
Query(context.Context, *RequestQuery) (*ResponseQuery, error) // Query for state
// Mempool Connection
CheckTx(RequestCheckTx) ResponseCheckTx // Validate a tx for the mempool
CheckTx(context.Context, *RequestCheckTx) (*ResponseCheckTx, error) // Validate a tx for the mempool
// Consensus Connection
InitChain(RequestInitChain) ResponseInitChain // Initialize blockchain w validators/other info from TendermintCore
BeginBlock(RequestBeginBlock) ResponseBeginBlock // Signals the beginning of a block
DeliverTx(RequestDeliverTx) ResponseDeliverTx // Deliver a tx for full processing
EndBlock(RequestEndBlock) ResponseEndBlock // Signals the end of a block, returns changes to the validator set
Commit() ResponseCommit // Commit the state and return the application Merkle root hash
InitChain(context.Context, *RequestInitChain) (*ResponseInitChain, error) // Initialize blockchain w validators/other info from TendermintCore
PrepareProposal(context.Context, *RequestPrepareProposal) (*ResponsePrepareProposal, error)
ProcessProposal(context.Context, *RequestProcessProposal) (*ResponseProcessProposal, error)
// Commit the state and return the application Merkle root hash
Commit(context.Context) (*ResponseCommit, error)
// Create application specific vote extension
ExtendVote(context.Context, *RequestExtendVote) (*ResponseExtendVote, error)
// Verify application's vote extension data
VerifyVoteExtension(context.Context, *RequestVerifyVoteExtension) (*ResponseVerifyVoteExtension, error)
// Deliver the decided block with its txs to the Application
FinalizeBlock(context.Context, *RequestFinalizeBlock) (*ResponseFinalizeBlock, error)
// State Sync Connection
ListSnapshots(RequestListSnapshots) ResponseListSnapshots // List available snapshots
OfferSnapshot(RequestOfferSnapshot) ResponseOfferSnapshot // Offer a snapshot to the application
LoadSnapshotChunk(RequestLoadSnapshotChunk) ResponseLoadSnapshotChunk // Load a snapshot chunk
ApplySnapshotChunk(RequestApplySnapshotChunk) ResponseApplySnapshotChunk // Apply a shapshot chunk
ListSnapshots(context.Context, *RequestListSnapshots) (*ResponseListSnapshots, error) // List available snapshots
OfferSnapshot(context.Context, *RequestOfferSnapshot) (*ResponseOfferSnapshot, error) // Offer a snapshot to the application
LoadSnapshotChunk(context.Context, *RequestLoadSnapshotChunk) (*ResponseLoadSnapshotChunk, error) // Load a snapshot chunk
ApplySnapshotChunk(context.Context, *RequestApplySnapshotChunk) (*ResponseApplySnapshotChunk, error) // Apply a shapshot chunk
}
//-------------------------------------------------------
@@ -35,140 +38,84 @@ type Application interface {
var _ Application = (*BaseApplication)(nil)
type BaseApplication struct {
}
type BaseApplication struct{}
func NewBaseApplication() *BaseApplication {
return &BaseApplication{}
}
func (BaseApplication) Info(req RequestInfo) ResponseInfo {
return ResponseInfo{}
func (BaseApplication) Info(_ context.Context, req *RequestInfo) (*ResponseInfo, error) {
return &ResponseInfo{}, nil
}
func (BaseApplication) DeliverTx(req RequestDeliverTx) ResponseDeliverTx {
return ResponseDeliverTx{Code: CodeTypeOK}
func (BaseApplication) CheckTx(_ context.Context, req *RequestCheckTx) (*ResponseCheckTx, error) {
return &ResponseCheckTx{Code: CodeTypeOK}, nil
}
func (BaseApplication) CheckTx(req RequestCheckTx) ResponseCheckTx {
return ResponseCheckTx{Code: CodeTypeOK}
func (BaseApplication) Commit(_ context.Context) (*ResponseCommit, error) {
return &ResponseCommit{}, nil
}
func (BaseApplication) Commit() ResponseCommit {
return ResponseCommit{}
func (BaseApplication) ExtendVote(_ context.Context, req *RequestExtendVote) (*ResponseExtendVote, error) {
return &ResponseExtendVote{}, nil
}
func (BaseApplication) Query(req RequestQuery) ResponseQuery {
return ResponseQuery{Code: CodeTypeOK}
func (BaseApplication) VerifyVoteExtension(_ context.Context, req *RequestVerifyVoteExtension) (*ResponseVerifyVoteExtension, error) {
return &ResponseVerifyVoteExtension{
Status: ResponseVerifyVoteExtension_ACCEPT,
}, nil
}
func (BaseApplication) InitChain(req RequestInitChain) ResponseInitChain {
return ResponseInitChain{}
func (BaseApplication) Query(_ context.Context, req *RequestQuery) (*ResponseQuery, error) {
return &ResponseQuery{Code: CodeTypeOK}, nil
}
func (BaseApplication) BeginBlock(req RequestBeginBlock) ResponseBeginBlock {
return ResponseBeginBlock{}
func (BaseApplication) InitChain(_ context.Context, req *RequestInitChain) (*ResponseInitChain, error) {
return &ResponseInitChain{}, nil
}
func (BaseApplication) EndBlock(req RequestEndBlock) ResponseEndBlock {
return ResponseEndBlock{}
func (BaseApplication) ListSnapshots(_ context.Context, req *RequestListSnapshots) (*ResponseListSnapshots, error) {
return &ResponseListSnapshots{}, nil
}
func (BaseApplication) ListSnapshots(req RequestListSnapshots) ResponseListSnapshots {
return ResponseListSnapshots{}
func (BaseApplication) OfferSnapshot(_ context.Context, req *RequestOfferSnapshot) (*ResponseOfferSnapshot, error) {
return &ResponseOfferSnapshot{}, nil
}
func (BaseApplication) OfferSnapshot(req RequestOfferSnapshot) ResponseOfferSnapshot {
return ResponseOfferSnapshot{}
func (BaseApplication) LoadSnapshotChunk(_ context.Context, _ *RequestLoadSnapshotChunk) (*ResponseLoadSnapshotChunk, error) {
return &ResponseLoadSnapshotChunk{}, nil
}
func (BaseApplication) LoadSnapshotChunk(req RequestLoadSnapshotChunk) ResponseLoadSnapshotChunk {
return ResponseLoadSnapshotChunk{}
func (BaseApplication) ApplySnapshotChunk(_ context.Context, req *RequestApplySnapshotChunk) (*ResponseApplySnapshotChunk, error) {
return &ResponseApplySnapshotChunk{}, nil
}
func (BaseApplication) ApplySnapshotChunk(req RequestApplySnapshotChunk) ResponseApplySnapshotChunk {
return ResponseApplySnapshotChunk{}
func (BaseApplication) PrepareProposal(_ context.Context, req *RequestPrepareProposal) (*ResponsePrepareProposal, error) {
trs := make([]*TxRecord, 0, len(req.Txs))
var totalBytes int64
for _, tx := range req.Txs {
totalBytes += int64(len(tx))
if totalBytes > req.MaxTxBytes {
break
}
trs = append(trs, &TxRecord{
Action: TxRecord_UNMODIFIED,
Tx: tx,
})
}
return &ResponsePrepareProposal{TxRecords: trs}, nil
}
//-------------------------------------------------------
// GRPCApplication is a GRPC wrapper for Application
type GRPCApplication struct {
app Application
func (BaseApplication) ProcessProposal(_ context.Context, req *RequestProcessProposal) (*ResponseProcessProposal, error) {
return &ResponseProcessProposal{Status: ResponseProcessProposal_ACCEPT}, nil
}
func NewGRPCApplication(app Application) *GRPCApplication {
return &GRPCApplication{app}
}
func (app *GRPCApplication) Echo(ctx context.Context, req *RequestEcho) (*ResponseEcho, error) {
return &ResponseEcho{Message: req.Message}, nil
}
func (app *GRPCApplication) Flush(ctx context.Context, req *RequestFlush) (*ResponseFlush, error) {
return &ResponseFlush{}, nil
}
func (app *GRPCApplication) Info(ctx context.Context, req *RequestInfo) (*ResponseInfo, error) {
res := app.app.Info(*req)
return &res, nil
}
func (app *GRPCApplication) DeliverTx(ctx context.Context, req *RequestDeliverTx) (*ResponseDeliverTx, error) {
res := app.app.DeliverTx(*req)
return &res, nil
}
func (app *GRPCApplication) CheckTx(ctx context.Context, req *RequestCheckTx) (*ResponseCheckTx, error) {
res := app.app.CheckTx(*req)
return &res, nil
}
func (app *GRPCApplication) Query(ctx context.Context, req *RequestQuery) (*ResponseQuery, error) {
res := app.app.Query(*req)
return &res, nil
}
func (app *GRPCApplication) Commit(ctx context.Context, req *RequestCommit) (*ResponseCommit, error) {
res := app.app.Commit()
return &res, nil
}
func (app *GRPCApplication) InitChain(ctx context.Context, req *RequestInitChain) (*ResponseInitChain, error) {
res := app.app.InitChain(*req)
return &res, nil
}
func (app *GRPCApplication) BeginBlock(ctx context.Context, req *RequestBeginBlock) (*ResponseBeginBlock, error) {
res := app.app.BeginBlock(*req)
return &res, nil
}
func (app *GRPCApplication) EndBlock(ctx context.Context, req *RequestEndBlock) (*ResponseEndBlock, error) {
res := app.app.EndBlock(*req)
return &res, nil
}
func (app *GRPCApplication) ListSnapshots(
ctx context.Context, req *RequestListSnapshots) (*ResponseListSnapshots, error) {
res := app.app.ListSnapshots(*req)
return &res, nil
}
func (app *GRPCApplication) OfferSnapshot(
ctx context.Context, req *RequestOfferSnapshot) (*ResponseOfferSnapshot, error) {
res := app.app.OfferSnapshot(*req)
return &res, nil
}
func (app *GRPCApplication) LoadSnapshotChunk(
ctx context.Context, req *RequestLoadSnapshotChunk) (*ResponseLoadSnapshotChunk, error) {
res := app.app.LoadSnapshotChunk(*req)
return &res, nil
}
func (app *GRPCApplication) ApplySnapshotChunk(
ctx context.Context, req *RequestApplySnapshotChunk) (*ResponseApplySnapshotChunk, error) {
res := app.app.ApplySnapshotChunk(*req)
return &res, nil
func (BaseApplication) FinalizeBlock(_ context.Context, req *RequestFinalizeBlock) (*ResponseFinalizeBlock, error) {
txs := make([]*ExecTxResult, len(req.Txs))
for i := range req.Txs {
txs[i] = &ExecTxResult{Code: CodeTypeOK}
}
return &ResponseFinalizeBlock{
TxResults: txs,
}, nil
}

1
abci/types/client.go Normal file
View File

@@ -0,0 +1 @@
package types

View File

@@ -4,6 +4,7 @@ import (
"io"
"github.com/gogo/protobuf/proto"
"github.com/tendermint/tendermint/internal/libs/protoio"
)
@@ -15,11 +16,7 @@ const (
func WriteMessage(msg proto.Message, w io.Writer) error {
protoWriter := protoio.NewDelimitedWriter(w)
_, err := protoWriter.WriteMsg(msg)
if err != nil {
return err
}
return nil
return err
}
// ReadMessage reads a varint length-delimited protobuf message.
@@ -42,21 +39,15 @@ func ToRequestFlush() *Request {
}
}
func ToRequestInfo(req RequestInfo) *Request {
func ToRequestInfo(req *RequestInfo) *Request {
return &Request{
Value: &Request_Info{&req},
Value: &Request_Info{req},
}
}
func ToRequestDeliverTx(req RequestDeliverTx) *Request {
func ToRequestCheckTx(req *RequestCheckTx) *Request {
return &Request{
Value: &Request_DeliverTx{&req},
}
}
func ToRequestCheckTx(req RequestCheckTx) *Request {
return &Request{
Value: &Request_CheckTx{&req},
Value: &Request_CheckTx{req},
}
}
@@ -66,51 +57,69 @@ func ToRequestCommit() *Request {
}
}
func ToRequestQuery(req RequestQuery) *Request {
func ToRequestQuery(req *RequestQuery) *Request {
return &Request{
Value: &Request_Query{&req},
Value: &Request_Query{req},
}
}
func ToRequestInitChain(req RequestInitChain) *Request {
func ToRequestInitChain(req *RequestInitChain) *Request {
return &Request{
Value: &Request_InitChain{&req},
Value: &Request_InitChain{req},
}
}
func ToRequestBeginBlock(req RequestBeginBlock) *Request {
func ToRequestListSnapshots(req *RequestListSnapshots) *Request {
return &Request{
Value: &Request_BeginBlock{&req},
Value: &Request_ListSnapshots{req},
}
}
func ToRequestEndBlock(req RequestEndBlock) *Request {
func ToRequestOfferSnapshot(req *RequestOfferSnapshot) *Request {
return &Request{
Value: &Request_EndBlock{&req},
Value: &Request_OfferSnapshot{req},
}
}
func ToRequestListSnapshots(req RequestListSnapshots) *Request {
func ToRequestLoadSnapshotChunk(req *RequestLoadSnapshotChunk) *Request {
return &Request{
Value: &Request_ListSnapshots{&req},
Value: &Request_LoadSnapshotChunk{req},
}
}
func ToRequestOfferSnapshot(req RequestOfferSnapshot) *Request {
func ToRequestApplySnapshotChunk(req *RequestApplySnapshotChunk) *Request {
return &Request{
Value: &Request_OfferSnapshot{&req},
Value: &Request_ApplySnapshotChunk{req},
}
}
func ToRequestLoadSnapshotChunk(req RequestLoadSnapshotChunk) *Request {
func ToRequestExtendVote(req *RequestExtendVote) *Request {
return &Request{
Value: &Request_LoadSnapshotChunk{&req},
Value: &Request_ExtendVote{req},
}
}
func ToRequestApplySnapshotChunk(req RequestApplySnapshotChunk) *Request {
func ToRequestVerifyVoteExtension(req *RequestVerifyVoteExtension) *Request {
return &Request{
Value: &Request_ApplySnapshotChunk{&req},
Value: &Request_VerifyVoteExtension{req},
}
}
func ToRequestPrepareProposal(req *RequestPrepareProposal) *Request {
return &Request{
Value: &Request_PrepareProposal{req},
}
}
func ToRequestProcessProposal(req *RequestProcessProposal) *Request {
return &Request{
Value: &Request_ProcessProposal{req},
}
}
func ToRequestFinalizeBlock(req *RequestFinalizeBlock) *Request {
return &Request{
Value: &Request_FinalizeBlock{req},
}
}
@@ -134,73 +143,86 @@ func ToResponseFlush() *Response {
}
}
func ToResponseInfo(res ResponseInfo) *Response {
func ToResponseInfo(res *ResponseInfo) *Response {
return &Response{
Value: &Response_Info{&res},
}
}
func ToResponseDeliverTx(res ResponseDeliverTx) *Response {
return &Response{
Value: &Response_DeliverTx{&res},
Value: &Response_Info{res},
}
}
func ToResponseCheckTx(res ResponseCheckTx) *Response {
func ToResponseCheckTx(res *ResponseCheckTx) *Response {
return &Response{
Value: &Response_CheckTx{&res},
Value: &Response_CheckTx{res},
}
}
func ToResponseCommit(res ResponseCommit) *Response {
func ToResponseCommit(res *ResponseCommit) *Response {
return &Response{
Value: &Response_Commit{&res},
Value: &Response_Commit{res},
}
}
func ToResponseQuery(res ResponseQuery) *Response {
func ToResponseQuery(res *ResponseQuery) *Response {
return &Response{
Value: &Response_Query{&res},
Value: &Response_Query{res},
}
}
func ToResponseInitChain(res ResponseInitChain) *Response {
func ToResponseInitChain(res *ResponseInitChain) *Response {
return &Response{
Value: &Response_InitChain{&res},
Value: &Response_InitChain{res},
}
}
func ToResponseBeginBlock(res ResponseBeginBlock) *Response {
func ToResponseListSnapshots(res *ResponseListSnapshots) *Response {
return &Response{
Value: &Response_BeginBlock{&res},
Value: &Response_ListSnapshots{res},
}
}
func ToResponseEndBlock(res ResponseEndBlock) *Response {
func ToResponseOfferSnapshot(res *ResponseOfferSnapshot) *Response {
return &Response{
Value: &Response_EndBlock{&res},
Value: &Response_OfferSnapshot{res},
}
}
func ToResponseListSnapshots(res ResponseListSnapshots) *Response {
func ToResponseLoadSnapshotChunk(res *ResponseLoadSnapshotChunk) *Response {
return &Response{
Value: &Response_ListSnapshots{&res},
Value: &Response_LoadSnapshotChunk{res},
}
}
func ToResponseOfferSnapshot(res ResponseOfferSnapshot) *Response {
func ToResponseApplySnapshotChunk(res *ResponseApplySnapshotChunk) *Response {
return &Response{
Value: &Response_OfferSnapshot{&res},
Value: &Response_ApplySnapshotChunk{res},
}
}
func ToResponseLoadSnapshotChunk(res ResponseLoadSnapshotChunk) *Response {
func ToResponseExtendVote(res *ResponseExtendVote) *Response {
return &Response{
Value: &Response_LoadSnapshotChunk{&res},
Value: &Response_ExtendVote{res},
}
}
func ToResponseApplySnapshotChunk(res ResponseApplySnapshotChunk) *Response {
func ToResponseVerifyVoteExtension(res *ResponseVerifyVoteExtension) *Response {
return &Response{
Value: &Response_ApplySnapshotChunk{&res},
Value: &Response_VerifyVoteExtension{res},
}
}
func ToResponsePrepareProposal(res *ResponsePrepareProposal) *Response {
return &Response{
Value: &Response_PrepareProposal{res},
}
}
func ToResponseProcessProposal(res *ResponseProcessProposal) *Response {
return &Response{
Value: &Response_ProcessProposal{res},
}
}
func ToResponseFinalizeBlock(res *ResponseFinalizeBlock) *Response {
return &Response{
Value: &Response_FinalizeBlock{res},
}
}

View File

@@ -13,29 +13,21 @@ import (
)
func TestMarshalJSON(t *testing.T) {
b, err := json.Marshal(&ResponseDeliverTx{})
assert.Nil(t, err)
b, err := json.Marshal(&ExecTxResult{Code: 1})
assert.NoError(t, err)
// include empty fields.
assert.True(t, strings.Contains(string(b), "code"))
r1 := ResponseCheckTx{
Code: 1,
Data: []byte("hello"),
GasWanted: 43,
Events: []Event{
{
Type: "testEvent",
Attributes: []EventAttribute{
{Key: "pho", Value: "bo"},
},
},
},
}
b, err = json.Marshal(&r1)
assert.Nil(t, err)
assert.NoError(t, err)
var r2 ResponseCheckTx
err = json.Unmarshal(b, &r2)
assert.Nil(t, err)
assert.NoError(t, err)
assert.Equal(t, r1, r2)
}
@@ -49,11 +41,11 @@ func TestWriteReadMessageSimple(t *testing.T) {
for _, c := range cases {
buf := new(bytes.Buffer)
err := WriteMessage(c, buf)
assert.Nil(t, err)
assert.NoError(t, err)
msg := new(RequestEcho)
err = ReadMessage(buf, msg)
assert.Nil(t, err)
assert.NoError(t, err)
assert.True(t, proto.Equal(c, msg))
}
@@ -71,11 +63,11 @@ func TestWriteReadMessage(t *testing.T) {
for _, c := range cases {
buf := new(bytes.Buffer)
err := WriteMessage(c, buf)
assert.Nil(t, err)
assert.NoError(t, err)
msg := new(tmproto.Header)
err = ReadMessage(buf, msg)
assert.Nil(t, err)
assert.NoError(t, err)
assert.True(t, proto.Equal(c, msg))
}
@@ -86,16 +78,7 @@ func TestWriteReadMessage2(t *testing.T) {
cases := []proto.Message{
&ResponseCheckTx{
Data: []byte(phrase),
Log: phrase,
GasWanted: 10,
Events: []Event{
{
Type: "testEvent",
Attributes: []EventAttribute{
{Key: "abc", Value: "def"},
},
},
},
},
// TODO: add the rest
}
@@ -103,11 +86,11 @@ func TestWriteReadMessage2(t *testing.T) {
for _, c := range cases {
buf := new(bytes.Buffer)
err := WriteMessage(c, buf)
assert.Nil(t, err)
assert.NoError(t, err)
msg := new(ResponseCheckTx)
err = ReadMessage(buf, msg)
assert.Nil(t, err)
assert.NoError(t, err)
assert.True(t, proto.Equal(c, msg))
}

View File

@@ -0,0 +1,352 @@
// Code generated by mockery. DO NOT EDIT.
package mocks
import (
context "context"
mock "github.com/stretchr/testify/mock"
types "github.com/tendermint/tendermint/abci/types"
)
// Application is an autogenerated mock type for the Application type
type Application struct {
mock.Mock
}
// ApplySnapshotChunk provides a mock function with given fields: _a0, _a1
func (_m *Application) ApplySnapshotChunk(_a0 context.Context, _a1 *types.RequestApplySnapshotChunk) (*types.ResponseApplySnapshotChunk, error) {
ret := _m.Called(_a0, _a1)
var r0 *types.ResponseApplySnapshotChunk
if rf, ok := ret.Get(0).(func(context.Context, *types.RequestApplySnapshotChunk) *types.ResponseApplySnapshotChunk); ok {
r0 = rf(_a0, _a1)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*types.ResponseApplySnapshotChunk)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *types.RequestApplySnapshotChunk) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// CheckTx provides a mock function with given fields: _a0, _a1
func (_m *Application) CheckTx(_a0 context.Context, _a1 *types.RequestCheckTx) (*types.ResponseCheckTx, error) {
ret := _m.Called(_a0, _a1)
var r0 *types.ResponseCheckTx
if rf, ok := ret.Get(0).(func(context.Context, *types.RequestCheckTx) *types.ResponseCheckTx); ok {
r0 = rf(_a0, _a1)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*types.ResponseCheckTx)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *types.RequestCheckTx) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Commit provides a mock function with given fields: _a0
func (_m *Application) Commit(_a0 context.Context) (*types.ResponseCommit, error) {
ret := _m.Called(_a0)
var r0 *types.ResponseCommit
if rf, ok := ret.Get(0).(func(context.Context) *types.ResponseCommit); ok {
r0 = rf(_a0)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*types.ResponseCommit)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context) error); ok {
r1 = rf(_a0)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// ExtendVote provides a mock function with given fields: _a0, _a1
func (_m *Application) ExtendVote(_a0 context.Context, _a1 *types.RequestExtendVote) (*types.ResponseExtendVote, error) {
ret := _m.Called(_a0, _a1)
var r0 *types.ResponseExtendVote
if rf, ok := ret.Get(0).(func(context.Context, *types.RequestExtendVote) *types.ResponseExtendVote); ok {
r0 = rf(_a0, _a1)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*types.ResponseExtendVote)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *types.RequestExtendVote) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// FinalizeBlock provides a mock function with given fields: _a0, _a1
func (_m *Application) FinalizeBlock(_a0 context.Context, _a1 *types.RequestFinalizeBlock) (*types.ResponseFinalizeBlock, error) {
ret := _m.Called(_a0, _a1)
var r0 *types.ResponseFinalizeBlock
if rf, ok := ret.Get(0).(func(context.Context, *types.RequestFinalizeBlock) *types.ResponseFinalizeBlock); ok {
r0 = rf(_a0, _a1)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*types.ResponseFinalizeBlock)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *types.RequestFinalizeBlock) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Info provides a mock function with given fields: _a0, _a1
func (_m *Application) Info(_a0 context.Context, _a1 *types.RequestInfo) (*types.ResponseInfo, error) {
ret := _m.Called(_a0, _a1)
var r0 *types.ResponseInfo
if rf, ok := ret.Get(0).(func(context.Context, *types.RequestInfo) *types.ResponseInfo); ok {
r0 = rf(_a0, _a1)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*types.ResponseInfo)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *types.RequestInfo) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// InitChain provides a mock function with given fields: _a0, _a1
func (_m *Application) InitChain(_a0 context.Context, _a1 *types.RequestInitChain) (*types.ResponseInitChain, error) {
ret := _m.Called(_a0, _a1)
var r0 *types.ResponseInitChain
if rf, ok := ret.Get(0).(func(context.Context, *types.RequestInitChain) *types.ResponseInitChain); ok {
r0 = rf(_a0, _a1)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*types.ResponseInitChain)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *types.RequestInitChain) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// ListSnapshots provides a mock function with given fields: _a0, _a1
func (_m *Application) ListSnapshots(_a0 context.Context, _a1 *types.RequestListSnapshots) (*types.ResponseListSnapshots, error) {
ret := _m.Called(_a0, _a1)
var r0 *types.ResponseListSnapshots
if rf, ok := ret.Get(0).(func(context.Context, *types.RequestListSnapshots) *types.ResponseListSnapshots); ok {
r0 = rf(_a0, _a1)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*types.ResponseListSnapshots)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *types.RequestListSnapshots) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// LoadSnapshotChunk provides a mock function with given fields: _a0, _a1
func (_m *Application) LoadSnapshotChunk(_a0 context.Context, _a1 *types.RequestLoadSnapshotChunk) (*types.ResponseLoadSnapshotChunk, error) {
ret := _m.Called(_a0, _a1)
var r0 *types.ResponseLoadSnapshotChunk
if rf, ok := ret.Get(0).(func(context.Context, *types.RequestLoadSnapshotChunk) *types.ResponseLoadSnapshotChunk); ok {
r0 = rf(_a0, _a1)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*types.ResponseLoadSnapshotChunk)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *types.RequestLoadSnapshotChunk) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// OfferSnapshot provides a mock function with given fields: _a0, _a1
func (_m *Application) OfferSnapshot(_a0 context.Context, _a1 *types.RequestOfferSnapshot) (*types.ResponseOfferSnapshot, error) {
ret := _m.Called(_a0, _a1)
var r0 *types.ResponseOfferSnapshot
if rf, ok := ret.Get(0).(func(context.Context, *types.RequestOfferSnapshot) *types.ResponseOfferSnapshot); ok {
r0 = rf(_a0, _a1)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*types.ResponseOfferSnapshot)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *types.RequestOfferSnapshot) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// PrepareProposal provides a mock function with given fields: _a0, _a1
func (_m *Application) PrepareProposal(_a0 context.Context, _a1 *types.RequestPrepareProposal) (*types.ResponsePrepareProposal, error) {
ret := _m.Called(_a0, _a1)
var r0 *types.ResponsePrepareProposal
if rf, ok := ret.Get(0).(func(context.Context, *types.RequestPrepareProposal) *types.ResponsePrepareProposal); ok {
r0 = rf(_a0, _a1)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*types.ResponsePrepareProposal)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *types.RequestPrepareProposal) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// ProcessProposal provides a mock function with given fields: _a0, _a1
func (_m *Application) ProcessProposal(_a0 context.Context, _a1 *types.RequestProcessProposal) (*types.ResponseProcessProposal, error) {
ret := _m.Called(_a0, _a1)
var r0 *types.ResponseProcessProposal
if rf, ok := ret.Get(0).(func(context.Context, *types.RequestProcessProposal) *types.ResponseProcessProposal); ok {
r0 = rf(_a0, _a1)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*types.ResponseProcessProposal)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *types.RequestProcessProposal) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Query provides a mock function with given fields: _a0, _a1
func (_m *Application) Query(_a0 context.Context, _a1 *types.RequestQuery) (*types.ResponseQuery, error) {
ret := _m.Called(_a0, _a1)
var r0 *types.ResponseQuery
if rf, ok := ret.Get(0).(func(context.Context, *types.RequestQuery) *types.ResponseQuery); ok {
r0 = rf(_a0, _a1)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*types.ResponseQuery)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *types.RequestQuery) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// VerifyVoteExtension provides a mock function with given fields: _a0, _a1
func (_m *Application) VerifyVoteExtension(_a0 context.Context, _a1 *types.RequestVerifyVoteExtension) (*types.ResponseVerifyVoteExtension, error) {
ret := _m.Called(_a0, _a1)
var r0 *types.ResponseVerifyVoteExtension
if rf, ok := ret.Get(0).(func(context.Context, *types.RequestVerifyVoteExtension) *types.ResponseVerifyVoteExtension); ok {
r0 = rf(_a0, _a1)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*types.ResponseVerifyVoteExtension)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *types.RequestVerifyVoteExtension) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
type NewApplicationT interface {
mock.TestingT
Cleanup(func())
}
// NewApplication creates a new instance of Application. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewApplication(t NewApplicationT) *Application {
mock := &Application{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}

View File

@@ -4,7 +4,7 @@ import (
fmt "fmt"
"github.com/tendermint/tendermint/crypto/ed25519"
cryptoenc "github.com/tendermint/tendermint/crypto/encoding"
"github.com/tendermint/tendermint/crypto/encoding"
"github.com/tendermint/tendermint/crypto/secp256k1"
"github.com/tendermint/tendermint/crypto/sr25519"
)
@@ -12,7 +12,7 @@ import (
func Ed25519ValidatorUpdate(pk []byte, power int64) ValidatorUpdate {
pke := ed25519.PubKey(pk)
pkp, err := cryptoenc.PubKeyToProto(pke)
pkp, err := encoding.PubKeyToProto(pke)
if err != nil {
panic(err)
}
@@ -29,7 +29,7 @@ func UpdateValidator(pk []byte, power int64, keyType string) ValidatorUpdate {
return Ed25519ValidatorUpdate(pk, power)
case secp256k1.KeyType:
pke := secp256k1.PubKey(pk)
pkp, err := cryptoenc.PubKeyToProto(pke)
pkp, err := encoding.PubKeyToProto(pke)
if err != nil {
panic(err)
}
@@ -39,7 +39,7 @@ func UpdateValidator(pk []byte, power int64, keyType string) ValidatorUpdate {
}
case sr25519.KeyType:
pke := sr25519.PubKey(pk)
pkp, err := cryptoenc.PubKeyToProto(pke)
pkp, err := encoding.PubKeyToProto(pke)
if err != nil {
panic(err)
}

View File

@@ -1,120 +0,0 @@
package types
import (
"bytes"
"encoding/json"
"github.com/gogo/protobuf/jsonpb"
)
const (
CodeTypeOK uint32 = 0
)
// IsOK returns true if Code is OK.
func (r ResponseCheckTx) IsOK() bool {
return r.Code == CodeTypeOK
}
// IsErr returns true if Code is something other than OK.
func (r ResponseCheckTx) IsErr() bool {
return r.Code != CodeTypeOK
}
// IsOK returns true if Code is OK.
func (r ResponseDeliverTx) IsOK() bool {
return r.Code == CodeTypeOK
}
// IsErr returns true if Code is something other than OK.
func (r ResponseDeliverTx) IsErr() bool {
return r.Code != CodeTypeOK
}
// IsOK returns true if Code is OK.
func (r ResponseQuery) IsOK() bool {
return r.Code == CodeTypeOK
}
// IsErr returns true if Code is something other than OK.
func (r ResponseQuery) IsErr() bool {
return r.Code != CodeTypeOK
}
//---------------------------------------------------------------------------
// override JSON marshaling so we emit defaults (ie. disable omitempty)
var (
jsonpbMarshaller = jsonpb.Marshaler{
EnumsAsInts: true,
EmitDefaults: true,
}
jsonpbUnmarshaller = jsonpb.Unmarshaler{}
)
func (r *ResponseCheckTx) MarshalJSON() ([]byte, error) {
s, err := jsonpbMarshaller.MarshalToString(r)
return []byte(s), err
}
func (r *ResponseCheckTx) UnmarshalJSON(b []byte) error {
reader := bytes.NewBuffer(b)
return jsonpbUnmarshaller.Unmarshal(reader, r)
}
func (r *ResponseDeliverTx) MarshalJSON() ([]byte, error) {
s, err := jsonpbMarshaller.MarshalToString(r)
return []byte(s), err
}
func (r *ResponseDeliverTx) UnmarshalJSON(b []byte) error {
reader := bytes.NewBuffer(b)
return jsonpbUnmarshaller.Unmarshal(reader, r)
}
func (r *ResponseQuery) MarshalJSON() ([]byte, error) {
s, err := jsonpbMarshaller.MarshalToString(r)
return []byte(s), err
}
func (r *ResponseQuery) UnmarshalJSON(b []byte) error {
reader := bytes.NewBuffer(b)
return jsonpbUnmarshaller.Unmarshal(reader, r)
}
func (r *ResponseCommit) MarshalJSON() ([]byte, error) {
s, err := jsonpbMarshaller.MarshalToString(r)
return []byte(s), err
}
func (r *ResponseCommit) UnmarshalJSON(b []byte) error {
reader := bytes.NewBuffer(b)
return jsonpbUnmarshaller.Unmarshal(reader, r)
}
func (r *EventAttribute) MarshalJSON() ([]byte, error) {
s, err := jsonpbMarshaller.MarshalToString(r)
return []byte(s), err
}
func (r *EventAttribute) UnmarshalJSON(b []byte) error {
reader := bytes.NewBuffer(b)
return jsonpbUnmarshaller.Unmarshal(reader, r)
}
// Some compile time assertions to ensure we don't
// have accidental runtime surprises later on.
// jsonEncodingRoundTripper ensures that asserted
// interfaces implement both MarshalJSON and UnmarshalJSON
type jsonRoundTripper interface {
json.Marshaler
json.Unmarshaler
}
var _ jsonRoundTripper = (*ResponseCommit)(nil)
var _ jsonRoundTripper = (*ResponseQuery)(nil)
var _ jsonRoundTripper = (*ResponseDeliverTx)(nil)
var _ jsonRoundTripper = (*ResponseCheckTx)(nil)
var _ jsonRoundTripper = (*EventAttribute)(nil)

239
abci/types/types.go Normal file
View File

@@ -0,0 +1,239 @@
package types
import (
"bytes"
"encoding/json"
"github.com/gogo/protobuf/jsonpb"
"github.com/tendermint/tendermint/crypto"
"github.com/tendermint/tendermint/crypto/encoding"
"github.com/tendermint/tendermint/internal/jsontypes"
)
const (
CodeTypeOK uint32 = 0
)
// IsOK returns true if Code is OK.
func (r ResponseCheckTx) IsOK() bool {
return r.Code == CodeTypeOK
}
// IsErr returns true if Code is something other than OK.
func (r ResponseCheckTx) IsErr() bool {
return r.Code != CodeTypeOK
}
// IsOK returns true if Code is OK.
func (r ResponseDeliverTx) IsOK() bool {
return r.Code == CodeTypeOK
}
// IsErr returns true if Code is something other than OK.
func (r ResponseDeliverTx) IsErr() bool {
return r.Code != CodeTypeOK
}
// IsOK returns true if Code is OK.
func (r ExecTxResult) IsOK() bool {
return r.Code == CodeTypeOK
}
// IsErr returns true if Code is something other than OK.
func (r ExecTxResult) IsErr() bool {
return r.Code != CodeTypeOK
}
// IsOK returns true if Code is OK.
func (r ResponseQuery) IsOK() bool {
return r.Code == CodeTypeOK
}
// IsErr returns true if Code is something other than OK.
func (r ResponseQuery) IsErr() bool {
return r.Code != CodeTypeOK
}
func (r ResponseProcessProposal) IsAccepted() bool {
return r.Status == ResponseProcessProposal_ACCEPT
}
func (r ResponseProcessProposal) IsStatusUnknown() bool {
return r.Status == ResponseProcessProposal_UNKNOWN
}
// IsStatusUnknown returns true if Code is Unknown
func (r ResponseVerifyVoteExtension) IsStatusUnknown() bool {
return r.Status == ResponseVerifyVoteExtension_UNKNOWN
}
// IsOK returns true if Code is OK
func (r ResponseVerifyVoteExtension) IsOK() bool {
return r.Status == ResponseVerifyVoteExtension_ACCEPT
}
// IsErr returns true if Code is something other than OK.
func (r ResponseVerifyVoteExtension) IsErr() bool {
return r.Status != ResponseVerifyVoteExtension_ACCEPT
}
//---------------------------------------------------------------------------
// override JSON marshaling so we emit defaults (ie. disable omitempty)
var (
jsonpbMarshaller = jsonpb.Marshaler{
EnumsAsInts: true,
EmitDefaults: true,
}
jsonpbUnmarshaller = jsonpb.Unmarshaler{}
)
func (r *ResponseCheckTx) MarshalJSON() ([]byte, error) {
s, err := jsonpbMarshaller.MarshalToString(r)
return []byte(s), err
}
func (r *ResponseCheckTx) UnmarshalJSON(b []byte) error {
reader := bytes.NewBuffer(b)
return jsonpbUnmarshaller.Unmarshal(reader, r)
}
func (r *ResponseDeliverTx) MarshalJSON() ([]byte, error) {
s, err := jsonpbMarshaller.MarshalToString(r)
return []byte(s), err
}
func (r *ResponseDeliverTx) UnmarshalJSON(b []byte) error {
reader := bytes.NewBuffer(b)
return jsonpbUnmarshaller.Unmarshal(reader, r)
}
func (r *ResponseQuery) MarshalJSON() ([]byte, error) {
s, err := jsonpbMarshaller.MarshalToString(r)
return []byte(s), err
}
func (r *ResponseQuery) UnmarshalJSON(b []byte) error {
reader := bytes.NewBuffer(b)
return jsonpbUnmarshaller.Unmarshal(reader, r)
}
func (r *ResponseCommit) MarshalJSON() ([]byte, error) {
s, err := jsonpbMarshaller.MarshalToString(r)
return []byte(s), err
}
func (r *ResponseCommit) UnmarshalJSON(b []byte) error {
reader := bytes.NewBuffer(b)
return jsonpbUnmarshaller.Unmarshal(reader, r)
}
func (r *EventAttribute) MarshalJSON() ([]byte, error) {
s, err := jsonpbMarshaller.MarshalToString(r)
return []byte(s), err
}
func (r *EventAttribute) UnmarshalJSON(b []byte) error {
reader := bytes.NewBuffer(b)
return jsonpbUnmarshaller.Unmarshal(reader, r)
}
// validatorUpdateJSON is the JSON encoding of a validator update.
//
// It handles translation of public keys from the protobuf representation to
// the legacy Amino-compatible format expected by RPC clients.
type validatorUpdateJSON struct {
PubKey json.RawMessage `json:"pub_key,omitempty"`
Power int64 `json:"power,string"`
}
func (v *ValidatorUpdate) MarshalJSON() ([]byte, error) {
key, err := encoding.PubKeyFromProto(v.PubKey)
if err != nil {
return nil, err
}
jkey, err := jsontypes.Marshal(key)
if err != nil {
return nil, err
}
return json.Marshal(validatorUpdateJSON{
PubKey: jkey,
Power: v.GetPower(),
})
}
func (v *ValidatorUpdate) UnmarshalJSON(data []byte) error {
var vu validatorUpdateJSON
if err := json.Unmarshal(data, &vu); err != nil {
return err
}
var key crypto.PubKey
if err := jsontypes.Unmarshal(vu.PubKey, &key); err != nil {
return err
}
pkey, err := encoding.PubKeyToProto(key)
if err != nil {
return err
}
v.PubKey = pkey
v.Power = vu.Power
return nil
}
// Some compile time assertions to ensure we don't
// have accidental runtime surprises later on.
// jsonEncodingRoundTripper ensures that asserted
// interfaces implement both MarshalJSON and UnmarshalJSON
type jsonRoundTripper interface {
json.Marshaler
json.Unmarshaler
}
var _ jsonRoundTripper = (*ResponseCommit)(nil)
var _ jsonRoundTripper = (*ResponseQuery)(nil)
var _ jsonRoundTripper = (*ResponseDeliverTx)(nil)
var _ jsonRoundTripper = (*ResponseCheckTx)(nil)
var _ jsonRoundTripper = (*EventAttribute)(nil)
// -----------------------------------------------
// construct Result data
func RespondVerifyVoteExtension(ok bool) ResponseVerifyVoteExtension {
status := ResponseVerifyVoteExtension_REJECT
if ok {
status = ResponseVerifyVoteExtension_ACCEPT
}
return ResponseVerifyVoteExtension{
Status: status,
}
}
// deterministicExecTxResult constructs a copy of response that omits
// non-deterministic fields. The input response is not modified.
func deterministicExecTxResult(response *ExecTxResult) *ExecTxResult {
return &ExecTxResult{
Code: response.Code,
Data: response.Data,
GasWanted: response.GasWanted,
GasUsed: response.GasUsed,
}
}
// MarshalTxResults encodes the the TxResults as a list of byte
// slices. It strips off the non-deterministic pieces of the TxResults
// so that the resulting data can be used for hash comparisons and used
// in Merkle proofs.
func MarshalTxResults(r []*ExecTxResult) ([][]byte, error) {
s := make([][]byte, len(r))
for i, e := range r {
d := deterministicExecTxResult(e)
b, err := d.Marshal()
if err != nil {
return nil, err
}
s[i] = b
}
return s, nil
}

File diff suppressed because it is too large Load Diff

74
abci/types/types_test.go Normal file
View File

@@ -0,0 +1,74 @@
package types_test
import (
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
abci "github.com/tendermint/tendermint/abci/types"
"github.com/tendermint/tendermint/crypto/merkle"
)
func TestHashAndProveResults(t *testing.T) {
trs := []*abci.ExecTxResult{
// Note, these tests rely on the first two entries being in this order.
{Code: 0, Data: nil},
{Code: 0, Data: []byte{}},
{Code: 0, Data: []byte("one")},
{Code: 14, Data: nil},
{Code: 14, Data: []byte("foo")},
{Code: 14, Data: []byte("bar")},
}
// Nil and []byte{} should produce the same bytes
bz0, err := trs[0].Marshal()
require.NoError(t, err)
bz1, err := trs[1].Marshal()
require.NoError(t, err)
require.Equal(t, bz0, bz1)
// Make sure that we can get a root hash from results and verify proofs.
rs, err := abci.MarshalTxResults(trs)
require.NoError(t, err)
root := merkle.HashFromByteSlices(rs)
assert.NotEmpty(t, root)
_, proofs := merkle.ProofsFromByteSlices(rs)
for i, tr := range trs {
bz, err := tr.Marshal()
require.NoError(t, err)
valid := proofs[i].Verify(root, bz)
assert.NoError(t, valid, "%d", i)
}
}
func TestHashDeterministicFieldsOnly(t *testing.T) {
tr1 := abci.ExecTxResult{
Code: 1,
Data: []byte("transaction"),
Log: "nondeterministic data: abc",
Info: "nondeterministic data: abc",
GasWanted: 1000,
GasUsed: 1000,
Events: []abci.Event{},
Codespace: "nondeterministic.data.abc",
}
tr2 := abci.ExecTxResult{
Code: 1,
Data: []byte("transaction"),
Log: "nondeterministic data: def",
Info: "nondeterministic data: def",
GasWanted: 1000,
GasUsed: 1000,
Events: []abci.Event{},
Codespace: "nondeterministic.data.def",
}
r1, err := abci.MarshalTxResults([]*abci.ExecTxResult{&tr1})
require.NoError(t, err)
r2, err := abci.MarshalTxResults([]*abci.ExecTxResult{&tr2})
require.NoError(t, err)
require.Equal(t, merkle.HashFromByteSlices(r1), merkle.HashFromByteSlices(r2))
}

View File

@@ -1,9 +0,0 @@
package version
import (
"github.com/tendermint/tendermint/version"
)
// TODO: eliminate this after some version refactor
const Version = version.ABCIVersion

View File

@@ -1,13 +1,9 @@
# The version of the generation template.
# Required.
# The only currently-valid value is v1beta1.
version: v1beta1
# The plugins to run.
version: v1
plugins:
# The name of the plugin.
- name: gogofaster
# The the relative output directory.
out: proto
# Any options to provide to the plugin.
opt: Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/duration.proto=github.com/golang/protobuf/ptypes/duration,plugins=grpc,paths=source_relative
out: ./proto/
opt:
- Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types
- Mgoogle/protobuf/duration.proto=github.com/golang/protobuf/ptypes/duration
- plugins=grpc
- paths=source_relative

3
buf.work.yaml Normal file
View File

@@ -0,0 +1,3 @@
version: v1
directories:
- proto

View File

@@ -6,10 +6,11 @@ import (
"crypto/x509"
"flag"
"fmt"
"io/ioutil"
"net"
"net/http"
"os"
"os/signal"
"syscall"
"time"
grpc_prometheus "github.com/grpc-ecosystem/go-grpc-prometheus"
@@ -20,7 +21,6 @@ import (
"github.com/tendermint/tendermint/libs/log"
tmnet "github.com/tendermint/tendermint/libs/net"
tmos "github.com/tendermint/tendermint/libs/os"
"github.com/tendermint/tendermint/privval"
grpcprivval "github.com/tendermint/tendermint/privval/grpc"
privvalproto "github.com/tendermint/tendermint/proto/tendermint/privval"
@@ -45,12 +45,19 @@ func main() {
keyFile = flag.String("keyfile", "", "absolute path to server key")
rootCA = flag.String("rootcafile", "", "absolute path to root CA")
prometheusAddr = flag.String("prometheus-addr", "", "address for prometheus endpoint (host:port)")
logger = log.MustNewDefaultLogger(log.LogFormatPlain, log.LogLevelInfo, false).
With("module", "priv_val")
)
flag.Parse()
logger, err := log.NewDefaultLogger(log.LogFormatPlain, log.LogLevelInfo)
if err != nil {
fmt.Fprintf(os.Stderr, "failed to construct logger: %v", err)
os.Exit(1)
}
logger = logger.With("module", "priv_val")
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
logger.Info(
"Starting private validator",
"addr", *addr,
@@ -78,7 +85,7 @@ func main() {
}
certPool := x509.NewCertPool()
bs, err := ioutil.ReadFile(*rootCA)
bs, err := os.ReadFile(*rootCA)
if err != nil {
fmt.Fprintf(os.Stderr, "failed to read client ca cert: %s", err)
os.Exit(1)
@@ -106,7 +113,7 @@ func main() {
// add prometheus metrics for unary RPC calls
opts = append(opts, grpc.UnaryInterceptor(grpc_prometheus.UnaryServerInterceptor))
ss := grpcprivval.NewSignerServer(*chainID, pv, logger)
ss := grpcprivval.NewSignerServer(logger, *chainID, pv)
protocol, address := tmnet.ProtocolAndAddress(*addr)
@@ -131,9 +138,10 @@ func main() {
os.Exit(1)
}
// Stop upon receiving SIGTERM or CTRL-C.
tmos.TrapSignal(logger, func() {
logger.Debug("SignerServer: calling Close")
opctx, opcancel := signal.NotifyContext(ctx, os.Interrupt, syscall.SIGTERM)
defer opcancel()
go func() {
<-opctx.Done()
if *prometheusAddr != "" {
ctx, cancel := context.WithTimeout(context.Background(), 1*time.Second)
defer cancel()
@@ -143,7 +151,7 @@ func main() {
}
}
s.GracefulStop()
})
}()
// Run forever.
select {}

View File

@@ -0,0 +1,71 @@
package commands
import (
"errors"
"path/filepath"
"sync"
"github.com/spf13/cobra"
"github.com/syndtr/goleveldb/leveldb"
"github.com/syndtr/goleveldb/leveldb/opt"
"github.com/syndtr/goleveldb/leveldb/util"
"github.com/tendermint/tendermint/config"
"github.com/tendermint/tendermint/libs/log"
)
func MakeCompactDBCommand(cfg *config.Config, logger log.Logger) *cobra.Command {
cmd := &cobra.Command{
Use: "experimental-compact-goleveldb",
Short: "force compacts the tendermint storage engine (only GoLevelDB supported)",
Long: `
This is a temporary utility command that performs a force compaction on the state
and blockstores to reduce disk space for a pruning node. This should only be run
once the node has stopped. This command will likely be omitted in the future after
the planned refactor to the storage engine.
Currently, only GoLevelDB is supported.
`,
RunE: func(cmd *cobra.Command, args []string) error {
if cfg.DBBackend != "goleveldb" {
return errors.New("compaction is currently only supported with goleveldb")
}
compactGoLevelDBs(cfg.RootDir, logger)
return nil
},
}
return cmd
}
func compactGoLevelDBs(rootDir string, logger log.Logger) {
dbNames := []string{"state", "blockstore"}
o := &opt.Options{
DisableSeeksCompaction: true,
}
wg := sync.WaitGroup{}
for _, dbName := range dbNames {
dbName := dbName
wg.Add(1)
go func() {
defer wg.Done()
dbPath := filepath.Join(rootDir, "data", dbName+".db")
store, err := leveldb.OpenFile(dbPath, o)
if err != nil {
logger.Error("failed to initialize tendermint db", "path", dbPath, "err", err)
return
}
defer store.Close()
logger.Info("starting compaction...", "db", dbPath)
err = store.CompactRange(util.Range{Start: nil, Limit: nil})
if err != nil {
logger.Error("failed to compact tendermint db", "path", dbPath, "err", err)
}
}()
}
wg.Wait()
}

View File

@@ -0,0 +1,46 @@
package commands
import (
"fmt"
"github.com/spf13/cobra"
)
// NewCompletionCmd returns a cobra.Command that generates bash and zsh
// completion scripts for the given root command. If hidden is true, the
// command will not show up in the root command's list of available commands.
func NewCompletionCmd(rootCmd *cobra.Command, hidden bool) *cobra.Command {
flagZsh := "zsh"
cmd := &cobra.Command{
Use: "completion",
Short: "Generate shell completion scripts",
Long: fmt.Sprintf(`Generate Bash and Zsh completion scripts and print them to STDOUT.
Once saved to file, a completion script can be loaded in the shell's
current session as shown:
$ . <(%s completion)
To configure your bash shell to load completions for each session add to
your $HOME/.bashrc or $HOME/.profile the following instruction:
. <(%s completion)
`, rootCmd.Use, rootCmd.Use),
RunE: func(cmd *cobra.Command, _ []string) error {
zsh, err := cmd.Flags().GetBool(flagZsh)
if err != nil {
return err
}
if zsh {
return rootCmd.GenZshCompletion(cmd.OutOrStdout())
}
return rootCmd.GenBashCompletion(cmd.OutOrStdout())
},
Hidden: hidden,
Args: cobra.NoArgs,
}
cmd.Flags().Bool(flagZsh, false, "Generate Zsh completion script")
return cmd
}

View File

@@ -6,34 +6,26 @@ import (
"github.com/tendermint/tendermint/libs/log"
)
var (
nodeRPCAddr string
profAddr string
frequency uint
const (
flagNodeRPCAddr = "rpc-laddr"
flagProfAddr = "pprof-laddr"
flagFrequency = "frequency"
logger = log.MustNewDefaultLogger(log.LogFormatPlain, log.LogLevelInfo, false)
)
// DebugCmd defines the root command containing subcommands that assist in
// debugging running Tendermint processes.
var DebugCmd = &cobra.Command{
Use: "debug",
Short: "A utility to kill or watch a Tendermint process while aggregating debugging data",
}
func init() {
DebugCmd.PersistentFlags().SortFlags = true
DebugCmd.PersistentFlags().StringVar(
&nodeRPCAddr,
func GetDebugCommand(logger log.Logger) *cobra.Command {
cmd := &cobra.Command{
Use: "debug",
Short: "A utility to kill or watch a Tendermint process while aggregating debugging data",
}
cmd.PersistentFlags().SortFlags = true
cmd.PersistentFlags().String(
flagNodeRPCAddr,
"tcp://localhost:26657",
"the Tendermint node's RPC address (<host>:<port>)",
"the Tendermint node's RPC address <host>:<port>)",
)
DebugCmd.AddCommand(killCmd)
DebugCmd.AddCommand(dumpCmd)
cmd.AddCommand(getKillCmd(logger))
cmd.AddCommand(getDumpCmd(logger))
return cmd
}

View File

@@ -1,9 +1,9 @@
package debug
import (
"context"
"errors"
"fmt"
"io/ioutil"
"os"
"path/filepath"
"time"
@@ -11,78 +11,104 @@ import (
"github.com/spf13/cobra"
"github.com/spf13/viper"
cfg "github.com/tendermint/tendermint/config"
"github.com/tendermint/tendermint/config"
"github.com/tendermint/tendermint/libs/cli"
"github.com/tendermint/tendermint/libs/log"
rpchttp "github.com/tendermint/tendermint/rpc/client/http"
)
var dumpCmd = &cobra.Command{
Use: "dump [output-directory]",
Short: "Continuously poll a Tendermint process and dump debugging data into a single location",
Long: `Continuously poll a Tendermint process and dump debugging data into a single
func getDumpCmd(logger log.Logger) *cobra.Command {
cmd := &cobra.Command{
Use: "dump [output-directory]",
Short: "Continuously poll a Tendermint process and dump debugging data into a single location",
Long: `Continuously poll a Tendermint process and dump debugging data into a single
location at a specified frequency. At each frequency interval, an archived and compressed
file will contain node debugging information including the goroutine and heap profiles
if enabled.`,
Args: cobra.ExactArgs(1),
RunE: dumpCmdHandler,
}
Args: cobra.ExactArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
outDir := args[0]
if outDir == "" {
return errors.New("invalid output directory")
}
frequency, err := cmd.Flags().GetUint(flagFrequency)
if err != nil {
return fmt.Errorf("flag %q not defined: %w", flagFrequency, err)
}
func init() {
dumpCmd.Flags().UintVar(
&frequency,
if frequency == 0 {
return errors.New("frequency must be positive")
}
nodeRPCAddr, err := cmd.Flags().GetString(flagNodeRPCAddr)
if err != nil {
return fmt.Errorf("flag %q not defined: %w", flagNodeRPCAddr, err)
}
profAddr, err := cmd.Flags().GetString(flagProfAddr)
if err != nil {
return fmt.Errorf("flag %q not defined: %w", flagProfAddr, err)
}
if _, err := os.Stat(outDir); os.IsNotExist(err) {
if err := os.Mkdir(outDir, os.ModePerm); err != nil {
return fmt.Errorf("failed to create output directory: %w", err)
}
}
rpc, err := rpchttp.New(nodeRPCAddr)
if err != nil {
return fmt.Errorf("failed to create new http client: %w", err)
}
ctx := cmd.Context()
home := viper.GetString(cli.HomeFlag)
conf := config.DefaultConfig()
conf = conf.SetRoot(home)
config.EnsureRoot(conf.RootDir)
dumpArgs := dumpDebugDataArgs{
conf: conf,
outDir: outDir,
profAddr: profAddr,
}
dumpDebugData(ctx, logger, rpc, dumpArgs)
ticker := time.NewTicker(time.Duration(frequency) * time.Second)
for range ticker.C {
dumpDebugData(ctx, logger, rpc, dumpArgs)
}
return nil
},
}
cmd.Flags().Uint(
flagFrequency,
30,
"the frequency (seconds) in which to poll, aggregate and dump Tendermint debug data",
)
dumpCmd.Flags().StringVar(
&profAddr,
cmd.Flags().String(
flagProfAddr,
"",
"the profiling server address (<host>:<port>)",
)
return cmd
}
func dumpCmdHandler(_ *cobra.Command, args []string) error {
outDir := args[0]
if outDir == "" {
return errors.New("invalid output directory")
}
if frequency == 0 {
return errors.New("frequency must be positive")
}
if _, err := os.Stat(outDir); os.IsNotExist(err) {
if err := os.Mkdir(outDir, os.ModePerm); err != nil {
return fmt.Errorf("failed to create output directory: %w", err)
}
}
rpc, err := rpchttp.New(nodeRPCAddr)
if err != nil {
return fmt.Errorf("failed to create new http client: %w", err)
}
home := viper.GetString(cli.HomeFlag)
conf := cfg.DefaultConfig()
conf = conf.SetRoot(home)
cfg.EnsureRoot(conf.RootDir)
dumpDebugData(outDir, conf, rpc)
ticker := time.NewTicker(time.Duration(frequency) * time.Second)
for range ticker.C {
dumpDebugData(outDir, conf, rpc)
}
return nil
type dumpDebugDataArgs struct {
conf *config.Config
outDir string
profAddr string
}
func dumpDebugData(outDir string, conf *cfg.Config, rpc *rpchttp.HTTP) {
func dumpDebugData(ctx context.Context, logger log.Logger, rpc *rpchttp.HTTP, args dumpDebugDataArgs) {
start := time.Now().UTC()
tmpDir, err := ioutil.TempDir(outDir, "tendermint_debug_tmp")
tmpDir, err := os.MkdirTemp(args.outDir, "tendermint_debug_tmp")
if err != nil {
logger.Error("failed to create temporary directory", "dir", tmpDir, "error", err)
return
@@ -90,44 +116,44 @@ func dumpDebugData(outDir string, conf *cfg.Config, rpc *rpchttp.HTTP) {
defer os.RemoveAll(tmpDir)
logger.Info("getting node status...")
if err := dumpStatus(rpc, tmpDir, "status.json"); err != nil {
if err := dumpStatus(ctx, rpc, tmpDir, "status.json"); err != nil {
logger.Error("failed to dump node status", "error", err)
return
}
logger.Info("getting node network info...")
if err := dumpNetInfo(rpc, tmpDir, "net_info.json"); err != nil {
if err := dumpNetInfo(ctx, rpc, tmpDir, "net_info.json"); err != nil {
logger.Error("failed to dump node network info", "error", err)
return
}
logger.Info("getting node consensus state...")
if err := dumpConsensusState(rpc, tmpDir, "consensus_state.json"); err != nil {
if err := dumpConsensusState(ctx, rpc, tmpDir, "consensus_state.json"); err != nil {
logger.Error("failed to dump node consensus state", "error", err)
return
}
logger.Info("copying node WAL...")
if err := copyWAL(conf, tmpDir); err != nil {
if err := copyWAL(args.conf, tmpDir); err != nil {
logger.Error("failed to copy node WAL", "error", err)
return
}
if profAddr != "" {
if args.profAddr != "" {
logger.Info("getting node goroutine profile...")
if err := dumpProfile(tmpDir, profAddr, "goroutine", 2); err != nil {
if err := dumpProfile(tmpDir, args.profAddr, "goroutine", 2); err != nil {
logger.Error("failed to dump goroutine profile", "error", err)
return
}
logger.Info("getting node heap profile...")
if err := dumpProfile(tmpDir, profAddr, "heap", 2); err != nil {
if err := dumpProfile(tmpDir, args.profAddr, "heap", 2); err != nil {
logger.Error("failed to dump heap profile", "error", err)
return
}
}
outFile := filepath.Join(outDir, fmt.Sprintf("%s.zip", start.Format(time.RFC3339)))
outFile := filepath.Join(args.outDir, fmt.Sprintf("%s.zip", start.Format(time.RFC3339)))
if err := zipDir(tmpDir, outFile); err != nil {
logger.Error("failed to create and compress archive", "file", outFile, "error", err)
}

View File

@@ -5,7 +5,6 @@ import (
"encoding/json"
"fmt"
"io"
"io/ioutil"
"os"
"path"
"path/filepath"
@@ -111,5 +110,5 @@ func writeStateJSONToFile(state interface{}, dir, filename string) error {
return fmt.Errorf("failed to encode state dump: %w", err)
}
return ioutil.WriteFile(path.Join(dir, filename), stateJSON, os.ModePerm)
return os.WriteFile(path.Join(dir, filename), stateJSON, os.ModePerm)
}

Some files were not shown because too many files have changed in this diff Show More