Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(v1): [ENG-790] Implementing vote extension handlers #103

Merged
merged 9 commits into from
May 4, 2023

Conversation

davidterpay
Copy link
Contributor

No description provided.

@davidterpay davidterpay marked this pull request as ready for review April 28, 2023 21:15
abci/vote_extensions.go Outdated Show resolved Hide resolved
abci/vote_extensions.go Outdated Show resolved Hide resolved
abci/vote_extensions.go Outdated Show resolved Hide resolved
Comment on lines 88 to 92
// Validate the auction transaction and cache result
if err := h.verifyAuctionTx(ctx, bidTx); err != nil {
h.cache[hash] = err
} else {
h.cache[hash] = nil
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're need to check and set the cache in VerifyVoteExtension, not ExtendVote. The cache is so we don't verify the same vote ext twice.

Also note, CometBFT will never call ExtendVote and VerifyVoteExtension on the same client :)

Copy link
Contributor Author

@davidterpay davidterpay May 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, i was under the assumption that it might call it both on the same client so caching on both sides made sense. Will remove.

Copy link
Contributor

@alexanderbez alexanderbez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work!

Just let one minor comment.

Comment on lines 131 to 132
// RemoveTx removes a transaction from the application-side mempool.
func (h *VoteExtensionHandler) RemoveTx(tx sdk.Tx) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this :)

@davidterpay davidterpay merged commit 07c76b8 into main May 4, 2023
@davidterpay davidterpay deleted the terpay/vote-handlers branch May 4, 2023 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants