Commit Graph
442 Commits
Author SHA1 Message Date
William Banfield 4e05b5f108 ensure extensions on extended commit save 2022-05-19 12:31:50 -04:00
05d930f40a Update internal/blocksync/reactor.go
Co-authored-by: Sergio Mena <sergio@informal.systems>
2022-05-19 10:07:46 -04:00
William Banfield 10078f39d6 add nil check for block load 2022-05-18 16:53:55 -04:00
William Banfield 4194d4da46 comment proposal extensions validation 2022-05-18 14:46:00 -04:00
William Banfield f50ac0e8ea add state check on peer response 2022-05-18 14:37:03 -04:00
William Banfield 4da32ea146 update and document new logic for bailing out of blocksync 2022-05-18 14:07:39 -04:00
William Banfield beb6c47e29 lint fix 2022-05-17 23:10:25 -04:00
William Banfield cbd211a173 fix broken block store test 2022-05-17 22:37:04 -04:00
William Banfield 0c4a49600b remove unused store code 2022-05-17 22:36:13 -04:00
William Banfield 98f614a614 use current block height as parameter in blocksync 2022-05-17 21:49:58 -04:00
William Banfield 6f577fa389 try commit and extcommit in blocksync response 2022-05-17 21:38:44 -04:00
William Banfield 4ceead171b document new blockstore methods 2022-05-17 20:46:41 -04:00
William Banfield 588a310049 separate extended commit save 2022-05-17 20:37:59 -04:00
William BanfieldandGitHub c3686fea00 Merge branch 'master' into wb/add-consensus-param-internal 2022-05-17 17:02:29 -04:00
William Banfield dc253a8196 remove unnecessary assignment in proposal test 2022-05-17 16:39:46 -04:00
William Banfield 9e9f3a1433 strip extensions in consensus 2022-05-17 16:35:24 -04:00
William Banfield 931e897c6a fix node test 2022-05-17 15:40:50 -04:00
William Banfield d92b63b85f fix evidence tests 2022-05-17 15:35:21 -04:00
William Banfield 2e1f5bdbcd fix hvs test 2022-05-17 15:29:43 -04:00
William Banfield 5d84aaf7d4 fix tests to store and load state 2022-05-17 15:06:35 -04:00
William Banfield 5dc8a1fac0 hack to not generate protos yet 2022-05-17 15:06:17 -04:00
M. J. FrombergerandGitHub 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
William Banfield 351b3bf6b0 tentative change for preventing blocksync early bail out 2022-05-17 12:24:43 -04:00
M. J. FrombergerandGitHub 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 KleinmanandGitHub 2897b75853 p2p: remove unused get height methods (#8569) 2022-05-17 10:56:26 -04:00
William Banfield 42b9c99c93 add check for blockid flag is commit 2022-05-17 10:40:36 -04:00
William Banfield ff7955470a update proposal tests to ensure off-by-one is correctly handled 2022-05-17 10:28:35 -04:00
William Banfield ae6b910427 log if extension data present 2022-05-17 10:17:20 -04:00
William Banfield 603381ca2b update vote reconstruction logic to force extended commit if extension enabled 2022-05-17 10:12:56 -04:00
William Banfield 93ea3d0b7d strip extensions in blocksync 2022-05-16 19:20:08 -04:00
William Banfield 44f1f045e2 update the VoteSet methods to only validate extensions when enabled 2022-05-16 19:08:34 -04:00
William Banfield 78c0c9c6ce strip vote extensions in the reactor 2022-05-16 18:25:07 -04:00
William Banfield b51b83a250 change prepare proposal to use enable extension logic 2022-05-16 18:00:25 -04:00
William Banfield 397f0840f6 do not call extension methods when not enabled 2022-05-16 17:13:14 -04:00
William Banfield 32790dedfc do not verify extension if not enabled 2022-05-16 17:02:43 -04:00
William Banfield 589d4030ce rename vote extension param 2022-05-16 16:46:17 -04:00
17d5e71489 Update internal/consensus/state.go
Co-authored-by: Sergio Mena <sergio@informal.systems>
2022-05-16 15:29:49 -04:00
William Banfield f5cd75c090 shorter timeout in SwitchToConsensus test 2022-05-16 11:39:01 -04:00
William Banfield 19cc03f6fd addr -> myAddr 2022-05-16 11:38:23 -04:00
cb2f3624da Update internal/consensus/state.go
Co-authored-by: M. J. Fromberger <fromberger@interchain.io>
2022-05-16 11:36:01 -04:00
d3c9ab64b5 Update internal/consensus/state.go
Co-authored-by: M. J. Fromberger <fromberger@interchain.io>
2022-05-16 11:35:49 -04:00
William Banfield c2f543bebb update heightvoteset constructor for strict vs non strict 2022-05-16 11:27:45 -04:00
William Banfield bd26649455 change voteset constructor to strict vs non strict 2022-05-16 11:24:43 -04:00
William BanfieldandGitHub e80d2bd494 Merge branch 'master' into wb/add-consensus-param-internal 2022-05-15 23:27:32 -04:00
William Banfield 9d6e0235e9 comment fixup 2022-05-15 23:26:55 -04:00
William Banfield f1db90affe abci++: add consensus parameter to control vote extension require height 2022-05-15 23:22:34 -04:00
Sam KleinmanandGitHub 42e5924662 mempool: do not continue checking transactions if context was cacneled (#8549) 2022-05-14 08:27:53 -04:00
M. J. FrombergerandGitHub 9c9a4140d9 chore: update generated mocks (#8546) 2022-05-13 12:27:10 -07:00
William BanfieldandGitHub 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. FrombergerandGitHub 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