mergify[bot]
a2ca86a107
Extract a library from the confix command-line tool. ( #9012 ) ( #9024 )
...
(cherry picked from commit 18b5a500da )
Pull out the library functionality from scripts/confix and move it to
internal/libs/confix. Replace scripts/confix with a simple stub that has the
same command-line API, but uses the library instead.
Related:
- Move and update unit tests.
- Move scripts/confix/condiff to scripts/condiff.
- Update test data for v34, v35, and v36.
- Update reference diffs.
- Update testdata README.
Co-authored-by: M. J. Fromberger <fromberger@interchain.io >
2022-07-15 08:50:38 -07:00
mergify[bot]
318c3028f2
mempool: return error when mempool is full and inbound tx is rejected ( #8942 ) ( #8952 )
...
Addresses: https://github.com/tendermint/tendermint/issues/8928
(cherry picked from commit 27c523dccb )
2022-07-14 06:17:44 -07:00
mergify[bot]
6ad10114a8
p2p: make p2p.Channel an interface ( #8967 ) ( #8977 )
...
This is (#8446 ) pulled from the `main/libp2p` branch but without any
of the libp2p content, and is perhaps the easiest first step to enable
pluggability at the peer layer, and makes it possible hoist shims
(including for, say 0.34) into tendermint without touching the reactors.
(cherry picked from commit d5fb82e414 )
Co-authored-by: Sam Kleinman <garen@tychoish.com >
2022-07-12 07:51:48 -04:00
mergify[bot]
5fc52c7d8e
p2p: make peer gossiping coinflip safer ( #8949 ) ( #8964 )
...
Closes #8948
(cherry picked from commit 61ce384d75 )
Co-authored-by: Sam Kleinman <garen@tychoish.com >
2022-07-08 12:26:21 -04:00
mergify[bot]
df61cf0899
p2p: delete cruft ( #8958 ) ( #8960 )
...
I think the decision in #8806 is that we shouldn't do this yet, so I think it's best to just drop this.
(cherry picked from commit 636320f901 )
Co-authored-by: Sam Kleinman <garen@tychoish.com >
2022-07-07 15:18:29 -04:00
mergify[bot]
deb30f06c1
p2p: simpler priority queue ( #8929 ) ( #8957 )
...
(cherry picked from commit d1a16e8ff0 )
Co-authored-by: Sam Kleinman <garen@tychoish.com >
2022-07-07 12:39:51 -04:00
mergify[bot]
38b671a294
Work around indexing problem for duplicate transactions (forward port: #8625 ) ( #8945 ) ( #8951 )
...
Port the bug fix terra-money#76 to upstream. This is critical for ethermint json-rpc to work.
fix: prevent duplicate tx index if it succeeded before
fix: use CodeTypeOk instead of 0
fix: handle duplicate txs within the same block
Co-authored-by: jess jesse@soob.co
ref: #5281
Co-authored-by: M. J. Fromberger <fromberger@interchain.io >
(cherry picked from commit be6d74e657 )
Co-authored-by: yihuang <huang@crypto.com >
2022-07-06 14:33:26 -04:00
mergify[bot]
c9b2a0f401
Restore Commit to the ABCI++ spec, and other late modifications (backport #8796 ) ( #8936 )
...
* Restore `Commit` to the ABCI++ spec, and other late modifications (#8796 )
* Added VoteExtensionsEnableHeight
* Fix reference to `modified`
* Removed old pseudo-code, now included in spec
* Removed markdown warnings in abci++_basic_concepts_002_draft.md
* Restored `Commit` in the Methods section
* Addressed remaining markdown warnings
* Revisited intro and basic concepts section
* Extra pass at all spec sections to recover Commit, and other ABCI++ spec modifications
* Fixed links
* make proto-gen
* Remove _primes_ from spec notation
* Update proto/tendermint/abci/types.proto
Co-authored-by: Callum Waters <cmwaters19@gmail.com >
* Update spec/abci++/abci++_tmint_expected_behavior_002_draft.md
Co-authored-by: Callum Waters <cmwaters19@gmail.com >
* Addressed @cmwaters' comments
* Addressed @angbrav's and @mpoke's comments on spec
* make proto-gen
* Fix MD anchor reference
* Clarify throughout the spec when `ProcessProposal` and `VerifyVoteExtension` are called
* Update spec/abci++/abci++_app_requirements_002_draft.md
Co-authored-by: M. J. Fromberger <fromberger@interchain.io >
* Update spec/abci++/abci++_app_requirements_002_draft.md
Co-authored-by: M. J. Fromberger <fromberger@interchain.io >
* Update spec/abci++/abci++_app_requirements_002_draft.md
Co-authored-by: William Banfield <4561443+williambanfield@users.noreply.github.com >
* Update spec/abci++/abci++_basic_concepts_002_draft.md
Co-authored-by: William Banfield <4561443+williambanfield@users.noreply.github.com >
* Update spec/abci++/abci++_basic_concepts_002_draft.md
Co-authored-by: M. J. Fromberger <fromberger@interchain.io >
* Update spec/abci++/abci++_basic_concepts_002_draft.md
Co-authored-by: William Banfield <4561443+williambanfield@users.noreply.github.com >
* Update spec/abci++/abci++_methods_002_draft.md
Co-authored-by: M. J. Fromberger <fromberger@interchain.io >
* Update spec/abci++/abci++_tmint_expected_behavior_002_draft.md
Co-authored-by: William Banfield <4561443+williambanfield@users.noreply.github.com >
* Addresed comments
* Renamed 'draft' files
* Adatped links to new filenames
* Fixed links and minor cosmetic changes
* Renamed 'byzantine_validators' to 'misbehavior' in ABCI++ spec and protobufs
* make proto-gen
* Renamed 'byzantine_validators' to 'misbehavior' in the code
* Fixed link
* Update spec/abci++/abci++_basic_concepts.md
Co-authored-by: Daniel <daniel.cason@usi.ch >
* Update spec/abci++/abci++_basic_concepts.md
Co-authored-by: Daniel <daniel.cason@usi.ch >
* Update spec/abci++/abci++_basic_concepts.md
Co-authored-by: Daniel <daniel.cason@usi.ch >
* Update spec/abci++/abci++_basic_concepts.md
Co-authored-by: Daniel <daniel.cason@usi.ch >
* Update spec/abci++/abci++_basic_concepts.md
Co-authored-by: Daniel <daniel.cason@usi.ch >
* Update spec/abci++/abci++_basic_concepts.md
Co-authored-by: Daniel <daniel.cason@usi.ch >
* Update spec/abci++/abci++_basic_concepts.md
Co-authored-by: Daniel <daniel.cason@usi.ch >
* Update spec/abci++/abci++_basic_concepts.md
Co-authored-by: Daniel <daniel.cason@usi.ch >
* Update spec/abci++/abci++_basic_concepts.md
Co-authored-by: Daniel <daniel.cason@usi.ch >
* Update spec/abci++/abci++_basic_concepts.md
Co-authored-by: Daniel <daniel.cason@usi.ch >
* Update spec/abci++/abci++_basic_concepts.md
Co-authored-by: Daniel <daniel.cason@usi.ch >
* Update spec/abci++/abci++_basic_concepts.md
Co-authored-by: Daniel <daniel.cason@usi.ch >
* Update spec/abci++/abci++_basic_concepts.md
Co-authored-by: Daniel <daniel.cason@usi.ch >
* Update spec/abci++/abci++_basic_concepts.md
Co-authored-by: Daniel <daniel.cason@usi.ch >
* Update spec/abci++/abci++_basic_concepts.md
Co-authored-by: Daniel <daniel.cason@usi.ch >
* Update spec/abci++/abci++_basic_concepts.md
Co-authored-by: Daniel <daniel.cason@usi.ch >
* Update spec/abci++/abci++_basic_concepts.md
Co-authored-by: Daniel <daniel.cason@usi.ch >
* Update spec/abci++/abci++_basic_concepts.md
Co-authored-by: Daniel <daniel.cason@usi.ch >
* Update spec/abci++/abci++_basic_concepts.md
Co-authored-by: Daniel <daniel.cason@usi.ch >
* Update spec/abci++/abci++_basic_concepts.md
Co-authored-by: Daniel <daniel.cason@usi.ch >
* Update spec/abci++/abci++_basic_concepts.md
Co-authored-by: Daniel <daniel.cason@usi.ch >
* Update spec/abci++/abci++_basic_concepts.md
Co-authored-by: Daniel <daniel.cason@usi.ch >
* Update spec/abci++/abci++_methods.md
Co-authored-by: Daniel <daniel.cason@usi.ch >
* Update spec/abci++/abci++_methods.md
Co-authored-by: Daniel <daniel.cason@usi.ch >
* Update spec/abci++/abci++_methods.md
Co-authored-by: Daniel <daniel.cason@usi.ch >
* Update spec/abci++/abci++_methods.md
Co-authored-by: Daniel <daniel.cason@usi.ch >
* Update spec/abci++/abci++_methods.md
Co-authored-by: Daniel <daniel.cason@usi.ch >
* Update spec/abci++/abci++_methods.md
Co-authored-by: Daniel <daniel.cason@usi.ch >
* Update spec/abci++/abci++_methods.md
Co-authored-by: Daniel <daniel.cason@usi.ch >
* Update spec/abci++/abci++_methods.md
Co-authored-by: Daniel <daniel.cason@usi.ch >
* Update spec/abci++/abci++_methods.md
Co-authored-by: Daniel <daniel.cason@usi.ch >
* Update spec/abci++/abci++_methods.md
Co-authored-by: Daniel <daniel.cason@usi.ch >
* Update spec/abci++/abci++_methods.md
Co-authored-by: Daniel <daniel.cason@usi.ch >
* Update spec/abci++/abci++_methods.md
Co-authored-by: Daniel <daniel.cason@usi.ch >
* Update spec/abci++/abci++_methods.md
Co-authored-by: Daniel <daniel.cason@usi.ch >
* Update spec/abci++/abci++_methods.md
Co-authored-by: Daniel <daniel.cason@usi.ch >
* Update spec/abci++/abci++_methods.md
Co-authored-by: Daniel <daniel.cason@usi.ch >
* Update spec/abci++/abci++_methods.md
Co-authored-by: Daniel <daniel.cason@usi.ch >
* Update spec/abci++/abci++_methods.md
Co-authored-by: Daniel <daniel.cason@usi.ch >
* Update spec/abci++/abci++_methods.md
Co-authored-by: Daniel <daniel.cason@usi.ch >
* Update spec/abci++/abci++_methods.md
Co-authored-by: Daniel <daniel.cason@usi.ch >
* Update spec/abci++/abci++_methods.md
Co-authored-by: Daniel <daniel.cason@usi.ch >
* Update spec/abci++/abci++_methods.md
Co-authored-by: Daniel <daniel.cason@usi.ch >
* Update spec/abci++/abci++_methods.md
Co-authored-by: Daniel <daniel.cason@usi.ch >
* Update spec/abci++/abci++_methods.md
Co-authored-by: Daniel <daniel.cason@usi.ch >
* Update spec/abci++/abci++_methods.md
Co-authored-by: Daniel <daniel.cason@usi.ch >
* Update spec/abci++/abci++_methods.md
Co-authored-by: Daniel <daniel.cason@usi.ch >
* Update spec/abci++/abci++_methods.md
Co-authored-by: Daniel <daniel.cason@usi.ch >
* Update spec/abci++/abci++_methods.md
Co-authored-by: Daniel <daniel.cason@usi.ch >
* Update spec/abci++/abci++_methods.md
Co-authored-by: Daniel <daniel.cason@usi.ch >
* Addressed @cason's comments
* Clarified conditions for `ProcessProposal` call at proposer
Co-authored-by: Callum Waters <cmwaters19@gmail.com >
Co-authored-by: M. J. Fromberger <fromberger@interchain.io >
Co-authored-by: William Banfield <4561443+williambanfield@users.noreply.github.com >
Co-authored-by: Daniel <daniel.cason@usi.ch >
(cherry picked from commit 331860c2a8 )
# Conflicts:
# docs/rfc/rfc-013-abci++.md
# docs/tools/debugging/proposer-based-timestamps-runbook.md
* Fixed merge conflicts
Co-authored-by: Sergio Mena <sergio@informal.systems >
2022-07-04 20:19:24 +02:00
mergify[bot]
7e2defb24a
p2p: fix typo ( #8922 ) ( #8927 )
...
Fix minor typos in peermanager
(cherry picked from commit 1d96faa35a )
Co-authored-by: Ian Jungyong Um <31336310+code0xff@users.noreply.github.com >
Co-authored-by: Sam Kleinman <garen@tychoish.com >
2022-07-01 10:26:12 -04:00
mergify[bot]
171985df2a
p2p: use correct context error ( #8916 ) ( #8921 )
...
handshakeCtx is the internal context carrying the timeout. Its error should be used for the error return.
(cherry picked from commit 921530c352 )
Co-authored-by: William Banfield <4561443+williambanfield@users.noreply.github.com >
2022-06-30 18:20:43 -04:00
mergify[bot]
68691935c8
p2p: fix flakey test due to disconnect cooldown ( #8917 ) ( #8919 )
...
This test was made flakey by #8839 . The cooldown period means that the node in the test will not try to reconnect as quickly as the test expects. This change makes the cooldown shorter in the test so that the node quickly reconnects.
(cherry picked from commit 5274f80de4 )
Co-authored-by: William Banfield <4561443+williambanfield@users.noreply.github.com >
2022-06-30 18:01:18 -04:00
mergify[bot]
8dc08b3ab3
p2p: stop mconn channel sends without timeout ( #8906 ) ( #8911 )
...
(cherry picked from commit 60881f1d06 )
Co-authored-by: Sam Kleinman <garen@tychoish.com >
2022-06-30 09:12:36 -04:00
mergify[bot]
ed7f51460b
libs/strings: move to internal ( #8890 ) ( #8891 )
2022-06-27 18:27:46 -04:00
mergify[bot]
b483058898
p2p: remove dial sleep and provide disconnect cooldown (backport #8839 ) ( #8876 )
...
* p2p: remove dial sleep and provide disconnect cooldown (#8839 )
Alternative proposal for #8826
(cherry picked from commit 52b6dc19ba )
# Conflicts:
# internal/p2p/router.go
* fix merge
Co-authored-by: Sam Kleinman <garen@tychoish.com >
2022-06-24 16:35:27 -04:00
William Banfield
3f1404257d
p2p: set empty timeouts to small values. (manual backport of #8847 ) ( #8868 )
...
These timeouts default to 'do not time out' if they are not set. This times up resources, potentially indefinitely. If node on the other side of the the handshake is up but unresponsive, the[ handshake call](edec79448a/internal/p2p/router.go (L720) ) will _never_ return.
This change wires up the values from the config file so that they are actually used.
2022-06-24 10:52:07 -04:00
mergify[bot]
14b14989f7
p2p: track peers by address ( #8841 ) ( #8856 )
...
(cherry picked from commit 436a38f876 )
Co-authored-by: Sam Kleinman <garen@tychoish.com >
2022-06-23 10:34:59 -04:00
mergify[bot]
464f54d145
p2p: more dial routines ( #8827 ) ( #8829 )
2022-06-21 21:27:42 -04:00
mergify[bot]
54d9874828
p2p: add eviction metrics and cleanup dialing error handling ( #8819 ) ( #8821 )
...
(cherry picked from commit cfd13825e2 )
Co-authored-by: Sam Kleinman <garen@tychoish.com >
2022-06-21 16:52:17 -07:00
mergify[bot]
1b872d768b
p2p: wake dialing thread after sleep ( #8803 ) ( #8804 )
...
(cherry picked from commit 28d3239958 )
Co-authored-by: Sam Kleinman <garen@tychoish.com >
2022-06-20 12:40:00 -04:00
mergify[bot]
fb794b1ce5
p2p: fix typo ( #8793 ) ( #8795 )
2022-06-19 11:52:57 -07:00
mergify[bot]
74f3e15dc9
p2p: peer score should not wrap around ( #8790 ) ( #8792 )
...
(cherry picked from commit 4d820ff4f5 )
Co-authored-by: Sam Kleinman <garen@tychoish.com >
2022-06-17 20:41:55 -04:00
mergify[bot]
c29c667c99
p2p: track peers stored on startup ( #8787 ) ( #8788 )
...
(cherry picked from commit 0ac03468d8 )
Co-authored-by: Sam Kleinman <garen@tychoish.com >
2022-06-17 15:49:04 -04:00
mergify[bot]
7e7a2535c6
p2p: peer store and dialing changes ( #8737 ) ( #8784 )
...
(cherry picked from commit 9e5b13725d )
Co-authored-by: Sam Kleinman <garen@tychoish.com >
2022-06-17 08:26:03 -04:00
mergify[bot]
10a39d6b91
p2p: fix mconn transport accept test ( #8762 ) ( #8763 )
...
Fix minor test incongruency missed earlier.
(cherry picked from commit 51b3f111dc )
Co-authored-by: Sam Kleinman <garen@tychoish.com >
2022-06-14 20:19:59 -04:00
mergify[bot]
1e2d37d6a4
p2p: accept should not abort on first error ( #8759 ) ( #8761 )
...
(cherry picked from commit 979a6a1b13 )
Co-authored-by: Sam Kleinman <garen@tychoish.com >
2022-06-14 19:27:47 -04:00
mergify[bot]
c368abceab
Revert "p2p: self-add node should not error (tendermint#8753)" ( #8757 ) ( #8758 )
...
(cherry picked from commit bf1cb89bb7 )
Co-authored-by: Sam Kleinman <garen@tychoish.com >
2022-06-14 17:08:35 -04:00
mergify[bot]
7335278479
p2p: self-add node should not error ( #8753 ) ( #8756 )
...
(cherry picked from commit 7971f4a2fc )
Co-authored-by: Sam Kleinman <garen@tychoish.com >
2022-06-14 13:01:23 -04:00
William Banfield
75a12ea0c6
consensus: switch timeout message to be debug and clarify meaning ( #8694 )
2022-06-03 13:46:10 -04:00
Sergio Mena
ce6485fa70
Remove the abci responses type - prune legacy responses ( #8673 )
...
Closes #8069
* Type `ABCIResponses` was just wrapping type `ResponseFinalizeBlock`. This patch removes the former.
* Did some renaming to avoid confusion on the data structure we are working with.
* We also remove any stale ABCIResponses we may have in the state store at the time of pruning
**IMPORTANT**: There is an undesirable side-effect of the unwrapping. An empty `ResponseFinalizeBlock` yields a 0-length proto-buf serialized buffer. This was not the case with `ABCIResponses`. I have added an interim solution, but open for suggestions on more elegant ones.
2022-06-02 19:13:08 +00:00
Sam Kleinman
666d93338a
p2p: shed peers from store from other networks ( #8678 )
2022-06-02 11:14:25 -04:00
Sergio Mena
56fc80d66d
abci: Move app_hash parameter from Commit to FinalizeBlock ( #8664 )
...
* Removed from proto
* make proto-gen
* make build works
* make some tests pass
* Fix TestMempoolTxConcurrentWithCommit
* Minor change
* Update abci/types/types.go
* Update internal/state/execution.go
* Update test/e2e/app/state.go
Co-authored-by: Callum Waters <cmwaters19@gmail.com >
* Updated changelog and `UPGRADING.md`
* Fixed abci-cli tests, and doc
* Addressed @cmwaters' comments
* Addressed @cmwaters' comments, part 2
Co-authored-by: Callum Waters <cmwaters19@gmail.com >
2022-06-01 18:53:10 +02:00
Sam Kleinman
d2ca0b868d
consensus: gossip catchup sleeping protocol ( #8652 )
2022-06-01 10:17:17 +00:00
Sam Kleinman
bc24ae4642
rpc: deprecate/updates to broadcast tx ( #8624 )
2022-05-26 08:28:28 -04:00
Jasmina Malicevic
cb9722c2b0
abci: strip mempoolerror from responsechectx ( #8620 )
...
* abci:mempoolError from ResponseCheckTx
* responseCheckTx returns an error if Tendermint decides not to accept an app after CheckTx
*updated spec, upgrading.md and changelog.md
2022-05-26 11:18:27 +02:00
Callum Waters
b0ec8a0ea7
mempool: migrate rechecktx to be a consensus parameter ( #8514 )
2022-05-25 23:57:23 +02:00
Jasmina Malicevic
4c857a7ed2
abci: remove unused fields from CheckTXResponse (part 1) ( #8605 )
...
abci: Removed Info, Log, Events and GasUsed from ResponseCheckTx.
spec: Updated info on ResponseCheckTx to reflect field removal.
2022-05-25 23:06:16 +02:00
M. J. Fromberger
a988cefe5d
Update generated mocks after #8607 . ( #8612 )
2022-05-25 15:48:56 +00:00
Sam Kleinman
d59a53be01
p2p: reduce ability of SendError to disconnect peers ( #8597 )
2022-05-24 11:19:32 -04:00
William Banfield
43313e9b85
abci++: add proto fields for enabling vote extensions ( #8587 )
...
This pull requests adds the protocol buffer field for the `ABCI.VoteExtensionsEnableHeight` parameter. This proto field is threaded throughout all of the relevant places where consensus params are used and referenced.
This PR also adds validation of the consensus param updates. Previous consensus param changes didn't depend on _previous_ versions of the params, so this change adds a method for validating against the old params as well.
closes : #8453
2022-05-23 18:23:23 +00:00
William Banfield
0cceadf4d4
abci++: add consensus parameter logic to control vote extension require height ( #8547 )
...
This PR makes vote extensions optional within Tendermint. A new ConsensusParams field, called ABCIParams.VoteExtensionsEnableHeight, has been added to toggle whether or not extensions should be enabled or disabled depending on the current height of the consensus engine. Related to: #8453
2022-05-20 17:46:52 -04:00
William Banfield
ad73e6da2f
consensus: update state from store before use in reactor ( #8576 )
...
Closes : #8575
This PR aims to fix the `LastCommitRound can only be negative for initial height 0` issue we see in the e2e tests by initializing the `state` object before starting the receive routines in the consensus reactor. This is somewhat inelegant, but it should fix the issue.
2022-05-19 19:35:30 +00:00
M. J. Fromberger
4a9bbe047f
Fix lock sequencing in socket client request tracking. ( #8581 )
...
* Fix lock sequencing in socket client request tracking.
It is not safe to check base service state (IsRunning) while holding the lock
for the client state. If we do, then during shutdown we may deadlock with the
invocation of the OnStop handler, which the base service executes while holding
the service lock.
* Enqueue pending requests before sending them to the server.
If we don't do this, the server can reply before the request lands in the
queue. That will cause the receiver to terminate early for an unsolicited
response. So enqueue first: This is safe because we're doing it in the same
routine as services the channel, so we won't take another message till we are
safely past that point.
* Document what we did.
* Fix socket paths in tests.
2022-05-19 12:11:57 -07:00
M. J. Fromberger
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
M. J. Fromberger
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 Kleinman
2897b75853
p2p: remove unused get height methods ( #8569 )
2022-05-17 10:56:26 -04:00
Sam Kleinman
42e5924662
mempool: do not continue checking transactions if context was cacneled ( #8549 )
2022-05-14 08:27:53 -04:00
M. J. Fromberger
9c9a4140d9
chore: update generated mocks ( #8546 )
2022-05-13 12:27:10 -07:00
William Banfield
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. Fromberger
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
Thane Thomson
06b1812094
abci++: Propagate vote extensions (RFC 017) ( #8433 )
...
* Add protos for ExtendedCommit
Cherry-pick from e73f0178b72a16ee81f8e856aadf651f2c62ec6e just the
changes to the .proto files, since we have deleted the .intermediate
files.
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* make proto-gen
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* BlockStore holds extended commit
Cherry-pick 8d504d4b50ec6afbdffe2df7ababbef30e15053d and fix conflicts.
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Reshuffle ExtendedCommit and ExtendedCommitSig
Separate the data structures and functions from their Commit-oriented
counterparts to adhere to the current coding style.
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Fix exit condition in blocksync
* Add note to remove TxResult proto
As Sergio pointed out in 3e31aa6f583cdc71e208ed03a82f1d804ec0de49, this
proto message can probably be removed. We should do this in a separate
PR.
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Lift termination condition into for loop
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Enforce vote extension signature requirement
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Expand on comment for PeekTwoBlocks for posterity
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Isolate TODO more clearly
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* make mockery
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Fix comment
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Make panic output from BlockStore.SaveBlock more readable
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Add helper methods to ExtendedCommitSig and ExtendedCommit
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Fix most tests except TestHandshake*
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Fix store prefix collision
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Fix TestBlockFetchAtHeight
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Remove global state from store tests
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Apply suggestions from code review
Co-authored-by: M. J. Fromberger <fromberger@interchain.io >
Co-authored-by: Sergio Mena <sergio@informal.systems >
* blocksync: Just return error
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* make format
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* types: Remove unused/commented-out code
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* blocksync: Change pool AddBlock function signature to return errors
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* types: Improve legibility of switch statements
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* blocksync: Expand on extended commit requirement in AddBlock description
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* blocksync: Return error without also logging it
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* consensus: Rename short-lived local variable
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* consensus: Allocate TODO to Sergio
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* evidence/pool_test: Inline slice construction
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* state: Rename LoadBlockExtCommit to LoadBlockExtendedCommit
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* proto: Remove TODO on TxResult
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* types: Minor format
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* types: Reformat ExtendedCommitSig.BlockID
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* types: Remove NewExtendedCommit constructor
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* types: Remove NewCommit constructor
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* types: Shorten receiver names for ExtendedCommit
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* types: Convert ExtendedCommit.Copy to a deep clone
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* types: Assign TODO to Sergio
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* types: Fix legibility nits
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* types: Improve legibility
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* store/state: Add TODO to move prefixes to common package
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Propagate validator info to PrepareProposal
In order to propagate validator voting power through to PrepareProposal,
we need to load the validator set info from the height corresponding to
the extended commit that we're passing through to PrepareProposal as the
"LocalLastCommit".
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Rename local var for clarity
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Fix TestMaxProposalBlockSize
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Rename local var for clarity
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Remove debug log
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Remove CommigSig.ForBlock helper
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Remove CommigSig.Absent helper
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Remove ExtendedCommitSig.ForBlock helper
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Remove ExtendedCommitSig.Absent helper
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* There are no extended commits below the initial height
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Fix comment grammar
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Remove JSON encoding from ExtendedCommit
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Embed CommitSig into ExtendedCommitSig instead of duplicating fields
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Rename ExtendedCommit vote_extension field to extension for consistency with domain types
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* blocksync: Panic if we peek a block without an extended commit
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Apply suggestions from code review
Co-authored-by: M. J. Fromberger <fromberger@interchain.io >
* Remove Sergio from TODO
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Increase hard-coded vote extension max size to 1MB
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* state: Remove unnecessary comment
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* state: Ensure no of commit sigs equals validator set length
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* make format
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* types: Minor legibility improvements
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Improve legibility
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* types: Remove unused GetVotes function on VoteSet
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Refactor TestMaxProposalBlockSize to construct more realistic extended commit
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Refactor buildExtendedCommitInfo to resemble buildLastCommitInfo
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Apply suggestions from code review
Co-authored-by: M. J. Fromberger <fromberger@interchain.io >
* abci++: Disable VerifyVoteExtension call on nil precommits (#8491 )
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* types: Require vote extensions on non-nil precommits and not otherwise
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Disable lint
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Increase timeout for TestReactorVotingPowerChange to counter flakiness
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Only sign and verify vote extensions in non-nil precommits
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Revert "Disable lint"
This reverts commit 6fffbf9402 .
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Add missing non-nil check uncovered non-deterministically in TestHandshakeReplayAll
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Expand error message for accuracy
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Only call ExtendVote when we make non-nil precommits
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Revert "Increase timeout for TestReactorVotingPowerChange to counter flakiness"
This reverts commit af514939db .
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Refactor ValidateBasic for ExtendedCommitSig for legibility
Signed-off-by: Thane Thomson <connect@thanethomson.com >
Co-authored-by: Sergio Mena <sergio@informal.systems >
Co-authored-by: M. J. Fromberger <fromberger@interchain.io >
2022-05-11 07:10:32 -04:00