Repository navigation
Final merge of feature/abci++vef into main - #572
Merged
Merged
Conversation
Adds the `FinalizeBlock` method which replaces `BeginBlock`, `DeliverTx`, and `EndBlock` in a single call.
* [cherry-picked] 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 <[email protected]> * *Signed -> *ToSign * add Vote to RequestExtendVote * apply reviews * Apply suggestions from code review Co-authored-by: Dev Ojha <[email protected]> Co-authored-by: Aleksandr Bezobchuk <[email protected]> * fix typo, modify proto Co-authored-by: Aleksandr Bezobchuk <[email protected]> Co-authored-by: Dev Ojha <[email protected]> * [cherry-picked] 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 <[email protected]> * *Signed -> *ToSign * add Vote to RequestExtendVote * add example VoteExtension * apply reviews * fix vote * Apply suggestions from code review Co-authored-by: Dev Ojha <[email protected]> Co-authored-by: Aleksandr Bezobchuk <[email protected]> * 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 <[email protected]> Co-authored-by: Dev Ojha <[email protected]> * [cheryy-picked] abci: PrepareProposal-VoteExtension integration [2nd try] (#7821) * PrepareProposal-VoteExtension integration (#6915) * make proto-gen * Fix protobuf crash in e2e nightly tests * Update types/vote.go Co-authored-by: M. J. Fromberger <[email protected]> * Addressed @creachadair's comments Co-authored-by: mconcat <[email protected]> Co-authored-by: M. J. Fromberger <[email protected]> * [cherry-picked] Vote extensions: new design (#8031) * Changed the spec text to agreed VoteExtension solution * Revert "Removed protobufs related to vote extensions" This reverts commit 4566f1e. * Changes to ABCI protocol buffers * Update spec/core/data_structures.md Co-authored-by: M. J. Fromberger <[email protected]> * Update spec/core/data_structures.md Co-authored-by: M. J. Fromberger <[email protected]> * Fix dangling link in ABCI++ readme * Addressed comments Co-authored-by: M. J. Fromberger <[email protected]> * [cherry-picked] abci++: Sync implementation and spec for vote extensions (#8141) * Refactor so building and linting works This is the first step towards implementing vote extensions: generating the relevant proto stubs and getting the build and linter to pass. Signed-off-by: Thane Thomson <[email protected]> * Fix typo Signed-off-by: Thane Thomson <[email protected]> * Better describe method given vote extensions Signed-off-by: Thane Thomson <[email protected]> * Fix types tests Signed-off-by: Thane Thomson <[email protected]> * Move CanonicalVoteExtension to canonical types proto defs Signed-off-by: Thane Thomson <[email protected]> * Regenerate protos including latest PBTS synchrony params update Signed-off-by: Thane Thomson <[email protected]> * Inject vote extensions into proposal Signed-off-by: Thane Thomson <[email protected]> * Thread vote extensions through code and fix tests Signed-off-by: Thane Thomson <[email protected]> * Remove extraneous empty value initialization Signed-off-by: Thane Thomson <[email protected]> * Fix lint Signed-off-by: Thane Thomson <[email protected]> * Fix missing VerifyVoteExtension request data Signed-off-by: Thane Thomson <[email protected]> * Explicitly ensure length > 0 to sign vote extension Signed-off-by: Thane Thomson <[email protected]> * Explicitly ensure length > 0 to sign vote extension Signed-off-by: Thane Thomson <[email protected]> * Remove extraneous comment Signed-off-by: Thane Thomson <[email protected]> * Update privval/file.go Co-authored-by: M. J. Fromberger <[email protected]> * Update types/vote_test.go Co-authored-by: M. J. Fromberger <[email protected]> * Format Signed-off-by: Thane Thomson <[email protected]> * Fix ABCI proto generation scripts for Linux Signed-off-by: Thane Thomson <[email protected]> * Sync intermediate and goal protos Signed-off-by: Thane Thomson <[email protected]> * Update internal/consensus/common_test.go Co-authored-by: Sergio Mena <[email protected]> * Use dummy value with clearer meaning Signed-off-by: Thane Thomson <[email protected]> * Rewrite loop for clarity Signed-off-by: Thane Thomson <[email protected]> * Panic on ABCI++ method call failure Signed-off-by: Thane Thomson <[email protected]> * Add strong correctness guarantees when constructing extended commit info for ABCI++ Signed-off-by: Thane Thomson <[email protected]> * Add strong guarantee in extendedCommitInfo that the number of votes corresponds Signed-off-by: Thane Thomson <[email protected]> * Make extendedCommitInfo function more robust At first extendedCommitInfo expected votes to be in the same order as their corresponding validators in the supplied CommitInfo struct, but this proved to be rather difficult since when a validator set's loaded from state it's first sorted by voting power and then by address. Instead of sorting the votes in the same way, this approach simply maps votes to their corresponding validator's address prior to constructing the extended commit info. This way it's easy to look up the corresponding vote and we don't need to care about vote order. Signed-off-by: Thane Thomson <[email protected]> * Remove extraneous validator address assignment Signed-off-by: Thane Thomson <[email protected]> * Sign over canonical vote extension Signed-off-by: Thane Thomson <[email protected]> * Validate vote extension signature against canonical vote extension Signed-off-by: Thane Thomson <[email protected]> * Update privval tests for more meaningful dummy value Signed-off-by: Thane Thomson <[email protected]> * Add vote extension capability to E2E test app Signed-off-by: Thane Thomson <[email protected]> * Disable lint for weak RNG usage for test app Signed-off-by: Thane Thomson <[email protected]> * Use parseVoteExtension instead of custom parsing in PrepareProposal Signed-off-by: Thane Thomson <[email protected]> * Only include extension if we have received txs It's unclear at this point why this is necessary to ensure that the application's local app_hash matches that committed in the previous block. Signed-off-by: Thane Thomson <[email protected]> * Require app_hash from app to match that from last block Signed-off-by: Thane Thomson <[email protected]> * Add contrived (possibly flaky) test to check that vote extensions code works Signed-off-by: Thane Thomson <[email protected]> * Remove workaround for problem now solved by #8229 Signed-off-by: Thane Thomson <[email protected]> * add tests for vote extension cases * Fix spelling mistake to appease linter Signed-off-by: Thane Thomson <[email protected]> * Collapse redundant if statement Signed-off-by: Thane Thomson <[email protected]> * Formatting Signed-off-by: Thane Thomson <[email protected]> * Always expect an extension signature, regardless of whether an extension is present Signed-off-by: Thane Thomson <[email protected]> * Votes constructed from commits cannot include extensions or signatures Signed-off-by: Thane Thomson <[email protected]> * Pass through vote extension in test helpers Signed-off-by: Thane Thomson <[email protected]> * Temporarily disable vote extension signature requirement Signed-off-by: Thane Thomson <[email protected]> * Expand on vote equality test errors for clarity Signed-off-by: Thane Thomson <[email protected]> * Expand on vote matching error messages in testing Signed-off-by: Thane Thomson <[email protected]> * Allow for selective subscription by vote type This is an attempt to fix the intermittently failing `TestPrepareProposalReceivesVoteExtensions` test in the internal consensus package. Occasionally we get prevote messages via the subscription channel, and we're not interested in those. This change allows us to specify what types of votes we're interested in (i.e. precommits) and discard the rest. Signed-off-by: Thane Thomson <[email protected]> * Read lock consensus state mutex in test helper to avoid data race Signed-off-by: Thane Thomson <[email protected]> * Revert BlockIDFlag parameter in node test Signed-off-by: Thane Thomson <[email protected]> * Perform additional check in ProcessProposal for special txs generated by vote extensions Signed-off-by: Thane Thomson <[email protected]> * e2e: check that our added tx does not cause all txs to exceed req.MaxTxBytes Signed-off-by: Thane Thomson <[email protected]> * Only set vote extension signatures when signing is successful Signed-off-by: Thane Thomson <[email protected]> * Remove channel capacity constraint in test helper to avoid missing messages Signed-off-by: Thane Thomson <[email protected]> * Add TODO to always require extension signatures in vote validation Signed-off-by: Thane Thomson <[email protected]> * e2e: reject vote extensions if the request height does not match what we expect Signed-off-by: Thane Thomson <[email protected]> * types: remove extraneous call to voteWithoutExtension in test Signed-off-by: Thane Thomson <[email protected]> * Remove unnecessary address parameter from CanonicalVoteExtension Signed-off-by: Thane Thomson <[email protected]> * privval: change test vote type to precommit since we use an extension Signed-off-by: Thane Thomson <[email protected]> * privval: update signing logic to cater for vote extensions Signed-off-by: Thane Thomson <[email protected]> * proto: update field descriptions for vote message Signed-off-by: Thane Thomson <[email protected]> * proto: update field description for vote extension sig in vote message Signed-off-by: Thane Thomson <[email protected]> * proto/types: use fixed-length 64-bit integers for rounds in CanonicalVoteExtension Signed-off-by: Thane Thomson <[email protected]> * consensus: fix flaky TestPrepareProposalReceivesVoteExtensions Signed-off-by: Thane Thomson <[email protected]> * consensus: remove previously added test helper functionality Signed-off-by: Thane Thomson <[email protected]> * e2e: add error logs when we get an unexpected height in ExtendVote or VerifyVoteExtension requests Signed-off-by: Thane Thomson <[email protected]> * node_test: get validator addresses from privvals Signed-off-by: Thane Thomson <[email protected]> * privval/file_test: optimize filepv creation in tests Signed-off-by: Thane Thomson <[email protected]> * privval: add test to check that vote extensions are always signed Signed-off-by: Thane Thomson <[email protected]> * Add a script to check documentation for ToC entries. (#8356) This script verifies that each document in the docs and architecture directory has a corresponding table-of-contents entry in its README file. It can be run manually from the command line. - Hook up this script to run in CI (optional workflow). - Update ADR ToC to include missing entries this script found. * build(deps): Bump async from 2.6.3 to 2.6.4 in /docs (#8357) Bumps [async](https://github.com/caolan/async) from 2.6.3 to 2.6.4. - [Release notes](https://github.com/caolan/async/releases) - [Changelog](https://github.com/caolan/async/blob/v2.6.4/CHANGELOG.md) - [Commits](caolan/async@v2.6.3...v2.6.4) --- updated-dependencies: - dependency-name: async dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * privval/file_test: reset vote ext sig before signing Signed-off-by: Thane Thomson <[email protected]> Co-authored-by: M. J. Fromberger <[email protected]> Co-authored-by: Sergio Mena <[email protected]> Co-authored-by: William Banfield <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Fix cherry-picks * make proto-gen * make mockery * fix build * All units tests passing * linter error * Update consensus/state_test.go Co-authored-by: William Banfield <[email protected]> * Addressed @williambanfield's comments * Go, not C! Co-authored-by: mconcat <[email protected]> Co-authored-by: Aleksandr Bezobchuk <[email protected]> Co-authored-by: Dev Ojha <[email protected]> Co-authored-by: M. J. Fromberger <[email protected]> Co-authored-by: Thane Thomson <[email protected]> Co-authored-by: William Banfield <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: William Banfield <[email protected]>
* [cherry-picked] abci++: Vote extension cleanup (#8402) * Split vote verification/validation based on vote extensions Some parts of the code need vote extensions to be verified and validated (mostly in consensus), and other parts of the code don't because its possible that, in some cases (as per RFC 017), we won't have vote extensions. This explicitly facilitates that split. Signed-off-by: Thane Thomson <[email protected]> * Only sign extensions in precommits, not prevotes Signed-off-by: Thane Thomson <[email protected]> * Update privval/file.go Co-authored-by: M. J. Fromberger <[email protected]> * Apply suggestions from code review Co-authored-by: M. J. Fromberger <[email protected]> * Temporarily disable extension requirement again for E2E testing Signed-off-by: Thane Thomson <[email protected]> * Reorganize comment for clarity Signed-off-by: Thane Thomson <[email protected]> * Leave vote validation and pre-call nil check up to caller of VoteToProto Signed-off-by: Thane Thomson <[email protected]> * Split complex vote validation test into multiple tests Signed-off-by: Thane Thomson <[email protected]> * Universally enforce no vote extensions on any vote type but precommits Signed-off-by: Thane Thomson <[email protected]> * Make error messages more generic Signed-off-by: Thane Thomson <[email protected]> * Verify with vote extensions when constructing a VoteSet Signed-off-by: Thane Thomson <[email protected]> * Expand comment for clarity Signed-off-by: Thane Thomson <[email protected]> * Add extension check for prevotes prior to signing votes Signed-off-by: Thane Thomson <[email protected]> * Fix supporting test code to only inject extensions into precommits Signed-off-by: Thane Thomson <[email protected]> * Separate vote malleation from signing in vote tests for clarity Signed-off-by: Thane Thomson <[email protected]> * Add extension signature length check and corresponding test Signed-off-by: Thane Thomson <[email protected]> * Perform basic vote validation in CommitToVoteSet Signed-off-by: Thane Thomson <[email protected]> Co-authored-by: M. J. Fromberger <[email protected]> * Appease TestMempoolProgressAfterCreateEmptyBlocksInterval Co-authored-by: Thane Thomson <[email protected]> Co-authored-by: M. J. Fromberger <[email protected]>
* [cherry-picked] 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 <[email protected]> * make proto-gen Signed-off-by: Thane Thomson <[email protected]> * BlockStore holds extended commit Cherry-pick 8d504d4b50ec6afbdffe2df7ababbef30e15053d and fix conflicts. Signed-off-by: Thane Thomson <[email protected]> * 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 <[email protected]> * 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 <[email protected]> * Lift termination condition into for loop Signed-off-by: Thane Thomson <[email protected]> * Enforce vote extension signature requirement Signed-off-by: Thane Thomson <[email protected]> * Expand on comment for PeekTwoBlocks for posterity Signed-off-by: Thane Thomson <[email protected]> * Isolate TODO more clearly Signed-off-by: Thane Thomson <[email protected]> * make mockery Signed-off-by: Thane Thomson <[email protected]> * Fix comment Signed-off-by: Thane Thomson <[email protected]> * Make panic output from BlockStore.SaveBlock more readable Signed-off-by: Thane Thomson <[email protected]> * Add helper methods to ExtendedCommitSig and ExtendedCommit Signed-off-by: Thane Thomson <[email protected]> * Fix most tests except TestHandshake* Signed-off-by: Thane Thomson <[email protected]> * Fix store prefix collision Signed-off-by: Thane Thomson <[email protected]> * Fix TestBlockFetchAtHeight Signed-off-by: Thane Thomson <[email protected]> * Remove global state from store tests Signed-off-by: Thane Thomson <[email protected]> * Apply suggestions from code review Co-authored-by: M. J. Fromberger <[email protected]> Co-authored-by: Sergio Mena <[email protected]> * blocksync: Just return error Signed-off-by: Thane Thomson <[email protected]> * make format Signed-off-by: Thane Thomson <[email protected]> * types: Remove unused/commented-out code Signed-off-by: Thane Thomson <[email protected]> * blocksync: Change pool AddBlock function signature to return errors Signed-off-by: Thane Thomson <[email protected]> * types: Improve legibility of switch statements Signed-off-by: Thane Thomson <[email protected]> * blocksync: Expand on extended commit requirement in AddBlock description Signed-off-by: Thane Thomson <[email protected]> * blocksync: Return error without also logging it Signed-off-by: Thane Thomson <[email protected]> * consensus: Rename short-lived local variable Signed-off-by: Thane Thomson <[email protected]> * consensus: Allocate TODO to Sergio Signed-off-by: Thane Thomson <[email protected]> * evidence/pool_test: Inline slice construction Signed-off-by: Thane Thomson <[email protected]> * state: Rename LoadBlockExtCommit to LoadBlockExtendedCommit Signed-off-by: Thane Thomson <[email protected]> * proto: Remove TODO on TxResult Signed-off-by: Thane Thomson <[email protected]> * types: Minor format Signed-off-by: Thane Thomson <[email protected]> * types: Reformat ExtendedCommitSig.BlockID Signed-off-by: Thane Thomson <[email protected]> * types: Remove NewExtendedCommit constructor Signed-off-by: Thane Thomson <[email protected]> * types: Remove NewCommit constructor Signed-off-by: Thane Thomson <[email protected]> * types: Shorten receiver names for ExtendedCommit Signed-off-by: Thane Thomson <[email protected]> * types: Convert ExtendedCommit.Copy to a deep clone Signed-off-by: Thane Thomson <[email protected]> * types: Assign TODO to Sergio Signed-off-by: Thane Thomson <[email protected]> * types: Fix legibility nits Signed-off-by: Thane Thomson <[email protected]> * types: Improve legibility Signed-off-by: Thane Thomson <[email protected]> * store/state: Add TODO to move prefixes to common package Signed-off-by: Thane Thomson <[email protected]> * 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 <[email protected]> * Rename local var for clarity Signed-off-by: Thane Thomson <[email protected]> * Fix TestMaxProposalBlockSize Signed-off-by: Thane Thomson <[email protected]> * Rename local var for clarity Signed-off-by: Thane Thomson <[email protected]> * Remove debug log Signed-off-by: Thane Thomson <[email protected]> * Remove CommigSig.ForBlock helper Signed-off-by: Thane Thomson <[email protected]> * Remove CommigSig.Absent helper Signed-off-by: Thane Thomson <[email protected]> * Remove ExtendedCommitSig.ForBlock helper Signed-off-by: Thane Thomson <[email protected]> * Remove ExtendedCommitSig.Absent helper Signed-off-by: Thane Thomson <[email protected]> * There are no extended commits below the initial height Signed-off-by: Thane Thomson <[email protected]> * Fix comment grammar Signed-off-by: Thane Thomson <[email protected]> * Remove JSON encoding from ExtendedCommit Signed-off-by: Thane Thomson <[email protected]> * Embed CommitSig into ExtendedCommitSig instead of duplicating fields Signed-off-by: Thane Thomson <[email protected]> * Rename ExtendedCommit vote_extension field to extension for consistency with domain types Signed-off-by: Thane Thomson <[email protected]> * blocksync: Panic if we peek a block without an extended commit Signed-off-by: Thane Thomson <[email protected]> * Apply suggestions from code review Co-authored-by: M. J. Fromberger <[email protected]> * Remove Sergio from TODO Signed-off-by: Thane Thomson <[email protected]> * Increase hard-coded vote extension max size to 1MB Signed-off-by: Thane Thomson <[email protected]> * state: Remove unnecessary comment Signed-off-by: Thane Thomson <[email protected]> * state: Ensure no of commit sigs equals validator set length Signed-off-by: Thane Thomson <[email protected]> * make format Signed-off-by: Thane Thomson <[email protected]> * types: Minor legibility improvements Signed-off-by: Thane Thomson <[email protected]> * Improve legibility Signed-off-by: Thane Thomson <[email protected]> * types: Remove unused GetVotes function on VoteSet Signed-off-by: Thane Thomson <[email protected]> * Refactor TestMaxProposalBlockSize to construct more realistic extended commit Signed-off-by: Thane Thomson <[email protected]> * Refactor buildExtendedCommitInfo to resemble buildLastCommitInfo Signed-off-by: Thane Thomson <[email protected]> * Apply suggestions from code review Co-authored-by: M. J. Fromberger <[email protected]> * abci++: Disable VerifyVoteExtension call on nil precommits (#8491) Signed-off-by: Thane Thomson <[email protected]> * types: Require vote extensions on non-nil precommits and not otherwise Signed-off-by: Thane Thomson <[email protected]> * Disable lint Signed-off-by: Thane Thomson <[email protected]> * Increase timeout for TestReactorVotingPowerChange to counter flakiness Signed-off-by: Thane Thomson <[email protected]> * Only sign and verify vote extensions in non-nil precommits Signed-off-by: Thane Thomson <[email protected]> * Revert "Disable lint" This reverts commit 6fffbf94028a1ae78289abbad1b602c251f6f652. Signed-off-by: Thane Thomson <[email protected]> * Add missing non-nil check uncovered non-deterministically in TestHandshakeReplayAll Signed-off-by: Thane Thomson <[email protected]> * Expand error message for accuracy Signed-off-by: Thane Thomson <[email protected]> * Only call ExtendVote when we make non-nil precommits Signed-off-by: Thane Thomson <[email protected]> * Revert "Increase timeout for TestReactorVotingPowerChange to counter flakiness" This reverts commit af514939dbdf72ce275ef290a34c390a5e982563. Signed-off-by: Thane Thomson <[email protected]> * Refactor ValidateBasic for ExtendedCommitSig for legibility Signed-off-by: Thane Thomson <[email protected]> Co-authored-by: Sergio Mena <[email protected]> Co-authored-by: M. J. Fromberger <[email protected]> * make proto-gen * cp-fix * monkey-see-monkey-do-fixes * Fix tests (build) * Fix forgotten tests * fix_ut * Fix units tests * Fixed TestReactorInvalidPrecommit * Fix TestFinalizeBlockCalled * Fix all UTs * Add missing comment Co-authored-by: Thane Thomson <[email protected]> Co-authored-by: M. J. Fromberger <[email protected]>
…#9862) * [cherry-picked] 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 * Fix UTs * fix blocksync reactor import of state store * fixes1 * fixed_more_UTs * Fix TestHandshakeReplaySome * Fix all unit tests * Added hunk in original commit Co-authored-by: William Banfield <[email protected]> Co-authored-by: Callum Waters <[email protected]>
* [cherry-picked] 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 * Re-sync some things with original patch * fixes * Remove 'Skip' from TestApp_VoteExtensions * Fix all unit tests * Appease linter * Update types/params.go Co-authored-by: Thane Thomson <[email protected]> Co-authored-by: William Banfield <[email protected]> Co-authored-by: Thane Thomson <[email protected]>
* Obvious changes (including bugs) * Update privval/file.go Co-authored-by: Thane Thomson <[email protected]> Co-authored-by: Thane Thomson <[email protected]>
* Added checks to vote signing. Need to refactor makevote and signaddvote * Merged a number of similar versions of `makeVote` * refactor `signAddVote` so `MakeVote` can reuse the checks
…locksync reactor (#9926) * Fix problems in blocksync reactor logic & test the fixes * diagnose messages on TestCheckSwitchToConsensusLastHeightZero * Fixed test logic * Apply suggestions from code review Co-authored-by: Lasaro <[email protected]> * Addressed @lasarojc's comments Co-authored-by: Lasaro <[email protected]>
…#9927) * Make mempool v1 UTs more predictable * Simple changes * Reuse new signVote tests in production code * Fix `IsNil` problem from cherry-pick: should be `IsZero` * Fix linter issue * Apply suggestions from code review Co-authored-by: Lasaro <[email protected]> * Addressed @lasarojc's comment * Addressed @jmalicevic's comment Co-authored-by: Lasaro <[email protected]>
…7768 (#7) * [cherry-picked] Fixing handling of contexts in the ABCI++ rebased branch (#7768) * Fixing context * Removed logger change * Fixing UTs * Bump * Fix build, make UTs pass * Thread contexts to the concerned test cases * Placate linter * Make TestCheckSwitchToConsensusLastHeightZero less flaky * bump * Update blocksync/reactor_test.go
* [cherry-picked] ABCI++: Update new protos to use enum instead of bool (#8158) This pull request updates the new ABCI++ protos to use `enum`s in place of `bool`s. `enums` may be preferred over `bool` because an `enum` can be udpated to include new statuses in the future, whereas a `bool` cannot and is fixed as just `true` or `false` over the whole lifecycle of the API. * Detect and handle UNKNOWN in `ResponseVerifyVoteExtension` Co-authored-by: William Banfield <[email protected]>
Merge `main` into `feature/abci++vef`
… passed-through to application (#8216) (#98) closes: #7950 Co-authored-by: William Banfield <[email protected]>
* Initial version, RFC017 as committed last year * Adapted the initial text: renaming to CometBFT, updating links and references to v0.35.x/v0.36.x
…alize block (#421) Co-authored-by: Lasaro <[email protected]> Co-authored-by: Lasaro <[email protected]> Co-authored-by: Sergio Mena <[email protected]> Co-authored-by: Daniel cason <[email protected]>
* Applied last comments from PR #421 * Spelling errors
* Squashed tendermint/tendermint#8484 * Moved new text from rfc017 to rfc100 * Adapted the new text and finished the items in the PR (changes needed to main solutions) * Added log line in changelog section * Added link to references * Fix reference * Apply suggestions from code review Co-authored-by: Jasmina Malicevic <[email protected]> * Addressed @jmalicevic's comment * Update docs/rfc/rfc-100-abci-vote-extension-propag.md --------- Co-authored-by: Jasmina Malicevic <[email protected]>
* [partial cherry-pick] consensus: add additional metrics for abci++ data (#8480)
This pull request adds an additional set of metrics targeted at providing more visibility into `abci++`.
The following set of metrics are added and exposed through the `metrics` endpoint:
```
tendermint_consensus_proposal_receive_count{chain_id="test-chain-IrF74Y",status="accepted"} 34
tendermint_consensus_proposal_create_count{chain_id="test-chain-IrF74Y"} 34
tendermint_consensus_vote_extension_receive_count{chain_id="test-chain-IrF74Y",status="accepted"} 34
tendermint_consensus_round_voting_power_percent{chain_id="test-chain-IrF74Y",vote_type="precommit"} 1
tendermint_consensus_round_voting_power_percent{chain_id="test-chain-IrF74Y",vote_type="prevote"} 1
tendermint_state_consensus_param_updates{chain_id="test-chain-IrF74Y"} 0
tendermint_state_validator_set_updates{chain_id="test-chain-IrF74Y"} 0
tendermint_consensus_late_votes{chain_id="test-chain-IrF74Y",vote_type="precommit"} 16
```
This pull request also updates the `metrics.md` file to include some metrics that were previously missed. My hope is to generate the `metrics.md` file with a future version of the tool being architected in #8479
* make metrics
---------
Co-authored-by: William Banfield <[email protected]>
* [partial cherry-pick] 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 <[email protected]> * Updated changelog and `UPGRADING.md` * Fixed abci-cli tests, and doc * Addressed @cmwaters' comments * Addressed @cmwaters' comments, part 2 Co-authored-by: Callum Waters <[email protected]> * Levftover typo in spec --------- Co-authored-by: Callum Waters <[email protected]>
* e2e: programmable ABCI method times * fix linting error Co-authored-by: Callum Waters <[email protected]>
* Pass vote extension signature in `PrepareProposal` * make proto-gen * Verify extensions at PrepareProposal * Addressed @thanethomson's comments * Fix vote extension activation in e2e * ProcessProposal: 1st try * Working.... * Refactoring * Verify signatrue in unit test * spacing * Addressed @lasarojc's comments * Fix test
…espect coherence all over our code (#514) * Review and fix propoal coherence in all applications in the code base * Fixed comment for Commit --------- Co-authored-by: Jasmina Malicevic <[email protected]>
…at `PrepareProposal` time (#539) * Fix infinite loop in e2e runner * Change ci.toml to exacerbate the probability of hitting the bug (TO REVERT) * Insert a `panic` to help diagnose the problem (TO REVERT) * The fix * Revert commits a127993 and b8cca77 (disagnosis-related code) Revert "Insert a `panic` to help diagnose the problem (TO REVERT)" This reverts commit a127993. Revert "Change ci.toml to exacerbate the probability of hitting the bug (TO REVERT)" This reverts commit b8cca77.
* First full version testing vote extensions activation * troubleshooting * Fix application side * Simplify key separator + improve names
Thank you @sergio-mena and @lasarojc for the diagram that went into the final version! --------- Co-authored-by: Sergio Mena <[email protected]>
* proto changes, first version * Fix usage of `SignedLastBlock` * make proto-gen * Update proto/tendermint/abci/types.proto Co-authored-by: Jasmina Malicevic <[email protected]> --------- Co-authored-by: Jasmina Malicevic <[email protected]>
* Fix metrics bug * Fix metrics for vote extensions * Activate prometheus on ci.toml * Set up metric-related scripts
) * troubleshooting e2e problem * Strengthen vote extension checks on the ExtendedCommit part * Strengthen internal checks on when vote extensions should be present/absent * tidy up * Fix UTs * Added TODO DIAGNOSE panics for e2e testing * Revert "Added TODO DIAGNOSE panics for e2e testing" This reverts commit 9bef701. * Fix lint error * Addressed @lasarojc's comments * Appease linter
* Updated description of various data structures that have changed in the docs * Addressed @adizere's comment * Apply suggestions from code review Co-authored-by: Lasaro <[email protected]> --------- Co-authored-by: Lasaro <[email protected]>
Co-authored-by: Sergio Mena <[email protected]> --------- Co-authored-by: Lasaro <[email protected]> Co-authored-by: Sergio Mena <[email protected]> Co-authored-by: Adi Seredinschi <[email protected]>
16 tasks done
jmalicevic
reviewed
Mar 23, 2023
jmalicevic
approved these changes
Mar 23, 2023
jmalicevic
left a comment
Collaborator
There was a problem hiding this comment.
Looks good, amazing work!
Collaborator
Author
Amazing help :-) |
sergio-mena
force-pushed
the
sergio/final-merge-abci++vef
branch
from
March 23, 2023 12:56
f9d7380 to
4790ea3
Compare
Collaborator
Author
|
4790ea3 represents the original merge commit + all subsequent commits of this PR squashed onto the merge commit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Contributes to #10
This is the final merge of feature branch
feature/abci++vef. After this merge, the feature branch will cease to exist technically.We will need to make some adjustment to
UPGRADING.mdafter the merge with extra info on howFinalizeBlockevents are indexed, but that shouldn't block this merge.IMPORTANT: Please do not review the detail of this merge, as this code has already been reviewed on
feature/abci++vef.PR checklist
.changelog(we use unclog to manage our changelog)docs/orspec/) and code comments