Commit Graph

9568 Commits

Author SHA1 Message Date
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
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
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
JayT106
97d47b5263 mempool: IDs issue fixes (#7763) 2022-02-03 15:04:59 -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
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
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
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