Commit Graph
377 Commits
Author SHA1 Message Date
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
Thane Thomson 01b6a4f2d5 Panic on ABCI++ method call failure
Signed-off-by: Thane Thomson <connect@thanethomson.com>
2022-03-28 11:40:36 -04:00
Thane Thomson cbe85608cb Rewrite loop for clarity
Signed-off-by: Thane Thomson <connect@thanethomson.com>
2022-03-25 10:37:06 -04:00
Thane Thomson 617f47fe44 Use dummy value with clearer meaning
Signed-off-by: Thane Thomson <connect@thanethomson.com>
2022-03-25 10:36:59 -04:00
806e348af8 Update internal/consensus/common_test.go
Co-authored-by: Sergio Mena <sergio@informal.systems>
2022-03-25 10:36:45 -04:00
Thane Thomson 040cb566fb Merge latest changes from master and resolve conflicts
Signed-off-by: Thane Thomson <connect@thanethomson.com>
2022-03-24 08:03:42 -04:00
William BanfieldandGitHub e4ae922c33 consensus: update state machine to use the new consensus params (#8181) 2022-03-23 11:26:42 -04:00
Sam KleinmanandGitHub cbce877480 consensus: add leaktest check to replay tests (#8185) 2022-03-23 00:00:08 +00:00
Sam KleinmanandGitHub b29cc95920 consensus: cleanup tempfile explictly (#8184) 2022-03-22 17:41:00 -04:00
Sam KleinmanandGitHub 0c9558a742 consensus: avoid panic during shutdown (#8170) 2022-03-22 15:28:33 -04:00
William BanfieldandGitHub 2361e0c65c abci++: remove CheckTx call from PrepareProposal flow (#8176) 2022-03-22 10:03:35 -04:00
William BanfieldandGitHub 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 KleinmanandGitHub 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 KleinmanandGitHub 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
Thane Thomson ab50582319 Fix missing VerifyVoteExtension request data
Signed-off-by: Thane Thomson <connect@thanethomson.com>
2022-03-20 14:12:05 -04:00
Thane Thomson 9431db98e3 Fix lint
Signed-off-by: Thane Thomson <connect@thanethomson.com>
2022-03-20 13:38:53 -04:00
Thane Thomson 19e07c9a8c Remove extraneous empty value initialization
Signed-off-by: Thane Thomson <connect@thanethomson.com>
2022-03-20 13:34:46 -04:00
Thane Thomson 71d36953c3 Thread vote extensions through code and fix tests
Signed-off-by: Thane Thomson <connect@thanethomson.com>
2022-03-20 13:34:46 -04:00
Thane Thomson aac3df4901 Inject vote extensions into proposal
Signed-off-by: Thane Thomson <connect@thanethomson.com>
2022-03-20 13:34:46 -04:00
Thane Thomson 8fbe537d5d 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>
2022-03-20 13:34:44 -04:00
William BanfieldandGitHub 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 KleinmanandGitHub 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 KleinmanandGitHub 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 KleinmanandGitHub 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 BanfieldGitHubSam Kleinmanmergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
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 KleinmanandGitHub f1a8f47d4d types: minor cleanup of un or minimally used types (#8154) 2022-03-18 16:27:10 +00:00
Sam KleinmanandGitHub f61e6e4201 autofile: remove vestigal close mechanism (#8150) 2022-03-18 12:05:53 -04:00
Sam KleinmanandGitHub 1db41663c7 consensus: avoid race in accessing channel (#8149) 2022-03-18 09:54:40 -04:00
Sam KleinmanandGitHub 5e0e05f938 consensus: avoid persistent kvstore in tests (#8148) 2022-03-18 09:39:06 -04:00
Sam KleinmanandGitHub 5bb51aab03 events: remove service aspects of event switch (#8146) 2022-03-18 12:31:08 +00:00
Sam KleinmanandGitHub 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
JayT106andGitHub 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