This changes the ResponsePrepareProposal type, substituting the []TxRecord for just []bytes. This change is made in the .proto file and in all necessary additional places in the code.
* [cherrypicked] abci++: only include meaningful header fields in data passed-through to application (#8216)
* make proto-gen
* Fix kvstore tests
* Small changes to abci protobufs taken from v0.36.x
* make proto-gen (again)
* [Partial cherrypick] 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)
* Fixed merge conflicts
Co-authored-by: Sergio Mena <sergio@informal.systems>
* make proto-gen (and again)
* make build
* fix UTs
Co-authored-by: William Banfield <4561443+williambanfield@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
The `mockery` project recommends against using a binary of `mockery` that has been created using `go install`. https://github.com/vektra/mockery/pull/456. Developers of Tendermint wishing to generate mocks should avoid having a version of `mockery` on their path that does not match the version listed in [mockery_generate.sh](10e1ac8fea/scripts/mockery_generate.sh (L11)). To make this easier for developers, the `mockery_generate.sh` script uses a containerized copy of `mockery` if `mockery` is not present on the developer's `PATH`. This containerized version of `mockery` uses the same version of mockery as our CI pipelines and allows all developers to automatically use the same version without having to manage it themselves.
#### PR checklist
- [ ] Tests written/updated, or no tests needed
- [ ] `CHANGELOG_PENDING.md` updated, or no changelog entry needed
- [ ] Updated relevant documentation (`docs/`) and code comments, or no
documentation updates needed
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 `main`, we can see that there is a minimal diff between the two sets of metrics when run locally. The diff here stems from removal of the word 'message' which was done in v0.36+ and is ultimately a better phrasing. This metric has not yet been released, so this phrasing is preferred.
```
./metricsdiff old new
Metric changes:
+++ tendermint_consensus_full_prevote_delay
+++ tendermint_consensus_quorum_prevote_delay
--- tendermint_consensus_full_prevote_message_delay
--- tendermint_consensus_quorum_prevote_message_delay
```
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.
In my view, docs and tests are not needed for this internal only change.
---
#### PR checklist
- [ ] Tests written/updated, or no tests needed
- [ ] `CHANGELOG_PENDING.md` updated, or no changelog entry needed
- [ ] Updated relevant documentation (`docs/`) and code comments, or no
documentation updates needed
Ports #8488 to main
* internal/proxy: add initial set of abci metrics (#7115)
This PR adds an initial set of metrics for use ABCI. The initial metrics enable the calculation of timing histograms and call counts for each of the ABCI methods. The metrics are also labeled as either 'sync' or 'async' to determine if the method call was performed using ABCI's `*Async` methods.
An example of these metrics is included here for reference:
```
tendermint_abci_connection_method_timing_bucket{chain_id="ci",method="commit",type="sync",le="0.0001"} 0
tendermint_abci_connection_method_timing_bucket{chain_id="ci",method="commit",type="sync",le="0.0004"} 5
tendermint_abci_connection_method_timing_bucket{chain_id="ci",method="commit",type="sync",le="0.002"} 12
tendermint_abci_connection_method_timing_bucket{chain_id="ci",method="commit",type="sync",le="0.009"} 13
tendermint_abci_connection_method_timing_bucket{chain_id="ci",method="commit",type="sync",le="0.02"} 13
tendermint_abci_connection_method_timing_bucket{chain_id="ci",method="commit",type="sync",le="0.1"} 13
tendermint_abci_connection_method_timing_bucket{chain_id="ci",method="commit",type="sync",le="0.65"} 13
tendermint_abci_connection_method_timing_bucket{chain_id="ci",method="commit",type="sync",le="2"} 13
tendermint_abci_connection_method_timing_bucket{chain_id="ci",method="commit",type="sync",le="6"} 13
tendermint_abci_connection_method_timing_bucket{chain_id="ci",method="commit",type="sync",le="25"} 13
tendermint_abci_connection_method_timing_bucket{chain_id="ci",method="commit",type="sync",le="+Inf"} 13
tendermint_abci_connection_method_timing_sum{chain_id="ci",method="commit",type="sync"} 0.007802058000000001
tendermint_abci_connection_method_timing_count{chain_id="ci",method="commit",type="sync"} 13
```
These metrics can easily be graphed using prometheus's `histogram_quantile(...)` method to pick out a particular quantile to graph or examine. I chose buckets that were somewhat of an estimate of expected range of times for ABCI operations. They start at .0001 seconds and range to 25 seconds. The hope is that this range captures enough possible times to be useful for us and operators.
* fixup
* fixups
* docs: add abci timing metrics to the metrics docs (#7311)
* format table
* -----start------
* [cherrypicked] state: panic on ResponsePrepareProposal validation error (#8145)
* state: panic on ResponsePrepareProposal validation error
* lint++
Co-authored-by: Sam Kleinman <garen@tychoish.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* [cherrypicked] abci++: remove CheckTx call from PrepareProposal flow (#8176)
* [cherrypicked] abci++: correct max-size check to only operate on added and unmodified (#8242)
* [cherrypicked] Remove `ModifiedTxStatus` from the spec and the code (#8210)
* Outstanding abci-gen changes to 'pb.go' files
* Removed modified_tx_status from spec and protobufs
* Fix sed for OSX
* Regenerated abci protobufs with 'abci-proto-gen'
* Code changes. UTs e2e tests passing
* Recovered UT: TestPrepareProposalModifiedTxStatusFalse
* Adapted UT
* Fixed UT
* Revert "Fix sed for OSX"
This reverts commit e576708c61.
* Update internal/state/execution_test.go
Co-authored-by: William Banfield <4561443+williambanfield@users.noreply.github.com>
* Update abci/example/kvstore/kvstore.go
Co-authored-by: M. J. Fromberger <fromberger@interchain.io>
* Update internal/state/execution_test.go
Co-authored-by: William Banfield <4561443+williambanfield@users.noreply.github.com>
* Update spec/abci++/abci++_tmint_expected_behavior_002_draft.md
Co-authored-by: William Banfield <4561443+williambanfield@users.noreply.github.com>
* Addressed some comments
* Added one test that tests error at the ABCI client + Fixed some mock calls
* Addressed remaining comments
* Update abci/example/kvstore/kvstore.go
Co-authored-by: William Banfield <4561443+williambanfield@users.noreply.github.com>
* Update abci/example/kvstore/kvstore.go
Co-authored-by: William Banfield <4561443+williambanfield@users.noreply.github.com>
* Update abci/example/kvstore/kvstore.go
Co-authored-by: William Banfield <4561443+williambanfield@users.noreply.github.com>
* Update spec/abci++/abci++_tmint_expected_behavior_002_draft.md
Co-authored-by: William Banfield <4561443+williambanfield@users.noreply.github.com>
* Addressed William's latest comments
* Adressed Michael's comment
* Fixed UT
* Some md fixes
* More md fixes
* gofmt
Co-authored-by: William Banfield <4561443+williambanfield@users.noreply.github.com>
Co-authored-by: M. J. Fromberger <fromberger@interchain.io>
* make proto-gen
* Fixed testcase on PrepareProposal error
* mockery
Co-authored-by: William Banfield <4561443+williambanfield@users.noreply.github.com>
Co-authored-by: Sam Kleinman <garen@tychoish.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: M. J. Fromberger <fromberger@interchain.io>
* ----start----
* [PARTIAL cherry-pick] ABCI Vote Extension 2 (#6885)
* Cherry-picked #6567: state/types: refactor makeBlock, makeBlocks and makeTxs (#6567)
* [Cherrypicked] types: remove panic from block methods (#7501)
* [cherrypicked] abci++: synchronize PrepareProposal with the newest version of the spec (#8094)
This change implements the logic for the PrepareProposal ABCI++ method call. The main logic for creating and issuing the PrepareProposal request lives in execution.go and is tested in a set of new tests in execution_test.go. This change also updates the mempool mock to use a mockery generated version and removes much of the plumbing for the no longer used ABCIResponses.
* make proto-gen
* Backported EvidenceList's method ToABCI from #7961
* make build
* Fix mockery for Mempool
* mockery
* Backported abci Application mocks from #7961
* mockery2
* Fixed new PrepareProposal test cases in state/execution_test.go
* Fixed returned errors in consensus/state.go
* lint
* Addressed @cmwaters' comment
Co-authored-by: mconcat <monoidconcat@gmail.com>
Co-authored-by: JayT106 <JayT106@users.noreply.github.com>
Co-authored-by: Sam Kleinman <garen@tychoish.com>
Co-authored-by: William Banfield <4561443+williambanfield@users.noreply.github.com>
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
When testing rollback feature in the Cosmos SDK, we found that the app hash
in Tendermint after rollback was the value after the latest block, rather than
before it.
Co-authored-by: Callum Waters <cmwaters19@gmail.com>
Co-authored-by: yihuang <huang@crypto.com>
(cherry picked from commit 8a238fdcb4)
Inline factory function that does not exist in this branch.
Co-authored-by: M. J. Fromberger <fromberger@interchain.io>
A workaround for #6729. Add parameters to control buffer sizes for
event subscription RPC clients. On some networks, buffering causes
clients to be dropped and/or events to be lost.
For additional context, see the discussion on #7188.
- Add experimental_subscription_buffer_size config parameter
- Add experimental_websocket_write_buffer_size config parameter
- Add experimental_close_on_slow_client config parameter
Co-authored-by: M. J. Fromberger <fromberger@interchain.io>
This change backports the PostgreSQL indexing sink, addressing part of #6828.
Development on the main branch has diverged substantially since the v0.34.x
release. It includes package moves, breaking API and protobuf schema changes,
and new APIs, all of which together have a large footprint on the mapping
between the implementation at tip and the v0.34 release branch.
To avoid the need to retrofit all of those improvements, this change works by
injecting the new indexing sink into the existing (v0.34) indexing interfaces
by delegation. This means the backport does _not_ pull in all the newer APIs
for event handling, and thus has minimal impact on existing code written
against the v0.34 package structure.
This change includes the test for the `psql` implementation, and thus updates
some Go module dependencies. Because it does not interact with any other types,
however, I did not add any unit tests to other packages in this change.
Related changes:
* Update module dependencies for psql backport.
* Update test data to be type-compatible with the old protobuf types.
* Add config settings for the PostgreSQL indexer.
* Clean up some linter settings.
* Hook up the psql indexer in the node main.
Conflicting votes are now sent to the evidence pool to form duplicate vote evidence only once
the height of the evidence is finished and the time of the block finalised.
* mempool: length prefix txs when getting them from mempool (#5483)
* correctly calculate evidence data size (#5482)
* block: use commit sig size instead of vote size (#5490)
* tx: reduce function to one parameter (#5493)