Commit Graph

9047 Commits

Author SHA1 Message Date
M. J. Fromberger
a7ecf49c10 Add new team member to CODEOWNERS. (#6811) 2021-08-09 23:30:58 -04: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
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
William Banfield
9e41414a53 light: replace homegrown mock with mockery (#6735)
This pull request removes the homegrown mocks in `light/provider/mock` in favor of mockery mocks.

Adds a simple benchmark only mock to avoid the overhead of `reflection` that `mockery` incurs.

part of #5274
2021-07-28 16:12:11 +00:00
Callum Waters
6ff4c3139c blockchain: rename to blocksync service (#6755) 2021-07-28 17:25:42 +02:00
JayT106
e87b0391cb cli/indexer: Reindex events (#6676) 2021-07-28 00:04:54 +02:00
Aleksandr Bezobchuk
4f73748bc8 mempool v1: tweak broadcastTxRoutine (#6771) 2021-07-27 15:34:06 -04:00
Callum Waters
9a3861fb82 light: wait for tendermint node to start before running example test (#6744) 2021-07-27 18:59:34 +02:00
William Banfield
44ac57489f abci: add changelog entry for mempool_error field (#6770)
Follow up from PR: #6740
2021-07-27 13:33:20 +00:00
Marko
76376e3161 avoid issues already labeled (#6767) 2021-07-27 06:17:32 +00:00
William Banfield
dd97ac6e1c test/fuzz: add mechanism to reproduce found fuzz errors (#6768)
* test/fuzz: add test to reproduce found fuzz errors
2021-07-26 17:30:43 -04:00
William Banfield
a751eee7f2 p2p: add test for pqueue dequeue full error (#6760)
This adds a test for closing the `pqueue` while the `pqueue` contains data that has not yet been dequeued.

This issue was found while debugging #6705 

This test will fail until @cmwaters fix for this condition is merged.
2021-07-26 19:22:32 +00:00
William Banfield
c5dc3b267f test/fuzz: add test to reproduce found fuzz errors (#6757)
This change does two things:
1. It fixes the json fuzzer to account for receiving array results. Arrays are returned by the rpc server when the input data is an array.
2. Adds a `fuzz_test.go` file and corresponding `testdata` directory containing the failing test case.

This seems like a reasonable way to add and track previous crash issues in our fuzz test cases. The upcoming stdlib go fuzz tool does effectively this automatically.
2021-07-26 14:58:51 +00:00
dependabot[bot]
93f462ef86 build(deps): Bump codecov/codecov-action from 2.0.1 to 2.0.2 (#6764)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 2.0.1 to 2.0.2.
- [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.1...v2.0.2)

---
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>
Co-authored-by: Marko <marbar3778@yahoo.com>
2021-07-26 14:17:02 +00:00
Callum Waters
91e277d7b7 enable pex reactor depending on config param (#6762) 2021-07-26 15:22:12 +02:00
Callum Waters
a341a626e0 p2p: avoid blocking on the dequeCh (#6765) 2021-07-26 09:09:07 -04:00
William Banfield
c3ae6f5b58 p2p: add coverage for mConnConnection.TrySendMessage (#6754)
This change adds additional coverage to the `mConnConnection.TrySendMessage` code path. Adds test to ensure it returns `io.EOF` when closed.

Addresses: #6570
2021-07-23 17:29:19 +00:00
Aleksandr Bezobchuk
a393cf8bab internal: update blockchain reactor godoc (#6749) 2021-07-23 08:15:57 -04:00
Callum Waters
0e2752ae42 light: improve error handling and allow providers to be added (#6733) 2021-07-22 18:12:34 +02:00
Callum Waters
97a8f125e0 e2e: allow for both v0 and v1 mempool implementations (#6752) 2021-07-22 17:59:02 +02:00
William Banfield
84c15857e4 mempool: return mempool errors to the abci client (#6740)
This changes adds an `MempoolError` field to the `ResponseCheckTx`. This will allow clients to understand that their transaction was rejected from the mempool despite passing the ABCI check. 

This change also updates the code to make use of early returns to prevent highly nested code blocks. Namely, it returns when the type assertion fails at the beginning of the method, instead of wrapping the entire method in a large if statement. This has a somewhat large effect on the diff as rendered by github.

addresses: #3546
2021-07-22 14:52:29 +00:00
JayT106
e70445f942 statesync/event: emit statesync start/end event (#6700) 2021-07-22 08:16:50 +02:00
Sam Kleinman
478f5321ad light: run examples as integration tests (#6745) 2021-07-21 09:54:14 -04:00
Marko
08e4e2ed3d ignore issues for stale bot (#6747) 2021-07-21 10:39:16 +00:00
dependabot[bot]
7d63e991c5 build(deps): Bump codecov/codecov-action from 1.5.2 to 2.0.1 (#6739)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 1.5.2 to 2.0.1.
- [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/v1.5.2...v2.0.1)

---
updated-dependencies:
- dependency-name: codecov/codecov-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: Sam Kleinman <garen@tychoish.com>
2021-07-20 17:38:25 -04:00
Sam Kleinman
7638235d33 e2e: longer test harness timeouts (#6728) 2021-07-20 15:57:48 -04:00
Callum Waters
2abfe20114 e2e: prevent adding light clients as persistent peers (#6743) 2021-07-20 18:11:43 +00:00
William Banfield
0bf7813c4e fix makefile test target to rely on test makefile (#6746)
The Makefile at the root of the repo [includes](cd19ef244e/Makefile (L61)) the Makefile under the `test` package. This fix removes the target defined in the root Makefile in favor of the included one.
2021-07-20 18:00:51 +00:00
Sam Kleinman
ff9038e2ce e2e: run tests in fewer groups (#6742) 2021-07-20 13:45:08 -04:00
Sam Kleinman
00a40835a2 e2e: remove cartesian testing of ipv6 (#6734)
Having looked at our network address parsing and connection code, it
really looks like we're not doing anything on top of what the standard
library is doing (both in terms using `net.ParseIP` and also
`net.Dial`,) and I don't think we need to run the tests 2x the number
of times just to run through different areas of the standard
library. I think most of our users are going to be using IPv4, and
would be down to fully remove this dimension as well, if we find it's
making noise, but for now I think it's fine.
2021-07-20 15:47:35 +00:00
JayT106
c4f77ab6d1 fastsync/event: emit fastsync status event when switching consensus/fastsync (#6619)
closes #2498 
solves part of #3365

Note: difficult to test the event emit in SwitchToFastSync part, might need to change `stateSyncReactor` to an interface in the `nodeImpl` struct
2021-07-20 15:36:47 +00:00
Sam Kleinman
2030875056 e2e: drop single node hybrid configurations (#6737) 2021-07-20 11:23:51 -04:00
Sam Kleinman
639e145729 e2e: avoid systematic key-type variation (#6736) 2021-07-20 09:25:00 -04:00
Aleksandr Bezobchuk
68ffe8bc64 mempool: add TTL configuration to mempool (#6715) 2021-07-19 15:54:44 -04:00
William Banfield
21309ccb7b clist: add a few basic clist tests (#6727) 2021-07-19 14:02:21 +00:00
William Banfield
f70396c6fd add and run make target for generating existing mocks (#6732)
There are many `//go:generate mockery` lines in the source code.
This change adds a make target to invoke these mock generations.
This change also invokes the mock invocations and adds the resulting mocks to the repo.

Related to #5274
2021-07-18 00:46:04 +00:00
William Banfield
fdc246e4a8 libs/clist: revert clear and detach changes while debugging (#6731) 2021-07-17 12:10:53 -04:00