Callum Waters and GitHub
27c523dccb
mempool: return error when mempool is full and inbound tx is rejected ( #8942 )
...
Addresses: https://github.com/tendermint/tendermint/issues/8928
2022-07-06 18:17:56 +00:00
be6d74e657
Work around indexing problem for duplicate transactions (forward port: #8625 ) ( #8945 )
...
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 >
2022-07-06 14:05:48 -04:00
331860c2a8
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 >
2022-07-04 16:25:48 +02:00
Ian Jungyong Um and GitHub
1d96faa35a
p2p: fix typo ( #8922 )
...
Fix minor typos in peermanager
2022-07-01 12:44:39 +00:00
William Banfield and GitHub
921530c352
p2p: use correct context error ( #8916 )
...
handshakeCtx is the internal context carrying the timeout. Its error should be used for the error return.
2022-06-30 22:02:59 +00:00
William Banfield and GitHub
5274f80de4
p2p: fix flakey test due to disconnect cooldown ( #8917 )
...
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.
2022-06-30 21:48:10 +00:00
Sam Kleinman and GitHub
60881f1d06
p2p: stop mconn channel sends without timeout ( #8906 )
2022-06-30 09:01:02 -04:00
Sam Kleinman and GitHub
013b46a6c3
libs/strings: move to internal ( #8890 )
...
I think we were leaving this library public because the SDK dependend
upon it, but the function the SDK was using was one that we'd removed
because *we* weren't using it any more, and I made a PR agasint the
SDK to clean that up.
ref: https://github.com/cosmos/cosmos-sdk/pull/12368
2022-06-27 21:44:50 +00:00
Sam Kleinman and GitHub
52b6dc19ba
p2p: remove dial sleep and provide disconnect cooldown ( #8839 )
...
Alternative proposal for #8826
2022-06-24 17:57:49 +00:00
William Banfield and GitHub
5f5e74798b
p2p: set empty timeouts to small values. ( #8847 )
...
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](https://github.com/tendermint/tendermint/blob/edec79448aa1d62b84683b1b22e12e145dbdda7c/internal/p2p/router.go#L720 ) will _never_ return.
These are proposed values that have not been validated. I intend to validate them in a production setting.
2022-06-23 22:33:21 +00:00
Sam Kleinman and GitHub
436a38f876
p2p: track peers by address ( #8841 )
2022-06-23 10:03:10 -04:00
Ian Jungyong Um and GitHub
2e11760fbe
p2p: fix typo ( #8836 )
2022-06-22 09:30:11 +02:00
William Banfield and GitHub
8860e027a8
p2p: more dial routines ( #8827 )
...
The dial routines perform network i/o, which is a blocking call into the kernel. These routines are completely unable to do anything else while the dial occurs, so for most of their lifecycle they are sitting idle waiting for the tcp stack to hand them data. We should increase this value by _a lot_ to enable more concurrent dials. This is unlikely to cause CPU starvation because these routines sit idle most of the time. The current value causes dials to occur _way_ too slowly.
Below is a graph demonstrating the before and after of this change in a testnetwork with many dead peers. You can observe that the rate that we connect to new, valid peers, is _much_ higher than previously. Change was deployed around the 31 minute mark on the graph.

2022-06-22 00:51:09 +00:00
Sam Kleinman and GitHub
cfd13825e2
p2p: add eviction metrics and cleanup dialing error handling ( #8819 )
2022-06-21 20:44:14 +00:00
Sam Kleinman and GitHub
28d3239958
p2p: wake dialing thread after sleep ( #8803 )
2022-06-20 15:47:56 +00:00
Ian Jungyong Um and GitHub
e3e162ff10
p2p: fix typo ( #8793 )
...
Fix the typo in router
2022-06-19 15:26:25 +00:00
Sam Kleinman and GitHub
4d820ff4f5
p2p: peer score should not wrap around ( #8790 )
2022-06-17 22:27:38 +00:00
Sam Kleinman and GitHub
0ac03468d8
p2p: track peers stored on startup ( #8787 )
2022-06-17 18:10:10 +00:00
Sam Kleinman and GitHub
9e5b13725d
p2p: peer store and dialing changes ( #8737 )
2022-06-17 08:02:10 -04:00
Sergio Mena and GitHub
a4f29bfd44
Don't check PBTS-timeliness when in replay mode ( #8774 )
...
Closes #8781
Temporary fix to this issue, so that e2e tests don't fail and potentially leave other problems uncovered.
2022-06-16 19:31:17 +00:00
Sam Kleinman and GitHub
51b3f111dc
p2p: fix mconn transport accept test ( #8762 )
...
Fix minor test incongruency missed earlier.
2022-06-14 23:48:48 +00:00
Sam Kleinman and GitHub
979a6a1b13
p2p: accept should not abort on first error ( #8759 )
2022-06-14 19:12:53 -04:00
Sam Kleinman and GitHub
bf1cb89bb7
Revert "p2p: self-add node should not error (tendermint#8753)" ( #8757 )
2022-06-14 20:55:10 +00:00
Sam Kleinman and GitHub
7971f4a2fc
p2p: self-add node should not error ( #8753 )
2022-06-14 16:45:05 +00:00
Jeeyong Um and GitHub
a4cf8939b8
mempool: fix error message check in test ( #8750 )
2022-06-14 06:54:35 -04:00
Jeeyong Um and GitHub
21bbbe3e2a
mempool: fix typos in test ( #8746 )
2022-06-14 10:50:55 +02:00
Marko and GitHub
82907c84fa
sink/psql: json marshal instead of proto ( #8637 )
...
Storing transaction records as JSON makes it simpler for clients of the index.
2022-06-13 10:20:54 -07:00
William Banfield and GitHub
75a12ea0c6
consensus: switch timeout message to be debug and clarify meaning ( #8694 )
2022-06-03 13:46:10 -04:00
Sergio Mena and GitHub
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 and GitHub
666d93338a
p2p: shed peers from store from other networks ( #8678 )
2022-06-02 11:14:25 -04:00
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 and GitHub
d2ca0b868d
consensus: gossip catchup sleeping protocol ( #8652 )
2022-06-01 10:17:17 +00:00
Sam Kleinman and GitHub
bc24ae4642
rpc: deprecate/updates to broadcast tx ( #8624 )
2022-05-26 08:28:28 -04:00
Jasmina Malicevic and GitHub
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 and GitHub
b0ec8a0ea7
mempool: migrate rechecktx to be a consensus parameter ( #8514 )
2022-05-25 23:57:23 +02:00
Jasmina Malicevic and GitHub
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 and GitHub
a988cefe5d
Update generated mocks after #8607 . ( #8612 )
2022-05-25 15:48:56 +00:00
Sam Kleinman and GitHub
d59a53be01
p2p: reduce ability of SendError to disconnect peers ( #8597 )
2022-05-24 11:19:32 -04:00
William Banfield and GitHub
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 and GitHub
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 and GitHub
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 and GitHub
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 and GitHub
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 and GitHub
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 and GitHub
2897b75853
p2p: remove unused get height methods ( #8569 )
2022-05-17 10:56:26 -04:00
Sam Kleinman and GitHub
42e5924662
mempool: do not continue checking transactions if context was cacneled ( #8549 )
2022-05-14 08:27:53 -04:00
M. J. Fromberger and GitHub
9c9a4140d9
chore: update generated mocks ( #8546 )
2022-05-13 12:27:10 -07:00
William Banfield and GitHub
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 and GitHub
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
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