Commit Graph
408 Commits
Author SHA1 Message Date
Thane Thomson faec1d3c52 consensus: remove previously added test helper functionality
Signed-off-by: Thane Thomson <connect@thanethomson.com>
2022-04-14 16:43:26 -04:00
Thane Thomson cb970564d7 consensus: fix flaky TestPrepareProposalReceivesVoteExtensions
Signed-off-by: Thane Thomson <connect@thanethomson.com>
2022-04-14 16:41:08 -04:00
Thane ThomsonandGitHub a07ae242a5 Merge branch 'master' into thane/7655-vote-extensions 2022-04-13 19:05:05 -04:00
Sam KleinmanandGitHub 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 KleinmanandGitHub c45367e22c rpc: avoid leaking threads (#8328) 2022-04-13 14:09:49 -04:00
Thane Thomson d2d87485ca Merge latest changes from master
Signed-off-by: Thane Thomson <connect@thanethomson.com>
2022-04-13 14:00:40 -04:00
Thane Thomson 532a0f9719 Remove channel capacity constraint in test helper to avoid missing messages
Signed-off-by: Thane Thomson <connect@thanethomson.com>
2022-04-13 13:01:49 -04:00
Sam KleinmanandGitHub 80b8c0057b state: remove unused weighted time (#8315) 2022-04-12 21:14:00 +00:00
Sam KleinmanandGitHub 571d26fbb0 events: remove unused event code (#8313) 2022-04-12 14:58:14 -04:00
Thane Thomson 8bb7983c4c Read lock consensus state mutex in test helper to avoid data race
Signed-off-by: Thane Thomson <connect@thanethomson.com>
2022-04-11 21:08:30 -04:00
Thane Thomson 550216249c Merge from master and fix conflicts
Signed-off-by: Thane Thomson <connect@thanethomson.com>
2022-04-11 20:39:53 -04:00
Thane Thomson e7523c430a 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>
2022-04-11 20:35:45 -04:00
Thane Thomson 3124ac5c72 Expand on vote matching error messages in testing
Signed-off-by: Thane Thomson <connect@thanethomson.com>
2022-04-11 20:05:19 -04:00
William BanfieldandGitHub 969690d81c abci++: only include meaningful header fields in data passed-through to application (#8216)
closes: #7950
2022-04-11 20:27:50 +00:00
Thane ThomsonandGitHub af6d500068 Merge branch 'master' into thane/7655-vote-extensions 2022-04-11 10:53:50 -04:00
Ismail KhoffiandGitHub 0e32ad9e5c Update outdated doc comment (#8309)
SetEventBus was deleted, same with the NopEventBus
2022-04-11 07:06:57 -07:00
Thane Thomson 26f049abc9 Expand on vote equality test errors for clarity
Signed-off-by: Thane Thomson <connect@thanethomson.com>
2022-04-11 08:25:51 -04:00
Thane ThomsonandGitHub 2ccd305317 Merge branch 'master' into thane/7655-vote-extensions 2022-04-11 07:35:55 -04:00
William BanfieldandGitHub 6ff07a1633 switch to consensus change startup ordering (#8290) 2022-04-08 18:11:20 -04:00
Sam KleinmanandGitHub 631ef7aae0 consensus: add nil check to gossip routine (#8288) 2022-04-08 17:13:10 -04:00
Sam KleinmanandGitHub 3e3a934818 rpc: add more nil checks in the status end point (#8287) 2022-04-08 14:04:43 -04:00
Sam KleinmanandGitHub 90b951af72 node+statesync: normalize initialization (#8275) 2022-04-08 11:00:58 -04:00
Thane ThomsonandGitHub e7e806176b Merge branch 'master' into thane/7655-vote-extensions 2022-04-07 16:25:18 -04:00
Sam KleinmanandGitHub 9d20e06900 statesync+blocksync: move event publications into the sync operations (#8274) 2022-04-07 16:23:36 -04:00
Thane ThomsonandGitHub a3f0123c88 Merge branch 'master' into thane/7655-vote-extensions 2022-04-07 15:17:29 -04:00
Sam KleinmanandGitHub 6ed3f2d98d node: move handshake out of constructor (#8264) 2022-04-07 11:21:10 -04:00
Sam KleinmanandGitHub 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. FrombergerandGitHub 14f41ac5e3 Fix more broken Markdown links. (#8271) 2022-04-07 00:15:20 -07:00
Sam KleinmanandGitHub 7678ab8850 statesync: tweak test performance (#8267) 2022-04-06 21:50:14 +00:00
Thane ThomsonandGitHub 3a158ce0c4 Merge branch 'master' into thane/7655-vote-extensions 2022-04-06 16:57:59 -04:00
Sam KleinmanandGitHub d153388446 p2p: inject nodeinfo into router (#8261) 2022-04-06 14:02:07 -04:00
Thane ThomsonandGitHub f697844917 Merge branch 'master' into thane/7655-vote-extensions 2022-04-06 12:07:47 -04:00
Sam KleinmanandGitHub 2304ea70f7 consensus: remove string indented function (#8257) 2022-04-06 08:07:21 -07:00
Thane Thomson a371c8684f Pass through vote extension in test helpers
Signed-off-by: Thane Thomson <connect@thanethomson.com>
2022-04-05 14:40:55 -04:00
Thane ThomsonandGitHub 28cd854fcd Merge branch 'master' into thane/7655-vote-extensions 2022-04-05 14:13:20 -04:00
dependabot[bot]andGitHub 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="https://github.com/vektra/mockery/commit/c943e696a04fb7357ae62ef162e1cf47c171cd4c"><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="https://github.com/vektra/mockery/commit/4703d1a42fe803968924d87f77e8d79181dc5108"><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="https://github.com/vektra/mockery/commit/ed38b20a49e7122f22a89a8a24c74d4e6bd76afb"><code>ed38b20</code></a> Update go.sum</li>
<li><a href="https://github.com/vektra/mockery/commit/ee25bcfcb54c98ea7bcb6ac95d098db2390ce11f"><code>ee25bcf</code></a> Add/update mocks</li>
<li><a href="https://github.com/vektra/mockery/commit/ba1f213e177e70df3146e65b6e99731c9bf4faaa"><code>ba1f213</code></a> Remove packages.NeedDeps</li>
<li><a href="https://github.com/vektra/mockery/commit/17abd96c5774761020102a6b1c9edb748a4f6999"><code>17abd96</code></a> fix: unused config field <code>Tags</code></li>
<li><a href="https://github.com/vektra/mockery/commit/53114cfce4dac4ef74eaed9625f228f52dd9dfcd"><code>53114cf</code></a> test: add test for env var configurations</li>
<li><a href="https://github.com/vektra/mockery/commit/ed87cf671a9acc321bef505ff84c44596cb4c4e9"><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
Thane Thomson 16b67fd9e6 Merge latest changes from master and fix conflicts
Signed-off-by: Thane Thomson <connect@thanethomson.com>
2022-04-05 09:33:05 -04:00
Sam KleinmanandGitHub 9d1e8eaad4 node: remove channel and peer update initialization from construction (#8238) 2022-04-05 13:26:53 +00:00
Sam KleinmanandGitHub 97f7021712 statesync: merge channel processing (#8240) 2022-04-04 12:31:15 -04:00
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
Thane Thomson a682cc89c1 Fix spelling mistake to appease linter
Signed-off-by: Thane Thomson <connect@thanethomson.com>
2022-04-01 16:03:48 -04:00
William Banfield 431c85be60 add tests for vote extension cases 2022-04-01 14:59:58 -04:00
Thane Thomson 989c9b63d6 Merge latest changes from master and resolve conflicts
Signed-off-by: Thane Thomson <connect@thanethomson.com>
2022-03-31 19:57:23 -04:00
Sam KleinmanandGitHub 6af23ff757 state: avoid premature genericism (#8224) 2022-03-31 13:10:09 +00:00
Thane Thomson d9b2859191 Merge latest changes from master
Signed-off-by: Thane Thomson <connect@thanethomson.com>
2022-03-29 08:38:48 -04:00
Thane Thomson f618fc2a1c 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>
2022-03-29 08:35:13 -04:00
William BanfieldandGitHub 41a1bf539b timeout parameters take the default if not set (#8189) 2022-03-28 18:25:19 -04:00
William BanfieldandGitHub 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
Thane Thomson 620c3236ec Add strong guarantee in extendedCommitInfo that the number of votes corresponds
Signed-off-by: Thane Thomson <connect@thanethomson.com>
2022-03-28 11:45:06 -04:00
Thane Thomson fab3cd0932 Add strong correctness guarantees when constructing extended commit info for ABCI++
Signed-off-by: Thane Thomson <connect@thanethomson.com>
2022-03-28 11:41:24 -04:00